diff options
-rw-r--r-- | metadata.c | 15 | ||||
-rw-r--r-- | metadata.h | 12 |
2 files changed, 27 insertions, 0 deletions
diff --git a/metadata.c b/metadata.c index b357365ea13..d63726f8b94 100644 --- a/metadata.c +++ b/metadata.c @@ -30,6 +30,10 @@ #include "names.h" #include "metadata.h" +/** + * kdbus_meta_free() - release metadata + * @meta: metadata object + */ void kdbus_meta_free(struct kdbus_meta *meta) { kfree(meta->data); @@ -351,6 +355,17 @@ static int kdbus_meta_append_seclabel(struct kdbus_meta *meta) } #endif +/** + * kdbus_meta_append() - collect metadata from current process + * @meta: metadata object + * @conn current connection + * @which KDBUS_ATTACH_* flags which typ of data to attach + * + * Collect the data specified in flags and allocate or extend + * the buffer in the metadata object. + * + * Returns: 0 on success, or negative errno on failure. + */ int kdbus_meta_append(struct kdbus_meta *meta, struct kdbus_conn *conn, u64 which) diff --git a/metadata.h b/metadata.h index a037b0ef27e..13ee472ba8c 100644 --- a/metadata.h +++ b/metadata.h @@ -12,6 +12,18 @@ #ifndef __KDBUS_METADATA_H #define __KDBUS_METADATA_H +/** + * kdbus_meta - metadata buffer + * @attached flags for already attached data + * @data allocated buffer + * @size number of bytes used + * @allocated size size of buffer + * @src_names list of \0-separated well-known names + * src_names_len length of list + * + * Used to collect and store connection metadata in a pre-compiled + * buffer containing struct kdbus_item. + */ struct kdbus_meta { u64 attached; struct kdbus_item *data; |