Generate a dummy 'Fedora' fedora.img in images directory for use by tests.
[libguestfs.git] / daemon / sfdisk.c
index 99a18bb..ec77465 100644 (file)
@@ -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,11 @@ 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);
+  (void) command (NULL, NULL, "blockdev", "--rereadpt", NULL);
+
+  udev_settle ();
+
+  return 0;
 }
 
 int