mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-30 14:08:21 +00:00
fd: change allocation to add a lowest fd option
This commit is contained in:
@@ -417,9 +417,9 @@ void sched_runinit(){
|
||||
|
||||
fd_t *stdinfd, *stdoutfd, *stderrfd;
|
||||
|
||||
fd_alloc(&proc->fdtable, &stdinfd, &tmp);
|
||||
fd_alloc(&proc->fdtable, &stdoutfd, &tmp);
|
||||
fd_alloc(&proc->fdtable, &stderrfd, &tmp);
|
||||
fd_alloc(&proc->fdtable, &stdinfd, &tmp, 0);
|
||||
fd_alloc(&proc->fdtable, &stdoutfd, &tmp, 0);
|
||||
fd_alloc(&proc->fdtable, &stderrfd, &tmp, 0);
|
||||
|
||||
#define CONSOLE_PATH "dev/console"
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ syscallret syscall_open(const char* pathname, int flags, mode_t mode){
|
||||
int ifd;
|
||||
fd_t* fd;
|
||||
|
||||
int err = fd_alloc(&proc->fdtable, &fd, &ifd);
|
||||
int err = fd_alloc(&proc->fdtable, &fd, &ifd, 0);
|
||||
|
||||
if(err){
|
||||
retv.errno = err;
|
||||
|
||||
Reference in New Issue
Block a user