summaryrefslogtreecommitdiffstats
path: root/disk-utils/mkswap.c
diff options
context:
space:
mode:
authorSami Kerola2011-02-20 00:00:39 +0100
committerKarel Zak2011-02-21 16:12:48 +0100
commita4d3e778abf856f28f395c7d6747b9fd6caf0c3c (patch)
tree236787ef927f17d369e0f36acb86ede4e8f6621f /disk-utils/mkswap.c
parentmkswap: support long options and check user inputs (diff)
downloadkernel-qcow2-util-linux-a4d3e778abf856f28f395c7d6747b9fd6caf0c3c.tar.gz
kernel-qcow2-util-linux-a4d3e778abf856f28f395c7d6747b9fd6caf0c3c.tar.xz
kernel-qcow2-util-linux-a4d3e778abf856f28f395c7d6747b9fd6caf0c3c.zip
mkswap: use EXIT_ values
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'disk-utils/mkswap.c')
-rw-r--r--disk-utils/mkswap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c
index 2e11f74ef..4a171dba7 100644
--- a/disk-utils/mkswap.c
+++ b/disk-utils/mkswap.c
@@ -333,7 +333,7 @@ get_size(const char *file) {
fd = open(file, O_RDONLY);
if (fd < 0) {
perror(file);
- exit(1);
+ exit(EXIT_FAILURE);
}
if (blkdev_get_size(fd, &size) == 0)
size /= pagesize;
@@ -571,7 +571,7 @@ main(int argc, char ** argv) {
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);
@@ -580,7 +580,7 @@ main(int argc, char ** argv) {
if (DEV < 0) {
perror(device_name);
- exit(1);
+ exit(EXIT_FAILURE);
}
/* Want a block device. Probably not /dev/hda or /dev/hdb. */
@@ -663,5 +663,5 @@ main(int argc, char ** argv) {
freecon(oldcontext);
}
#endif
- return 0;
+ return EXIT_SUCCESS;
}