diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-07-31 22:06:38 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-07-31 22:06:38 +0000 |
commit | e11ff718ac4bc10539dc31899cc75a6feb78467e (patch) | |
tree | efa1904b812e5c6ecbcf68bedc7065977a3a4897 /console-tools | |
parent | 6f978dbacdd88a28bafe5b944a0bfff2203ef190 (diff) | |
download | busybox-e11ff718ac4bc10539dc31899cc75a6feb78467e.tar.gz |
shrink the flag setting by reversing the operation
Diffstat (limited to 'console-tools')
-rw-r--r-- | console-tools/dumpkmap.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c index 590ba4d08..fe962060e 100644 --- a/console-tools/dumpkmap.c +++ b/console-tools/dumpkmap.c @@ -54,17 +54,11 @@ int dumpkmap_main(int argc, char **argv) write(1, magic, 7); + /* Here we want to set everything to 0 except for indexes: + * [0-2] [4-6] [8-10] [12] */ memset(flags, 0x00, MAX_NR_KEYMAPS); - flags[0] = 1; - flags[1] = 1; - flags[2] = 1; - flags[4] = 1; - flags[5] = 1; - flags[6] = 1; - flags[8] = 1; - flags[9] = 1; - flags[10] = 1; - flags[12] = 1; + memset(flags, 0x01, 13); + flags[3] = flags[7] = flags[11] = 0; /* dump flags */ write(1, flags, MAX_NR_KEYMAPS); |