mirror of
https://github.com/drasko/codezero.git
synced 2026-02-09 08:23:22 +01:00
mkdir almost working.
Added changes to pathname lookup code so that the root directory special case is handled properly.
This commit is contained in:
@@ -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("/");
|
||||
|
||||
Reference in New Issue
Block a user