mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
Kernel: Simplify sys$inode_watcher_remove_watch() a little bit
This commit is contained in:
parent
d912bfdf38
commit
c076d765c4
1 changed files with 1 additions and 7 deletions
|
@ -58,13 +58,7 @@ KResultOr<FlatPtr> Process::sys$inode_watcher_remove_watch(int fd, int wd)
|
||||||
auto description = TRY(fds().file_description(fd));
|
auto description = TRY(fds().file_description(fd));
|
||||||
if (!description->is_inode_watcher())
|
if (!description->is_inode_watcher())
|
||||||
return EBADF;
|
return EBADF;
|
||||||
auto inode_watcher = description->inode_watcher();
|
return description->inode_watcher()->unregister_by_wd(wd);
|
||||||
|
|
||||||
auto result = inode_watcher->unregister_by_wd(wd);
|
|
||||||
if (result.is_error())
|
|
||||||
return result;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue