[PATCH] commands: truncate: report errors from ftruncate()

Sascha Hauer s.hauer at pengutronix.de
Tue Oct 20 06:57:29 PDT 2026


On Thu, 15 Oct 2026 16:08:11 +0200, Ahmad Fatoum wrote:
> ftruncate() and fstat() return a negative error code, not -1, so the
> command only noticed an -EPERM and otherwise exited with 0 even when the
> file wasn't resized, e.g. on a size ubootvarfs has no room for.
> 
> Let's check for any negative return value instead.
> 
> 
> [...]

Applied, thanks!

[1/1] commands: truncate: report errors from ftruncate()
      https://git.pengutronix.de/cgit/barebox/commit/?id=d9ba097d957d (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer at pengutronix.de>




More information about the barebox mailing list