On Mon, May 14, 2012 at 4:04 PM, Noah Watkins <[email protected]> wrote:
> In contrast to readdir, the seek/rewinddir man pages state that these 
> functions do not return an error (via errno or otherwise). So, presumably a 
> client assuming man-page-ish semantics would never check errno after seekdir, 
> which could have odd implications for arbitrary code just trying to tie into 
> libcephfs. Then again, maybe they should use libcephfs man pages :) ?

As a POSIX nitpick, unless you are told to look at errno (e.g. get -1
from a libc call), the value of errno is arbitrary. errno != 0 does
not imply an error happened.

seekdir, and it's constant-argument friend rewinddir, *cannot* fail.

Now, if we're talking about libcephfs and not POSIX, we probably
shouldn't emulate those prototypes 100%. Be sane, return 0 or -error.

(I realize there's already an API out there, and this might mean changing it.)
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to