59c59
< __FBSDID("$FreeBSD: head/sys/dev/amr/amr_disk.c 120988 2003-10-10 22:49:40Z ps $");
---
> __FBSDID("$FreeBSD: head/sys/dev/amr/amr_disk.c 125975 2004-02-18 21:36:53Z phk $");
137,140c137,140
< sc->amrd_disk.d_sectorsize = AMR_BLKSIZE;
< sc->amrd_disk.d_mediasize = (off_t)sc->amrd_drive->al_size * AMR_BLKSIZE;
< sc->amrd_disk.d_fwsectors = sc->amrd_drive->al_sectors;
< sc->amrd_disk.d_fwheads = sc->amrd_drive->al_heads;
---
> sc->amrd_disk->d_sectorsize = AMR_BLKSIZE;
> sc->amrd_disk->d_mediasize = (off_t)sc->amrd_drive->al_size * AMR_BLKSIZE;
> sc->amrd_disk->d_fwsectors = sc->amrd_drive->al_sectors;
> sc->amrd_disk->d_fwheads = sc->amrd_drive->al_heads;
250,256c250,259
< sc->amrd_disk.d_drv1 = sc;
< sc->amrd_disk.d_maxsize = (AMR_NSEG - 1) * PAGE_SIZE;
< sc->amrd_disk.d_open = amrd_open;
< sc->amrd_disk.d_strategy = amrd_strategy;
< sc->amrd_disk.d_name = "amrd";
< sc->amrd_disk.d_dump = (dumper_t *)amrd_dump;
< disk_create(sc->amrd_unit, &sc->amrd_disk, 0, NULL, NULL);
---
> sc->amrd_disk = disk_alloc();
> sc->amrd_disk->d_drv1 = sc;
> sc->amrd_disk->d_maxsize = (AMR_NSEG - 1) * PAGE_SIZE;
> sc->amrd_disk->d_open = amrd_open;
> sc->amrd_disk->d_strategy = amrd_strategy;
> sc->amrd_disk->d_name = "amrd";
> sc->amrd_disk->d_dump = (dumper_t *)amrd_dump;
> sc->amrd_disk->d_unit = sc->amrd_unit;
> sc->amrd_disk->d_flags = DISKFLAG_NEEDSGIANT;
> disk_create(sc->amrd_disk, DISK_VERSION);
271c274
< if (sc->amrd_disk.d_flags & DISKFLAG_OPEN)
---
> if (sc->amrd_disk->d_flags & DISKFLAG_OPEN)
278c281
< disk_destroy(&sc->amrd_disk);
---
> disk_destroy(sc->amrd_disk);
< __FBSDID("$FreeBSD: head/sys/dev/amr/amr_disk.c 120988 2003-10-10 22:49:40Z ps $");
---
> __FBSDID("$FreeBSD: head/sys/dev/amr/amr_disk.c 125975 2004-02-18 21:36:53Z phk $");
137,140c137,140
< sc->amrd_disk.d_sectorsize = AMR_BLKSIZE;
< sc->amrd_disk.d_mediasize = (off_t)sc->amrd_drive->al_size * AMR_BLKSIZE;
< sc->amrd_disk.d_fwsectors = sc->amrd_drive->al_sectors;
< sc->amrd_disk.d_fwheads = sc->amrd_drive->al_heads;
---
> sc->amrd_disk->d_sectorsize = AMR_BLKSIZE;
> sc->amrd_disk->d_mediasize = (off_t)sc->amrd_drive->al_size * AMR_BLKSIZE;
> sc->amrd_disk->d_fwsectors = sc->amrd_drive->al_sectors;
> sc->amrd_disk->d_fwheads = sc->amrd_drive->al_heads;
250,256c250,259
< sc->amrd_disk.d_drv1 = sc;
< sc->amrd_disk.d_maxsize = (AMR_NSEG - 1) * PAGE_SIZE;
< sc->amrd_disk.d_open = amrd_open;
< sc->amrd_disk.d_strategy = amrd_strategy;
< sc->amrd_disk.d_name = "amrd";
< sc->amrd_disk.d_dump = (dumper_t *)amrd_dump;
< disk_create(sc->amrd_unit, &sc->amrd_disk, 0, NULL, NULL);
---
> sc->amrd_disk = disk_alloc();
> sc->amrd_disk->d_drv1 = sc;
> sc->amrd_disk->d_maxsize = (AMR_NSEG - 1) * PAGE_SIZE;
> sc->amrd_disk->d_open = amrd_open;
> sc->amrd_disk->d_strategy = amrd_strategy;
> sc->amrd_disk->d_name = "amrd";
> sc->amrd_disk->d_dump = (dumper_t *)amrd_dump;
> sc->amrd_disk->d_unit = sc->amrd_unit;
> sc->amrd_disk->d_flags = DISKFLAG_NEEDSGIANT;
> disk_create(sc->amrd_disk, DISK_VERSION);
271c274
< if (sc->amrd_disk.d_flags & DISKFLAG_OPEN)
---
> if (sc->amrd_disk->d_flags & DISKFLAG_OPEN)
278c281
< disk_destroy(&sc->amrd_disk);
---
> disk_destroy(sc->amrd_disk);