]> granicus.if.org Git - procps-ng/commit
Check for presence of disks in vmstat
authorCraig Small <csmall@enc.com.au>
Wed, 29 Jan 2014 11:22:11 +0000 (22:22 +1100)
committerCraig Small <csmall@enc.com.au>
Wed, 29 Jan 2014 11:22:11 +0000 (22:22 +1100)
commit5a34ff0a99a3c5e7ba4f7982d5de3d0dcc9e3045
tree4c5902eec8c59d6e1736144a2ce304f741078427
parent4359cf069819d9fb53493933e00d9af5c37bced5
Check for presence of disks in vmstat

vmstat -d or vmstat -p would crash mysteriously under different
circumstances. The problem was eventually tracked down to /sys not
being mounted which meant is_disk() always returned false.
The partition would then be attempted to be linked to a non-existent
disk causing a segfault.

vmstat will now not link to a disk if none exists.
The change in testing will skip those tests when /sys/block doesn't
exist.

Many thanks to Daniel Schepler for his analysis and suggestions.

Bug-Debian: http://bugs.debian.org/736628
proc/sysinfo.c
testsuite/vmstat.test/vmstat.exp