Summary:
1.Add configuration to allocate memory from the specified section
2.Replace all memory operations (kmm_) in the vfs with
fs_heap_. When FS_HEAPSIZE > 0, memory is requested for the file system by specifying a configured heap location. By default (i.e. FS_HEAPSIZE=0) fs_heap_ is equivalent to kmm_
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
1. Don't handle invalid or empty pte entries
num_partition_entries field in GPT typically means number of maximum entries
and not the number of used entries. Empty entries are indentified with
"0" partition type guid. Loop through all the entries
2. Fix the GPT partition size calculation
"ending_lba" is included in the partition, it is not the start of the next one.
Thus the correct size of the partition is end-start+1
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
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>
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>