write system call

This commit is contained in:
Matheus
2022-08-20 13:01:26 -03:00
parent b3b5981f7a
commit bd94ce8134
4 changed files with 76 additions and 4 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ syscallret syscall_lseek(int ifd, off_t offset, int whence){
spinlock_acquire(&proc->fdlock);
if(proc->fdcount <= ifd || fd->node == NULL || (fd->flags & FD_FLAGS_READ) == 0){
if(proc->fdcount <= ifd || fd->node == NULL){
spinlock_release(&proc->fdlock);
retv.errno = EBADF;
return retv;