partedit_x86.c (be01d6e9f2c9e42ed7558cb31b463c4aceb88c82) partedit_x86.c (403a3c8c82dd71e9a0beb7cc8ff9b1ba0a414061)
1/*-
2 * Copyright (c) 2011 Nathan Whitehorn
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 35 unchanged lines hidden (view full) ---

44 if (error != 0)
45 return ("BIOS");
46 }
47
48 return (fw);
49}
50
51const char *
1/*-
2 * Copyright (c) 2011 Nathan Whitehorn
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 35 unchanged lines hidden (view full) ---

44 if (error != 0)
45 return ("BIOS");
46 }
47
48 return (fw);
49}
50
51const char *
52default_scheme(void) {
52default_scheme(void)
53{
53 return ("GPT");
54}
55
56int
57is_scheme_bootable(const char *part_type)
58{
59
60 if (strcmp(part_type, "GPT") == 0)

--- 11 unchanged lines hidden (view full) ---

72int
73is_fs_bootable(const char *part_type, const char *fs)
74{
75
76 if (strcmp(fs, "freebsd-ufs") == 0)
77 return (1);
78
79 if (strcmp(fs, "freebsd-zfs") == 0 &&
54 return ("GPT");
55}
56
57int
58is_scheme_bootable(const char *part_type)
59{
60
61 if (strcmp(part_type, "GPT") == 0)

--- 11 unchanged lines hidden (view full) ---

73int
74is_fs_bootable(const char *part_type, const char *fs)
75{
76
77 if (strcmp(fs, "freebsd-ufs") == 0)
78 return (1);
79
80 if (strcmp(fs, "freebsd-zfs") == 0 &&
81 strcmp(part_type, "GPT") == 0 &&
80 strcmp(x86_bootmethod(), "BIOS") == 0)
81 return (1);
82
83 return (0);
84}
85
86size_t
87bootpart_size(const char *scheme)

--- 58 unchanged lines hidden ---
82 strcmp(x86_bootmethod(), "BIOS") == 0)
83 return (1);
84
85 return (0);
86}
87
88size_t
89bootpart_size(const char *scheme)

--- 58 unchanged lines hidden ---