From d434ac6a155293d82d425638478953e32bc5e3ce Mon Sep 17 00:00:00 2001 From: Gianni Trevisiol Date: Thu, 3 Aug 2023 13:49:57 -0700 Subject: [PATCH] fix var typo --- include/ebpf_store_helper.h | 2 +- libs/api_common/store_helper_internal.cpp | 2 +- libs/store_helper/ebpf_store_helper.c | 2 +- tests/netebpfext_unit/netebpf_ext_helper.cpp | 2 +- tools/export_program_info/export_program_info.cpp | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/ebpf_store_helper.h b/include/ebpf_store_helper.h index 044a923582..cb00e34f1a 100644 --- a/include/ebpf_store_helper.h +++ b/include/ebpf_store_helper.h @@ -23,7 +23,7 @@ extern "C" typedef HANDLE ebpf_store_key_t; #else typedef HKEY ebpf_store_key_t; -extern ebpf_store_key_t ebpf_store_root_key_t; +extern ebpf_store_key_t ebpf_store_root_key; #endif /** diff --git a/libs/api_common/store_helper_internal.cpp b/libs/api_common/store_helper_internal.cpp index 9a726a5097..90bff29b4d 100644 --- a/libs/api_common/store_helper_internal.cpp +++ b/libs/api_common/store_helper_internal.cpp @@ -12,7 +12,7 @@ ebpf_store_key_t root_registry_key_current_user = HKEY_CURRENT_USER; ebpf_store_key_t root_registry_key_local_machine = HKEY_LOCAL_MACHINE; // TODO: Issue #1231 Change to using HKEY_LOCAL_MACHINE -ebpf_store_key_t ebpf_store_root_key_t = HKEY_CURRENT_USER; +ebpf_store_key_t ebpf_store_root_key = HKEY_CURRENT_USER; static ebpf_result_t _open_ebpf_store_key(_Out_ ebpf_store_key_t* store_key) diff --git a/libs/store_helper/ebpf_store_helper.c b/libs/store_helper/ebpf_store_helper.c index 813fa2f961..7483f62105 100644 --- a/libs/store_helper/ebpf_store_helper.c +++ b/libs/store_helper/ebpf_store_helper.c @@ -17,7 +17,7 @@ _ebpf_store_open_or_create_provider_registry_key(_Out_ ebpf_store_key_t* provide // Open (or create) root eBPF registry path. #ifdef USER_MODE - result = ebpf_create_registry_key(ebpf_store_root_key_t, EBPF_ROOT_RELATIVE_PATH, REG_CREATE_FLAGS, &root_key); + result = ebpf_create_registry_key(ebpf_store_root_key, EBPF_ROOT_RELATIVE_PATH, REG_CREATE_FLAGS, &root_key); #else result = ebpf_create_registry_key(NULL, EBPF_ROOT_REGISTRY_PATH, REG_CREATE_FLAGS, &root_key); #endif diff --git a/tests/netebpfext_unit/netebpf_ext_helper.cpp b/tests/netebpfext_unit/netebpf_ext_helper.cpp index 2845d26f5c..ea07c44def 100644 --- a/tests/netebpfext_unit/netebpf_ext_helper.cpp +++ b/tests/netebpfext_unit/netebpf_ext_helper.cpp @@ -6,7 +6,7 @@ #include "netebpf_ext_helper.h" // TODO: Issue #1231 Change to using HKEY_LOCAL_MACHINE -ebpf_store_key_t ebpf_store_root_key_t = HKEY_CURRENT_USER; +ebpf_store_key_t ebpf_store_root_key = HKEY_CURRENT_USER; DEVICE_OBJECT* _net_ebpf_ext_driver_device_object; constexpr uint32_t _test_destination_ipv4_address = 0x01020304; diff --git a/tools/export_program_info/export_program_info.cpp b/tools/export_program_info/export_program_info.cpp index 815f9220a8..9848cda15e 100644 --- a/tools/export_program_info/export_program_info.cpp +++ b/tools/export_program_info/export_program_info.cpp @@ -17,7 +17,7 @@ #define REG_CREATE_FLAGS (KEY_WRITE | DELETE | KEY_READ) #define REG_OPEN_FLAGS (DELETE | KEY_READ) -extern ebpf_store_key_t ebpf_store_root_key_t; +extern ebpf_store_key_t ebpf_store_root_key; typedef struct _ebpf_program_section_info_with_count { @@ -84,7 +84,7 @@ clear_all_ebpf_stores() { // TODO: Issue #1231 Change to using HKEY_LOCAL_MACHINE std::cout << "Clearing eBPF store HKEY_CURRENT_USER" << std::endl; - return ebpf_store_clear(ebpf_store_root_key_t); + return ebpf_store_clear(ebpf_store_root_key); } void