diff options
Diffstat (limited to 'miscutils/mt.c')
-rw-r--r-- | miscutils/mt.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/miscutils/mt.c b/miscutils/mt.c index 2971421ef..b9bc2a11b 100644 --- a/miscutils/mt.c +++ b/miscutils/mt.c | |||
@@ -106,14 +106,12 @@ int mt_main(int argc, char **argv) | |||
106 | 106 | ||
107 | switch (code->value) { | 107 | switch (code->value) { |
108 | case MTTELL: | 108 | case MTTELL: |
109 | if (ioctl(fd, MTIOCPOS, &position) < 0) | 109 | ioctl_or_perror_and_die(fd, MTIOCPOS, &position, "%s", file); |
110 | bb_perror_msg_and_die("%s", file); | ||
111 | printf("At block %d.\n", (int) position.mt_blkno); | 110 | printf("At block %d.\n", (int) position.mt_blkno); |
112 | break; | 111 | break; |
113 | 112 | ||
114 | default: | 113 | default: |
115 | if (ioctl(fd, MTIOCTOP, &op) != 0) | 114 | ioctl_or_perror_and_die(fd, MTIOCTOP, &op, "%s", file); |
116 | bb_perror_msg_and_die("%s", file); | ||
117 | break; | 115 | break; |
118 | } | 116 | } |
119 | 117 | ||