5 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
9 #include <aros/macros.h>
10 #include <aros/preprocessor/variadic/cast2iptr.hpp>
11 #include <devices/trackdisk.h>
13 #include <dos/dosextens.h>
14 #include <dos/exall.h>
15 #include <dos/filehandler.h>
16 #include <dos/stdio.h>
17 #include <exec/interrupts.h>
18 #include <exec/types.h>
19 #include <aros/debug.h>
20 #include <proto/dos.h>
23 #include "afshandler.h"
25 #define OS_BE2LONG AROS_BE2LONG
26 #define OS_LONG2BE AROS_LONG2BE
28 #define OS_PTRALIGN AROS_PTRALIGN
35 struct IOExtTD
*ioreq
;
36 struct IOExtTD
*iochangeint
;
37 struct Interrupt mc_int
;
38 struct Interrupt vbl_int
;
39 struct AFSBase
*afsbase
; /* for interrupt code */
48 #define IOHF_MOTOR_OFF (1<<0)
49 #define IOHF_MEDIA_CHANGE (1<<1)
50 #define IOHF_DISK_IN (1<<2)
54 LONG
showPtrArgsText(struct AFSBase
*afsbase
, const char *string
, enum showReqType type
, RAWARG args
);
55 LONG
showError(struct AFSBase
*afsbase
, ULONG error
, ...);
57 static inline LONG
showText(struct AFSBase
*afsbase
, const char *format
, ...)
61 AROS_SLOWSTACKFORMAT_PRE(format
);
62 ret
= showPtrArgsText(afsbase
, format
, Req_Cancel
, AROS_SLOWSTACKFORMAT_ARG(format
));
63 AROS_SLOWSTACKFORMAT_POST(format
);
68 static inline LONG
showRetriableError(struct AFSBase
*afsbase
, const char *format
, ...)
72 AROS_SLOWSTACKFORMAT_PRE(format
);
73 ret
= showPtrArgsText(afsbase
, format
, Req_RetryCancel
, AROS_SLOWSTACKFORMAT_ARG(format
));
74 AROS_SLOWSTACKFORMAT_POST(format
);
79 void checkDeviceFlags(struct AFSBase
*);
80 void motorOff(struct AFSBase
*afsbase
, struct IOHandle
*ioh
);