Prefs:Printer - Add terrible hack for m68k
[AROS.git] / rom / dos / examine.c
bloba6a2f1f64a9d554d93ec34d3cd2380232efa87ea
1 /*
2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: dos.library function Examine().
6 Lang: English
7 */
9 #include <aros/debug.h>
10 #include <exec/memory.h>
11 #include <proto/exec.h>
12 #include "dos_intern.h"
14 /*****************************************************************************
16 NAME */
17 #include <proto/dos.h>
19 AROS_LH2(LONG, Examine,
21 /* SYNOPSIS */
22 AROS_LHA(BPTR, lock, D1),
23 AROS_LHA(struct FileInfoBlock *, fib, D2),
25 /* LOCATION */
26 struct DosLibrary *, DOSBase, 17, Dos)
28 /* FUNCTION
30 Fill in a FileInfoBlock structure concerning a file or directory
31 associated with a particular lock.
33 INPUTS
35 lock -- lock to examine
36 fib -- FileInfoBlock where the result of the examination is stored
38 RESULT
40 A boolean telling whether the operation was successful or not.
42 NOTES
44 FileInfoBlocks should be allocated with AllocDosObject(). You may make
45 a copy of the FileInfoBlock but, however, this copy may NOT be passed
46 to ExNext()!
48 EXAMPLE
50 BUGS
52 SEE ALSO
54 Lock(), UnLock(), ExNext(), AllocDosObject(), ExAll(), <dos/dos.h>
56 INTERNALS
58 *****************************************************************************/
61 AROS_LIBFUNC_INIT
63 struct FileLock *fl = BADDR(lock);
64 LONG ret;
66 ASSERT_VALID_PTR_OR_NULL(BADDR(lock));
67 ASSERT_VALID_FILELOCK(lock);
69 D(bug("[Examine] lock=%x fib=%x\n", fl, fib));
70 ret = dopacket2(DOSBase, NULL, fl ? fl->fl_Task : GetFileSysTask(), ACTION_EXAMINE_OBJECT, lock, MKBADDR(fib));
71 if (ret) {
72 fixfib(fib);
73 D(bug("[Examine] '%s'\n", fib->fib_FileName));
75 return ret;
77 AROS_LIBFUNC_EXIT
78 } /* Examine */