--- trunk/src/include/diskimage.h 2007/10/08 16:18:11 6 +++ upstream/0.4.4/src/include/diskimage.h 2007/10/08 16:21:26 35 @@ -2,7 +2,7 @@ #define DISKIMAGE_H /* - * Copyright (C) 2003-2005 Anders Gavare. All rights reserved. + * Copyright (C) 2003-2007 Anders Gavare. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -28,7 +28,7 @@ * SUCH DAMAGE. * * - * $Id: diskimage.h,v 1.28 2005/05/25 06:40:19 debug Exp $ + * $Id: diskimage.h,v 1.34 2006/12/30 13:31:00 debug Exp $ * * Generic disk image functions. (See diskimage.c for more info.) */ @@ -59,6 +59,7 @@ int sectors_per_track; off_t total_size; + int64_t override_base_offset; int logical_block_size; int writable; @@ -110,15 +111,18 @@ int64_t diskimage_getsize(struct machine *machine, int id, int type); +int64_t diskimage_get_baseoffset(struct machine *machine, int id, int type); void diskimage_getchs(struct machine *machine, int id, int type, int *c, int *h, int *s); int diskimage_scsicommand(struct cpu *cpu, int id, int type, struct scsi_transfer *); int diskimage_access(struct machine *machine, int id, int type, int writeflag, off_t offset, unsigned char *buf, size_t len); -int diskimage_exist(struct machine *machine, int scsi_id, int type); +int diskimage_exist(struct machine *machine, int id, int type); int diskimage_bootdev(struct machine *machine, int *typep); int diskimage_add(struct machine *machine, char *fname); +int diskimage_getname(struct machine *machine, int id, int type, + char *buf, size_t bufsize); int diskimage_is_a_cdrom(struct machine *machine, int id, int type); int diskimage_is_a_tape(struct machine *machine, int id, int type); void diskimage_dump_info(struct machine *machine); @@ -137,6 +141,8 @@ #define SCSICMD_MODE_SELECT 0x15 #define SCSICMD_MODE_SENSE 0x1a #define SCSICMD_START_STOP_UNIT 0x1b +#define SCSICMD_PREVENT_ALLOW_REMOVE 0x1e +#define SCSICMD_MODE_SENSE10 0x5a #define SCSICMD_SYNCHRONIZE_CACHE 0x35 @@ -146,6 +152,8 @@ /* SCSI CD-ROM commands: */ #define SCSICDROM_READ_SUBCHANNEL 0x42 #define SCSICDROM_READ_TOC 0x43 +#define SCSICDROM_READ_DISCINFO 0x51 +#define SCSICDROM_READ_TRACKINFO 0x52 /* SCSI tape commands: */ #define SCSICMD_REWIND 0x01