Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst/arch/evbarm Properly convert partition defa...



details:   https://anonhg.NetBSD.org/src/rev/d3492684fea0
branches:  trunk
changeset: 944866:d3492684fea0
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Oct 14 15:09:10 2020 +0000

description:
Properly convert partition default sizes in MB to number of sectors

diffstat:

 usr.sbin/sysinst/arch/evbarm/md.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r b01e868ff24c -r d3492684fea0 usr.sbin/sysinst/arch/evbarm/md.c
--- a/usr.sbin/sysinst/arch/evbarm/md.c Wed Oct 14 14:37:59 2020 +0000
+++ b/usr.sbin/sysinst/arch/evbarm/md.c Wed Oct 14 15:09:10 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.18 2020/10/14 14:37:59 martin Exp $ */
+/*     $NetBSD: md.c,v 1.19 2020/10/14 15:09:10 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -333,7 +333,8 @@
 {
        struct disk_part_info boot_part = {
                .size = boardtype == BOARD_TYPE_NORMAL ? 
-                   PART_BOOT_LARGE/512 : PART_BOOT/512,
+                   PART_BOOT_LARGE/parts->bytes_per_sector :
+                   PART_BOOT/parts->bytes_per_sector,
                .fs_type = PART_BOOT_TYPE, .fs_sub_type = MBR_PTYPE_FAT16L,
        };
 
@@ -373,7 +374,8 @@
                if (infos[i].fs_type == PART_BOOT_TYPE &&
                    infos[i].mount[0] != 0 &&
                    strcmp(infos[i].mount, PART_BOOT_MOUNT) == 0) {
-                       infos[i].size = PART_BOOT_LARGE;
+                       infos[i].size = PART_BOOT_LARGE /
+                           my_pm->parts->bytes_per_sector;
                        return;
                }
        }



Home | Main Index | Thread Index | Old Index