Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

190 lines
4.0 KiB

  1. /*++
  2. Copyright (c) 1990, 1991 Microsoft Corporation
  3. Module Name:
  4. cmdat2.c
  5. Abstract:
  6. This module contains data strings that describes the registry space
  7. and that are exported to the rest of the system.
  8. Author:
  9. Andre Vachon (andreva) 08-Apr-1992
  10. Environment:
  11. Kernel mode.
  12. Revision History:
  13. --*/
  14. #include "cmp.h"
  15. //
  16. // ***** PAGE *****
  17. //
  18. #ifdef ALLOC_DATA_PRAGMA
  19. #pragma data_seg("PAGEDATA")
  20. #endif
  21. //
  22. // control values/overrides read from registry
  23. //
  24. ULONG CmRegistrySizeLimit = { 0 };
  25. ULONG CmRegistrySizeLimitLength = 4;
  26. ULONG CmRegistrySizeLimitType = { 0 };
  27. //
  28. // Maximum number of bytes of Global Quota the registry may use.
  29. // Set to largest positive number for use in boot. Will be set down
  30. // based on pool and explicit registry values.
  31. //
  32. ULONG CmpGlobalQuotaAllowed = CM_WRAP_LIMIT;
  33. ULONG CmpGlobalQuota = CM_WRAP_LIMIT;
  34. ULONG CmpGlobalQuotaWarning = CM_WRAP_LIMIT;
  35. BOOLEAN CmpQuotaWarningPopupDisplayed = FALSE;
  36. BOOLEAN CmpSystemQuotaWarningPopupDisplayed = FALSE;
  37. //
  38. // the "disk full" popup has already been displayed
  39. //
  40. BOOLEAN CmpDiskFullWorkerPopupDisplayed = FALSE;
  41. BOOLEAN CmpCannotWriteConfiguration = FALSE;
  42. //
  43. // GQ actually in use
  44. //
  45. ULONG CmpGlobalQuotaUsed = 0;
  46. //
  47. // State flag to remember when to turn it on
  48. //
  49. BOOLEAN CmpProfileLoaded = FALSE;
  50. PUCHAR CmpStashBuffer = NULL;
  51. ULONG CmpStashBufferSize = 0;
  52. FAST_MUTEX CmpStashBufferLock;
  53. //
  54. // Shutdown control
  55. //
  56. BOOLEAN HvShutdownComplete = FALSE; // Set to true after shutdown
  57. // to disable any further I/O
  58. PCM_KEY_CONTROL_BLOCK CmpKeyControlBlockRoot = NULL;
  59. HANDLE CmpRegistryRootHandle = NULL;
  60. struct {
  61. PHHIVE Hive;
  62. ULONG Status;
  63. } CmCheckRegistryDebug = { 0 };
  64. //
  65. // The last I/O error status code
  66. //
  67. struct {
  68. ULONG Action;
  69. HANDLE Handle;
  70. NTSTATUS Status;
  71. } CmRegistryIODebug = { 0 };
  72. //
  73. // globals private to check code
  74. //
  75. struct {
  76. PHHIVE Hive;
  77. ULONG Status;
  78. } CmpCheckRegistry2Debug = { 0 };
  79. struct {
  80. PHHIVE Hive;
  81. ULONG Status;
  82. HCELL_INDEX Cell;
  83. PCELL_DATA CellPoint;
  84. PVOID RootPoint;
  85. ULONG Index;
  86. } CmpCheckKeyDebug = { 0 };
  87. struct {
  88. PHHIVE Hive;
  89. ULONG Status;
  90. PCELL_DATA List;
  91. ULONG Index;
  92. HCELL_INDEX Cell;
  93. PCELL_DATA CellPoint;
  94. } CmpCheckValueListDebug = { 0 };
  95. ULONG CmpUsedStorage = { 0 };
  96. // hivechek.c
  97. struct {
  98. PHHIVE Hive;
  99. ULONG Status;
  100. ULONG Space;
  101. HCELL_INDEX MapPoint;
  102. PHBIN BinPoint;
  103. } HvCheckHiveDebug = { 0 };
  104. struct {
  105. PHBIN Bin;
  106. ULONG Status;
  107. PHCELL CellPoint;
  108. } HvCheckBinDebug = { 0 };
  109. struct {
  110. PHHIVE Hive;
  111. ULONG FileOffset;
  112. ULONG FailPoint; // look in HvpRecoverData for exact point of failure
  113. } HvRecoverDataDebug = { 0 };
  114. //
  115. // when a local hive cannot be loded, set this to it's index
  116. // and the load hive worker thread responsible for it will be held of
  117. // until all the others finish; We can then debug the offending hive
  118. //
  119. ULONG CmpCheckHiveIndex = CM_NUMBER_OF_MACHINE_HIVES;
  120. #ifdef CMP_STATS
  121. struct {
  122. ULONG CmpMaxKcbNo;
  123. ULONG CmpKcbNo;
  124. ULONG CmpStatNo;
  125. ULONG CmpNtCreateKeyNo;
  126. ULONG CmpNtDeleteKeyNo;
  127. ULONG CmpNtDeleteValueKeyNo;
  128. ULONG CmpNtEnumerateKeyNo;
  129. ULONG CmpNtEnumerateValueKeyNo;
  130. ULONG CmpNtFlushKeyNo;
  131. ULONG CmpNtInitializeRegistryNo;
  132. ULONG CmpNtNotifyChangeMultipleKeysNo;
  133. ULONG CmpNtOpenKeyNo;
  134. ULONG CmpNtQueryKeyNo;
  135. ULONG CmpNtQueryValueKeyNo;
  136. ULONG CmpNtQueryMultipleValueKeyNo;
  137. ULONG CmpNtRestoreKeyNo;
  138. ULONG CmpNtSaveKeyNo;
  139. ULONG CmpNtSaveMergedKeysNo;
  140. ULONG CmpNtSetValueKeyNo;
  141. ULONG CmpNtLoadKeyNo;
  142. ULONG CmpNtUnloadKeyNo;
  143. ULONG CmpNtSetInformationKeyNo;
  144. ULONG CmpNtReplaceKeyNo;
  145. ULONG CmpNtQueryOpenSubKeysNo;
  146. } CmpStatsDebug = { 0 };
  147. #endif
  148. #ifdef ALLOC_DATA_PRAGMA
  149. #pragma data_seg()
  150. #endif