From 954871d8ba15911d014f76ed2c7a9492953cf39d Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Fri, 30 Jan 2015 13:53:45 +0100 Subject: Revert "sd-bus: change serialization of kdbus messages to qualify in their entirety as gvariant objects" This breaks booting with kdbus. This reverts commit b381de4197157748ed96e469fcc372c23f842ae1. --- src/libsystemd/sd-bus/bus-protocol.h | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) (limited to 'src/libsystemd/sd-bus/bus-protocol.h') diff --git a/src/libsystemd/sd-bus/bus-protocol.h b/src/libsystemd/sd-bus/bus-protocol.h index 183af89a63..6431dfbff8 100644 --- a/src/libsystemd/sd-bus/bus-protocol.h +++ b/src/libsystemd/sd-bus/bus-protocol.h @@ -23,38 +23,21 @@ #include -#include "macro.h" - /* Packet header */ -struct _packed_ bus_header { - /* The first four fields are identical for dbus1, and dbus2 */ +struct bus_header { uint8_t endian; uint8_t type; uint8_t flags; uint8_t version; - - union _packed_ { - /* dbus1: Used for SOCK_STREAM connections */ - struct _packed_ { - uint32_t body_size; - - /* Note that what the bus spec calls "serial" we'll call - "cookie" instead, because we don't want to imply that the - cookie was in any way monotonically increasing. */ - uint32_t serial; - uint32_t fields_size; - } dbus1; - - /* dbus2: Used for kdbus connections */ - struct _packed_ { - uint32_t _reserved; - uint64_t cookie; - } dbus2; - - /* Note that both header versions have the same size! */ - }; -}; + uint32_t body_size; + + /* Note that what the bus spec calls "serial" we'll call + "cookie" instead, because we don't want to imply that the + cookie was in any way monotonically increasing. */ + uint32_t serial; + uint32_t fields_size; +} _packed_; /* Endianness */ -- cgit v1.2.3-54-g00ecf