search for: lvm2_type

Displaying 1 result from an estimated 1 matches for "lvm2_type".

Did you mean: lv_type
2006 Mar 22
0
[patch] Add LVM2 detection to fstype
...cks) +{ + const struct lvm2_super_block *lsb; + int i; + + /* We must check every 512 byte sector */ + for (i = 0; i < BLOCK_SIZE; i += 0x200) { + lsb = (const struct lvm2_super_block *)(buf + i); + + if (!memcmp(lsb->magic, LVM2_MAGIC, LVM2_MAGIC_L) && + !memcmp(lsb->type, LVM2_TYPE, LVM2_TYPE_L)) { + /* This is just one of possibly many PV's */ + *blocks = 0; + return 1; + } + } + + return 0; +} + struct imagetype { off_t block; const char name[12]; @@ -214,6 +235,8 @@ { 0, "romfs", romfs_image }, { 0, "xfs", xfs_image }, { 0, &...