Jilles Tjoelker 310c8f3c99 realpath(): Properly fail "." or ".." components after non-directories.
If realpath() is called on pathnames like "/dev/null/." or "/dev/null/..",
it should fail with [ENOTDIR]. Pathnames like "/dev/null/" already failed as
they should.

Also, put the check for non-directories after lstatting the previous
component instead of when the empty component (consecutive or trailing
slashes) is detected, saving an lstat() call and some lines of code.

PR:		kern/82980
MFC after:	2 weeks
2014-04-13 19:48:28 +00:00
..
2013-12-13 21:50:03 +00:00
2014-01-14 01:52:34 +00:00
2013-04-21 10:30:19 +00:00
2011-12-15 11:16:41 +00:00
2013-07-04 12:35:39 +00:00
2012-06-26 05:34:31 +00:00