- introduce new call numbers, names, and field aliases; - initialize request messages to zero for all ABI calls; - format callnr.h in the same way as com.h; - redo call tables in both servers; - remove param.h namespace pollution in the servers; - make brk(2) go to VM directly, rather than through PM; - remove obsolete BRK, UTIME, and WAIT calls; - clean up path copying routine in VFS; - move remaining system calls from libminlib to libc; - correct some errno-related mistakes in libc routines. Change-Id: I2d8ec5d061cd7e0b30c51ffd77aa72ebf84e2565
40 lines
704 B
C
40 lines
704 B
C
#define _SYSTEM 1
|
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#include <minix/com.h>
|
|
#include <minix/config.h>
|
|
#include <minix/ipc.h>
|
|
#include <minix/endpoint.h>
|
|
#include <minix/sysutil.h>
|
|
#include <minix/syslib.h>
|
|
#include <minix/const.h>
|
|
#include <minix/type.h>
|
|
#include <minix/ds.h>
|
|
#include <minix/rs.h>
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <errno.h>
|
|
#include <string.h>
|
|
#include <lib.h>
|
|
|
|
int minix_rs_lookup(const char *name, endpoint_t *value)
|
|
{
|
|
message m;
|
|
size_t len_key;
|
|
|
|
len_key = strlen(name)+1;
|
|
|
|
memset(&m, 0, sizeof(m));
|
|
m.RS_NAME = (char *) __UNCONST(name);
|
|
m.RS_NAME_LEN = len_key;
|
|
|
|
if (_syscall(RS_PROC_NR, RS_LOOKUP, &m) != -1) {
|
|
*value = m.RS_ENDPOINT;
|
|
return OK;
|
|
}
|
|
|
|
return -1;
|
|
}
|
|
|