From 7bf9be9d7060af049e0b269663d823dd2e14739e Mon Sep 17 00:00:00 2001 From: Nativu5 <44155313+Nativu5@users.noreply.github.com> Date: Fri, 13 Dec 2024 15:49:38 +0800 Subject: [PATCH] fix: eBPF object installation prefix --- CMakeLists.txt | 2 +- src/Craned/CgroupManager.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 46c14ea87..e0a58ec45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -411,7 +411,7 @@ install(FILES if(ENABLE_BPF) install(FILES ${CMAKE_BINARY_DIR}/src/Misc/BPF/cgroup_dev_bpf.o - DESTINATION /etc/crane/ + DESTINATION /usr/local/lib64/bpf/ COMPONENT cranedc PERMISSIONS OWNER_READ GROUP_READ WORLD_READ) endif() diff --git a/src/Craned/CgroupManager.h b/src/Craned/CgroupManager.h index f88d338e4..68e700ca4 100644 --- a/src/Craned/CgroupManager.h +++ b/src/Craned/CgroupManager.h @@ -93,7 +93,7 @@ enum class ControllerFile : uint64_t { inline const char *kTaskCgPathPrefix = "Crane_Task_"; inline const char *RootCgroupFullPath = "/sys/fs/cgroup"; #ifdef CRANE_ENABLE_BPF -inline const char *BpfObjectFile = "/etc/crane/cgroup_dev_bpf.o"; +inline const char *BpfObjectFile = "/usr/local/lib64/bpf/cgroup_dev_bpf.o"; inline const char *BpfDeviceMapFile = "/sys/fs/bpf/craned_dev_map"; inline const char *BpfMapName = "craned_dev_map"; inline const char *BpfProgramName = "craned_device_access";