aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-12-30 20:24:59 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-12-31 15:18:45 +0100
commitaad76968cd5934ee17f36cd8e817e86ae952b533 (patch)
tree40eefffb52e8ed3c75747457980630facef783dd /procps
parent8b710ef000c383f3476245b27bacf034532d9786 (diff)
downloadbusybox-w32-aad76968cd5934ee17f36cd8e817e86ae952b533.tar.gz
busybox-w32-aad76968cd5934ee17f36cd8e817e86ae952b533.tar.bz2
busybox-w32-aad76968cd5934ee17f36cd8e817e86ae952b533.zip
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.c8
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 @@
37# define DASHES "--------" 37# define DASHES "--------"
38#endif 38#endif
39 39
40#if ULLONG_MAX == 0xffffffff
41# define AFMTLL "8"
42#else
43# define AFMTLL "16"
44#endif
45
40enum { 46enum {
41 OPT_x = 1 << 0, 47 OPT_x = 1 << 0,
42 OPT_q = 1 << 1, 48 OPT_q = 1 << 1,
@@ -46,7 +52,7 @@ static void print_smaprec(struct smaprec *currec, void *data)
46{ 52{
47 unsigned opt = (uintptr_t)data; 53 unsigned opt = (uintptr_t)data;
48 54
49 printf("%0" AFMT "lx ", currec->smap_start); 55 printf("%0" AFMTLL "llx ", currec->smap_start);
50 56
51 if (opt & OPT_x) 57 if (opt & OPT_x)
52 printf("%7lu %7lu %7lu %7lu ", 58 printf("%7lu %7lu %7lu %7lu ",