. pci driver now returns devices, even when they have been pci_reserve()d
[minix3.git] / lib / other / syscall.c
blobe397ae32a919fb54144aeca4703e380c799ee0d8
1 #include <lib.h>
3 PUBLIC int _syscall(who, syscallnr, msgptr)
4 int who;
5 int syscallnr;
6 register message *msgptr;
8 int status;
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;
17 if (msgptr->m_type < 0) {
18 errno = -msgptr->m_type;
19 return(-1);
21 return(msgptr->m_type);