Module Name: src
Committed By: sborrill
Date: Thu May 14 16:23:38 UTC 2009
Modified Files:
src/distrib/utils/sysinst: bsddisklabel.c defs.h disks.c mbr.c mbr.h
msg.mi.de msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl savenewlabel.c
src/distrib/utils/sysinst/arch/i386: md.c
Log Message:
Support drives over 1TB in size (i.e. stop errors like drive is -654343MB in
size).
Error if drive is over 2TB in size (and thus over the disklabel limit).
To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/distrib/utils/sysinst/bsddisklabel.c
cvs rdiff -u -r1.142 -r1.143 src/distrib/utils/sysinst/defs.h
cvs rdiff -u -r1.104 -r1.105 src/distrib/utils/sysinst/disks.c
cvs rdiff -u -r1.79 -r1.80 src/distrib/utils/sysinst/mbr.c
cvs rdiff -u -r1.22 -r1.23 src/distrib/utils/sysinst/mbr.h
cvs rdiff -u -r1.48 -r1.49 src/distrib/utils/sysinst/msg.mi.de
cvs rdiff -u -r1.154 -r1.155 src/distrib/utils/sysinst/msg.mi.en
cvs rdiff -u -r1.25 -r1.26 src/distrib/utils/sysinst/msg.mi.es
cvs rdiff -u -r1.105 -r1.106 src/distrib/utils/sysinst/msg.mi.fr
cvs rdiff -u -r1.64 -r1.65 src/distrib/utils/sysinst/msg.mi.pl
cvs rdiff -u -r1.5 -r1.6 src/distrib/utils/sysinst/savenewlabel.c
cvs rdiff -u -r1.121 -r1.122 src/distrib/utils/sysinst/arch/i386/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/distrib/utils/sysinst/bsddisklabel.c
diff -u src/distrib/utils/sysinst/bsddisklabel.c:1.51 src/distrib/utils/sysinst/bsddisklabel.c:1.52
--- src/distrib/utils/sysinst/bsddisklabel.c:1.51 Tue Apr 7 10:45:04 2009
+++ src/distrib/utils/sysinst/bsddisklabel.c Thu May 14 16:23:38 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: bsddisklabel.c,v 1.51 2009/04/07 10:45:04 tsutsui Exp $ */
+/* $NetBSD: bsddisklabel.c,v 1.52 2009/05/14 16:23:38 sborrill Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -90,7 +90,7 @@
#endif
int
-save_ptn(int ptn, int start, int size, int fstype, const char *mountpt)
+save_ptn(int ptn, daddr_t start, daddr_t size, int fstype, const char *mountpt)
{
static int maxptn;
partinfo *p;
@@ -151,7 +151,7 @@
struct ptn_info *pi = arg;
struct ptn_size *p;
int sm = MEG / sectorsize;
- int size;
+ daddr_t size;
char inc_free[12];
p = &pi->ptn_sizes[opt];
@@ -161,11 +161,11 @@
}
size = p->size;
if (p == pi->pool_part)
- snprintf(inc_free, sizeof inc_free, "(%u)",
+ snprintf(inc_free, sizeof inc_free, "(%" PRIi64 ")",
(size + pi->free_space) / sm);
else
inc_free[0] = 0;
- wprintw(m->mw, "%6u%8s%10u%10u %c %s",
+ wprintw(m->mw, "%6" PRIi64 "%8s%10" PRIi64 "%10" PRIi64 " %c %s",
size / sm, inc_free, size / dlcylsize, size,
p == pi->pool_part ? '+' : ' ', p->mount);
}
@@ -195,11 +195,11 @@
if (pi->free_space >= 0)
snprintf(pi->exit_msg, sizeof pi->exit_msg,
msg_string(MSG_fssizesok),
- pi->free_space / sizemult, multname, pi->free_parts);
+ (int)(pi->free_space / sizemult), multname, pi->free_parts);
else
snprintf(pi->exit_msg, sizeof pi->exit_msg,
msg_string(MSG_fssizesbad),
- -pi->free_space / sizemult, multname, -pi->free_space);
+ (int)(-pi->free_space / sizemult), multname, (uint) -pi->free_space);
set_menu_numopts(pi->menu_no, m - pi->ptn_menus);
}
@@ -212,7 +212,7 @@
char answer[10];
char dflt[10];
char *cp;
- int size, old_size;
+ daddr_t size, old_size;
int mult;
p = pi->ptn_sizes + m->cursel;
@@ -233,7 +233,7 @@
if (size == 0)
size = p->dflt_size;
size /= sizemult;
- snprintf(dflt, sizeof dflt, "%d%s",
+ snprintf(dflt, sizeof dflt, "%" PRIi64 "%s",
size, p == pi->pool_part ? "+" : "");
for (;;) {
@@ -342,13 +342,13 @@
}
void
-get_ptn_sizes(int part_start, int sectors, int no_swap)
+get_ptn_sizes(daddr_t part_start, daddr_t sectors, int no_swap)
{
int i;
int maxpart = getmaxpartitions();
int sm; /* sectors in 1MB */
struct ptn_size *p;
- int size;
+ daddr_t size;
static struct ptn_info pi = { -1, {
#define PI_ROOT 0
@@ -534,9 +534,9 @@
int i;
int part;
int maxpart = getmaxpartitions();
- int partstart;
+ daddr_t partstart;
int part_raw, part_bsd;
- int ptend;
+ daddr_t ptend;
int no_swap = 0, valid_part = -1;
partinfo *p;
@@ -554,7 +554,7 @@
/* Ask for layout type -- standard or special */
msg_display(MSG_layout,
- ptsize / (MEG / sectorsize),
+ (int) (ptsize / (MEG / sectorsize)),
DEFROOTSIZE + DEFSWAPSIZE + DEFUSRSIZE,
DEFROOTSIZE + DEFSWAPSIZE + DEFUSRSIZE + XNEEDMB);
Index: src/distrib/utils/sysinst/defs.h
diff -u src/distrib/utils/sysinst/defs.h:1.142 src/distrib/utils/sysinst/defs.h:1.143
--- src/distrib/utils/sysinst/defs.h:1.142 Tue Apr 7 10:45:04 2009
+++ src/distrib/utils/sysinst/defs.h Thu May 14 16:23:38 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.142 2009/04/07 10:45:04 tsutsui Exp $ */
+/* $NetBSD: defs.h,v 1.143 2009/05/14 16:23:38 sborrill Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -198,14 +198,14 @@
struct ptn_size {
int ptn_id;
char mount[20];
- int dflt_size;
- int size;
+ daddr_t dflt_size;
+ daddr_t size;
int limit;
int changed;
} ptn_sizes[MAXPARTITIONS + 1]; /* +1 for delete code */
menu_ent ptn_menus[MAXPARTITIONS + 1]; /* +1 for unit chg */
int free_parts;
- int free_space;
+ daddr_t free_space;
struct ptn_size *pool_part;
char exit_msg[70];
};
@@ -239,13 +239,14 @@
const char *disktype; /* ST506, SCSI, ... */
/* Area of disk we can allocate, start and size in disk sectors. */
-int ptstart, ptsize;
+daddr_t ptstart, ptsize;
/* If we have an MBR boot partition, start and size in sectors */
int bootstart, bootsize;
/* Actual values for current disk - set by find_disks() or md_get_info() */
int sectorsize;
-int dlcyl, dlhead, dlsec, dlsize, dlcylsize;
+int dlcyl, dlhead, dlsec, dlcylsize;
+daddr_t dlsize;
int current_cylsize;
unsigned int root_limit; /* BIOS (etc) read limit */
@@ -449,11 +450,11 @@
/* from bsddisklabel.c */
int make_bsd_partitions(void);
-int save_ptn(int, int, int, int, const char *);
+int save_ptn(int, daddr_t, daddr_t, int, const char *);
void set_ptn_titles(menudesc *, int, void *);
void set_ptn_menu(struct ptn_info *);
int set_ptn_size(menudesc *, void *);
-void get_ptn_sizes(int, int, int);
+void get_ptn_sizes(daddr_t, daddr_t, int);
/* from aout2elf.c */
int move_aout_libs(void);
Index: src/distrib/utils/sysinst/disks.c
diff -u src/distrib/utils/sysinst/disks.c:1.104 src/distrib/utils/sysinst/disks.c:1.105
--- src/distrib/utils/sysinst/disks.c:1.104 Tue Apr 7 10:45:04 2009
+++ src/distrib/utils/sysinst/disks.c Thu May 14 16:23:38 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: disks.c,v 1.104 2009/04/07 10:45:04 tsutsui Exp $ */
+/* $NetBSD: disks.c,v 1.105 2009/05/14 16:23:38 sborrill Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -203,6 +203,11 @@
no_mbr = disk->dd_no_mbr;
if (dlsize == 0)
dlsize = disk->dd_cyl * disk->dd_head * disk->dd_sec;
+ if (dlsize > UINT32_MAX) {
+ msg_display(MSG_toobigdisklabel);
+ process_menu(MENU_ok, NULL);
+ return -1;
+ }
dlcylsize = dlhead * dlsec;
/* Get existing/default label */
@@ -218,7 +223,7 @@
void
fmt_fspart(menudesc *m, int ptn, void *arg)
{
- int poffset, psize, pend;
+ unsigned int poffset, psize, pend;
const char *desc;
static const char *Yes, *No;
partinfo *p = bsdlabel + ptn;
Index: src/distrib/utils/sysinst/mbr.c
diff -u src/distrib/utils/sysinst/mbr.c:1.79 src/distrib/utils/sysinst/mbr.c:1.80
--- src/distrib/utils/sysinst/mbr.c:1.79 Fri Dec 28 00:48:43 2007
+++ src/distrib/utils/sysinst/mbr.c Thu May 14 16:23:38 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: mbr.c,v 1.79 2007/12/28 00:48:43 dholland Exp $ */
+/* $NetBSD: mbr.c,v 1.80 2009/05/14 16:23:38 sborrill Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -1682,11 +1682,12 @@
*/
int
-guess_biosgeom_from_mbr(mbr_info_t *mbri, int *cyl, int *head, int *sec)
+guess_biosgeom_from_mbr(mbr_info_t *mbri, int *cyl, int *head, daddr_t *sec)
{
struct mbr_sector *mbrs = &mbri->mbr;
struct mbr_partition *parts = &mbrs->mbr_parts[0];
- int xcylinders, xheads, xsectors, i, j;
+ int xcylinders, xheads, i, j;
+ daddr_t xsectors;
int c1, h1, s1, c2, h2, s2;
unsigned long a1, a2;
uint64_t num, denom;
Index: src/distrib/utils/sysinst/mbr.h
diff -u src/distrib/utils/sysinst/mbr.h:1.22 src/distrib/utils/sysinst/mbr.h:1.23
--- src/distrib/utils/sysinst/mbr.h:1.22 Wed Apr 5 16:55:05 2006
+++ src/distrib/utils/sysinst/mbr.h Thu May 14 16:23:38 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: mbr.h,v 1.22 2006/04/05 16:55:05 garbled Exp $ */
+/* $NetBSD: mbr.h,v 1.23 2009/05/14 16:23:38 sborrill Exp $ */
/*
* Copyright 1997, 1988 Piermont Information Systems Inc.
@@ -113,7 +113,7 @@
int read_mbr(const char *, mbr_info_t *);
int write_mbr(const char *, mbr_info_t *, int);
int valid_mbr(struct mbr_sector *);
-int guess_biosgeom_from_mbr(mbr_info_t *, int *, int *, int *);
+int guess_biosgeom_from_mbr(mbr_info_t *, int *, int *, daddr_t *);
int md_bios_info(char *);
void set_bios_geom(int, int, int);
int otherpart(int);
Index: src/distrib/utils/sysinst/msg.mi.de
diff -u src/distrib/utils/sysinst/msg.mi.de:1.48 src/distrib/utils/sysinst/msg.mi.de:1.49
--- src/distrib/utils/sysinst/msg.mi.de:1.48 Tue Apr 7 10:45:04 2009
+++ src/distrib/utils/sysinst/msg.mi.de Thu May 14 16:23:38 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: msg.mi.de,v 1.48 2009/04/07 10:45:04 tsutsui Exp $ */
+/* $NetBSD: msg.mi.de,v 1.49 2009/05/14 16:23:38 sborrill Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -234,7 +234,7 @@
{Akzeptieren. Freier Speicherplatz: %d %s, %d freie Partitionen.}
message fssizesbad
-{Reduzieren der Partitionsgrößen um %d %s (%d Sektoren).}
+{Reduzieren der Partitionsgrößen um %d %s (%u Sektoren).}
message startoutsidedisk
{Der Startwert, den Sie angegeben haben, liegt jenseits des Endes der
@@ -249,6 +249,12 @@
Drücken Sie die Eingabetaste um fortzufahren.
}
+message toobigdisklabel
+{
+Diese Platte ist zu groß für eine
+disklabel-Partitionstabelle und kann deswegen weder für
+boot- noch für root-Partitionen benutzt werden}
+
message fspart
{Nachfolgend sehen Sie Ihre BSD-Disklabel-Partitionen:
(Dies ist die letzte Chance, diese zu ändern.)
@@ -261,7 +267,7 @@
}
message fspart_row
-{%9d %9d %10d %-10s %-5s %-5s %s}
+{%9lu %9lu %10lu %-10s %-5s %-5s %s}
message show_all_unused_partitions
{Alle unbenutzten Partitionen anzeigen}
Index: src/distrib/utils/sysinst/msg.mi.en
diff -u src/distrib/utils/sysinst/msg.mi.en:1.154 src/distrib/utils/sysinst/msg.mi.en:1.155
--- src/distrib/utils/sysinst/msg.mi.en:1.154 Wed Apr 22 12:38:10 2009
+++ src/distrib/utils/sysinst/msg.mi.en Thu May 14 16:23:38 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: msg.mi.en,v 1.154 2009/04/22 12:38:10 tsutsui Exp $ */
+/* $NetBSD: msg.mi.en,v 1.155 2009/05/14 16:23:38 sborrill Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -225,7 +225,7 @@
{Accept partition sizes. Free space %d %s, %d free partitions.}
message fssizesbad
-{Reduce partition sizes by %d %s (%d sectors).}
+{Reduce partition sizes by %d %s (%u sectors).}
message startoutsidedisk
{The start value you specified is beyond the end of the disk.
@@ -238,6 +238,13 @@
Type enter to continue
}
+message toobigdisklabel
+{
+This disk is too large for a disklabel partition table to be used
+and hence cannot be used as a bootable disk or to hold the root
+partition.
+}
+
message fspart
{We now have your BSD-disklabel partitions as:
This is your last chance to change them.
@@ -250,7 +257,7 @@
}
message fspart_row
-{%9d %9d %9d %-10s %-5s %-5s %s}
+{%9lu %9lu %9lu %-10s %-5s %-5s %s}
message show_all_unused_partitions
{Show all unused partitions}
Index: src/distrib/utils/sysinst/msg.mi.es
diff -u src/distrib/utils/sysinst/msg.mi.es:1.25 src/distrib/utils/sysinst/msg.mi.es:1.26
--- src/distrib/utils/sysinst/msg.mi.es:1.25 Tue Apr 7 10:45:04 2009
+++ src/distrib/utils/sysinst/msg.mi.es Thu May 14 16:23:38 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: msg.mi.es,v 1.25 2009/04/07 10:45:04 tsutsui Exp $ */
+/* $NetBSD: msg.mi.es,v 1.26 2009/05/14 16:23:38 sborrill Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -234,7 +234,7 @@
{Aceptar los tamaños de las particiones. Espacio libre %d %s, %d particiones libres.}
message fssizesbad
-{Reducir los tamaños de las particiones en %d %s (%d sectores).}
+{Reducir los tamaños de las particiones en %d %s (%u sectores).}
message startoutsidedisk
{El valor del comienzo que ha especificado está mas allá del final del disco.
@@ -247,6 +247,13 @@
Presione Intro para continuar
}
+message toobigdisklabel
+{
+This disk is too large for a disklabel partition table to be used
+and hence cannot be used as a bootable disk or to hold the root
+partition.
+}
+
message fspart
{Sus particiones con etiquetas BSD están ahora así.
Ésta es su última oportunidad para cambiarlas.
@@ -259,7 +266,7 @@
}
message fspart_row
-{%10d %9d %10d %-10s %-5s %-5s %s}
+{%10lu %9lu %10lu %-10s %-5s %-5s %s}
message show_all_unused_partitions
{Mostrar todas las particiones no usadas}
Index: src/distrib/utils/sysinst/msg.mi.fr
diff -u src/distrib/utils/sysinst/msg.mi.fr:1.105 src/distrib/utils/sysinst/msg.mi.fr:1.106
--- src/distrib/utils/sysinst/msg.mi.fr:1.105 Tue Apr 7 10:45:04 2009
+++ src/distrib/utils/sysinst/msg.mi.fr Thu May 14 16:23:38 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: msg.mi.fr,v 1.105 2009/04/07 10:45:04 tsutsui Exp $ */
+/* $NetBSD: msg.mi.fr,v 1.106 2009/05/14 16:23:38 sborrill Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -234,7 +234,7 @@
{Taille de la partition acceptée. Libre: espace %d %s, %d partition}
message fssizesbad
-{Réduire la taille de la partition de %d %s (%d secteurs).}
+{Réduire la taille de la partition de %d %s (%u secteurs).}
message startoutsidedisk
{La valeur que vous avez spécifiée est en dehors du disque
@@ -245,6 +245,13 @@
La taille de la partition a été tronquée à %d %s.
}
+message toobigdisklabel
+{
+Ce disque est trop grand pour qu'une table de partition soit utilisée.
+Il ne peut donc pas être utilisé en tant que disque démarrable ou
+contenir la partition racine.
+}
+
message fspart
{Vos partitions NetBSD sont les suivantes:
@@ -256,7 +263,7 @@
}
message fspart_row
-{%9d %9d %10d %-10s %-5s %-5s %s}
+{%9lu %9lu %10lu %-10s %-5s %-5s %s}
message show_all_unused_partitions
{Afficher les partitions libres}
Index: src/distrib/utils/sysinst/msg.mi.pl
diff -u src/distrib/utils/sysinst/msg.mi.pl:1.64 src/distrib/utils/sysinst/msg.mi.pl:1.65
--- src/distrib/utils/sysinst/msg.mi.pl:1.64 Tue Apr 7 10:45:04 2009
+++ src/distrib/utils/sysinst/msg.mi.pl Thu May 14 16:23:38 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: msg.mi.pl,v 1.64 2009/04/07 10:45:04 tsutsui Exp $ */
+/* $NetBSD: msg.mi.pl,v 1.65 2009/05/14 16:23:38 sborrill Exp $ */
/* Based on english version: */
/* NetBSD: msg.mi.pl,v 1.36 2004/04/17 18:55:35 atatat Exp */
@@ -226,7 +226,7 @@
{Zaakceptuj rozmiary partycji. Wolne miejsce %d %s, %d wolnych partycji.}
message fssizesbad
-{Zmniejsz rozmiary partycji o %d %s (%d sektorow).}
+{Zmniejsz rozmiary partycji o %d %s (%u sektorow).}
message startoutsidedisk
{Wartosc poczatkowa ktora podales jest poza koncem dysku.
@@ -237,6 +237,13 @@
twojej partycji zostal zmniejszony do %d %s.
}
+message toobigdisklabel
+{
+This disk is too large for a disklabel partition table to be used
+and hence cannot be used as a bootable disk or to hold the root
+partition.
+}
+
message fspart
{Mamy teraz twoje partycje BSD-disklabel jako:
@@ -248,7 +255,7 @@
}
message fspart_row
-{%9d %9d %10d %-10s %-7s %-9s %s}
+{%9lu %9lu %10lu %-10s %-7s %-9s %s}
message show_all_unused_partitions
{Pokaz wszystkie nieuzywane partycje}
Index: src/distrib/utils/sysinst/savenewlabel.c
diff -u src/distrib/utils/sysinst/savenewlabel.c:1.5 src/distrib/utils/sysinst/savenewlabel.c:1.6
--- src/distrib/utils/sysinst/savenewlabel.c:1.5 Sun Jul 27 08:57:27 2003
+++ src/distrib/utils/sysinst/savenewlabel.c Thu May 14 16:23:38 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: savenewlabel.c,v 1.5 2003/07/27 08:57:27 dsl Exp $ */
+/* $NetBSD: savenewlabel.c,v 1.6 2009/05/14 16:23:38 sborrill Exp $ */
/*
* Copyright 1997 Jonathan Stone
@@ -36,13 +36,14 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: savenewlabel.c,v 1.5 2003/07/27 08:57:27 dsl Exp $");
+__RCSID("$NetBSD: savenewlabel.c,v 1.6 2009/05/14 16:23:38 sborrill Exp $");
#endif
#include <sys/types.h>
#include <errno.h>
#include <stdio.h>
#include <fcntl.h>
+#include <inttypes.h>
#include <util.h>
#include <unistd.h>
#include <sys/dkio.h>
@@ -59,6 +60,12 @@
FILE *f;
int i;
+ /*
+ N.B. disklabels only support up to 2TB (32-bit field for sectors).
+ This function explicitly narrows from daddr_t (64-bit unsigned) to
+ uint32_t when writing the disklabel.
+ */
+
/* Create the disktab.preinstall */
f = fopen("/tmp/disktab", "w");
if (logging)
@@ -75,17 +82,18 @@
scripting_fprintf(f, "%s|NetBSD installation generated:\\\n", bsddiskname);
scripting_fprintf(f, "\t:dt=%s:ty=winchester:\\\n", disktype);
scripting_fprintf(f, "\t:nc#%d:nt#%d:ns#%d:\\\n", dlcyl, dlhead, dlsec);
- scripting_fprintf(f, "\t:sc#%d:su#%d:\\\n", dlhead*dlsec, dlsize);
+ scripting_fprintf(f, "\t:sc#%d:su#%" PRIu32 ":\\\n", dlhead*dlsec,
+ (uint32_t)dlsize);
scripting_fprintf(f, "\t:se#%d:%s\\\n", sectorsize, doessf);
for (i = 0; i < nparts; i++) {
- scripting_fprintf(f, "\t:p%c#%d:o%c#%d:t%c=%s:",
- 'a'+i, bsdlabel[i].pi_size,
- 'a'+i, bsdlabel[i].pi_offset,
+ scripting_fprintf(f, "\t:p%c#%" PRIu32 ":o%c#%" PRIu32 ":t%c=%s:",
+ 'a'+i, (uint32_t)bsdlabel[i].pi_size,
+ 'a'+i, (uint32_t)bsdlabel[i].pi_offset,
'a'+i, fstypenames[bsdlabel[i].pi_fstype]);
if (PI_ISBSDFS(&bsdlabel[i]))
- scripting_fprintf (f, "b%c#%d:f%c#%d:ta=4.2BSD:",
- 'a'+i, bsdlabel[i].pi_fsize * bsdlabel[i].pi_frag,
- 'a'+i, bsdlabel[i].pi_fsize);
+ scripting_fprintf (f, "b%c#%" PRIu32 ":f%c#%" PRIu32 ":ta=4.2BSD:",
+ 'a'+i, (uint32_t)(bsdlabel[i].pi_fsize * bsdlabel[i].pi_frag),
+ 'a'+i, (uint32_t)bsdlabel[i].pi_fsize);
if (i < nparts - 1)
scripting_fprintf(f, "\\\n");
Index: src/distrib/utils/sysinst/arch/i386/md.c
diff -u src/distrib/utils/sysinst/arch/i386/md.c:1.121 src/distrib/utils/sysinst/arch/i386/md.c:1.122
--- src/distrib/utils/sysinst/arch/i386/md.c:1.121 Tue Apr 7 10:45:05 2009
+++ src/distrib/utils/sysinst/arch/i386/md.c Thu May 14 16:23:38 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.121 2009/04/07 10:45:05 tsutsui Exp $ */
+/* $NetBSD: md.c,v 1.122 2009/05/14 16:23:38 sborrill Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -496,7 +496,8 @@
size_t len;
struct biosdisk_info *bip;
struct nativedisk_info *nip = NULL, *nat;
- int cyl, head, sec;
+ int cyl, head;
+ daddr_t sec;
if (disklist == NULL) {
if (sysctl(mib, 2, NULL, &len, NULL, 0) < 0)