Changeset 38268 in vbox
- Timestamp:
- Aug 1, 2011 5:03:03 PM (13 years ago)
- Location:
- trunk/src/VBox/HostDrivers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.cpp
r38262 r38268 216 216 for (int i = 0; i < 16; i++) 217 217 { 218 WCHAR szwHubName[32] ;219 char szHubName[32] ;218 WCHAR szwHubName[32] = {}; 219 char szHubName[32] = {}; 220 220 ANSI_STRING AnsiName; 221 221 UNICODE_STRING UnicodeName; … … 246 246 { 247 247 LOG(("Associated driver")); 248 LOG_ STRW(pHubDevObj->DriverObject->DriverName.Buffer);248 LOG_USTR(&pHubDevObj->DriverObject->DriverName); 249 249 LOG(("pnp handler %p\n", pHubDevObj->DriverObject->MajorFunction[IRP_MJ_PNP])); 250 250 … … 256 256 else 257 257 { 258 WARN(("IoGetDeviceObjectPointer returned Status (0x%x) for %S", Status, szwHubName));258 WARN(("IoGetDeviceObjectPointer returned Status (0x%x) for (%S)", Status, szwHubName)); 259 259 } 260 260 } 261 261 else 262 262 { 263 WARN(("RtlAnsiStringToUnicodeString failed, Status (0x%x) ", Status));263 WARN(("RtlAnsiStringToUnicodeString failed, Status (0x%x) for Ansu name (%s)", Status, szHubName)); 264 264 } 265 265 } … … 841 841 Assert(pFileObj->FsContext); 842 842 PVBOXUSBMONCTX pCtx = (PVBOXUSBMONCTX)pFileObj->FsContext; 843 844 LOG(("VBoxUsbMonClose")); 845 843 846 NTSTATUS Status = vboxUsbMonContextClose(pCtx); 844 847 if (Status != STATUS_SUCCESS) … … 859 862 WARN(("ulPreventUnloadOn already set")); 860 863 } 864 LOG(("success!!")); 861 865 Status = STATUS_SUCCESS; 862 866 } … … 875 879 NTSTATUS Status; 876 880 877 LOG(("VBoxUSBMonCreate \n"));881 LOG(("VBoxUSBMonCreate")); 878 882 879 883 if (pStack->Parameters.Create.Options & FILE_DIRECTORY_FILE) 880 884 { 881 WARN(("trying to open as a directory \n"));885 WARN(("trying to open as a directory")); 882 886 pIrp->IoStatus.Status = STATUS_NOT_A_DIRECTORY; 883 887 pIrp->IoStatus.Information = 0; … … 896 900 else 897 901 { 898 WARN(("vboxUsbMonContextCreate failed Status (0x%x) \n", Status));902 WARN(("vboxUsbMonContextCreate failed Status (0x%x)", Status)); 899 903 } 900 904 … … 1244 1248 { 1245 1249 #ifdef DEBUG_misha 1246 RTLogGroupSettings(0, "+default.e.l.f.l2.l3");; 1250 RTLogGroupSettings(0, "+default.e.l.f.l2.l3"); 1251 RTLogDestinations(0, "debugger"); 1247 1252 #endif 1248 1253 -
trunk/src/VBox/HostDrivers/win/VBoxDbgLog.h
r38262 r38268 61 61 #define _LOGMSG_STR(_logger, _a, _f) do {\ 62 62 int _i = 0; \ 63 _logger(("\"")); \ 63 64 for (;(_a)[_i];++_i) { \ 64 65 _logger(("%"_f, (_a)[_i])); \ 65 66 }\ 66 _logger(("\n")); \ 67 _logger(("\"\n")); \ 68 } while (0) 69 70 #define _LOGMSG_USTR(_logger, _a) do {\ 71 int _i = 0; \ 72 _logger(("\"")); \ 73 for (;_i<(_a)->Length/2;++_i) { \ 74 _logger(("%c", (_a)->Buffer[_i])); \ 75 }\ 76 _logger(("\"\n")); \ 67 77 } while (0) 68 78 … … 102 112 _LOGMSG_STR(Log, _a, "c"); \ 103 113 } while (0) 114 #define LOG_USTR(_a) do {\ 115 _LOGMSG_USTR(Log, _a); \ 116 } while (0) 104 117 #define LOGREL_STRA(_a) do {\ 105 118 _LOGMSG_STR(LogRel, _a, "c"); \ … … 108 121 _LOGMSG_STR(LogRel, _a, "c"); \ 109 122 } while (0) 123 #define LOGREL_USTR(_a) do {\ 124 _LOGMSG_USTR(LogRel, _a); \ 125 } while (0) 110 126 111 127
Note:
See TracChangeset
for help on using the changeset viewer.