--- embedaddon/bmon/src/out_null.c 2012/02/21 22:19:56 1.1.1.1 +++ embedaddon/bmon/src/out_null.c 2014/07/30 07:55:27 1.1.1.2 @@ -1,7 +1,8 @@ /* * out_null.c Null Output * - * Copyright (c) 2001-2005 Thomas Graf + * Copyright (c) 2001-2013 Thomas Graf + * Copyright (c) 2013 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -26,20 +27,8 @@ #include #include -static void -null_draw(void) +static void print_help(void) { -} - -static int -null_probe(void) -{ - return 1; -} - -static void -print_help(void) -{ printf( "null - No output\n" \ "\n" \ @@ -48,32 +37,20 @@ print_help(void) "\n"); } -static void -null_set_opts(tv_t *attrs) +static void null_parse_opt(const char *type, const char *value) { - while (attrs) { - if (!strcasecmp(attrs->type, "help")) { - print_help(); - exit(0); - } - - attrs = attrs->next; + if (!strcasecmp(type, "help")) { + print_help(); + exit(0); } } -static struct output_module null_ops = { - .om_name = "null", - .om_draw = null_draw, - .om_probe = null_probe, - .om_set_opts = null_set_opts, +static struct bmon_module null_ops = { + .m_name = "null", + .m_parse_opt = null_parse_opt, }; -#if defined PRAGMA_FALLBACK -#pragma init (null_init) -#endif - -static void __init -null_init(void) +static void __init null_init(void) { - register_output_module(&null_ops); + output_register(&null_ops); }