From 6d736bd09947707b0d8fe2f5eb148020acaf3bd3 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 18 Nov 2020 10:52:22 +0800 Subject: [PATCH] more code --- src/common/inc/tglobal.h | 18 +++++++++--------- src/os/src/detail/osFile.c | 4 ++-- tests/examples/rust | 1 - 3 files changed, 11 insertions(+), 12 deletions(-) delete mode 160000 tests/examples/rust diff --git a/src/common/inc/tglobal.h b/src/common/inc/tglobal.h index d3bd29a016..83b3a5ed89 100644 --- a/src/common/inc/tglobal.h +++ b/src/common/inc/tglobal.h @@ -193,15 +193,15 @@ extern SDiskCfg tsDiskCfg[]; #define NEEDTO_COMPRESSS_MSG(size) (tsCompressMsgSize != -1 && (size) > tsCompressMsgSize) -void taosInitGlobalCfg(); -bool taosCheckGlobalCfg(); -void taosSetAllDebugFlag(); -bool taosCfgDynamicOptions(char *msg); -int taosGetFqdnPortFromEp(const char *ep, char *fqdn, uint16_t *port); -bool taosCheckBalanceCfgOptions(const char *option, int32_t *vnodeId, int32_t *dnodeId); -void taosAddDataDir(int index, char *v1, int level, int primary); -void taosReadDataDirCfg(char *v1, char *v2, char *v3); -void taosPrintDataDirCfg(); +void taosInitGlobalCfg(); +int32_t taosCheckGlobalCfg(); +void taosSetAllDebugFlag(); +bool taosCfgDynamicOptions(char *msg); +int taosGetFqdnPortFromEp(const char *ep, char *fqdn, uint16_t *port); +bool taosCheckBalanceCfgOptions(const char *option, int32_t *vnodeId, int32_t *dnodeId); +void taosAddDataDir(int index, char *v1, int level, int primary); +void taosReadDataDirCfg(char *v1, char *v2, char *v3); +void taosPrintDataDirCfg(); #ifdef __cplusplus } diff --git a/src/os/src/detail/osFile.c b/src/os/src/detail/osFile.c index 493796bdce..880063df7b 100644 --- a/src/os/src/detail/osFile.c +++ b/src/os/src/detail/osFile.c @@ -132,13 +132,13 @@ ssize_t taosTCopy(char *from, char *to) { if (fidto < 0) goto _err; while (true) { - bytes = taosTRead(fidfrom, buffer, sizeof(buffer)); + bytes = taosRead(fidfrom, buffer, sizeof(buffer)); if (bytes < 0) goto _err; if (bytes == 0) break; size += bytes; - if (taosTWrite(fidto, (void *)buffer, bytes) < bytes) goto _err; + if (taosWrite(fidto, (void *)buffer, bytes) < bytes) goto _err; if (bytes < sizeof(buffer)) break; } diff --git a/tests/examples/rust b/tests/examples/rust deleted file mode 160000 index f2ffd30521..0000000000 --- a/tests/examples/rust +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f2ffd30521b8e8afbc9d25c75f8eeeb6a48bd030 -- GitLab