Skip to content

Commit

Permalink
fix some string functions
Browse files Browse the repository at this point in the history
git-svn-id: http://dokan.googlecode.com/svn/trunk@138 53ea604a-054e-0410-8546-456bafaea6b0
  • Loading branch information
asakaw committed Apr 3, 2010
1 parent e5dceb8 commit 3338140
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion dokan/dokan.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ DokanMain(PDOKAN_OPTIONS DokanOptions, PDOKAN_OPERATIONS DokanOperations)
LPCWSTR
GetRawDeviceName(LPCWSTR DeviceName)
{
static WCHAR rawDeviceName[MAX_PATH] = L"\\\\.";
static WCHAR rawDeviceName[MAX_PATH];
wcscpy_s(rawDeviceName, MAX_PATH, L"\\\\.");
wcscat_s(rawDeviceName, MAX_PATH, DeviceName);
return rawDeviceName;
}
Expand Down
2 changes: 1 addition & 1 deletion dokan_mount/mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ CreateDriveLetter(

dosDevice[4] = DriveLetter;
driveName[0] = DriveLetter;
wcscpy_s(rawDeviceName, MAX_PATH, DeviceName);
wcscat_s(rawDeviceName, MAX_PATH, DeviceName);

DbgPrintW(L"DriveLetter: %c, DeviceName %s\n", DriveLetter, rawDeviceName);

Expand Down
9 changes: 6 additions & 3 deletions sys/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,8 @@ FreeUnicodeString(
}


//#define DOKAN_NET_PROVIDER

NTSTATUS
DokanCreateDiskDevice(
__in PDRIVER_OBJECT DriverObject,
Expand Down Expand Up @@ -477,7 +479,7 @@ DokanCreateDiskDevice(
DDbgPrint(" IoCreateDevice (DISK_DEVICE) failed: 0x%x\n", status);
return status;
}
DDbgPrint("DokanDiksDevice: %wZ created\n", &diskDeviceName);
DDbgPrint("DokanDiskDevice: %wZ created\n", &diskDeviceName);

//
// Initialize the device extension.
Expand Down Expand Up @@ -607,8 +609,6 @@ DokanCreateDiskDevice(
diskDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
fsDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING;

IoRegisterFileSystem(fsDeviceObject);

if (isNetworkFileSystem) {
// Run FsRtlRegisterUncProvider in System thread.
HANDLE handle;
Expand All @@ -629,6 +629,9 @@ DokanCreateDiskDevice(
ObDereferenceObject(thread);
}
}

IoRegisterFileSystem(fsDeviceObject);

//DokanRegisterMountedDeviceInterface(diskDeviceObject, dcb);

dcb->Mounted = 1;
Expand Down

0 comments on commit 3338140

Please sign in to comment.