-static int parse_proc_cmdline_word(const char *w) {
- if (streq(w, "fsck.mode=auto"))
- arg_force = arg_skip = false;
- else if (streq(w, "fsck.mode=force"))
- arg_force = true;
- else if (streq(w, "fsck.mode=skip"))
- arg_skip = true;
- else if (startswith(w, "fsck"))
- log_warning("Invalid fsck parameter. Ignoring.");
+static int parse_proc_cmdline_item(const char *key, const char *value) {
+
+ if (streq(key, "fsck.mode") && value) {
+
+ if (streq(value, "auto"))
+ arg_force = arg_skip = false;
+ else if (streq(value, "force"))
+ arg_force = true;
+ else if (streq(value, "skip"))
+ arg_skip = true;
+ else
+ log_warning("Invalid fsck.mode= parameter '%s'. Ignoring.", value);
+
+ } else if (streq(key, "fsck.repair") && value) {
+
+ if (streq(value, "preen"))
+ arg_repair = "-a";
+ else if (streq(value, "yes"))
+ arg_repair = "-y";
+ else if (streq(value, "no"))
+ arg_repair = "-n";
+ else
+ log_warning("Invalid fsck.repair= parameter '%s'. Ignoring.", value);
+ }
+