[Libguestfs] [PATCH 2/2] launch: Add add_drive 'label' option.

Richard W.M. Jones rjones at redhat.com
Fri Oct 5 11:08:47 UTC 2012


On Fri, Oct 05, 2012 at 12:32:58PM +0200, Olaf Hering wrote:
> On Fri, Oct 05, Richard W.M. Jones wrote:
> 
> > 
> 
> +=item C<label>     
> +    
> +Give the disk a label.  The label should be a unique, short
> +string using I<only> ASCII characters C<[a-zA-Z]>.
> 
> No support for digits etc.?

The underlying serial field supports digits and more (in fact it's
really an arbitrary 20 byte buffer).  However I excluded digits in
this case because the usual Linux naming scheme for partitions is
either:

  /dev/<name><partnum>

where <name> ends in an alphabetic character (eg. /dev/sda) , else:

  /dev/<name>p<partnum>

where <name> ends in a digit (eg. /dev/mmcblk0p1).

If we allow people to use a label that ends in a digit then we'd
(probably) need to abide by this convention too, which makes things
complicated.  I agree this is not ideal, but also we can relax this
restriction later.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




More information about the Libguestfs mailing list