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.

159 lines
3.3 KiB

  1. /*++
  2. Copyright (c) 1989-1999 Microsoft Corporation
  3. Module Name:
  4. irpName.c
  5. Abstract:
  6. This module contains functions used to generate names for IRPs
  7. // @@BEGIN_DDKSPLIT
  8. Author:
  9. Neal Christiansen (NealCH) 27-Sep-2000
  10. // @@END_DDKSPLIT
  11. Environment:
  12. User mode
  13. // @@BEGIN_DDKSPLIT
  14. Revision History:
  15. // @@END_DDKSPLIT
  16. --*/
  17. #include <ntifs.h>
  18. #include <stdio.h>
  19. #include "filespyLib.h"
  20. VOID
  21. GetFastioName (
  22. IN FASTIO_TYPE FastIoCode,
  23. OUT PCHAR FastIoName
  24. )
  25. /*++
  26. Routine Description:
  27. This routine translates the given FastIO code into a printable string which
  28. is returned.
  29. Arguments:
  30. FastIoCode - the FastIO code to translate
  31. FastioName - a buffer at least OPERATION_NAME_BUFFER_SIZE characters long
  32. that receives the fastIO name.
  33. Return Value:
  34. None.
  35. --*/
  36. {
  37. PCHAR fastIoString;
  38. CHAR nameBuf[OPERATION_NAME_BUFFER_SIZE];
  39. switch (FastIoCode) {
  40. case CHECK_IF_POSSIBLE:
  41. fastIoString = "CHECK_IF_POSSIBLE";
  42. break;
  43. case READ:
  44. fastIoString = "READ";
  45. break;
  46. case WRITE:
  47. fastIoString = "WRITE";
  48. break;
  49. case QUERY_BASIC_INFO:
  50. fastIoString = "QUERY_BASIC_INFO";
  51. break;
  52. case QUERY_STANDARD_INFO:
  53. fastIoString = "QUERY_STANDARD_INFO";
  54. break;
  55. case LOCK:
  56. fastIoString = "LOCK";
  57. break;
  58. case UNLOCK_SINGLE:
  59. fastIoString = "UNLOCK_SINGLE";
  60. break;
  61. case UNLOCK_ALL:
  62. fastIoString = "UNLOCK_ALL";
  63. break;
  64. case UNLOCK_ALL_BY_KEY:
  65. fastIoString = "UNLOCK_ALL_BY_KEY";
  66. break;
  67. case DEVICE_CONTROL:
  68. fastIoString = "DEVICE_CONTROL";
  69. break;
  70. case DETACH_DEVICE:
  71. fastIoString = "DETACH_DEVICE";
  72. break;
  73. case QUERY_NETWORK_OPEN_INFO:
  74. fastIoString = "QUERY_NETWORK_OPEN_INFO";
  75. break;
  76. case MDL_READ:
  77. fastIoString = "MDL_READ";
  78. break;
  79. case MDL_READ_COMPLETE:
  80. fastIoString = "MDL_READ_COMPLETE";
  81. break;
  82. case MDL_WRITE:
  83. fastIoString = "MDL_WRITE";
  84. break;
  85. case MDL_WRITE_COMPLETE:
  86. fastIoString = "MDL_WRITE_COMPLETE";
  87. break;
  88. case READ_COMPRESSED:
  89. fastIoString = "READ_COMPRESSED";
  90. break;
  91. case WRITE_COMPRESSED:
  92. fastIoString = "WRITE_COMPRESSED";
  93. break;
  94. case MDL_READ_COMPLETE_COMPRESSED:
  95. fastIoString = "MDL_READ_COMPLETE_COMPRESSED";
  96. break;
  97. case PREPARE_MDL_WRITE:
  98. fastIoString = "PREPARE_MDL_WRITE";
  99. break;
  100. case MDL_WRITE_COMPLETE_COMPRESSED:
  101. fastIoString = "MDL_WRITE_COMPLETE_COMPRESSED";
  102. break;
  103. case QUERY_OPEN:
  104. fastIoString = "QUERY_OPEN";
  105. break;
  106. default:
  107. sprintf(nameBuf,"Unknown FastIO operation (%u)",FastIoCode);
  108. fastIoString = nameBuf;
  109. }
  110. strcpy(FastIoName,fastIoString);
  111. }