summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2020-08-18 20:48:53 -0400
committerFrans Kaashoek <[email protected]>2020-08-21 11:00:45 -0400
commitd4d487731ad760376999130fc2ad520c3dd6166c (patch)
tree2b5e7ba5148b12d86295f032190f7c182b087a70 /user
parent3c25112f382e6ccdfda927125cfe30d2b7d6b9df (diff)
downloadxv6-labs-d4d487731ad760376999130fc2ad520c3dd6166c.tar.gz
xv6-labs-d4d487731ad760376999130fc2ad520c3dd6166c.tar.bz2
xv6-labs-d4d487731ad760376999130fc2ad520c3dd6166c.zip
Use the major number defined in file.h. The minor number is ignored;
might as well use 0.
Diffstat (limited to 'user')
-rw-r--r--user/init.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/user/init.c b/user/init.c
index 13764ca..e0a5689 100644
--- a/user/init.c
+++ b/user/init.c
@@ -2,6 +2,10 @@
#include "kernel/types.h"
#include "kernel/stat.h"
+#include "kernel/spinlock.h"
+#include "kernel/sleeplock.h"
+#include "kernel/fs.h"
+#include "kernel/file.h"
#include "user/user.h"
#include "kernel/fcntl.h"
@@ -13,7 +17,7 @@ main(void)
int pid, wpid;
if(open("console", O_RDWR) < 0){
- mknod("console", 1, 1);
+ mknod("console", CONSOLE, 0);
open("console", O_RDWR);
}
dup(0); // stdout