compiler/pthread: port latest version
[AROS.git] / rom / partition / addpartition.c
blobd4c3404286d62eb6d98c6d7ab0f6b03d1ab659ed
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 */
6 #include <utility/tagitem.h>
7 #include "partition_intern.h"
8 #include "partition_support.h"
9 #include "platform.h"
11 /*****************************************************************************
13 NAME */
14 #include <libraries/partition.h>
16 AROS_LH2(struct PartitionHandle *, AddPartition,
18 /* SYNOPSIS */
19 AROS_LHA(struct PartitionHandle *, root, A1),
20 AROS_LHA(struct TagItem * , taglist, A2),
22 /* LOCATION */
23 struct Library *, PartitionBase, 11, Partition)
25 /* FUNCTION
26 Add a new partition.
28 INPUTS
29 root - PartitionHandle, where to add the new partition
30 taglist - tags that specify more information about the partition
31 unknown tags are ignored
32 PT_DOSENVEC - ptr to a DosEnvec
33 de_LowCyl and de_HighCyl specify start and end of cylinder
34 de_Reserved, de_Bootblocks, ...
35 de_Surfaces, de_BlocksPerTrack, ... are inherited from "root"
36 PT_TYPE - partition type (depends on PartitionTable type)
37 PT_POSITION - position number within the partition table (MBR->PC)
38 PT_ACTIVE - set this partition active (MBR->PC)
39 PT_NAME - set partition name (HD0, HD1, ...)
42 RESULT
43 PartitionHandle of the new partition; 0 for an error
45 NOTES
47 EXAMPLE
49 BUGS
51 SEE ALSO
53 INTERNALS
55 HISTORY
56 21-02-02 first version
58 *****************************************************************************/
60 AROS_LIBFUNC_INIT
62 if (root->table)
64 struct PTFunctionTable *handler = root->table->handler;
66 if (handler->addPartition)
67 return handler->addPartition(PartitionBase, root, taglist);
69 return 0;
70 AROS_LIBFUNC_EXIT