X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fsd-daemon.h;h=46dc7fd7e596a3f40c9d03d486e70ece67bab7b3;hp=884c36107d3439119ee8223a7f0f82e9e9ccb868;hb=576a01c873a79e9183292d434ec0b18af8cd36cf;hpb=b136daf5ca9d1c446a3e36a1019940496f522b98 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,