28 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
29 |
* |
* |
30 |
* |
* |
31 |
* $Id: diskimage.h,v 1.26 2005/04/15 21:39:57 debug Exp $ |
* $Id: diskimage.h,v 1.28 2005/05/25 06:40:19 debug Exp $ |
32 |
* |
* |
33 |
* Generic disk image functions. (See diskimage.c for more info.) |
* Generic disk image functions. (See diskimage.c for more info.) |
34 |
*/ |
*/ |
43 |
#define DISKIMAGE_IDE 2 |
#define DISKIMAGE_IDE 2 |
44 |
#define DISKIMAGE_FLOPPY 3 |
#define DISKIMAGE_FLOPPY 3 |
45 |
|
|
46 |
|
#define DISKIMAGE_TYPES { "(NONE)", "SCSI", "IDE", "FLOPPY" } |
47 |
|
|
48 |
struct diskimage { |
struct diskimage { |
49 |
struct diskimage *next; |
struct diskimage *next; |
50 |
int type; /* DISKIMAGE_SCSI, etc */ |
int type; /* DISKIMAGE_SCSI, etc */ |
53 |
char *fname; |
char *fname; |
54 |
FILE *f; |
FILE *f; |
55 |
|
|
56 |
|
int chs_override; |
57 |
|
int cylinders; |
58 |
|
int heads; |
59 |
|
int sectors_per_track; |
60 |
|
|
61 |
off_t total_size; |
off_t total_size; |
62 |
int logical_block_size; |
int logical_block_size; |
63 |
|
|
109 |
size_t want_len, int clearflag); |
size_t want_len, int clearflag); |
110 |
|
|
111 |
|
|
112 |
int64_t diskimage_getsize(struct machine *machine, int scsi_id); |
int64_t diskimage_getsize(struct machine *machine, int id, int type); |
113 |
int diskimage_scsicommand(struct cpu *cpu, int scsi_id, |
void diskimage_getchs(struct machine *machine, int id, int type, |
114 |
|
int *c, int *h, int *s); |
115 |
|
int diskimage_scsicommand(struct cpu *cpu, int id, int type, |
116 |
struct scsi_transfer *); |
struct scsi_transfer *); |
117 |
int diskimage_access(struct machine *machine, int scsi_id, int writeflag, |
int diskimage_access(struct machine *machine, int id, int type, int writeflag, |
118 |
off_t offset, unsigned char *buf, size_t len); |
off_t offset, unsigned char *buf, size_t len); |
119 |
int diskimage_exist(struct machine *machine, int scsi_id); |
int diskimage_exist(struct machine *machine, int scsi_id, int type); |
120 |
int diskimage_bootdev(struct machine *machine); |
int diskimage_bootdev(struct machine *machine, int *typep); |
121 |
int diskimage_add(struct machine *machine, char *fname); |
int diskimage_add(struct machine *machine, char *fname); |
122 |
int diskimage_is_a_cdrom(struct machine *machine, int scsi_id); |
int diskimage_is_a_cdrom(struct machine *machine, int id, int type); |
123 |
int diskimage_is_a_tape(struct machine *machine, int scsi_id); |
int diskimage_is_a_tape(struct machine *machine, int id, int type); |
124 |
void diskimage_dump_info(struct machine *machine); |
void diskimage_dump_info(struct machine *machine); |
125 |
|
|
126 |
/* |
/* |