29c29
< * $FreeBSD: head/sys/dev/twe/twe_freebsd.c 123103 2003-12-02 07:57:20Z ps $
---
> * $FreeBSD: head/sys/dev/twe/twe_freebsd.c 125975 2004-02-18 21:36:53Z phk $
643c643
< struct disk twed_disk; /* generic disk handle */
---
> struct disk *twed_disk; /* generic disk handle */
808,817d807
< sc->twed_disk.d_open = twed_open;
< sc->twed_disk.d_strategy = twed_strategy;
< sc->twed_disk.d_dump = (dumper_t *)twed_dump;
< sc->twed_disk.d_name = "twed";
< sc->twed_disk.d_drv1 = sc;
< sc->twed_disk.d_maxsize = (TWE_MAX_SGL_LENGTH - 1) * PAGE_SIZE;
< sc->twed_disk.d_sectorsize = TWE_BLOCK_SIZE;
< sc->twed_disk.d_mediasize = TWE_BLOCK_SIZE * (off_t)sc->twed_drive->td_size;
< sc->twed_disk.d_fwsectors = sc->twed_drive->td_sectors;
< sc->twed_disk.d_fwheads = sc->twed_drive->td_heads;
820c810,825
< disk_create(sc->twed_drive->td_sys_unit, &sc->twed_disk, 0, NULL, NULL);
---
> sc->twed_disk = disk_alloc();
> sc->twed_disk->d_open = twed_open;
> sc->twed_disk->d_strategy = twed_strategy;
> sc->twed_disk->d_dump = (dumper_t *)twed_dump;
> sc->twed_disk->d_name = "twed";
> sc->twed_disk->d_drv1 = sc;
> sc->twed_disk->d_maxsize = (TWE_MAX_SGL_LENGTH - 1) * PAGE_SIZE;
> sc->twed_disk->d_sectorsize = TWE_BLOCK_SIZE;
> sc->twed_disk->d_mediasize = TWE_BLOCK_SIZE * (off_t)sc->twed_drive->td_size;
> sc->twed_disk->d_fwsectors = sc->twed_drive->td_sectors;
> sc->twed_disk->d_fwheads = sc->twed_drive->td_heads;
> sc->twed_disk->d_unit = sc->twed_drive->td_sys_unit;
> sc->twed_disk->d_flags = DISKFLAG_NEEDSGIANT;
>
> disk_create(sc->twed_disk, DISK_VERSION);
>
840c845
< if (sc->twed_disk.d_flags & DISKFLAG_OPEN)
---
> if (sc->twed_disk->d_flags & DISKFLAG_OPEN)
843c848
< disk_destroy(&sc->twed_disk);
---
> disk_destroy(sc->twed_disk);
< * $FreeBSD: head/sys/dev/twe/twe_freebsd.c 123103 2003-12-02 07:57:20Z ps $
---
> * $FreeBSD: head/sys/dev/twe/twe_freebsd.c 125975 2004-02-18 21:36:53Z phk $
643c643
< struct disk twed_disk; /* generic disk handle */
---
> struct disk *twed_disk; /* generic disk handle */
808,817d807
< sc->twed_disk.d_open = twed_open;
< sc->twed_disk.d_strategy = twed_strategy;
< sc->twed_disk.d_dump = (dumper_t *)twed_dump;
< sc->twed_disk.d_name = "twed";
< sc->twed_disk.d_drv1 = sc;
< sc->twed_disk.d_maxsize = (TWE_MAX_SGL_LENGTH - 1) * PAGE_SIZE;
< sc->twed_disk.d_sectorsize = TWE_BLOCK_SIZE;
< sc->twed_disk.d_mediasize = TWE_BLOCK_SIZE * (off_t)sc->twed_drive->td_size;
< sc->twed_disk.d_fwsectors = sc->twed_drive->td_sectors;
< sc->twed_disk.d_fwheads = sc->twed_drive->td_heads;
820c810,825
< disk_create(sc->twed_drive->td_sys_unit, &sc->twed_disk, 0, NULL, NULL);
---
> sc->twed_disk = disk_alloc();
> sc->twed_disk->d_open = twed_open;
> sc->twed_disk->d_strategy = twed_strategy;
> sc->twed_disk->d_dump = (dumper_t *)twed_dump;
> sc->twed_disk->d_name = "twed";
> sc->twed_disk->d_drv1 = sc;
> sc->twed_disk->d_maxsize = (TWE_MAX_SGL_LENGTH - 1) * PAGE_SIZE;
> sc->twed_disk->d_sectorsize = TWE_BLOCK_SIZE;
> sc->twed_disk->d_mediasize = TWE_BLOCK_SIZE * (off_t)sc->twed_drive->td_size;
> sc->twed_disk->d_fwsectors = sc->twed_drive->td_sectors;
> sc->twed_disk->d_fwheads = sc->twed_drive->td_heads;
> sc->twed_disk->d_unit = sc->twed_drive->td_sys_unit;
> sc->twed_disk->d_flags = DISKFLAG_NEEDSGIANT;
>
> disk_create(sc->twed_disk, DISK_VERSION);
>
840c845
< if (sc->twed_disk.d_flags & DISKFLAG_OPEN)
---
> if (sc->twed_disk->d_flags & DISKFLAG_OPEN)
843c848
< disk_destroy(&sc->twed_disk);
---
> disk_destroy(sc->twed_disk);