grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / c / HDTool / install.c
blob9fdc2179ed7f9154f1d3c779d7ab9de643fd8eee
1 #include <stdio.h>
2 #include <string.h>
3 #include <proto/dos.h>
4 #include "install.h"
6 char *installtemplate = "CPU/A,ARCH/A,ARGS/F";
8 LONG install(char *name, STRPTR args) {
9 BOOL retval = RETURN_FAIL;
10 IPTR myargs[]={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(installtemplate, myargs, &rda);
16 if (rdargs)
18 printf
20 "install-%s-%s %s\n",
21 (STRPTR)myargs[0], (STRPTR)myargs[1], (STRPTR)myargs[2]
23 FreeArgs(rdargs);
25 else
26 PrintFault(IoErr(), name);
27 return retval;