fdio: allow NULL for fstatat_allow_noent stbuf
authorJonathan Lebon <jlebon@redhat.com>
Fri, 6 Oct 2017 21:26:41 +0000 (21:26 +0000)
committerSimon McVittie <smcv@debian.org>
Thu, 26 Oct 2017 23:19:45 +0000 (00:19 +0100)
commit4ccd956f78c7214145bf9b111e65d8bf003329c6
tree7be04eeef05766ffabf93738bcec2d1b0e025864
parent325d3767e5457818640b90fce894d35482873216
fdio: allow NULL for fstatat_allow_noent stbuf

Often, the caller doesn't actually care about the details of the stat
struct itself, but just whether the entry exists or not. It does work
to just pass `NULL` directly to glibc in a quick test, but given that
the argument is tagged as `__nonnull` and that the documentation does
not explicitly specify this is supported, let's do this safely.

Origin: upstream (submodule libglnx), 2017.13, commit:5362f6bc3ff3e30f379e767b203d15c9e56d6f08

Gbp-Pq: Topic 2017.13
Gbp-Pq: Name fdio-allow-NULL-for-fstatat_allow_noent-stbuf.patch
libglnx/glnx-fdio.h
libglnx/tests/test-libglnx-fdio.c