From: Tom Zanussi <tom.zanussi@intel.com>
To: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Cc: Maciek Borzecki <maciek.borzecki@gmail.com>,
openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 2/2] wic: --fsoptions handling
Date: Wed, 23 Jul 2014 14:59:07 -0500 [thread overview]
Message-ID: <1406145547.6335.37.camel@empanada> (raw)
In-Reply-To: <1405978453-16554-2-git-send-email-maciej.borzecki@open-rnd.pl>
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@open-rnd.pl>
> Signed-off-by: Maciek Borzecki <maciek.borzecki@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):
next prev parent reply other threads:[~2014-07-23 19:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-21 21:34 [PATCH 1/2] wic: original fstab restored too early Maciej Borzecki
2014-07-21 21:34 ` [PATCH 2/2] wic: --fsoptions handling Maciej Borzecki
2014-07-23 19:59 ` Tom Zanussi [this message]
2014-07-24 12:17 ` [PATCH v2] " Maciej Borzecki
2014-07-25 0:17 ` Tom Zanussi
2014-07-23 19:21 ` [PATCH 1/2] wic: original fstab restored too early Tom Zanussi
2014-07-23 19:37 ` Maciek Borzecki
2014-07-24 12:27 ` [PATCH v2] wic: do not overwrite autogenerated /etc/fstab with original " Maciej Borzecki
2014-07-25 0:49 ` Tom Zanussi
2014-07-25 15:00 ` Tom Zanussi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1406145547.6335.37.camel@empanada \
--to=tom.zanussi@intel.com \
--cc=maciej.borzecki@open-rnd.pl \
--cc=maciek.borzecki@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox