Indentation fix, cleanup.
[AROS.git] / rom / dos / readlink.c
blob691c0858dd1ff6545f2d6aff14f2ae856f3592a7
1 /*
2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Read the soft-link information.
6 Lang: English
7 */
8 #include "dos_intern.h"
9 #include <exec/lists.h>
10 #include <proto/exec.h>
12 struct ReadLinkDeviceUnit
14 struct MinNode node;
15 struct Device *device;
16 struct Unit *unit;
19 /*****************************************************************************
21 NAME */
22 #include <proto/dos.h>
24 AROS_LH5(LONG, ReadLink,
26 /* SYNOPSIS */
27 AROS_LHA(struct MsgPort *, port, D1),
28 AROS_LHA(BPTR , lock, D2),
29 AROS_LHA(CONST_STRPTR , path, D3),
30 AROS_LHA(STRPTR , buffer, D4),
31 AROS_LHA(ULONG , size, D5),
33 /* LOCATION */
34 struct DosLibrary *, DOSBase, 73, Dos)
36 /* FUNCTION
37 Read the filename referred to by the soft-linked object contained
38 in |path| (relative to the lock |lock|) into the buffer |buffer|.
39 The variable |path| should contain the name of the object that
40 caused the original OBJECT_IS_SOFT_LINK error.
42 INPUTS
43 port - The handler to send the request to.
44 lock - Object that |path| is relative to.
45 path - Name of the object that caused the error.
46 buffer - Buffer to fill with resolved filename.
47 size - Length of the buffer.
49 RESULT
50 >= 0 length of resolved filename in case of success
51 == -1 failure, see IoErr() for more information
52 == -2 buffer size was too small to store resolved filename
54 NOTES
56 EXAMPLE
58 BUGS
60 SEE ALSO
61 MakeLink()
63 INTERNALS
65 *****************************************************************************/
67 AROS_LIBFUNC_INIT
69 LONG status;
71 status = dopacket4(DOSBase, NULL, port, ACTION_READ_LINK, lock, (SIPTR)path, (SIPTR)buffer, size);
73 return status;
75 AROS_LIBFUNC_EXIT
76 } /* ReadLink */