All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Tom Zanussi <tom.zanussi@linux.intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 2/4] wic: remove useless calls to __write_fstab
Date: Wed, 18 Feb 2015 17:48:26 +0100	[thread overview]
Message-ID: <20150218164826.GL11529@piout.net> (raw)
In-Reply-To: <1423525604-18344-3-git-send-email-alexandre.belloni@free-electrons.com>

On 10/02/2015 at 00:46:42 +0100, Alexandre Belloni wrote :
> __write_fstab() is already iterating over parts. There is no need to
> call it fort each parts.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
>  scripts/lib/wic/imager/direct.py | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py
> index 38d4e78e6273..c605e6423826 100644
> --- a/scripts/lib/wic/imager/direct.py
> +++ b/scripts/lib/wic/imager/direct.py
> @@ -136,7 +136,7 @@ class DirectImageCreator(BaseImageCreator):
>              fstab_lines.append(fstab_entry)
>  
>      def _write_fstab(self, fstab, fstab_lines):
> -        fstab = open(fstab, "w")
> +        fstab = open(fstab + ".new", "w")

I'll remove that as it was there for debugging purposes...

>          for line in fstab_lines:
>              fstab.write(line)
>          fstab.close()
> @@ -258,12 +258,9 @@ class DirectImageCreator(BaseImageCreator):
>              # self.assemble() calls Image.assemble() which calls
>              # __write_partitition() for each partition to dd the fs
>              # into the partitions.
> -            fstab = self.__write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
> -
>              p.prepare(self, self.workdir, self.oe_builddir, self.rootfs_dir,
>                        self.bootimg_dir, self.kernel_dir, self.native_sysroot)
>  
> -            self._restore_fstab(fstab)
>  
>              self.__image.add_partition(int(p.size),
>                                         p.disk,
> @@ -277,6 +274,9 @@ class DirectImageCreator(BaseImageCreator):
>                                         no_table = p.no_table,
>                                         part_type = p.part_type)
>  
> +        fstab = self.__write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
> +        self._restore_fstab(fstab)
> +
>          self.__image.layout_partitions(self._ptable_format)
>  
>          self.__imgdir = self.workdir
> -- 
> 2.1.0
> 

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


  reply	other threads:[~2015-02-18 16:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-09 23:46 [PATCH 0/4] More wic cleanup and features Alexandre Belloni
2015-02-09 23:46 ` [PATCH 1/4] wic: fix empty btrfs partitions Alexandre Belloni
2015-02-09 23:46 ` [PATCH 2/4] wic: remove useless calls to __write_fstab Alexandre Belloni
2015-02-18 16:48   ` Alexandre Belloni [this message]
2015-02-18 18:56     ` Alexandre Belloni
2015-02-09 23:46 ` [PATCH 3/4] wic: properly label filesystems Alexandre Belloni
2015-02-09 23:46 ` [PATCH 4/4] wic: add GPT support Alexandre Belloni

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=20150218164826.GL11529@piout.net \
    --to=alexandre.belloni@free-electrons.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=tom.zanussi@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.