source: trunk/minix/lib/other/syscall.c@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 424 bytes
Line 
1#include <lib.h>
2
3PUBLIC int _syscall(who, syscallnr, msgptr)
4int who;
5int syscallnr;
6register message *msgptr;
7{
8 int status;
9
10 msgptr->m_type = syscallnr;
11 status = _sendrec(who, msgptr);
12 if (status != 0) {
13 /* 'sendrec' itself failed. */
14 /* XXX - strerror doesn't know all the codes */
15 msgptr->m_type = status;
16 }
17 if (msgptr->m_type < 0) {
18 errno = -msgptr->m_type;
19 return(-1);
20 }
21 return(msgptr->m_type);
22}
Note: See TracBrowser for help on using the repository browser.