diff options
Diffstat (limited to 'extras/volume_id/lib/volume_id.c')
-rw-r--r-- | extras/volume_id/lib/volume_id.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/extras/volume_id/lib/volume_id.c b/extras/volume_id/lib/volume_id.c index 8bbbc38c32..48bfd88624 100644 --- a/extras/volume_id/lib/volume_id.c +++ b/extras/volume_id/lib/volume_id.c @@ -219,6 +219,19 @@ int volume_id_get_uuid_raw(struct volume_id *id, const uint8_t **uuid, size_t *l return 1; } +int volume_id_get_uuid_sub(struct volume_id *id, const char **uuid) +{ + if (id == NULL) + return 0; + if (uuid == NULL) + return 0; + if (id->usage_id == VOLUME_ID_UNUSED) + return 0; + + *uuid = id->uuid_sub; + return 1; +} + /** * volume_id_get_usage: * @id: Probing context. |