mkdir almost working.

Added changes to pathname lookup code so that the root
directory special case is handled properly.
This commit is contained in:
Bahadir Balban
2008-04-15 00:51:58 +01:00
parent 287b7705da
commit a9420d3dc9
11 changed files with 159 additions and 66 deletions

View File

@@ -136,6 +136,20 @@ int dirtest(void)
printf("\nCreating directories: usr, etc, tmp, var, home, opt, bin, boot, lib, dev\n");
if (mkdir("/usr", 0) < 0)
perror("MKDIR");
if (mkdir("/etc", 0) < 0)
perror("MKDIR");
if (mkdir("/tmp", 0) < 0)
perror("MKDIR");
if (mkdir("/var", 0) < 0)
perror("MKDIR");
if (mkdir("/bin", 0) < 0)
perror("MKDIR");
if (mkdir("/boot", 0) < 0)
perror("MKDIR");
if (mkdir("/lib", 0) < 0)
perror("MKDIR");
if (mkdir("/dev", 0) < 0)
perror("MKDIR");
printf("\nlsdir root directory:\n");
lsdir("/");