]> git.proxmox.com Git - swtpm.git/commit
swtpm_setup: Fix errno comparison on end-of-directory (FreeBSD)
authorStefan Berger <stefanb@linux.ibm.com>
Thu, 30 Sep 2021 17:40:26 +0000 (13:40 -0400)
committerStefan Berger <stefanb@us.ibm.com>
Thu, 30 Sep 2021 19:37:14 +0000 (15:37 -0400)
commit500f81ec0f3dd242d3ba392a53d4bc83b742e134
treeb2c8dfca84d0e999f345227506d6b76571d5bcff
parent68dea0aba1e5c1335b5a19a9a61259ba9a5985be
swtpm_setup: Fix errno comparison on end-of-directory (FreeBSD)

FreeBSD may return errno EINVAL beside ENOENT once there are no more
entries in a directory to walk over. It claims that readdir() follows
the getdirentries() return codes, which do include EINVAL but not
ENOENT. But ENOENT is also being used.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
src/swtpm_setup/swtpm_setup.c