diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-20 04:49:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-20 04:49:55 +0000 |
commit | ab1bb5b7f1c3c3a7b240ab7fc8661459ecd7decb (patch) | |
tree | 7a900833aad3ccc685712c6c2a7d87576d54f427 /collectors/debugfs.plugin/debugfs_plugin.c | |
parent | Adding upstream version 1.40.1. (diff) | |
download | netdata-upstream/1.41.0.tar.xz netdata-upstream/1.41.0.zip |
Adding upstream version 1.41.0.upstream/1.41.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/debugfs.plugin/debugfs_plugin.c')
-rw-r--r-- | collectors/debugfs.plugin/debugfs_plugin.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/collectors/debugfs.plugin/debugfs_plugin.c b/collectors/debugfs.plugin/debugfs_plugin.c index 9713be320..1c5bf106e 100644 --- a/collectors/debugfs.plugin/debugfs_plugin.c +++ b/collectors/debugfs.plugin/debugfs_plugin.c @@ -30,18 +30,18 @@ static int debugfs_check_capabilities() { cap_t caps = cap_get_proc(); if (!caps) { - error("Cannot get current capabilities."); + netdata_log_error("Cannot get current capabilities."); return 0; } int ret = 1; cap_flag_value_t cfv = CAP_CLEAR; if (cap_get_flag(caps, CAP_DAC_READ_SEARCH, CAP_EFFECTIVE, &cfv) == -1) { - error("Cannot find if CAP_DAC_READ_SEARCH is effective."); + netdata_log_error("Cannot find if CAP_DAC_READ_SEARCH is effective."); ret = 0; } else { if (cfv != CAP_SET) { - error("debugfs.plugin should run with CAP_DAC_READ_SEARCH."); + netdata_log_error("debugfs.plugin should run with CAP_DAC_READ_SEARCH."); ret = 0; } } @@ -176,7 +176,7 @@ int main(int argc, char **argv) stock_config_dir = getenv("NETDATA_STOCK_CONFIG_DIR"); if (stock_config_dir == NULL) { - // info("NETDATA_CONFIG_DIR is not passed from netdata"); + // netdata_log_info("NETDATA_CONFIG_DIR is not passed from netdata"); stock_config_dir = LIBCONFIG_DIR; } @@ -186,7 +186,7 @@ int main(int argc, char **argv) if (!debugfs_check_capabilities() && !debugfs_am_i_running_as_root() && !debugfs_check_sys_permission()) { uid_t uid = getuid(), euid = geteuid(); #ifdef HAVE_CAPABILITY - error( + netdata_log_error( "debugfs.plugin should either run as root (now running with uid %u, euid %u) or have special capabilities. " "Without these, debugfs.plugin cannot access /sys/kernel/debug. " "To enable capabilities run: sudo setcap cap_dac_read_search,cap_sys_ptrace+ep %s; " @@ -197,7 +197,7 @@ int main(int argc, char **argv) argv[0], argv[0]); #else - error( + netdata_log_error( "debugfs.plugin should either run as root (now running with uid %u, euid %u) or have special capabilities. " "Without these, debugfs.plugin cannot access /sys/kernel/debug." "Your system does not support capabilities. " @@ -235,7 +235,7 @@ int main(int argc, char **argv) enabled++; } if (!enabled) { - info("all modules are disabled, exiting..."); + netdata_log_info("all modules are disabled, exiting..."); return 1; } } |