[systemd-commits] src/libsystemd-bus
Daniel Mack
zonque at kemper.freedesktop.org
Tue Dec 3 05:39:17 PST 2013
src/libsystemd-bus/bus-control.c | 3 ++-
src/libsystemd-bus/kdbus.h | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 89fbb95e03dbaf6762a8d83c7dd544b387e9314e
Author: Daniel Mack <zonque at gmail.com>
Date: Tue Dec 3 14:38:53 2013 +0100
libsystemd-bus: catch up with latest kdbus changes
diff --git a/src/libsystemd-bus/bus-control.c b/src/libsystemd-bus/bus-control.c
index aaddb7d..5cb32ea 100644
--- a/src/libsystemd-bus/bus-control.c
+++ b/src/libsystemd-bus/bus-control.c
@@ -178,10 +178,11 @@ _public_ int sd_bus_list_names(sd_bus *bus, char ***l) {
struct kdbus_name_list *name_list;
struct kdbus_cmd_name *name;
- cmd = malloc0(sizeof(struct kdbus_cmd_name_list *));
+ cmd = malloc0(sizeof(struct kdbus_cmd_name_list));
if (!cmd)
return -ENOMEM;
+ cmd->size = sizeof(struct kdbus_cmd_name_list);
cmd->flags = KDBUS_NAME_LIST_UNIQUE | KDBUS_NAME_LIST_NAMES;
r = ioctl(sd_bus_get_fd(bus), KDBUS_CMD_NAME_LIST, cmd);
diff --git a/src/libsystemd-bus/kdbus.h b/src/libsystemd-bus/kdbus.h
index 09a73fa..1a294f6 100644
--- a/src/libsystemd-bus/kdbus.h
+++ b/src/libsystemd-bus/kdbus.h
@@ -452,6 +452,7 @@ enum {
/**
* struct kdbus_cmd_name_list - request a list of name entries
+ * @size Total size of the struct
* @flags: Flags for the query (KDBUS_NAME_LIST_*)
* @offset: The returned offset in the caller's pool buffer.
* The user must use KDBUS_CMD_FREE to free the
@@ -463,6 +464,7 @@ enum {
* Refer to the documentation for more information.
*/
struct kdbus_cmd_name_list {
+ __u64 size;
__u64 flags;
__u64 offset;
char name[0];
More information about the systemd-commits
mailing list