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

Eric Blake eblake at redhat.com
Wed May 7 04:20:21 UTC 2014


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140506/63e232c1/attachment-0001.sig>


More information about the libvir-list mailing list