return dm_report_field_string(rh, field, &uuid);
}
+static int _dm_mangled_uuid_disp(struct dm_report *rh,
+ struct dm_pool *mem __attribute__((unused)),
+ struct dm_report_field *field,
+ const void *data, void *private __attribute__((unused)))
+{
+ char *uuid;
+ int r = 0;
+
+ if ((uuid = dm_task_get_uuid_mangled((const struct dm_task *) data))) {
+ r = dm_report_field_string(rh, field, (const char * const *) &uuid);
+ dm_free(uuid);
+ }
+
+ return r;
+}
+
+static int _dm_unmangled_uuid_disp(struct dm_report *rh,
+ struct dm_pool *mem __attribute__((unused)),
+ struct dm_report_field *field,
+ const void *data, void *private __attribute__((unused)))
+{
+ char *uuid;
+ int r = 0;
+
+ if ((uuid = dm_task_get_uuid_unmangled((const struct dm_task *) data))) {
+ r = dm_report_field_string(rh, field, (const char * const *) &uuid);
+ dm_free(uuid);
+ }
+
+ return r;
+}
+
static int _dm_read_ahead_disp(struct dm_report *rh,
struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field, const void *data,
FIELD_F(TASK, STR, "MangledName", 16, dm_mangled_name, "mangled_name", "Mangled name of mapped device.")
FIELD_F(TASK, STR, "UnmangledName", 16, dm_unmangled_name, "unmangled_name", "Unmangled name of mapped device.")
FIELD_F(TASK, STR, "UUID", 32, dm_uuid, "uuid", "Unique (optional) identifier for mapped device.")
+FIELD_F(TASK, STR, "MangledUUID", 32, dm_mangled_uuid, "mangled_uuid", "Mangled unique (optional) identifier for mapped device.")
+FIELD_F(TASK, STR, "UnmangledUUID", 32, dm_unmangled_uuid, "unmangled_uuid", "Unmangled unique (optional) identifier for mapped device.")
/* FIXME Next one should be INFO */
FIELD_F(TASK, NUM, "RAhead", 6, dm_read_ahead, "read_ahead", "Read ahead in sectors.")