http://www.aros.orgAROS-ExecTeam AROSAROS-Exec Archives

Home

English

Deutsch

Ελληυικά

Français

Italiano

Nederlands

Polski

Português

Русский

Español

Suomi

Svenska

Česky


News

Archive

Introduction

Status
Screenshots
Ports
License

Download


Documentation

Users
Installation
Using
Shell commands
Applications
FAQ
Developers
Contribute
Roadmap
Bug Tracker
Working with Subversion
Compiling
Application Development Manual
Zune Application Development Manual
System Development Manual
Debugging Manual
Reference
Specifications
UI Style Guide
Documenting
Porting
Translating
Summaries
Links

Contact

Mailing lists
IRC channels

Credits

Acknowledgements


Pictures

Developers
Developers en Masse

Sponsors

Linking

Links

SourceForge Logo

partition

Index


AddPartition() ClosePartitionTable() CloseRootPartition() CreatePartitionTable()
DeletePartition() DestroyPartitionTable() GetPartitionAttrs() GetPartitionTableAttrs()
OpenPartitionTable() OpenRootPartition() QueryPartitionAttrs() QueryPartitionTableAttrs()
SetPartitionAttrs() SetPartitionTableAttrs() WritePartitionTable()  

AddPartition()

Synopsis

struct PartitionHandle * AddPartition(
         struct PartitionHandle * root,
         struct TagItem * taglist );

struct PartitionHandle * AddPartitionTags(
         struct PartitionHandle * root,
         TAG tag, ... );

Function

Add a new partition.

Inputs

root - PartitionHandle, where to add the new partition
taglist - tags that specify more information about the partition
          unknown tags are ignored
    PT_DOSENVEC - ptr to a DosEnvec
        de_LowCyl and de_HighCyl specify start and end of cylinder
        de_Reserved, de_Bootblocks, ...
        de_Surfaces, de_BlocksPerTrack, ... are inherited from "root"
    PT_TYPE     - partition type (depends on PartitionTable type)
    PT_POSITION - position number within the partition table (MBR->PC)
    PT_ACTIVE   - set this partition active (MBR->PC)
    PT_NAME     - set partition name (HD0, HD1, ...)

Result

PartitionHandle of the new partition; 0 for an error

ClosePartitionTable()

Synopsis

void ClosePartitionTable(
         struct PartitionHandle * root );

Function

close a partition table (and discard all changes)
all partitions and subpartitions in root->list will be removed recursivly

Inputs

root - partition table to close

CloseRootPartition()

Synopsis

void CloseRootPartition(
         struct PartitionHandle * ph );

Function

close root handle allocated by OpenRootPartition()

Inputs

ph - root handle created by OpenRootPartition()

CreatePartitionTable()

Synopsis

LONG CreatePartitionTable(
         struct PartitionHandle * root,
         ULONG type );

Function

Create a new partition table.

Inputs

root - partition to create table in
type - the type of the partition table to create

Result

0 on success; an error code otherwise

Notes

After calling this function the state of the PartitionHandle will be the
same as when calling OpenPartitionTable(). Therefore before closing the
PartitionHandle you should call ClosePartitionTable().

DeletePartition()

Synopsis

void DeletePartition(
         struct PartitionHandle * ph );

Function

Delete a partition with its subpartitions

Inputs

ph - PartitionHandle to delete

DestroyPartitionTable()

Synopsis

LONG DestroyPartitionTable(
         struct PartitionHandle * root );

Function

Destroy a partition table by immediately overwriting table data on disk.

Inputs

root - partition table to destroy

Result

0 on success; an error code otherwise

Notes

After calling this function the state of the PartitionHandle will be the
same as before calling OpenPartitionTable(). Therefore do not reference
any child PartitionHandles any more.

GetPartitionAttrs()

Synopsis

LONG GetPartitionAttrs(
         struct PartitionHandle * ph,
         struct TagItem * taglist );

