Compare commits
9 Commits
weekly_202
...
OpenHarmon
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fcd677feba | ||
|
|
c4fd9be138 | ||
|
|
81249a0384 | ||
|
|
8746f5abe5 | ||
|
|
56565beeb6 | ||
|
|
a77aa7de98 | ||
|
|
db8c284cd1 | ||
|
|
b1daca7f82 | ||
|
|
46546688c9 |
@@ -236,6 +236,7 @@ static int FatfsErrno(int result)
|
||||
|
||||
char * GetLdPath(const char *source)
|
||||
{
|
||||
#define LDPATH_PAD 2 // 2 means: strlen("/") + len of '\0'
|
||||
int ret;
|
||||
int partId = GetPartIdByPartName(source);
|
||||
if ((partId < 0) || (partId >= MAX_PARTITION_NUM)) {
|
||||
@@ -243,16 +244,16 @@ char * GetLdPath(const char *source)
|
||||
}
|
||||
|
||||
char *volPath = g_volPath[partId];
|
||||
char *ldPath = (char *)malloc(strlen(volPath) + 1);
|
||||
char *ldPath = (char *)malloc(strlen(volPath) + LDPATH_PAD);
|
||||
if (ldPath == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
(void)memset_s(ldPath, strlen(volPath) + 1, 0, strlen(volPath) + 1);
|
||||
(void)memset_s(ldPath, strlen(volPath) + LDPATH_PAD, 0, strlen(volPath) + LDPATH_PAD);
|
||||
|
||||
/* Convert volPath to ldpath, for example, convert "inner" to "/inner" */
|
||||
*ldPath = '/';
|
||||
ret = strcpy_s(ldPath + 1, strlen(volPath), volPath);
|
||||
ret = strcpy_s(ldPath + 1, strlen(volPath)+1, volPath);
|
||||
if (ret != EOK) {
|
||||
free(ldPath);
|
||||
return NULL;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2022 Huawei Device Co., Ltd. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
@@ -196,7 +196,7 @@ LITE_OS_SEC_TEXT_MINOR VOID OsCmdAscendingInsert(CmdItemNode *cmd)
|
||||
}
|
||||
|
||||
for (cmdItem = LOS_DL_LIST_ENTRY((&cmdInfo.cmdList.list)->pstPrev, CmdItemNode, list);
|
||||
&cmdItem->list != &(cmdInfo.cmdList.list); ) {
|
||||
&cmdItem->list != &(cmdInfo.cmdList.list);) {
|
||||
cmdNext = LOS_DL_LIST_ENTRY(cmdItem->list.pstPrev, CmdItemNode, list);
|
||||
if (&cmdNext->list != &(cmdInfo.cmdList.list)) {
|
||||
if ((strncmp(cmdItem->cmd->cmdKey, cmd->cmd->cmdKey, strlen(cmd->cmd->cmdKey)) >= 0) &&
|
||||
|
||||
@@ -35,4 +35,10 @@
|
||||
|
||||
#define O_NDELAY _FNDELAY
|
||||
|
||||
#ifdef __riscv
|
||||
#ifndef O_CLOEXEC
|
||||
#define O_CLOEXEC 02000000
|
||||
#endif
|
||||
#endif /* __riscv */
|
||||
|
||||
#endif /* !_ADAPT_SYS_FCNTL_H */
|
||||
|
||||
@@ -37,4 +37,38 @@
|
||||
|
||||
#include_next <time.h>
|
||||
|
||||
#ifdef __riscv
|
||||
#ifndef CLOCK_MONOTONIC_RAW
|
||||
#define CLOCK_MONOTONIC_RAW 12
|
||||
#endif
|
||||
|
||||
#ifndef CLOCK_REALTIME_COARSE
|
||||
#define CLOCK_REALTIME_COARSE 5
|
||||
#endif
|
||||
|
||||
#ifndef CLOCK_MONOTONIC_COARSE
|
||||
#define CLOCK_MONOTONIC_COARSE 6
|
||||
#endif
|
||||
|
||||
#ifndef CLOCK_BOOTTIME
|
||||
#define CLOCK_BOOTTIME 7
|
||||
#endif
|
||||
|
||||
#ifndef CLOCK_REALTIME_ALARM
|
||||
#define CLOCK_REALTIME_ALARM 8
|
||||
#endif
|
||||
|
||||
#ifndef CLOCK_BOOTTIME_ALARM
|
||||
#define CLOCK_BOOTTIME_ALARM 9
|
||||
#endif
|
||||
|
||||
#ifndef CLOCK_SGI_CYCLE
|
||||
#define CLOCK_SGI_CYCLE 10
|
||||
#endif
|
||||
|
||||
#ifndef CLOCK_TAI
|
||||
#define CLOCK_TAI 11
|
||||
#endif
|
||||
#endif /* __riscv */
|
||||
|
||||
#endif /* !_ADAPT_TIME_H */
|
||||
|
||||
@@ -63,7 +63,6 @@ hctest_suite("PosixTest") {
|
||||
|
||||
include_dirs = [
|
||||
"//test/xts/tools/hctest/include",
|
||||
"//third_party/unity/src",
|
||||
"src",
|
||||
]
|
||||
cflags = [ "-Wno-error" ]
|
||||
|
||||
Reference in New Issue
Block a user