Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x68k/x68k Use a sane default for size of partition ...



details:   https://anonhg.NetBSD.org/src/rev/c446b6f255d0
branches:  trunk
changeset: 934774:c446b6f255d0
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Thu Jun 18 19:54:08 2020 +0000

description:
Use a sane default for size of partition a: rather than odd 0x1fffffff.

The latter one seems derived from 386BSD (and 4.4BSD),
but it could confuse sysinst as noted in PR/55187.
Sync with most other modern ports that use secperunit
as well as RAW_PART.

diffstat:

 sys/arch/x68k/x68k/disksubr.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (40 lines):

diff -r 0ba8db7f56ca -r c446b6f255d0 sys/arch/x68k/x68k/disksubr.c
--- a/sys/arch/x68k/x68k/disksubr.c     Thu Jun 18 19:47:41 2020 +0000
+++ b/sys/arch/x68k/x68k/disksubr.c     Thu Jun 18 19:54:08 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disksubr.c,v 1.35 2019/04/03 22:10:51 christos Exp $   */
+/*     $NetBSD: disksubr.c,v 1.36 2020/06/18 19:54:08 tsutsui Exp $    */
 
 /*
  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.35 2019/04/03 22:10:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.36 2020/06/18 19:54:08 tsutsui Exp $");
 
 #include "opt_compat_netbsd.h"
 
@@ -78,16 +78,16 @@
                lp->d_secsize = DEF_BSIZE;
        if (lp->d_secperunit == 0)
                lp->d_secperunit = 0x1fffffff;
-       if (lp->d_secpercyl == 0)
-               lp->d_secpercyl = 0x1fffffff;
        lp->d_npartitions = RAW_PART + 1;
        for (i = 0; i < RAW_PART; i++) {
                lp->d_partitions[i].p_size = 0;
                lp->d_partitions[i].p_offset = 0;
        }
-       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_partitions[RAW_PART].p_size == 0)
+               lp->d_partitions[RAW_PART].p_size = lp->d_secperunit;
+       lp->d_partitions[RAW_PART].p_offset = 0;
+
+       lp->d_partitions[0].p_size = lp->d_partitions[RAW_PART].p_size;
 
        /* get a buffer and initialize it */
        bsdlabelsz =



Home | Main Index | Thread Index | Old Index