REG_DWORD,
&Value,
sizeof(Value));
-
+
}
/*
MountMgrScrubRegistry(IN PDEVICE_EXTENSION DeviceExtension)
{
NTSTATUS Status;
- BOOLEAN Continue = TRUE;
+ BOOLEAN Continue;
RTL_QUERY_REGISTRY_TABLE QueryTable[2];
- while (Continue)
+ do
{
RtlZeroMemory(QueryTable, sizeof(QueryTable));
QueryTable[0].QueryRoutine = ScrubRegistryRoutine;
DeviceExtension,
NULL);
}
+ while (Continue);
return Status;
}
/* FT volume can't be removable */
if (FileDeviceObject->Characteristics & FILE_REMOVABLE_MEDIA)
{
- ObfDereferenceObject(DeviceObject);
- ObfDereferenceObject(FileObject);
+ ObDereferenceObject(DeviceObject);
+ ObDereferenceObject(FileObject);
return FALSE;
}
- ObfDereferenceObject(FileObject);
+ ObDereferenceObject(FileObject);
/* Get partition information */
KeInitializeEvent(&Event, NotificationEvent, FALSE);
&IoStatusBlock);
if (!Irp)
{
- ObfDereferenceObject(DeviceObject);
+ ObDereferenceObject(DeviceObject);
return FALSE;
}
- Status = IofCallDriver(DeviceObject, Irp);
+ Status = IoCallDriver(DeviceObject, Irp);
if (Status == STATUS_PENDING)
{
KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
Status = IoStatusBlock.Status;
}
- ObfDereferenceObject(DeviceObject);
+ ObDereferenceObject(DeviceObject);
if (!NT_SUCCESS(Status))
{
return FALSE;
if (IsDriveLetter(&(SymlinkInformation->Name)) && SymlinkInformation->Online)
{
DriveLetterInfo->DriveLetterWasAssigned = FALSE;
- DriveLetterInfo->CurrentDriveLetter = SymlinkInformation->Name.Buffer[LETTER_POSITION];
+ DriveLetterInfo->CurrentDriveLetter = (CHAR)SymlinkInformation->Name.Buffer[LETTER_POSITION];
break;
}
}
/* We can't go beyond */
- if (MountPoint->SymbolicLinkNameLength + MountPoint->UniqueIdLength +
- MountPoint->DeviceNameLength < Stack->Parameters.DeviceIoControl.InputBufferLength)
+ if (((ULONG)MountPoint->SymbolicLinkNameLength + MountPoint->UniqueIdLength +
+ MountPoint->DeviceNameLength) < Stack->Parameters.DeviceIoControl.InputBufferLength)
{
return STATUS_INVALID_PARAMETER;
}
NTSTATUS
MountMgrVolumeMountPointChanged(IN PDEVICE_EXTENSION DeviceExtension,
IN PIRP Irp,
- IN NTSTATUS LockStatus,
+ IN NTSTATUS LockStatus,
OUT PUNICODE_STRING SourceDeviceName,
OUT PUNICODE_STRING SourceSymbolicName,
OUT PUNICODE_STRING TargetVolumeName)
VolumeMountPoint = (PMOUNTMGR_VOLUME_MOUNT_POINT)Irp->AssociatedIrp.SystemBuffer;
- if (VolumeMountPoint->SourceVolumeNameLength + VolumeMountPoint->TargetVolumeNameLength <
+ if (((ULONG)VolumeMountPoint->SourceVolumeNameLength + VolumeMountPoint->TargetVolumeNameLength) <
Stack->Parameters.DeviceIoControl.InputBufferLength)
{
return STATUS_INVALID_PARAMETER;
/* Return symbolic name */
SourceSymbolicName->Length =
- SourceSymbolicName->MaximumLength = FileNameInfo->FileNameLength;
+ SourceSymbolicName->MaximumLength = (USHORT)FileNameInfo->FileNameLength;
SourceSymbolicName->Buffer = (PWSTR)FileNameInfo;
/* memmove allows memory overlap */
RtlMoveMemory(SourceSymbolicName->Buffer, FileNameInfo->FileName, SourceSymbolicName->Length);
if (FOReferenced)
{
- ObfDereferenceObject(FileObject);
+ ObDereferenceObject(FileObject);
}
return Status;
case IOCTL_MOUNTMGR_DELETE_POINTS:
Status = MountMgrDeletePoints(DeviceExtension, Irp);
+ break;
case IOCTL_MOUNTMGR_QUERY_POINTS:
Status = MountMgrQueryPoints(DeviceExtension, Irp);
Complete:
Irp->IoStatus.Status = Status;
- IofCompleteRequest(Irp, IO_NO_INCREMENT);
+ IoCompleteRequest(Irp, IO_NO_INCREMENT);
return Status;
}