2001-11-06 11:23:34

by Andy Jeffries

[permalink] [raw]
Subject: Safe error numbers for User-defined return values


Hi,

I want to define custom return values for my ioctl calls in my Kernel module. What is the recommended start value for user defined constants? I notice asm/errno.h only goes up to 124 (in 2.4.12), so should I start at 125 or should I start at 200 to be safe?

I probably only need 30 or so different codes.

Thanks,


--
Andy Jeffries | Scramdisk Linux Project
http://www.scramdisklinux.org | Lead developer


2001-11-06 11:54:32

by Alan

[permalink] [raw]
Subject: Re: Safe error numbers for User-defined return values

> I want to define custom return values for my ioctl calls in my Kernel
> module. What is the recommended start value for user defined constants?
> I notice asm/errno.h only goes up to 124 (in 2.4.12), so should I start at
> 125 or should I start at 200 to be safe?
>
> I probably only need 30 or so different codes.

You want to return non base errno codes in a different field and return
real errno codes by return value. If everyone simple invented private
returns for ioctl all hell would break loose