Skip to contentSkip to conversation

fix inet_parse typo

PATCH Applied Marcelo Tosatti 2 participants 2 messages Feb 9, 2010 – Feb 10, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix inet_parse typo

qemu_opt_set wants on/off, not yes/no.

qemu-sockets.c +4 -4
index 8850516..a88b2a7 100644
@@ -424,7 +424,7 @@ static int inet_parse(QemuOpts *opts, const char *str)
                     __FUNCTION__, str);
             return -1;
         }
-        qemu_opt_set(opts, "ipv6", "yes");
+        qemu_opt_set(opts, "ipv6", "on");
     } else if (qemu_isdigit(str[0])) {
         /* IPv4 addr */
         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)
                     __FUNCTION__, str);
             return -1;
         }
-        qemu_opt_set(opts, "ipv4", "yes");
+        qemu_opt_set(opts, "ipv4", "on");
     } else {
         /* hostname */
         if (2 != sscanf(str,"%64[^:]:%32[^,]%n",addr,port,&pos)) {
@@ -450,9 +450,9 @@ static int inet_parse(QemuOpts *opts, const char *str)
     if (h)
         qemu_opt_set(opts, "to", h+4);
     if (strstr(optstr, ",ipv4"))
-        qemu_opt_set(opts, "ipv4", "yes");
+        qemu_opt_set(opts, "ipv4", "on");
     if (strstr(optstr, ",ipv6"))
-        qemu_opt_set(opts, "ipv6", "yes");
+        qemu_opt_set(opts, "ipv6", "on");
     return 0;
 }
 
#1 lore raw
Quoted 4 lines · Marcelo Tosatti

qemu_opt_set wants on/off, not yes/no.

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 38 lines
qemu-sockets.c +4 -4
index 8850516..a88b2a7 100644
@@ -424,7 +424,7 @@ static int inet_parse(QemuOpts *opts, const char *str)
                      __FUNCTION__, str);
              return -1;
          }
-        qemu_opt_set(opts, "ipv6", "yes");
+        qemu_opt_set(opts, "ipv6", "on");
      } else if (qemu_isdigit(str[0])) {
          /* IPv4 addr */
          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)
                      __FUNCTION__, str);
              return -1;
          }
-        qemu_opt_set(opts, "ipv4", "yes");
+        qemu_opt_set(opts, "ipv4", "on");
      } else {
          /* hostname */
          if (2 != sscanf(str,"%64[^:]:%32[^,]%n",addr,port,&pos)) {
@@ -450,9 +450,9 @@ static int inet_parse(QemuOpts *opts, const char *str)
      if (h)
          qemu_opt_set(opts, "to", h+4);
      if (strstr(optstr, ",ipv4"))
-        qemu_opt_set(opts, "ipv4", "yes");
+        qemu_opt_set(opts, "ipv4", "on");
      if (strstr(optstr, ",ipv6"))
-        qemu_opt_set(opts, "ipv6", "yes");
+        qemu_opt_set(opts, "ipv6", "on");
      return 0;
  }