Subject: fdclose conflict
To: None <amiga-dev@netbsd.org>
From: William Coldwell <billc@warp.cryogenic.com>
List: amiga-dev
Date: 12/05/1994 20:46:53
I diddled with conf.c and fd.c to fix a conflict with kern_descrip.c in the
latest sup, but ended up breaking my kernel with a jump to 0 MMU fault.

*** /ftp/src/sys/arch/amiga/dev/fd.c	Mon Dec  5 20:32:56 1994
--- fd.c	Mon Dec  5 18:41:55 1994
***************
*** 434,440 ****
  
  /*ARGSUSED*/
  int
! fdclose(dev, flags, devtype, p)
  	dev_t dev;
  	int flags, devtype;
  	struct proc *p;
--- 434,440 ----
  
  /*ARGSUSED*/
  int
! Fdclose(dev, flags, devtype, p)
  	dev_t dev;
  	int flags, devtype;
  	struct proc *p;
***************
*** 443,455 ****
  	int s;
  
  #ifdef FDDEBUG
! 	printf("fdclose()\n");
  #endif
  	sc = getsoftc(fdcd, FDUNIT(dev));
  	s = splbio();
  	if (sc->flags & FDF_MOTORON) {
  		sc->flags |= FDF_WMOTOROFF;
! 		tsleep(fdmotoroff, PRIBIO, "fdclose", 0);
  		sc->flags &= ~FDF_WMOTOROFF;
  		wakeup(fdmotoroff);
  	}
--- 443,455 ----
  	int s;
  
  #ifdef FDDEBUG
! 	printf("Fdclose()\n");
  #endif
  	sc = getsoftc(fdcd, FDUNIT(dev));
  	s = splbio();
  	if (sc->flags & FDF_MOTORON) {
  		sc->flags |= FDF_WMOTOROFF;
! 		tsleep(fdmotoroff, PRIBIO, "Fdclose", 0);
  		sc->flags &= ~FDF_WMOTOROFF;
  		wakeup(fdmotoroff);
  	}
*** /ftp/src/sys/arch/amiga/amiga/conf.c	Fri Dec  2 03:19:17 1994
--- conf.c	Mon Dec  5 18:52:23 1994
***************
*** 119,127 ****
  #include "fd.h"
  bdev_decl(fd);
  dev_decl(Fd,open);
  #define	bdev_floppy_init(c) { \
  	dev_init(c,Fd,open), \
! 	dev_init(c,fd,close), \
  	dev_init(c,fd,strategy), \
  	dev_init(c,fd,ioctl), \
  	(dev_type_dump((*))) enxio, \
--- 119,128 ----
  #include "fd.h"
  bdev_decl(fd);
  dev_decl(Fd,open);
+ dev_decl(Fd,close);
  #define	bdev_floppy_init(c) { \
  	dev_init(c,Fd,open), \
! 	dev_init(c,Fd,close), \
  	dev_init(c,fd,strategy), \
  	dev_init(c,fd,ioctl), \
  	(dev_type_dump((*))) enxio, \


Feel free to make fun of me and tell me what I did wrong ;-).

Cheers
-- 
William "Warped" Coldwell - IRC: Cryo - EMail: billc@warp.cryogenic.com 
I can't get no SatisFAXtion! - Custodial Engineer @ Intel Corp PCD
NetBSD/Amiga, Warp Engine, Grapevine mailing lists moderator 
My workstation is a 40MHz 68040, 256 color X Windows/BSD4.4 Amiga.  Is yours?