mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] fs: Fix can_lseek_backward()
Date: Fri, 17 Nov 2017 09:57:54 +0100	[thread overview]
Message-ID: <20171117085754.6hg3vc4pnzsvsavk@pengutronix.de> (raw)
In-Reply-To: <20171115222753.28426-1-andrew.smirnov@gmail.com>

On Wed, Nov 15, 2017 at 02:27:53PM -0800, Andrey Smirnov wrote:
> To quote corresponding man page:
> 
> "... Upon successful completion, lseek() returns the resulting offset
> location as measured in bytes from the beginning of the file."
> 
> Which for lseek(fd, 0, SEEK_SET) would be 0, so returning 'ret' as
> final step of the function would mean it'd never return anything but 0
> as well. Change the code to explicitly return '1' to fix the problem.
> 
> Fixes: 7c3f8d366 ("uimage: fix: add can_lseek_backward and use in uimage_open")
> Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
> 
> Sascha:
> 
> This change should probably also go to master, since without enabling
> TFTP would break 'bootm' for uImages (at least it does on my setup)

Yes, applied to master. I also created a stable/v2017.11 branch.

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:[~2017-11-17  8:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15 22:27 Andrey Smirnov
2017-11-16 11:07 ` Michael Grzeschik
2017-11-17  8:57 ` 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=20171117085754.6hg3vc4pnzsvsavk@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox