diff options
-rw-r--r-- | daemon/sfdisk.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/daemon/sfdisk.c b/daemon/sfdisk.c index 99a18bb1..bf62c1da 100644 --- a/daemon/sfdisk.c +++ b/daemon/sfdisk.c @@ -89,8 +89,6 @@ sfdisk (const char *device, int n, int cyls, int heads, int sectors, return -1; } - udev_settle (); - /* sfdisk sometimes fails on fast machines with: * * Re-reading the partition table ... @@ -103,7 +101,12 @@ sfdisk (const char *device, int n, int cyls, int heads, int sectors, * other component. In any case, reread the partition table * unconditionally here. */ - return do_blockdev_rereadpt (device); + if (do_blockdev_rereadpt (device) == -1) + return -1; + + udev_settle (); + + return 0; } int |