hks_file_operator.c wf

Signed-off-by: zww <zhuweiwen@huawei.com>
This commit is contained in:
zww 2024-11-11 15:01:04 +08:00
parent 7c95a82b9e
commit af87104bb7

View File

@ -134,6 +134,10 @@ static int32_t FileRead(const char *fileName, uint32_t offset, struct HksBlob *b
(void)memset_s(&fileStat, sizeof(fileStat), 0, sizeof(fileStat));
if (stat(fileName, &fileStat) != 0) {
HKS_LOG_ERRNO("file stat fail,", HKS_ERROR_OPEN_FILE_FAIL);
if (fclose(fp) < 0) {
HKS_LOG_E("failed to close file, errno = 0x%" LOG_PUBLIC "x", errno);
return HKS_ERROR_OPEN_FILE_FAIL;
}
return HKS_ERROR_OPEN_FILE_FAIL;
}
HKS_LOG_I("File ctime: %" LOG_PUBLIC "s, mtime: %" LOG_PUBLIC "s",