chiark / gitweb /
stat-util: unify code that checks whether something is a regular file
authorLennart Poettering <lennart@poettering.net>
Mon, 19 Feb 2018 17:01:05 +0000 (18:01 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:58:59 +0000 (07:58 +0200)
commita9f82387ce656c98cad320372002eee70369fdb4
treecf23834b2e2a680db0fae7d6dc7b7a1e2408b18f
parent59f611201b378b84526a37608cbfa07621ec2ab3
stat-util: unify code that checks whether something is a regular file

Let's add a common implementation for regular file checks, that are
careful to return the right error code (EISDIR/EISLNK/EBADFD) when we
are encountering a wrong file node.
src/basic/stat-util.c
src/basic/stat-util.h