sys: VS Editor sucks: strip CR's

This commit is contained in:
Bill Zissimopoulos 2015-11-24 17:35:36 -08:00
parent f69b5f7864
commit e60e63ada0
3 changed files with 55 additions and 55 deletions

View File

@ -12,9 +12,9 @@
// {6F9D25FA-6DEE-4A9D-80F5-E98E14F35E54} // {6F9D25FA-6DEE-4A9D-80F5-E98E14F35E54}
extern const __declspec(selectany) GUID FspFsctlDeviceClassGuid = extern const __declspec(selectany) GUID FspFsctlDeviceClassGuid =
{ 0x6f9d25fa, 0x6dee, 0x4a9d, { 0x80, 0xf5, 0xe9, 0x8e, 0x14, 0xf3, 0x5e, 0x54 } }; { 0x6f9d25fa, 0x6dee, 0x4a9d, { 0x80, 0xf5, 0xe9, 0x8e, 0x14, 0xf3, 0x5e, 0x54 } };
// {B48171C3-DD50-4852-83A3-344C50D93B17} // {B48171C3-DD50-4852-83A3-344C50D93B17}
extern const __declspec(selectany) GUID FspFsvrtDeviceClassGuid = extern const __declspec(selectany) GUID FspFsvrtDeviceClassGuid =
{ 0xb48171c3, 0xdd50, 0x4852, { 0x83, 0xa3, 0x34, 0x4c, 0x50, 0xd9, 0x3b, 0x17 } }; { 0xb48171c3, 0xdd50, 0x4852, { 0x83, 0xa3, 0x34, 0x4c, 0x50, 0xd9, 0x3b, 0x17 } };
#define FSP_FSCTL_DISK_DEVICE_NAME "WinFsp.Disk" #define FSP_FSCTL_DISK_DEVICE_NAME "WinFsp.Disk"
#define FSP_FSCTL_NET_DEVICE_NAME "WinFsp.Net" #define FSP_FSCTL_NET_DEVICE_NAME "WinFsp.Net"
@ -32,30 +32,30 @@ extern const __declspec(selectany) GUID FspFsvrtDeviceClassGuid =
#define FSP_FSCTL_CREATE_BUFFER_SIZE 64 #define FSP_FSCTL_CREATE_BUFFER_SIZE 64
#define FSP_FSCTL_TRANSACT_BUFFER_SIZE 4096 #define FSP_FSCTL_TRANSACT_BUFFER_SIZE 4096
/* marshalling */ /* marshalling */
#pragma warning(push) #pragma warning(push)
#pragma warning(disable:4200) /* zero-sized array in struct/union */ #pragma warning(disable:4200) /* zero-sized array in struct/union */
typedef struct typedef struct
{ {
ULONG Size; ULONG Size;
UINT_PTR Hint; UINT_PTR Hint;
UINT8 Kind; UINT8 Kind;
union union
{ {
UINT8 Placeholder; // !!!: REMOVE UINT8 Placeholder; // !!!: REMOVE
} Req; } Req;
} FSP_TRANSACT_REQ; } FSP_TRANSACT_REQ;
typedef struct typedef struct
{ {
ULONG Size; ULONG Size;
UINT_PTR Hint; UINT_PTR Hint;
IO_STATUS_BLOCK IoStatus; IO_STATUS_BLOCK IoStatus;
UINT8 Kind; UINT8 Kind;
union union
{ {
UINT8 Placeholder; // !!!: REMOVE UINT8 Placeholder; // !!!: REMOVE
} Req; } Req;
} FSP_TRANSACT_RSP; } FSP_TRANSACT_RSP;
#pragma warning(pop) #pragma warning(pop)
#endif #endif

View File

