2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 #include "partition_support.h"
14 /*****************************************************************************
17 #include <utility/tagitem.h>
18 #include <libraries/partition.h>
20 AROS_LH2(LONG
, GetPartitionAttrs
,
23 AROS_LHA(struct PartitionHandle
*, ph
, A1
),
24 AROS_LHA(struct TagItem
*, taglist
, A2
),
27 struct Library
*, PartitionBase
, 15, Partition
)
30 get attributes of a partition
34 taglist - list of attributes; unknown tags are ignored
35 PT_DOSENVEC - struct DosEnvec *; get DosEnvec values
36 PT_TYPE - struct PartitionType * ; get partition type (MBR-PC)
37 PT_POSITION - ULONG * ; position of partition (MBR-PC)
38 PT_ACTIVE - LONG * ; is partition active
39 PT_NAME - STRPTR ; get name of partition (max 31 Bytes + NULL-byte)
54 21-02-02 first version
56 *****************************************************************************/
62 struct PTFunctionTable
*handler
= ph
->root
->table
->handler
;
64 if (handler
->getPartitionAttrs
)
65 return handler
->getPartitionAttrs(PartitionBase
, ph
, taglist
);
69 /* we are the root partition */
70 while (taglist
[0].ti_Tag
!= TAG_DONE
)
72 switch (taglist
[0].ti_Tag
)
76 struct DriveGeometry
*dg
= (struct DriveGeometry
*)taglist
[0].ti_Data
;
77 CopyMem(&ph
->dg
, dg
, sizeof(struct DriveGeometry
));
81 CopyMem(&ph
->de
, (struct DosEnvec
*)taglist
[0].ti_Data
, sizeof(struct DosEnvec
));