Signed-off-by: Sami Kerola <kerolasa@iki.fi>
fd = open(file, O_RDONLY);
if (fd < 0) {
perror(file);
- exit(1);
+ exit(EXIT_FAILURE);
}
if (blkdev_get_size(fd, &size) == 0)
size /= pagesize;
if (stat(device_name, &statbuf) < 0) {
perror(device_name);
- exit(1);
+ exit(EXIT_FAILURE);
}
if (S_ISBLK(statbuf.st_mode))
DEV = open(device_name, O_RDWR | O_EXCL);
if (DEV < 0) {
perror(device_name);
- exit(1);
+ exit(EXIT_FAILURE);
}
/* Want a block device. Probably not /dev/hda or /dev/hdb. */
freecon(oldcontext);
}
#endif
- return 0;
+ return EXIT_SUCCESS;
}