Update version number to 2.0.0 and update release notes (#3327)

And enable code format check for wasm_export.h and add '\n' in os_printf
in sgx platform source files.
This commit is contained in:
Wenyong Huang
2024-04-20 10:16:34 +08:00
committed by GitHub
parent 8253c417a8
commit e7a8b3e743
5 changed files with 168 additions and 82 deletions

View File

@ -350,7 +350,7 @@ ipfs_fopen(int fd, int flags)
errno = __WASI_ECANCELED;
sgx_fclose(sgx_file);
os_printf("An error occurred while inserting the IPFS file pointer in "
"the map.");
"the map.\n");
return NULL;
}
@ -529,4 +529,4 @@ ipfs_ftruncate(int fd, off_t len)
return 0;
}
#endif /* end of WASM_ENABLE_SGX_IPFS */
#endif /* end of WASM_ENABLE_SGX_IPFS */

View File

@ -154,8 +154,8 @@ os_mmap(void *hint, size_t size, int prot, int flags, os_file_handle file)
ret = sgx_alloc_rsrv_mem(aligned_size);
if (ret == NULL) {
os_printf("os_mmap(size=%u, aligned size=%lu, prot=0x%x) failed.", size,
aligned_size, prot);
os_printf("os_mmap(size=%u, aligned size=%lu, prot=0x%x) failed.\n",
size, aligned_size, prot);
return NULL;
}
@ -168,7 +168,7 @@ os_mmap(void *hint, size_t size, int prot, int flags, os_file_handle file)
st = sgx_tprotect_rsrv_mem(ret, aligned_size, mprot);
if (st != SGX_SUCCESS) {
os_printf("os_mmap(size=%u, prot=0x%x) failed to set protect.", size,
os_printf("os_mmap(size=%u, prot=0x%x) failed to set protect.\n", size,
prot);
sgx_free_rsrv_mem(ret, aligned_size);
return NULL;
@ -205,7 +205,8 @@ os_mprotect(void *addr, size_t size, int prot)
mprot |= SGX_PROT_EXEC;
st = sgx_tprotect_rsrv_mem(addr, aligned_size, mprot);
if (st != SGX_SUCCESS)
os_printf("os_mprotect(addr=0x%" PRIx64 ", size=%u, prot=0x%x) failed.",
os_printf("os_mprotect(addr=0x%" PRIx64
", size=%u, prot=0x%x) failed.\n",
(uintptr_t)addr, size, prot);
return (st == SGX_SUCCESS ? 0 : -1);