Fixed some typos/errors in comments and docs.
[AROS.git] / rom / dos / examine.c
blobbe78c4b496d9b211e3be903f18391e5ea0c28fbf
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
59 AROS_LIBFUNC_INIT
61 struct FileLock *fl = BADDR(lock);
62 LONG ret;
64 ASSERT_VALID_PTR_OR_NULL(BADDR(lock));
65 ASSERT_VALID_FILELOCK(lock);
67 D(bug("[Examine] lock=%x fib=%x\n", fl, fib));
68 ret = dopacket2(DOSBase, NULL, fl->fl_Task, ACTION_EXAMINE_OBJECT, lock, MKBADDR(fib));
69 if (ret) {
70 fixfib(fib);
71 D(bug("[Examine] '%s'\n", fib->fib_FileName));
73 return ret;
75 AROS_LIBFUNC_EXIT
76 } /* Examine */