*/
#include <freeldr.h>
+#include <debug.h>
-PCSTR OptionsMenuList[] =
+PCSTR OptionsMenuList[] =
{
"Safe Mode",
"Safe Mode with Networking",
"Last Known Good Configuration",
"Directory Services Restore Mode",
"Debugging Mode",
+ "FreeLdr debugging",
"SEPARATOR",
#endif
};
+PCSTR FrldrDbgMsg = "Enable FreeLdr debug channels\n"
+ "Acceptable syntax: [level1]#channel1[,[level2]#channel2]\n"
+ "level can be one of: trace,warn,fixme,err\n"
+ " if the level is ommited all levels\n"
+ " are enabled for the specified channel\n"
+ "# can be either + or -\n"
+ "channel can be one of the following:\n"
+ " all,warning,memory,filesystem,inifile,ui,disk,cache,registry,\n"
+ " reactos,linux,hwdetect,windows,peloader,scsiport,heap\n"
+ "Examples:\n"
+ " trace+windows,trace+reactos\n"
+ " +hwdetect,err-disk\n"
+ " +peloader\n"
+ "NOTE: all letters must be lowercase, no spaces allowed.";
+
enum OptionMenuItems
{
SAFE_MODE = 0,
LAST_KNOWN_GOOD_CONFIGURATION = 6,
DIRECTORY_SERVICES_RESTORE_MODE = 7,
DEBUGGING_MODE = 8,
+ FREELDR_DEBUGGING = 9,
- SEPARATOR2 = 9,
+ SEPARATOR2 = 10,
#ifdef HAS_OPTION_MENU_CUSTOM_BOOT
- CUSTOM_BOOT = 10,
+ CUSTOM_BOOT = 11,
#endif
#ifdef HAS_OPTION_MENU_REBOOT
- REBOOT = 11,
+ REBOOT = 12,
#endif
};
-ULONG OptionsMenuItemCount = sizeof(OptionsMenuList) / sizeof(OptionsMenuList[0]);
+ULONG OptionsMenuItemCount = sizeof(OptionsMenuList) / sizeof(OptionsMenuList[0]);
BOOLEAN SafeMode = FALSE;
BOOLEAN SafeModeWithNetworking = FALSE;
VOID DoOptionsMenu(VOID)
{
- ULONG SelectedMenuItem;
-
- if (!UiDisplayMenu(OptionsMenuList, OptionsMenuItemCount, 0, -1, &SelectedMenuItem, TRUE, NULL))
+ ULONG SelectedMenuItem;
+ CHAR DebugChannelString[100];
+
+ if (!UiDisplayMenu("Select an option:",
+ OptionsMenuList,
+ OptionsMenuItemCount,
+ 0, -1,
+ &SelectedMenuItem,
+ TRUE,
+ NULL))
{
// The user pressed ESC
return;
case DEBUGGING_MODE:
DebuggingMode = TRUE;
break;
+ case FREELDR_DEBUGGING:
+ DebugChannelString[0]=0;
+ if (UiEditBox(FrldrDbgMsg, DebugChannelString, 100))
+ DbgParseDebugChannels(DebugChannelString);
+ break;
//case SEPARATOR2:
// break;
#ifdef HAS_OPTION_MENU_CUSTOM_BOOT