diff options
author | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-09-11 16:01:40 +0000 |
---|---|---|
committer | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-09-11 16:01:40 +0000 |
commit | 89847aa3141bf38cd22040e87df25aefe8f8450e (patch) | |
tree | 5fee0b4e525aaab7163e2a06f4bc8584d70a7b34 /util-linux/mkfs_minix.c | |
parent | 5896c14b351ed211d53ed25aff875df6dbb93b0b (diff) | |
download | busybox-w32-89847aa3141bf38cd22040e87df25aefe8f8450e.tar.gz busybox-w32-89847aa3141bf38cd22040e87df25aefe8f8450e.tar.bz2 busybox-w32-89847aa3141bf38cd22040e87df25aefe8f8450e.zip |
- convert a few xopen3(,,0) into xopen(,). Also peruse the fact that xopen defaults to 0777 on it's own, so we don't need to xopen3(,,0777).
Saves a few bytes:
$ size busybox.old busybox text data bss dec hex filename
839676 8780 243592 1092048 10a9d0 busybox.old
839660 8780 243592 1092032 10a9c0 busybox
$ make CC=gcc-4.2-HEAD bloatcheck
function old new delta
static.vconfig_main 281 279 -2
static.rx_main 1076 1074 -2
static.mt_main 294 292 -2
static.gzip_main 753 751 -2
static.mkfs_minix_main 4034 4030 -4
static.unzip_main 1771 1766 -5
static.crontab_main 1513 1507 -6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-23) Total: -23 bytes
git-svn-id: svn://busybox.net/trunk/busybox@16101 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'util-linux/mkfs_minix.c')
-rw-r--r-- | util-linux/mkfs_minix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index ed9cb4512..b154f4ab9 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c | |||
@@ -292,7 +292,7 @@ static int get_size(const char *file) | |||
292 | int fd; | 292 | int fd; |
293 | long size; | 293 | long size; |
294 | 294 | ||
295 | fd = xopen3(file, O_RDWR, 0); | 295 | fd = xopen(file, O_RDWR); |
296 | if (ioctl(fd, BLKGETSIZE, &size) >= 0) { | 296 | if (ioctl(fd, BLKGETSIZE, &size) >= 0) { |
297 | close(fd); | 297 | close(fd); |
298 | return (size * 512); | 298 | return (size * 512); |
@@ -805,7 +805,7 @@ goodbye: | |||
805 | tmp += dirsize; | 805 | tmp += dirsize; |
806 | *(short *) tmp = 2; | 806 | *(short *) tmp = 2; |
807 | strcpy(tmp + 2, ".badblocks"); | 807 | strcpy(tmp + 2, ".badblocks"); |
808 | DEV = xopen3(device_name, O_RDWR, 0); | 808 | DEV = xopen(device_name, O_RDWR); |
809 | if (fstat(DEV, &statbuf) < 0) | 809 | if (fstat(DEV, &statbuf) < 0) |
810 | bb_error_msg_and_die("unable to stat %s", device_name); | 810 | bb_error_msg_and_die("unable to stat %s", device_name); |
811 | if (!S_ISBLK(statbuf.st_mode)) | 811 | if (!S_ISBLK(statbuf.st_mode)) |