Re: Version 2.1.70 ms-dos fs strange.

Werner Almesberger (almesber@lrc.di.epfl.ch)
Sat, 3 Jan 1998 02:30:18 +0100 (MET)


[ Catching up with linux-kernel after five weeks of travelling ... ]

[ On the *.bak -> EINVAL discussion, ] Bill Hawes wrote:
> I'd still like to know if this is a change in behavior from 2.0.xx
> though.

The EINVAL goes back to my original design. To check, I just fired up my
0.99.13 machine, and it showed exactly the same behaviour. Didn't check
2.0, though.

The basic idea was to reject names that are invalid or that cause problems
under DOS, so that people don't create files they can't access or (maybe
worse) get rid of when running DOS.

> For a stat call you could argue either way: EINVAL because it's invalid,
> ENOENT because the filesystem would never allow you to create an invalid
> filename, so therefore it won't exist. OTOH a create/mkdir/mknod call
> must return EINVAL, as it's the most specific error for the situation.

That's consistent with the original philosophy and returning ENOENT in the
lookup-only case is probably what I should have done in the first place.
Thanks for fixing that ! I doubt that there's much software that depends
on invalid lookups to fail with EINVAL, so the compatibility implications
should be acceptable.

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, DI-ICA,EPFL,CH   werner.almesberger@lrc.di.epfl.ch /
/_IN_R_133__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/