Enable VFP unit as early as possible. This has to be so since e.g. gcc9 uses vfp...
[AROS.git] / rom / partition / destroypartitiontable.c
blob3e29efb9489a498bcb5000f99e7092c02aa43df2
1 /*
2 Copyright © 1995-2017, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <exec/memory.h>
7 #include <proto/exec.h>
8 #include <proto/partition.h>
9 #include "partition_support.h"
10 #include "platform.h"
12 /*****************************************************************************
14 NAME */
15 #include <libraries/partition.h>
17 AROS_LH1(LONG, DestroyPartitionTable,
19 /* SYNOPSIS */
20 AROS_LHA(struct PartitionHandle *, root, A1),
22 /* LOCATION */
23 struct Library *, PartitionBase, 19, Partition)
25 /* FUNCTION
26 Destroy a partition table by immediately overwriting table data on
27 disk.
29 INPUTS
30 root - partition table to destroy
32 RESULT
33 0 on success; an error code otherwise
35 NOTES
36 After calling this function the state of the PartitionHandle will be
37 the same as before calling OpenPartitionTable(). Therefore do not
38 reference any child PartitionHandles any more.
40 EXAMPLE
42 BUGS
44 SEE ALSO
46 INTERNALS
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
51 LONG retval=1;
53 if (root->table)
55 struct PTFunctionTable *handler = root->table->handler;
57 #undef DestroyPartitionTable
58 if (handler->destroyPartitionTable)
60 retval = handler->destroyPartitionTable(PartitionBase, root);
61 if (retval == 0)
62 ClosePartitionTable(root);
65 return retval;
66 AROS_LIBFUNC_EXIT