Openembedded Core Discussions
 help / color / mirror / Atom feed
* [OE-code][PATCH] wic: include partition label in fs image file name
@ 2014-07-21 11:01 Maciej Borzecki
  2014-07-21 21:23 ` Tom Zanussi
  0 siblings, 1 reply; 4+ messages in thread
From: Maciej Borzecki @ 2014-07-21 11:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Maciek Borzecki

Not including the label image but having multiple partitions of the same
type, the image file of one partition would overwrite the other.

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
---
 scripts/lib/mic/kickstart/custom_commands/partition.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py
index 06f29a9..d0f1b78 100644
--- a/scripts/lib/mic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/mic/kickstart/custom_commands/partition.py
@@ -343,7 +343,7 @@ class Wic_PartData(Mic_PartData):
         """
         Prepare an empty ext2/3/4 partition.
         """
-        fs = "%s/fs.%s" % (cr_workdir, self.fstype)
+        fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
 
         dd_cmd = "dd if=/dev/zero of=%s bs=1M seek=%d count=0" % \
             (fs, self.size)
@@ -363,7 +363,7 @@ class Wic_PartData(Mic_PartData):
         """
         Prepare an empty btrfs partition.
         """
-        fs = "%s/fs.%s" % (cr_workdir, self.fstype)
+        fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
 
         dd_cmd = "dd if=/dev/zero of=%s bs=1M seek=%d count=0" % \
             (fs, self.size)
@@ -384,7 +384,7 @@ class Wic_PartData(Mic_PartData):
         """
         Prepare an empty vfat partition.
         """
-        fs = "%s/fs.%s" % (cr_workdir, self.fstype)
+        fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
 
         blocks = self.size * 1024
 
-- 
1.9.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [OE-code][PATCH] wic: include partition label in fs image file name
  2014-07-21 11:01 [OE-code][PATCH] wic: include partition label in fs image file name Maciej Borzecki
@ 2014-07-21 21:23 ` Tom Zanussi
  2014-08-11 14:17   ` Maciek Borzecki
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Zanussi @ 2014-07-21 21:23 UTC (permalink / raw)
  To: Maciej Borzecki; +Cc: Maciek Borzecki, openembedded-core

On Mon, 2014-07-21 at 13:01 +0200, Maciej Borzecki wrote:
> Not including the label image but having multiple partitions of the same
> type, the image file of one partition would overwrite the other.
> 

Right, the empty-partition case somehow missed the label - good catch.

Acked-by: Tom Zanussi <tom.zanussi@linux.intel.com>

> Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
> Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
> ---
>  scripts/lib/mic/kickstart/custom_commands/partition.py | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py
> index 06f29a9..d0f1b78 100644
> --- a/scripts/lib/mic/kickstart/custom_commands/partition.py
> +++ b/scripts/lib/mic/kickstart/custom_commands/partition.py
> @@ -343,7 +343,7 @@ class Wic_PartData(Mic_PartData):
>          """
>          Prepare an empty ext2/3/4 partition.
>          """
> -        fs = "%s/fs.%s" % (cr_workdir, self.fstype)
> +        fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
>  
>          dd_cmd = "dd if=/dev/zero of=%s bs=1M seek=%d count=0" % \
>              (fs, self.size)
> @@ -363,7 +363,7 @@ class Wic_PartData(Mic_PartData):
>          """
>          Prepare an empty btrfs partition.
>          """
> -        fs = "%s/fs.%s" % (cr_workdir, self.fstype)
> +        fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
>  
>          dd_cmd = "dd if=/dev/zero of=%s bs=1M seek=%d count=0" % \
>              (fs, self.size)
> @@ -384,7 +384,7 @@ class Wic_PartData(Mic_PartData):
>          """
>          Prepare an empty vfat partition.
>          """
> -        fs = "%s/fs.%s" % (cr_workdir, self.fstype)
> +        fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
>  
>          blocks = self.size * 1024
>  




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-code][PATCH] wic: include partition label in fs image file name
@ 2014-07-27 19:01 Maciek Borzecki
  0 siblings, 0 replies; 4+ messages in thread
From: Maciek Borzecki @ 2014-07-27 19:01 UTC (permalink / raw)
  To: Tom Zanussi; +Cc: Maciek Borzecki, openembedded-core


21 lip 2014 23:23 Tom Zanussi <tom.zanussi@intel.com> napisał(a):
>
> On Mon, 2014-07-21 at 13:01 +0200, Maciej Borzecki wrote: 
> > Not including the label image but having multiple partitions of the same 
> > type, the image file of one partition would overwrite the other. 
> > 
>
> Right, the empty-partition case somehow missed the label - good catch. 
>
> Acked-by: Tom Zanussi <tom.zanussi@linux.intel.com>

What is the status of this patch? I cannot locate it in master.

Thanks,
Maciek

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-code][PATCH] wic: include partition label in fs image file name
  2014-07-21 21:23 ` Tom Zanussi
