Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1634436
| From | Miklos Szeredi <miklos@szeredi.hu> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | error value for "internal error" |
| Date | 2017-05-02 16:10 +0200 |
| Message-ID | <tCGF3-7GU-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
I've been wondering what to return for soft asserts like this:
if (WARN_ON(something unexpected))
return -E????;
EINVAL doesn't fit because it means the input from userspace was
wrong. EIO means something went bad with the hardware.
There's no "software error" or "internal error" type return code.
Would it make sense to introduce one?
Rule would be to always add more detail to dmesg (such as done by
WARN_ON) when such a code is returned.
Thanks,
Miklos
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
error value for "internal error" Miklos Szeredi <miklos@szeredi.hu> - 2017-05-02 16:10 +0200
Re: error value for "internal error" Linus Torvalds <torvalds@linux-foundation.org> - 2017-05-02 20:40 +0200
Re: error value for "internal error" Miklos Szeredi <miklos@szeredi.hu> - 2017-05-03 11:20 +0200
csiph-web