mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Markus Pargmann <mpa@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 4/4] fastboot: Add a ARM Barebox filetype handler
Date: Fri, 11 Mar 2016 08:07:13 +0100	[thread overview]
Message-ID: <20160311070713.GC31470@pengutronix.de> (raw)
In-Reply-To: <1455708500-980-4-git-send-email-mpa@pengutronix.de>

On Wed, Feb 17, 2016 at 12:28:20PM +0100, Markus Pargmann wrote:
> +	if (filetype_is_barebox_image(filetype)) {
> +		struct bbu_data data = {
> +			.devicefile = filename,
> +			.imagefile = FASTBOOT_TMPFILE,
> +			.flags = BBU_FLAG_YES,
> +		};
> +
> +		if (!barebox_update_handler_exists(&data))
> +			goto copy;
> +
> +		fastboot_tx_print(f_fb, "INFOThis is an ARM Barebox image...");
> +
> +		data.image = read_file(data.imagefile, &data.len);
> +		if (!data.image) {
> +			fastboot_tx_print(f_fb, "FAILreading barebox");
> +			return;
> +		}
> +
> +		ret = barebox_update(&data);

data.image must be freed after use. Added this.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2016-03-11  7:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-17 11:28 [PATCH v2 1/4] bbu: Add barebox_update search by device Markus Pargmann
2016-02-17 11:28 ` [PATCH v2 2/4] bbu: Add function to check if an update handler exists Markus Pargmann
2016-02-17 11:28 ` [PATCH v2 3/4] fastboot: Fix usage of ubiformat for UBI image transfers Markus Pargmann
2016-02-17 11:28 ` [PATCH v2 4/4] fastboot: Add a ARM Barebox filetype handler Markus Pargmann
2016-02-18  8:22   ` Michael Olbrich
2016-02-19  7:44     ` Sascha Hauer
2016-03-11  7:07   ` Sascha Hauer [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=20160311070713.GC31470@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=mpa@pengutronix.de \
    /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