All of lore.kernel.org
 help / color / mirror / Atom feed
* [wic][PATCH 1/2] wic: rawcopy: ensure comparison is done on int
@ 2015-04-07 10:21 Alexandre Belloni
  2015-04-07 10:21 ` [wic][PATCH 2/2] wic: support ontrackdm6aux3 partitions Alexandre Belloni
  2015-04-07 10:40 ` [wic][PATCH 1/2] wic: rawcopy: ensure comparison is done on int Ed Bartosh
  0 siblings, 2 replies; 4+ messages in thread
From: Alexandre Belloni @ 2015-04-07 10:21 UTC (permalink / raw)
  To: openembedded-core

The size comparison may fail because it is done on strings rather than
integers.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 scripts/lib/wic/plugins/source/rawcopy.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py
index cf6236a04f91..ba7fda787ed7 100644
--- a/scripts/lib/wic/plugins/source/rawcopy.py
+++ b/scripts/lib/wic/plugins/source/rawcopy.py
@@ -77,7 +77,7 @@ class RawCopyPlugin(SourcePlugin):
         out = exec_cmd(du_cmd)
         filesize = out.split()[0]
 
-        if filesize > part.size:
+        if int(filesize) > int(part.size):
             part.size = filesize
 
         part.source_file = dst
-- 
2.1.0



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

* [wic][PATCH 2/2] wic: support ontrackdm6aux3 partitions
  2015-04-07 10:21 [wic][PATCH 1/2] wic: rawcopy: ensure comparison is done on int Alexandre Belloni
@ 2015-04-07 10:21 ` Alexandre Belloni
  2015-04-07 10:40   ` Ed Bartosh
  2015-04-07 10:40 ` [wic][PATCH 1/2] wic: rawcopy: ensure comparison is done on int Ed Bartosh
  1 sibling, 1 reply; 4+ messages in thread
From: Alexandre Belloni @ 2015-04-07 10:21 UTC (permalink / raw)
  To: openembedded-core

ontrack dm6 aux3 is a type of partition required to be able to boot a Freescale
mxs based platform.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 scripts/lib/wic/utils/partitionedfs.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index 162f8e1b9c6a..f394abc764c7 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -296,6 +296,8 @@ class Image:
                 parted_fs_type = "fat32"
             elif p['fstype'] == "msdos":
                 parted_fs_type = "fat16"
+            elif p['fstype'] == "ontrackdm6aux3":
+                parted_fs_type = "ontrackdm6aux3"
             else:
                 # Type for ext2/ext3/ext4/btrfs
                 parted_fs_type = "ext2"
-- 
2.1.0



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

* Re: [wic][PATCH 1/2] wic: rawcopy: ensure comparison is done on int
  2015-04-07 10:21 [wic][PATCH 1/2] wic: rawcopy: ensure comparison is done on int Alexandre Belloni
  2015-04-07 10:21 ` [wic][PATCH 2/2] wic: support ontrackdm6aux3 partitions Alexandre Belloni
@ 2015-04-07 10:40 ` Ed Bartosh
  1 sibling, 0 replies; 4+ messages in thread
From: Ed Bartosh @ 2015-04-07 10:40 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: openembedded-core

On Tue, Apr 07, 2015 at 12:21:58PM +0200, Alexandre Belloni wrote:
> The size comparison may fail because it is done on strings rather than
> integers.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
>  scripts/lib/wic/plugins/source/rawcopy.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py
> index cf6236a04f91..ba7fda787ed7 100644
> --- a/scripts/lib/wic/plugins/source/rawcopy.py
> +++ b/scripts/lib/wic/plugins/source/rawcopy.py
> @@ -77,7 +77,7 @@ class RawCopyPlugin(SourcePlugin):
>          out = exec_cmd(du_cmd)
>          filesize = out.split()[0]
>  
> -        if filesize > part.size:
> +        if int(filesize) > int(part.size):
>              part.size = filesize
>  
>          part.source_file = dst

Acked-by: Ed Bartosh <ed.bartosh@linux.intel.com>

--
Regards,
Ed


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

* Re: [wic][PATCH 2/2] wic: support ontrackdm6aux3 partitions
  2015-04-07 10:21 ` [wic][PATCH 2/2] wic: support ontrackdm6aux3 partitions Alexandre Belloni
@ 2015-04-07 10:40   ` Ed Bartosh
  0 siblings, 0 replies; 4+ messages in thread
From: Ed Bartosh @ 2015-04-07 10:40 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: openembedded-core

On Tue, Apr 07, 2015 at 12:21:59PM +0200, Alexandre Belloni wrote:
> ontrack dm6 aux3 is a type of partition required to be able to boot a Freescale
> mxs based platform.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
>  scripts/lib/wic/utils/partitionedfs.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
> index 162f8e1b9c6a..f394abc764c7 100644
> --- a/scripts/lib/wic/utils/partitionedfs.py
> +++ b/scripts/lib/wic/utils/partitionedfs.py
> @@ -296,6 +296,8 @@ class Image:
>                  parted_fs_type = "fat32"
>              elif p['fstype'] == "msdos":
>                  parted_fs_type = "fat16"
> +            elif p['fstype'] == "ontrackdm6aux3":
> +                parted_fs_type = "ontrackdm6aux3"
>              else:
>                  # Type for ext2/ext3/ext4/btrfs
>                  parted_fs_type = "ext2"

Acked-by: Ed Bartosh <ed.bartosh@linux.intel.com>

--
Regards,
Ed


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

end of thread, other threads:[~2015-04-07 10:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-07 10:21 [wic][PATCH 1/2] wic: rawcopy: ensure comparison is done on int Alexandre Belloni
2015-04-07 10:21 ` [wic][PATCH 2/2] wic: support ontrackdm6aux3 partitions Alexandre Belloni
2015-04-07 10:40   ` Ed Bartosh
2015-04-07 10:40 ` [wic][PATCH 1/2] wic: rawcopy: ensure comparison is done on int Ed Bartosh

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.