MCPcopy Create free account
hub / github.com/Bananymous/banan-os / FDWrapper

Method FDWrapper

kernel/kernel/OpenFileDescriptorSet.cpp:934–939  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

932 {
933 LockGuard _(m_mutex);
934 TRY(validate_fd(fd));
935 return m_open_files[fd]->status_flags;
936 }
937
938 BAN::ErrorOr<void> OpenFileDescriptorSet::validate_fd(int fd) const
939 {
940 LockGuard _(m_mutex);
941 if (fd < 0 || fd >= (int)m_open_files.size())
942 return BAN::Error::from_errno(EBADF);

Callers

nothing calls this directly

Calls 1

on_cloneMethod · 0.45

Tested by

no test coverage detected