diff options
Diffstat (limited to 'src/libsystemd/sd-bus/bus-kernel.c')
-rw-r--r-- | src/libsystemd/sd-bus/bus-kernel.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c index 77ad5ca506..27c2e0efcf 100644 --- a/src/libsystemd/sd-bus/bus-kernel.c +++ b/src/libsystemd/sd-bus/bus-kernel.c @@ -1039,7 +1039,7 @@ static int bus_kernel_translate_message(sd_bus *bus, struct kdbus_msg *k) { return translate[found->type - _KDBUS_ITEM_KERNEL_BASE](bus, k, found); } -int bus_kernel_read_message(sd_bus *bus) { +int bus_kernel_read_message(sd_bus *bus, bool hint_priority, int64_t priority) { struct kdbus_cmd_recv recv = {}; struct kdbus_msg *k; int r; @@ -1050,6 +1050,11 @@ int bus_kernel_read_message(sd_bus *bus) { if (r < 0) return r; + if (hint_priority) { + recv.flags |= KDBUS_RECV_USE_PRIORITY; + recv.priority = priority; + } + r = ioctl(bus->input_fd, KDBUS_CMD_MSG_RECV, &recv); if (r < 0) { if (errno == EAGAIN) |