aboutsummaryrefslogtreecommitdiff
path: root/util-linux/volume_id/lvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/volume_id/lvm.c')
-rw-r--r--util-linux/volume_id/lvm.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/util-linux/volume_id/lvm.c b/util-linux/volume_id/lvm.c
index baa8456db..f9f9395db 100644
--- a/util-linux/volume_id/lvm.c
+++ b/util-linux/volume_id/lvm.c
@@ -33,7 +33,6 @@ struct lvm2_super_block {
33} __attribute__((packed)); 33} __attribute__((packed));
34 34
35#define LVM1_SB_OFF 0x400 35#define LVM1_SB_OFF 0x400
36#define LVM1_MAGIC "HM"
37 36
38int volume_id_probe_lvm1(struct volume_id *id, uint64_t off) 37int volume_id_probe_lvm1(struct volume_id *id, uint64_t off)
39{ 38{
@@ -48,11 +47,11 @@ int volume_id_probe_lvm1(struct volume_id *id, uint64_t off)
48 47
49 lvm = (struct lvm1_super_block *) buf; 48 lvm = (struct lvm1_super_block *) buf;
50 49
51 if (memcmp(lvm->id, LVM1_MAGIC, 2) != 0) 50 if (lvm->id[0] != 'H' || lvm->id[1] != 'M')
52 return -1; 51 return -1;
53 52
54 volume_id_set_usage(id, VOLUME_ID_RAID); 53// volume_id_set_usage(id, VOLUME_ID_RAID);
55 id->type = "LVM1_member"; 54// id->type = "LVM1_member";
56 55
57 return 0; 56 return 0;
58} 57}
@@ -83,9 +82,9 @@ int volume_id_probe_lvm2(struct volume_id *id, uint64_t off)
83 return -1; 82 return -1;
84 83
85 found: 84 found:
86 memcpy(id->type_version, lvm->type, 8); 85// memcpy(id->type_version, lvm->type, 8);
87 volume_id_set_usage(id, VOLUME_ID_RAID); 86// volume_id_set_usage(id, VOLUME_ID_RAID);
88 id->type = "LVM2_member"; 87// id->type = "LVM2_member";
89 88
90 return 0; 89 return 0;
91} 90}