summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/readmap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/readmap.c b/utils/readmap.c
index 5e42493ab..62d1f3ea3 100644
--- a/utils/readmap.c
+++ b/utils/readmap.c
@@ -19,11 +19,15 @@ int main(int argc, char ** argv) {
int out;
short keymap[NR_KEYS];
int magic = KMAP_MAGIC;
+ int verbose = 0;
if (argc != 2) {
printf("bad usage\n");
exit(1);
}
+
+ if (getenv("DEBUG") != NULL)
+ verbose = 1;
memset(keymaps, 0, sizeof(keymaps));
@@ -48,9 +52,9 @@ int main(int argc, char ** argv) {
}
}
- printf("found %d valid keymaps\n", count);
+ if (verbose) fprintf(stderr, "found %d valid keymaps\n", count);
- printf("creating keymap file %s\n", argv[1]);
+ if (verbose) fprintf(stderr"creating keymap file %s\n", argv[1]);
if ((out = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 1) {
perror("open keymap");
exit(1);