we aren't in forbid state on the smp build..
[AROS.git] / rom / dos / inhibit.c
blob2f14b1ecc8f103f0b6e1c68d8c33cbe94426959c
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
4 */
5 #include <proto/exec.h>
7 #include "dos_intern.h"
9 /*****************************************************************************
11 NAME */
12 #include <proto/dos.h>
14 AROS_LH2(LONG, Inhibit,
16 /* SYNOPSIS */
17 AROS_LHA(CONST_STRPTR, name, D1),
18 AROS_LHA(LONG, onoff, D2),
20 /* LOCATION */
21 struct DosLibrary *, DOSBase, 121, Dos)
23 /* FUNCTION
24 Stop a filesystem from being used.
26 INPUTS
27 name - Name of the device to inhibit (including a ':')
28 onoff - Specify whether to inhibit (DOSTRUE) or uninhibit (DOSFALSE)
29 the device
31 RESULT
32 A boolean telling whether the action was carried out.
34 NOTES
35 After uninhibiting a device anything might have happened like the disk
36 in the drive was removed.
38 EXAMPLE
40 BUGS
42 SEE ALSO
44 INTERNALS
46 *****************************************************************************/
48 AROS_LIBFUNC_INIT
50 struct PacketHelperStruct phs;
51 LONG status = DOSFALSE;
53 if (!getdevpacketinfo(DOSBase, name, NULL, &phs))
54 return DOSFALSE;
56 status = dopacket1(DOSBase, NULL, phs.port, ACTION_INHIBIT, onoff);
58 freepacketinfo(DOSBase, &phs);
60 return status;
62 AROS_LIBFUNC_EXIT
63 } /* Inhibit */