sh: Properly show "Not a directory" error in cd builtin.
authorPeter Avalos <pavalos@dragonflybsd.org>
Sun, 5 Feb 2012 19:44:29 +0000 (11:44 -0800)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sun, 5 Feb 2012 21:03:55 +0000 (13:03 -0800)
commitad6a7666b6711b108da1dd67ef0d65d44301577b
treeebb3e76921055cc4370ae81b2ed7254fdca61a3e
parent26ce4c1bf98e27bed0273c104e6981fae7288178
sh: Properly show "Not a directory" error in cd builtin.

The errno message display added in 72cbf4010 did not take attempting to
cd to a non-directory or something that cannot be stat()ed into account.

Obtained-from:  FreeBSD 230095
(cherry picked from commit 2b271b9bd2c4b4c7b94e1d246aebde69a6e37819)
bin/sh/cd.c
tools/regression/bin/sh/builtins/cd8.0 [new file with mode: 0644]