]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
tools/tools-common.c: handle DT_UNKNOWN from readdir()
authorVasil Kolev <vasil@ludost.net>
Fri, 17 May 2024 10:58:38 +0000 (13:58 +0300)
committerKamalesh Babulal <kamalesh.babulal@oracle.com>
Wed, 10 Jul 2024 10:11:38 +0000 (15:41 +0530)
commit55ff2a64aa8f200cbc6eced1ade749ef2ac300ec
tree940b4293877bbb99a18230a033727224ce040488
parentbb30a23ee9b9432ba3ffcc2342f1529bb540c580
tools/tools-common.c: handle DT_UNKNOWN from readdir()

It's possible that readdir() would return DT_UNKNOWN in d_type for some
filesystems (observed on RHEL 8 with XFS and documented in readdir(3)),
thus the need to do an explicit stat() for such cases.

Signed-off-by: Vasil Kolev <vasil@ludost.net>
Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
src/tools/tools-common.c