]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virschematest: Replace g_lstat() with virFileIsLink()
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 27 Aug 2024 12:14:37 +0000 (14:14 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 28 Aug 2024 06:46:16 +0000 (08:46 +0200)
commit4d8ebbfee83edb26b19a62465b9f98d0126db991
treedb32b12370b03f9440b7cad1f0f4744a2f8a2392
parent48bdeaf2fa49513d4be53588100807f269c36997
virschematest: Replace g_lstat() with virFileIsLink()

Inside of virschematest.c there's testSchemaDir() which iterates
over dentries in given directory but skips some files: those
without ".xml" suffix, hidden files, symlinks, etc.

Now, symlinks are detected as g_lstat() + S_ISLNK() combo which
works, except it fails to compile on mingw where is no concept of
symlinks. Replace the combo with a call to virFileIsLink() which
at least allows us to compile cleanly on mingw.

Fixes: f997fcca71a16b102e6ee663a3fb86bed8de9d7d
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
tests/virschematest.c