===================================================================
RCS file: RCS/modload.8,v
retrieving revision 1.1
diff -c -r1.1 modload.8
*** 1.1	1994/09/17 14:00:37
--- modload.8	1994/09/17 14:22:50
***************
*** 73,80 ****
  be executed if the module is successfully loaded. It
  is always passed the module id (in decimal) and module
  type (in hexadecimal) as the first two arguments.
! For loadable drivers, the third and fourth arguments are
! the block major and character major numbers respectively.
  For a loadable system call, the third argument is the system
  call number.
  .It Fl o Ar output_file
--- 73,80 ----
  be executed if the module is successfully loaded. It
  is always passed the module id (in decimal) and module
  type (in hexadecimal) as the first two arguments.
! For loadable drivers, the third argument is
! the block or character major device number.
  For a loadable system call, the third argument is the system
  call number.
  .It Fl o Ar output_file
***************
*** 112,115 ****
  .El
  .Sh BUGS
  Loadable streams modules and loadable execution interpreters
! are not currently supported.
--- 112,116 ----
  .El
  .Sh BUGS
  Loadable streams modules and loadable execution interpreters
! are not currently supported.  The loadable device driver framework can
! only reserve either a character or block device entry, not both.
===================================================================
RCS file: RCS/modload.c,v
retrieving revision 1.1
diff -c -r1.1 modload.c
*** 1.1	1994/09/17 13:46:43
--- modload.c	1994/09/17 14:22:42
***************
*** 212,218 ****
  		errx(2, "module object must end in .o");
  	if (out == NULL) {
  		out = modout;
! 		*p == 0;
  	}
  
  	/*
--- 212,218 ----
  		errx(2, "module object must end in .o");
  	if (out == NULL) {
  		out = modout;
! 		*p = 0;
  	}
  
  	/*
***************
*** 331,335 ****
--- 331,350 ----
  	fileopen &= ~PART_RESRV;	/* loaded */
  	printf("Module loaded as ID %d\n", resrv.slot);
  
+ 	if (post) {
+ 	    struct lmc_stat sbuf;
+ 	    char id[16], type[16], offset[16];
+ 
+ 	    sbuf.id = resrv.slot;
+ 	    if (ioctl(devfd, LMSTAT, &sbuf) == -1)
+ 		err(15, "error fetching module stats for post-install");
+ 	    sprintf(id, "%d", sbuf.id);
+ 	    sprintf(type, "0x%x", sbuf.type);
+ 	    sprintf(offset, "%d", sbuf.offset);
+ 	    /* XXX the modload docs say that drivers can install bdevsw &
+ 	       cdevsw, but the interface only supports one at a time.  sigh. */
+ 	    execl(post, post, id, type, offset, 0);
+ 	    err(16, "can't exec '%s'", post);
+ 	}
  	return 0;
  }
