Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1f003739
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
1f003739
编写于
12月 30, 2021
作者:
wafwerar
提交者:
GitHub
12月 30, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-345]<fix>(other): win taosd start error. (#9512)
上级
c77b844d
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
21 addition
and
17 deletion
+21
-17
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+1
-1
src/dnode/src/dnodeMain.c
src/dnode/src/dnodeMain.c
+1
-1
src/dnode/src/dnodeTelemetry.c
src/dnode/src/dnodeTelemetry.c
+1
-1
src/inc/tfs.h
src/inc/tfs.h
+1
-1
src/os/src/detail/osRand.c
src/os/src/detail/osRand.c
+1
-1
src/os/src/detail/osSysinfo.c
src/os/src/detail/osSysinfo.c
+1
-1
src/os/src/linux/linuxEnv.c
src/os/src/linux/linuxEnv.c
+1
-1
src/rpc/test/rserver.c
src/rpc/test/rserver.c
+1
-1
src/sync/test/syncServer.c
src/sync/test/syncServer.c
+1
-1
src/tfs/src/tfs.c
src/tfs/src/tfs.c
+4
-0
src/tsdb/inc/tsdbFile.h
src/tsdb/inc/tsdbFile.h
+2
-2
src/util/src/tlog.c
src/util/src/tlog.c
+3
-3
src/util/src/tnote.c
src/util/src/tnote.c
+3
-3
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
1f003739
...
...
@@ -433,7 +433,7 @@ int32_t readFromFile(char *name, uint32_t *len, void **buf) {
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
}
int
fd
=
open
(
name
,
O_RDONLY
);
int
fd
=
open
(
name
,
O_RDONLY
|
O_BINARY
);
if
(
fd
<
0
)
{
tscError
(
"open file %s failed, error:%s"
,
name
,
strerror
(
errno
));
tfree
(
*
buf
);
...
...
src/dnode/src/dnodeMain.c
浏览文件 @
1f003739
...
...
@@ -240,7 +240,7 @@ static void dnodeCheckDataDirOpenned(char *dir) {
char
filepath
[
256
]
=
{
0
};
sprintf
(
filepath
,
"%s/.running"
,
dir
);
int
fd
=
open
(
filepath
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
int
fd
=
open
(
filepath
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
|
O_BINARY
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
if
(
fd
<
0
)
{
dError
(
"failed to open lock file:%s, reason: %s, quit"
,
filepath
,
strerror
(
errno
));
exit
(
0
);
...
...
src/dnode/src/dnodeTelemetry.c
浏览文件 @
1f003739
...
...
@@ -266,7 +266,7 @@ static void* telemetryThread(void* param) {
}
static
void
dnodeGetEmail
(
char
*
filepath
)
{
int32_t
fd
=
open
(
filepath
,
O_RDONLY
);
int32_t
fd
=
open
(
filepath
,
O_RDONLY
|
O_BINARY
);
if
(
fd
<
0
)
{
return
;
}
...
...
src/inc/tfs.h
浏览文件 @
1f003739
...
...
@@ -70,7 +70,7 @@ typedef struct {
#define TFILE_NAME(pf) ((pf)->aname)
#define TFILE_REL_NAME(pf) ((pf)->rname)
#define tfsopen(pf, flags) open(TFILE_NAME(pf), flags)
#define tfsopen(pf, flags) open(TFILE_NAME(pf), flags
| O_BINARY
)
#define tfsclose(fd) close(fd)
#define tfsremove(pf) remove(TFILE_NAME(pf))
#define tfscopy(sf, df) taosCopy(TFILE_NAME(sf), TFILE_NAME(df))
...
...
src/os/src/detail/osRand.c
浏览文件 @
1f003739
...
...
@@ -22,7 +22,7 @@ uint32_t taosSafeRand(void) {
int
fd
;
int
seed
;
fd
=
open
(
"/dev/urandom"
,
0
);
fd
=
open
(
"/dev/urandom"
,
0
|
O_BINARY
);
if
(
fd
<
0
)
{
seed
=
(
int
)
time
(
0
);
}
else
{
...
...
src/os/src/detail/osSysinfo.c
浏览文件 @
1f003739
...
...
@@ -713,7 +713,7 @@ bool taosGetSystemUid(char *uid) {
int
fd
;
int
len
=
0
;
fd
=
open
(
"/proc/sys/kernel/random/uuid"
,
0
);
fd
=
open
(
"/proc/sys/kernel/random/uuid"
,
0
|
O_BINARY
);
if
(
fd
<
0
)
{
return
false
;
}
else
{
...
...
src/os/src/linux/linuxEnv.c
浏览文件 @
1f003739
...
...
@@ -72,7 +72,7 @@ char* taosGetCmdlineByPID(int pid) {
static
char
cmdline
[
1024
];
sprintf
(
cmdline
,
"/proc/%d/cmdline"
,
pid
);
int
fd
=
open
(
cmdline
,
O_RDONLY
);
int
fd
=
open
(
cmdline
,
O_RDONLY
|
O_BINARY
);
if
(
fd
>=
0
)
{
int
n
=
read
(
fd
,
cmdline
,
sizeof
(
cmdline
)
-
1
);
if
(
n
<
0
)
n
=
0
;
...
...
src/rpc/test/rserver.c
浏览文件 @
1f003739
...
...
@@ -172,7 +172,7 @@ int main(int argc, char *argv[]) {
tInfo
(
"RPC server is running, ctrl-c to exit"
);
if
(
commit
)
{
dataFd
=
open
(
dataName
,
O_APPEND
|
O_CREAT
|
O_WRONLY
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
dataFd
=
open
(
dataName
,
O_APPEND
|
O_CREAT
|
O_WRONLY
|
O_BINARY
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
if
(
dataFd
<
0
)
tInfo
(
"failed to open data file, reason:%s"
,
strerror
(
errno
));
}
...
...
src/sync/test/syncServer.c
浏览文件 @
1f003739
...
...
@@ -43,7 +43,7 @@ int writeIntoWal(SWalHead *pHead) {
char
walName
[
280
];
snprintf
(
walName
,
sizeof
(
walName
),
"%s/wal/wal.%d"
,
path
,
walNum
);
(
void
)
remove
(
walName
);
dataFd
=
open
(
walName
,
O_CREAT
|
O_WRONLY
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
dataFd
=
open
(
walName
,
O_CREAT
|
O_WRONLY
|
O_BINARY
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
if
(
dataFd
<
0
)
{
uInfo
(
"failed to open wal file:%s(%s)"
,
walName
,
strerror
(
errno
));
return
-
1
;
...
...
src/tfs/src/tfs.c
浏览文件 @
1f003739
...
...
@@ -498,7 +498,11 @@ static int tfsFormatDir(char *idir, char *odir) {
}
char
tmp
[
PATH_MAX
]
=
{
0
};
#ifdef WINDOWS
if
(
_fullpath
(
tmp
,
wep
.
we_wordv
[
0
],
PATH_MAX
)
==
NULL
)
{
#else
if
(
realpath
(
wep
.
we_wordv
[
0
],
tmp
)
==
NULL
)
{
#endif
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
wordfree
(
&
wep
);
return
-
1
;
...
...
src/tsdb/inc/tsdbFile.h
浏览文件 @
1f003739
...
...
@@ -89,7 +89,7 @@ static FORCE_INLINE void tsdbSetMFileInfo(SMFile* pMFile, SMFInfo* pInfo) { pMFi
static
FORCE_INLINE
int
tsdbOpenMFile
(
SMFile
*
pMFile
,
int
flags
)
{
ASSERT
(
TSDB_FILE_CLOSED
(
pMFile
));
pMFile
->
fd
=
open
(
TSDB_FILE_FULL_NAME
(
pMFile
),
flags
);
pMFile
->
fd
=
open
(
TSDB_FILE_FULL_NAME
(
pMFile
),
flags
|
O_BINARY
);
if
(
pMFile
->
fd
<
0
)
{
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
return
-
1
;
...
...
@@ -204,7 +204,7 @@ static FORCE_INLINE void tsdbSetDFileInfo(SDFile* pDFile, SDFInfo* pInfo) { pDFi
static
FORCE_INLINE
int
tsdbOpenDFile
(
SDFile
*
pDFile
,
int
flags
)
{
ASSERT
(
!
TSDB_FILE_OPENED
(
pDFile
));
pDFile
->
fd
=
open
(
TSDB_FILE_FULL_NAME
(
pDFile
),
flags
);
pDFile
->
fd
=
open
(
TSDB_FILE_FULL_NAME
(
pDFile
),
flags
|
O_BINARY
);
if
(
pDFile
->
fd
<
0
)
{
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
return
-
1
;
...
...
src/util/src/tlog.c
浏览文件 @
1f003739
...
...
@@ -191,7 +191,7 @@ static void *taosThreadToOpenNewFile(void *param) {
umask
(
0
);
int32_t
fd
=
open
(
name
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
int32_t
fd
=
open
(
name
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
|
O_BINARY
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
if
(
fd
<
0
)
{
tsLogObj
.
openInProgress
=
0
;
tsLogObj
.
lines
=
tsLogObj
.
maxLines
-
1000
;
...
...
@@ -252,7 +252,7 @@ void taosResetLog() {
}
static
bool
taosCheckFileIsOpen
(
char
*
logFileName
)
{
int32_t
fd
=
open
(
logFileName
,
O_WRONLY
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
int32_t
fd
=
open
(
logFileName
,
O_WRONLY
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
|
O_BINARY
);
if
(
fd
<
0
)
{
if
(
errno
==
ENOENT
)
{
return
false
;
...
...
@@ -340,7 +340,7 @@ static int32_t taosOpenLogFile(char *fn, int32_t maxLines, int32_t maxFileNum) {
pthread_mutex_init
(
&
tsLogObj
.
logMutex
,
NULL
);
umask
(
0
);
tsLogObj
.
logHandle
->
fd
=
open
(
fileName
,
O_WRONLY
|
O_CREAT
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
tsLogObj
.
logHandle
->
fd
=
open
(
fileName
,
O_WRONLY
|
O_CREAT
|
O_BINARY
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
if
(
tsLogObj
.
logHandle
->
fd
<
0
)
{
printf
(
"
\n
failed to open log file:%s, reason:%s
\n
"
,
fileName
,
strerror
(
errno
));
...
...
src/util/src/tnote.c
浏览文件 @
1f003739
...
...
@@ -92,7 +92,7 @@ static void *taosThreadToOpenNewNote(void *param) {
umask
(
0
);
int32_t
fd
=
open
(
name
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
int32_t
fd
=
open
(
name
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
|
O_BINARY
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
if
(
fd
<
0
)
{
return
NULL
;
}
...
...
@@ -132,7 +132,7 @@ static int32_t taosOpenNewNote(SNoteObj *pNote) {
}
static
bool
taosCheckNoteIsOpen
(
char
*
noteName
,
SNoteObj
*
pNote
)
{
int32_t
fd
=
open
(
noteName
,
O_WRONLY
|
O_CREAT
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
int32_t
fd
=
open
(
noteName
,
O_WRONLY
|
O_CREAT
|
O_BINARY
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
if
(
fd
<
0
)
{
fprintf
(
stderr
,
"failed to open note:%s reason:%s
\n
"
,
noteName
,
strerror
(
errno
));
return
true
;
...
...
@@ -207,7 +207,7 @@ static int32_t taosOpenNoteWithMaxLines(char *fn, int32_t maxLines, int32_t maxN
pthread_mutex_init
(
&
pNote
->
mutex
,
NULL
);
umask
(
0
);
pNote
->
fd
=
open
(
noteName
,
O_WRONLY
|
O_CREAT
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
pNote
->
fd
=
open
(
noteName
,
O_WRONLY
|
O_CREAT
|
O_BINARY
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
if
(
pNote
->
fd
<
0
)
{
fprintf
(
stderr
,
"failed to open note file:%s reason:%s
\n
"
,
noteName
,
strerror
(
errno
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录