md.c revision 1.6
11.6Smartin/* $NetBSD: md.c,v 1.6 2020/10/12 16:14:33 martin Exp $ */ 21.1Sdholland 31.1Sdholland/* 41.1Sdholland * Copyright 1997 Piermont Information Systems Inc. 51.1Sdholland * All rights reserved. 61.1Sdholland * 71.1Sdholland * Based on code written by Philip A. Nelson for Piermont Information 81.1Sdholland * Systems Inc. 91.1Sdholland * 101.1Sdholland * Redistribution and use in source and binary forms, with or without 111.1Sdholland * modification, are permitted provided that the following conditions 121.1Sdholland * are met: 131.1Sdholland * 1. Redistributions of source code must retain the above copyright 141.1Sdholland * notice, this list of conditions and the following disclaimer. 151.1Sdholland * 2. Redistributions in binary form must reproduce the above copyright 161.1Sdholland * notice, this list of conditions and the following disclaimer in the 171.1Sdholland * documentation and/or other materials provided with the distribution. 181.1Sdholland * 3. The name of Piermont Information Systems Inc. may not be used to endorse 191.1Sdholland * or promote products derived from this software without specific prior 201.1Sdholland * written permission. 211.1Sdholland * 221.1Sdholland * THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS'' 231.1Sdholland * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 241.1Sdholland * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 251.1Sdholland * ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE 261.1Sdholland * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 271.1Sdholland * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 281.1Sdholland * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 291.1Sdholland * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 301.1Sdholland * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 311.1Sdholland * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 321.1Sdholland * THE POSSIBILITY OF SUCH DAMAGE. 331.1Sdholland */ 341.1Sdholland 351.1Sdholland#include <err.h> 361.1Sdholland 371.1Sdholland#include "defs.h" 381.1Sdholland#include "md.h" 391.1Sdholland 401.1Sdhollandvoid 411.1Sdhollandmd_init(void) 421.1Sdholland{ 431.2Sjoerg warnx("sysinst has not been properly ported to this platform"); 441.1Sdholland} 451.1Sdholland 461.1Sdhollandvoid 471.1Sdhollandmd_init_set_status(int flags) 481.1Sdholland{ 491.1Sdholland (void)flags; 501.1Sdholland} 511.1Sdholland 521.3Smartinbool 531.4Smrgmd_get_info(struct install_partition_desc *desc) 541.1Sdholland{ 551.3Smartin return true; 561.1Sdholland} 571.1Sdholland 581.6Smartinint 591.4Smrgmd_make_bsd_partitions(struct install_partition_desc *desc) 601.4Smrg{ 611.4Smrg return make_bsd_partitions(desc); 621.4Smrg} 631.4Smrg 641.4Smrgbool 651.4Smrgmd_check_partitions(struct install_partition_desc *desc) 661.1Sdholland{ 671.4Smrg return true; 681.1Sdholland} 691.1Sdholland 701.4Smrgbool 711.4Smrgmd_pre_disklabel(struct install_partition_desc *install, 721.4Smrg struct disk_partitions *part) 731.1Sdholland{ 741.4Smrg return false; 751.1Sdholland} 761.1Sdholland 771.4Smrgbool 781.4Smrgmd_post_disklabel(struct install_partition_desc *install, 791.4Smrg struct disk_partitions *part) 801.1Sdholland{ 811.4Smrg return true; 821.1Sdholland} 831.1Sdholland 841.1Sdhollandint 851.5Smartinmd_pre_mount(struct install_partition_desc *install, size_t ndx) 861.1Sdholland{ 871.4Smrg return 0; 881.1Sdholland} 891.1Sdholland 901.1Sdhollandint 911.4Smrgmd_post_newfs(struct install_partition_desc *install) 921.1Sdholland{ 931.1Sdholland return 0; 941.1Sdholland} 951.1Sdholland 961.1Sdhollandint 971.4Smrgmd_post_extract(struct install_partition_desc *install) 981.1Sdholland{ 991.1Sdholland return 0; 1001.1Sdholland} 1011.1Sdholland 1021.1Sdhollandvoid 1031.4Smrgmd_cleanup_install(struct install_partition_desc *install) 1041.1Sdholland{ 1051.1Sdholland} 1061.1Sdholland 1071.1Sdhollandint 1081.4Smrgmd_pre_update(struct install_partition_desc *install) 1091.1Sdholland{ 1101.1Sdholland return 1; 1111.1Sdholland} 1121.1Sdholland 1131.1Sdhollandint 1141.4Smrgmd_update(struct install_partition_desc *install) 1151.1Sdholland{ 1161.1Sdholland return 1; 1171.1Sdholland} 1181.1Sdholland 1191.4Smrg#ifdef HAVE_GPT 1201.4Smrg/* 1211.4Smrg * New GPT partitions have been written, update bootloader or remember 1221.4Smrg * data untill needed in md_post_newfs 1231.4Smrg */ 1241.4Smrgbool 1251.4Smrgmd_gpt_post_write(struct disk_partitions *parts, part_id root_id, 1261.4Smrg bool root_is_new, part_id efi_id, bool efi_is_new) 1271.4Smrg{ 1281.4Smrg 1291.4Smrg return true; 1301.4Smrg} 1311.4Smrg#endif 1321.4Smrg 1331.4Smrgbool 1341.4Smrgmd_parts_use_wholedisk(struct disk_partitions *parts) 1351.1Sdholland{ 1361.4Smrg return parts_use_wholedisk(parts, 0, NULL); 1371.1Sdholland} 1381.4Smrg 139