Commit fb755a10 authored by Michael Biebl's avatar Michael Biebl
Browse files

bus: Fix bus_print_property() to use "int" for booleans

This fixes the problem that on big endian architectures, like mips or
powerpc, boolean properties that were retrieved via sd-bus were always
set to 0 (no).

Closes: #774430
parent 3b3b1009
From: David Herrmann <>
Date: Thu, 18 Sep 2014 13:28:28 +0200
Subject: bus: fix bus_print_property() to use "int" for booleans
We always use "int" if we retrieve boolean values from sd-bus, as "bool"
is only a single byte, but full int on va-args.
Thanks to Werner Fink for the report!
(cherry picked from commit c2fa048c4a70c8386c6d8fe939e5ea9edecf1e98)
src/libsystemd/sd-bus/bus-util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libsystemd/sd-bus/bus-util.c b/src/libsystemd/sd-bus/bus-util.c
index 6441c5b..d0b7c3d 100644
--- a/src/libsystemd/sd-bus/bus-util.c
+++ b/src/libsystemd/sd-bus/bus-util.c
@@ -631,7 +631,7 @@ int bus_print_property(const char *name, sd_bus_message *property, bool all) {
- bool b;
+ int b;
r = sd_bus_message_read_basic(property, type, &b);
if (r < 0)
......@@ -170,6 +170,7 @@ polkit-don-t-start-polkit-agent-when-running-as-root.patch
## Debian specific patches:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment