aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-04-13 12:45:04 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-04-13 12:45:04 +0000
commitc2cb0f32b44a9918364af39c24b5643388c553f6 (patch)
tree378b5a002da81f8622913cc6a9aeac873e307ec9 /util-linux
parent4f3d2deaa499af34c22a7f9be121131b0a5894b5 (diff)
downloadbusybox-c2cb0f32b44a9918364af39c24b5643388c553f6.tar.gz
- patch from Denis Vlasenko to add and use bb_xopen3()
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mkfs_minix.c4
-rw-r--r--util-linux/mkswap.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index 30bc9f12d..d9388b1d7 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -307,7 +307,7 @@ static inline int get_size(const char *file)
int fd;
long size;
- fd = bb_xopen(file, O_RDWR);
+ fd = bb_xopen3(file, O_RDWR, 0);
if (ioctl(fd, BLKGETSIZE, &size) >= 0) {
close(fd);
return (size * 512);
@@ -820,7 +820,7 @@ goodbye:
tmp += dirsize;
*(short *) tmp = 2;
strcpy(tmp + 2, ".badblocks");
- DEV = bb_xopen(device_name, O_RDWR);
+ DEV = bb_xopen3(device_name, O_RDWR, 0);
if (fstat(DEV, &statbuf) < 0)
bb_error_msg_and_die("unable to stat %s", device_name);
if (!S_ISBLK(statbuf.st_mode))
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index 32021fe08..44d809a36 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -258,7 +258,7 @@ static inline long get_size(const char *file)
int fd;
long size;
- fd = bb_xopen(file, O_RDONLY);
+ fd = bb_xopen3(file, O_RDONLY, 0);
if (ioctl(fd, BLKGETSIZE, &size) >= 0) {
size /= pagesize / 512;
} else {
@@ -341,7 +341,7 @@ int mkswap_main(int argc, char **argv)
PAGES * goodpages);
}
- DEV = bb_xopen(device_name, O_RDWR);
+ DEV = bb_xopen3(device_name, O_RDWR, 0);
if (fstat(DEV, &statbuf) < 0)
bb_perror_msg_and_die("%s", device_name);
if (!S_ISBLK(statbuf.st_mode))