DistroKit Mailinglist
 help / color / mirror / Atom feed
From: "Enrico Weigelt, metux IT consult" <lkml@metux.net>
To: DistroKit@pengutronix.de
Subject: [DistroKit] patch for genimage-12: fix -ENOTTY error
Date: Mon, 12 Oct 2020 18:18:33 +0200	[thread overview]
Message-ID: <afcc6b3d-0287-72c3-c46d-0e7e5f8d1319@metux.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

Hi folks,


Under some circumstances, FS_IOC_FIEMAP ioctl maybe return -ENOTTY
(possibly on multiarch setup - 32bit userland on 64bit kernel).
This is case isn't exctly an error, instead another variant of
operation not supported. Therefore treat it the same like EOPNOTSUPP.

See attachment.


--mtx

-- 
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

[-- Attachment #2: 0001-fix-enotty.patch --]
[-- Type: text/x-patch, Size: 497 bytes --]

diff -ruN genimage-13.1/util.c genimage-13/util.c
--- genimage-13.orig/util.c	2020-10-07 22:54:05.448271228 +0200
+++ genimage-13/util.c	2020-05-08 09:32:35.201970284 +0200
@@ -387,7 +387,7 @@
 	free(fiemap);
 
 	/* If failure is due to no filesystem support, return a single extent */
-	if (ret == -EOPNOTSUPP)
+	if ((ret == -EOPNOTSUPP) || (ret == -ENOTTY))
 		return whole_file_exent(size, extents, extent_count);
 
 	image_error(image, "fiemap %s: %d %s\n", filename, errno, strerror(errno));

[-- Attachment #3: Type: text/plain, Size: 96 bytes --]

_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

             reply	other threads:[~2020-10-12 16:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-12 16:18 Enrico Weigelt, metux IT consult [this message]
2020-10-13 12:40 ` Roland Hieber
2020-10-14 11:58   ` Michael Olbrich

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=afcc6b3d-0287-72c3-c46d-0e7e5f8d1319@metux.net \
    --to=lkml@metux.net \
    --cc=DistroKit@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