LONG GetPartitionAttrsTags(
         struct PartitionHandle * ph,
         TAG tag, ... );

Function

get attributes of a partition

Inputs

ph      - PartitionHandle
taglist - list of attributes; unknown tags are ignored
    PT_DOSENVEC - struct DosEnvec *; get DosEnvec values
    PT_TYPE     - struct PartitionType *           ; get partition type (MBR-PC)
    PT_POSITION - ULONG *           ; position of partition (MBR-PC)
    PT_ACTIVE   - LONG *           ; is partition active
    PT_NAME     - STRPTR    ; get name of partition (max 31 Bytes + NULL-byte)

GetPartitionTableAttrs()

Synopsis

LONG GetPartitionTableAttrs(
         struct PartitionHandle * root,
         struct TagItem * taglist );

LONG GetPartitionTableAttrsTags(
         struct PartitionHandle * root,
         TAG tag, ... );

Function

get attributes of a partition table

Inputs

ph      - PartitionHandle of the partition table
taglist - list of attributes; unknown tags are ignored
    PTT_TYPE     - ULONG *           ; get partition table type
    PTT_MAXLEADIN     - LONG *
    PTT_RESERVED - ULONG *           ; get number of reserved blocks

OpenPartitionTable()

Synopsis

LONG OpenPartitionTable(
         struct PartitionHandle * root );

Function

Open a partition table. On success root->list will be filled with a
list of PartitionHandles. If one partition contains more
subpartitions, the caller should call OpenPartitionTable() on the
PartitionHandle recursively.

Inputs

root - root partition

Result

0 for success; an error code otherwise.

OpenRootPartition()

Synopsis

struct PartitionHandle * OpenRootPartition(
         CONST_STRPTR Device,
         LONG Unit );

Function

Create a root handle by opening a trackdisk-compatible device.

Inputs

Device - name of the block device
Unit - unit of the block device

Result

handle to the device

QueryPartitionAttrs()

Synopsis

struct PartitionAttribute * QueryPartitionAttrs(
         struct PartitionHandle * table );

Function

query partition attributes

Inputs

ph      - PartitionHandle to the table

Result

list of NULL-terminated ULONGs with attributes

QueryPartitionTableAttrs()

Synopsis

struct PartitionAttribute * QueryPartitionTableAttrs(
         struct PartitionHandle * table );

Function

query partition table attributes

Inputs

ph      - PartitionHandle of a partition table

Result

list of NULL-terminated ULONGs with attributes

SetPartitionAttrs()

Synopsis

LONG SetPartitionAttrs(
         struct PartitionHandle * ph,
         struct TagItem * taglist );

LONG SetPartitionAttrsTags(
         struct PartitionHandle * ph,
         TAG tag, ... );

Function

set attributes of a partition

Inputs

ph      - PartitionHandle
taglist - list of attributes; unknown tags are ignored
    PT_DOSENVEC - set new DosEnvec values
    PT_TYPE     - change partition type (MBR-PC)
    PT_POSITION - move partition to another position (MBR-PC)
    PT_ACTIVE   - set partition active
    PT_NAME     - change name of partition (max 31 Bytes + NULL-byte)

SetPartitionTableAttrs()

Synopsis

LONG SetPartitionTableAttrs(
         struct PartitionHandle * root,
         struct TagItem * taglist );

LONG SetPartitionTableAttrsTags(
         struct PartitionHandle * root,
         TAG tag, ... );

Function

set attributes of a partition table

Inputs

ph      - PartitionHandle of the partition table
taglist - list of attributes; unknown tags are ignored

WritePartitionTable()

Synopsis

LONG WritePartitionTable(
         struct PartitionHandle * root );

Function

Write a partition table; writing this partition table doesn't affect
subpartition tables

Inputs

root - partition table to write

Result

0 for success; an error code otherwise

Copyright © 1995-2008, The AROS Development Team. All rights reserved.
Amiga® is a trademark of Amiga Inc. All other trademarks belong to their respective owners.