X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Fsfdisk.c;h=bf62c1dab42f135f41fb9042740ee09e8b7e2da6;hp=99a18bb144e8ee0017f0c203005dc5d3eab9d3cf;hb=840536ea5a0568296dfd3e483442c76b93c5a949;hpb=be49d1efa2c2447553f12a51c04f2c21f213fd75 diff --git a/daemon/sfdisk.c b/daemon/sfdisk.c index 99a18bb..bf62c1d 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