Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst Fix support for non-512-byte/sector disks a...



details:   https://anonhg.NetBSD.org/src/rev/a1ea9681dc7a
branches:  trunk
changeset: 744228:a1ea9681dc7a
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Jan 27 21:21:21 2020 +0000

description:
Fix support for non-512-byte/sector disks again after I broke it when
introducing the abstract partition backends.

diffstat:

 usr.sbin/sysinst/arch/arc/md.c          |    4 +-
 usr.sbin/sysinst/arch/bebox/md.c        |    4 +-
 usr.sbin/sysinst/arch/cobalt/md.c       |    4 +-
 usr.sbin/sysinst/arch/evbarm/md.c       |    4 +-
 usr.sbin/sysinst/arch/evbmips/md.c      |    4 +-
 usr.sbin/sysinst/arch/evbppc/md.c       |    4 +-
 usr.sbin/sysinst/arch/hpcarm/md.c       |    4 +-
 usr.sbin/sysinst/arch/hpcmips/md.c      |    4 +-
 usr.sbin/sysinst/arch/hpcsh/md.c        |    4 +-
 usr.sbin/sysinst/arch/i386/md.c         |    6 +-
 usr.sbin/sysinst/arch/landisk/md.c      |    4 +-
 usr.sbin/sysinst/arch/ofppc/md.c        |    4 +-
 usr.sbin/sysinst/arch/playstation2/md.c |    6 +-
 usr.sbin/sysinst/arch/prep/md.c         |    4 +-
 usr.sbin/sysinst/arch/sandpoint/md.c    |    4 +-
 usr.sbin/sysinst/arch/zaurus/md.c       |    4 +-
 usr.sbin/sysinst/bsddisklabel.c         |    6 +-
 usr.sbin/sysinst/defs.h                 |   25 ++++---
 usr.sbin/sysinst/disklabel.c            |   50 ++++++++------
 usr.sbin/sysinst/disks.c                |   25 ++++---
 usr.sbin/sysinst/gpt.c                  |   14 +++-
 usr.sbin/sysinst/label.c                |   17 +++--
 usr.sbin/sysinst/mbr.c                  |  105 +++++++++++++++++++++++++++----
 usr.sbin/sysinst/menus.mi               |   16 +++-
 usr.sbin/sysinst/part_edit.c            |    9 +-
 usr.sbin/sysinst/partitions.c           |   12 ++-
 usr.sbin/sysinst/partitions.h           |   37 ++++++++--
 usr.sbin/sysinst/partman.c              |   16 ++--
 usr.sbin/sysinst/sizemultname.c         |   25 +++---
 29 files changed, 279 insertions(+), 146 deletions(-)

diffs (truncated from 1288 to 300 lines):

