What's the equivalent of readdirat()?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm moving some code to use openat() and friends, but there doesn't appear to 
be a readdirat().

The problem is that readdir(3) takes a path from cwd.  The syscall readdir(2) 
takes a file descriptor, but the man page for readdir(2) says it was 
supplanted by getdents.  The getdents man page says that's an internal 
syscall that glibc doesn't even bother to _wrap_, and points me back at 
readdir(3) which still takes a path from cwd...

None of the "see also" stuff at the end of any of these pages is useful.

Any hints?

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.
-
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux