Detabbed
[AROS.git] / rom / dos / parentdir.c
blob4653d8420fdcbf8af6d1325a559b568c5a8e74c9
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
9 #include <aros/debug.h>
10 #include "dos_intern.h"
11 #include <dos/dos.h>
13 /*****************************************************************************
15 NAME */
16 #include <exec/types.h>
17 #include <proto/dos.h>
19 AROS_LH1(BPTR, ParentDir,
21 /* SYNOPSIS */
22 AROS_LHA(BPTR, lock, D1),
24 /* LOCATION */
25 struct DosLibrary *, DOSBase, 35, Dos)
27 /* FUNCTION
28 Returns a lock to the parent directory of the supplied lock.
30 INPUTS
31 lock - Lock to get parent directory of.
33 RESULT
34 Returns a lock to the parent directory or NULL, in which case the
35 supplied lock has no parent directory (because it is the root
36 directory) or an error occured. IoErr() returns 0 in the former case
37 and a different value on error.
39 NOTES
41 EXAMPLE
43 BUGS
45 SEE ALSO
47 INTERNALS
49 *****************************************************************************/
51 AROS_LIBFUNC_INIT
53 struct FileLock *fl = BADDR(lock);
54 D(bug("[ParentDir] lock=%x\n", lock));
55 return (BPTR)dopacket1(DOSBase, NULL, fl->fl_Task, ACTION_PARENT, lock);
57 AROS_LIBFUNC_EXIT
58 } /* ParentDir */