From 535be1fa3365f688d4b6a7d49b134e60d67db35f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E6=9C=9B?= Date: Wed, 3 Jul 2024 19:07:33 +0800 Subject: [PATCH] fix:Yellow and blue area difference code synchronization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 姚望 --- tools/device_info/get_device_info.c | 42 ++++++++++++++--------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/tools/device_info/get_device_info.c b/tools/device_info/get_device_info.c index 2b06e13ac..fc5f15987 100644 --- a/tools/device_info/get_device_info.c +++ b/tools/device_info/get_device_info.c @@ -21,28 +21,6 @@ static char const *g_pkgName = "ohos.dsoftbus.tool"; - -static void PrintNodePropertyNum(const NodeBasicInfo *nodeInfo) -{ - NodeDeviceInfoKey key; - key = NODE_KEY_NETWORK_CAPABILITY; - int32_t netCapacity = 0; - if (GetNodeKeyInfo(g_pkgName, nodeInfo->networkId, key, - (uint8_t *)&netCapacity, LNN_COMMON_LEN) != 0) { - printf("GetNodeKeyInfo Fail!\n"); - } else { - printf("netCapacity = %d\n", netCapacity); - } - key = NODE_KEY_NETWORK_TYPE; - int32_t netType = 0; - if (GetNodeKeyInfo(g_pkgName, nodeInfo->networkId, key, - (uint8_t *)&netType, LNN_COMMON_LEN) != 0) { - printf("GetNodeKeyInfo Fail!\n"); - } else { - printf("netType = %d\n", netType); - } -} - static void PrintNodeProperty(const NodeBasicInfo *nodeInfo) { printf("DeviceName = %s\n", nodeInfo->deviceName); @@ -90,6 +68,26 @@ static void PrintNodeProperty(const NodeBasicInfo *nodeInfo) } } +static void PrintNodePropertyNum(const NodeBasicInfo *nodeInfo) +{ + NodeDeviceInfoKey key; + key = NODE_KEY_NETWORK_CAPABILITY; + int32_t netCapacity = 0; + if (GetNodeKeyInfo(g_pkgName, nodeInfo->networkId, key, + (uint8_t *)&netCapacity, LNN_COMMON_LEN) != 0) { + printf("GetNodeKeyInfo Fail!\n"); + } else { + printf("netCapacity = %d\n", netCapacity); + } + key = NODE_KEY_NETWORK_TYPE; + int32_t netType = 0; + if (GetNodeKeyInfo(g_pkgName, nodeInfo->networkId, key, + (uint8_t *)&netType, LNN_COMMON_LEN) != 0) { + printf("GetNodeKeyInfo Fail!\n"); + } else { + printf("netType = %d\n", netType); + } +} int main(int argc __attribute__((unused)), char **argv __attribute__((unused))) {