-
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 380cc1e9 Signed-off-by: Jim Warner <james.warner@comcast.net>
b899c55d