stubs.c 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. #include "stubs.h"
  2. #include "general.h"
  3. #include "debug.h"
  4. #include "internal.h"
  5. int DOKAN_CALLBACK MxfsMoveFile(
  6. LPCWSTR ExistingFileName,
  7. LPCWSTR NewFileName,
  8. BOOL ReplaceExisiting,
  9. PDOKAN_FILE_INFO FileInfo)
  10. {
  11. UNIMPLEMENTED("%ls %ls %u", ExistingFileName, NewFileName, ReplaceExisiting ? 1 : 0);
  12. return -ERROR_CALL_NOT_IMPLEMENTED;
  13. }
  14. int DOKAN_CALLBACK MxfsLockFile(
  15. LPCWSTR FileName,
  16. LONGLONG ByteOffset,
  17. LONGLONG Length,
  18. PDOKAN_FILE_INFO FileInfo)
  19. {
  20. UNIMPLEMENTED("%ls %I64u %I64u", FileName, ByteOffset, Length);
  21. return -ERROR_CALL_NOT_IMPLEMENTED;
  22. }
  23. int DOKAN_CALLBACK MxfsUnlockFile(
  24. LPCWSTR FileName,
  25. LONGLONG ByteOffset,
  26. LONGLONG Length,
  27. PDOKAN_FILE_INFO FileInfo)
  28. {
  29. UNIMPLEMENTED("%ls %I64u %I64u", FileName, ByteOffset, Length);
  30. return -ERROR_CALL_NOT_IMPLEMENTED;
  31. }
  32. int DOKAN_CALLBACK MxfsUnmount(
  33. PDOKAN_FILE_INFO FileInfo)
  34. {
  35. UNIMPLEMENTED("");
  36. return -ERROR_CALL_NOT_IMPLEMENTED;
  37. }
  38. // Optional
  39. int DOKAN_CALLBACK MxfsFlushFileBuffers(
  40. LPCWSTR FileName,
  41. PDOKAN_FILE_INFO FileInfo)
  42. {
  43. TRACE("%ls", FileName);
  44. MINIX_FS *FileSys = (MINIX_FS*)(ULONG_PTR)FileInfo->DokanOptions->GlobalContext;
  45. MxfsCacheFlush(FileSys); // flush entire FS...
  46. return 0;
  47. }
  48. int DOKAN_CALLBACK MxfsSetFileAttributes(
  49. LPCWSTR FileName,
  50. DWORD FileAttributes,
  51. PDOKAN_FILE_INFO FileInfo)
  52. {
  53. TRACE("%ls", FileName);
  54. return 0;
  55. }
  56. // You should not delete file on DeleteFile or DeleteDirectory.
  57. // When DeleteFile or DeleteDirectory, you must check whether
  58. // you can delete the file or not, and return 0 (when you can delete it)
  59. // or appropriate error codes such as -ERROR_DIR_NOT_EMPTY,
  60. // -ERROR_SHARING_VIOLATION.
  61. // When you return 0 (ERROR_SUCCESS), you get Cleanup with
  62. // FileInfo->DeleteOnClose set TRUE and you have to delete the
  63. // file in Close.
  64. int DOKAN_CALLBACK MxfsDeleteFile(
  65. LPCWSTR FileName,
  66. PDOKAN_FILE_INFO FileInfo)
  67. {
  68. UNIMPLEMENTED("%ls", FileName);
  69. return -ERROR_CALL_NOT_IMPLEMENTED;
  70. }
  71. int DOKAN_CALLBACK MxfsDeleteDirectory(
  72. LPCWSTR FileName,
  73. PDOKAN_FILE_INFO FileInfo)
  74. {
  75. UNIMPLEMENTED("%ls", FileName);
  76. return -ERROR_CALL_NOT_IMPLEMENTED;
  77. }
  78. int DOKAN_CALLBACK MxfsSetAllocationSize(
  79. LPCWSTR FileName,
  80. LONGLONG Length,
  81. PDOKAN_FILE_INFO FileInfo)
  82. {
  83. UNIMPLEMENTED("%ls", FileName);
  84. return -ERROR_CALL_NOT_IMPLEMENTED;
  85. }
  86. // Suported since 0.6.0. You must specify the version at DOKAN_OPTIONS.Version.
  87. int DOKAN_CALLBACK MxfsGetFileSecurity(
  88. LPCWSTR FileName,
  89. PSECURITY_INFORMATION SecurityInfo, // A pointer to SECURITY_INFORMATION value being requested
  90. PSECURITY_DESCRIPTOR SecurityDescriptor, // A pointer to SECURITY_DESCRIPTOR buffer to be filled
  91. ULONG SecurityDescriptorLength, // length of Security descriptor buffer
  92. PULONG LengthNeeded,
  93. PDOKAN_FILE_INFO FileInfo)
  94. {
  95. UNIMPLEMENTED("%ls", FileName);
  96. return -ERROR_CALL_NOT_IMPLEMENTED;
  97. }
  98. int DOKAN_CALLBACK MxfsSetFileSecurity(
  99. LPCWSTR FileName,
  100. PSECURITY_INFORMATION SecurityInfo,
  101. PSECURITY_DESCRIPTOR SecurityDescriptor,
  102. ULONG SecurityDescriptorLength,
  103. PDOKAN_FILE_INFO FileInfo)
  104. {
  105. UNIMPLEMENTED("%ls", FileName);
  106. return -ERROR_CALL_NOT_IMPLEMENTED;
  107. }