History log of /freebsd/bin/mkdir/mkdir.c (Results 26 – 50 of 82)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 4b4ed2fe 22-Feb-2002 Mark Murray <markm@FreeBSD.org>

Fix warnings inspired by lint, a commercial lint and WARNS=4.


# 076172c5 05-Feb-2002 Dave Zarzycki <zarzycki@FreeBSD.org>

Fix the race between the stat() and the mkdir().
Reviewed by: jkh


Revision tags: release/4.5.0_cvs, release/4.4.0_cvs
# 46251dde 02-Feb-2002 Warner Losh <imp@FreeBSD.org>

o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int arg

o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.

show more ...


# 4ca63b7f 20-May-2001 Kris Kennaway <kris@FreeBSD.org>

Silence WARNS=2 and BDECFLAGS except for stupid mode_t warnings.

MFC after: 1 week


Revision tags: release/4.3.0_cvs, release/4.3.0
# c51117f5 14-Jan-2001 Alfred Perlstein <alfred@FreeBSD.org>

Special case the error reporting when errno is ENOTDIR or ENOENT.

This makes "mkdir /nonexistant/foo" complain that /nonexistant
doesn't exist rather than /nonexistant/foo which doesn't make much
se

Special case the error reporting when errno is ENOTDIR or ENOENT.

This makes "mkdir /nonexistant/foo" complain that /nonexistant
doesn't exist rather than /nonexistant/foo which doesn't make much
sense.

Submitted (in a different form) by: W.H.Scholten <whs@xs4all.nl>

show more ...


Revision tags: release/4.2.0, release/4.1.1_cvs, release/4.1.0, release/3.5.0_cvs, release/4.0.0_cvs, release/3.4.0_cvs, release/3.3.0_cvs
# 2f5f84c5 04-Sep-1999 Michael Haro <mharo@FreeBSD.org>

brucify and add comment about -v being non-standard to manpage

Reviewed by: obrien


# 1df89a60 28-Aug-1999 Michael Haro <mharo@FreeBSD.org>

add verbose flag

Reviewed by: obrien


# 2a456239 28-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


Revision tags: release/3.2.0, release/3.1.0, release/3.0.0, release/2.2.8
# a4324714 16-Dec-1998 Warner Losh <imp@FreeBSD.org>

Free memory obtained from setmode.

Obtained from: OpenBSD


# e45520f7 23-Oct-1998 Mike Smith <msmith@FreeBSD.org>

Fix behaviour for 'mkdir -m 777 / /tmp/foo'. Play "guess the style bug"
with Bruce again.

Reported by: bde


# 16c0b519 22-Oct-1998 Mike Smith <msmith@FreeBSD.org>

Honour the spirit rather than the implementation of the previous changes;
if we are invoked with -m, use chmod() on the final directory component
in order to ensure the mode is correctly set.


# 37a182e2 20-Oct-1998 Mike Smith <msmith@FreeBSD.org>

Make this compile, and honour the spirit of the original design while
incorporating the intended fix. Attempt to address some of the
putative style bugs introduced. Others doubtless remain.

Embarr

Make this compile, and honour the spirit of the original design while
incorporating the intended fix. Attempt to address some of the
putative style bugs introduced. Others doubtless remain.

Embarrassed by: bde

show more ...


# 2426ecdf 20-Oct-1998 Mike Smith <msmith@FreeBSD.org>

- mkdir -m should call chmod because the high-order bits get ignored
by the kernel as a security feature of some sort.

Submitted by: Wilfredo Sanchez <wsanchez@apple.com>


Revision tags: release/2.2.7
# 06f62885 15-May-1998 Philippe Charnier <charnier@FreeBSD.org>

correct use of .Nm. Add rcsid.


Revision tags: release/2.2.6, release/2.2.5_cvs, release/2.2.2_cvs
# 1a8d9bc1 02-Apr-1997 Mike Pritchard <mpp@FreeBSD.org>

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

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.

show more ...


# 93ef08af 28-Mar-1997 Warner Losh <imp@FreeBSD.org>

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


Revision tags: release/2.2.1_cvs, release/2.2.0, release/2.1.7_cvs
# b97fa2ef 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Revert $FreeBSD$ to $Id$


Revision tags: release/2.1.6_cvs, release/2.1.6.1
# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.

show more ...


# ca64f950 14-Dec-1996 Steve Price <steve@FreeBSD.org>

Cleanup man page and -Wall cleaning.


Revision tags: release/2.1.5_cvs, release/2.1.0_cvs, release/2.0.5_cvs, release/2.0
# 89730b29 24-Sep-1994 David Greenman <dg@FreeBSD.org>

Added $Id$


# 0e4885ff 22-Sep-1994 Bruce Evans <bde@FreeBSD.org>

Remove bogus cast that was introduced in the previous commit.


# d4daf998 20-Sep-1994 Poul-Henning Kamp <phk@FreeBSD.org>

Applied patch to make -Wall and -Dlint shut up.

Reviewed by: phk
Submitted by: Josef Grosch <joeg@gagme.wwa.com>


# d653487a 08-Sep-1994 Jordan K. Hubbard <jkh@FreeBSD.org>

[ From Dave Tweten ]

POSIX.2 looks pretty unequivocal to me, and it agrees with you.

Under the explanation of the "-p" option, it says, "Each dir operand that
names an existing directory shall be i

[ From Dave Tweten ]

POSIX.2 looks pretty unequivocal to me, and it agrees with you.

Under the explanation of the "-p" option, it says, "Each dir operand that
names an existing directory shall be ignored without error." Under the
explanation of exit status zero, it says, "All the specified directories were
created successfully, or the-p option was specified and all the specified
directories now exist."

Seems to me POSIX requires exactly the behavior you want.

[ And I've made the change, which is also now compatible with 1.x - jkh ]

Reviewed by: jkh
Submitted by: jkh/tweten

show more ...


Revision tags: release/1.1.5.1_cvs
# 4b88c807 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite bin Sources


Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0
# cf39c97b 10-Oct-2006 Ruslan Ermilov <ru@FreeBSD.org>

Adhere to POSIX: the -m option only applies to the newly created
directories; it should not change the permission bits of already
existing directories.

Submitted by: Alex Unleashed (modified by me)


1234