minix/lib/other/minix_rs.c
Tomas Hruby ee4cff8d66 2 copies of taskcall.c removed
- taskcall.c is 3x in the trunk as part of libc, libsysutil and
  libsys.  It should be only part of libsys.

- only system process should be linked with libsys, therefore using
  raw _taskcall() in service.c is replaced by _syscall()

- the same for minix_rs.c

- lib/other/sys_eniop.c can go without replacement as it is part of
  syslib
2010-01-25 14:22:09 +00:00

38 lines
663 B
C

#define _SYSTEM 1
#define _MINIX 1
#include <minix/callnr.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 <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;
m.RS_NAME = (char *) name;
m.RS_NAME_LEN = len_key;
if (_syscall(RS_PROC_NR, RS_LOOKUP, &m) != -1) {
*value = m.RS_ENDPOINT;
return OK;
}
return -1;
}