Detabbed
[AROS.git] / rom / dos / setfilesystask.c
blob2f73ce97af7ebce85240e27629a679b3687fc9e7
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Set the current filesystem handler for a process.
6 Lang: english
7 */
8 #include <aros/debug.h>
10 #include "dos_intern.h"
11 #include <proto/exec.h>
13 /*****************************************************************************
15 NAME */
16 #include <dos/dosextens.h>
17 #include <proto/dos.h>
19 AROS_LH1(struct MsgPort *, SetFileSysTask,
21 /* SYNOPSIS */
22 AROS_LHA(struct MsgPort *, task, D1),
24 /* LOCATION */
25 struct DosLibrary *, DOSBase, 88, Dos)
27 /* FUNCTION
28 Set the default filesystem handler for the current process,
29 the old filesystem handler will be returned.
31 INPUTS
32 task - The new filesystem handler.
34 RESULT
35 The old filesystem handler.
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
44 GetFileSysTask()
46 INTERNALS
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
52 struct Process *pr = (struct Process *)FindTask(NULL);
53 APTR old;
55 ASSERT_VALID_PROCESS(pr);
57 old = pr->pr_FileSystemTask;
58 pr->pr_FileSystemTask = task;
59 return old;
61 AROS_LIBFUNC_EXIT
62 } /* SetFileSysTask */