Check for SYS/GL during library init. Reason is that
[AROS.git] / rom / partition / closepartitiontable.c
bloba4d41c9f4ac2e0646ed276cbde31e69c5c591073
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 */
7 #include <exec/memory.h>
8 #include <proto/exec.h>
9 #include "partition_support.h"
10 #include "partition_intern.h"
11 #include "platform.h"
13 /*****************************************************************************
15 NAME */
16 #include <libraries/partition.h>
18 AROS_LH1(void, ClosePartitionTable,
20 /* SYNOPSIS */
21 AROS_LHA(struct PartitionHandle *, root, A1),
23 /* LOCATION */
24 struct Library *, PartitionBase, 8, Partition)
26 /* FUNCTION
27 close a partition table (and discard all changes)
28 all partitions and subpartitions in root->list will be removed recursivly
30 INPUTS
31 root - partition table to close
33 RESULT
35 NOTES
37 EXAMPLE
39 BUGS
41 SEE ALSO
43 INTERNALS
45 HISTORY
46 21-02-02 first version
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
52 if (root->table)
54 struct PTFunctionTable *handler = root->table->handler;
56 if (handler->closePartitionTable)
57 handler->closePartitionTable(PartitionBase, root);
58 FreeMem(root->table, sizeof(struct PartitionTableHandler));
59 root->table = 0;
62 AROS_LIBFUNC_EXIT