X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/58f0877fc16da760e2ed6910648ec67e9afff890..a36758a5018f6a3792c164cd2a313d4f61b7111e:/lunaix-os/kernel/block/blkpart_gpt.c diff --git a/lunaix-os/kernel/block/blkpart_gpt.c b/lunaix-os/kernel/block/blkpart_gpt.c index 1a087af..22bb48b 100644 --- a/lunaix-os/kernel/block/blkpart_gpt.c +++ b/lunaix-os/kernel/block/blkpart_gpt.c @@ -3,6 +3,7 @@ #include #include #include +#include #include @@ -15,6 +16,8 @@ static u8_t NULL_GUID[16] = { 0 }; +LOG_MODULE("GPT") + int blkpart_parse(struct device* master, struct gpt_header* header) { @@ -46,6 +49,11 @@ blkpart_parse(struct device* master, struct gpt_header* header) u64_t slba_local = (ent->start_lba * GPT_BLKSIZE) / bdev->blk_size; u64_t elba_local = (ent->end_lba * GPT_BLKSIZE) / (u64_t)bdev->blk_size; + kprintf("%s: guid part#%d: %d..%d\n", + bdev->bdev_id, + i, + (u32_t)slba_local, + (u32_t)elba_local); // we ignore the partition name, as it rarely used. blk_mount_part(bdev, NULL, i, slba_local, elba_local); } @@ -73,6 +81,7 @@ blkpart_probegpt(struct device* master) u32_t crc = gpt_hdr->hdr_cksum; gpt_hdr->hdr_cksum = 0; if (crc32b((void*)gpt_hdr, sizeof(*gpt_hdr)) != crc) { + kprintf(KWARN "checksum failed\n"); // FUTURE check the backup header return EINVAL; }