Re: [PATCH RFC 05/22] storage: Add NONE protocol type for network disks

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

 



On 05/06/2014 07:36 AM, Peter Krempa wrote:
> Currently the protocol type with index 0 was NBD which made it hard to
> distinguish wether the protocol type was actually assigned. Add a new

s/wether/whether/

> protocol type with index 0 to distinguish it explicitly.
> ---
>  src/qemu/qemu_command.c   | 2 ++
>  src/qemu/qemu_driver.c    | 3 +++
>  src/util/virstoragefile.c | 1 +
>  src/util/virstoragefile.h | 1 +
>  4 files changed, 7 insertions(+)

Missing a change to src/conf/domain_conf.c: virDomainDiskSourceParse
must change:

        if ((src->protocol =
virStorageNetProtocolTypeFromString(protocol)) < 0){


to use <= 0, so that XML doesn't start accepting "none" as a valid
protocol type.

> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index c0f2fb6..48eeae0 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -3582,6 +3582,7 @@ qemuNetworkDriveGetPort(int protocol,
> 
>          case VIR_STORAGE_NET_PROTOCOL_RBD:
>          case VIR_STORAGE_NET_PROTOCOL_LAST:
> +        case VIR_STORAGE_NET_PROTOCOL_NONE:
>              /* not aplicable */

s/aplicable/applicable/ while at it

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[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]