revert between 56095 -> 55830 in arch
[AROS.git] / workbench / c / Partition / args.c
blob7fe2f77462757ccb457e6c4586b3183948ed5456
1 /*
2 Copyright © 2004-2010, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <dos/rdargs.h>
7 #include <proto/dos.h>
9 #include "args.h"
11 /*** Global Variables *******************************************************/
12 STATIC CONST_STRPTR TEMPLATE =
13 "DEVICE,UNIT/N,SYSSIZE/K/N,SYSTYPE/K,SYSNAME/K,WORKSIZE/K/N,MAXWORK/S,WORKTYPE/K,WORKNAME/K,WIPE/S,FORCE/S,QUIET/S,RDB/S";
14 STATIC CONST LONG def_unit = 0;
15 STATIC CONST TEXT def_sys_name[] = "DH0";
16 STATIC CONST TEXT def_work_name[] = "DH1";
17 STATIC IPTR args[COUNT] =
19 (IPTR) "ata.device",
20 (IPTR) &def_unit,
21 (IPTR) NULL,
22 (IPTR) NULL,
23 (IPTR) def_sys_name,
24 (IPTR) NULL,
25 (IPTR) FALSE,
26 (IPTR) NULL,
27 (IPTR) def_work_name,
29 STATIC struct RDArgs *rdargs;
31 /*** Functions **************************************************************/
32 BOOL ReadArguments(VOID)
34 rdargs = ReadArgs(TEMPLATE, args, NULL);
35 return rdargs != NULL;
38 VOID FreeArguments(VOID)
40 FreeArgs(rdargs);
43 IPTR GetArgument(enum Argument id)
45 if (id >= 0 && id < COUNT) return args[id];
46 else return 0;