X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fsd-daemon.h;fp=src%2Fsd-daemon.h;h=46dc7fd7e596a3f40c9d03d486e70ece67bab7b3;hb=4160ec67ba40eee5d14c5b96d37c89a3a5356f34;hp=884c36107d3439119ee8223a7f0f82e9e9ccb868;hpb=8003c705f2d1000abaf87ebe56f022b8324d78cc;p=elogind.git diff --git a/src/sd-daemon.h b/src/sd-daemon.h index 884c36107..46dc7fd7e 100644 --- a/src/sd-daemon.h +++ b/src/sd-daemon.h @@ -123,6 +123,18 @@ int sd_listen_fds(int unset_environment); */ int sd_is_fifo(int fd, const char *path); +/* + Helper call for identifying a passed file descriptor. Returns 1 if + the file descriptor is a special character device on the file + system stored under the specified path, 0 otherwise. + If path is NULL a path name check will not be done and the call + only verifies if the file descriptor refers to a special character. + Returns a negative errno style error code on failure. + + See sd_is_special(3) for more information. +*/ +int sd_is_special(int fd, const char *path); + /* Helper call for identifying a passed file descriptor. Returns 1 if the file descriptor is a socket of the specified family (AF_INET,