diff mbox series

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

Message ID 1534161104-8253-1-git-send-email-thuth@redhat.com
State New
Headers show
Series qemu-options: Fix bad "macaddr" property in the documentation | expand

Commit Message

Thomas Huth Aug. 13, 2018, 11:51 a.m. UTC
When using the "-device" option, the property is called "mac".
"macaddr" is only used for the legacy "-net nic" option.

Reported-by: Harald Hoyer <harald@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 qemu-options.hx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Markus Armbruster Aug. 13, 2018, 12:31 p.m. UTC | #1
Thomas Huth <thuth@redhat.com> writes:

> 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)

> Reported-by: Harald Hoyer <harald@redhat.com>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  qemu-options.hx | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qemu-options.hx b/qemu-options.hx
> index b1bf0f4..3495531 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -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

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Jason Wang Aug. 15, 2018, 3:06 a.m. UTC | #2
On 2018年08月13日 20:31, Markus Armbruster wrote:
> Thomas Huth <thuth@redhat.com> writes:
>
>> 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)
>
>> Reported-by: Harald Hoyer <harald@redhat.com>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>   qemu-options.hx | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/qemu-options.hx b/qemu-options.hx
>> index b1bf0f4..3495531 100644
>> --- a/qemu-options.hx
>> +++ b/qemu-options.hx
>> @@ -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
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
>

Applied.

Thanks
diff mbox series

Patch

diff --git a/qemu-options.hx b/qemu-options.hx
index b1bf0f4..3495531 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -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