6 char *setuptemplate
= "DEVICE/K/A,UNIT/K/N/A,PARTITION/K,SCRIPT/K";
8 LONG
setup(char *name
, STRPTR args
) {
9 BOOL retval
= RETURN_FAIL
;
10 IPTR myargs
[]={0,0,0,0};
11 struct RDArgs
*rdargs
;
12 struct RDArgs rda
= {{args
, strlen(args
), 0}, 0, 0, 0, NULL
, 0};
14 rda
.RDA_Source
.CS_Buffer
[rda
.RDA_Source
.CS_Length
]='\n';
15 rdargs
= ReadArgs(setuptemplate
,myargs
, &rda
);
20 "setup\n\tdevice=%s unit=%ld\n",
21 (STRPTR
)myargs
[0], *(LONG
*)myargs
[1]
25 printf("\ttable in partition=%s\n", (STRPTR
)myargs
[2]);
28 printf("\ttable in whole HD\n");
31 printf("\tscipt is %s\n", (STRPTR
)myargs
[3]);
34 printf("\tinteractive\n");
38 PrintFault(IoErr(), name
);