Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / libs / nonvolatile / getnvlist.c
blobceb55163fc28570e6357eeb6f584bdd71dcb119c
1 /*
2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <dos/dosextens.h>
8 /*****************************************************************************
10 NAME */
12 #include <exec/lists.h>
13 #include <libraries/nonvolatile.h>
14 #include <proto/exec.h>
15 #include <proto/nvdisk.h>
17 #include <string.h>
20 AROS_LH2(struct MinList *, GetNVList,
22 /* SYNOPSIS */
24 AROS_LHA(STRPTR, appName, A0),
25 AROS_LHA(BOOL, killRequesters, D1),
27 /* LOCATION */
29 struct Library *, nvBase, 10, Nonvolatile)
31 /* FUNCTION
33 Returns a list of items allocated by application 'appName'.
35 INPUTS
37 appName -- the application the nonvolatile items of which to query
38 about
39 killRequesters -- if TRUE you make sure that no system requesters will be
40 displayed during the operation of this function
42 RESULT
44 Pointer to a MinList of NVEntries which describes the items. Failure due to
45 lack of memory will be indicated by returning NULL.
47 NOTES
49 The protection field should be examined using the field masks NVIF_DELETE
50 or by the bit definition NVIB_DELETE as the other bits are reserved for
51 system use.
53 EXAMPLE
55 BUGS
57 SEE ALSO
59 FreeNVData(), SetNVProtection(), <libraries/nonvolatile.h>
61 INTERNALS
63 ******************************************************************************/
66 AROS_LIBFUNC_INIT
68 struct Process *me = (struct Process *)FindTask(NULL);
69 APTR oldReq = me->pr_WindowPtr;
70 struct MinList *list;
72 if(appName == NULL)
73 return NULL;
75 if(strpbrk(appName, ":/") != NULL)
76 return NULL;
78 if(killRequesters)
79 me->pr_WindowPtr = (APTR)-1;
81 list = GetItemList(appName);
83 if(killRequesters)
84 me->pr_WindowPtr = oldReq;
86 return list;
88 AROS_LIBFUNC_EXIT
89 } /* GetNVList */