1218799Snwhitehorn/*-
2330449Seadler * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3330449Seadler *
4218799Snwhitehorn * Copyright (c) 2011 Nathan Whitehorn
5218799Snwhitehorn * All rights reserved.
6218799Snwhitehorn *
7218799Snwhitehorn * Redistribution and use in source and binary forms, with or without
8218799Snwhitehorn * modification, are permitted provided that the following conditions
9218799Snwhitehorn * are met:
10218799Snwhitehorn * 1. Redistributions of source code must retain the above copyright
11218799Snwhitehorn *    notice, this list of conditions and the following disclaimer.
12218799Snwhitehorn * 2. Redistributions in binary form must reproduce the above copyright
13218799Snwhitehorn *    notice, this list of conditions and the following disclaimer in the
14218799Snwhitehorn *    documentation and/or other materials provided with the distribution.
15218799Snwhitehorn *
16218799Snwhitehorn * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17218799Snwhitehorn * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18218799Snwhitehorn * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19218799Snwhitehorn * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20218799Snwhitehorn * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21218799Snwhitehorn * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22218799Snwhitehorn * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23218799Snwhitehorn * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24218799Snwhitehorn * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25218799Snwhitehorn * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26218799Snwhitehorn * SUCH DAMAGE.
27218799Snwhitehorn *
28218799Snwhitehorn * $FreeBSD: stable/11/usr.sbin/bsdinstall/partedit/partedit_generic.c 330449 2018-03-05 07:26:05Z eadler $
29218799Snwhitehorn */
30218799Snwhitehorn
31218799Snwhitehorn#include <string.h>
32218799Snwhitehorn
33218799Snwhitehorn#include "partedit.h"
34218799Snwhitehorn
35218799Snwhitehornconst char *
36218799Snwhitehorndefault_scheme(void) {
37218799Snwhitehorn	/*
38218799Snwhitehorn	 * Our loader can parse GPT, so pick that as the default for lack of
39218799Snwhitehorn	 * a better idea.
40218799Snwhitehorn	 */
41218799Snwhitehorn
42218799Snwhitehorn	return ("GPT");
43218799Snwhitehorn}
44218799Snwhitehorn
45218799Snwhitehornint
46218799Snwhitehornis_scheme_bootable(const char *part_type) {
47218799Snwhitehorn	/*
48218799Snwhitehorn	 * We don't know anything about this platform, so don't irritate the
49218799Snwhitehorn	 * user by claiming the chosen partition scheme isn't bootable.
50218799Snwhitehorn	 */
51218799Snwhitehorn
52218799Snwhitehorn	return (1);
53218799Snwhitehorn}
54218799Snwhitehorn
55271539Snwhitehornint
56271539Snwhitehornis_fs_bootable(const char *part_type, const char *fs) {
57271539Snwhitehorn	return (1);
58271539Snwhitehorn}
59271539Snwhitehorn
60218799Snwhitehorn/* No clue => no boot partition, bootcode, or partcode */
61218799Snwhitehorn
62218799Snwhitehornsize_t
63218799Snwhitehornbootpart_size(const char *part_type) {
64218799Snwhitehorn	return (0);
65218799Snwhitehorn}
66218799Snwhitehorn
67218799Snwhitehornconst char *
68264978Snwhitehornbootpart_type(const char *scheme) {
69264978Snwhitehorn	return ("freebsd-boot");
70264978Snwhitehorn}
71264978Snwhitehorn
72264978Snwhitehornconst char *
73218799Snwhitehornbootcode_path(const char *part_type) {
74218799Snwhitehorn	return (NULL);
75218799Snwhitehorn}
76218799Snwhitehorn
77218799Snwhitehornconst char *
78271539Snwhitehornpartcode_path(const char *part_type, const char *fs_type) {
79218799Snwhitehorn	return (NULL);
80218799Snwhitehorn}
81218799Snwhitehorn
82