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

Joakim Tjernlund joakim.tjernlund at transmode.se
Thu Feb 1 12:31:18 UTC 2007


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 ...

 Jocke



More information about the uClibc mailing list