Init control word to zero, cdrom-handler reads this and will crash if it is non-zero...
[AROS.git] / rom / partition / closerootpartition.c
bloba0353d83f412bc61180c3f0adb4791512f8dd357
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 */
6 #include <proto/exec.h>
7 #include <exec/memory.h>
9 #include "partition_intern.h"
10 #include "partition_support.h"
11 #include "platform.h"
13 /*****************************************************************************
15 NAME */
16 #include <libraries/partition.h>
18 AROS_LH1(void, CloseRootPartition,
20 /* SYNOPSIS */
21 AROS_LHA(struct PartitionHandle *, ph, A1),
23 /* LOCATION */
24 struct Library *, PartitionBase, 6, Partition)
26 /* FUNCTION
27 close root handle allocated by OpenRootPartition()
29 INPUTS
30 ph - root handle created by OpenRootPartition()
32 RESULT
34 NOTES
36 EXAMPLE
38 BUGS
40 SEE ALSO
42 INTERNALS
44 HISTORY
45 21-02-02 first version
47 *****************************************************************************/
49 AROS_LIBFUNC_INIT
51 if (ph->table)
53 struct PTFunctionTable *handler = ph->table->handler;
55 if (handler->closePartitionTable)
56 handler->closePartitionTable(PartitionBase, ph);
58 DeleteIORequest((struct IORequest *)ph->bd->ioreq);
59 DeleteMsgPort(ph->bd->port);
60 FreeMem(ph->bd, sizeof(struct PartitionBlockDevice));
61 FreeMem(ph, sizeof(struct PartitionHandle));
63 AROS_LIBFUNC_EXIT