提交 fd6393f5 编写于 作者: M maoyufeng

Print log to hilogs.

Signed-off-by: Nmaoyufeng <maoyufeng3@huawei.com>
上级 7238290e
......@@ -63,6 +63,7 @@ ohos_shared_library("wpa_client") {
"//drivers/peripheral/wlan/client/include",
"//third_party/bounds_checking_function/include",
"//base/hiviewdfxhilog/interfaces/native/innerkits/include",
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include",
]
cflags = [
......@@ -88,7 +89,10 @@ ohos_shared_library("wpa_client") {
"-DCONFIG_OPEN_HARMONY_PATCH",
]
deps = [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog" ]
deps = [
"//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara",
]
if ("${CONFIG_DRIVER}" == "nl80211") {
include_dirs += [ "$WPA_ROOT_DIR/libnl/include/libnl3" ]
......@@ -270,6 +274,7 @@ ohos_shared_library("wpa") {
"$WPA_ROOT_DIR/src/crypto",
"$WPA_ROOT_DIR/src/eap_common",
"//base/hiviewdfxhilog/interfaces/native/innerkits/include",
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include",
]
cflags = [
......@@ -323,6 +328,7 @@ ohos_shared_library("wpa") {
deps = [
"//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara",
"//drivers/peripheral/wlan/client:wifi_driver_client",
"//third_party/bounds_checking_function:libsec_static",
"//third_party/openssl:libcrypto_static",
......@@ -396,6 +402,7 @@ ohos_executable("wpa_cli") {
"$WPA_ROOT_DIR/wpa_supplicant",
"$WPA_ROOT_DIR/build/include",
"//base/hiviewdfxhilog/interfaces/native/innerkits/include",
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include",
]
cflags = [
......@@ -443,7 +450,10 @@ ohos_executable("wpa_cli") {
]
}
deps = [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog" ]
deps = [
"//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara",
]
configs = [ ":wpa_warnings" ]
part_name = "wpa_supplicant-2.9"
......@@ -470,6 +480,7 @@ ohos_executable("hostapd_cli") {
"$WPA_ROOT_DIR/build/include",
"$WPA_ROOT_DIR/libnl/include/libnl3",
"//base/hiviewdfxhilog/interfaces/native/innerkits/include",
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include",
]
cflags = [
......@@ -508,7 +519,10 @@ ohos_executable("hostapd_cli") {
"-DCONFIG_OPEN_HARMONY_PATCH",
]
deps = [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog" ]
deps = [
"//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara",
]
if ("${CONFIG_DRIVER}" == "nl80211") {
cflags += [
......
......@@ -208,6 +208,7 @@ void wpa_debug_close_linux_tracing(void)
#define LOG_TAG "wpa_supplicant"
#define WPA_MAX_LOG_CHAR 1024
#define WPA_PROP_KEY_DEBUG_ON "persist.sys.wpa_debug_on"
#define PARAM_VALUE_LEN_MAX 10
enum {
WPA_HILOG_UNKNOWN, WPA_HILOG_UNSET, WPA_HILOG_SET
......@@ -244,11 +245,10 @@ static bool wpa_can_hilog()
if (atoi(prop) > 0) {
wpa_debug_hilog_switch = WPA_HILOG_SET;
return true;
} else {
wpa_debug_hilog_switch = WPA_HILOG_UNSET;
return false;
}
}
wpa_debug_hilog_switch = WPA_HILOG_UNSET;
return false;
}
#endif // CONFIG_OPEN_HARMONY_PATCH
......@@ -337,10 +337,9 @@ static void _wpa_hexdump(int level, const char *title, const u8 *buf,
#ifdef CONFIG_WPA_NO_LOG
return;
#else
size_t i;
#ifdef CONFIG_OPEN_HARMONY_PATCH
if (wpa_can_hilog()) {
size_t i;
const char *display;
char *strbuf = NULL;
size_t slen = len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册