2008-03-24 03:02:28 -04:00
|
|
|
#ifndef _EXTRA_OPTS_H_
|
|
|
|
|
#define _EXTRA_OPTS_H_
|
|
|
|
|
|
|
|
|
|
/*
|
2014-01-18 03:40:24 -05:00
|
|
|
* extra_opts.h: routines for loading monitoring-plugin defaults from ini
|
2008-03-24 03:02:28 -04:00
|
|
|
* configuration files.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/* np_extra_opts: Process the --extra-opts arguments and create a new argument
|
2008-03-30 10:02:13 -04:00
|
|
|
* array with ini-processed and argument-passed arguments together. The
|
2009-06-10 23:16:12 -04:00
|
|
|
* ini-procesed arguments always come first (in the order of --extra-opts
|
2008-03-30 10:02:13 -04:00
|
|
|
* arguments). If no --extra-opts arguments are provided or returned nothing
|
|
|
|
|
* it returns **argv otherwise the new array is returned. --extra-opts are
|
2008-04-01 05:31:27 -04:00
|
|
|
* always removed from **argv. The original pointers from **argv are kept in
|
|
|
|
|
* the new array to preserve ability to overwrite arguments in processlist.
|
2009-06-10 23:16:12 -04:00
|
|
|
*
|
|
|
|
|
* The new array can be easily freed as long as a pointer to the original one
|
|
|
|
|
* is kept. See my_free() in lib/tests/test_opts1.c for an example.
|
2008-03-24 03:02:28 -04:00
|
|
|
*/
|
2008-03-30 10:02:13 -04:00
|
|
|
char **np_extra_opts(int *argc, char **argv, const char *plugin_name);
|
2008-03-24 03:02:28 -04:00
|
|
|
|
|
|
|
|
#endif /* _EXTRA_OPTS_H_ */
|