2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
9 #include <dos/dosextens.h>
10 #include <proto/utility.h>
11 #include "dos_intern.h"
15 # include <aros/debug.h>
17 /*****************************************************************************
20 #include <proto/dos.h>
22 AROS_LH3(struct DosList
*, FindDosEntry
,
25 AROS_LHA(struct DosList
*, dlist
, D1
),
26 AROS_LHA(CONST_STRPTR
, name
, D2
),
27 AROS_LHA(ULONG
, flags
, D3
),
30 struct DosLibrary
*, DOSBase
, 114, Dos
)
33 Looks for the next dos list entry with the right name. The list
34 must be locked for this. There may be not more than one device
35 or assign node of the same name. There are no restrictions on
39 dlist - the value given by LockDosList() or the last call to
41 name - logical device name without colon. Case insensitive.
42 flags - the same flags as given to LockDosList() or a subset
46 Pointer to dos list entry found or NULL if the are no more entries.
58 *****************************************************************************/
61 AROS_LIBBASE_EXT_DECL(struct DosLibrary
*,DOSBase
)
63 static const ULONG flagarray
[]=
64 { 0, LDF_DEVICES
, LDF_ASSIGNS
, LDF_VOLUMES
, LDF_ASSIGNS
, LDF_ASSIGNS
};
66 /* Determine the size of the name (-1 if the last character is a ':') */
67 CONST_STRPTR end
= name
;
75 if (size
&& end
[-2] == ':')
83 /* Get next entry. Return NULL if there is none. */
84 dlist
= dlist
->dol_Next
;
91 D(bug("Found list entry %s\n", dlist
->dol_DevName
));
93 /* Check type and name */
94 if (flags
& flagarray
[dlist
->dol_Type
+ 1] &&
95 !Strnicmp(name
, dlist
->dol_DevName
, size
) &&
96 !dlist
->dol_DevName
[size
])