-/* $OpenBSD: boot.c,v 1.18 2008/08/10 18:20:07 miod Exp $ */
+/* $OpenBSD: boot.c,v 1.19 2008/08/26 18:36:21 miod Exp $ */
/* $NetBSD: boot.c,v 1.18 2002/05/31 15:58:26 ragge Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
transition = ' ';
askname = bootrpb.rpb_bootr5 & RB_ASKNAME;
- printf("\n\r>> OpenBSD/vax boot [%s] <<\n", "1.14");
+ printf("\n\r>> OpenBSD/vax boot [%s] <<\n", "1.15");
printf(">> Press enter to autoboot now, or any other key to abort: ");
sluttid = getsecs() + 5;
senast = 0;
-/* $OpenBSD: devopen.c,v 1.3 2002/06/11 09:36:23 hugh Exp $ */
+/* $OpenBSD: devopen.c,v 1.4 2008/08/26 18:36:21 miod Exp $ */
/* $NetBSD: devopen.c,v 1.10 2002/05/24 21:40:59 ragge Exp $ */
/*
* Copyright (c) 1997 Ludd, University of Lule}, Sweden.
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "lib/libsa/stand.h"
+#include <lib/libsa/stand.h>
#include "machine/rpb.h"
#include "machine/sid.h"
#define VAX780 1
#include "machine/ka750.h"
-#include "arch/vax/bi/bireg.h"
+#include <arch/vax/bi/bireg.h>
#include "vaxstand.h"
if (cnvtab[i] == dev)
dp = devsw + i;
- x = 0;
if ((s = index((char *)fname, '('))) {
*s++ = 0;
if (i == ndevs) {
printf("No such device - Configured devices are:\n");
for (dp = devsw, i = 0; i < ndevs; i++, dp++)
- if (dp->dv_name)
+ if (dp->dv_name && (i == 0 ||
+ strcmp(dp->dv_name, (dp[-1]).dv_name) != 0))
printf(" %s", dp->dv_name);
printf("\n");
- return -1;
+ return EINVAL;
}
+
dev = cnvtab[i];
if ((c = index(s, ')')) == 0)
goto usage;
-
*c++ = 0;
+ /*
+ * If the user has specified sd(), we need to pick the
+ * correct BDEV_SDx value, depending on the machine type.
+ */
+ if (dev == BDEV_SD) {
+ switch (vax_boardtype) {
+ case VAX_BTYP_46:
+ case VAX_BTYP_48:
+ case VAX_BTYP_49:
+ case VAX_BTYP_1303:
+ dev = BDEV_SDN; /* asc(4) */
+ break;
+ case VAX_BTYP_60:
+ dev = BDEV_SDS; /* sii(4) */
+ break;
+ }
+ }
+
+ x = 0;
if (*s) do {
a[x++] = atoi(s);
while (*s >= '0' && *s <= '9')
if (!dp->dv_open) {
printf("Can't open device type %d\n", dev);
- return(ENODEV);
+ return ENXIO;
}
f->f_dev = dp;
bootrpb.unit = unit;
usage:
printf("usage: dev(adapter,controller,unit,partition)file -asd\n");
- return -1;
+ return EINVAL;
}
-$OpenBSD: version,v 1.7 2008/08/12 17:23:21 miod Exp $
+$OpenBSD: version,v 1.8 2008/08/26 18:36:21 miod Exp $
$NetBSD: version,v 1.4 2001/11/09 19:53:15 scw Exp $
NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this
Standalone driver for the Digital Equipment Unibus Network Adapter
(DEUNA). This allows 11/750 owners to install from a single TU58
cassette.
- Adopt to the RPB changes. Complete change of how network devices are
+ Adapt to the RPB changes. Complete change of how network devices are
handled. No more hacks to find bus addresses.
1.5: Standalone device driver for DEBNx (ni) ethernet controllers.
1.6: Add support for VAX 6000 + VAX 8000. Tweak console routines.
1.12: Glass console support on VXT2000{,+}.
1.13: Enable the loadfile code added in revision 1.8.
1.14: Support for VaxStation 3[58][24]0.
+1.15: Restore boot sd()... functionality on machines with asc(4) or sii(4)
+ controllers.
-/* $OpenBSD: boot.c,v 1.18 2008/08/10 18:20:07 miod Exp $ */
+/* $OpenBSD: boot.c,v 1.19 2008/08/26 18:36:21 miod Exp $ */
/* $NetBSD: boot.c,v 1.18 2002/05/31 15:58:26 ragge Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
transition = ' ';
askname = bootrpb.rpb_bootr5 & RB_ASKNAME;
- printf("\n\r>> OpenBSD/vax boot [%s] <<\n", "1.14");
+ printf("\n\r>> OpenBSD/vax boot [%s] <<\n", "1.15");
printf(">> Press enter to autoboot now, or any other key to abort: ");
sluttid = getsecs() + 5;
senast = 0;
-/* $OpenBSD: devopen.c,v 1.3 2002/06/11 09:36:23 hugh Exp $ */
+/* $OpenBSD: devopen.c,v 1.4 2008/08/26 18:36:21 miod Exp $ */
/* $NetBSD: devopen.c,v 1.10 2002/05/24 21:40:59 ragge Exp $ */
/*
* Copyright (c) 1997 Ludd, University of Lule}, Sweden.
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "lib/libsa/stand.h"
+#include <lib/libsa/stand.h>
#include "machine/rpb.h"
#include "machine/sid.h"
#define VAX780 1
#include "machine/ka750.h"
-#include "arch/vax/bi/bireg.h"
+#include <arch/vax/bi/bireg.h>
#include "vaxstand.h"
if (cnvtab[i] == dev)
dp = devsw + i;
- x = 0;
if ((s = index((char *)fname, '('))) {
*s++ = 0;
if (i == ndevs) {
printf("No such device - Configured devices are:\n");
for (dp = devsw, i = 0; i < ndevs; i++, dp++)
- if (dp->dv_name)
+ if (dp->dv_name && (i == 0 ||
+ strcmp(dp->dv_name, (dp[-1]).dv_name) != 0))
printf(" %s", dp->dv_name);
printf("\n");
- return -1;
+ return EINVAL;
}
+
dev = cnvtab[i];
if ((c = index(s, ')')) == 0)
goto usage;
-
*c++ = 0;
+ /*
+ * If the user has specified sd(), we need to pick the
+ * correct BDEV_SDx value, depending on the machine type.
+ */
+ if (dev == BDEV_SD) {
+ switch (vax_boardtype) {
+ case VAX_BTYP_46:
+ case VAX_BTYP_48:
+ case VAX_BTYP_49:
+ case VAX_BTYP_1303:
+ dev = BDEV_SDN; /* asc(4) */
+ break;
+ case VAX_BTYP_60:
+ dev = BDEV_SDS; /* sii(4) */
+ break;
+ }
+ }
+
+ x = 0;
if (*s) do {
a[x++] = atoi(s);
while (*s >= '0' && *s <= '9')
if (!dp->dv_open) {
printf("Can't open device type %d\n", dev);
- return(ENODEV);
+ return ENXIO;
}
f->f_dev = dp;
bootrpb.unit = unit;
usage:
printf("usage: dev(adapter,controller,unit,partition)file -asd\n");
- return -1;
+ return EINVAL;
}
-$OpenBSD: version,v 1.7 2008/08/12 17:23:21 miod Exp $
+$OpenBSD: version,v 1.8 2008/08/26 18:36:21 miod Exp $
$NetBSD: version,v 1.4 2001/11/09 19:53:15 scw Exp $
NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this
Standalone driver for the Digital Equipment Unibus Network Adapter
(DEUNA). This allows 11/750 owners to install from a single TU58
cassette.
- Adopt to the RPB changes. Complete change of how network devices are
+ Adapt to the RPB changes. Complete change of how network devices are
handled. No more hacks to find bus addresses.
1.5: Standalone device driver for DEBNx (ni) ethernet controllers.
1.6: Add support for VAX 6000 + VAX 8000. Tweak console routines.
1.12: Glass console support on VXT2000{,+}.
1.13: Enable the loadfile code added in revision 1.8.
1.14: Support for VaxStation 3[58][24]0.
+1.15: Restore boot sd()... functionality on machines with asc(4) or sii(4)
+ controllers.