History log of /freebsd-10.0-release/bin/mkdir/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


249996 27-Apr-2013 eadler

Add missing static qualifiers

Reviewed by: ed, jilles
MFC After: 3 days


248342 15-Mar-2013 joel

Add a few examples.

Obtained from: OpenBSD


226961 31-Oct-2011 ed

Put some static keywords in the source code.

For these simple utilities, it doesn't harm to make all global variables
static. In fact, this allows the compiler to perform better forms of
optimisation and analysis.


165563 27-Dec-2006 ru

More markup fixes.


165562 27-Dec-2006 ru

Fix markup.


163213 10-Oct-2006 ru

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)


141578 09-Feb-2005 ru

Sync program's usage() with manpage's SYNOPSIS.


140850 26-Jan-2005 ssouhlal

Remove WARNS?= 6 from Makefile, since it is already in src/bin/Makefile.inc

Requested by: ru
Approved by: grehan (mentor)


140816 25-Jan-2005 ssouhlal

- The first argument of getmode() is a void *
- Add WARNS?= 6

Approved by: stefanf, grehan (mentor)
Obtained from: DragonFlyBSD


140353 16-Jan-2005 ru

Add the new standard EXIT STATUS section where appropriate.
Sort standard sections in the (documented) preferred order.


139969 10-Jan-2005 imp

/*- or .\"- or #- to begin license clauses.


135718 24-Sep-2004 das

Don't read the byte at *argv[strlen(*argv) + 1].

PR: 71743


131505 03-Jul-2004 ru

Deal with double whitespace.


127958 06-Apr-2004 markm

Remove clause 3 from the UCB licenses.

OK'ed by: imp, core


114433 01-May-2003 obrien

Quiet warnings about copyright[].


99121 30-Jun-2002 tjr

Put documentation of the -m option's argument in its list tag in the
Description section for consistency with other manpages.


99109 30-Jun-2002 obrien

Consistently use __FBSDID


94869 16-Apr-2002 charnier

Use `The .Nm utility'


91235 25-Feb-2002 sobomax

Fix a bug introduced in rev.1.23 - for some reason mkdir("/", ...) system
call returns `EISDIR', not `EEXIST', so that be prepared for that. This should
fix number of ports, that often call `mkdir -p //usr/local/foobar'. This
is just a quick workaround, the real fix would be either to avoid calling
mkdir("/", ...) or fix VFS code to return consistent errno for this case.


91084 22-Feb-2002 markm

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


90266 05-Feb-2002 zarzycki

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


90110 02-Feb-2002 imp

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.


87323 04-Dec-2001 obrien

Default to WARNS=2. Binary builds that cannot handle this must explicitly
set WARNS=0.

Reviewed by: mike


81687 15-Aug-2001 ru

mdoc(7) police: utilize the new .Ex macro.


79758 15-Jul-2001 dd

Set WARNS=2 on programs which compile cleanly.

Submitted by: Mike Barcroft <mike@q9media.com>


78963 29-Jun-2001 yar

Add a note on what happens if the "-p" option is specified
and a final directory already exists.

Reviewed by: freebsd-audit
MFC after: 5 days


76886 20-May-2001 kris

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

MFC after: 1 week


71029 14-Jan-2001 alfred

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>


68935 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


50870 04-Sep-1999 mharo

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

Reviewed by: obrien


50529 28-Aug-1999 mpp

Fix typo in previous commit that documented the -v option.


50528 28-Aug-1999 mharo

add verbose flag

Reviewed by: obrien


50471 27-Aug-1999 peter

$Id$ -> $FreeBSD$


46684 08-May-1999 kris

Various spelling/formatting changes.

Submitted by: Philippe Charnier <charnier@xp11.frmug.org>


41842 16-Dec-1998 imp

Free memory obtained from setmode.

Obtained from: OpenBSD


40606 23-Oct-1998 msmith

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

Reported by: bde


40602 22-Oct-1998 msmith

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.


40537 20-Oct-1998 msmith

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


40535 20-Oct-1998 msmith

- 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>


36048 15-May-1998 charnier

correct use of .Nm. Add rcsid.


24524 01-Apr-1997 mpp

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.


24348 28-Mar-1997 imp

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


22988 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


21673 14-Jan-1997 jkh

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.


20418 14-Dec-1996 steve

Cleanup man page and -Wall cleaning.


17891 29-Aug-1996 wosch

[HISTORY] command appeared in Version 1 AT&T UNIX
Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41


3044 24-Sep-1994 dg

Added $Id$


2959 21-Sep-1994 bde

Remove bogus cast that was introduced in the previous commit.


2923 20-Sep-1994 phk

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

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


2594 08-Sep-1994 jkh

[ 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


1557 26-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1556,
which included commits to RCS files with non-trunk default branches.