revert between 56095 -> 55830 in arch
[AROS.git] / arch / .unmaintained / m68k-pp-native / dos / aros.c
blob239e651f1243b2680ce2dd4a0d457b8666e79b80
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: This is the "boot code" of AROS when it runs as an emulation.
6 Lang: english
7 */
8 #include <dos/dostags.h>
9 #include <dos/dos.h>
10 #include <dos/dosextens.h>
11 #include <dos/filesystem.h>
12 #include <proto/dos.h>
13 #include <proto/intuition.h>
14 #include <proto/exec.h>
16 #include <asm/registers.h>
18 #define DEBUG 0
19 #include <aros/debug.h>
21 #define CANNOT_LOAD_SHELL "Unable to load C:shell\n"
22 #define CANNOT_OPEN_CON "Cannot open boot console\n"
24 int main(struct ExecBase * SysBase, struct Library * DOSBase)
26 LONG rc = RETURN_FAIL;
29 BPTR sseq = Open("S:Startup-Sequence", FMF_READ);
30 BPTR cis = Open("CON:20/20///Boot Shell/AUTO", FMF_READ);
32 if (cis) {
33 struct TagItem tags[] =
35 { SYS_Asynch, TRUE },
36 { SYS_Background, FALSE },
37 { SYS_Input, (IPTR)cis },
38 { SYS_Output, (IPTR)NULL },
39 { SYS_Error, (IPTR)NULL },
40 { SYS_ScriptInput, (IPTR)sseq },
41 { TAG_DONE, 0 }
44 rc = SystemTagList("", tags);
45 if (rc != -1) {
46 cis = NULL;
47 sseq = NULL;
48 } else
49 rc = RETURN_FAIL;
50 } else {
51 PutStr(CANNOT_OPEN_CON);
53 Close(cis);
54 Close(sseq);
56 return rc;