Patchwork [3/8] vl.c: Abort on unknown -numa option type

login
register
mail settings
Submitter Eduardo Habkost
Date Feb. 4, 2013, 6:27 p.m.
Message ID <1360002472-17628-4-git-send-email-ehabkost@redhat.com>
Download mbox | patch
Permalink /patch/218045/
State New
Headers show

Comments

Eduardo Habkost - Feb. 4, 2013, 6:27 p.m.
Abort in case an invalid -numa option is provided, instead of silently
ignoring it.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
 vl.c | 3 +++
 1 file changed, 3 insertions(+)

Patch

diff --git a/vl.c b/vl.c
index 0dae44c..586aa9a 100644
--- a/vl.c
+++ b/vl.c
@@ -1293,6 +1293,9 @@  static void numa_add(const char *optarg)
             bitmap_set(node_cpumask[nodenr], value, endvalue-value+1);
         }
         nb_numa_nodes++;
+    } else {
+        fprintf(stderr, "Invalid -numa option: %s\n", option);
+        exit(1);
     }
 }