blob: 7e616bb0cbb394c3dcc582b1eb87d8504ceb52f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#include "syslib.h"
#include <string.h>
#include <unistd.h>
int
mapdriver(const char * label, devmajor_t major, const int * domains,
int ndomains)
{
message m;
int i;
memset(&m, 0, sizeof(m));
m.m_lsys_vfs_mapdriver.label = (vir_bytes)label;
m.m_lsys_vfs_mapdriver.labellen = strlen(label) + 1;
m.m_lsys_vfs_mapdriver.major = major;
m.m_lsys_vfs_mapdriver.ndomains = ndomains;
if (ndomains > (int)__arraycount(m.m_lsys_vfs_mapdriver.domains))
ndomains = (int)__arraycount(m.m_lsys_vfs_mapdriver.domains);
for (i = 0; i < ndomains; i++)
m.m_lsys_vfs_mapdriver.domains[i] = domains[i];
return _taskcall(VFS_PROC_NR, VFS_MAPDRIVER, &m);
}
|