summaryrefslogtreecommitdiff
path: root/ls.c
diff options
context:
space:
mode:
authorrsc <rsc>2006-09-06 17:04:06 +0000
committerrsc <rsc>2006-09-06 17:04:06 +0000
commita650c606fecc7e3938345e2bc52050a9ea725e7a (patch)
tree3bd2cfcd215f7ad4abdb087cdfe91f608c7f0801 /ls.c
parent45854caa93eecc3f80d34940b7cf6a400b640d69 (diff)
downloadxv6-labs-a650c606fecc7e3938345e2bc52050a9ea725e7a.tar.gz
xv6-labs-a650c606fecc7e3938345e2bc52050a9ea725e7a.tar.bz2
xv6-labs-a650c606fecc7e3938345e2bc52050a9ea725e7a.zip
spacing fixes: no tabs, 2-space indents (for rtm)
Diffstat (limited to 'ls.c')
-rw-r--r--ls.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ls.c b/ls.c
index 34fac2a..395b307 100644
--- a/ls.c
+++ b/ls.c
@@ -59,17 +59,17 @@ main(int argc, char *argv[])
sz = st.st_size;
for(off = 0; off < sz; off += sizeof(struct dirent)) {
if (read(fd, &dirent, sizeof(struct dirent)) != sizeof(struct dirent)) {
- printf(1, "ls: read error\n");
- break;
+ printf(1, "ls: read error\n");
+ break;
}
if (dirent.inum != 0) {
- // xxx prepend to name the pathname supplied to ls (e.g. .. in ls ..)
- if (stat (dirent.name, &st) < 0) {
- printf(1, "stat: failed %s\n", dirent.name);
- continue;
- }
- pname(dirent.name);
- printf(1, "%d %d %d\n", st.st_type, dirent.inum, st.st_size);
+ // xxx prepend to name the pathname supplied to ls (e.g. .. in ls ..)
+ if (stat (dirent.name, &st) < 0) {
+ printf(1, "stat: failed %s\n", dirent.name);
+ continue;
+ }
+ pname(dirent.name);
+ printf(1, "%d %d %d\n", st.st_type, dirent.inum, st.st_size);
}
}
break;