don't print unallocated dir entries
This commit is contained in:
parent
211ff0c67e
commit
8abe2bcf15
1 changed files with 2 additions and 1 deletions
1
ls.c
1
ls.c
|
@ -35,6 +35,7 @@ main(int argc, char *argv[])
|
|||
printf(2, "ls: read error\n");
|
||||
exit();
|
||||
}
|
||||
if (dirent.inum != 0)
|
||||
printf(1, "%s\n", dirent.name);
|
||||
}
|
||||
close(fd);
|
||||
|
|
Loading…
Reference in a new issue