diff options
| author | rsc <rsc> | 2006-09-07 13:07:39 +0000 | 
|---|---|---|
| committer | rsc <rsc> | 2006-09-07 13:07:39 +0000 | 
| commit | 94d7e2597544199ba793aa43ebd43c08abf052de (patch) | |
| tree | 2033ee3c04aa144352a07c4ac7ba0626a6264b05 /mkfs.c | |
| parent | 7678a19ecf6fc9d8f0ded5b590df4e3499701139 (diff) | |
| download | xv6-labs-94d7e2597544199ba793aa43ebd43c08abf052de.tar.gz xv6-labs-94d7e2597544199ba793aa43ebd43c08abf052de.tar.bz2 xv6-labs-94d7e2597544199ba793aa43ebd43c08abf052de.zip  | |
avoid system binary clashes
Diffstat (limited to 'mkfs.c')
| -rw-r--r-- | mkfs.c | 8 | 
1 files changed, 8 insertions, 0 deletions
@@ -51,6 +51,7 @@ xint(uint x)    return y;  } +int  main(int argc, char *argv[])  {    int i, cc, fd; @@ -111,6 +112,13 @@ main(int argc, char *argv[])        perror(argv[i]);        exit(1);      } +     +    // Skip leading _ in name when writing to file system. +    // The binaries are named _rm, _cat, etc. to keep the +    // build operating system from trying to execute them +    // in place of system binaries like rm and cat. +    if(argv[i][0] == '_') +      ++argv[i];      inum = ialloc(T_FILE);  | 
