Sun Jan 29 16:01:37 2012 UTC ()
Add support for RDB-partitioned disks.
When an RDB block was found on the disk we cannot change the disk layout,
and everything which has to do with MBR partitioning will be skipped.


(phx)
diff -r1.10 -r1.11 src/distrib/utils/sysinst/arch/ofppc/md.c
diff -r1.6 -r1.7 src/distrib/utils/sysinst/arch/ofppc/md.h

cvs diff -r1.10 -r1.11 src/distrib/utils/sysinst/arch/ofppc/Attic/md.c (expand / switch to unified diff)

--- src/distrib/utils/sysinst/arch/ofppc/Attic/md.c 2011/11/04 11:27:04 1.10
+++ src/distrib/utils/sysinst/arch/ofppc/Attic/md.c 2012/01/29 16:01:36 1.11
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: md.c,v 1.10 2011/11/04 11:27:04 martin Exp $ */ 1/* $NetBSD: md.c,v 1.11 2012/01/29 16:01:36 phx Exp $ */
2 2
3/* 3/*
4 * Copyright 1997 Piermont Information Systems Inc. 4 * Copyright 1997 Piermont Information Systems Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Based on code written by Philip A. Nelson for Piermont Information 7 * Based on code written by Philip A. Nelson for Piermont Information
8 * Systems Inc. 8 * Systems Inc.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -26,78 +26,123 @@ @@ -26,78 +26,123 @@
26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
32 * THE POSSIBILITY OF SUCH DAMAGE. 32 * THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/* md.c -- ofppc machine specific routines */ 35/* md.c -- ofppc machine specific routines */
36 36
37#include <sys/param.h> 37#include <sys/param.h>
38#include <sys/sysctl.h> 38#include <sys/sysctl.h>
 39#include <sys/disklabel_rdb.h>
39#include <stdio.h> 40#include <stdio.h>
40#include <util.h> 41#include <util.h>
41#include <machine/cpu.h> 42#include <machine/cpu.h>
42 43
43#include "defs.h" 44#include "defs.h"
44#include "md.h" 45#include "md.h"
45#include "msg_defs.h" 46#include "msg_defs.h"
46#include "menu_defs.h" 47#include "menu_defs.h"
47#include "endian.h" 48#include "endian.h"
48 49
 50static int check_rdb(void);
 51static uint32_t rdbchksum(void *);
 52
49/* We use MBR_PTYPE_PREP like port-prep does. */ 53/* We use MBR_PTYPE_PREP like port-prep does. */
50static int nonewfsmsdos = 0, nobootfix = 0, noprepfix=0; 54static int nonewfsmsdos = 0, nobootfix = 0, noprepfix=0;
51static int bootpart_fat12 = PART_BOOT_FAT12; 55static int bootpart_fat12 = PART_BOOT_FAT12;
52static int bootpart_binfo = PART_BOOT_BINFO; 56static int bootpart_binfo = PART_BOOT_BINFO;
53static int bootpart_prep = PART_BOOT_PREP; 57static int bootpart_prep = PART_BOOT_PREP;
54static int bootinfo_mbr = 1; 58static int bootinfo_mbr = 1;
 59static int rdb_found = 0;
