use struct timeval to obtain the cputime. disable display atm until the code is corre...
[AROS.git] / rom / partition / closerootpartition.c
blobcce67c9f7a0f1faa5ae81e6cd10abf4dca7be705
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 */
7 #include <proto/exec.h>
8 #include <exec/memory.h>
10 #include "partition_intern.h"
11 #include "partition_support.h"
12 #include "platform.h"
14 /*****************************************************************************
16 NAME */
17 #include <libraries/partition.h>
19 AROS_LH1(void, CloseRootPartition,
21 /* SYNOPSIS */
22 AROS_LHA(struct PartitionHandle *, ph, A1),
24 /* LOCATION */
25 struct Library *, PartitionBase, 6, Partition)
27 /* FUNCTION
28 close root handle allocated by OpenRootPartition()
30 INPUTS
31 ph - root handle created by OpenRootPartition()
33 RESULT
35 NOTES
37 EXAMPLE
39 BUGS
41 SEE ALSO
43 INTERNALS
45 HISTORY
46 21-02-02 first version
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
52 if (ph->table)
54 struct PTFunctionTable *handler = ph->table->handler;
56 if (handler->closePartitionTable)
57 handler->closePartitionTable(PartitionBase, ph);
60 CloseDevice((struct IORequest *)ph->bd->ioreq);
61 DeleteIORequest((struct IORequest *)ph->bd->ioreq);
62 DeleteMsgPort(ph->bd->port);
63 FreeMem(ph->bd, sizeof(struct PartitionBlockDevice));
64 FreeMem(ph, sizeof(struct PartitionHandle));
66 AROS_LIBFUNC_EXIT