TD-1207
This commit is contained in:
parent
1b8fdd4951
commit
d44f08a8d0
|
@ -89,11 +89,12 @@ pid_t getppid(void); /* Get parent PID */
|
||||||
|
|
||||||
/* Path management */
|
/* Path management */
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#if defined(_UTF8_SOURCE) || defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
|
|
||||||
#define realpath realpathU
|
#define realpath realpathU
|
||||||
|
#if defined(_UTF8_SOURCE) || defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
|
||||||
|
// #define realpath realpathU
|
||||||
#define CompactPath CompactPathU
|
#define CompactPath CompactPathU
|
||||||
#else /* _ANSI_SOURCE */
|
#else /* _ANSI_SOURCE */
|
||||||
#define realpath realpathA
|
// #define realpath realpathA
|
||||||
#define CompactPath CompactPathA
|
#define CompactPath CompactPathA
|
||||||
#endif
|
#endif
|
||||||
#endif /* defined(_WIN32) */
|
#endif /* defined(_WIN32) */
|
||||||
|
|
|
@ -59,7 +59,6 @@ char tsLocale[TSDB_LOCALE_LEN] = {0};
|
||||||
char tsCharset[TSDB_LOCALE_LEN] = {0}; // default encode string
|
char tsCharset[TSDB_LOCALE_LEN] = {0}; // default encode string
|
||||||
int8_t tsEnableCoreFile = 0;
|
int8_t tsEnableCoreFile = 0;
|
||||||
int32_t tsMaxBinaryDisplayWidth = 30;
|
int32_t tsMaxBinaryDisplayWidth = 30;
|
||||||
char tsTempDir[TSDB_FILENAME_LEN] = "/tmp/";
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* denote if the server needs to compress response message at the application layer to client, including query rsp,
|
* denote if the server needs to compress response message at the application layer to client, including query rsp,
|
||||||
|
@ -182,6 +181,7 @@ char tsDnodeDir[TSDB_FILENAME_LEN] = {0};
|
||||||
char tsMnodeDir[TSDB_FILENAME_LEN] = {0};
|
char tsMnodeDir[TSDB_FILENAME_LEN] = {0};
|
||||||
char tsDataDir[TSDB_FILENAME_LEN] = {0};
|
char tsDataDir[TSDB_FILENAME_LEN] = {0};
|
||||||
char tsScriptDir[TSDB_FILENAME_LEN] = {0};
|
char tsScriptDir[TSDB_FILENAME_LEN] = {0};
|
||||||
|
char tsTempDir[TSDB_FILENAME_LEN] = "/tmp/";
|
||||||
|
|
||||||
int32_t tsDiskCfgNum = 0;
|
int32_t tsDiskCfgNum = 0;
|
||||||
|
|
||||||
|
|
|
@ -593,7 +593,7 @@ void taosGetDisk() {
|
||||||
tsAvailLogDirGB = (float)(diskSize.avail / unit);
|
tsAvailLogDirGB = (float)(diskSize.avail / unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (taosGetDiskSize("/tmp", &diskSize) == 0) {
|
if (taosGetDiskSize(tsTempDir, &diskSize) == 0) {
|
||||||
tsTotalTmpDirGB = (float)(diskSize.tsize / unit);
|
tsTotalTmpDirGB = (float)(diskSize.tsize / unit);
|
||||||
tsAvailTmpDirectorySpace = (float)(diskSize.avail / unit);
|
tsAvailTmpDirectorySpace = (float)(diskSize.avail / unit);
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,6 +134,11 @@ static bool taosReadDirectoryConfig(SGlobalCfg *cfg, char *input_value) {
|
||||||
|
|
||||||
wordfree(&full_path);
|
wordfree(&full_path);
|
||||||
|
|
||||||
|
char tmp[1025] = {0};
|
||||||
|
if (realpath(option, tmp) != NULL) {
|
||||||
|
strcpy(option, tmp);
|
||||||
|
}
|
||||||
|
|
||||||
int code = taosMkDir(option, 0755);
|
int code = taosMkDir(option, 0755);
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
terrno = TAOS_SYSTEM_ERROR(errno);
|
terrno = TAOS_SYSTEM_ERROR(errno);
|
||||||
|
|
Loading…
Reference in New Issue