@ 2014-08-11 14:17   ` Maciek Borzecki
  0 siblings, 0 replies; 4+ messages in thread
From: Maciek Borzecki @ 2014-08-11 14:17 UTC (permalink / raw)
  To: Saul Wold; +Cc: openembedded-core

On pon, 2014-07-21 at 16:23 -0500, Tom Zanussi wrote:
> On Mon, 2014-07-21 at 13:01 +0200, Maciej Borzecki wrote:
> > Not including the label image but having multiple partitions of the same
> > type, the image file of one partition would overwrite the other.
> > 
> 
> Right, the empty-partition case somehow missed the label - good catch.
> 
> Acked-by: Tom Zanussi <tom.zanussi@linux.intel.com>


Saul, I think that the patch was missed by due to malformed subject
line. Would you be able to push it to master?

> 
> > Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
> > Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
> > ---
> >  scripts/lib/mic/kickstart/custom_commands/partition.py | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py
> > index 06f29a9..d0f1b78 100644
> > --- a/scripts/lib/mic/kickstart/custom_commands/partition.py
> > +++ b/scripts/lib/mic/kickstart/custom_commands/partition.py
> > @@ -343,7 +343,7 @@ class Wic_PartData(Mic_PartData):
> >          """
> >          Prepare an empty ext2/3/4 partition.
> >          """
> > -        fs = "%s/fs.%s" % (cr_workdir, self.fstype)
> > +        fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
> >  
> >          dd_cmd = "dd if=/dev/zero of=%s bs=1M seek=%d count=0" % \
> >              (fs, self.size)
> > @@ -363,7 +363,7 @@ class Wic_PartData(Mic_PartData):
> >          """
> >          Prepare an empty btrfs partition.
> >          """
> > -        fs = "%s/fs.%s" % (cr_workdir, self.fstype)
> > +        fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
> >  
> >          dd_cmd = "dd if=/dev/zero of=%s bs=1M seek=%d count=0" % \
> >              (fs, self.size)
> > @@ -384,7 +384,7 @@ class Wic_PartData(Mic_PartData):
> >          """
> >          Prepare an empty vfat partition.
> >          """
> > -        fs = "%s/fs.%s" % (cr_workdir, self.fstype)
> > +        fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
> >  
> >          blocks = self.size * 1024
> >  
> 
> 


-- 
Maciej Borzęcki
Senior Software Developer at Open-RnD Sp. z o.o., Poland
www.open-rnd.pl
mobile: +48 889 117 365, fax: +48 42 657 9079

Niniejsza wiadomość wraz z załącznikami może zawierać chronione prawem
lub poufne informacje i została wysłana wyłącznie do wiadomości i
użytku osób, do których została zaadresowana. Jeśli wiadomość została
otrzymana przypadkowo zabrania się jej kopiowania lub rozsyłania do
osób trzecich. W takim przypadku uprasza się o natychmiastowe
zniszczenie wiadomości oraz poinformowanie nadawcy o zaistniałej
sytuacji za pomocą wiadomości zwrotnej. Dziękujemy.

This message, including any attachments hereto, may contain privileged
or confidential information and is sent solely for the attention and
use of the intended addressee(s). If you are not an intended addressee,
you may neither use this message nor copy or deliver it to anyone. In
such case, you should immediately destroy this message and kindly notify
the sender by reply email. Thank you.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-11 14:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-21 11:01 [OE-code][PATCH] wic: include partition label in fs image file name Maciej Borzecki
2014-07-21 21:23 ` Tom Zanussi
2014-08-11 14:17   ` Maciek Borzecki
  -- strict thread matches above, loose matches on Subject: below --
2014-07-27 19:01 Maciek Borzecki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox