2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
12 #include <aros/debug.h>
13 #include "dos_intern.h"
15 /*****************************************************************************
18 #include <proto/dos.h>
23 AROS_LHA(struct MsgPort
*, port
, D1
),
24 AROS_LHA(LONG
, action
, D2
),
25 AROS_LHA(LONG
, arg1
, D3
),
26 AROS_LHA(LONG
, arg2
, D4
),
27 AROS_LHA(LONG
, arg3
, D5
),
28 AROS_LHA(LONG
, arg4
, D6
),
29 AROS_LHA(LONG
, arg5
, D7
),
32 struct DosLibrary
*, DOSBase
, 40, Dos
)
36 Send a dos packet to a filesystem and wait for the action to complete.
46 This function should NOT be used; it's only here for AmigaOS compatibility.
56 *****************************************************************************/
59 AROS_LIBBASE_EXT_DECL(struct DosLibrary
*,DOSBase
)
62 * First I create a regular dos packet and then let
67 struct Process
*me
= (struct Process
*)FindTask(NULL
);
68 struct DosPacket
*dp
= (struct DosPacket
*)AllocDosObject(DOS_STDPKT
,
70 struct MsgPort
*replyPort
;
71 struct IOFileSys
*iofs
= NULL
;
73 BOOL i_am_process
= TRUE
;
80 kprintf("Allocated packet %p\n", dp
);
84 replyPort
= &me
->pr_MsgPort
;
88 /* Make sure that tasks can use DoPkt(). */
89 replyPort
= CreateMsgPort();
91 if (NULL
== replyPort
)
106 SendPkt(dp
, port
, replyPort
);
108 internal_WaitPkt(replyPort
, DOSBase
);
110 SetIoErr(iofs
->io_DosError
);
114 if (FALSE
== i_am_process
)
116 DeleteMsgPort(replyPort
);
119 FreeDosObject(DOS_STDPKT
, dp
);