grub2: bring back build of aros-side grub2 tools
[AROS.git] / rom / hidds / base / system / system_init.c
blob418f7cafded3f421dd57161e0a679843b28b1336
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 "system_intern.h"
16 #include LC_LIBDEFS_FILE
18 #define DEBUG 1
19 #include <aros/debug.h>
22 static int Systsem_Init(LIBBASETYPEPTR LIBBASE)
24 struct class_static_data *csd = &LIBBASE->hsi_csd;
25 struct Library *OOPBase = csd->cs_OOPBase;
27 D(bug("[HiddSystsem] %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("[HiddSystsem] %s: initialised\n", __PRETTY_FUNCTION__));
35 return TRUE;
37 D(bug("[HiddSystsem] %s: failed\n", __PRETTY_FUNCTION__));
39 return FALSE;
42 static int Systsem_Expunge(LIBBASETYPEPTR LIBBASE)
44 struct class_static_data *csd = &LIBBASE->hsi_csd;
45 #if (0)
46 struct Library *OOPBase = csd->cs_OOPBase;
47 #endif
49 D(bug("[HiddSystsem] %s(csd=%p)\n", __PRETTY_FUNCTION__, csd));
51 return TRUE;
54 ADD2INITLIB(Systsem_Init, -2)
55 ADD2EXPUNGELIB(Systsem_Expunge, -2)