From: Alexey Dobriyan <adobriyan@gmail.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, linux-api@vger.kernel.org
Subject: [PATCH] uapi: add EROBLK
Date: Tue, 19 Nov 2024 18:54:52 +0300 [thread overview]
Message-ID: <9184b5e8-7070-4395-b179-4975b2e3fbc3@p183> (raw)
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
next reply other threads:[~2024-11-19 15:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-19 15:54 Alexey Dobriyan [this message]
2024-11-19 16:22 ` [PATCH] uapi: add EROBLK Christoph Hellwig
2024-11-19 17:20 ` Alexey Dobriyan
2024-11-19 17:27 ` Christoph Hellwig
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=9184b5e8-7070-4395-b179-4975b2e3fbc3@p183 \
--to=adobriyan@gmail.com \
--cc=axboe@kernel.dk \
--cc=linux-api@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
/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