提交 2198a62e 编写于 作者: M Marcelo Tosatti 提交者: Anthony Liguori

fix inet_parse typo

qemu_opt_set wants on/off, not yes/no.
Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 c37cc7b0
...@@ -424,7 +424,7 @@ static int inet_parse(QemuOpts *opts, const char *str) ...@@ -424,7 +424,7 @@ static int inet_parse(QemuOpts *opts, const char *str)
__FUNCTION__, str); __FUNCTION__, str);
return -1; return -1;
} }
qemu_opt_set(opts, "ipv6", "yes"); qemu_opt_set(opts, "ipv6", "on");
} else if (qemu_isdigit(str[0])) { } else if (qemu_isdigit(str[0])) {
/* IPv4 addr */ /* IPv4 addr */
if (2 != sscanf(str,"%64[0-9.]:%32[^,]%n",addr,port,&pos)) { if (2 != sscanf(str,"%64[0-9.]:%32[^,]%n",addr,port,&pos)) {
...@@ -432,7 +432,7 @@ static int inet_parse(QemuOpts *opts, const char *str) ...@@ -432,7 +432,7 @@ static int inet_parse(QemuOpts *opts, const char *str)
__FUNCTION__, str); __FUNCTION__, str);
return -1; return -1;
} }
qemu_opt_set(opts, "ipv4", "yes"); qemu_opt_set(opts, "ipv4", "on");
} else { } else {
/* hostname */ /* hostname */
if (2 != sscanf(str,"%64[^:]:%32[^,]%n",addr,port,&pos)) { if (2 != sscanf(str,"%64[^:]:%32[^,]%n",addr,port,&pos)) {
...@@ -450,9 +450,9 @@ static int inet_parse(QemuOpts *opts, const char *str) ...@@ -450,9 +450,9 @@ static int inet_parse(QemuOpts *opts, const char *str)
if (h) if (h)
qemu_opt_set(opts, "to", h+4); qemu_opt_set(opts, "to", h+4);
if (strstr(optstr, ",ipv4")) if (strstr(optstr, ",ipv4"))
qemu_opt_set(opts, "ipv4", "yes"); qemu_opt_set(opts, "ipv4", "on");
if (strstr(optstr, ",ipv6")) if (strstr(optstr, ",ipv6"))
qemu_opt_set(opts, "ipv6", "yes"); qemu_opt_set(opts, "ipv6", "on");
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册