<p>This looks good. However, how do you deal with btrfs? Instal a fake fsck?<br></p>
<p>On Mar 8, 2013 2:14 AM, <<a href="mailto:harald@redhat.com">harald@redhat.com</a>> wrote:<br>
><br>
> From: Harald Hoyer <<a href="mailto:harald@redhat.com">harald@redhat.com</a>><br>
><br>
> ---<br>
>  src/fstab-generator/fstab-generator.c | 14 ++++++++++++--<br>
>  1 file changed, 12 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c<br>
> index 910bbc1..b5fe0fa 100644<br>
> --- a/src/fstab-generator/fstab-generator.c<br>
> +++ b/src/fstab-generator/fstab-generator.c<br>
> @@ -449,6 +449,7 @@ static int parse_new_root_from_proc_cmdline(void) {<br>
>          char *w, *state;<br>
>          _cleanup_free_ char *what = NULL, *type = NULL, *opts = NULL, *line = NULL;<br>
>          int r;<br>
> +        int fsck_passno = 0;<br>
>          size_t l;<br>
><br>
>          r = read_one_line_file("/proc/cmdline", &line);<br>
> @@ -490,7 +491,16 @@ static int parse_new_root_from_proc_cmdline(void) {<br>
>                          if (!opts)<br>
>                                  return log_oom();<br>
><br>
> -                } else if (streq(word, "ro") || streq(word, "rw")) {<br>
> +                } else if (streq(word, "ro")) {<br>
> +                        fsck_passno = 0;<br>
> +                        tmp_word = opts;<br>
> +                        opts = strjoin(opts, ",", word, NULL);<br>
> +                        free(tmp_word);<br>
> +                        if (!opts)<br>
> +                                return log_oom();<br>
> +<br>
> +                } else if (streq(word, "rw")) {<br>
> +                        fsck_passno = 1;<br>
>                          tmp_word = opts;<br>
>                          opts = strjoin(opts, ",", word, NULL);<br>
>                          free(tmp_word);<br>
> @@ -513,7 +523,7 @@ static int parse_new_root_from_proc_cmdline(void) {<br>
>          }<br>
><br>
>          log_debug("Found entry what=%s where=/sysroot type=%s", what, type);<br>
> -        r = add_mount(what, "/sysroot", type, opts, 0, false, false, false,<br>
> +        r = add_mount(what, "/sysroot", type, opts, fsck_passno, false, false, false,<br>
>                        false, false, "/proc/cmdline");<br>
><br>
>          return (r < 0) ? r : 0;<br>
> --<br>
> 1.8.1<br>
><br>
> _______________________________________________<br>
> systemd-devel mailing list<br>
> <a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
</p>