diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/bus-policy.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/bus-policy.c b/src/core/bus-policy.c index 064eee1c8a..a6a8fcd4d3 100644 --- a/src/core/bus-policy.c +++ b/src/core/bus-policy.c @@ -150,8 +150,11 @@ int bus_kernel_make_starter( hello->attach_flags_send = _KDBUS_ATTACH_ANY; hello->attach_flags_recv = _KDBUS_ATTACH_ANY; - if (ioctl(fd, KDBUS_CMD_HELLO, hello) < 0) + if (ioctl(fd, KDBUS_CMD_HELLO, hello) < 0) { + if (errno == ENOTTY) /* Major API change */ + return -ESOCKTNOSUPPORT; return -errno; + } /* not interested in any output values */ cmd_free.offset = hello->offset; @@ -160,7 +163,7 @@ int bus_kernel_make_starter( /* The higher 32bit of the bus_flags fields are considered * 'incompatible flags'. Refuse them all for now. */ if (hello->bus_flags > 0xFFFFFFFFULL) - return -EOPNOTSUPP; + return -ESOCKTNOSUPPORT; return fd; } |