1 //we don't need most of this... just standard headers
14 #include <sys/fcntl.h>
18 /*#define MODNAME "imgdrv"
19 IRX_ID(MODNAME, 0x01, 0x00);*/
21 unsigned int ioprpimg
= 0xDEC1DEC1;
22 int ioprpsiz
= 0xDEC2DEC2;
29 int lseek_fs(iop_file_t
* fd
, unsigned long offset
, int whence
)
31 if (whence
== SEEK_END
)
40 int read_fs(iop_file_t
* fd
, void * buffer
, int size
)
42 memcpy(buffer
, (void*)ioprpimg
, size
);
46 typedef struct _iop_device_tm
{
49 unsigned int version
; /* Not so sure about this one. */
51 struct _iop_device_ops_tm
*ops
;
54 typedef struct _iop_device_ops_tm
{
55 int (*init
)(iop_device_t
*);
56 int (*deinit
)(iop_device_t
*);
57 int (*format
)(iop_file_t
*);
58 int (*open
)(iop_file_t
*, const char *, int);
59 int (*close
)(iop_file_t
*);
60 int (*read
)(iop_file_t
*, void *, int);
61 int (*write
)(iop_file_t
*, void *, int);
62 int (*lseek
)(iop_file_t
*, unsigned long, int);
63 } iop_device_ops_tm_t
;
65 iop_device_ops_t my_device_ops
=
69 NULL
,//dummy_fs,//format
70 dummy_fs
,//open_fs,//open
71 dummy_fs
,//close_fs,//close
73 NULL
,//dummy_fs,//write
86 const u8 name
[] = "img";
87 iop_device_t my_device
= {
95 int _start( int argc
, char **argv
)
98 AddDrv((iop_device_t
*)&my_device
);
100 return MODULE_RESIDENT_END
;