Skip to contentSkip to conversation

qemu-options: Fix bad "macaddr" property in the documentation

PATCH Applied Thomas Huth 3 participants 3 messages Aug 13, 2018 – Aug 15, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-options: Fix bad "macaddr" property in the documentation

When using the "-device" option, the property is called "mac". "macaddr" is only used for the legacy "-net nic" option.

---
 qemu-options.hx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
qemu-options.hx +1 -1
index b1bf0f4..3495531 100644
@@ -2345,7 +2345,7 @@ qemu-system-i386 linux.img \
                  -netdev socket,id=n2,mcast=230.0.0.1:1234
 # launch yet another QEMU instance on same "bus"
 qemu-system-i386 linux.img \
-                 -device e1000,netdev=n3,macaddr=52:54:00:12:34:58 \
+                 -device e1000,netdev=n3,mac=52:54:00:12:34:58 \
                  -netdev socket,id=n3,mcast=230.0.0.1:1234
 @end example
 
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Thomas Huth

When using the "-device" option, the property is called "mac". "macaddr" is only used for the legacy "-net nic" option.

Indeed:

    #define DEFINE_NIC_PROPERTIES(_state, _conf)                            \

---> DEFINE_PROP_MACADDR("mac", _state, _conf.macaddr), \
DEFINE_PROP_NETDEV("netdev", _state, _conf.peers)

Quoted 11 lines
---
 qemu-options.hx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
qemu-options.hx +0 -0
index b1bf0f4..3495531 100644

qemu-options.hx qemu-system-i386 linux.img \ · line 2350

Quoted 7 lines
qemu-options.hx +1 -1
@@ -2345,7 +2345,7 @@ qemu-system-i386 linux.img \
                  -netdev socket,id=n2,mcast=230.0.0.1:1234
 # launch yet another QEMU instance on same "bus"
 qemu-system-i386 linux.img \
-                 -device e1000,netdev=n3,macaddr=52:54:00:12:34:58 \
+                 -device e1000,netdev=n3,mac=52:54:00:12:34:58 \
                  -netdev socket,id=n3,mcast=230.0.0.1:1234
 @end example
Applied
#2 lore raw
Quoted 16 lines · Markus Armbruster
Quoted 2 lines · Thomas Huth

When using the "-device" option, the property is called "mac". "macaddr" is only used for the legacy "-net nic" option.

Indeed:

     #define DEFINE_NIC_PROPERTIES(_state, _conf)                            \

---> DEFINE_PROP_MACADDR("mac", _state, _conf.macaddr), \
DEFINE_PROP_NETDEV("netdev", _state, _conf.peers)

Quoted 6 lines
---
  qemu-options.hx | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

qemu-options.hx qemu-system-i386 linux.img \ · line 2350

Quoted 12 lines
qemu-options.hx +1 -1
index b1bf0f4..3495531 100644
@@ -2345,7 +2345,7 @@ qemu-system-i386 linux.img \
                   -netdev socket,id=n2,mcast=230.0.0.1:1234
  # launch yet another QEMU instance on same "bus"
  qemu-system-i386 linux.img \
-                 -device e1000,netdev=n3,macaddr=52:54:00:12:34:58 \
+                 -device e1000,netdev=n3,mac=52:54:00:12:34:58 \
                   -netdev socket,id=n3,mcast=230.0.0.1:1234
  @end example

Applied.

Thanks