[Libguestfs] Notes on compiling libguestfs 1.19.59 on Debian 7 (Wheezy) beta

Richard W.M. Jones rjones at redhat.com
Wed Nov 14 14:04:10 UTC 2012


On Wed, Nov 14, 2012 at 02:59:00PM +0100, Olaf Hering wrote:
> @@ -103,7 +104,11 @@ main (int argc, char *argv[])
> +  if (asprintf(&disk_name, "/dev/%s", use_virtio_blk ? "vda" : "sda") < 0)
> +    exit (EXIT_FAILURE);
> +  if (asprintf(&partition_name, "%s1", disk_name) < 0)
> +    exit (EXIT_FAILURE);
> +
>    for (;;) {
>      c = getopt_long (argc, argv, options, long_options, &option_index);
>      if (c == -1) break;
> @@ -257,19 +267,19 @@ main (int argc, char *argv[])
>    fflush (stdout);
>  
>    /* Create the filesystem and mount everything. */
> -  if (guestfs_part_disk (g, "/dev/sda", "mbr") == -1) {
> +  if (guestfs_part_disk (g, disk_name, "mbr") == -1) {
>      fprintf (stderr,
>               _("libguestfs-test-tool: failed to run part-disk\n"));
>      exit (EXIT_FAILURE);
>    }
[etc]

This part should not be necessary.  The daemon translates strings like
/dev/sda to the correct format automatically:

http://libguestfs.org/guestfs.3.html#block-device-naming

However there is a bug in the new mke2fs API where it doesn't
translate the optional journaldevice argument properly.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v




More information about the Libguestfs mailing list