summaryrefslogtreecommitdiffstats
path: root/Monitor.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-06-26 15:11:01 +1000
committerNeil Brown <neilb@suse.de>2006-06-26 15:11:01 +1000
commit8aec876d2ee877ea86a67461237c2a8f5a43a5ab (patch)
tree2acfdc50c8e7ef27208d8b4533d7b97fdd46a0bc /Monitor.c
parent8bd2e0c3390e54c1f1fa0daa701dd44e28f5e18d (diff)
downloadmdadm-8aec876d2ee877ea86a67461237c2a8f5a43a5ab.tar.gz
mdadm-8aec876d2ee877ea86a67461237c2a8f5a43a5ab.tar.xz
mdadm-8aec876d2ee877ea86a67461237c2a8f5a43a5ab.zip
More consistent honoring of --configfile
Never use /etc/mdadm.conf if --config file is given (previously some code used one, some used the other).
Diffstat (limited to 'Monitor.c')
-rw-r--r--Monitor.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Monitor.c b/Monitor.c
index 7a8c071..315fee2 100644
--- a/Monitor.c
+++ b/Monitor.c
@@ -54,7 +54,7 @@ static char *percentalerts[] = {
int Monitor(mddev_dev_t devlist,
char *mailaddr, char *alert_cmd,
int period, int daemonise, int scan, int oneshot,
- int dosyslog, char *config, int test, char* pidfile)
+ int dosyslog, int test, char* pidfile)
{
/*
* Every few seconds, scan every md device looking for changes
@@ -116,15 +116,15 @@ int Monitor(mddev_dev_t devlist,
char *mailfrom = NULL;
if (!mailaddr) {
- mailaddr = conf_get_mailaddr(config);
+ mailaddr = conf_get_mailaddr();
if (mailaddr && ! scan)
fprintf(stderr, Name ": Monitor using email address \"%s\" from config file\n",
mailaddr);
}
- mailfrom = conf_get_mailfrom(config);
+ mailfrom = conf_get_mailfrom();
if (!alert_cmd) {
- alert_cmd = conf_get_program(config);
+ alert_cmd = conf_get_program();
if (alert_cmd && ! scan)
fprintf(stderr, Name ": Monitor using program \"%s\" from config file\n",
alert_cmd);
@@ -163,7 +163,7 @@ int Monitor(mddev_dev_t devlist,
}
if (devlist == NULL) {
- mddev_ident_t mdlist = conf_get_ident(config, NULL);
+ mddev_ident_t mdlist = conf_get_ident(NULL);
for (; mdlist; mdlist=mdlist->next) {
struct state *st = malloc(sizeof *st);
if (st == NULL)
@@ -184,7 +184,7 @@ int Monitor(mddev_dev_t devlist,
} else {
mddev_dev_t dv;
for (dv=devlist ; dv; dv=dv->next) {
- mddev_ident_t mdlist = conf_get_ident(config, dv->devname);
+ mddev_ident_t mdlist = conf_get_ident(dv->devname);
struct state *st = malloc(sizeof *st);
if (st == NULL)
continue;