On Tue, Jul 18, 2023 at 11:53:54AM +0200, Sergei Shtepa wrote: > > Seems a bit weird to have a signed error code that is always negative. > > Couldn't this be an unsigned number or directly return the error from > > the ioctl() itself? > > Yes, it's a good idea to pass the error code as an unsigned value. > And this positive value can be passed in case of successful execution > of ioctl(), but I would not like to put different error signs in one value. Linux tends to use negative error values in basically all interfaces. I think it will be less confusing to stick to that.