55 60
56/* bootstart/bootsize are for the fat */ 61/* bootstart/bootsize are for the fat */
57int binfostart, binfosize, bprepstart, bprepsize; 62int binfostart, binfosize, bprepstart, bprepsize;
58 63
59void 64void
60md_init(void) 65md_init(void)
61{ 66{
62} 67}
63 68
64void 69void
65md_init_set_status(int flags) 70md_init_set_status(int flags)
66{ 71{
 72
67 (void)flags; 73 (void)flags;
68} 74}
69 75
70int 76int
71md_get_info(void) 77md_get_info(void)
72{ 78{
 79
 80 if (check_rdb())
 81 return 1;
 82
73 return set_bios_geom_with_mbr_guess(); 83 return set_bios_geom_with_mbr_guess();
74} 84}
75 85
76/* 86/*
77 * md back-end code for menu-driven BSD disklabel editor. 87 * md back-end code for menu-driven BSD disklabel editor.
78 */ 88 */
79int 89int
80md_make_bsd_partitions(void) 90md_make_bsd_partitions(void)
81{ 91{
82 int i; 92 int i;
83 int part; 93 int part;
84 int maxpart = getmaxpartitions(); 94 int maxpart = getmaxpartitions();
85 int partstart; 95 int partstart;
86 int part_raw, part_bsd; 96 int part_raw, part_bsd;
87 int ptend; 97 int ptend;
88 int no_swap = 0; 98 int no_swap = 0;
89 partinfo *p; 99 partinfo *p;
90 100
 101 if (rdb_found) {
 102 /*
 103 * We found RDB partitions on the disk, which cannot be
 104 * modified by rewriting the disklabel.
 105 * So just use what we have got.
 106 */
 107 for (part = 0; part < maxpart; part++) {
 108 if (PI_ISBSDFS(&bsdlabel[part])) {
 109 bsdlabel[part].pi_flags |=
 110 PIF_NEWFS | PIF_MOUNT;
 111
 112 if (part == PART_A)
 113 strcpy(bsdlabel[part].pi_mount, "/");
 114 }
 115 }
 116
 117 part_bsd = part_raw = getrawpartition();
 118 if (part_raw == -1)
 119 part_raw = PART_C; /* for sanity... */
 120 bsdlabel[part_raw].pi_offset = 0;
 121 bsdlabel[part_raw].pi_size = dlsize;
 122
 123 set_sizemultname_meg();
 124rdb_edit_check:
 125 if (edit_and_check_label(bsdlabel, maxpart, part_raw,
 126 part_bsd) == 0) {
 127 msg_display(MSG_abort);
 128 return 0;
 129 }
 130 if (md_check_partitions() == 0)
 131 goto rdb_edit_check;
 132
 133 return 1;
 134 }
 135
91 /* 136 /*
92 * Initialize global variables that track space used on this disk. 137 * Initialize global variables that track space used on this disk.
93 * Standard 4.4BSD 8-partition labels always cover whole disk. 138 * Standard 4.4BSD 8-partition labels always cover whole disk.
94 */ 139 */
95 if (ptsize == 0) 140 if (ptsize == 0)
96 ptsize = dlsize - ptstart; 141 ptsize = dlsize - ptstart;
97 if (dlsize == 0) 142 if (dlsize == 0)
98 dlsize = ptstart + ptsize; 143 dlsize = ptstart + ptsize;
99 144
100 partstart = ptstart; 145 partstart = ptstart;
101 ptend = ptstart + ptsize; 146 ptend = ptstart + ptsize;
102 147
103 /* Ask for layout type -- standard or special */ 148 /* Ask for layout type -- standard or special */
@@ -213,26 +258,29 @@ md_make_bsd_partitions(void) @@ -213,26 +258,29 @@ md_make_bsd_partitions(void)
213 258
214 /* Everything looks OK. */ 259 /* Everything looks OK. */
215 return 1; 260 return 1;
216} 261}
217 262
218/* 263/*
219 * any additional partition validation 264 * any additional partition validation
220 */ 265 */
221int 266int
222md_check_partitions(void) 267md_check_partitions(void)
223{ 268{
224 int part, fprep=0, ffat=0; 269 int part, fprep=0, ffat=0;
225 270
 271 if (rdb_found)
 272 return 1;
 273
226 /* we need to find a boot partition, otherwise we can't create 274 /* we need to find a boot partition, otherwise we can't create
227 * our msdos fs boot partition. We make the assumption that 275 * our msdos fs boot partition. We make the assumption that
228 * the user hasn't done something stupid, like move it away 276 * the user hasn't done something stupid, like move it away
229 * from the MBR partition. 277 * from the MBR partition.
230 */ 278 */
231 for (part = PART_A; part < MAXPARTITIONS; part++) { 279 for (part = PART_A; part < MAXPARTITIONS; part++) {
232 if (bsdlabel[part].pi_fstype == FS_MSDOS) { 280 if (bsdlabel[part].pi_fstype == FS_MSDOS) {
233 bootpart_fat12 = part; 281 bootpart_fat12 = part;
234 ffat++; 282 ffat++;
235 } else if (bsdlabel[part].pi_fstype == FS_BOOT) { 283 } else if (bsdlabel[part].pi_fstype == FS_BOOT) {
236 bootpart_prep = part; 284 bootpart_prep = part;
237 fprep++; 285 fprep++;
238 } else if (bsdlabel[part].pi_fstype == FS_OTHER) { 286 } else if (bsdlabel[part].pi_fstype == FS_OTHER) {
@@ -249,46 +297,50 @@ md_check_partitions(void) @@ -249,46 +297,50 @@ md_check_partitions(void)
249 return 3; 297 return 3;
250 298
251 msg_display(MSG_nobootpartdisklabel); 299 msg_display(MSG_nobootpartdisklabel);
252 process_menu(MENU_ok, NULL); 300 process_menu(MENU_ok, NULL);
253 return 0; 301 return 0;
254} 302}
255 303
256/* 304/*
257 * hook called before writing new disklabel. 305 * hook called before writing new disklabel.
258 */ 306 */
259int 307int
260md_pre_disklabel(void) 308md_pre_disklabel(void)
261{ 309{
 310
 311 if (rdb_found)
 312 return 0;
 313
262 msg_display(MSG_dofdisk); 314 msg_display(MSG_dofdisk);
263 315
264 /* write edited MBR onto disk. */ 316 /* write edited MBR onto disk. */
265 if (write_mbr(diskdev, &mbr, 1) != 0) { 317 if (write_mbr(diskdev, &mbr, 1) != 0) {
266 msg_display(MSG_wmbrfail); 318 msg_display(MSG_wmbrfail);
267 process_menu(MENU_ok, NULL); 319 process_menu(MENU_ok, NULL);
268 return 1; 320 return 1;
269 } 321 }
270 return 0; 322 return 0;
271} 323}
272 324
273/* 325/*
274 * hook called after writing disklabel to new target disk. 326 * hook called after writing disklabel to new target disk.
275 */ 327 */
276int 328int
277md_post_disklabel(void) 329md_post_disklabel(void)
278{ 330{
279 char bootdev[100]; 331 char bootdev[100];
280 332
281 if (bootstart == 0 || bootsize == 0) 333 if (bootstart == 0 || bootsize == 0 || rdb_found)
282 return 0; 334 return 0;
283 335
284 snprintf(bootdev, sizeof bootdev, "/dev/r%s%c", diskdev, 336 snprintf(bootdev, sizeof bootdev, "/dev/r%s%c", diskdev,
285 'a'+bootpart_fat12); 337 'a'+bootpart_fat12);
286 run_program(RUN_DISPLAY, "/sbin/newfs_msdos %s", bootdev); 338 run_program(RUN_DISPLAY, "/sbin/newfs_msdos %s", bootdev);
287 339
288 return 0; 340 return 0;
289} 341}
290 342
291/* 343/*
292 * hook called after upgrade() or install() has finished setting 344 * hook called after upgrade() or install() has finished setting
293 * up the target disk but immediately before the user is given the 345 * up the target disk but immediately before the user is given the
294 * ``disks are now set up'' message. 346 * ``disks are now set up'' message.
@@ -297,27 +349,27 @@ int @@ -297,27 +349,27 @@ int
297md_post_newfs(void) 349md_post_newfs(void)
298{ 350{
299 351
300 /* No bootblock. We use ofwboot from a partition visiable by OFW. */ 352 /* No bootblock. We use ofwboot from a partition visiable by OFW. */
301 return 0; 353 return 0;
302} 354}
303 355
304int 356int
305md_post_extract(void) 357md_post_extract(void)
306{ 358{
307 char bootdev[100], bootbdev[100], version[64]; 359 char bootdev[100], bootbdev[100], version[64];
308 360
309 /* if we can't make it bootable, just punt */ 361 /* if we can't make it bootable, just punt */
310 if (nobootfix && noprepfix) 362 if ((nobootfix && noprepfix) || rdb_found)
311 return 0; 363 return 0;
312 364
313 snprintf(version, sizeof version, "NetBSD/%s %s", MACH, REL); 365 snprintf(version, sizeof version, "NetBSD/%s %s", MACH, REL);
314 run_program(RUN_DISPLAY, "/usr/mdec/mkbootinfo '%s' %d " 366 run_program(RUN_DISPLAY, "/usr/mdec/mkbootinfo '%s' %d "
315 "/tmp/bootinfo.txt", version, bootinfo_mbr); 367 "/tmp/bootinfo.txt", version, bootinfo_mbr);
316 368
317 if (!nobootfix) { 369 if (!nobootfix) {
318 run_program(RUN_DISPLAY, "/bin/mkdir -p /%s/boot/ppc", 370 run_program(RUN_DISPLAY, "/bin/mkdir -p /%s/boot/ppc",
319 target_prefix()); 371 target_prefix());
320 run_program(RUN_DISPLAY, "/bin/mkdir -p /%s/boot/netbsd", 372 run_program(RUN_DISPLAY, "/bin/mkdir -p /%s/boot/netbsd",
321 target_prefix()); 373 target_prefix());
322 run_program(RUN_DISPLAY, "/bin/cp /usr/mdec/ofwboot " 374 run_program(RUN_DISPLAY, "/bin/cp /usr/mdec/ofwboot "
323 "/%s/boot/netbsd", target_prefix()); 375 "/%s/boot/netbsd", target_prefix());
@@ -343,38 +395,42 @@ md_post_extract(void) @@ -343,38 +395,42 @@ md_post_extract(void)
343 'a'+bootpart_binfo); 395 'a'+bootpart_binfo);
344 run_program(RUN_DISPLAY, "/bin/dd if=/dev/zero of=%s bs=512", 396 run_program(RUN_DISPLAY, "/bin/dd if=/dev/zero of=%s bs=512",
345 bootdev); 397 bootdev);
346 run_program(RUN_DISPLAY, "/bin/dd if=/tmp/bootinfo.txt " 398 run_program(RUN_DISPLAY, "/bin/dd if=/tmp/bootinfo.txt "
347 "of=%s bs=512", bootbdev); 399 "of=%s bs=512", bootbdev);
348 } 400 }
349 401
350 return 0; 402 return 0;
351} 403}
352 404
353void 405void
354md_cleanup_install(void) 406md_cleanup_install(void)
355{ 407{
 408
356#ifndef DEBUG 409#ifndef DEBUG
357 enable_rc_conf(); 410 enable_rc_conf();
358#endif 411#endif
359} 412}
360 413
361int 414int
362md_pre_update(void) 415md_pre_update(void)
363{ 416{
364 struct mbr_partition *part; 417 struct mbr_partition *part;
365 mbr_info_t *ext; 418 mbr_info_t *ext;
366 int i; 419 int i;
367 420
 421 if (check_rdb())
 422 return 1;
 423
368 read_mbr(diskdev, &mbr); 424 read_mbr(diskdev, &mbr);
369 /* do a sanity check of the partition table */ 425 /* do a sanity check of the partition table */
370 for (ext = &mbr; ext; ext = ext->extended) { 426 for (ext = &mbr; ext; ext = ext->extended) {
371 part = ext->mbr.mbr_parts; 427 part = ext->mbr.mbr_parts;
372 for (i = 0; i < MBR_PART_COUNT; part++, i++) { 428 for (i = 0; i < MBR_PART_COUNT; part++, i++) {
373 if (part->mbrp_type == MBR_PTYPE_PREP && 429 if (part->mbrp_type == MBR_PTYPE_PREP &&
374 part->mbrp_size > 50) 430 part->mbrp_size > 50)
375 bootinfo_mbr = i+1; 431 bootinfo_mbr = i+1;
376 if (part->mbrp_type == MBR_PTYPE_RESERVED_x21 && 432 if (part->mbrp_type == MBR_PTYPE_RESERVED_x21 &&
377 part->mbrp_size < (MIN_FAT12_BOOT/512)) { 433 part->mbrp_size < (MIN_FAT12_BOOT/512)) {
378 msg_display(MSG_boottoosmall); 434 msg_display(MSG_boottoosmall);
379 msg_display_add(MSG_nobootpartdisklabel, 0); 435 msg_display_add(MSG_nobootpartdisklabel, 0);
380 process_menu(MENU_yesno, NULL); 436 process_menu(MENU_yesno, NULL);
@@ -390,26 +446,27 @@ md_pre_update(void) @@ -390,26 +446,27 @@ md_pre_update(void)
390 case 0: nobootfix=1; noprepfix=1; break; 446 case 0: nobootfix=1; noprepfix=1; break;
391 case 1: noprepfix=1; break; 447 case 1: noprepfix=1; break;
392 case 2: nobootfix=1; break; 448 case 2: nobootfix=1; break;
393 default: break; 449 default: break;
394 } 450 }
395 451
396 return 1; 452 return 1;
397} 453}
398 454
399/* Upgrade support */ 455/* Upgrade support */
400int 456int
401md_update(void) 457md_update(void)
402{ 458{
 459
403 nonewfsmsdos = 1; 460 nonewfsmsdos = 1;
404 md_post_newfs(); 461 md_post_newfs();
405 return 1; 462 return 1;
406} 463}
407 464
408 465
409int 466int
410md_check_mbr(mbr_info_t *mbri) 467md_check_mbr(mbr_info_t *mbri)
411{ 468{
412 mbr_info_t *ext; 469 mbr_info_t *ext;
413 struct mbr_partition *part; 470 struct mbr_partition *part;
414 int i; 471 int i;
415 472
@@ -533,18 +590,66 @@ md_mbr_use_wholedisk(mbr_info_t *mbri) @@ -533,18 +590,66 @@ md_mbr_use_wholedisk(mbr_info_t *mbri)
533 ptstart = part[1].mbrp_start; 590 ptstart = part[1].mbrp_start;
534 ptsize = part[1].mbrp_size; 591 ptsize = part[1].mbrp_size;
535 bootstart = part[0].mbrp_start; 592 bootstart = part[0].mbrp_start;
536 bootsize = part[0].mbrp_size; 593 bootsize = part[0].mbrp_size;
537 binfostart = part[2].mbrp_start; 594 binfostart = part[2].mbrp_start;
538 binfosize= part[2].mbrp_size; 595 binfosize= part[2].mbrp_size;
539 bprepstart = part[3].mbrp_start; 596 bprepstart = part[3].mbrp_start;
540 bprepsize = part[3].mbrp_size; 597 bprepsize = part[3].mbrp_size;
541 bootinfo_mbr = 4; 598 bootinfo_mbr = 4;
542 599
543 return 1; 600 return 1;
544} 601}
545 602
 603const char *md_disklabel_cmd(void)
 604{
 605
 606 /* we cannot rewrite an RDB disklabel */
 607 if (rdb_found)
 608 return "echo No disklabel";
 609
 610 return "disklabel -w -r";
 611}
 612
 613static int
 614check_rdb(void)
 615{
 616 char buf[512], diskpath[MAXPATHLEN];
 617 struct rdblock *rdb;
 618 off_t blk;
 619 int fd;
 620
 621 /* Find out if this disk has a valid RDB, before continuing. */
 622 rdb = (struct rdblock *)buf;
 623 fd = opendisk(diskdev, O_RDONLY, diskpath, sizeof(diskpath), 0);
 624 if (fd < 0)
 625 return 0;
 626 for (blk = 0; blk < RDB_MAXBLOCKS; blk++) {
 627 if (pread(fd, rdb, 512, blk * 512) != 512)
 628 return 0;
 629 if (rdb->id == RDBLOCK_ID && rdbchksum(rdb) == 0) {
 630 rdb_found = 1; /* do not repartition! */
 631 return 1;
 632 }
 633 }
 634 return 0;
 635}
 636
 637static uint32_t
 638rdbchksum(void *bdata)
 639{
 640 uint32_t *blp, cnt, val;
 641
 642 blp = bdata;
 643 cnt = blp[1];
 644 val = 0;
 645 while (cnt--)
 646 val += *blp++;
 647 return val;
 648}
 649
546int 650int
547md_pre_mount() 651md_pre_mount()
548{ 652{
 653
549 return 0; 654 return 0;
550} 655}

cvs diff -r1.6 -r1.7 src/distrib/utils/sysinst/arch/ofppc/Attic/md.h (expand / switch to unified diff)

--- src/distrib/utils/sysinst/arch/ofppc/Attic/md.h 2011/08/21 15:21:46 1.6
+++ src/distrib/utils/sysinst/arch/ofppc/Attic/md.h 2012/01/29 16:01:37 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: md.h,v 1.6 2011/08/21 15:21:46 phx Exp $ */ 1/* $NetBSD: md.h,v 1.7 2012/01/29 16:01:37 phx Exp $ */
2 2
3/* 3/*
4 * Copyright 1997 Piermont Information Systems Inc. 4 * Copyright 1997 Piermont Information Systems Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written by Philip A. Nelson for Piermont Information Systems Inc. 7 * Written by Philip A. Nelson for Piermont Information Systems Inc.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -90,14 +90,15 @@ @@ -90,14 +90,15 @@
90#define MD_SETS_SELECTED SET_KERNEL_1, SET_SYSTEM, SET_X11 90#define MD_SETS_SELECTED SET_KERNEL_1, SET_SYSTEM, SET_X11
91 91
92/* 92/*
93 * Machine-specific command to write a new label to a disk. 93 * Machine-specific command to write a new label to a disk.
94 * For example, i386 uses "/sbin/disklabel -w -r", just like i386 94 * For example, i386 uses "/sbin/disklabel -w -r", just like i386
95 * miniroot scripts, though this may leave a bogus incore label. 95 * miniroot scripts, though this may leave a bogus incore label.
96 * Sun ports should probably use DISKLABEL_CMD "/sbin/disklabel -w" 96 * Sun ports should probably use DISKLABEL_CMD "/sbin/disklabel -w"
97 * to get incore to ondisk inode translation for the Sun proms. 97 * to get incore to ondisk inode translation for the Sun proms.
98 * If not defined, we assume the port does not support disklabels and 98 * If not defined, we assume the port does not support disklabels and
99 * hand-edited disklabel will NOT be written by MI code. 99 * hand-edited disklabel will NOT be written by MI code.
100 * 100 *
101 * On ofppc, do what the 1.2 install scripts did. 101 * On ofppc, do what the 1.2 install scripts did.
102 */ 102 */
103#define DISKLABEL_CMD "disklabel -w -r" 103const char *md_disklabel_cmd(void);
 104#define DISKLABEL_CMD md_disklabel_cmd()