Re: [libvirt PATCH v4 23/25] nodedev: add <uuid> element to mdev caps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 03, 2021 at 11:39:07AM -0600, Jonathon Jongsma wrote:
> It will be useful to be able to specify a particular UUID for a mediated
> device when defining the node device. To accomodate that, allow this to
> be specified in the xml schema. This patch also parses and formats that
> value to the xml, but does not yet use it.
> 
> Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
> ---
...

>  
> +    if ((uuidstr = virXPathString("string(./uuid[1])", ctxt))) {
> +        /* make sure that the provided uuid is valid */
> +        if (virUUIDParse(uuidstr, uuidbuf) < 0) {
> +            virReportError(VIR_ERR_INTERNAL_ERROR,
> +                           _("Invalid uuid '%s' for '%s'"), mdev->uuid,

we don't have mdev->uuid at this point yet, so:
s/mdev->uuid/uuidstr

> +                           def->name);

we also haven't generated any name yet, so ^this yields "new device". I'd
suggest to hardcode the message with "new mdev device" instead of using
def->name.

Being able to specify UUIDs with mdevs directly is great.

Reviewed-by: Erik Skultety <eskultet@xxxxxxxxxx>




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux