"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "config.c" between
mdadm-4.2-rc1.tar.xz and mdadm-4.2-rc2.tar.xz

About: mdadm is a tool for creating, managing and monitoring device arrays using the "md" driver in Linux, also known as Software RAID arrays.

config.c  (mdadm-4.2-rc1.tar.xz):config.c  (mdadm-4.2-rc2.tar.xz)
skipping to change at line 84 skipping to change at line 84
/* for Debian compatibility .... */ /* for Debian compatibility .... */
#define CONFFILE2 "/etc/mdadm/mdadm.conf" #define CONFFILE2 "/etc/mdadm/mdadm.conf"
#endif #endif
char DefaultConfFile[] = CONFFILE; char DefaultConfFile[] = CONFFILE;
char DefaultConfDir[] = CONFFILE ".d"; char DefaultConfDir[] = CONFFILE ".d";
char DefaultAltConfFile[] = CONFFILE2; char DefaultAltConfFile[] = CONFFILE2;
char DefaultAltConfDir[] = CONFFILE2 ".d"; char DefaultAltConfDir[] = CONFFILE2 ".d";
enum linetype { Devices, Array, Mailaddr, Mailfrom, Program, CreateDev, enum linetype { Devices, Array, Mailaddr, Mailfrom, Program, CreateDev,
Homehost, HomeCluster, AutoMode, Policy, PartPolicy, Sysfs, Homehost, HomeCluster, AutoMode, Policy, PartPolicy, Sysfs,
LTEnd }; MonitorDelay, LTEnd };
char *keywords[] = { char *keywords[] = {
[Devices] = "devices", [Devices] = "devices",
[Array] = "array", [Array] = "array",
[Mailaddr] = "mailaddr", [Mailaddr] = "mailaddr",
[Mailfrom] = "mailfrom", [Mailfrom] = "mailfrom",
[Program] = "program", [Program] = "program",
[CreateDev]= "create", [CreateDev]= "create",
[Homehost] = "homehost", [Homehost] = "homehost",
[HomeCluster] = "homecluster", [HomeCluster] = "homecluster",
[AutoMode] = "auto", [AutoMode] = "auto",
[Policy] = "policy", [Policy] = "policy",
[PartPolicy]="part-policy", [PartPolicy]="part-policy",
[Sysfs] = "sysfs", [Sysfs] = "sysfs",
[MonitorDelay] = "monitordelay",
[LTEnd] = NULL [LTEnd] = NULL
}; };
/* /*
* match_keyword returns an index into the keywords array, or -1 for no match * match_keyword returns an index into the keywords array, or -1 for no match
* case is ignored, and at least three characters must be given * case is ignored, and at least three characters must be given
*/ */
int match_keyword(char *word) int match_keyword(char *word)
{ {
skipping to change at line 591 skipping to change at line 592
for (w = dl_next(line); w != line; w = dl_next(w)) { for (w = dl_next(line); w != line; w = dl_next(w)) {
if (home_cluster == NULL) { if (home_cluster == NULL) {
if (strcasecmp(w, "<none>") == 0) if (strcasecmp(w, "<none>") == 0)
home_cluster = xstrdup(""); home_cluster = xstrdup("");
else else
home_cluster = xstrdup(w); home_cluster = xstrdup(w);
} }
} }
} }
static int monitor_delay;
void monitordelayline(char *line)
{
char *w;
for (w = dl_next(line); w != line; w = dl_next(w)) {
if (monitor_delay == 0)
monitor_delay = strtol(w, NULL, 10);
}
}
char auto_yes[] = "yes"; char auto_yes[] = "yes";
char auto_no[] = "no"; char auto_no[] = "no";
char auto_homehost[] = "homehost"; char auto_homehost[] = "homehost";
static int auto_seen = 0; static int auto_seen = 0;
void autoline(char *line) void autoline(char *line)
{ {
char *w; char *w;
char *seen; char *seen;
int super_cnt; int super_cnt;
skipping to change at line 772 skipping to change at line 784
break; break;
case Policy: case Policy:
policyline(line, rule_policy); policyline(line, rule_policy);
break; break;
case PartPolicy: case PartPolicy:
policyline(line, rule_part); policyline(line, rule_part);
break; break;
case Sysfs: case Sysfs:
sysfsline(line); sysfsline(line);
break; break;
case MonitorDelay:
monitordelayline(line);
break;
default: default:
pr_err("Unknown keyword %s\n", line); pr_err("Unknown keyword %s\n", line);
} }
free_line(line); free_line(line);
} }
} }
struct fname { struct fname {
struct fname *next; struct fname *next;
char name[]; char name[];
skipping to change at line 928 skipping to change at line 943
*require_homehostp = require_homehost; *require_homehostp = require_homehost;
return home_host; return home_host;
} }
char *conf_get_homecluster(void) char *conf_get_homecluster(void)
{ {
load_conffile(); load_conffile();
return home_cluster; return home_cluster;
} }
int conf_get_monitor_delay(void)
{
load_conffile();
return monitor_delay;
}
struct createinfo *conf_get_create_info(void) struct createinfo *conf_get_create_info(void)
{ {
load_conffile(); load_conffile();
return &createinfo; return &createinfo;
} }
struct mddev_ident *conf_get_ident(char *dev) struct mddev_ident *conf_get_ident(char *dev)
{ {
struct mddev_ident *rv; struct mddev_ident *rv;
load_conffile(); load_conffile();
 End of changes. 5 change blocks. 
1 lines changed or deleted 22 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)