[OE-core] [PATCH 2/2] wic: --fsoptions handling

Tom Zanussi tom.zanussi at intel.com
Wed Jul 23 19:59:07 UTC 2014


On Mon, 2014-07-21 at 23:34 +0200, Maciej Borzecki wrote:
> Add handling of --fsoptions in parition definition. Default value of
> mount option is 'defaults', all user defined options are appended.
> 
> Signed-off-by: Maciej Borzecki <maciej.borzecki at open-rnd.pl>
> Signed-off-by: Maciek Borzecki <maciek.borzecki at gmail.com>
> ---
>  scripts/lib/mic/imager/direct.py | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/lib/mic/imager/direct.py b/scripts/lib/mic/imager/direct.py
> index beae372..024cd09 100644
> --- a/scripts/lib/mic/imager/direct.py
> +++ b/scripts/lib/mic/imager/direct.py
> @@ -113,7 +113,14 @@ class DirectImageCreator(BaseImageCreator):
>                  device_name = "/dev/" + p.disk + str(num + 1)
>              else:
>                  device_name = "/dev/" + p.disk + str(num)
> -            fstab_entry = device_name + "\t" + p.mountpoint + "\t" + p.fstype + "\tdefaults\t0\t0\n"
> +            opts = "defaults"
> +            if p.fsopts:
> +                opts += ","
> +                opts += p.fsopts

This is better than the hard-coded 'defaults' there now, but shouldn't
the logic be more like 'if the user specifies --fsoptions, use only
those directly, otherwise use the default 'defaults'?

IOW, if users want to append to 'defaults' they can do it themselves in
the --fsoptions they specify.  Otherwise, there's no way for a user to
specify their own options without 'defaults'.

Tom

> +            fstab_entry = device_name + "\t" + \
> +                          p.mountpoint + "\t" + \
> +                          p.fstype + "\t" + \
> +                          opts + "\t0\t0\n"
>              fstab_lines.append(fstab_entry)
>  
>      def _write_fstab(self, fstab, fstab_lines):





More information about the Openembedded-core mailing list