Blaisorblade wrote:
On Wednesday 06 April 2005 21:26, Bodo Stroesser wrote:
Currently they are the same for 2.4 and 2.6, but worst case that might
change in future versions.

Yes maybe in principle, however the errno values are part of the ABI.
I agree.

Only debugger could note this, as ERESTART_XXXX is unvisible to user programs.

Well, the debugger is a user program, so even this one, which is almost internal, is part of the ABI.
I agree.

#ifndef ERESTARTNOINTR
#define ERESTARTNOINTR KERN_ERESTARTNOINTR
#endif
This is the solution, I like.
Here is, what strace programmers do, to decode ERESTARTXXXXX
results (from syscall.c):

... snip ...
#include <errno.h>
... snip ...
#ifdef LINUX
#ifndef ERESTARTSYS
#define ERESTARTSYS     512
#endif
#ifndef ERESTARTNOINTR
#define ERESTARTNOINTR  513
#endif
#ifndef ERESTARTNOHAND
#define ERESTARTNOHAND  514     /* restart if no handler.. */
#endif
#ifndef ENOIOCTLCMD
#define ENOIOCTLCMD     515     /* No ioctl command */
#endif
#ifndef ERESTART_RESTARTBLOCK
#define ERESTART_RESTARTBLOCK 516       /* restart by calling 
sys_restart_syscall */
#endif
#ifndef NSIG
#define NSIG 32
#endif
#ifdef ARM
#undef NSIG
#define NSIG 32
#undef NR_SYSCALL_BASE
#define NR_SYSCALL_BASE __NR_SYSCALL_BASE
#endif
#endif /* LINUX */
... snip ...

So, I'll modify my patch as you suggested.

        Bodo


------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to