linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] uapi: add EROBLK
@ 2024-11-19 15:54 Alexey Dobriyan
  2024-11-19 16:22 ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Dobriyan @ 2024-11-19 15:54 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-block, linux-api

Block drivers and DM sometimes use EROFS to report errors. There is
no confusion about what happens but naive error reporting code might
pass -EROFS to strerror(3) which will print "filesystem" when clearly
there is no filesystem anywhere, it is layer above.

Or in other words, if EROFS exists, why not EROBLK?
It is not like there is a tax on errno values.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 include/uapi/asm-generic/errno.h |    1 +
 1 file changed, 1 insertion(+)

--- a/include/uapi/asm-generic/errno.h
+++ b/include/uapi/asm-generic/errno.h
@@ -119,5 +119,6 @@
 #define ERFKILL		132	/* Operation not possible due to RF-kill */
 
 #define EHWPOISON	133	/* Memory page has hardware error */
+#define EROBLK		134	/* Block device is read-only */
 
 #endif

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-11-19 17:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-19 15:54 [PATCH] uapi: add EROBLK Alexey Dobriyan
2024-11-19 16:22 ` Christoph Hellwig
2024-11-19 17:20   ` Alexey Dobriyan
2024-11-19 17:27     ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).