freebsd-skq/bin
mpp c785109c06 Fix several problems with mkdir:
1)  Fix mkdir -p to exit with the proper exit status and issue an error
    message if it was unable to create all of the specified directories
    and they did not previously exist.  POSIX says:

    The mkdir utility shall exit with one of the following values:

    0  All the specified directories were created successfully or the
       -p option was specified and all the specified directories now
       exist.

    E.g.

    % mkdir -p /var/mkdir
    mkdir: /var/mkdir: Permission denied

    % touch /tmp/file
    % mkdir -p /tmp/file/dir
    mkdir: /tmp/file: Not a directory

    Previously the above examples would exit with a zero exit status
    and no error message.  Something like the following run as a
    normal user will still not produce an error:

    % id
    uid=629(mpp) gid=629(mpp)....
    % mkdir -p /usr/local/etc
    % ls -ld /usr/local/etc
    drwxr-xr-x  4 bin  bin  512 Dec 26 14:55 /usr/local/etc/

2)  Cleaned up the mode handling to be more efficient when multiple
    directories are being created.

3) Fixed a problem where directories could be created with the wrong mode
   if the the -p option was specified and the build() routine returned
   and error.  It would leave the umask set incorrectly at this point.

4) Removed an unused variable.

Closes PR# 2304.
1997-04-01 23:46:22 +00:00
..
cat compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
chflags compare return value from getopt against -1 rather than EOF, per the final 1997-03-29 04:34:07 +00:00
chio Import Jason Thorpe's contribution for an updated SCSI media changer 1997-03-06 15:30:06 +00:00
chmod compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
cp compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
csh Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
date compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
dd Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
df compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
domainname Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
echo Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
ed compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
expr Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
hostname compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
kill Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
ln compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
ls compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
mkdir Fix several problems with mkdir: 1997-04-01 23:46:22 +00:00
mv compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
pax compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
ps compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
pwd compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
rcp compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
rm compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
rmail compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
rmdir compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
sh compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
sleep compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
stty compare return value from getopt against -1 rather than EOF, per the final 1997-03-28 15:24:41 +00:00
sync Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
test Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
Makefile Acitvate chio(1). 1997-03-06 15:30:53 +00:00
Makefile.inc Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00