]> git.baikalelectronics.ru Git - kernel.git/commit
perf test: Handle properly readdir DT_UNKNOWN
authorJiri Olsa <jolsa@kernel.org>
Wed, 6 Dec 2017 17:45:35 +0000 (18:45 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 27 Dec 2017 15:15:48 +0000 (12:15 -0300)
commit00ed8f5155aab2a04c7fc0e6025f15ac08a7cb5c
tree3f7fd4408641d2fc1f7a3ecce1c2326b44c260de
parent49290459182836817e33e4b455615e97c75910ff
perf test: Handle properly readdir DT_UNKNOWN

Some system can return DT_UNKNOWN in readdir's struct dirent::d_type and
we must handle it properly. In this case we can directly check if the
entity we found is directory and skip it.

Reported-by: Michael Petlan <mpetlan@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20171206174535.25380-1-jolsa@kernel.org
[ Split from a larger patch ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/builtin-test.c