mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 21:03:54 -06:00
net: Fix a misleading error message
The error message $ qemu-system-x86_64 -netdev user,id=net0,ipv6-net=fec0::0/ qemu-system-x86_64: -netdev user,id=net0,ipv6-net=fec0::0/: Parameter 'ipv6-prefixlen' expects a number points to ipv6-prefixlen instead of ipv6-net. Fix: qemu-system-x86_64: -netdev user,id=net0,ipv6-net=fec0::0/: parameter 'ipv6-net' expects a number after '/' Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20231031111059.3407803-6-armbru@redhat.com>
This commit is contained in:
parent
517b0220ef
commit
0a4a1512e0
1 changed files with 3 additions and 3 deletions
|
@ -1227,7 +1227,7 @@ static int net_client_init(QemuOpts *opts, bool is_netdev, Error **errp)
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
Visitor *v = opts_visitor_new(opts);
|
Visitor *v = opts_visitor_new(opts);
|
||||||
|
|
||||||
/* Parse convenience option format ip6-net=fec0::0[/64] */
|
/* Parse convenience option format ipv6-net=fec0::0[/64] */
|
||||||
const char *ip6_net = qemu_opt_get(opts, "ipv6-net");
|
const char *ip6_net = qemu_opt_get(opts, "ipv6-net");
|
||||||
|
|
||||||
if (ip6_net) {
|
if (ip6_net) {
|
||||||
|
@ -1247,8 +1247,8 @@ static int net_client_init(QemuOpts *opts, bool is_netdev, Error **errp)
|
||||||
if (substrings[1] &&
|
if (substrings[1] &&
|
||||||
qemu_strtoul(substrings[1], NULL, 10, &prefix_len))
|
qemu_strtoul(substrings[1], NULL, 10, &prefix_len))
|
||||||
{
|
{
|
||||||
error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
|
error_setg(errp,
|
||||||
"ipv6-prefixlen", "a number");
|
"parameter 'ipv6-net' expects a number after '/'");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue