]> Zhao Yanbai Git Server - minix.git/commitdiff
Let tar accept 'tar -cvf' (with -).
authorBen Gras <ben@minix3.org>
Sun, 28 Aug 2005 22:19:51 +0000 (22:19 +0000)
committerBen Gras <ben@minix3.org>
Sun, 28 Aug 2005 22:19:51 +0000 (22:19 +0000)
commands/simple/tar.c

index 21894012dabb5d989967237809641bdd50961081..53c68042bc11af1bc5f192d7aeec420d38e59c09 100755 (executable)
@@ -241,6 +241,8 @@ register char *argv[];
   if (argc < 3) error(usage, NIL_PTR);
 
   for (ptr = argv[1]; *ptr; ptr++) {
+       /* Ignore - as first char */
+       if(*ptr == '-' && ptr == argv[1]) continue;
        switch (*ptr) {
            case 'c':   creat_fl = TRUE;        break;
            case 'x':   ext_fl = TRUE;  break;