summaryrefslogtreecommitdiff
path: root/src/libudev/util.c
diff options
context:
space:
mode:
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;