From a9819b290848e0a760f3805d5937fa050235d707 Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Fri, 22 Dec 2000 01:48:07 +0000 Subject: Use busybox error handling functions wherever possible. --- util-linux/mkfs_minix.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'util-linux/mkfs_minix.c') diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index 95815fd4d..e1ede6caa 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c @@ -329,11 +329,8 @@ static int get_size(const char *file) int fd; long size; - fd = open(file, O_RDWR); - if (fd < 0) { - perror(file); - exit(1); - } + if ((fd = open(file, O_RDWR)) < 0) + perror_msg_and_die("%s", file); if (ioctl(fd, BLKGETSIZE, &size) >= 0) { close(fd); return (size * 512); -- cgit v1.2.3-55-g6feb