2 Copyright © 1995-2009, The AROS Development Team. All rights reserved.
6 #include <exec/memory.h>
7 #include <proto/exec.h>
8 #include "partition_intern.h"
9 #include "partition_support.h"
12 /*****************************************************************************
15 #include <libraries/partition.h>
17 AROS_LH1(LONG
, OpenPartitionTable
,
20 AROS_LHA(struct PartitionHandle
*, root
, A1
),
23 struct Library
*, PartitionBase
, 7, Partition
)
26 Open a partition table. On success root->list will be filled with a
27 list of PartitionHandles. If one partition contains more
28 subpartitions, the caller should call OpenPartitionTable() on the
29 PartitionHandle recursively.
35 0 for success; an error code otherwise.
48 21-02-02 first version
50 *****************************************************************************/
54 struct PTFunctionTable
**pst
;
56 pst
= PartitionSupport
;
59 if (pst
[0]->checkPartitionTable(PartitionBase
, root
))
61 root
->table
= AllocMem
63 sizeof(struct PartitionTableHandler
),
64 MEMF_PUBLIC
| MEMF_CLEAR
70 root
->table
->type
= pst
[0]->type
;
71 root
->table
->handler
= *pst
;
72 retval
= pst
[0]->openPartitionTable(PartitionBase
, root
);
75 FreeMem(root
->table
, sizeof(struct PartitionTableHandler
));