summaryrefslogtreecommitdiff
path: root/userfs.c
diff options
context:
space:
mode:
authorkaashoek <kaashoek>2006-08-11 18:18:38 +0000
committerkaashoek <kaashoek>2006-08-11 18:18:38 +0000
commit24437cd554995f729969299e72699e2ba5d9b068 (patch)
treee3b5aa572c9621d1f932788fc882d4e6d693473f /userfs.c
parent17a856577f9db766b8ef7099d0575d378dff5dd1 (diff)
downloadxv6-labs-24437cd554995f729969299e72699e2ba5d9b068.tar.gz
xv6-labs-24437cd554995f729969299e72699e2ba5d9b068.tar.bz2
xv6-labs-24437cd554995f729969299e72699e2ba5d9b068.zip
fix deadlock---iput(dp) asap
working unlink, but doesn't free dir blocks that become empty remove out-of-date comment in ioapic
Diffstat (limited to 'userfs.c')
-rw-r--r--userfs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/userfs.c b/userfs.c
index af87561..8c6121b 100644
--- a/userfs.c
+++ b/userfs.c
@@ -5,7 +5,7 @@
// file system tests
-char buf[2000];
+char buf[3000];
char *echo_args[] = { "echo", "hello", "goodbye", 0 };
char *cat_args[] = { "cat", "README", 0 };
@@ -62,13 +62,14 @@ main(void)
} else {
printf(stdout, "error: open doesnotexist failed!\n");
}
- i = read(fd, buf, 10000);
+ i = read(fd, buf, 2000);
if (i == 2000) {
- printf(stdout, "read succeeded\\n");
+ printf(stdout, "read succeeded\n");
} else {
printf(stdout, "read failed\n");
}
close(fd);
+ unlink("doesnotexist");
//exec("echo", echo_args);
printf(stdout, "about to do exec\n");
exec("cat", cat_args);