2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
5 Desc: Read the soft-link information.
8 #include "dos_intern.h"
9 #include <exec/lists.h>
10 #include <proto/exec.h>
12 struct ReadLinkDeviceUnit
15 struct Device
*device
;
19 /*****************************************************************************
22 #include <proto/dos.h>
24 AROS_LH5(LONG
, ReadLink
,
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
),
34 struct DosLibrary
*, DOSBase
, 73, Dos
)
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.
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.
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
65 *****************************************************************************/
71 status
= dopacket4(DOSBase
, NULL
, port
, ACTION_READ_LINK
, lock
, (SIPTR
)path
, (SIPTR
)buffer
, size
);