Use the major number defined in file.h. The minor number is ignored;

might as well use 0.
This commit is contained in:
Frans Kaashoek 2020-08-18 20:48:53 -04:00
parent 3c25112f38
commit d4d487731a

View file

@ -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