diff options
author | Andy Wingo <wingo@pobox.com> | 2015-08-16 11:20:51 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2015-08-16 11:20:51 +0200 |
commit | 578f4b2e9cdaae895fcac057d6d6fa4f85d55535 (patch) | |
tree | b326c2d505a80ed5fb31de5b8bd793ac056ac9c6 | |
parent | f52715f8d90ca768dc06616c0f77b11db9fa3236 (diff) |
Remove sd_is_mq
* src/systemd/sd-daemon.h:
* src/libelogind/sd-daemon/sd-daemon.c (sd_is_mq): Remove unused
function that depended on librt. Ultimately we should remove this
header at some point.
-rw-r--r-- | src/libelogind/sd-daemon/sd-daemon.c | 31 | ||||
-rw-r--r-- | src/systemd/sd-daemon.h | 10 |
2 files changed, 0 insertions, 41 deletions
diff --git a/src/libelogind/sd-daemon/sd-daemon.c b/src/libelogind/sd-daemon/sd-daemon.c index 82ac72c72a..7bbb3517be 100644 --- a/src/libelogind/sd-daemon/sd-daemon.c +++ b/src/libelogind/sd-daemon/sd-daemon.c @@ -307,37 +307,6 @@ _public_ int sd_is_socket_unix(int fd, int type, int listening, const char *path return 1; } -_public_ int sd_is_mq(int fd, const char *path) { - struct mq_attr attr; - - assert_return(fd >= 0, -EINVAL); - - if (mq_getattr(fd, &attr) < 0) - return -errno; - - if (path) { - char fpath[PATH_MAX]; - struct stat a, b; - - assert_return(path_is_absolute(path), -EINVAL); - - if (fstat(fd, &a) < 0) - return -errno; - - strncpy(stpcpy(fpath, "/dev/mqueue"), path, sizeof(fpath) - 12); - fpath[sizeof(fpath)-1] = 0; - - if (stat(fpath, &b) < 0) - return -errno; - - if (a.st_dev != b.st_dev || - a.st_ino != b.st_ino) - return 0; - } - - return 1; -} - _public_ int sd_pid_notify_with_fds(pid_t pid, int unset_environment, const char *state, const int *fds, unsigned n_fds) { union sockaddr_union sockaddr = { .sa.sa_family = AF_UNIX, diff --git a/src/systemd/sd-daemon.h b/src/systemd/sd-daemon.h index 861dc8f1f4..8fcb6968d9 100644 --- a/src/systemd/sd-daemon.h +++ b/src/systemd/sd-daemon.h @@ -147,16 +147,6 @@ int sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port int sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length); /* - Helper call for identifying a passed file descriptor. Returns 1 if - the file descriptor is a POSIX Message Queue of the specified name, - 0 otherwise. If path is NULL a message queue name check is not - done. Returns a negative errno style error code on failure. - - See sd_is_mq(3) for more information. -*/ -int sd_is_mq(int fd, const char *path); - -/* Informs systemd about changed daemon state. This takes a number of newline separated environment-style variable assignments in a string. The following variables are known: |