grub2: bring back build of aros-side grub2 tools
[AROS.git] / rom / dos / parentoffh.c
blobbfb236cd29e6a307f3843f55f46038917eb3bb5b
1 /*
2 Copyright © 1995-2013, 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 - Filehandle 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.
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
44 Lock(), UnLock(), ParentDir()
46 INTERNALS
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
52 struct FileHandle *handle = BADDR(fh);
53 D(bug("[ParentOfFH] fh=%x\n", handle));
54 return (BPTR)dopacket1(DOSBase, NULL, handle->fh_Type, ACTION_PARENT_FH, handle->fh_Arg1);
56 AROS_LIBFUNC_EXIT
58 } /* ParentOfFH */