diff options
Diffstat (limited to 'cgpt/cgpt_common.c')
-rw-r--r-- | cgpt/cgpt_common.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cgpt/cgpt_common.c b/cgpt/cgpt_common.c index 29906d40..1a6bd3cb 100644 --- a/cgpt/cgpt_common.c +++ b/cgpt/cgpt_common.c @@ -763,6 +763,20 @@ GptEntry *GetEntry(GptData *gpt, int secondary, uint32_t entry_index) { return (GptEntry*)(&entries[stride * entry_index]); } +void SetLegacyBoot(struct drive *drive, int secondary, uint32_t entry_index, + int legacy_boot) { + require(legacy_boot >= 0 && legacy_boot <= CGPT_ATTRIBUTE_MAX_LEGACY_BOOT); + GptEntry *entry; + entry = GetEntry(&drive->gpt, secondary, entry_index); + SetEntryLegacyBoot(entry, legacy_boot); +} + +int GetLegacyBoot(struct drive *drive, int secondary, uint32_t entry_index) { + GptEntry *entry; + entry = GetEntry(&drive->gpt, secondary, entry_index); + return GetEntryLegacyBoot(entry); +} + void SetPriority(struct drive *drive, int secondary, uint32_t entry_index, int priority) { require(priority >= 0 && priority <= CGPT_ATTRIBUTE_MAX_PRIORITY); |