diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-30 20:24:59 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-31 15:18:45 +0100 |
commit | aad76968cd5934ee17f36cd8e817e86ae952b533 (patch) | |
tree | 40eefffb52e8ed3c75747457980630facef783dd /procps | |
parent | 8b710ef000c383f3476245b27bacf034532d9786 (diff) | |
download | busybox-aad76968cd5934ee17f36cd8e817e86ae952b533.tar.gz |
pmap: make 32-bit version work better on 64-bit kernels
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps')
-rw-r--r-- | procps/pmap.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/procps/pmap.c b/procps/pmap.c index c8fa0d280..9e541c707 100644 --- a/procps/pmap.c +++ b/procps/pmap.c @@ -37,6 +37,12 @@ # define DASHES "--------" #endif +#if ULLONG_MAX == 0xffffffff +# define AFMTLL "8" +#else +# define AFMTLL "16" +#endif + enum { OPT_x = 1 << 0, OPT_q = 1 << 1, @@ -46,7 +52,7 @@ static void print_smaprec(struct smaprec *currec, void *data) { unsigned opt = (uintptr_t)data; - printf("%0" AFMT "lx ", currec->smap_start); + printf("%0" AFMTLL "llx ", currec->smap_start); if (opt & OPT_x) printf("%7lu %7lu %7lu %7lu ", |