diff options
Diffstat (limited to 'console-tools/dumpkmap.c')
-rw-r--r-- | console-tools/dumpkmap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c index f61795cf0..a606d568e 100644 --- a/console-tools/dumpkmap.c +++ b/console-tools/dumpkmap.c | |||
@@ -50,12 +50,12 @@ int dumpkmap_main(int argc, char **argv) | |||
50 | for (j = 0; j < NR_KEYS; j++) { | 50 | for (j = 0; j < NR_KEYS; j++) { |
51 | ke.kb_index = j; | 51 | ke.kb_index = j; |
52 | ke.kb_table = i; | 52 | ke.kb_table = i; |
53 | if (ioctl(fd, KDGKBENT, &ke) < 0) { | 53 | if (!ioctl_or_perror(fd, KDGKBENT, &ke, |
54 | bb_perror_msg("ioctl failed with %s, %s, %p", | 54 | "ioctl failed with %s, %s, %p", |
55 | (char *)&ke.kb_index, | 55 | (char *)&ke.kb_index, |
56 | (char *)&ke.kb_table, | 56 | (char *)&ke.kb_table, |
57 | &ke.kb_value); | 57 | &ke.kb_value) |
58 | } else { | 58 | ) { |
59 | write(1, (void*)&ke.kb_value, 2); | 59 | write(1, (void*)&ke.kb_value, 2); |
60 | } | 60 | } |
61 | } | 61 | } |