From 6958f3abfca79070ecc391aa55c304696e27a65b Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 14 Apr 2022 13:44:40 +0800 Subject: [PATCH] refact(cluster): node mgmt --- include/dnode/mnode/mnode.h | 6 ++++++ source/dnode/mgmt/exe/dmMain.c | 3 +-- source/dnode/mgmt/interface/inc/dmDef.h | 1 + source/dnode/mnode/impl/inc/mndGrant.h | 1 - source/dnode/mnode/impl/src/mndGrant.c | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/include/dnode/mnode/mnode.h b/include/dnode/mnode/mnode.h index 1d5ed1b6d2..9e5f8a4ddd 100644 --- a/include/dnode/mnode/mnode.h +++ b/include/dnode/mnode/mnode.h @@ -103,6 +103,12 @@ int32_t mndRetriveAuth(SMnode *pMnode, char *user, char *spi, char *encrypt, cha */ int32_t mndProcessMsg(SNodeMsg *pMsg); +/** + * @brief Generate machine code + * + */ +void mndGenerateMachineCode(); + #ifdef __cplusplus } #endif diff --git a/source/dnode/mgmt/exe/dmMain.c b/source/dnode/mgmt/exe/dmMain.c index 7e32a2f093..3f5c22dd84 100644 --- a/source/dnode/mgmt/exe/dmMain.c +++ b/source/dnode/mgmt/exe/dmMain.c @@ -16,7 +16,6 @@ #define _DEFAULT_SOURCE #include "dmImp.h" #include "tconfig.h" -#include "mndGrant.h" static struct { bool dumpConfig; @@ -90,7 +89,7 @@ static int32_t dmParseArgs(int32_t argc, char const *argv[]) { return 0; } -static void dmGenerateGrant() { parseGrantParameter(); } +static void dmGenerateGrant() { mndGenerateMachineCode(); } static void dmPrintVersion() { #ifdef TD_ENTERPRISE diff --git a/source/dnode/mgmt/interface/inc/dmDef.h b/source/dnode/mgmt/interface/inc/dmDef.h index 594eb22195..c0c33570db 100644 --- a/source/dnode/mgmt/interface/inc/dmDef.h +++ b/source/dnode/mgmt/interface/inc/dmDef.h @@ -36,6 +36,7 @@ #include "tworker.h" #include "dnode.h" +#include "mnode.h" #include "monitor.h" #ifdef __cplusplus diff --git a/source/dnode/mnode/impl/inc/mndGrant.h b/source/dnode/mnode/impl/inc/mndGrant.h index a2ff5ea6ce..ad3dc7f79d 100644 --- a/source/dnode/mnode/impl/inc/mndGrant.h +++ b/source/dnode/mnode/impl/inc/mndGrant.h @@ -44,7 +44,6 @@ void grantReset(EGrantType grant, uint64_t value); void grantAdd(EGrantType grant, uint64_t value); void grantRestore(EGrantType grant, uint64_t value); -void parseGrantParameter(); #ifdef __cplusplus } #endif diff --git a/source/dnode/mnode/impl/src/mndGrant.c b/source/dnode/mnode/impl/src/mndGrant.c index c97d4dd807..99c25299ff 100644 --- a/source/dnode/mnode/impl/src/mndGrant.c +++ b/source/dnode/mnode/impl/src/mndGrant.c @@ -30,4 +30,4 @@ void grantRestore(EGrantType grant, uint64_t value) {} #endif -void parseGrantParameter() { parseGrantParameter(); } \ No newline at end of file +void mndGenerateMachineCode() { grantParseParameter(); } \ No newline at end of file -- GitLab