2 Copyright © 2001-2011, The AROS Development Team. All rights reserved.
5 Desc: Partition initialization code
9 #include <aros/symbolsets.h>
10 #include <aros/debug.h>
11 #include <proto/alib.h>
13 #include "partition_intern.h"
14 #include "partition_support.h"
15 #include LC_LIBDEFS_FILE
17 static int PartitionInit(LIBBASETYPEPTR LIBBASE
)
19 LIBBASE
->partbase
.tables
= (struct PartitionTableInfo
**)PartitionSupport
;
20 NewList(&LIBBASE
->bootList
);
21 InitSemaphore(&LIBBASE
->bootSem
);
24 * This is intentionally allowed to fail.
25 * It will fail if we are in kickstart; partition.library is initialized
26 * long before dos.library.
28 LIBBASE
->pb_DOSBase
= OpenLibrary("dos.library", 36);
33 static int PartitionCleanup(struct PartitionBase_intern
*base
)
35 /* If there's something in our boot list, we can't quit without losing it */
36 if (!IsListEmpty(&base
->bootList
))
40 CloseLibrary(base
->pb_DOSBase
);
45 ADD2INITLIB(PartitionInit
, 0);
46 ADD2EXPUNGELIB(PartitionCleanup
, 0);