mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 05:40:40 +08:00
@@ -47,8 +47,13 @@ rtems_bsd_get_file(int fd)
|
||||
struct file *fp;
|
||||
|
||||
if ((uint32_t) fd < rtems_libio_number_iops) {
|
||||
unsigned int flags;
|
||||
|
||||
fp = rtems_bsd_fd_to_fp(fd);
|
||||
if ((fp->f_io.flags & LIBIO_FLAGS_OPEN) != LIBIO_FLAGS_OPEN) {
|
||||
flags = rtems_libio_iop_hold(&fp->f_io);
|
||||
|
||||
if ((flags & LIBIO_FLAGS_OPEN) == 0) {
|
||||
rtems_libio_iop_drop(&fp->f_io);
|
||||
fp = NULL;
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user