aboutsummaryrefslogtreecommitdiff
path: root/miscutils/mt.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-03-19 09:13:01 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-03-19 09:13:01 +0000
commitcad5364599eb5062d59e0c397ed638ddd61a8d5d (patch)
treea318d0f03aa076c74b576ea45dc543a5669e8e91 /miscutils/mt.c
parente01f9662a5bd5d91be4f6b3941b57fff73cd5af1 (diff)
downloadbusybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.gz
busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.bz2
busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.zip
Major coreutils update.
Diffstat (limited to 'miscutils/mt.c')
-rw-r--r--miscutils/mt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/miscutils/mt.c b/miscutils/mt.c
index 49dc70ac6..e79954552 100644
--- a/miscutils/mt.c
+++ b/miscutils/mt.c
@@ -59,12 +59,12 @@ extern int mt_main(int argc, char **argv)
59 int fd, mode; 59 int fd, mode;
60 60
61 if (argc < 2) { 61 if (argc < 2) {
62 show_usage(); 62 bb_show_usage();
63 } 63 }
64 64
65 if (strcmp(argv[1], "-f") == 0) { 65 if (strcmp(argv[1], "-f") == 0) {
66 if (argc < 4) { 66 if (argc < 4) {
67 show_usage(); 67 bb_show_usage();
68 } 68 }
69 file = argv[2]; 69 file = argv[2];
70 argv += 2; 70 argv += 2;
@@ -78,7 +78,7 @@ extern int mt_main(int argc, char **argv)
78 } 78 }
79 79
80 if (code->name == 0) { 80 if (code->name == 0) {
81 error_msg("unrecognized opcode %s.", argv[1]); 81 bb_error_msg("unrecognized opcode %s.", argv[1]);
82 return EXIT_FAILURE; 82 return EXIT_FAILURE;
83 } 83 }
84 84
@@ -102,18 +102,18 @@ extern int mt_main(int argc, char **argv)
102 } 102 }
103 103
104 if ((fd = open(file, mode, 0)) < 0) 104 if ((fd = open(file, mode, 0)) < 0)
105 perror_msg_and_die("%s", file); 105 bb_perror_msg_and_die("%s", file);
106 106
107 switch (code->value) { 107 switch (code->value) {
108 case MTTELL: 108 case MTTELL:
109 if (ioctl(fd, MTIOCPOS, &position) < 0) 109 if (ioctl(fd, MTIOCPOS, &position) < 0)
110 perror_msg_and_die("%s", file); 110 bb_perror_msg_and_die("%s", file);
111 printf ("At block %d.\n", (int) position.mt_blkno); 111 printf ("At block %d.\n", (int) position.mt_blkno);
112 break; 112 break;
113 113
114 default: 114 default:
115 if (ioctl(fd, MTIOCTOP, &op) != 0) 115 if (ioctl(fd, MTIOCTOP, &op) != 0)
116 perror_msg_and_die("%s", file); 116 bb_perror_msg_and_die("%s", file);
117 break; 117 break;
118 } 118 }
119 119