Use the major number defined in file.h. The minor number is ignored;
might as well use 0.
This commit is contained in:
parent
3c25112f38
commit
d4d487731a
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
#include "kernel/types.h"
|
#include "kernel/types.h"
|
||||||
#include "kernel/stat.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 "user/user.h"
|
||||||
#include "kernel/fcntl.h"
|
#include "kernel/fcntl.h"
|
||||||
|
|
||||||
|
@ -13,7 +17,7 @@ main(void)
|
||||||
int pid, wpid;
|
int pid, wpid;
|
||||||
|
|
||||||
if(open("console", O_RDWR) < 0){
|
if(open("console", O_RDWR) < 0){
|
||||||
mknod("console", 1, 1);
|
mknod("console", CONSOLE, 0);
|
||||||
open("console", O_RDWR);
|
open("console", O_RDWR);
|
||||||
}
|
}
|
||||||
dup(0); // stdout
|
dup(0); // stdout
|
||||||
|
|
Loading…
Reference in a new issue