diff --git a/parted-cmd-arg-fix.patch b/parted-cmd-arg-fix.patch new file mode 100644 index 0000000..a63e98c --- /dev/null +++ b/parted-cmd-arg-fix.patch @@ -0,0 +1,100 @@ +# Fix #473207 - parted cannot recognize any arguments to various commands +# Patch from IBM bugzilla, also showed up on parted-devel ML (not checked in yet) +diff -Nuarp parted-1.8.8.org/parted/parted.c parted-1.8.8/parted/parted.c +--- parted-1.8.8.org/parted/parted.c 2009-01-19 03:20:37.000000000 -0600 ++++ parted-1.8.8/parted/parted.c 2009-01-19 03:20:37.000000000 -0600 +@@ -511,12 +511,11 @@ do_cp (PedDevice** dev) + _("Can't copy an extended partition.")); + goto error_destroy_disk; + } +- if (!_partition_warn_busy (src)) +- goto error_destroy_disk; +- + if (!command_line_get_partition (_("Destination partition number?"), + dst_disk, &dst)) + goto error_destroy_disk; ++ if (!_partition_warn_busy (src)) ++ goto error_destroy_disk; + if (!_partition_warn_busy (dst)) + goto error_destroy_disk; + +@@ -603,6 +602,9 @@ do_mklabel (PedDevice** dev) + if (!disk) ped_exception_catch (); + ped_exception_leave_all (); + ++ if (!command_line_get_disk_type (_("New disk label type?"), &type)) ++ goto error; ++ + if (disk) { + if (!_disk_warn_busy (disk)) + goto error_destroy_disk; +@@ -612,9 +614,6 @@ do_mklabel (PedDevice** dev) + ped_disk_destroy (disk); + } + +- if (!command_line_get_disk_type (_("New disk label type?"), &type)) +- goto error; +- + disk = ped_disk_new_fresh (*dev, type); + if (!disk) + goto error; +@@ -646,15 +645,15 @@ do_mkfs (PedDevice** dev) + if (!disk) + goto error; + ++ if (!command_line_get_partition (_("Partition number?"), disk, &part)) ++ goto error_destroy_disk; ++ if (!command_line_get_fs_type (_("File system type?"), &type)) ++ goto error_destroy_disk; + if (!opt_script_mode && !_partition_warn_loss()) + goto error_destroy_disk; + +- if (!command_line_get_partition (_("Partition number?"), disk, &part)) +- goto error_destroy_disk; + if (!_partition_warn_busy (part)) + goto error_destroy_disk; +- if (!command_line_get_fs_type (_("File system type?"), &type)) +- goto error_destroy_disk; + + fs = ped_file_system_create (&part->geom, type, g_timer); + if (!fs) +@@ -1046,8 +1045,6 @@ do_move (PedDevice** dev) + + if (!command_line_get_partition (_("Partition number?"), disk, &part)) + goto error_destroy_disk; +- if (!_partition_warn_busy (part)) +- goto error_destroy_disk; + if (part->type == PED_PARTITION_EXTENDED) { + ped_exception_throw (PED_EXCEPTION_ERROR, PED_EXCEPTION_CANCEL, + _("Can't move an extended partition.")); +@@ -1064,6 +1061,8 @@ do_move (PedDevice** dev) + end = start + old_geom.length - 1; + if (!command_line_get_sector (_("End?"), *dev, &end, &range_end)) + goto error_close_fs; ++ if (!_partition_warn_busy (part)) ++ goto error_close_fs; + + /* set / test on "disk" */ + if (!ped_geometry_init (&new_geom, *dev, start, end - start + 1)) +@@ -1817,10 +1816,6 @@ do_resize (PedDevice** dev) + + if (!command_line_get_partition (_("Partition number?"), disk, &part)) + goto error_destroy_disk; +- if (part->type != PED_PARTITION_EXTENDED) { +- if (!_partition_warn_busy (part)) +- goto error_destroy_disk; +- } + + start = part->geom.start; + end = part->geom.end; +@@ -1828,6 +1823,10 @@ do_resize (PedDevice** dev) + goto error_destroy_disk; + if (!command_line_get_sector (_("End?"), *dev, &end, &range_end)) + goto error_destroy_disk; ++ if (part->type != PED_PARTITION_EXTENDED) { ++ if (!_partition_warn_busy (part)) ++ goto error_destroy_disk; ++ } + + if (!ped_geometry_init (&new_geom, *dev, start, end - start + 1)) + goto error_destroy_disk; diff --git a/parted.changes b/parted.changes index 4386cab..68734a7 100644 --- a/parted.changes +++ b/parted.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Feb 9 13:20:38 CET 2009 - puzel@suse.cz + +- parted-cmd-arg-fix.patch (bnc#473207) + ------------------------------------------------------------------- Fri Jan 23 13:15:14 CET 2009 - puzel@suse.cz diff --git a/parted.spec b/parted.spec index 1a08762..2a9cbda 100644 --- a/parted.spec +++ b/parted.spec @@ -26,7 +26,7 @@ License: GPL v2 or later Group: System/Filesystems Summary: GNU partitioner Version: 1.8.8 -Release: 98 +Release: 99 Source0: %{name}-%{version}.tar.bz2 Patch: always-resize-part.dif Patch1: parted-type.patch @@ -52,6 +52,7 @@ Patch60: fix-dasd-probe.patch Patch61: fix-multipath-part-name.patch Patch62: fix-error-informing-the-kernel.patch Patch63: do-not-discard-bootcode-in-extended-partition.patch +Patch64: parted-cmd-arg-fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Url: http://www.gnu.org/software/parted/ PreReq: %install_info_prereq @@ -123,6 +124,7 @@ Authors: %patch61 -p1 %patch62 -p1 %patch63 -p1 +%patch64 -p1 %build AUTOPOINT=true autoreconf --force --install @@ -167,6 +169,8 @@ rm -rf "$RPM_BUILD_ROOT" %{_libdir}/*.so %changelog +* Mon Feb 09 2009 puzel@suse.cz +- parted-cmd-arg-fix.patch (bnc#473207) * Fri Jan 23 2009 puzel@suse.cz - do-not-discard-bootcode-in-extended-partition.patch (bnc#467576) * Fri Jan 23 2009 puzel@suse.cz