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