fstab-generator: port some code to strextend_with_separator()
This commit is contained in:
parent
8fe9c8d920
commit
6c782b7a47
|
@ -820,19 +820,13 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
|
|||
return log_oom();
|
||||
|
||||
} else if (streq(key, "rootflags")) {
|
||||
char *o;
|
||||
|
||||
if (proc_cmdline_value_missing(key, value))
|
||||
return 0;
|
||||
|
||||
o = arg_root_options ?
|
||||
strjoin(arg_root_options, ",", value) :
|
||||
strdup(value);
|
||||
if (!o)
|
||||
if (!strextend_with_separator(&arg_root_options, ",", value, NULL))
|
||||
return log_oom();
|
||||
|
||||
free(arg_root_options);
|
||||
arg_root_options = o;
|
||||
} else if (streq(key, "roothash")) {
|
||||
|
||||
if (proc_cmdline_value_missing(key, value))
|
||||
|
@ -858,20 +852,13 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
|
|||
return log_oom();
|
||||
|
||||
} else if (streq(key, "mount.usrflags")) {
|
||||
char *o;
|
||||
|
||||
if (proc_cmdline_value_missing(key, value))
|
||||
return 0;
|
||||
|
||||
o = arg_usr_options ?
|
||||
strjoin(arg_usr_options, ",", value) :
|
||||
strdup(value);
|
||||
if (!o)
|
||||
if (!strextend_with_separator(&arg_usr_options, ",", value, NULL))
|
||||
return log_oom();
|
||||
|
||||
free(arg_usr_options);
|
||||
arg_usr_options = o;
|
||||
|
||||
} else if (streq(key, "rw") && !value)
|
||||
arg_root_rw = true;
|
||||
else if (streq(key, "ro") && !value)
|
||||
|
|
Loading…
Reference in New Issue