On Mon, 2015-03-30 at 08:37 +0200, Cedric Le Goater wrote:
> On 03/30/2015 04:05 AM, Michael Ellerman wrote:
> > On Fri, 2015-03-27 at 17:39 +0100, Cédric Le Goater wrote:
> >> OPAL has its own list of return codes. The patch provides a translation
> >> of such codes in errnos for the opal_sensor_read call, and possibly 
> >> others if needed.
> >>
> >> +  case OPAL_UNSUPPORTED:          return -ENOSYS;
> > 
> > You shouldn't use ENOSYS here, that should only ever mean "no such syscall",
> > otherwise you get very confusing results like read() returning ENOSYS.
> 
> Indeed. How about ENODEV then ? 

That can also be confusing from userspace.

I think it's probably best just to use EIO, as far as userspace is concerned if
the kernel lets it call an unsupported OPAL routine that is more or less a
kernel bug.

cheers


_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to