diff -r 49cbd0092cad -r a1ea9681dc7a usr.sbin/sysinst/arch/arc/md.c
--- a/usr.sbin/sysinst/arch/arc/md.c    Mon Jan 27 21:14:17 2020 +0000
+++ b/usr.sbin/sysinst/arch/arc/md.c    Mon Jan 27 21:21:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.11 2020/01/09 13:22:30 martin Exp $ */
+/*     $NetBSD: md.c,v 1.12 2020/01/27 21:21:22 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -79,7 +79,7 @@
 
                struct disk_partitions *parts =
                   (*ps->create_new_for_disk)(pm->diskdev,
-                  0, pm->dlsize, pm->dlsize, true, NULL);
+                  0, pm->dlsize, true, NULL);
                if (!parts)
                        return false;
 
diff -r 49cbd0092cad -r a1ea9681dc7a usr.sbin/sysinst/arch/bebox/md.c
--- a/usr.sbin/sysinst/arch/bebox/md.c  Mon Jan 27 21:14:17 2020 +0000
+++ b/usr.sbin/sysinst/arch/bebox/md.c  Mon Jan 27 21:21:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.7 2020/01/09 13:22:31 martin Exp $ */
+/*     $NetBSD: md.c,v 1.8 2020/01/27 21:21:22 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -72,7 +72,7 @@
 
                struct disk_partitions *parts =
                   (*ps->create_new_for_disk)(pm->diskdev,
-                  0, pm->dlsize, pm->dlsize, true, NULL);
+                  0, pm->dlsize, true, NULL);
                if (!parts)
                        return false;
 
diff -r 49cbd0092cad -r a1ea9681dc7a usr.sbin/sysinst/arch/cobalt/md.c
--- a/usr.sbin/sysinst/arch/cobalt/md.c Mon Jan 27 21:14:17 2020 +0000
+++ b/usr.sbin/sysinst/arch/cobalt/md.c Mon Jan 27 21:21:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.11 2020/01/09 13:22:31 martin Exp $ */
+/*     $NetBSD: md.c,v 1.12 2020/01/27 21:21:22 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -79,7 +79,7 @@
 
                struct disk_partitions *parts =
                   (*ps->create_new_for_disk)(pm->diskdev,
-                  0, pm->dlsize, pm->dlsize, true, NULL);
+                  0, pm->dlsize, true, NULL);
                if (!parts)
                        return false;
 
diff -r 49cbd0092cad -r a1ea9681dc7a usr.sbin/sysinst/arch/evbarm/md.c
--- a/usr.sbin/sysinst/arch/evbarm/md.c Mon Jan 27 21:14:17 2020 +0000
+++ b/usr.sbin/sysinst/arch/evbarm/md.c Mon Jan 27 21:21:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.13 2020/01/20 21:26:35 martin Exp $ */
+/*     $NetBSD: md.c,v 1.14 2020/01/27 21:21:22 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -107,7 +107,7 @@
 
                struct disk_partitions *parts =
                   (*ps->create_new_for_disk)(pm->diskdev,
-                  0, pm->dlsize, pm->dlsize, true, NULL);
+                  0, pm->dlsize, true, NULL);
                if (!parts)
                        return false;
 
diff -r 49cbd0092cad -r a1ea9681dc7a usr.sbin/sysinst/arch/evbmips/md.c
--- a/usr.sbin/sysinst/arch/evbmips/md.c        Mon Jan 27 21:14:17 2020 +0000
+++ b/usr.sbin/sysinst/arch/evbmips/md.c        Mon Jan 27 21:21:21 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.7 2020/01/09 13:22:31 martin Exp $ */
+/* $NetBSD: md.c,v 1.8 2020/01/27 21:21:22 martin Exp $ */
 
 /*
  * Copyright 1997,2002 Piermont Information Systems Inc.
@@ -72,7 +72,7 @@
 
                struct disk_partitions *parts =
                   (*ps->create_new_for_disk)(pm->diskdev,
-                  0, pm->dlsize, pm->dlsize, true, NULL);
+                  0, pm->dlsize, true, NULL);
                if (!parts)
                        return false;
 
diff -r 49cbd0092cad -r a1ea9681dc7a usr.sbin/sysinst/arch/evbppc/md.c
--- a/usr.sbin/sysinst/arch/evbppc/md.c Mon Jan 27 21:14:17 2020 +0000
+++ b/usr.sbin/sysinst/arch/evbppc/md.c Mon Jan 27 21:21:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.7 2020/01/09 13:22:31 martin Exp $ */
+/*     $NetBSD: md.c,v 1.8 2020/01/27 21:21:22 martin Exp $ */
 
 /*
  * Copyright 1997,2002 Piermont Information Systems Inc.
@@ -72,7 +72,7 @@
 
                struct disk_partitions *parts =
                   (*ps->create_new_for_disk)(pm->diskdev,
-                  0, pm->dlsize, pm->dlsize, true, NULL);
+                  0, pm->dlsize, true, NULL);
                if (!parts)
                        return false;
 
diff -r 49cbd0092cad -r a1ea9681dc7a usr.sbin/sysinst/arch/hpcarm/md.c
--- a/usr.sbin/sysinst/arch/hpcarm/md.c Mon Jan 27 21:14:17 2020 +0000
+++ b/usr.sbin/sysinst/arch/hpcarm/md.c Mon Jan 27 21:21:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.7 2020/01/09 13:22:31 martin Exp $ */
+/*     $NetBSD: md.c,v 1.8 2020/01/27 21:21:22 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -101,7 +101,7 @@
 
                struct disk_partitions *parts =
                   (*ps->create_new_for_disk)(pm->diskdev,
-                  0, pm->dlsize, pm->dlsize, true, NULL);
+                  0, pm->dlsize, true, NULL);
                if (!parts)
                        return false;
 
diff -r 49cbd0092cad -r a1ea9681dc7a usr.sbin/sysinst/arch/hpcmips/md.c
--- a/usr.sbin/sysinst/arch/hpcmips/md.c        Mon Jan 27 21:14:17 2020 +0000
+++ b/usr.sbin/sysinst/arch/hpcmips/md.c        Mon Jan 27 21:21:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.7 2020/01/09 13:22:31 martin Exp $ */
+/*     $NetBSD: md.c,v 1.8 2020/01/27 21:21:22 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -75,7 +75,7 @@
 
                struct disk_partitions *parts =
                   (*ps->create_new_for_disk)(pm->diskdev,
-                  0, pm->dlsize, pm->dlsize, true, NULL);
+                  0, pm->dlsize, true, NULL);
                if (!parts)
                        return false;
 
diff -r 49cbd0092cad -r a1ea9681dc7a usr.sbin/sysinst/arch/hpcsh/md.c
--- a/usr.sbin/sysinst/arch/hpcsh/md.c  Mon Jan 27 21:14:17 2020 +0000
+++ b/usr.sbin/sysinst/arch/hpcsh/md.c  Mon Jan 27 21:21:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.8 2020/01/09 13:22:31 martin Exp $    */
+/*     $NetBSD: md.c,v 1.9 2020/01/27 21:21:23 martin Exp $    */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -76,7 +76,7 @@
 
                struct disk_partitions *parts =
                   (*ps->create_new_for_disk)(pm->diskdev,
-                  0, pm->dlsize, pm->dlsize, true, NULL);
+                  0, pm->dlsize, true, NULL);
                if (!parts)
                        return false;
 
