-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg/{distro,platform}: move BootMode to platform
Move the BootMode enum from pkg/distro to pkg/platform. We want to import BootMode to the disk package, which would create an import loop with distro.
- Loading branch information
1 parent
8e6780b
commit 6ce0227
Showing
5 changed files
with
40 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package platform | ||
|
||
type BootMode uint64 | ||
|
||
const ( | ||
BOOT_NONE BootMode = iota | ||
BOOT_LEGACY | ||
BOOT_UEFI | ||
BOOT_HYBRID | ||
) | ||
|
||
func (m BootMode) String() string { | ||
switch m { | ||
case BOOT_NONE: | ||
return "none" | ||
case BOOT_LEGACY: | ||
return "legacy" | ||
case BOOT_UEFI: | ||
return "uefi" | ||
case BOOT_HYBRID: | ||
return "hybrid" | ||
default: | ||
panic("invalid boot mode") | ||
} | ||
} |