From 27a52360bd8b9d49d7b8dec52c35f71850bc1cea Mon Sep 17 00:00:00 2001 From: yangyanjun Date: Mon, 10 Oct 2022 14:03:35 +0800 Subject: [PATCH] =?UTF-8?q?check=20nip=20enable=E5=87=BD=E6=95=B0=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=A1=E6=81=AF=E5=8F=98=E6=9B=B4=EF=BC=8Ctools?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E5=A2=9E=E5=8A=A0license=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangyanjun --- LICENSE | 1 + examples/check_nip_enable.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index c639838..2fa9023 100644 --- a/LICENSE +++ b/LICENSE @@ -4,6 +4,7 @@ Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. The code/linux/ subdirectorie is licensed under the GPL V2 License. The code/ommon/ subdirectorie is licensed under 3-Clause BSD License. The examples/ subdirectorie is licensed under 3-Clause BSD License. +The tools/ subdirectorie is licensed under the GPL V2 License. a) GNU General Public License version 2, (https://opensource.org/licenses/GPL-2.0) This library is free software; you can redistribute it and/or diff --git a/examples/check_nip_enable.c b/examples/check_nip_enable.c index 3f96b30..88bf421 100644 --- a/examples/check_nip_enable.c +++ b/examples/check_nip_enable.c @@ -62,8 +62,10 @@ void _check_nip_enable(void) int check_nip_enable(void) { - if (g_nip_enable == NIP_ENABLE_INVALID) + if (g_nip_enable == NIP_ENABLE_INVALID) { _check_nip_enable(); + g_nip_enable = (g_nip_enable == 1 ? 1 : 0); + } return g_nip_enable; } @@ -72,7 +74,10 @@ int main(int argc, char **argv) { int af_ninet = check_nip_enable(); - printf("nip_enable=%d\n\n", g_nip_enable); + if (g_nip_enable) + printf("Support NewIP.\n\n"); + else + printf("Not support NewIP.\n\n"); return 0; }