fix: 告警修复
Signed-off-by: arvinzzz <zhaotianyu9@huawei.com> Change-Id: Iaec45e835737c0ae7eea88408b2a1a4a79f1a40c
This commit is contained in:
@@ -92,6 +92,9 @@ STATIC UINT32 OsExcSaveIntStatus(UINT32 type, VOID *arg)
|
||||
/* save IRQ Priority reg group */
|
||||
ret = memcpy_s(g_excContent, excContentEnd - (UINTPTR)g_excContent,
|
||||
(const VOID *)OS_NVIC_PRI_BASE, OS_NVIC_INT_PRI_SIZE);
|
||||
if (ret != EOK) {
|
||||
return LOS_NOK;
|
||||
}
|
||||
g_excContent = (UINT8 *)g_excContent + OS_NVIC_INT_PRI_SIZE;
|
||||
|
||||
/* save Exception Priority reg group */
|
||||
@@ -294,5 +297,3 @@ VOID OsExcMsgDumpInit(VOID)
|
||||
(VOID)LOS_RegExcHook(EXC_INTERRUPT, (ExcHookFn)OsExcMsgDump);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -910,7 +910,7 @@ int LOS_Open(const char *path, int flags, ...)
|
||||
{
|
||||
#ifdef LOSCFG_RANDOM_DEV
|
||||
unsigned flagMask = O_RDONLY | O_WRONLY | O_RDWR | O_APPEND | O_CREAT | O_LARGEFILE | O_TRUNC | O_EXCL | O_DIRECTORY;
|
||||
if ((unsigned)flags & ~flagMask) {
|
||||
if (((unsigned)flags & ~flagMask) || (path == NULL)) {
|
||||
errno = EINVAL;
|
||||
return LOS_NOK;
|
||||
}
|
||||
@@ -952,7 +952,7 @@ int LOS_Open(const char *path, int flags, ...)
|
||||
FREE_AND_SET_NULL(canonicalPath);
|
||||
#endif
|
||||
#if (LOSCFG_POSIX_PIPE_API == 1)
|
||||
if ((path != NULL) && !strncmp(path, PIPE_DEV_PATH, strlen(PIPE_DEV_PATH))) {
|
||||
if (!strncmp(path, PIPE_DEV_PATH, strlen(PIPE_DEV_PATH))) {
|
||||
return PipeOpen(path, flags, PIPE_DEV_FD);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -171,7 +171,7 @@ int LOS_FsMount(const char *source, const char *target,
|
||||
ret = mp->mFs->fsMops->mount(mp, mountflags, data);
|
||||
if (ret != 0) {
|
||||
/* errno is set */
|
||||
PRINT_ERR("mount failed, source %s, target %s.\n", source, target);
|
||||
PRINT_ERR("mount failed, target %s.\n", target);
|
||||
goto errout;
|
||||
}
|
||||
mp->mRefs = 0;
|
||||
|
||||
@@ -54,7 +54,7 @@ STATIC INLINE VOID SetErrno(INT32 errcode)
|
||||
STATIC INLINE VOID SetErr(INT32 errcode, const CHAR *errMessage)
|
||||
{
|
||||
SetErrno(errcode);
|
||||
PRINTK(errMessage);
|
||||
PRINTK("%s", errMessage);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -130,7 +130,7 @@ STATIC CHAR *OsLsGetFullpath(const CHAR *path, struct dirent *pdirent)
|
||||
goto exit_with_nomem;
|
||||
}
|
||||
|
||||
ret = snprintf_s(fullpath, pathLen, pathLen, "%s/%s", path, pdirent->d_name);
|
||||
ret = snprintf_s(fullpath, pathLen, pathLen - 1, "%s/%s", path, pdirent->d_name);
|
||||
if (ret < 0) {
|
||||
free(fullpath);
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user