From 8aec876d2ee877ea86a67461237c2a8f5a43a5ab Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Mon, 26 Jun 2006 15:11:01 +1000 Subject: More consistent honoring of --configfile Never use /etc/mdadm.conf if --config file is given (previously some code used one, some used the other). --- Monitor.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Monitor.c') 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; -- cgit