Lines Matching refs:fd
41 dup_maybe_system(int fd)
43 if (get_descriptor(fd) != NULL)
44 return _kern_dup(fd);
46 int clonedFD = dup(fd);
52 close_maybe_system(int fd)
54 if (get_descriptor(fd) != NULL)
55 return _kern_close(fd);
57 return close(fd) == 0 ? B_OK : errno;
80 return get_path(fd, NULL, path);
102 FileDescriptor::FileDescriptor(int fd)
104 this->fd = fd;
117 if (fd >= 0) {
118 int oldFD = fd;
119 fd = -1;
131 int dupFD = dup(fd);
143 if (fstat(fd, st) < 0)
191 status_t error = get_path(fd, NULL, path);
209 status_t error = get_path(fd, NULL, realPath);
485 get_descriptor(int fd)
489 DescriptorMap::iterator it = sDescriptors->find(fd);
502 int fd = -1;
504 fd = file->fd;
507 for (fd = kVirtualDescriptorStart;
508 sDescriptors->find(fd) != sDescriptors->end();
509 fd++) {
513 (*sDescriptors)[fd] = descriptor;
514 descriptor->fd = fd;
516 return fd;
521 delete_descriptor(int fd)
523 DescriptorMap::iterator it = sDescriptors->find(fd);
540 is_unknown_or_system_descriptor(int fd)
542 Descriptor* descriptor = get_descriptor(fd);