Skip to content

Commit

Permalink
don't print unallocated dir entries
Browse files Browse the repository at this point in the history
  • Loading branch information
kaashoek committed Aug 13, 2006
1 parent 211ff0c commit 8abe2bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ls.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ main(int argc, char *argv[])
printf(2, "ls: read error\n");
exit();
}
printf(1, "%s\n", dirent.name);
if (dirent.inum != 0)
printf(1, "%s\n", dirent.name);
}
close(fd);

Expand Down

0 comments on commit 8abe2bc

Please sign in to comment.