[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH for-next 1/9] gcov: return ENOSYS for unimplemented gcov domctl



>>> On 26.10.17 at 11:19, <roger.pau@xxxxxxxxxx> wrote:
> --- a/xen/common/gcov/gcov.c
> +++ b/xen/common/gcov/gcov.c
> @@ -239,7 +239,7 @@ int sysctl_gcov_op(struct xen_sysctl_gcov_op *op)
>          break;
>  
>      default:
> -        ret = -EINVAL;
> +        ret = -ENOSYS;
>          break;
>      }

Very certainly ENOSYS is not in any way better. Despite the many
misuses of it, we've started enforcing that this wouldn't be spread.
-EOPNOTSUPP may be fine here, but -EINVAL is suitable as well.
-ENOSYS exclusively means that a _top level_ hypercall is
unimplemented (i.e. with very few exceptions there should be
exactly one place where it gets returned, which is in the main
hypercall dispatch code).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.