Ejemplo n.º 1
0
EFI_STATUS
SettingsMenuShow (
  VOID
)
{
  MENU_ENTRY *Entry;
  MENU_OPTION* Menu;

  // create menu
  Menu = MenuCreate();
  Menu->Title = AsciiStrDup("Settings");
  Menu->BackCallback = SettingsMenuBackCallback;

  // UEFI options
  Entry = MenuCreateEntry();
  Entry->Name = AsciiStrDup("Show UEFI boot options");
  Entry->ShowToggle = TRUE;
  Entry->ToggleEnabled = SettingBoolGet("ui-show-uefi-options");
  Entry->HideBootMessage = TRUE;
  Entry->Callback = ShowUEFIOptionsCallback;
  MenuAddEntry(Menu, Entry);

  // file explorer
  Entry = MenuCreateEntry();
  Entry->Name = AsciiStrDup("Show File Explorer");
  Entry->ShowToggle = TRUE;
  Entry->ToggleEnabled = SettingBoolGet("ui-show-file-explorer");
  Entry->HideBootMessage = TRUE;
  Entry->Callback = ShowFileExplorerCallback;
  MenuAddEntry(Menu, Entry);

  // fastboot
  Entry = MenuCreateEntry();
  Entry->Name = AsciiStrDup("Show Fastboot");
  Entry->ShowToggle = TRUE;
  Entry->ToggleEnabled = SettingBoolGet("ui-show-fastboot");
  Entry->HideBootMessage = TRUE;
  Entry->Callback = ShowFastbootCallback;
  MenuAddEntry(Menu, Entry);

  // fastboot
  Entry = MenuCreateEntry();
  Entry->Name = AsciiStrDup("Force selinux to permissive");
  Entry->ShowToggle = TRUE;
  Entry->ToggleEnabled = SettingBoolGet("boot-force-permissive");
  Entry->HideBootMessage = TRUE;
  Entry->Callback = ShowPermissiveCallback;
  MenuAddEntry(Menu, Entry);

  MenuStackPush(Menu);
  return EFI_SUCCESS;
}
Ejemplo n.º 2
0
EFI_STATUS
SettingsMenuShow (
  VOID
)
{
  MENU_ENTRY *Entry;
  MENU_OPTION* Menu;

  // create menu
  Menu = MenuCreate();
  Menu->Title = AsciiStrDup("Settings");
  Menu->BackCallback = SettingsMenuBackCallback;

  // file explorer
  Entry = MenuCreateEntry();
  Entry->Name = AsciiStrDup("Show File Explorer");
  Entry->ShowToggle = TRUE;
  Entry->ToggleEnabled = SettingBoolGet("ui-show-file-explorer");
  Entry->HideBootMessage = TRUE;
  Entry->Callback = ShowFileExplorerCallback;
  MenuAddEntry(Menu, Entry);

  MenuStackPush(Menu);
  return EFI_SUCCESS;
}
Ejemplo n.º 3
0
STATIC
VOID
UefiMenuEntryUpdate (
  IN MENU_ENTRY* This
)
{
  This->Hidden = !SettingBoolGet("ui-show-uefi-options");
}
Ejemplo n.º 4
0
STATIC
VOID
FastbootMenuEntryUpdate (
  IN MENU_ENTRY* This
)
{
  This->Hidden = !SettingBoolGet("ui-show-fastboot");
}
Ejemplo n.º 5
0
STATIC
EFI_STATUS
ShowPermissiveCallback (
  MENU_ENTRY* This
)
{
  SettingBoolSet("boot-force-permissive", !This->ToggleEnabled);
  This->ToggleEnabled = SettingBoolGet("boot-force-permissive");
  InvalidateActiveMenu();
  MainMenuUpdateUi();
  return EFI_SUCCESS;
}
Ejemplo n.º 6
0
STATIC
EFI_STATUS
ShowFastbootCallback (
  MENU_ENTRY* This
)
{
  SettingBoolSet("ui-show-fastboot", !This->ToggleEnabled);
  This->ToggleEnabled = SettingBoolGet("ui-show-fastboot");
  InvalidateActiveMenu();
  MainMenuUpdateUi();
  return EFI_SUCCESS;
}
Ejemplo n.º 7
0
STATIC
EFI_STATUS
ShowUEFIOptionsCallback (
  MENU_ENTRY* This
)
{
  SettingBoolSet("ui-show-uefi-options", !This->ToggleEnabled);
  This->ToggleEnabled = SettingBoolGet("ui-show-uefi-options");
  InvalidateActiveMenu();
  MainMenuUpdateUi();
  return EFI_SUCCESS;
}