From: Will Sowerbutts Date: Fri, 23 Jan 2015 23:26:41 +0000 (+0000) Subject: Kernel: Bug fix: _mknod() always failed X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f52b89d43133e4f2c9b7656221382116d7ebdf8a;p=FUZIX.git Kernel: Bug fix: _mknod() always failed --- diff --git a/Kernel/syscall_fs2.c b/Kernel/syscall_fs2.c index 872b608e..379dd726 100644 --- a/Kernel/syscall_fs2.c +++ b/Kernel/syscall_fs2.c @@ -108,7 +108,8 @@ int16_t _mknod(void) } filename(name, fname); - if ((ino = newfile(parent, fname)) != NULL) + ino = newfile(parent, fname); + if(!ino) goto nogood3; /* parent inode is derefed in newfile. SN */ /* Initialize mode and dev */ @@ -762,4 +763,4 @@ done: #undef file -#undef lockop \ No newline at end of file +#undef lockop