aboutsummaryrefslogtreecommitdiff
path: root/lib/libusbhid/usage.c
diff options
context:
space:
mode:
authorNick Hibma <n_hibma@FreeBSD.org>2000-08-26 13:53:27 +0000
committerNick Hibma <n_hibma@FreeBSD.org>2000-08-26 13:53:27 +0000
commit25d1d43d7857ab43963b7396ed6f0c5e49bf2c22 (patch)
tree98a964421f6665ce3569da286278913dbbdd49bf /lib/libusbhid/usage.c
parentcf8728a497e7f9d29f87df9510237d5e86238647 (diff)
downloadsrc-25d1d43d7857ab43963b7396ed6f0c5e49bf2c22.tar.gz
src-25d1d43d7857ab43963b7396ed6f0c5e49bf2c22.zip
Sync with NetBSD:
Print unknown usages with 4 digits. Mask in page extraction.
Notes
Notes: svn path=/head/; revision=65116
Diffstat (limited to 'lib/libusbhid/usage.c')
-rw-r--r--lib/libusbhid/usage.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libusbhid/usage.c b/lib/libusbhid/usage.c
index afb990a93ccd..28d8c3bcdf36 100644
--- a/lib/libusbhid/usage.c
+++ b/lib/libusbhid/usage.c
@@ -1,4 +1,4 @@
-/* $NetBSD: usage.c,v 1.5 2000/04/02 11:10:53 augustss Exp $ */
+/* $NetBSD: usage.c,v 1.6 2000/08/13 22:22:02 augustss Exp $ */
/*
* Copyright (c) 1999 Lennart Augustsson <augustss@netbsd.org>
@@ -165,7 +165,7 @@ hid_usage_page(int i)
for (k = 0; k < npages; k++)
if (pages[k].usage == i)
return pages[k].name;
- sprintf(b, "0x%02x", i);
+ sprintf(b, "0x%04x", i);
return b;
}
@@ -192,6 +192,6 @@ hid_usage_in_page(unsigned int u)
return pages[k].page_contents[j].name;
}
bad:
- sprintf(b, "0x%02x", i);
+ sprintf(b, "0x%04x", i);
return b;
}