Driver mapping refactory.

VFS CHANGES:
- dmap table no longer statically initialized in VFS
- Dropped FSSIGNON svrctl call no longer used by INET

INET CHANGES:
- INET announces its presence to VFS just like any other driver

RS CHANGES:
- The boot image dev table contains all the data to initialize VFS' dmap table
- RS interface supports asynchronous up and update operations now
- RS interface extended to support driver style and flags
This commit is contained in:
Cristiano Giuffrida
2010-04-09 21:56:44 +00:00
parent c1bfcc9119
commit 65ef539739
34 changed files with 357 additions and 280 deletions

View File

@@ -12,8 +12,8 @@ SRCS= buf.c clock.c inet.c inet_config.c \
.PATH: ${.CURDIR}/generic
DPADD+= ${LIBSYS}
LDADD+= -lsys
DPADD+= ${LIBDRIVER} ${LIBSYS}
LDADD+= -ldriver -lsys
MAN=

View File

@@ -51,6 +51,8 @@ from DL_ETH:
#include <sys/svrctl.h>
#include <minix/ds.h>
#include <minix/endpoint.h>
#include <minix/drivers.h>
#include <minix/driver.h>
#include "mq.h"
#include "qp.h"
@@ -215,7 +217,6 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info)
int r;
int timerand, fd;
endpoint_t tasknr;
struct fssignon device;
u8_t randbits[32];
struct timeval tv;
char my_name[32];
@@ -272,15 +273,6 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info)
ip_panic(("inet: sys_whoami failed for 'inet': %d", r));
this_proc= tasknr;
/* Register the device group. */
device.dev= ip_dev;
device.style= STYLE_CLONE;
if (svrctl(FSSIGNON, (void *) &device) == -1) {
printf("inet: error %d on registering ethernet devices\n",
errno);
pause();
}
#ifdef BUF_CONSISTENCY_CHECK
inet_buf_debug= (getenv("inetbufdebug") &&
(strcmp(getenv("inetbufdebug"), "on") == 0));
@@ -305,6 +297,11 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info)
ip_panic(("inet: can't subscribe to driver events"));
}
/* Announce we are up. INET announces its presence to VFS just like
* any other driver.
*/
driver_announce();
return(OK);
}