don't print unallocated dir entries

This commit is contained in:
kaashoek 2006-08-13 15:05:58 +00:00
parent 211ff0c67e
commit 8abe2bcf15

1
ls.c
View file

@ -35,6 +35,7 @@ main(int argc, char *argv[])
printf(2, "ls: read error\n"); printf(2, "ls: read error\n");
exit(); exit();
} }
if (dirent.inum != 0)
printf(1, "%s\n", dirent.name); printf(1, "%s\n", dirent.name);
} }
close(fd); close(fd);