chiark / gitweb /
bus: TIMESTAMP is optional kdbus metadata now, NAMES are always added
authorKay Sievers <kay@vrfy.org>
Mon, 18 Nov 2013 00:30:57 +0000 (01:30 +0100)
committerKay Sievers <kay@vrfy.org>
Mon, 18 Nov 2013 00:30:57 +0000 (01:30 +0100)
src/libsystemd-bus/kdbus.h
src/libsystemd-bus/libsystemd-bus.sym
src/libsystemd-bus/sd-bus.c
src/libsystemd-bus/test-bus-kernel.c
src/systemd/sd-bus.h

index fadb2f2..6e21b72 100644 (file)
@@ -238,8 +238,8 @@ enum {
        KDBUS_HELLO_ACCEPT_FD           =  1 <<  1,
 
        /* subscription for metadata to attach */
-       KDBUS_HELLO_ATTACH_CREDS        =  1 <<  8,
-       KDBUS_HELLO_ATTACH_NAMES        =  1 <<  9,
+       KDBUS_HELLO_ATTACH_TIMESTAMP    =  1 <<  8,
+       KDBUS_HELLO_ATTACH_CREDS        =  1 <<  9,
        KDBUS_HELLO_ATTACH_COMM         =  1 << 10,
        KDBUS_HELLO_ATTACH_EXE          =  1 << 11,
        KDBUS_HELLO_ATTACH_CMDLINE      =  1 << 12,
index 03353f1..a1ffc43 100644 (file)
@@ -26,8 +26,8 @@ global:
         sd_bus_set_server;
         sd_bus_set_anonymous;
         sd_bus_negotiate_fds;
+        sd_bus_negotiate_attach_timestamp;
         sd_bus_negotiate_attach_creds;
-        sd_bus_negotiate_attach_names;
         sd_bus_negotiate_attach_comm;
         sd_bus_negotiate_attach_exe;
         sd_bus_negotiate_attach_cmdline;
index 2345c73..d93138b 100644 (file)
@@ -264,21 +264,21 @@ _public_ int sd_bus_negotiate_fds(sd_bus *bus, int b) {
         return 0;
 }
 
-_public_ int sd_bus_negotiate_attach_creds(sd_bus *bus, int b) {
+_public_ int sd_bus_negotiate_attach_timestamp(sd_bus *bus, int b) {
         assert_return(bus, -EINVAL);
         assert_return(bus->state == BUS_UNSET, -EPERM);
         assert_return(!bus_pid_changed(bus), -ECHILD);
 
-        SET_FLAG(bus->hello_flags, KDBUS_HELLO_ATTACH_CREDS, b);
+        SET_FLAG(bus->hello_flags, KDBUS_HELLO_ATTACH_TIMESTAMP, b);
         return 0;
 }
 
-_public_ int sd_bus_negotiate_attach_names(sd_bus *bus, int b) {
+_public_ int sd_bus_negotiate_attach_creds(sd_bus *bus, int b) {
         assert_return(bus, -EINVAL);
         assert_return(bus->state == BUS_UNSET, -EPERM);
         assert_return(!bus_pid_changed(bus), -ECHILD);
 
-        SET_FLAG(bus->hello_flags, KDBUS_HELLO_ATTACH_NAMES, b);
+        SET_FLAG(bus->hello_flags, KDBUS_HELLO_ATTACH_CREDS, b);
         return 0;
 }
 
index 0504502..44d2fa7 100644 (file)
@@ -62,8 +62,8 @@ int main(int argc, char *argv[]) {
         r = sd_bus_set_address(b, address);
         assert_se(r >= 0);
 
+        assert_se(sd_bus_negotiate_attach_timestamp(a, 1) >= 0);
         assert_se(sd_bus_negotiate_attach_creds(a, 1) >= 0);
-        assert_se(sd_bus_negotiate_attach_names(a, 1) >= 0);
         assert_se(sd_bus_negotiate_attach_comm(a, 1) >= 0);
         assert_se(sd_bus_negotiate_attach_exe(a, 1) >= 0);
         assert_se(sd_bus_negotiate_attach_cmdline(a, 1) >= 0);
@@ -72,8 +72,8 @@ int main(int argc, char *argv[]) {
         assert_se(sd_bus_negotiate_attach_selinux_context(a, 1) >= 0);
         assert_se(sd_bus_negotiate_attach_audit(a, 1) >= 0);
 
+        assert_se(sd_bus_negotiate_attach_timestamp(b, 1) >= 0);
         assert_se(sd_bus_negotiate_attach_creds(b, 1) >= 0);
-        assert_se(sd_bus_negotiate_attach_names(b, 1) >= 0);
         assert_se(sd_bus_negotiate_attach_comm(b, 1) >= 0);
         assert_se(sd_bus_negotiate_attach_exe(b, 1) >= 0);
         assert_se(sd_bus_negotiate_attach_cmdline(b, 1) >= 0);
index cff4e53..d56f8b3 100644 (file)
@@ -73,8 +73,8 @@ int sd_bus_set_bus_client(sd_bus *bus, int b);
 int sd_bus_set_server(sd_bus *bus, int b, sd_id128_t server_id);
 int sd_bus_set_anonymous(sd_bus *bus, int b);
 int sd_bus_negotiate_fds(sd_bus *bus, int b);
+int sd_bus_negotiate_attach_timestamp(sd_bus *bus, int b);
 int sd_bus_negotiate_attach_creds(sd_bus *bus, int b);
-int sd_bus_negotiate_attach_names(sd_bus *bus, int b);
 int sd_bus_negotiate_attach_comm(sd_bus *bus, int b);
 int sd_bus_negotiate_attach_exe(sd_bus *bus, int b);
 int sd_bus_negotiate_attach_cmdline(sd_bus *bus, int b);