weird spacing

This commit is contained in:
rsc 2006-09-06 18:47:48 +00:00
parent 50e514be98
commit 236d33698b
2 changed files with 5 additions and 5 deletions

2
ls.c
View file

@ -64,7 +64,7 @@ main(int argc, char *argv[])
} }
if(dirent.inum != 0) { if(dirent.inum != 0) {
// xxx prepend to name the pathname supplied to ls (e.g. .. in ls ..) // xxx prepend to name the pathname supplied to ls (e.g. .. in ls ..)
if(stat (dirent.name, &st) < 0) { if(stat (dirent.name, &st) < 0) {
printf(1, "stat: failed %s\n", dirent.name); printf(1, "stat: failed %s\n", dirent.name);
continue; continue;
} }

View file

@ -111,7 +111,7 @@ writetest1(void)
} }
n = 0; n = 0;
while(1) { for(;;) {
i = read(fd, buf, 512); i = read(fd, buf, 512);
if(i == 0) { if(i == 0) {
if(n == MAXFILE - 1) { if(n == MAXFILE - 1) {
@ -162,17 +162,17 @@ void dirtest(void)
{ {
printf(stdout, "mkdir\n"); printf(stdout, "mkdir\n");
if(mkdir("dir0") < 0) { if(mkdir("dir0") < 0) {
printf(stdout, "mkdir failed\n"); printf(stdout, "mkdir failed\n");
exit(); exit();
} }
if(chdir("dir0") < 0) { if(chdir("dir0") < 0) {
printf(stdout, "chdir dir0 failed\n"); printf(stdout, "chdir dir0 failed\n");
exit(); exit();
} }
if(chdir("..") < 0) { if(chdir("..") < 0) {
printf(stdout, "chdir .. failed\n"); printf(stdout, "chdir .. failed\n");
exit(); exit();
} }