revert between 56095 -> 55830 in arch
[AROS.git] / arch / all-hosted / devs / hostdisk / hostdisk_device.h
blob1368ef1660ad40c5be73d66ae1b137084f94fafd
1 #ifndef FDSK_DEVICE_H
2 #define FDSK_DEVICE_H
4 /*
5 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
6 $Id$
7 */
9 #include <aros/libcall.h>
10 #include <exec/devices.h>
11 #include <exec/semaphores.h>
12 #include <exec/lists.h>
13 #include <exec/ports.h>
14 #include <dos/dos.h>
16 struct HostDiskBase
18 struct Device device;
19 struct SignalSemaphore sigsem;
20 struct List units;
21 BPTR segList;
22 STRPTR DiskDevice;
23 ULONG unitBase;
24 APTR HostLibBase;
25 APTR KernelHandle;
26 struct HostInterface *iface;
27 int *errnoPtr;
30 #define HostLibBase hdskBase->HostLibBase
32 struct unit
34 struct Node n;
35 struct HostDiskBase *hdskBase;
36 ULONG usecount;
37 struct MsgPort *port;
38 file_t file;
39 UBYTE flags;
40 ULONG changecount;
41 struct MinList changeints;
44 #define filename n.ln_Name
46 /* Unit flags */
47 #define UNIT_READONLY 0x01
48 #define UNIT_DEVICE 0x02
49 #define UNIT_FREENAME 0x04
51 ULONG Host_Open(struct unit *Unit);
52 void Host_Close(struct unit *Unit);
53 LONG Host_Read(struct unit *Unit, APTR buf, ULONG size, ULONG *ioerr);
54 LONG Host_Write(struct unit *Unit, APTR buf, ULONG size, ULONG *ioerr);
55 ULONG Host_Seek(struct unit *Unit, ULONG pos);
56 ULONG Host_Seek64(struct unit *Unit, ULONG pos, ULONG pos_hi);
57 ULONG Host_GetGeometry(struct unit *Unit, struct DriveGeometry *dg);
58 int Host_ProbeGeometry(struct HostDiskBase *hdskBase, char *name, struct DriveGeometry *dg);
60 #endif