aboutsummaryrefslogtreecommitdiff
path: root/libbb/make_directory.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tar: fix bug 673 (misdetection of repeated dir as hardlink). +92 bytesDenys Vlasenko2009-11-291-16/+47
| | | | | | | | While at it, remove many superfluous ops on unpack: mkdir("."), lots of umask() calls. Can remove more by caching username->uid. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: use "can't" instead of "cannot"Denys Vlasenko2009-11-131-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* volume identification: abolish /proc/partitions and /proc/cdromsDenis Vlasenko2008-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scanning. It does not catch volume managers and such. Adding even more cruft is bad, so I decided to simply scan /dev/* for any block devices. See how much better it finds devices now: # ./busybox_old blkid /dev/sda1: LABEL="/boot" UUID="7931e231-dcb4-4b6d-9301-f7354ae24061" /dev/dm-0: LABEL="Fedora-9-Live-x8" UUID="bb491e1e-1145-4f5b-b0ab-cbd2baf4f15a" /dev/dm-1: UUID="edc2a920-ef83-437e-ba64-d3b6dc851267" /dev/sdb1: UUID="6F84-ED0F" # ./busybox blkid /dev/sdb1: UUID="6F84-ED0F" /dev/root: LABEL="Fedora-9-Live-x8" UUID="bb491e1e-1145-4f5b-b0ab-cbd2baf4f15a" /dev/dm-1: UUID="edc2a920-ef83-437e-ba64-d3b6dc851267" /dev/dm-0: LABEL="Fedora-9-Live-x8" UUID="bb491e1e-1145-4f5b-b0ab-cbd2baf4f15a" /dev/sda1: LABEL="/boot" UUID="7931e231-dcb4-4b6d-9301-f7354ae24061" /dev/mapper/VolGroup00-LogVol01: UUID="edc2a920-ef83-437e-ba64-d3b6dc851267" /dev/mapper/VolGroup00-LogVol00: LABEL="Fedora-9-Live-x8" UUID="bb491e1e-1145-4f5b-b0ab-cbd2baf4f15a" function old new delta static.drive_name_string 12 - -12 append_mount_options 205 190 -15 volume_id_open_node 37 18 -19 uuidcache_check_device 485 257 -228 uuidcache_init 637 36 -601 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 0/4 up/down: 0/-875) Total: -875 bytes text data bss dec hex filename 792218 592 6648 799458 c32e2 busybox_old 791260 592 6648 798500 c2f24 busybox_unstripped
* mkdir: fix "uname 0222; mkdir foo/bar" caseDenis Vlasenko2008-08-151-21/+16
| | | | | | | | (by Doug Graham <dgraham AT nortel.com>) function old new delta bb_make_directory 291 280 -11
* *: introduce and use FAST_FUNC: regparm on i386, otherwise no-onDenis Vlasenko2008-06-271-1/+1
| | | | | | | text data bss dec hex filename 808035 611 6868 815514 c719a busybox_old 804472 611 6868 811951 c63af busybox_unstripped
* stat: fix option -Z segv (bug 1454)Denis Vlasenko2007-08-091-1/+1
|
* audit small applets and mark some of them as NOFORK.Denis Vlasenko2007-04-101-3/+2
| | | | | Put big scary warnings in relevant places.
* message string changes, mostly for consistency, also -32 bytes in .rodataDenis Vlasenko2006-10-201-1/+1
|
* Replace current verbose GPL stuff in libbb/*.c with one-line GPL boilerplate."Robert P. J. Day"2006-07-101-14/+1
|
* Make certain clients of bb_make_directory default to honoringEric Andersen2004-10-131-1/+8
| | | | the user's umask
* Patch from Michael Tokarev:Eric Andersen2004-10-081-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scenario: touch x -- creates plain file name `x' mkdir x -- exits successefully libbb/make_directory.c, bb_make_directory(), contains the following code: if (mkdir(path, 0777) < 0) { /* If we failed for any other reason than the directory * already exists, output a diagnostic and return -1.*/ if (errno != EEXIST) { fail_msg = "create"; umask(mask); break; } /* Since the directory exists, don't attempt to change * permissions if it was the full target. Note that * this is not an error conditon. */ if (!c) { umask(mask); return 0; } } The assumption that EEXIST error is due to that the *directory* already exists is wrong: any file type with that name will cause this error to be returned. Proper way IMHO will be is to stat() the path and check whenever this is really a directory. Below (attached) is a patch to fix this issue.
* Larry Doolittle writes:Eric Andersen2004-04-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | This is a bulk spelling fix patch against busybox-1.00-pre10. If anyone gets a corrupted copy (and cares), let me know and I will make alternate arrangements. Erik - please apply. Authors - please check that I didn't corrupt any meaning. Package importers - see if any of these changes should be passed to the upstream authors. I glossed over lots of sloppy capitalizations, missing apostrophes, mixed American/British spellings, and German-style compound words. What is "pretect redefined for test" in cmdedit.c? Good luck on the 1.00 release! - Larry
* Major coreutils update.Manuel Novoa III2003-03-191-46/+72
|
* Dont need a seperate functionGlenn L McGrath2002-11-241-19/+13
|
* When making parent directories set permissions based on the base parent tree ↵Glenn L McGrath2002-11-241-8/+26
| | | | rather than the new directory to be created.
* Dont try and make the "/" directoryGlenn L McGrath2002-10-191-2/+2
|
* Fail straight away rather than recursively printing error messages :)Glenn L McGrath2002-09-281-1/+1
|
* Fix error messages conditions, and make them the same as GNU mkdir.Glenn L McGrath2002-09-221-2/+2
|
* Dont return an error if the directory already existedGlenn L McGrath2002-08-241-3/+7
|
* Fix warningGlenn L McGrath2002-08-241-0/+1
|
* Rewrite, its smallerGlenn L McGrath2002-08-231-30/+22
|
* Canonicalize dirname(3) behavior.Matt Kraai2001-08-241-3/+7
|
* Fix a memory leak if parent directory creation failed.Matt Kraai2001-08-241-4/+4
|
* make_directory used mode as if it were an signed entity, but in factEric Andersen2001-08-021-1/+1
| | | | | it was a mode_t which is unsigned. Fix it to be signed... -Erik
* stdlib.h defined free(), which this needsEric Andersen2001-06-221-0/+1
|
* Rewrote mkdir (and touched lots of things in the process).Matt Kraai2001-06-211-0/+66