|
|
| version 1.16, 2004/05/13 23:49:11 | version 1.17, 2004/05/19 22:52:38 |
|---|---|
| Line 807 daioctl(dev_t dev, u_long cmd, caddr_t a | Line 807 daioctl(dev_t dev, u_long cmd, caddr_t a |
| } | } |
| static int | static int |
| dadump(dev_t dev) | dadump(dev_t dev, u_int num, u_int blknum, u_int secsize) |
| { | { |
| struct cam_periph *periph; | struct cam_periph *periph; |
| struct da_softc *softc; | struct da_softc *softc; |
| u_int unit; | u_int unit; |
| u_int part; | |
| u_int secsize; | |
| u_int num; /* number of sectors to write */ | |
| u_int blknum; | |
| long blkcnt; | long blkcnt; |
| vm_paddr_t addr; | vm_paddr_t addr; |
| struct ccb_scsiio csio; | struct ccb_scsiio csio; |
| int dumppages = MAXDUMPPGS; | int dumppages = MAXDUMPPGS; |
| int error; | |
| int i; | int i; |
| /* toss any characters present prior to dump */ | /* toss any characters present prior to dump */ |
| Line 828 dadump(dev_t dev) | Line 823 dadump(dev_t dev) |
| ; | ; |
| unit = dkunit(dev); | unit = dkunit(dev); |
| part = dkpart(dev); | |
| periph = cam_extend_get(daperiphs, unit); | periph = cam_extend_get(daperiphs, unit); |
| if (periph == NULL) { | if (periph == NULL) { |
| return (ENXIO); | return (ENXIO); |
| Line 838 dadump(dev_t dev) | Line 832 dadump(dev_t dev) |
| if ((softc->flags & DA_FLAG_PACK_INVALID) != 0) | if ((softc->flags & DA_FLAG_PACK_INVALID) != 0) |
| return (ENXIO); | return (ENXIO); |
| error = disk_dumpcheck(dev, &num, &blknum, &secsize); | |
| if (error) | |
| return (error); | |
| addr = 0; /* starting address */ | addr = 0; /* starting address */ |
| blkcnt = howmany(PAGE_SIZE, secsize); | blkcnt = howmany(PAGE_SIZE, secsize); |
| Line 1060 dacleanup(struct cam_periph *periph) | Line 1050 dacleanup(struct cam_periph *periph) |
| xpt_print_path(periph->path); | xpt_print_path(periph->path); |
| printf("can't remove sysctl context\n"); | printf("can't remove sysctl context\n"); |
| } | } |
| if (softc->disk.d_dev) { | if (softc->disk.d_rawdev) { |
| disk_destroy(&softc->disk); | disk_destroy(&softc->disk); |
| } | } |
| free(softc, M_DEVBUF); | free(softc, M_DEVBUF); |