summaryrefslogtreecommitdiff
path: root/userfs.c
diff options
context:
space:
mode:
authorkaashoek <kaashoek>2006-08-09 16:04:04 +0000
committerkaashoek <kaashoek>2006-08-09 16:04:04 +0000
commit6fa5ffb56ffdbe5a37bfc04d063fbff2bf929c27 (patch)
tree7a06e4e145812109fcec97aec32c135632481edf /userfs.c
parent6c0e444fcdf7ba21442513acbc69c7fca9def06b (diff)
downloadxv6-labs-6fa5ffb56ffdbe5a37bfc04d063fbff2bf929c27.tar.gz
xv6-labs-6fa5ffb56ffdbe5a37bfc04d063fbff2bf929c27.tar.bz2
xv6-labs-6fa5ffb56ffdbe5a37bfc04d063fbff2bf929c27.zip
devsw
checkpoint: write(fd,"hello\n",6) where fd is a console dev almost works
Diffstat (limited to 'userfs.c')
-rw-r--r--userfs.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/userfs.c b/userfs.c
index b11f3eb..dcdffbb 100644
--- a/userfs.c
+++ b/userfs.c
@@ -20,6 +20,17 @@ main(void)
puts ("mknod failed\n");
else
puts ("made a node\n");
+ fd = open("console", 1);
+ if(fd >= 0){
+ puts("open console ok\n");
+ close(fd);
+ } else {
+ puts("open console failed!\n");
+ }
+ if (write (fd, "hello\n", 6) != 6) {
+ puts ("write to console failed\n");
+ }
+ close (fd);
fd = open("echo", 0);
if(fd >= 0){