tech-kern archive

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

Re: rfc: fcntl() error reporting

On Fri, Aug 22, 2008 at 08:01:03PM +0300, Andy Shevchenko wrote:
> On Fri, Aug 22, 2008 at 6:55 PM, Simon Burge <> 
> wrote:
> > Does section B.2.3 of
> > give
> > us freedom here to report those extra errno values?
> If a command value, f.e. -2, not valid, it doesn't, because the
> ERRORS: section contains "shall" is mandatory. And in that section the
> invalid command causes EINVAL.
> Am I wrong?

If you only had one thing wrong with your operation, you'd be right 
according to the spec. You however have two things wrong, and we're 
telling you about the second one.

I see no discussion in the spec (which really seems to be about 
what should happen when we pass in a bad pointer to the defined operations 
that take a pointer. That looks like a deficiency of the spec.

Try passing the address to 4k of data to the invalid operation code and 
see what happens. You should then see whatever the file system for 'fd' 
does, and it should report EINVAL.

If the file system doesn't support the op, you should get back EINVAL.

Take care,


Attachment: pgpBgg0LLInyP.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index