kernel/fs/handle.c
/*
 * Returns a pointer to the object referenced by the handle 'fd'.  Ensures
 * it belongs to the specified process and is of the requested type.
 */
Returns a pointer to the object referenced by the handle 'fd'.  Ensures
it belongs to the specified process and is of the requested type.
Returns a pointer to the object referenced by the handle ' fd ' . Ensures it belongs to the specified process and is of the requested type .
struct Filp *GetFilp(int fd) {
  struct Process *current;
  uint16_t filp_idx;
  current = GetCurrentProcess();
  if (fd < 0 || fd >= NPROC_FD) {
    return NULL;
  }
  return current->fd_table[fd];
}
struct Filp * GetFilp ( int fd ) { struct Process * current ; uint16_t filp_idx ; current = GetCurrentProcess ( ) ; if ( fd < 0 || fd >= NPROC_FD ) { return NULL ; } return current -> fd_table [ fd ] ; }
Returns a pointer to the object referenced by the handle 'fd'.
Returns a pointer to the object referenced by the handle ' fd ' .