summaryrefslogtreecommitdiff
path: root/src/libudev/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-07-31 18:04:10 -0400
committerIan Stakenvicius <axs@gentoo.org>2013-07-31 18:04:10 -0400
commit9f49634fa3a6a5ac40bc8ff5d1c82c56eb38eef4 (patch)
tree71545cea89ef54eac2ef423d842e935f4abd3544 /src/libudev/util.c
parentfd0b90dbb3cc1080244d6285ad2f3104dabbbcf9 (diff)
add new hexchar() call
Based on systemd commit fb624d04e56018defe297eff1d88888b192caeaa , added to support commit f8e6d758cd65b28f94b62344bd95e7bab94370d4 Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
Diffstat (limited to 'src/libudev/util.c')
-rw-r--r--src/libudev/util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libudev/util.c b/src/libudev/util.c
index 8fec6856e0..5abf6589af 100644
--- a/src/libudev/util.c
+++ b/src/libudev/util.c
@@ -999,6 +999,12 @@ int fd_inc_sndbuf(int fd, size_t n) {
return 1;
}
+char hexchar(int x) {
+ static const char table[16] = "0123456789abcdef";
+
+ return table[x & 15];
+}
+
bool in_initrd(void) {
static __thread int saved = -1;
struct statfs s;