dos.library: Fix C:AddDataTypes on OS 3.9
[AROS.git] / rom / dos / parentoffh.c
bloba0bb21e1b9edf0a5260ad35c92a7fae669dafceb
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Lock the directory a file is located in
6 Lang: english
7 */
9 #include <aros/debug.h>
10 #include "dos_intern.h"
11 #include <dos/dosasl.h>
12 #include <proto/exec.h>
14 /*****************************************************************************
16 NAME */
17 #include <proto/dos.h>
19 AROS_LH1(BPTR, ParentOfFH,
21 /* SYNOPSIS */
22 AROS_LHA(BPTR, fh, D1),
24 /* LOCATION */
25 struct DosLibrary *, DOSBase, 64, Dos)
27 /* FUNCTION
28 Lock the directory a file is located in.
30 INPUTS
31 fh - Filhandle of which you want to obtain the parent
33 RESULT
34 lock - Lock on the parent directory of the filehandle or
35 NULL for failure.
38 NOTES
40 EXAMPLE
42 BUGS
44 SEE ALSO
45 Lock(), UnLock(), ParentDir()
47 INTERNALS
49 *****************************************************************************/
51 AROS_LIBFUNC_INIT
53 struct FileHandle *handle = BADDR(fh);
54 D(bug("[ParentOfFH] fh=%x\n", handle));
55 return (BPTR)dopacket1(DOSBase, NULL, handle->fh_Type, ACTION_PARENT_FH, handle->fh_Arg1);
57 AROS_LIBFUNC_EXIT
59 } /* ParentOfFH */