2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
8 #include <proto/exec.h>
9 #include <aros/debug.h>
10 #include "dos_intern.h"
12 /*****************************************************************************
15 #include <proto/dos.h>
17 AROS_LH1(BPTR
, CurrentDir
,
20 AROS_LHA(BPTR
, lock
, D1
),
23 struct DosLibrary
*, DOSBase
, 21, Dos
)
26 Sets a new directory as the current directory. Returns the old one.
27 0 is valid in both cases and represents the boot filesystem.
30 lock - Lock for the new current directory.
33 Old current directory.
45 *****************************************************************************/
49 /* Get pointer to process structure */
50 struct Process
*me
=(struct Process
*)FindTask(NULL
);
53 ASSERT_VALID_PROCESS(me
);
55 ASSERT_VALID_PTR_OR_NULL(BADDR(lock
));
57 /* Nothing spectacular */
58 old
=me
->pr_CurrentDir
;
59 me
->pr_CurrentDir
=lock
;
60 ASSERT_VALID_PTR_OR_NULL(BADDR(old
));