On Thu, 2009-07-30 at 11:24 +0200, Ralf Becker wrote:
> +             if ((err = posix_fallocate(fd, st.st_size, size - st.st_size)) 
> == 0)
>                       return 0;
>  
> +             if (err == EOPNOTSUPP /* AIX */ ) {
> +                     /* Ignore this error silently.
> +                        You have to test err, because errno is not
> +                        correcly set on some versions of AIX */
> +             } else

First I thought: Why didn't IBM even fix this properly by setting errno?
Then I read posix_fallocate man page:

> RETURN VALUE
>        posix_fallocate() returns zero on success, or an error number on  fail‐
>        ure.  Note that errno is not set.

What the hell were POSIX people thinking?? This is the first syscall
I've seen that behaves like this, and apparently without any good
reason! Wonder how many other new system calls there are like this, that
I haven't noticed yet..

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to