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>
22 #include "afshandler.h"
24 #define OS_BE2LONG AROS_BE2LONG
25 #define OS_LONG2BE AROS_LONG2BE
27 #define OS_PTRALIGN AROS_PTRALIGN
34 struct IOExtTD
*ioreq
;
35 struct IOExtTD
*iochangeint
;
36 struct Interrupt mc_int
;
37 struct Interrupt vbl_int
;
38 struct AFSBase
*afsbase
; /* for interrupt code */
47 #define IOHF_MOTOR_OFF (1<<0)
48 #define IOHF_MEDIA_CHANGE (1<<1)
49 #define IOHF_DISK_IN (1<<2)
53 LONG
showPtrArgsText(struct AFSBase
*afsbase
, const char *string
, enum showReqType type
, IPTR
*args
);
54 LONG
showErrorArgs(struct AFSBase
*afsbase
, IPTR
*args
);
56 #define showText(afsbase, ...) \
58 IPTR args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
59 ULONG ret = showPtrArgsText(afsbase, (STRPTR)args[0], Req_Cancel, &args[1]); \
63 #define showRetriableError(afsbase, ...) \
65 IPTR args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
66 ULONG ret = showPtrArgsText(afsbase, (STRPTR)args[0], Req_RetryCancel, &args[1]); \
70 #define showError(afsbase, ...) \
72 IPTR args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
73 ULONG ret = showErrorArgs(afsbase, args); \
77 void checkDeviceFlags(struct AFSBase
*);
78 void motorOff(struct AFSBase
*afsbase
, struct IOHandle
*ioh
);