mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix wrong return value for fcntl(F_SETFL, ...).
This commit is contained in:
parent
31c310036c
commit
0235fc3a62
1 changed files with 2 additions and 2 deletions
|
@ -331,7 +331,7 @@ static int sys_fcntl(int fd, int cmd, uintptr_t arg)
|
|||
|
||||
// Operations on the file descriptior.
|
||||
if ( cmd == F_SETFD )
|
||||
return dtable->SetFlags(fd, (int) arg) ? 0 : -1;;
|
||||
return dtable->SetFlags(fd, (int) arg) ? 0 : -1;
|
||||
if ( cmd == F_GETFD )
|
||||
return dtable->GetFlags(fd);
|
||||
|
||||
|
@ -345,7 +345,7 @@ static int sys_fcntl(int fd, int cmd, uintptr_t arg)
|
|||
if ( !desc )
|
||||
return -1;
|
||||
if ( cmd == F_SETFL )
|
||||
return desc->SetFlags((int) arg);
|
||||
return desc->SetFlags((int) arg) ? 0 : -1;
|
||||
if ( cmd == F_GETFL )
|
||||
return desc->GetFlags();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue