From 0d6a37beee85e4d2669e7d11f44b1c7b84eca391 Mon Sep 17 00:00:00 2001 From: Nikos Ntarmos Date: Sun, 5 Dec 2010 05:57:40 +0200 Subject: [PATCH] FreeBSD supports addr and if_running Signed-off-by: Nikos Ntarmos Signed-off-by: Pavel Labath --- src/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core.c b/src/core.c index 5a146f9..e93ef58 100644 --- a/src/core.c +++ b/src/core.c @@ -541,11 +541,11 @@ struct text_object *construct_text_object(const char *s, const char *arg, long parse_platform_sensor(obj, arg); END OBJ_ARG(hwmon, 0, "hwmon needs argumanets") parse_hwmon_sensor(obj, arg); - END OBJ(addr, &update_net_stats) - parse_net_stat_arg(obj, arg, free_at_crash); END OBJ(addrs, &update_net_stats) parse_net_stat_arg(obj, arg, free_at_crash); #endif /* __linux__ */ + END OBJ(addr, &update_net_stats) + parse_net_stat_arg(obj, arg, free_at_crash); END /* we have four different types of top (top, top_mem, top_time and top_io). To * avoid having almost-same code four times, we have this special @@ -577,7 +577,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long obj->data.s = strndup(arg, text_buffer_size); END OBJ_IF_ARG(if_mounted, 0, "if_mounted needs an argument") obj->data.s = strndup(arg, text_buffer_size); -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) END OBJ_IF_ARG(if_running, &update_top, "if_running needs an argument") top_running = 1; obj->data.s = strndup(arg, text_buffer_size); -- 1.7.9.5