[PATCH openbmc 7/9] initfs: Do not warn on missing jffs2 fsck

Andrew Jeffery andrew at aj.id.au
Thu Feb 25 12:14:43 AEDT 2016


On Wed, 2016-02-24 at 12:40 -0600, OpenBMC Patches wrote:
> From: Milton Miller <miltonm at us.ibm.com>
> 
> We know there is no command and we plan to have this the default.
> 
> Suppress the message to avoid user questions and concerns.
> 
> Signed-off-by: Milton Miller <miltonm at us.ibm.com>
> ---
>  .../common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh    | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh
> index 7fc6587..f2fe938 100644
> --- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh
> +++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh
> @@ -119,7 +119,8 @@ then
>  > 	> then
>  > 	> 	> debug_takeover "fsck of read-write fs on $rwdev failed (rc=$rc)"
>  > 	> fi
> -else
> +elif test $fsck != /sbin/fsck.jffs2

This is fairly minor, but would it be better to test $rwfst rather than
the path? Otherwise we're hardcoding '/sbin/fsck.' in two places (not
that I expect it to change). The filesystem type is the differentiating
factor here, and it's jffs2 that has no fsck (i.e. we don't expect it
to exist anywhere, let alone a different path). So maybe:

    elif test $rwfst != jffs2

Thoughts?

Otherwise:

Reviewed-by: Andrew Jeffery <andrew at aj.id.au>

> +then
>  > 	> echo "No '$fsck' in read only fs, skipping fsck."
>  fi
>  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20160225/c470dfd6/attachment.sig>


More information about the openbmc mailing list