• jim warner's avatar
    pmap: fix printing bug associated with the '-x' option · b899c55d
    jim warner authored
    Ever since its introduction, the 'x' (extended format)
    option has employed strncmp to parse those smaps keys.
    
    Such an approach worked well as long as those prefixes
    were guaranteed to be unique. But, with the 4.3 kernel
    a new 'SwapPss' field was added to those within smaps.
    
    That triggered a 2nd match for the 'Swap' logic which,
    in turn, resulted in a duplicate output line of zeros.
    
    So this patch just trades strncmp for strcmp, avoiding
    potential future problems when /proc/$$/smaps evolves.
    
    Reference(s):
    . recent bug report
    https://bugzilla.redhat.com/show_bug.cgi?id=1374061
    . linux 4.3 kernel introduces SwapPss
    commit 8334b96221ff0dcbde4873d31eb4d84774ed8ed4
    . original pmap -x option introduction
    commit 380cc1e9Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
    b899c55d
Name
Last commit
Last update
Documentation Loading commit data...
contrib Loading commit data...
include Loading commit data...
lib Loading commit data...
man-po Loading commit data...
misc Loading commit data...
po Loading commit data...
proc Loading commit data...
ps Loading commit data...
testsuite Loading commit data...
top Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LIB Loading commit data...
ChangeLog Loading commit data...
INSTALL.md Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README.md Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
create-man-pot.sh Loading commit data...
free.1 Loading commit data...
free.c Loading commit data...
kill.1 Loading commit data...
pgrep.1 Loading commit data...
pgrep.c Loading commit data...
pidof.1 Loading commit data...
pidof.c Loading commit data...
pkill.1 Loading commit data...
pmap.1 Loading commit data...
pmap.c Loading commit data...
pwdx.1 Loading commit data...
pwdx.c Loading commit data...
skill.1 Loading commit data...
skill.c Loading commit data...
slabtop.1 Loading commit data...
slabtop.c Loading commit data...
snice.1 Loading commit data...
sysctl.8 Loading commit data...
sysctl.c Loading commit data...
sysctl.conf Loading commit data...
sysctl.conf.5 Loading commit data...
tload.1 Loading commit data...
tload.c Loading commit data...
translate-man.sh Loading commit data...
uptime.1 Loading commit data...
uptime.c Loading commit data...
vmstat.8 Loading commit data...
vmstat.c Loading commit data...
w.1 Loading commit data...
w.c Loading commit data...
watch.1 Loading commit data...
watch.c Loading commit data...