Re: [libvirt PATCH v2 07/15] conf: split out hostdev <driver> parse/format to their own functions

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

 



On Mon, Nov 06, 2023 at 02:38:52 -0500, Laine Stump wrote:
> This is done so that we can re-use the same parser/formatter for
> <network> and <networkport>
> 
> Signed-off-by: Laine Stump <laine@xxxxxxxxxx>
> ---
>  src/conf/device_conf.c | 41 +++++++++++++++++++++++++++++++++++++++++
>  src/conf/device_conf.h |  7 +++++++
>  src/conf/domain_conf.c | 28 +++++-----------------------
>  3 files changed, 53 insertions(+), 23 deletions(-)
> 
> diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c
> index 25a522671e..e022783816 100644
> --- a/src/conf/device_conf.c
> +++ b/src/conf/device_conf.c
> @@ -55,6 +55,47 @@ VIR_ENUM_IMPL(virDomainDeviceAddress,
>                "unassigned",
>  );

[...]

> +int
> +virDeviceHostdevPCIDriverInfoFormat(virBuffer *buf,
> +                                    const virDeviceHostdevPCIDriverInfo *driver)
> +{
> +    g_auto(virBuffer) driverAttrBuf = VIR_BUFFER_INITIALIZER;
> +
> +    if (driver->type != VIR_DEVICE_HOSTDEV_PCI_DRIVER_TYPE_DEFAULT) {
> +        const char *driverType
> +            = virDeviceHostdevPCIDriverTypeToString(driver->type);

-||-

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[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