Improved debug messages and added missing properties.
[AROS.git] / rom / expansion / adddosnode.c
blob9e16ae96abc5ca5081d4a1c43be17fad897330e2
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Add a DOS device to the system.
6 Lang: English
7 */
8 #include "expansion_intern.h"
9 #include <exec/io.h>
10 #include <proto/exec.h>
11 #include <proto/dos.h>
13 /*****************************************************************************
15 NAME */
16 #include <dos/filehandler.h>
17 #include <dos/dosextens.h>
18 #include <libraries/expansion.h>
19 #include <proto/expansion.h>
21 AROS_LH3(BOOL, AddDosNode,
23 /* SYNOPSIS */
24 AROS_LHA(LONG , bootPri, D0),
25 AROS_LHA(ULONG , flags, D1),
26 AROS_LHA(struct DeviceNode *, deviceNode, A0),
28 /* LOCATION */
29 struct ExpansionBase *, ExpansionBase, 25, Expansion)
31 /* FUNCTION
32 This is the old function for adding devices to the system. It
33 is recommended that you use the AddBootNode() function.
35 Unlike AddBootNode() you will have to add a BootNode to the
36 system yourself.
38 INPUTS
39 bootPri - The priority of the device (-128 --> 127).
40 flags - Flags (ADNF_STARTPROC etc)
41 deviceNode - The device to add to the system.
43 RESULT
44 non-zero if everything succeeded, zero on failure.
46 NOTES
47 It is much better to use AddBootNode() as it will also
48 construct the BootNode structure, and add it to the system.
50 EXAMPLE
51 // Add a bootable disk to the system. This will start a
52 // file handler process immediately.
54 if( AddDosNode( 0, ADNF_STARTPROC, MakeDosNode( paramPacket )))
56 // AddDosNode() ok
59 BUGS
61 SEE ALSO
62 AddBootNode(), MakeDosNode()
64 INTERNALS
66 HISTORY
67 19-05-07 sonic Rewritten to use dos.library for starting up
68 a handler.
69 27-11-96 digulla automatically created from
70 expansion_lib.fd and clib/expansion_protos.h
72 *****************************************************************************/
74 AROS_LIBFUNC_INIT
77 * Before V36 Kickstart, no public function existed to add BOOTNODES.
78 * If an older expansion.library is in use, driver code would needed
79 * to manually construct a BootNode and Enqueue() it to eb_Mountlist.
81 * This maps to the pre v36 hidden function, that was identical
82 * to AddBootNode(bootPri, flags, deviceNode, NULL);
84 * The reason for the difference is that the old function was
85 * ROM internal, and it had no provision for specifying which
86 * ConfigDev the DeviceNode was attached to.
88 return AddBootNode(bootPri, flags, deviceNode, NULL);
90 AROS_LIBFUNC_EXIT
91 } /* AddDosNode */