* [DistroKit] patch for genimage-12: fix -ENOTTY error
@ 2020-10-12 16:18 Enrico Weigelt, metux IT consult
2020-10-13 12:40 ` Roland Hieber
0 siblings, 1 reply; 3+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2020-10-12 16:18 UTC (permalink / raw)
To: DistroKit
[-- 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [DistroKit] patch for genimage-12: fix -ENOTTY error
2020-10-12 16:18 [DistroKit] patch for genimage-12: fix -ENOTTY error Enrico Weigelt, metux IT consult
@ 2020-10-13 12:40 ` Roland Hieber
2020-10-14 11:58 ` Michael Olbrich
0 siblings, 1 reply; 3+ messages in thread
From: Roland Hieber @ 2020-10-13 12:40 UTC (permalink / raw)
To: Enrico Weigelt, metux IT consult; +Cc: DistroKit
On Mon, Oct 12, 2020 at 06:18:33PM +0200, Enrico Weigelt, metux IT consult wrote:
> 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.
Thanks, could you also please submit a pull request on
<https://github.com/pengutronix/genimage/>?
- Roland
--
Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [DistroKit] patch for genimage-12: fix -ENOTTY error
2020-10-13 12:40 ` Roland Hieber
@ 2020-10-14 11:58 ` Michael Olbrich
0 siblings, 0 replies; 3+ messages in thread
From: Michael Olbrich @ 2020-10-14 11:58 UTC (permalink / raw)
To: Roland Hieber; +Cc: DistroKit, Enrico Weigelt, metux IT consult
On Tue, Oct 13, 2020 at 02:40:57PM +0200, Roland Hieber wrote:
> On Mon, Oct 12, 2020 at 06:18:33PM +0200, Enrico Weigelt, metux IT consult wrote:
> > 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.
>
> Thanks, could you also please submit a pull request on
> <https://github.com/pengutronix/genimage/>?
There is a pull request for this already[1]. It seems there are multiple
situations when this can happen.
Michael
[1] https://github.com/pengutronix/genimage/pull/116
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-14 11:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 16:18 [DistroKit] patch for genimage-12: fix -ENOTTY error Enrico Weigelt, metux IT consult
2020-10-13 12:40 ` Roland Hieber
2020-10-14 11:58 ` Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox