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 Pull over revision 1.23 from sparc:



details:   https://anonhg.NetBSD.org/src/rev/a6950d90db63
branches:  trunk
changeset: 500745:a6950d90db63
user:      pk <pk%NetBSD.org@localhost>
date:      Sun Dec 17 22:39:18 2000 +0000

description:
Pull over revision 1.23 from sparc:

        Fake a label only if it appears to be blank, and if so use RAW_PART
        instead of 0.

diffstat:

 sys/arch/sparc64/sparc64/disksubr.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (26 lines):

diff -r 6469a47fa1fc -r a6950d90db63 sys/arch/sparc64/sparc64/disksubr.c
--- a/sys/arch/sparc64/sparc64/disksubr.c       Sun Dec 17 22:29:26 2000 +0000
+++ b/sys/arch/sparc64/sparc64/disksubr.c       Sun Dec 17 22:39:18 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disksubr.c,v 1.12 2000/11/20 08:24:22 chs Exp $ */
+/*     $NetBSD: disksubr.c,v 1.13 2000/12/17 22:39:18 pk Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Gordon W. Ross
@@ -86,10 +86,12 @@
        /* minimal requirements for archtypal disk label */
        if (lp->d_secperunit == 0)
                lp->d_secperunit = 0x1fffffff;
-       lp->d_npartitions = 1;
-       if (lp->d_partitions[0].p_size == 0)
-               lp->d_partitions[0].p_size = 0x1fffffff;
-       lp->d_partitions[0].p_offset = 0;
+       if (lp->d_npartitions == 0) {
+               lp->d_npartitions = RAW_PART + 1;
+               if (lp->d_partitions[RAW_PART].p_size == 0)
+                       lp->d_partitions[RAW_PART].p_size = 0x1fffffff;
+               lp->d_partitions[RAW_PART].p_offset = 0;
+       }
 
        /* obtain buffer to probe drive with */
        bp = geteblk((int)lp->d_secsize);



Home | Main Index | Thread Index | Old Index