Error on too many arguments.
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Tue, 12 Dec 2006 13:18:31 +0000 (13:18 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Tue, 12 Dec 2006 13:18:31 +0000 (13:18 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2429 94cd875c-1c1d-0410-91d2-eb244daf1a30

src/vdevmap.c

index 4019c19..2682296 100644 (file)
@@ -123,6 +123,8 @@ int main(int argc, char *argv[])
 
   if (xid==VC_NOCTX)
     WRITE_MSG(2, "No xid specified; try '--help' for more information\n");
+  else if (optind!=argc)
+    WRITE_MSG(2, "Unused argument(s); try '--help' for more information\n");
   else if (vc_set_mapping(xid, device, target, flags)==-1)
       perror("vc_set_mapping()");
   else