lkml.org 
[lkml]   [1998]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: open problem
From
Date
Jason Watts <khg@m-net.arbornet.org> writes:

> If a dir is nothing but a file with dir entries, with its own
> inode etc., why wasn't an open system call implemented for directories?

It is. Most Linux file systems fail with EISDIR if you try to read(2)
from a directory; you should use readdir(3) or getdents(2) instead,
rather than concerning yourself with the physical layout for whatever
file system type you're using.

--
Aaron M. Ucko <amu@mit.edu> (finger amu@monk.mit.edu) [Stark raving sane]

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.159 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site