aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2011-09-28 18:53:36 +0000
committerEd Schouten <ed@FreeBSD.org>2011-09-28 18:53:36 +0000
commit9f365aa1d6aab0aca269b54fb5d216ac0e31a06f (patch)
treeefc748c3ad32a5751cb0627cfa2b151f69147a78 /lib
parent7d6060bd9c798d0dbf8310c48f82630d204e4fbe (diff)
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/devname.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/gen/devname.c b/lib/libc/gen/devname.c
index 65a690fcdcc3..da0b923573ad 100644
--- a/lib/libc/gen/devname.c
+++ b/lib/libc/gen/devname.c
@@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$");
#include <sys/sysctl.h>
#include <stdio.h>
+#include <stdint.h>
#include <string.h>
#include <sys/param.h>
#include <sys/stat.h>
@@ -60,8 +61,8 @@ devname_r(dev_t dev, mode_t type, char *buf, int len)
}
/* Finally just format it */
- snprintf(buf, len, "#%c:%d:0x%x",
- S_ISCHR(type) ? 'C' : 'B', major(dev), minor(dev));
+ snprintf(buf, len, "#%c:%#jx",
+ S_ISCHR(type) ? 'C' : 'B', (uintmax_t)dev);
return (buf);
}