Documented GVF_SAVE_VAR alongside other flags, and removed a query/doubt
[AROS.git] / rom / hidds / base / storage / storage_init.c
blob85eb3fec1403b8e40b0acc4991d473aee97f3e88
1 /*
2 Copyright © 2015-2016, The AROS Development Team. All rights reserved.
3 $Id$
4 */
5 #include <stddef.h>
6 #include <exec/types.h>
8 #include <proto/exec.h>
9 #include <proto/oop.h>
11 #include <aros/symbolsets.h>
12 #include <hidd/hidd.h>
14 #include "storage_intern.h"
16 #include LC_LIBDEFS_FILE
18 #define DEBUG 1
19 #include <aros/debug.h>
22 static int Storage_Init(LIBBASETYPEPTR LIBBASE)
24 struct class_static_data *csd = &LIBBASE->hsi_csd;
25 struct Library *OOPBase = csd->cs_OOPBase;
27 D(bug("[HiddStorage] %s()\n", __PRETTY_FUNCTION__));
29 OOP_Object *hwroot = OOP_NewObject(NULL, CLID_HW_Root, NULL);
30 csd->hwAttrBase = OOP_ObtainAttrBase(IID_HW);
32 if (HW_AddDriver(hwroot, csd->oopclass, NULL))
34 D(bug("[HiddStorage] %s: initialised\n", __PRETTY_FUNCTION__));
35 return TRUE;
37 D(bug("[HiddStorage] %s: failed\n", __PRETTY_FUNCTION__));
39 return FALSE;
42 static int Storage_Expunge(LIBBASETYPEPTR LIBBASE)
44 struct class_static_data *csd = &LIBBASE->hsi_csd;
45 #if (0)
46 struct Library *OOPBase = csd->cs_OOPBase;
47 #endif
48 D(bug("[HiddStorage] %s(csd=%p)\n", __PRETTY_FUNCTION__, csd));
50 return TRUE;
53 ADD2INITLIB(Storage_Init, -2)
54 ADD2EXPUNGELIB(Storage_Expunge, -2)