grub2: bring back build of aros-side grub2 tools
[AROS.git] / rom / partition / querypartitionattrs.c
blob6f91bdceb4ac1704f29be7b61153dc0b77d612b7
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 */
7 #include "partition_support.h"
8 #include "platform.h"
10 /* This is what we can always do */
11 static const struct PartitionAttribute defaultPartitionAttrs[] =
13 {PT_GEOMETRY , PLAM_READ},
14 {PT_DOSENVEC , PLAM_READ},
15 {PT_POSITION , PLAM_READ},
16 {PT_STARTBLOCK, PLAM_READ},
17 {PT_ENDBLOCK , PLAM_READ},
18 {TAG_DONE, 0}
21 /*****************************************************************************
23 NAME */
24 #include <libraries/partition.h>
26 AROS_LH1(const struct PartitionAttribute *, QueryPartitionAttrs,
28 /* SYNOPSIS */
29 AROS_LHA(struct PartitionHandle *, table, A1),
31 /* LOCATION */
32 struct Library *, PartitionBase, 18, Partition)
34 /* FUNCTION
35 query partition attributes
37 INPUTS
38 ph - PartitionHandle to the table
40 RESULT
41 list of NULL-terminated ULONGs with attributes
43 NOTES
45 EXAMPLE
47 BUGS
49 SEE ALSO
51 INTERNALS
53 HISTORY
54 21-02-02 first version
56 *****************************************************************************/
58 AROS_LIBFUNC_INIT
60 if (table->table)
62 struct PTFunctionTable *handler = table->table->handler;
64 return handler->partitionAttrs;
67 return defaultPartitionAttrs;
69 AROS_LIBFUNC_EXIT