diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2016-10-06 23:43:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-06 23:43:08 +0300 |
commit | 36264e0de596d9b0264ae08b53832495a78c779c (patch) | |
tree | 658b2caae552a9a7be6810dab6b44e653a89fef9 /src/libsystemd/sd-device/sd-device.c | |
parent | e057995bb1314a94ce460d8e5a2a20e73c0e2ad4 (diff) | |
parent | 97f0e76f18d322d29bcfbc4ab6bb9cd67a1cdd54 (diff) |
Merge pull request #4299 from poettering/variety
ioctl socket fixes, sd-bus error updates, resolved error addition, PAM stub process priv fix
Diffstat (limited to 'src/libsystemd/sd-device/sd-device.c')
-rw-r--r-- | src/libsystemd/sd-device/sd-device.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c index 0c4ad966bd..411453e08d 100644 --- a/src/libsystemd/sd-device/sd-device.c +++ b/src/libsystemd/sd-device/sd-device.c @@ -36,6 +36,7 @@ #include "parse-util.h" #include "path-util.h" #include "set.h" +#include "socket-util.h" #include "stat-util.h" #include "string-util.h" #include "strv.h" @@ -629,9 +630,9 @@ _public_ int sd_device_new_from_device_id(sd_device **ret, const char *id) { if (r < 0) return r; - sk = socket(PF_INET, SOCK_DGRAM, 0); + sk = socket_ioctl_fd(); if (sk < 0) - return -errno; + return sk; r = ioctl(sk, SIOCGIFNAME, &ifr); if (r < 0) |