Map menu key to right amiga to allow clipboard operations on keyboards without right...
[AROS.git] / rom / dos / samedevice.c
blob32a0d035c7b6602e7a711f3097eb93135def1939
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include "dos_intern.h"
10 /*****************************************************************************
12 NAME */
13 #include <proto/dos.h>
15 AROS_LH2(BOOL, SameDevice,
17 /* SYNOPSIS */
18 AROS_LHA(BPTR, lock1, D1),
19 AROS_LHA(BPTR, lock2, D2),
21 /* LOCATION */
22 struct DosLibrary *, DOSBase, 164, Dos)
24 /* FUNCTION
25 Checks if two locks are on the same device.
27 INPUTS
28 lock1, lock2 - locks
30 RESULT
31 DOSTRUE when they are on the same device
33 NOTES
35 EXAMPLE
37 BUGS
39 SEE ALSO
41 INTERNALS
43 *****************************************************************************/
45 AROS_LIBFUNC_INIT
47 struct FileHandle *fh1, *fh2;
49 if (lock1 == NULL || lock2 == NULL)
50 return DOSFALSE;
52 fh1 = (struct FileHandle *)BADDR(lock1);
53 fh2 = (struct FileHandle *)BADDR(lock2);
55 /* XXX this isn't enough. two filesystems of the same type are different
56 * "devices" but will have the same value for fh_Device. there's no good
57 * way to fix (the only bad way involves hoops with NameFromLock() */
58 if (fh1->fh_Device == fh2->fh_Device)
59 return DOSTRUE;
62 return DOSFALSE;
63 AROS_LIBFUNC_EXIT
64 } /* SameDevice */