diff options
| author | Ed Schouten <ed@FreeBSD.org> | 2011-09-28 18:53:36 +0000 |
|---|---|---|
| committer | Ed Schouten <ed@FreeBSD.org> | 2011-09-28 18:53:36 +0000 |
| commit | 9f365aa1d6aab0aca269b54fb5d216ac0e31a06f (patch) | |
| tree | efc748c3ad32a5751cb0627cfa2b151f69147a78 /lib | |
| parent | 7d6060bd9c798d0dbf8310c48f82630d204e4fbe (diff) | |
Notes
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libc/gen/devname.c | 5 |
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); } |
