From 1f83138df21453cc343504a1562837b7ebfe4aa8 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Mon, 28 Feb 2022 10:42:06 +0800 Subject: [PATCH] tcfg --- include/common/tglobal.h | 1 - include/dnode/mgmt/dnode.h | 1 - include/libs/tfs/tfs.h | 2 +- include/util/tcfg.h | 35 ----------------------------------- include/util/tdef.h | 6 ++++++ source/util/src/tconfig.c | 1 - 6 files changed, 7 insertions(+), 39 deletions(-) delete mode 100644 include/util/tcfg.h diff --git a/include/common/tglobal.h b/include/common/tglobal.h index a6cd04e006..40999c453c 100644 --- a/include/common/tglobal.h +++ b/include/common/tglobal.h @@ -20,7 +20,6 @@ extern "C" { #endif -#include "tcfg.h" #include "tdef.h" #include "tarray.h" diff --git a/include/dnode/mgmt/dnode.h b/include/dnode/mgmt/dnode.h index bb0f66ca09..068e9a6917 100644 --- a/include/dnode/mgmt/dnode.h +++ b/include/dnode/mgmt/dnode.h @@ -17,7 +17,6 @@ #define _TD_DNODE_H_ #include "tdef.h" -#include "tcfg.h" #ifdef __cplusplus extern "C" { diff --git a/include/libs/tfs/tfs.h b/include/libs/tfs/tfs.h index 289cfd9b04..b6d10c81bf 100644 --- a/include/libs/tfs/tfs.h +++ b/include/libs/tfs/tfs.h @@ -16,7 +16,7 @@ #ifndef _TD_TFS_H_ #define _TD_TFS_H_ -#include "tcfg.h" +#include "tdef.h" #ifdef __cplusplus extern "C" { diff --git a/include/util/tcfg.h b/include/util/tcfg.h deleted file mode 100644 index 7ccfd4b0f5..0000000000 --- a/include/util/tcfg.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. - * - * This program is free software: you can use, redistribute, and/or modify - * it under the terms of the GNU Affero General Public License, version 3 - * or later ("AGPL"), as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -#ifndef _TD_COMMON_CFG_H_ -#define _TD_COMMON_CFG_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "tdef.h" - -typedef struct { - char dir[TSDB_FILENAME_LEN]; - int level; - int primary; -} SDiskCfg; - -#ifdef __cplusplus -} -#endif - -#endif /*_TD_COMMON_CFG_H_*/ diff --git a/include/util/tdef.h b/include/util/tdef.h index d0f2b77f1f..b4795a0ecf 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -410,6 +410,12 @@ typedef enum ELogicConditionType { enum { TRANS_STAT_INIT = 0, TRANS_STAT_EXECUTING, TRANS_STAT_EXECUTED, TRANS_STAT_ROLLBACKING, TRANS_STAT_ROLLBACKED }; enum { TRANS_OPER_INIT = 0, TRANS_OPER_EXECUTE, TRANS_OPER_ROLLBACK }; +typedef struct { + char dir[TSDB_FILENAME_LEN]; + int level; + int primary; +} SDiskCfg; + #ifdef __cplusplus } #endif diff --git a/source/util/src/tconfig.c b/source/util/src/tconfig.c index dc9fa33595..bb86c9389c 100644 --- a/source/util/src/tconfig.c +++ b/source/util/src/tconfig.c @@ -16,7 +16,6 @@ #define _DEFAULT_SOURCE #include "tconfig.h" #include "taoserror.h" -#include "tcfg.h" #include "thash.h" #include "tutil.h" #include "tlog.h" -- GitLab