From a9fdcf474db69a754ae460021f8428c1dac4191f Mon Sep 17 00:00:00 2001 From: Teng Qin Date: Fri, 15 Feb 2019 18:43:34 -0800 Subject: [PATCH] Rename bpf_common.h to bcc_common.h (#2208) Rename bpf_common.h to bcc_common.h --- src/cc/CMakeLists.txt | 4 ++-- src/cc/{bpf_common.cc => bcc_common.cc} | 2 +- src/cc/{bpf_common.h => bcc_common.h} | 4 ++-- src/python/bcc/libbcc.py | 2 +- tests/cc/test_static.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename src/cc/{bpf_common.cc => bcc_common.cc} (99%) rename src/cc/{bpf_common.h => bcc_common.h} (98%) diff --git a/src/cc/CMakeLists.txt b/src/cc/CMakeLists.txt index dd5d91c41706..59a598560e4c 100644 --- a/src/cc/CMakeLists.txt +++ b/src/cc/CMakeLists.txt @@ -35,7 +35,7 @@ add_library(bpf-shared SHARED libbpf.c perf_reader.c ${libbpf_sources}) set_target_properties(bpf-shared PROPERTIES VERSION ${REVISION_LAST} SOVERSION 0) set_target_properties(bpf-shared PROPERTIES OUTPUT_NAME bpf) -set(bcc_common_sources bpf_common.cc bpf_module.cc bcc_btf.cc exported_files.cc) +set(bcc_common_sources bcc_common.cc bpf_module.cc bcc_btf.cc exported_files.cc) if (${LLVM_PACKAGE_VERSION} VERSION_EQUAL 6 OR ${LLVM_PACKAGE_VERSION} VERSION_GREATER 6) set(bcc_common_sources ${bcc_common_sources} bcc_debug.cc) endif() @@ -51,7 +51,7 @@ set(bcc_util_sources ns_guard.cc common.cc) set(bcc_sym_sources bcc_syms.cc bcc_elf.c bcc_perf_map.c bcc_proc.c) set(bcc_common_headers libbpf.h perf_reader.h) set(bcc_table_headers file_desc.h table_desc.h table_storage.h) -set(bcc_api_headers bpf_common.h bpf_module.h bcc_exception.h bcc_syms.h) +set(bcc_api_headers bcc_common.h bpf_module.h bcc_exception.h bcc_syms.h) if(ENABLE_CLANG_JIT) add_library(bcc-shared SHARED diff --git a/src/cc/bpf_common.cc b/src/cc/bcc_common.cc similarity index 99% rename from src/cc/bpf_common.cc rename to src/cc/bcc_common.cc index e65ef9d07b52..182281119e87 100644 --- a/src/cc/bpf_common.cc +++ b/src/cc/bcc_common.cc @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "bpf_common.h" +#include "bcc_common.h" #include "bpf_module.h" extern "C" { diff --git a/src/cc/bpf_common.h b/src/cc/bcc_common.h similarity index 98% rename from src/cc/bpf_common.h rename to src/cc/bcc_common.h index 9ad4142887ee..2504ea237b8d 100644 --- a/src/cc/bpf_common.h +++ b/src/cc/bcc_common.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef BPF_COMMON_H -#define BPF_COMMON_H +#ifndef BCC_COMMON_H +#define BCC_COMMON_H #include #include diff --git a/src/python/bcc/libbcc.py b/src/python/bcc/libbcc.py index 23d0b11ed3bc..48c6eb6021a3 100644 --- a/src/python/bcc/libbcc.py +++ b/src/python/bcc/libbcc.py @@ -16,7 +16,7 @@ lib = ct.CDLL("libbcc.so.0", use_errno=True) -# keep in sync with bpf_common.h +# keep in sync with bcc_common.h lib.bpf_module_create_b.restype = ct.c_void_p lib.bpf_module_create_b.argtypes = [ct.c_char_p, ct.c_char_p, ct.c_uint] lib.bpf_module_create_c.restype = ct.c_void_p diff --git a/tests/cc/test_static.c b/tests/cc/test_static.c index ff675fb92f7d..919b0742076b 100644 --- a/tests/cc/test_static.c +++ b/tests/cc/test_static.c @@ -1,4 +1,4 @@ -#include "bpf_common.h" +#include "bcc_common.h" int main(int argc, char **argv) { void *mod = bpf_module_create_c_from_string("BPF_TABLE(\"array\", int, int, stats, 10);\n", 4, NULL, 0, true);