diff options
Diffstat (limited to 'util-linux/mkswap.c')
-rw-r--r-- | util-linux/mkswap.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
258 | int fd; | 258 | int fd; |
259 | long size; | 259 | long size; |
260 | 260 | ||
261 | fd = bb_xopen(file, O_RDONLY); | 261 | fd = bb_xopen3(file, O_RDONLY, 0); |
262 | if (ioctl(fd, BLKGETSIZE, &size) >= 0) { | 262 | if (ioctl(fd, BLKGETSIZE, &size) >= 0) { |
263 | size /= pagesize / 512; | 263 | size /= pagesize / 512; |
264 | } else { | 264 | } else { |
@@ -341,7 +341,7 @@ int mkswap_main(int argc, char **argv) | |||
341 | PAGES * goodpages); | 341 | PAGES * goodpages); |
342 | } | 342 | } |
343 | 343 | ||
344 | DEV = bb_xopen(device_name, O_RDWR); | 344 | DEV = bb_xopen3(device_name, O_RDWR, 0); |
345 | if (fstat(DEV, &statbuf) < 0) | 345 | if (fstat(DEV, &statbuf) < 0) |
346 | bb_perror_msg_and_die("%s", device_name); | 346 | bb_perror_msg_and_die("%s", device_name); |
347 | if (!S_ISBLK(statbuf.st_mode)) | 347 | if (!S_ISBLK(statbuf.st_mode)) |