@ -81,9 +81,9 @@
!NT_SUCCESS(Result) ? 0 : Irp->IoStatus.Information);\ !NT_SUCCESS(Result) ? 0 : Irp->IoStatus.Information);\
if (STATUS_PENDING == Result) \ if (STATUS_PENDING == Result) \
{ \ { \
if (0 == (IrpSp->Control & SL_PENDING_RETURNED))\ if (0 == (IrpSp->Control & SL_PENDING_RETURNED))\
{ \ { \
/* if the IRP has not been marked pending already */\ /* if the IRP has not been marked pending already */\
ASSERT(FspFsvolDeviceExtensionKind == FspDeviceExtension(DeviceObject)->Kind);\ ASSERT(FspFsvolDeviceExtensionKind == FspDeviceExtension(DeviceObject)->Kind);\
FSP_FSVOL_DEVICE_EXTENSION *FsvolDeviceExtension =\ FSP_FSVOL_DEVICE_EXTENSION *FsvolDeviceExtension =\
FspFsvolDeviceExtension(DeviceObject);\ FspFsvolDeviceExtension(DeviceObject);\

View File

@ -114,13 +114,13 @@ static NTSTATUS FspFsvrtDeleteVolume(
static NTSTATUS FspFsvrtTransact( static NTSTATUS FspFsvrtTransact(
PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp)
{ {
/* check parameters */ /* check parameters */
ULONG InputBufferLength = IrpSp->Parameters.FileSystemControl.InputBufferLength; ULONG InputBufferLength = IrpSp->Parameters.FileSystemControl.InputBufferLength;
ULONG OutputBufferLength = IrpSp->Parameters.FileSystemControl.OutputBufferLength; ULONG OutputBufferLength = IrpSp->Parameters.FileSystemControl.OutputBufferLength;
PVOID SystemBuffer = Irp->AssociatedIrp.SystemBuffer; PVOID SystemBuffer = Irp->AssociatedIrp.SystemBuffer;
if (sizeof(FSP_TRANSACT_RSP) > InputBufferLength || 0 == SystemBuffer) if (sizeof(FSP_TRANSACT_RSP) > InputBufferLength || 0 == SystemBuffer)
return STATUS_INVALID_PARAMETER; return STATUS_INVALID_PARAMETER;
if (FSP_FSCTL_TRANSACT_BUFFER_SIZE > OutputBufferLength) if (FSP_FSCTL_TRANSACT_BUFFER_SIZE > OutputBufferLength)
return STATUS_BUFFER_TOO_SMALL; return STATUS_BUFFER_TOO_SMALL;
NTSTATUS Result; NTSTATUS Result;
@ -135,24 +135,24 @@ static NTSTATUS FspFsvrtTransact(
if (!NT_SUCCESS(Result)) if (!NT_SUCCESS(Result))
return Result; return Result;
/* process any user-mode file system responses */ /* process any user-mode file system responses */
Response = SystemBuffer; Response = SystemBuffer;
SystemBufferEnd = (PUINT8)SystemBuffer + InputBufferLength; SystemBufferEnd = (PUINT8)SystemBuffer + InputBufferLength;
for (;;) for (;;)
{ {
if ((PUINT8)Response + sizeof(Response->Size) > SystemBufferEnd || if ((PUINT8)Response + sizeof(Response->Size) > SystemBufferEnd ||
sizeof(FSP_TRANSACT_RSP) > Response->Size || sizeof(FSP_TRANSACT_RSP) > Response->Size ||
(PUINT8)Response + Response->Size > SystemBufferEnd) (PUINT8)Response + Response->Size > SystemBufferEnd)
break; break;
ProcessIrp = FspIoqEndProcessingIrp(&FsvrtDeviceExtension->Ioq, Response->Hint); ProcessIrp = FspIoqEndProcessingIrp(&FsvrtDeviceExtension->Ioq, Response->Hint);
if (0 == ProcessIrp) if (0 == ProcessIrp)
/* either IRP was canceled or a bogus IrpHint was provided */ /* either IRP was canceled or a bogus IrpHint was provided */
continue; continue;
//FspDispatchProcessedIrp(ProcessIrp, Response); //FspDispatchProcessedIrp(ProcessIrp, Response);
Response = (PVOID)((PUINT8)Response + Response->Size); Response = (PVOID)((PUINT8)Response + Response->Size);
} }
if (FspIoqPostIrp(&FsvrtDeviceExtension->TransactIoq, Irp)) if (FspIoqPostIrp(&FsvrtDeviceExtension->TransactIoq, Irp))