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/6acd27e3059e
branches:  trunk
changeset: 1015113:6acd27e3059e
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 5bca791afa02 -r 6acd27e3059e 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