don't print unallocated dir entries

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

3
ls.c
View file

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