Leaked source code of windows server 2003
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.

120 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 1991-1994 Microsoft Corporation
  3. Module Name:
  4. fdisk.h
  5. Abstract:
  6. Central include file for Disk Administrator
  7. Author:
  8. Edward (Ted) Miller (TedM) 11/15/91
  9. Environment:
  10. User process.
  11. Notes:
  12. Revision History:
  13. 11-Nov-93 (bobri) added doublespace and commit support.
  14. 2-Feb-94 (bobri) removed ArcInst dependency in build.
  15. --*/
  16. //#define UNICODE
  17. #include <nt.h>
  18. #include <ntrtl.h>
  19. #include <nturtl.h>
  20. #include <ntdddisk.h>
  21. #include <ntdskreg.h>
  22. #include <ntddft.h>
  23. //
  24. // These defines are for virtualized types in partitp.h, low.h,
  25. // fdengine.c, etc.
  26. //
  27. #define STATUS_CODE NTSTATUS
  28. #define OK_STATUS STATUS_SUCCESS
  29. #define RETURN_OUT_OF_MEMORY return(STATUS_NO_MEMORY);
  30. #define HANDLE_T HANDLE
  31. #define HANDLE_PT PHANDLE
  32. #define AllocateMemory Malloc
  33. #define ReallocateMemory Realloc
  34. #define FreeMemory Free
  35. #include <windows.h>
  36. #include <stdarg.h>
  37. #include "fdtypes.h"
  38. #include "fdproto.h"
  39. #include "fdconst.h"
  40. #include "fdglob.h"
  41. #include "fdres.h"
  42. #include "fdiskmsg.h"
  43. #include "fdhelpid.h"
  44. #define PERSISTENT_DATA(region) ((PPERSISTENT_REGION_DATA)((region)->PersistentData))
  45. #define GET_FT_OBJECT(region) ((region)->PersistentData ? PERSISTENT_DATA(region)->FtObject : NULL)
  46. #define SET_FT_OBJECT(region,o) (PERSISTENT_DATA(region)->FtObject = o)
  47. #define EC(x) RtlNtStatusToDosError(x)
  48. // assertion checking, logging
  49. #if DBG
  50. #define FDASSERT(expr) if(!(expr)) FdiskAssertFailedRoutine(#expr,__FILE__,__LINE__);
  51. #define FDLOG(X) FdLog X
  52. VOID
  53. FdLog(
  54. IN int Level,
  55. IN PCHAR FormatString,
  56. ...
  57. );
  58. VOID
  59. LOG_DISK_REGISTRY(
  60. IN PCHAR RoutineName,
  61. IN PDISK_REGISTRY DiskRegistry
  62. );
  63. VOID
  64. LOG_ONE_DISK_REGISTRY_DISK_ENTRY(
  65. IN PCHAR RoutineName OPTIONAL,
  66. IN PDISK_DESCRIPTION DiskDescription
  67. );
  68. VOID
  69. LOG_DRIVE_LAYOUT(
  70. IN PDRIVE_LAYOUT_INFORMATION DriveLayout
  71. );
  72. VOID
  73. InitLogging(
  74. VOID
  75. );
  76. extern PVOID LogFile;
  77. #else
  78. #define FDASSERT(expr)
  79. #define FDLOG(X)
  80. #define LOG_DISK_REGISTRY(x,y)
  81. #define LOG_ONE_DISK_REGISTRY_DISK_ENTRY(x,y)
  82. #define LOG_DRIVE_LAYOUT(x)
  83. #endif