]> git.ipfire.org Git - thirdparty/util-linux.git/commit - sys-utils/lscpu.c
lscpu: don't assume filesystem supports d_type when searching for NUMA nodes
authorStewart Smith <stewart@linux.vnet.ibm.com>
Tue, 4 Mar 2014 04:27:27 +0000 (15:27 +1100)
committerKarel Zak <kzak@redhat.com>
Tue, 4 Mar 2014 10:47:23 +0000 (11:47 +0100)
commitc0cf4ae9b05a88dfbace18dd05d23fb0b2d19dab
treec42e7c26600d067e5bca58914f67c3f9e1861b4b
parent7ad19a3feb8fc9009b69b379c5c98220d2e34e76
lscpu: don't assume filesystem supports d_type when searching for NUMA nodes

Not all file systems support the d_type field and simply checking for
d_type == DT_DIR in is_node_dirent would cause the test suite to fail
if run on (for example) XFS.

The simple fix is to check for DT_DIR or DT_UNKNOWN in is_node_dirent.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
sys-utils/lscpu.c