revert between 56095 -> 55830 in arch
[AROS.git] / rom / dos / duplockfromfh.c
blob03aed66ceb9004179bb48122b0062b465d69591e
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: dos.library function DupLockFromFH()
6 Lang: english
7 */
9 #include <aros/debug.h>
10 #include <proto/exec.h>
11 #include "dos_intern.h"
13 /*****************************************************************************
15 NAME */
16 #include <proto/dos.h>
18 AROS_LH1(BPTR, DupLockFromFH,
20 /* SYNOPSIS */
21 AROS_LHA(BPTR, handle, D1),
23 /* LOCATION */
24 struct DosLibrary *, DOSBase, 62, Dos)
26 /* FUNCTION
27 Clone a lock on a file or directory. This will only work on shared
28 locks.
30 INPUTS
31 lock - Old lock.
33 RESULT
34 The new lock or NULL in case of an error. IoErr() will give additional
35 information in that case.
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
45 INTERNALS
47 *****************************************************************************/
49 AROS_LIBFUNC_INIT
51 struct FileHandle *fh = BADDR(handle);
52 BPTR ret;
54 if (handle == BNULL)
55 return BNULL;
57 ret = (BPTR)dopacket1(DOSBase, NULL, fh->fh_Type, ACTION_COPY_DIR_FH, fh->fh_Arg1);
58 D(bug("[DupLockFromFH] %x -> %x\n", fh, BADDR(ret)));
59 return ret;
61 AROS_LIBFUNC_EXIT
62 } /* DupLockFromFH */