[Libguestfs] [PATCH 0/2] lib: Add API for reading the "name" field for a drive

Richard W.M. Jones rjones at redhat.com
Thu Apr 28 11:37:42 UTC 2022


Patch 1 seems uncontroversial.

Patch 2 is tricky.  This is related to the following RFE:
https://github.com/libguestfs/libguestfs/issues/80

I initially believed that the reporter wanted to just associate some
general data per drive, and wanted to reuse the (unused) name field
for this.  That's what this patch implements.

However I since believe that he's in fact trying to just get the drive
name of the drive that was just added.  There's no need for any API
for that, you can just assume drives are called (from the guestfs API
point of view) /dev/sda, /dev/sdb etc.

Adding patch 2 probably confuses things, since I guess most people
would assume that an API called guestfs_get_drive_name would return
the drive name (/dev/sda) not some string that you have to add.

Rich.




More information about the Libguestfs mailing list