aboutsummaryrefslogtreecommitdiff
path: root/bin/mkdir
Commit message (Collapse)AuthorAgeFilesLines
* Silence WARNS=2 and BDECFLAGS except for stupid mode_t warnings.Kris Kennaway2001-05-201-0/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=76886
* Special case the error reporting when errno is ENOTDIR or ENOENT.Alfred Perlstein2001-01-141-1/+5
| | | | | | | | | | | 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> Notes: svn path=/head/; revision=71029
* mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov2000-11-201-1/+1
| | | | Notes: svn path=/head/; revision=68935
* brucify and add comment about -v being non-standard to manpageMichael Haro1999-09-042-6/+10
| | | | | | | Reviewed by: obrien Notes: svn path=/head/; revision=50870
* Fix typo in previous commit that documented the -v option.Mike Pritchard1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50529
* add verbose flagMichael Haro1999-08-282-5/+17
| | | | | | | Reviewed by: obrien Notes: svn path=/head/; revision=50528
* $Id$ -> $FreeBSD$Peter Wemm1999-08-273-3/+3
| | | | Notes: svn path=/head/; revision=50471
* Various spelling/formatting changes.Kris Kennaway1999-05-081-4/+5
| | | | | | | Submitted by: Philippe Charnier <charnier@xp11.frmug.org> Notes: svn path=/head/; revision=46684
* Free memory obtained from setmode.Warner Losh1998-12-161-1/+2
| | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=41842
* Fix behaviour for 'mkdir -m 777 / /tmp/foo'. Play "guess the style bug"Mike Smith1998-10-231-6/+8
| | | | | | | | | with Bruce again. Reported by: bde Notes: svn path=/head/; revision=40606
* Honour the spirit rather than the implementation of the previous changes;Mike Smith1998-10-221-19/+10
| | | | | | | | if we are invoked with -m, use chmod() on the final directory component in order to ensure the mode is correctly set. Notes: svn path=/head/; revision=40602
* Make this compile, and honour the spirit of the original design whileMike Smith1998-10-201-8/+10
| | | | | | | | | | incorporating the intended fix. Attempt to address some of the putative style bugs introduced. Others doubtless remain. Embarrassed by: bde Notes: svn path=/head/; revision=40537
* - mkdir -m should call chmod because the high-order bits get ignoredMike Smith1998-10-201-1/+19
| | | | | | | | | by the kernel as a security feature of some sort. Submitted by: Wilfredo Sanchez <wsanchez@apple.com> Notes: svn path=/head/; revision=40535
* correct use of .Nm. Add rcsid.Philippe Charnier1998-05-152-7/+9
| | | | Notes: svn path=/head/; revision=36048
* Fix several problems with mkdir:Mike Pritchard1997-04-011-29/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=24524
* compare return value from getopt against -1 rather than EOF, per the finalWarner Losh1997-03-281-2/+2
| | | | | | | posix standard on the topic. Notes: svn path=/head/; revision=24348
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-223-3/+3
| | | | Notes: svn path=/head/; revision=22988
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-143-3/+3
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=21673
* Cleanup man page and -Wall cleaning.Steve Price1996-12-142-6/+6
| | | | Notes: svn path=/head/; revision=20418
* [HISTORY] command appeared in Version 1 AT&T UNIXWolfram Schneider1996-08-291-1/+6
| | | | | | | Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41 Notes: svn path=/head/; revision=17891
* Added $Id$David Greenman1994-09-243-0/+4
| | | | Notes: svn path=/head/; revision=3044
* Remove bogus cast that was introduced in the previous commit.Bruce Evans1994-09-211-1/+1
| | | | Notes: svn path=/head/; revision=2959
* Applied patch to make -Wall and -Dlint shut up.Poul-Henning Kamp1994-09-201-3/+4
| | | | | | | | Reviewed by: phk Submitted by: Josef Grosch <joeg@gagme.wwa.com> Notes: svn path=/head/; revision=2923
* [ From Dave Tweten ]Jordan K. Hubbard1994-09-081-2/+4
| | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=2594
* BSD 4.4 Lite bin SourcesRodney W. Grimes1994-05-263-0/+266
Notes: svn path=/head/; revision=1556