Ian Turner <[EMAIL PROTECTED]> wrote:

> > Well, the interface itself does not seem to be well designed.
>
> Maybe not, but it's what we got. This feature was contraversial enough to the 
> kernel folks that there is zero chance of introducing a new interface at this 
> time.
>
> > How do you like to be sure if you are on a Linux version that just ignores
> > O_NOATIME and thus never returns EINVAL? This does not look to be a good
> > idea unless the O_NOATIME flag would have been implemented this way from
> > the very beginning.
>
> Well, right now all kernels work that way. In future, you'll probably have to 
> guess based on some heuristic. I basically view the non-use at present of 
> EINVAL as a kernel bug, which will be fixed, and not a change in the 
> interface.

Well, then I will probably do something like:

#ifdef  __linux__
#ifdef  O_NOATIME
        flags = fcntl(f, F_GETFL, 0);
        fcntl(f, F_SETFL, flags | O_NOATIME);
#endif
#endif

and people who run the prokern kernel will fail.

Jörg

-- 
 EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
       [EMAIL PROTECTED]                (uni)  
       [EMAIL PROTECTED]        (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily


_______________________________________________
Bug-tar mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-tar

Reply via email to