diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2007-05-04 16:53:19 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2007-05-04 16:53:19 +0200 |
commit | 444f07fea49bc40207df5e7910907492529b9bce (patch) | |
tree | c54872eaf90a67929db5e87c62938198948b32a3 /extras/volume_id/lib/luks.c | |
parent | ee466b321e5f4bb9f587f65ed05c87a51bc6fef2 (diff) |
volume_id: add internal UUID_STRING
Diffstat (limited to 'extras/volume_id/lib/luks.c')
-rw-r--r-- | extras/volume_id/lib/luks.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/extras/volume_id/lib/luks.c b/extras/volume_id/lib/luks.c index a141a0f5c3..231374e507 100644 --- a/extras/volume_id/lib/luks.c +++ b/extras/volume_id/lib/luks.c @@ -36,10 +36,10 @@ #define LUKS_SALTSIZE 32 #define LUKS_NUMKEYS 8 +#define LUKS_MAGIC_L 6 +#define LUKS_PHDR_SIZE (sizeof(struct luks_phdr)/SECTOR_SIZE+1) +#define UUID_STRING_L 40 static const uint8_t LUKS_MAGIC[] = {'L','U','K','S', 0xba, 0xbe}; -#define LUKS_MAGIC_L 6 -#define LUKS_PHDR_SIZE (sizeof(struct luks_phdr)/SECTOR_SIZE+1) -#define UUID_STRING_L 40 struct luks_phdr { uint8_t magic[LUKS_MAGIC_L]; @@ -74,9 +74,7 @@ int volume_id_probe_luks(struct volume_id *id, uint64_t off, uint64_t size) return -1; volume_id_set_usage(id, VOLUME_ID_CRYPTO); - volume_id_set_uuid(id, header->uuid, UUID_DCE_STRING); - + volume_id_set_uuid(id, header->uuid, 36, UUID_HEX_STRING); id->type = "crypto_LUKS"; - return 0; } |