bug fix in lseek
This commit is contained in:
parent
4e0d89e67a
commit
ed9b9f1831
1 changed files with 2 additions and 3 deletions
|
@ -139,9 +139,8 @@ static int sys_lseek(int fd, off_t pos, int origin)
|
|||
int ret = -EINVAL;
|
||||
fildes_t* file = &(per_core(current_task)->fildes_table[fd]);
|
||||
|
||||
// Disabled for testing purposes
|
||||
if (BUILTIN_EXPECT(file->node->type != FS_FILE
|
||||
&& file->node->type != FS_CHARDEVICE, 0));
|
||||
if (BUILTIN_EXPECT(!((file->node->type == FS_FILE)
|
||||
|| (file->node->type == FS_CHARDEVICE)), 0))
|
||||
return -EINVAL;
|
||||
|
||||
switch(origin)
|
||||
|
|
Loading…
Add table
Reference in a new issue