Drop main() prototype. Syncs with NetBSD-8
[minix.git] / minix / lib / libsys / mapdriver.c
blob7e616bb0cbb394c3dcc582b1eb87d8504ceb52f0
1 #include "syslib.h"
3 #include <string.h>
4 #include <unistd.h>
6 int
7 mapdriver(const char * label, devmajor_t major, const int * domains,
8 int ndomains)
10 message m;
11 int i;
13 memset(&m, 0, sizeof(m));
14 m.m_lsys_vfs_mapdriver.label = (vir_bytes)label;
15 m.m_lsys_vfs_mapdriver.labellen = strlen(label) + 1;
16 m.m_lsys_vfs_mapdriver.major = major;
17 m.m_lsys_vfs_mapdriver.ndomains = ndomains;
18 if (ndomains > (int)__arraycount(m.m_lsys_vfs_mapdriver.domains))
19 ndomains = (int)__arraycount(m.m_lsys_vfs_mapdriver.domains);
20 for (i = 0; i < ndomains; i++)
21 m.m_lsys_vfs_mapdriver.domains[i] = domains[i];
23 return _taskcall(VFS_PROC_NR, VFS_MAPDRIVER, &m);