Make copying and moving swap depend on mkswap availability (#775932)
Attempting to copy or move linux-swap partition was possible when the mkswap command was unavailable. However as linux-swap is re-created as part of these operations the mkswap command is a mandatory requirement. Example copy operation results: Copy /dev/sdb1 to /dev/sdb2 + calibrate /dev/sdb1 + check file system on /dev/sdb1 for errors and (if possible) fix them + create empty partition + set partition type on /dev/sdb2 + copy file system from /dev/sdb1 to /dev/sdb2 [SUCCESS] Partition copy action skipped because linux-swap file system does not contain data + grow file system to fill the partition [WARNING] growing is not available for this file system Because mkswap was not available the grow action didn't re-create the linux-swap so the newly copied partition is left without any content and therefore reported as an unknown partition. Fix by making copying and moving linux-swap depend on mkswap being available. Bug 775932 - Refactor mostly applying of operations
This commit is contained in:
parent
0420159c1d
commit
a1c2454856
|
@ -55,6 +55,8 @@ FS linux_swap::get_filesystem_support()
|
||||||
fs .create_with_label = GParted::FS::EXTERNAL ;
|
fs .create_with_label = GParted::FS::EXTERNAL ;
|
||||||
fs .grow = GParted::FS::EXTERNAL ;
|
fs .grow = GParted::FS::EXTERNAL ;
|
||||||
fs .shrink = GParted::FS::EXTERNAL ;
|
fs .shrink = GParted::FS::EXTERNAL ;
|
||||||
|
fs.copy = FS::EXTERNAL;
|
||||||
|
fs.move = FS::EXTERNAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! Glib::find_program_in_path( "swaplabel" ) .empty() )
|
if ( ! Glib::find_program_in_path( "swaplabel" ) .empty() )
|
||||||
|
@ -65,9 +67,6 @@ FS linux_swap::get_filesystem_support()
|
||||||
fs .write_uuid = FS::EXTERNAL ;
|
fs .write_uuid = FS::EXTERNAL ;
|
||||||
}
|
}
|
||||||
|
|
||||||
fs .copy = GParted::FS::EXTERNAL ;
|
|
||||||
fs .move = GParted::FS::EXTERNAL ;
|
|
||||||
|
|
||||||
return fs ;
|
return fs ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue