fs/romfs: Align up the file size to 16 bytes

and set volume size to 96 bytes in romfs_mkfs

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2024-07-28 15:33:40 +08:00
committed by GUIDINGLI
parent 7814c40a99
commit 322765b442
+3 -3
View File
@@ -650,7 +650,7 @@ static int romfs_cachenode(FAR struct romfs_mountpt_s *rm,
uint32_t totalsize = ROMFS_ALIGNUP(ROMFS_FHDR_NAME + nsize + 1);
if (offset == origoffset)
{
totalsize += size;
totalsize += ROMFS_ALIGNUP(size);
}
rm->rm_volsize += totalsize;
@@ -1463,9 +1463,9 @@ int romfs_mkfs(FAR struct romfs_mountpt_s *rm)
romfs_devmemcpy(rm, ROMFS_VHDR_ROM1FS, ROMFS_VHDR_MAGIC, ROMFS_VHDR_SIZE);
/* Init the ROMFS volume to zero */
/* Init the ROMFS volume size */
romfs_devwrite32(rm, ROMFS_VHDR_SIZE, 0);
romfs_devwrite32(rm, ROMFS_VHDR_SIZE, 0x60);
/* Write the volume name */