Patchwork [3/4] net.h: Add description fields for qdev properites

login
register
mail settings
Submitter Amit Shah
Date Sept. 15, 2010, 12:36 p.m.
Message ID <ec6b3e99b302de3454395e91fa2cb0b8d5eab35d.1284553514.git.amit.shah@redhat.com>
Download mbox | patch
Permalink /patch/64808/
State New
Headers show

Comments

Amit Shah - Sept. 15, 2010, 12:36 p.m.
This results in an output like:

$ ./x86_64-softmmu/qemu-system-x86_64 -device virtio-net-pci,?

...

virtio-net-pci.mac=macaddr, The MAC address for the NIC.
virtio-net-pci.vlan=vlan, The VLAN to associate the NIC with.
virtio-net-pci.netdev=netdev, The peer net device to associate with this virtual NIC.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
 net.h |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

Patch

diff --git a/net.h b/net.h
index f11c108..b6658fd 100644
--- a/net.h
+++ b/net.h
@@ -20,9 +20,12 @@  typedef struct NICConf {
 } NICConf;
 
 #define DEFINE_NIC_PROPERTIES(_state, _conf)                            \
-    DEFINE_PROP_MACADDR("mac",   _state, _conf.macaddr, ""),            \
-    DEFINE_PROP_VLAN("vlan",     _state, _conf.vlan, ""),               \
-    DEFINE_PROP_NETDEV("netdev", _state, _conf.peer, "")
+    DEFINE_PROP_MACADDR("mac",   _state, _conf.macaddr,                 \
+                        "The MAC address for the NIC."),                \
+    DEFINE_PROP_VLAN("vlan",     _state, _conf.vlan,                    \
+                     "The VLAN to associate the NIC with."),            \
+    DEFINE_PROP_NETDEV("netdev", _state, _conf.peer,                    \
+                       "The peer net device to associate with this virtual NIC.")
 
 /* VLANs support */