[PATCH] Re: readahead offset type (re: mantis 0001024)

Bernhard Fischer rep.dot.nop at gmail.com
Thu Feb 1 13:45:09 UTC 2007


On Thu, Feb 01, 2007 at 01:31:18PM +0100, Joakim Tjernlund wrote:
>O
>> Well, do we -ENOSYS if something isn't available?
>> If so, then we should rather
>> #ifdef __NR_readahead
>> [snip current code]
>> #else
>> ssize_t readahead(int fd, off_t offset, size_t count)
>> {
>> 	__set_errno(ENOSYS);
>> 	return -1;
>> }
>> link_warning(readahead,"not available")
>> #endif
>> 
>> Wondering if there should be a generic internal helper stub for
>> the ENOSYS;ret -1 case..
>
>This can make cross compiling painful since you can't tell if
>readahead is present or not.
>On the other hand, a well behaved app will handle this dynamically ...

Either way, behaviour should imho be consistent, and it is not, from a
quick grep for ENOSYS. Didn't really look, admittedly.

Not stubbing unsupported functions out sounds smaller. Deciding what
route to take, either to stub them out or making them not available
isn't my call, though.

cheers,



More information about the uClibc mailing list