chiark / gitweb /
volume_id: remove deprecated functions and bump major version
[elogind.git] / extras / volume_id / lib / luks.c
index 231374e507f3893271428a83375acc73dcc2bc99..4fb97e3598cdcdfcb9246599aa02fe3d57fe9b79 100644 (file)
@@ -24,6 +24,7 @@
 #include <ctype.h>
 
 #include "libvolume_id.h"
+#include "libvolume_id-private.h"
 #include "util.h"
 
 #define SECTOR_SHIFT                   9
@@ -75,6 +76,7 @@ int volume_id_probe_luks(struct volume_id *id, uint64_t off, uint64_t size)
 
        volume_id_set_usage(id, VOLUME_ID_CRYPTO);
        volume_id_set_uuid(id, header->uuid, 36, UUID_HEX_STRING);
+       snprintf(id->type_version, sizeof(header->version), "%u", le16_to_cpu(header->version));
        id->type = "crypto_LUKS";
        return 0;
 }