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

Olaf Hering olaf at aepfle.de
Wed Nov 14 14:10:24 UTC 2012


On Wed, Nov 14, Richard W.M. Jones wrote:

> 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:

I havent tested every single part of this change, most of it was done
mechanically. But, I think the test-tool used to fail due to sda/vda
mismatch, thats the reason why this hunk is still there.

Olaf




More information about the Libguestfs mailing list