added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / workbench / c / DiskChange.c
blobc1b7c2a276d200bd0c9b575803035aab2ae0b685
1 /*
2 Copyright © 2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: DiskChange CLI command
6 Lang: English
7 */
8 /******************************************************************************
10 NAME
12 Diskchange
14 USAGE
16 Diskchange DEVICE
18 SYNOPSIS
20 DEVICE/A
22 LOCATION
24 Sys:C
26 FUNCTION
28 Diskchange is intended only for removable media. For example if
29 you have a internal floppy disk dive set to noclick AROS will not
30 perform disk presence check. So you have to manually update any
31 disk change made.
33 INPUTS
35 DEVICE -- The disk device unit.
37 RESULT
39 NOTES
41 EXAMPLE
43 Diskchange df0:
45 BUGS
47 SEE ALSO
49 INTERNALS
51 HISTORY
53 ******************************************************************************//*****************************************************************************************/
55 #include <proto/dos.h>
57 #include <dos/dos.h>
58 #include <exec/types.h>
60 const TEXT __version__[] = "\0$VER: DiskChange 41.1 (8.12.2007)";
61 int __nocommandline;
63 int main(void)
65 struct RDArgs *ra;
66 STRPTR dev;
67 int rc = RETURN_FAIL;
69 ra = ReadArgs("DEVICE/A", &dev, NULL);
70 if (ra) {
71 if (Inhibit(dev, DOSTRUE) && Inhibit(dev, DOSFALSE))
72 rc = RETURN_OK;
73 FreeArgs(ra);
75 if (rc != RETURN_OK);
76 PrintFault(IoErr(), "DiskChange");
77 return rc;