[haiku-bugs] [Haiku] #15774: Add ability to retrieve path of file descriptor

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Mon, 02 Mar 2020 09:23:25 -0000

#15774: Add ability to retrieve path of file descriptor
---------------------------+------------------------------
 Reporter:  X512           |        Owner:  nobody
     Type:  enhancement    |       Status:  new
 Priority:  normal         |    Milestone:  Unscheduled
Component:  System/Kernel  |      Version:  R1/Development
 Keywords:                 |   Blocked By:
 Blocking:                 |  Has a Patch:  0
 Platform:  All            |
---------------------------+------------------------------
 This is hrev53917.

 Currently there are no ability to retrieve path of file descriptor.
 `_kern_entry_ref_to_path(dev, node, NULL, path, B_OS_NAME_LENGTH)` is only
 work for directories.

 All major OS are support this feature:
 * Windows: `GetFileInformationByHandleEx` with `FileNameInfo`.
 * Linux: Path can be retrieved from `/proc/self/fd/<fd>`.
 * Mac OS X: `fcntl(fd, F_GETPATH, filePath)`.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/15774>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: