[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJfpegv3xS_MEVVeAnd4JUvjxoJd9PQdbsEzCPXNpUeex4SxHA@mail.gmail.com>
Date: Tue, 2 May 2017 16:03:34 +0200
From: Miklos Szeredi <miklos@...redi.hu>
To: linux-kernel@...r.kernel.org,
Linux API <linux-api@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: error 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
Powered by blists - more mailing lists