Added the functionlist section to the .conf of the libraries present in
[AROS.git] / workbench / libs / nonvolatile / nonvolatile_init.c
blob2c93dbaa5b9e05ef50cc4883f1e69bc842712a82
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Nonvolatile library initialization code.
6 */
9 #define DEBUG 1
10 #include <aros/debug.h>
12 #include <exec/types.h>
13 #include <exec/resident.h>
14 #include <proto/exec.h>
15 #include <devices/timer.h>
16 #include <aros/symbolsets.h>
18 #include <exec/libraries.h>
19 #include <exec/alerts.h>
20 #include LC_LIBDEFS_FILE
22 #include "nonvolatile_intern.h"
24 AROS_SET_LIBFUNC(Init, LIBBASETYPE, LIBBASE)
26 AROS_SET_LIBFUNC_INIT
28 /* This function is single-threaded by exec by calling Forbid. */
30 D(bug("Opening implementation library (NVDisk)\n"));
32 // Should be able to select this one...
33 nvBase->nv_ImplementationLib = OpenLibrary("nvdisk.library", 41);
35 if(nvBase->nv_ImplementationLib == NULL)
37 return FALSE;
40 D(bug("Nonvolatile library successfully inialized\n"));
42 return TRUE;
44 AROS_SET_LIBFUNC_EXIT
48 AROS_SET_LIBFUNC(Expunge, LIBBASETYPE, LIBBASE)
50 AROS_SET_LIBFUNC_INIT
53 This function is single-threaded by exec by calling Forbid.
54 If you break the Forbid() another task may enter this function
55 at the same time. Take care.
58 CloseLibrary(nvBase->nv_ImplementationLib);
60 return TRUE;
62 AROS_SET_LIBFUNC_EXIT
65 ADD2INITLIB(Init, 0);
66 ADD2EXPUNGELIB(Expunge, 0);