diff -r 49cbd0092cad -r a1ea9681dc7a usr.sbin/sysinst/arch/i386/md.c
--- a/usr.sbin/sysinst/arch/i386/md.c   Mon Jan 27 21:14:17 2020 +0000
+++ b/usr.sbin/sysinst/arch/i386/md.c   Mon Jan 27 21:21:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.28 2020/01/09 13:22:31 martin Exp $ */
+/*     $NetBSD: md.c,v 1.29 2020/01/27 21:21:23 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -122,7 +122,7 @@
 
                struct disk_partitions *parts =
                   (*ps->create_new_for_disk)(pm->diskdev,
-                  0, pm->dlsize, pm->dlsize, true, NULL);
+                  0, pm->dlsize, true, NULL);
                if (!parts)
                        return false;
 
@@ -136,7 +136,7 @@
                pm->parts->pscheme->change_disk_geom(pm->parts,
                    bcyl, bhead, bsec);
        else
-               set_default_sizemult(MEG/512);
+               set_default_sizemult(pm->diskdev, MEG, pm->sectorsize);
 
        /*
         * If the selected scheme does not need two-stage partitioning
diff -r 49cbd0092cad -r a1ea9681dc7a usr.sbin/sysinst/arch/landisk/md.c
--- a/usr.sbin/sysinst/arch/landisk/md.c        Mon Jan 27 21:14:17 2020 +0000
+++ b/usr.sbin/sysinst/arch/landisk/md.c        Mon Jan 27 21:21:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.12 2020/01/09 13:22:32 martin Exp $   */
+/*     $NetBSD: md.c,v 1.13 2020/01/27 21:21:23 martin Exp $   */
 
 /*
  * Copyright 1997,2002 Piermont Information Systems Inc.
@@ -72,7 +72,7 @@
 
                struct disk_partitions *parts =
                   (*ps->create_new_for_disk)(pm->diskdev,
-                  0, pm->dlsize, pm->dlsize, true, NULL);
+                  0, pm->dlsize, true, NULL);
                if (!parts)
                        return false;
 
diff -r 49cbd0092cad -r a1ea9681dc7a usr.sbin/sysinst/arch/ofppc/md.c
--- a/usr.sbin/sysinst/arch/ofppc/md.c  Mon Jan 27 21:14:17 2020 +0000
+++ b/usr.sbin/sysinst/arch/ofppc/md.c  Mon Jan 27 21:21:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.9 2020/01/09 13:22:32 martin Exp $    */
+/*     $NetBSD: md.c,v 1.10 2020/01/27 21:21:23 martin Exp $   */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -93,7 +93,7 @@
 
                struct disk_partitions *parts =
                   (*ps->create_new_for_disk)(pm->diskdev,
-                  0, pm->dlsize, pm->dlsize, true, NULL);
+                  0, pm->dlsize, true, NULL);
                if (!parts)
                        return false;
 
