From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [wic][PATCH 1/2] wic: rawcopy: ensure comparison is done on int
Date: Tue, 7 Apr 2015 13:40:06 +0300 [thread overview]
Message-ID: <20150407104006.GA19718@linux.intel.com> (raw)
In-Reply-To: <1428402119-31945-1-git-send-email-alexandre.belloni@free-electrons.com>
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
prev parent reply other threads:[~2015-04-07 10:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Ed Bartosh [this message]
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=20150407104006.GA19718@linux.intel.com \
--to=ed.bartosh@linux.intel.com \
--cc=alexandre.belloni@free-electrons.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 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.