From b528dcf5c237431cc456dd3c911a5f416e8df1eb Mon Sep 17 00:00:00 2001 From: briggs Date: Sun, 17 Sep 1995 18:50:17 +0000 Subject: [PATCH] Fix from Walter Ruetten to prevent his last changes from causing a panic if some values are not filled in in the ROM vector table. --- sys/arch/mac68k/mac68k/pram.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/arch/mac68k/mac68k/pram.c b/sys/arch/mac68k/mac68k/pram.c index 7373db486220..219bde3b8884 100644 --- a/sys/arch/mac68k/mac68k/pram.c +++ b/sys/arch/mac68k/mac68k/pram.c @@ -1,4 +1,4 @@ -/* $NetBSD: pram.c,v 1.5 1995/02/15 23:55:54 briggs Exp $ */ +/* $NetBSD: pram.c,v 1.6 1995/09/17 18:50:17 briggs Exp $ */ /*- * Copyright (C) 1993 Allen K. Briggs, Chris P. Caputo, @@ -37,6 +37,7 @@ /* #include "stand.h" */ #include "via.h" #include "pram.h" +#include "macrom.h" #if DEBUG char *convtime(unsigned long t) @@ -119,7 +120,11 @@ pram_readtime(void) { unsigned long timedata; - timedata = getPramTime(); + if (0 == jClkNoMem) + timedata = 0; /* cause comparision of MacOS boottime */ + /* and PRAM time to fail */ + else + timedata = getPramTime(); #if DEBUG printf("time read from PRAM: 0x%x\n", timedata); printf("Date and time: %s\n",convtime(timedata)); @@ -131,5 +136,8 @@ pram_readtime(void) void pram_settime(unsigned long time) { + if (0 == jClkNoMem) + return; + else return setPramTime(time); }