diff -r 49cbd0092cad -r a1ea9681dc7a usr.sbin/sysinst/arch/playstation2/md.c
--- a/usr.sbin/sysinst/arch/playstation2/md.c   Mon Jan 27 21:14:17 2020 +0000
+++ b/usr.sbin/sysinst/arch/playstation2/md.c   Mon Jan 27 21:21:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.7 2020/01/09 13:22:32 martin Exp $ */
+/*     $NetBSD: md.c,v 1.8 2020/01/27 21:21:23 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -77,7 +77,7 @@
 
                struct disk_partitions *parts =
                   (*ps->create_new_for_disk)(pm->diskdev,
-                  0, pm->dlsize, pm->dlsize, true, NULL);
+                  0, pm->dlsize, true, NULL);
                if (!parts)
                        return false;
 
@@ -94,7 +94,7 @@
                pm->parts->pscheme->change_disk_geom(pm->parts,
                    cyl, head, sec);
        else
-               set_default_sizemult(MEG/512);
+               set_default_sizemult(pm->diskdev, MEG, pm->sectorsize);
 
        /*
         * If the selected scheme does not need two-stage partitioning
diff -r 49cbd0092cad -r a1ea9681dc7a usr.sbin/sysinst/arch/prep/md.c
--- a/usr.sbin/sysinst/arch/prep/md.c   Mon Jan 27 21:14:17 2020 +0000
+++ b/usr.sbin/sysinst/arch/prep/md.c   Mon Jan 27 21:21:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.11 2020/01/09 13:22:32 martin Exp $   */
+/*     $NetBSD: md.c,v 1.12 2020/01/27 21:21:23 martin Exp $   */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -77,7 +77,7 @@
 
                struct disk_partitions *parts =
                   (*ps->create_new_for_disk)(pm->diskdev,
-                  0, pm->dlsize, pm->dlsize, true, NULL);
+                  0, pm->dlsize, true, NULL);
                if (!parts)
                        return false;
 
diff -r 49cbd0092cad -r a1ea9681dc7a usr.sbin/sysinst/arch/sandpoint/md.c
--- a/usr.sbin/sysinst/arch/sandpoint/md.c      Mon Jan 27 21:14:17 2020 +0000
+++ b/usr.sbin/sysinst/arch/sandpoint/md.c      Mon Jan 27 21:21:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.7 2020/01/09 13:22:32 martin Exp $ */
+/*     $NetBSD: md.c,v 1.8 2020/01/27 21:21:23 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -106,7 +106,7 @@
 
                struct disk_partitions *parts =
                   (*ps->create_new_for_disk)(pm->diskdev,
-                  0, pm->dlsize, pm->dlsize, true, NULL);
+                  0, pm->dlsize, true, NULL);
                if (!parts)
                        return false;
 
diff -r 49cbd0092cad -r a1ea9681dc7a usr.sbin/sysinst/arch/zaurus/md.c
--- a/usr.sbin/sysinst/arch/zaurus/md.c Mon Jan 27 21:14:17 2020 +0000
+++ b/usr.sbin/sysinst/arch/zaurus/md.c Mon Jan 27 21:21:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.7 2020/01/09 13:22:32 martin Exp $    */
+/*     $NetBSD: md.c,v 1.8 2020/01/27 21:21:23 martin Exp $    */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -86,7 +86,7 @@
 
                struct disk_partitions *parts =



Home | Main Index | Thread Index | Old Index