Add simple AbortIO to get the host controller offline
[AROS.git] / test / dos / runcommand.c
blobcd50bec96bd79ec2df64165b869b185c45c67d5e
1 #include <proto/dos.h>
2 #include <proto/exec.h>
3 #include <dos/bptr.h>
4 #include <dos/dos.h>
5 #include <string.h>
6 #include <stdlib.h>
7 #include <stdio.h>
9 static LONG get_default_stack_size()
11 struct CommandLineInterface *cli = Cli();
12 return cli->cli_DefaultStack * CLI_DEFAULTSTACK_UNIT;
15 int main(int argc, char **argv)
17 char *fname = "SYS:Utilities/Clock";
18 char *full = "";
19 int lastresult = RETURN_OK;
21 if(fname) {
22 BPTR seglist = LoadSeg(fname);
23 if(seglist)
25 SetProgramName(fname);
26 lastresult=RunCommand(seglist,get_default_stack_size(),
27 full,strlen(full));
28 UnLoadSeg(seglist);
32 exit(lastresult);