From 4714101918dc2c200892e18fecb34965bf5661f0 Mon Sep 17 00:00:00 2001 From: slguan Date: Mon, 10 Feb 2020 21:34:09 +0800 Subject: [PATCH] tstatus.h --- src/util/CMakeLists.txt | 3 ++- src/{vnode/detail/inc/vnodeStatus.h => util/inc/tstatus.h} | 6 ++++-- src/{vnode/detail/src/vnodeStatus.c => util/src/tstatus.c} | 3 +-- 3 files changed, 7 insertions(+), 5 deletions(-) rename src/{vnode/detail/inc/vnodeStatus.h => util/inc/tstatus.h} (98%) rename src/{vnode/detail/src/vnodeStatus.c => util/src/tstatus.c} (99%) diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt index a1672fe8e7..f12cb7830d 100644 --- a/src/util/CMakeLists.txt +++ b/src/util/CMakeLists.txt @@ -1,8 +1,9 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine) -INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/inc) INCLUDE_DIRECTORIES(${TD_OS_DIR}/inc) +INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/inc) +INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/util/inc) IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM)) AUX_SOURCE_DIRECTORY(src SRC) diff --git a/src/vnode/detail/inc/vnodeStatus.h b/src/util/inc/tstatus.h similarity index 98% rename from src/vnode/detail/inc/vnodeStatus.h rename to src/util/inc/tstatus.h index 456304370d..bdcd2e68a2 100644 --- a/src/vnode/detail/inc/vnodeStatus.h +++ b/src/util/inc/tstatus.h @@ -16,11 +16,13 @@ #ifndef TDENGINE_TSTATUS_H #define TDENGINE_TSTATUS_H -#include "taoserror.h" - #ifdef __cplusplus extern "C" { #endif + +#include +#include +#include "taoserror.h" enum _TSDB_VG_STATUS { TSDB_VG_STATUS_READY = TSDB_CODE_SUCCESS, diff --git a/src/vnode/detail/src/vnodeStatus.c b/src/util/src/tstatus.c similarity index 99% rename from src/vnode/detail/src/vnodeStatus.c rename to src/util/src/tstatus.c index d78f3633fb..4c8d7868fd 100644 --- a/src/vnode/detail/src/vnodeStatus.c +++ b/src/util/src/tstatus.c @@ -14,8 +14,7 @@ */ #include "taosmsg.h" -#include "tsdb.h" -#include "vnodeStatus.h" +#include "tstatus.h" const char* taosGetVgroupStatusStr(int32_t vgroupStatus) { switch (vgroupStatus) { -- GitLab