diff options
author | Matt Kraai | 2000-12-22 01:48:07 +0000 |
---|---|---|
committer | Matt Kraai | 2000-12-22 01:48:07 +0000 |
commit | a9819b290848e0a760f3805d5937fa050235d707 (patch) | |
tree | b8cb8d939032c0806d62161b01e5836cb808dc3f /console-tools/deallocvt.c | |
parent | e9f07fb6e83b75a50760599a5d31f494841eddf7 (diff) | |
download | busybox-a9819b290848e0a760f3805d5937fa050235d707.zip busybox-a9819b290848e0a760f3805d5937fa050235d707.tar.gz |
Use busybox error handling functions wherever possible.
Diffstat (limited to 'console-tools/deallocvt.c')
-rw-r--r-- | console-tools/deallocvt.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c index b128c3f..3dd90c0 100644 --- a/console-tools/deallocvt.c +++ b/console-tools/deallocvt.c @@ -25,10 +25,8 @@ int deallocvt_main(int argc, char *argv[]) if (argc == 1) { /* deallocate all unused consoles */ - if (ioctl(fd, VT_DISALLOCATE, 0)) { - perror("VT_DISALLOCATE"); - return EXIT_FAILURE; - } + if (ioctl(fd, VT_DISALLOCATE, 0)) + perror_msg_and_die("VT_DISALLOCATE"); } else { for (i = 1; i < argc; i++) { num = atoi(argv[i]); @@ -36,10 +34,8 @@ int deallocvt_main(int argc, char *argv[]) error_msg("0: illegal VT number\n"); else if (num == 1) error_msg("VT 1 cannot be deallocated\n"); - else if (ioctl(fd, VT_DISALLOCATE, num)) { - perror("VT_DISALLOCATE"); - error_msg_and_die("could not deallocate console %d\n", num); - } + else if (ioctl(fd, VT_DISALLOCATE, num)) + perror_msg_and_die("VT_DISALLOCATE"); } } |