lkml.org 
[lkml]   [2017]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subjecterror value for "internal error"
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

\
 
 \ /
  Last update: 2017-05-02 16:04    [W:0.404 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site