Consider the following partition layout
# Start End
1 0Mb 54Mb
and the following request
parted --script /dev/sda mkpart p ext2 50 100
Then parted 1.8.8 would say the closest it could manage was to start the
new partition at 54Mb and ask if it's OK and exit as a failure.
But since we're running it in script more we want it to go ahead.
I've knocked up a very quick patched version which we're deploying to
fix this problem.
Cheers,
Kenny.
--- parted/parted.c~ Thu Aug 9 16:20:33 2007
+++ parted/parted.c Fri Sep 14 14:40:17 2007
@@ -763,6 +763,7 @@
start_sol = ped_unit_format (*dev, part->geom.start);
end_sol = ped_unit_format (*dev, part->geom.end);
+ if (!opt_script_mode) {
switch (ped_exception_throw (
PED_EXCEPTION_WARNING,
PED_EXCEPTION_YES_NO,
@@ -781,6 +782,7 @@
/* undo partition addition */
goto error_remove_part;
}
+ }
} else {
goto error_remove_part;
}
@@ -934,6 +936,7 @@
start_sol = ped_unit_format (*dev, part->geom.start);
end_sol = ped_unit_format (*dev, part->geom.end);
+ if (!opt_script_mode) {
switch (ped_exception_throw (
PED_EXCEPTION_WARNING,
PED_EXCEPTION_YES_NO,
@@ -951,6 +954,7 @@
/* undo partition addition */
goto error_remove_part;
}
+ }
} else {
goto error_remove_part;
}
_______________________________________________
bug-parted mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-parted