grub2: bring back build of aros-side grub2 tools
[AROS.git] / rom / dos / replypkt.c
blob3085a03be20a1ffbf9eb5d24ffa10a58f17ffab1
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
9 #include <aros/debug.h>
11 #include <proto/exec.h>
13 #include "dos_intern.h"
15 /*****************************************************************************
17 NAME */
18 #include <dos/dosextens.h>
19 #include <proto/dos.h>
21 AROS_LH3(void, ReplyPkt,
23 /* SYNOPSIS */
24 AROS_LHA(struct DosPacket *, dp, D1),
25 AROS_LHA(SIPTR , res1, D2),
26 AROS_LHA(LONG , res2, D3),
28 /* LOCATION */
29 struct DosLibrary *, DOSBase, 43, Dos)
31 /* FUNCTION
33 INPUTS
35 RESULT
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
45 INTERNALS
47 *****************************************************************************/
49 AROS_LIBFUNC_INIT
51 struct Process *me = (struct Process *)FindTask(NULL);
53 ASSERT_VALID_PROCESS(me);
55 internal_ReplyPkt(dp, &me->pr_MsgPort, res1, res2);
57 AROS_LIBFUNC_EXIT
58 } /* ReplyPkt */
60 void internal_ReplyPkt(struct DosPacket *dp, struct MsgPort *replyPort, SIPTR res1, LONG res2)
62 struct MsgPort *mp;
63 struct Message *mn;
65 mp = dp->dp_Port;
66 mn = dp->dp_Link;
67 mn->mn_Node.ln_Name = (char*)dp;
68 dp->dp_Port = replyPort;
69 dp->dp_Res1 = res1;
70 dp->dp_Res2 = res2;
73 * Can't use ReplyMsg() here because mn_ReplyPort seems to be not set.
74 * Tested with SFS.
76 PutMsg(mp, mn);