Module Name: src Committed By: martin Date: Wed Oct 14 15:09:10 UTC 2020
Modified Files: src/usr.sbin/sysinst/arch/evbarm: md.c Log Message: Properly convert partition default sizes in MB to number of sectors To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/sysinst/arch/evbarm/md.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/sysinst/arch/evbarm/md.c diff -u src/usr.sbin/sysinst/arch/evbarm/md.c:1.18 src/usr.sbin/sysinst/arch/evbarm/md.c:1.19 --- src/usr.sbin/sysinst/arch/evbarm/md.c:1.18 Wed Oct 14 14:37:59 2020 +++ src/usr.sbin/sysinst/arch/evbarm/md.c Wed Oct 14 15:09:10 2020 @@ -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 @@ md_parts_use_wholedisk(struct disk_parti { 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 @@ evbarm_part_defaults(struct pm_devs *my_ 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; } }