DistroKit Mailinglist
 help / color / mirror / Atom feed
* [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

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