]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/procutils: improve proc_is_procfs(), add test
authorKarel Zak <kzak@redhat.com>
Fri, 20 Nov 2020 09:38:01 +0000 (10:38 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 9 Feb 2021 23:40:21 +0000 (23:40 +0000)
commitdb59b66c70fcf290196eeada26025567c9087f66
tree5ad2a717f2e6f0c1b5793c464a30e92e412dde0e
parent15966a2cc4cb02bded8b54cfff97987f9b29484c
lib/procutils: improve proc_is_procfs(), add test

* add delay between attempts
* zeroize errno and check for EAGAIN (like in other code)
* add small test program
   ./test_procutils --is-procfs [<dir>]

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 1b54a74e8622d18b3be53ca440928d96e73bac3d)
lib/procutils.c