tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: fixing compat_12 getdents

also, EINVAL doesn't seem like a great error code for this condition. it's not an input parameter that's causing the error, but rather that the required output format cannot express the data to be returned. I think solaris uses EOVERFLOW for this kind of situation, and ERANGE doesn't seem too bad either. any opinions on that?

There's also E2BIG, but I don't think it fits. ERANGE is documented in terms of "the available space", while EOVERFLOW is documented in terms of "a numeric result". So perhaps EOVERFLOW for "integer is too large to fit in N bits", and ERANGE for "string is too long to fit in N bytes"? Or vice versa?

Somebody(TM) should go through the errno(2) documentation and make the descriptions more generic, and add guidance for choosing which code to return.

--apb (Alan Barrett)

Home | Main Index | Thread Index | Old Index