aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/dutmp.c3
-rw-r--r--miscutils/makedevs.c4
-rw-r--r--miscutils/mt.c17
3 files changed, 11 insertions, 13 deletions
diff --git a/miscutils/dutmp.c b/miscutils/dutmp.c
index 2dad7d4a5..7dd5b91fa 100644
--- a/miscutils/dutmp.c
+++ b/miscutils/dutmp.c
@@ -26,8 +26,7 @@ extern int dutmp_fn (int argc, char **argv)
26 struct utmp ut; 26 struct utmp ut;
27 27
28 if ((argc < 2) || (**(argv + 1) == '-')) { 28 if ((argc < 2) || (**(argv + 1) == '-')) {
29 fprintf (stderr, "Usage: %s %s\n", *argv, dutmp_usage); 29 usage( dutmp_usage);
30 exit (FALSE);
31 } 30 }
32 31
33 if ( **(++argv) == 0 ) { 32 if ( **(++argv) == 0 ) {
diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c
index 691236e29..00f0066ff 100644
--- a/miscutils/makedevs.c
+++ b/miscutils/makedevs.c
@@ -21,7 +21,7 @@ const char makedevs_usage[] =
21"\tmakedevs /dev/hda b 3 0 0 8 s (hda,hda1-hda8)\n"; 21"\tmakedevs /dev/hda b 3 0 0 8 s (hda,hda1-hda8)\n";
22 22
23int 23int
24makedevs_main(struct FileInfo * i, int argc, char * * argv) 24makedevs_main(int argc, char * * argv)
25{ 25{
26 26
27const char *basedev = argv[1]; 27const char *basedev = argv[1];
@@ -45,7 +45,7 @@ char buf[255];
45 case 'f': 45 case 'f':
46 mode = S_IFIFO; break; 46 mode = S_IFIFO; break;
47 default: 47 default:
48 usage(makedevs_usage); 48 fprintf(stderr, "Usage: %s\n", makedevs_usage);
49 return 2; 49 return 2;
50 } 50 }
51 mode |= 0660; 51 mode |= 0660;
diff --git a/miscutils/mt.c b/miscutils/mt.c
index 7d75fbd3d..a61ad5a40 100644
--- a/miscutils/mt.c
+++ b/miscutils/mt.c
@@ -50,7 +50,7 @@ static const struct mt_opcodes opcodes[] = {
50}; 50};
51 51
52extern int 52extern int
53mt_main(struct FileInfo * i, int argc, char * * argv) 53mt_main(int argc, char** argv)
54{ 54{
55 const char * file = "/dev/tape"; 55 const char * file = "/dev/tape";
56 const struct mt_opcodes * code = opcodes; 56 const struct mt_opcodes * code = opcodes;
@@ -59,8 +59,7 @@ mt_main(struct FileInfo * i, int argc, char * * argv)
59 59
60 if ( strcmp(argv[1], "-f") == 0 ) { 60 if ( strcmp(argv[1], "-f") == 0 ) {
61 if ( argc < 4 ) { 61 if ( argc < 4 ) {
62 usage(mt_usage); 62 usage (mt_usage);
63 return 1;
64 } 63 }
65 file = argv[2]; 64 file = argv[2];
66 argv += 2; 65 argv += 2;
@@ -75,7 +74,7 @@ mt_main(struct FileInfo * i, int argc, char * * argv)
75 74
76 if ( code->name == 0 ) { 75 if ( code->name == 0 ) {
77 fprintf(stderr, "mt: unrecognized opcode %s.\n", argv[1]); 76 fprintf(stderr, "mt: unrecognized opcode %s.\n", argv[1]);
78 return 1; 77 return( FALSE);
79 } 78 }
80 79
81 op.mt_op = code->value; 80 op.mt_op = code->value;
@@ -85,14 +84,14 @@ mt_main(struct FileInfo * i, int argc, char * * argv)
85 op.mt_count = 1; /* One, not zero, right? */ 84 op.mt_count = 1; /* One, not zero, right? */
86 85
87 if ( (fd = open(file, O_RDONLY, 0)) < 0 ) { 86 if ( (fd = open(file, O_RDONLY, 0)) < 0 ) {
88 name_and_error(file); 87 perror(file);
89 return 1; 88 return( FALSE);
90 } 89 }
91 90
92 if ( ioctl(fd, MTIOCTOP, &op) != 0 ) { 91 if ( ioctl(fd, MTIOCTOP, &op) != 0 ) {
93 name_and_error(file); 92 perror(file);
94 return 1; 93 return( FALSE);
95 } 94 }
96 95
97 return 0; 96 return( TRUE);
98} 97}