A missing semicolon meant that the old error code was never returned.
[cake.git] / rom / dos / setioerr.c
blob37e2629aa34c3af171652b3ec1c6990231700bbe
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
8 #include <proto/exec.h>
9 #include "dos_intern.h"
11 #include <aros/debug.h>
13 /*****************************************************************************
15 NAME */
16 #include <proto/dos.h>
18 AROS_LH1(LONG, SetIoErr,
20 /* SYNOPSIS */
21 AROS_LHA(LONG, result, D1),
23 /* LOCATION */
24 struct DosLibrary *, DOSBase, 77, Dos)
26 /* FUNCTION
27 Sets to dos error code for the current process.
29 INPUTS
30 result -- new error code
32 RESULT
33 Old error code.
35 NOTES
37 EXAMPLE
39 BUGS
41 SEE ALSO
43 INTERNALS
45 *****************************************************************************/
47 AROS_LIBFUNC_INIT
48 AROS_LIBBASE_EXT_DECL(struct DosLibrary *,DOSBase)
50 /* old contents */
51 LONG old;
53 /* Get pointer to process structure */
54 struct Process *me = (struct Process *)FindTask(NULL);
56 /* If this is not a Process, do nothing */
57 if (!__is_process(me))
58 return 0;
60 /* Nothing spectacular */
61 old = me->pr_Result2;
62 me->pr_Result2 = result;
64 return old;
66 AROS_LIBFUNC_EXIT
67 } /* SetIoErr */