!3383 修改et4系统切分位置

Merge pull request !3383 from duxianzhi/file1118
This commit is contained in:
openharmony_ci 2024-11-19 07:41:16 +00:00 committed by Gitee
commit 3c6bb2b53e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -178,15 +178,6 @@ INIT_STATIC uint64_t GetBlockSize(const char *dev)
return blockSize;
}
/* 字节对齐函数基于alignment进行字节对齐 */
INIT_STATIC uint64_t AlignTo(uint64_t base, uint64_t alignment)
{
if (alignment == 0) {
return base;
}
return (((base - 1) / alignment + 1) * alignment);
}
INIT_STATIC int GetMapperAddr(const char *dev, uint64_t *start, uint64_t *length)
{
/* 获取EROFS文件系统大小 */
@ -203,7 +194,7 @@ INIT_STATIC int GetMapperAddr(const char *dev, uint64_t *start, uint64_t *length
*/
uint64_t imgSize = GetImgSize(dev, *start);
if (imgSize > 0) {
*start = AlignTo(imgSize, ALIGN_BLOCK_SIZE);
*start += EXTHDR_BLKSIZE;
}
/* 获取分区大小,老分区布局:分区大小 = 镜像大小 新分区布局:分区大小 = 镜像大小 + 无镜像填充的分区空位 */