Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc64/sparc64 myetheraddr(): don't lose badly whe...



details:   https://anonhg.NetBSD.org/src/rev/2c9c5ec74dce
branches:  trunk
changeset: 487549:2c9c5ec74dce
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Jun 09 05:27:40 2000 +0000

description:
myetheraddr(): don't lose badly when the clock hasn't been attached yet.

diffstat:

 sys/arch/sparc64/sparc64/clock.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r a8e07d49aaef -r 2c9c5ec74dce sys/arch/sparc64/sparc64/clock.c
--- a/sys/arch/sparc64/sparc64/clock.c  Fri Jun 09 05:22:22 2000 +0000
+++ b/sys/arch/sparc64/sparc64/clock.c  Fri Jun 09 05:27:40 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.18 2000/03/19 14:41:49 pk Exp $ */
+/*     $NetBSD: clock.c,v 1.19 2000/06/09 05:27:40 mrg Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -451,7 +451,14 @@
        u_char *cp;
 {
        register struct clockreg *cl = clockreg;
-       register struct idprom *idp = &cl->cl_idprom;
+       register struct idprom *idp;
+
+       if (!cl) {
+               printf("myetheraddr: clockreg not setup yet\n");
+               return;
+       }
+
+       idp = &cl->cl_idprom;
 
        cp[0] = idp->id_ether[0];
        cp[1] = idp->id_ether[1];



Home | Main Index | Thread Index | Old Index