+/* $OpenBSD: boot.c,v 1.10 1997/04/22 16:01:19 gvf Exp $ */
/* $NetBSD: boot.c,v 1.2 1995/09/23 03:42:52 gwr Exp $ */
/*-
ret = parse_args(&file, &flag);
}
}
- if ( ret == -1 ) {
+ if (ret) {
printf("boot: -q returning to MVME-Bug\n");
break;
}
-/* $OpenBSD: parse_args.c,v 1.3 1997/04/17 19:16:42 gvf Exp $ */
+/* $OpenBSD: parse_args.c,v 1.4 1997/04/22 16:01:20 gvf Exp $ */
/*-
* Copyright (c) 1995 Theo de Raadt
while (c == ' ')
c = *++ptr;
if (c == '\0')
- return;
+ return (0);
if (c != '-') {
name = ptr;
while ((c = *++ptr) && c != ' ')
}
while ((c = *++ptr) && c != ' ') {
if (c == 'q')
- return (-1);
+ return (1);
for (i = 0; i < sizeof(bf)/sizeof(bf[0]); i++)
if (bf[i].c == c) {
howto |= bf[i].bit;
-/* $OpenBSD: boot.c,v 1.5 1996/05/16 02:55:36 chuck Exp $ */
+/* $OpenBSD: boot.c,v 1.6 1997/04/22 16:01:21 gvf Exp $ */
/*-
* Copyright (c) 1995 Theo de Raadt
main()
{
char *cp, *file;
- int ask = 0, howto;
+ int ask = 0, howto, ret;
printf(">> OpenBSD MVME%x netboot [%s]\n", bugargs.cputyp, version);
/* cycle in the correct args */
bugargs.arg_end = bugargs.nbarg_end;
*bugargs.arg_end = 0; /* ensure */
- parse_args(&file, &howto);
+ ret = parse_args(&file, &howto);
for (;;) {
if (ask) {
while (cp < (line + sizeof(line) - 1) && *cp)
cp++;
bugargs.arg_end = cp;
- parse_args(&file, &howto);
+ ret =parse_args(&file, &howto);
}
}
+ if (ret) {
+ printf("boot: -q returning to MVME-Bug\n");
+ break;
+ }
exec_mvme(file, howto);
printf("boot: %s: %s\n", file, strerror(errno));
ask = 1;