diff options
author | Daniel Mack <github@zonque.org> | 2015-10-01 09:46:09 +0200 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-10-01 09:46:09 +0200 |
commit | 47c67a5042968163dae8d4e4d160232800843e55 (patch) | |
tree | 8b30347368544961ff6e08d4330fa014b5e43cfc /src/core/dbus-manager.c | |
parent | 8abf5291564e771bfc62c74a55ab3f3b56f45257 (diff) | |
parent | 5c22925a5713ad6f62d89ef478b82e571e9ba688 (diff) |
Merge pull request #1426 from poettering/log-syntax
logging fixes and more
Diffstat (limited to 'src/core/dbus-manager.c')
-rw-r--r-- | src/core/dbus-manager.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 561b6f8bfa..1a3a72ae37 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -81,10 +81,21 @@ static int property_get_virtualization( void *userdata, sd_bus_error *error) { + int v; + assert(bus); assert(reply); - return sd_bus_message_append(reply, "s", virtualization_to_string(detect_virtualization())); + v = detect_virtualization(); + + /* Make sure to return the empty string when we detect no virtualization, as that is the API. + * + * https://github.com/systemd/systemd/issues/1423 + */ + + return sd_bus_message_append( + reply, "s", + v == VIRTUALIZATION_NONE ? "" : virtualization_to_string(v)); } static int property_get_architecture( |