From c3fca4549d60b1ffd525188111f5c2946e0228f1 Mon Sep 17 00:00:00 2001 From: Mike Karels Date: Wed, 16 Sep 1987 20:12:36 -0800 Subject: [PATCH] fix pcs code for new device specs SCCS-vsn: sys/vax/stand/boot.c 7.5 --- usr/src/sys/vax/stand/boot.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/usr/src/sys/vax/stand/boot.c b/usr/src/sys/vax/stand/boot.c index 6feb7c51f9..5f1beaeca7 100644 --- a/usr/src/sys/vax/stand/boot.c +++ b/usr/src/sys/vax/stand/boot.c @@ -3,7 +3,7 @@ * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)boot.c 7.4 (Berkeley) %G% + * @(#)boot.c 7.5 (Berkeley) %G% */ #include "param.h" @@ -150,21 +150,23 @@ loadpcs() static int pcsdone = 0; union cpusid sid; char pcs[100]; - char *closeparen; + char *cp; char *index(); sid.cpusid = mfpr(SID); if (sid.cpuany.cp_type!=VAX_750 || sid.cpu750.cp_urev<95 || pcsdone) return; printf("Updating 11/750 microcode: "); - strncpy(pcs, line, 99); - pcs[99] = 0; - closeparen = index(pcs, ')'); - if (closeparen) - *(++closeparen) = 0; - else - return; - strcat(pcs, "pcs750.bin"); + for (cp = line; *cp; cp++) + if (*cp == ')' || *cp == ':') + break; + if (*cp) { + strncpy(pcs, line, 99); + pcs[99] = 0; + i = cp - line + 1; + } else + i = 0; + strcpy(pcs + i, "pcs750.bin"); i = open(pcs, 0); if (i < 0) return; -- 2.20.1