2007-08-07 14:02:38 +02:00
|
|
|
#include <lib.h>
|
2010-01-05 20:39:27 +01:00
|
|
|
#define mapdriver _mapdriver
|
|
|
|
#include <string.h>
|
2007-08-07 14:02:38 +02:00
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
|
2010-04-09 23:56:44 +02:00
|
|
|
PUBLIC int mapdriver(label, major, dev_style, flags)
|
2007-08-07 14:02:38 +02:00
|
|
|
char *label;
|
|
|
|
int major;
|
|
|
|
int dev_style;
|
2010-04-09 23:56:44 +02:00
|
|
|
int flags;
|
2007-08-07 14:02:38 +02:00
|
|
|
{
|
|
|
|
message m;
|
|
|
|
m.m2_p1 = label;
|
2010-01-05 20:39:27 +01:00
|
|
|
m.m2_l1 = strlen(label);
|
2007-08-07 14:02:38 +02:00
|
|
|
m.m2_i1 = major;
|
|
|
|
m.m2_i2 = dev_style;
|
2010-04-09 23:56:44 +02:00
|
|
|
m.m2_i3 = flags;
|
2010-06-08 15:58:01 +02:00
|
|
|
if (_syscall(VFS_PROC_NR, MAPDRIVER, &m) < 0) return(-1);
|
2007-08-07 14:02:38 +02:00
|
|
|
return(0);
|
|
|
|
}
|
|
|
|
|