Subject: Re: mkdir with trailing / (patch proposed)
To: Bill Studenmund <wrstuden@netbsd.org>
From: enami tsugutomo <enami@but-b.or.jp>
List: tech-kern
Date: 04/30/2002 06:05:05
> --0-1269453694-1020112016=:29181
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> 
> On Sun, 28 Apr 2002, Bill Sommerfeld wrote:
> 
> > A more correct way to do this would involve the introduction of a new
> > namei operational flag, passing that from mkdir(), and if that flag is
> > set, trimming the trailing slashes off the pathname early in namei().
> 
> Or not worry about trailing slashes on the last component if we have said
> flag set.
> 
> The attached patch adds a new flag, NOREQLAST, which means to not
> REQUIREDIR on the last path component. When this is set, the last
> component not existing won't generate an error on lookup.
> 
> I made a test version of mkdir which didn't remove trailing slashes, and
> mkdir worked.

There is my version in PR15397.

enami.