Specify nic via commmand line
authorKyle Milka <kmilka1995@gmail.com>
Tue, 16 Aug 2016 21:21:04 +0000 (14:21 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 16 Aug 2016 22:03:57 +0000 (18:03 -0400)
You can now specifiy the nic to use with the -n option.

Change-Id: I39c4384953798f4f9eb43057300037c4934d7f4f
Signed-off-by: Kyle Milka <kmilka@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
tests/vmm/vmrunkernel.c

index c858eb9..808560c 100644 (file)
@@ -403,7 +403,7 @@ int main(int argc, char **argv)
        ((uint32_t *)a_page)[0x30/4] = 0x01060015;
        //((uint32_t *)a_page)[0x30/4] = 0xDEADBEEF;
 
-       while ((c = getopt(argc, argv, "dvm:c:gsf:k:")) != -1) {
+       while ((c = getopt(argc, argv, "dvm:c:gsf:k:n:")) != -1) {
                switch (c) {
                        case 'd':
                                debug++;
@@ -448,6 +448,9 @@ int main(int argc, char **argv)
                                }
                                close(cmdline_fd);
                                break;
+                       case 'n':
+                               default_nic = strtoull(optarg, 0, 0);
+                               break;
                        default:
                                fprintf(stderr, "BMAFR\n");
                                break;