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

Re: [Xen-devel] [PATCH 2 of 9 RFC v2] blktap3/libblktapctl: Introduce tapdisk message types and structures



On Tue, 2012-12-04 at 18:19 +0000, Thanos Makatos wrote:
> +     /**
> +      * Protocol to use: native, 32 bit, or 64 bit.
> +      * TODO Is this used for supporting a 32 bit guest on a 64 bit 
> hypervisor?

Sort of. The proto stuff is to support 32-bit dom0 talking to 64-bit
domU and vice versa.

> +     TAPDISK_MESSAGE_DISK_INFO_RSP,
> +     TAPDISK_MESSAGE_XENBLKIF_CONNECT,
> +     TAPDISK_MESSAGE_XENBLKIF_CONNECT_RSP,
> +     TAPDISK_MESSAGE_XENBLKIF_DISCONNECT,
> +     TAPDISK_MESSAGE_XENBLKIF_DISCONNECT_RSP,
>       TAPDISK_MESSAGE_EXIT,
>  };
>  
> -static inline char *
> -tapdisk_message_name(enum tapdisk_message_id id)
> -{
> -     switch (id) {
> -     case TAPDISK_MESSAGE_ERROR:
> -             return "error";
> +#define TAPDISK_MESSAGE_MAX TAPDISK_MESSAGE_EXIT

A nice trick here is to include TAPDISK_MESSAGE_MAX in the enum.




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.