Add libminlib for NBSD libc compilation.

This library includes various random and minix-specific functions
included in the Minix libc. Most of them should be part of libsys,
and in general it would be nice to extinguish this library over
time.
This commit is contained in:
Gianluca Guida
2011-03-22 13:47:35 +00:00
parent 6bcf58bab8
commit 878ba523ac
36 changed files with 1712 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
#include <lib.h>
#include <string.h>
#include <unistd.h>
PUBLIC int mapdriver(label, major, dev_style, flags)
char *label;
int major;
int dev_style;
int flags;
{
message m;
m.m2_p1 = label;
m.m2_l1 = strlen(label);
m.m2_i1 = major;
m.m2_i2 = dev_style;
m.m2_i3 = flags;
if (_syscall(VFS_PROC_NR, MAPDRIVER, &m) < 0) return(-1);
return(0);
}