Commit Graph

3 Commits

Author SHA1 Message Date
Jukka Laitinen
ae31cbde09 Fix an overflow in blkcnt_t gpt_last_lba
If CONFIG_FS_LARGEFILE is not defined, the calculation overflows for larger
disks, since blkcnt_t is 32 bits.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-19 15:58:35 +01:00
Jukka Laitinen
8167dd6b06 fs/partition/fs_gpt.c: Fix compilation errors when CONFIG_FS_LARGEFILE is not defined
This fixes some number formatting errors for 64-bit targets
- GPT_HEADER_SIGNATURE is defined as "unsigned long long", so just print it as it is (without PRI macro)
- The size of blkcnt_t depends on CONFIG_FS_LARGEFILE and CONFIG_HAVE_LONG_LONG

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-13 17:46:29 +08:00
Jiuzhu Dong
b5b00c6ba3 fs/partition: support parse gpt partition
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-30 01:24:09 -05:00