From a4f62e968f35daf6f2dc9362d8b08684353edd97 Mon Sep 17 00:00:00 2001 From: Zvonimir Date: Fri, 26 Jul 2019 05:00:53 -0600 Subject: [PATCH 1/8] Updated LLVM version to 6.0 --- CMakeLists.txt | 2 +- bin/versions | 4 ++-- docs/installation.md | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d4934873..348cf391d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 2.8) project(smack) if (NOT WIN32 OR MSYS OR CYGWIN) - find_program(LLVM_CONFIG_EXECUTABLE NAMES llvm-config-5.0 llvm-config PATHS ${LLVM_CONFIG} DOC "llvm-config") + find_program(LLVM_CONFIG_EXECUTABLE NAMES llvm-config-6.0 llvm-config PATHS ${LLVM_CONFIG} DOC "llvm-config") if (LLVM_CONFIG_EXECUTABLE STREQUAL "LLVM_CONFIG_EXECUTABLE-NOTFOUND") message(FATAL_ERROR "llvm-config could not be found!") diff --git a/bin/versions b/bin/versions index 1dead4a48..8b5536b48 100644 --- a/bin/versions +++ b/bin/versions @@ -5,6 +5,6 @@ BOOGIE_COMMIT=5c829b6340 CORRAL_COMMIT=c446f5e827 SYMBOOGLIX_COMMIT=7210e5d09b LOCKPWN_COMMIT=73eddf97bd -LLVM_SHORT_VERSION=5.0 -LLVM_FULL_VERSION=5.0.2 +LLVM_SHORT_VERSION=6.0 +LLVM_FULL_VERSION=6.0.1 RUST_VERSION=2016-12-16 diff --git a/docs/installation.md b/docs/installation.md index f11c0cc9e..4c5c893d8 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -80,8 +80,8 @@ to Docker's official documentation. SMACK depends on the following projects: -* [LLVM][] version [5.0.2][LLVM-5.0.2] -* [Clang][] version [5.0.2][Clang-5.0.2] +* [LLVM][] version [6.0.1][LLVM-6.0.1] +* [Clang][] version [6.0.1][Clang-6.0.1] * [Python][] version 2.7 or greater * [Ninja][] version 1.5.1 or greater * [Mono][] version 5.0.0 or greater (except on Windows) @@ -203,9 +203,9 @@ shell in the `test` directory by executing [CMake]: http://www.cmake.org [Python]: http://www.python.org [LLVM]: http://llvm.org -[LLVM-5.0.2]: http://llvm.org/releases/download.html#5.0.2 +[LLVM-6.0.1]: http://llvm.org/releases/download.html#6.0.1 [Clang]: http://clang.llvm.org -[Clang-5.0.2]: http://llvm.org/releases/download.html#5.0.2 +[Clang-6.0.1]: http://llvm.org/releases/download.html#6.0.1 [Boogie]: https://github.com/boogie-org/boogie [Corral]: https://github.com/boogie-org/corral [Z3]: https://github.com/Z3Prover/z3/ From 90a37c6ae12bf19a54ea29a7b8075a56634dea96 Mon Sep 17 00:00:00 2001 From: Dylan MacKenzie Date: Tue, 13 Nov 2018 16:57:29 -0800 Subject: [PATCH 2/8] Pass an `OptimizationRemarkEmitter` to `SimplifyLibCalls` --- lib/smack/SimplifyLibCalls.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/smack/SimplifyLibCalls.cpp b/lib/smack/SimplifyLibCalls.cpp index f4dd57f5d..f10350c59 100644 --- a/lib/smack/SimplifyLibCalls.cpp +++ b/lib/smack/SimplifyLibCalls.cpp @@ -8,6 +8,7 @@ #include "smack/Debug.h" #include "smack/Naming.h" #include "smack/SmackOptions.h" +#include "llvm/Analysis/OptimizationRemarkEmitter.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" @@ -28,7 +29,8 @@ void SimplifyLibCalls::getAnalysisUsage(AnalysisUsage &AU) const { bool SimplifyLibCalls::runOnModule(Module &M) { modified = false; simplifier = new LibCallSimplifier( - M.getDataLayout(), &getAnalysis().getTLI()); + M.getDataLayout(), &getAnalysis().getTLI(), + getAnalysis().getORE()); if (simplifier) visit(M); return modified; From 783a10828b32318006e4337303cce170fb15b8a3 Mon Sep 17 00:00:00 2001 From: Zvonimir Date: Fri, 26 Jul 2019 05:12:15 -0600 Subject: [PATCH 3/8] Switched to ToolOutputFile instead of tool_output_file --- tools/llvm2bpl/llvm2bpl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/llvm2bpl/llvm2bpl.cpp b/tools/llvm2bpl/llvm2bpl.cpp index f3f165c44..deec47534 100644 --- a/tools/llvm2bpl/llvm2bpl.cpp +++ b/tools/llvm2bpl/llvm2bpl.cpp @@ -209,11 +209,11 @@ int main(int argc, char **argv) { pass_manager.add(new smack::AddTiming()); } - std::vector files; + std::vector files; if (!FinalIrFilename.empty()) { std::error_code EC; - auto F = new tool_output_file(FinalIrFilename.c_str(), EC, sys::fs::F_None); + auto F = new ToolOutputFile(FinalIrFilename.c_str(), EC, sys::fs::F_None); if (EC) check(EC.message()); F->keep(); @@ -223,7 +223,7 @@ int main(int argc, char **argv) { if (!OutputFilename.empty()) { std::error_code EC; - auto F = new tool_output_file(OutputFilename.c_str(), EC, sys::fs::F_None); + auto F = new ToolOutputFile(OutputFilename.c_str(), EC, sys::fs::F_None); if (EC) check(EC.message()); F->keep(); From ed369a8993cbf3ed1f79505774e9b6e357442cff Mon Sep 17 00:00:00 2001 From: Dylan MacKenzie Date: Tue, 13 Nov 2018 16:31:37 -0800 Subject: [PATCH 4/8] Replace `CodeModel::Default` with an empty `Optional` Functions which used to take `CodeModel` now take an `Optional` where `None` indicates the default `CodeModel` should be used. `CodeModel::Default` has been removed. --- tools/llvm2bpl/llvm2bpl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/llvm2bpl/llvm2bpl.cpp b/tools/llvm2bpl/llvm2bpl.cpp index deec47534..41b97c056 100644 --- a/tools/llvm2bpl/llvm2bpl.cpp +++ b/tools/llvm2bpl/llvm2bpl.cpp @@ -105,9 +105,9 @@ static TargetMachine *GetTargetMachine(Triple TheTriple, StringRef CPUStr, return TheTarget->createTargetMachine( TheTriple.getTriple(), CPUStr, FeaturesStr, Options, - Reloc::Static, /* was getRelocModel(),*/ - CodeModel::Default, /* was CMModel,*/ - CodeGenOpt::None /*GetCodeGenOptLevel())*/ + Reloc::Static, /* was getRelocModel(),*/ + None, /* Use default CodeModel */ + CodeGenOpt::None /*GetCodeGenOptLevel())*/ ); } } From 4f646d428b4ffeb71ab1ed79c0bfa7427684fd67 Mon Sep 17 00:00:00 2001 From: Zvonimir Date: Fri, 26 Jul 2019 07:50:31 -0600 Subject: [PATCH 5/8] Updated travis configuration to LLVM 6.0 --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 50d7ba52f..9f3ddbee0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,7 @@ env: before_install: - sudo rm -rf /usr/local/clang-7.0.0 - - sudo add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main" + - sudo add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main" - wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF - sudo apt-get install -y apt-transport-https @@ -47,13 +47,13 @@ before_install: - sudo apt-get update install: - - sudo apt-get install -y clang-5.0 clang-format-5.0 llvm-5.0-dev mono-complete ninja-build - - sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-5.0 20 - - sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-5.0 20 - - sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-5.0 20 - - sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-5.0 20 - - sudo update-alternatives --install /usr/bin/llvm-dis llvm-dis /usr/bin/llvm-dis-5.0 20 - - sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-5.0 20 + - sudo apt-get install -y clang-6.0 clang-format-6.0 llvm-6.0-dev mono-complete ninja-build + - sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-6.0 20 + - sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-6.0 20 + - sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-6.0 20 + - sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-6.0 20 + - sudo update-alternatives --install /usr/bin/llvm-dis llvm-dis /usr/bin/llvm-dis-6.0 20 + - sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-6.0 20 - sudo pip install pyyaml psutil script: From 5e76e83a9895a0df84c85ab1dfe34998b722256a Mon Sep 17 00:00:00 2001 From: Zvonimir Date: Fri, 26 Jul 2019 08:48:08 -0600 Subject: [PATCH 6/8] Reformatted source code with clang-format version 6.0 --- include/smack/Debug.h | 2 +- .../cdaudio_simpl1_false.cil.c | 4 +- test/ntdrivers/cdaudio_true.i.cil.c | 218 ++++++--- test/ntdrivers/diskperf_false.i.cil.c | 91 +++- test/ntdrivers/diskperf_true.i.cil.c | 91 +++- test/ntdrivers/floppy_false.i.cil.c | 420 ++++++++++++------ test/ntdrivers/floppy_true.i.cil.c | 420 ++++++++++++------ test/ntdrivers/kbfiltr_false.i.cil.c | 37 +- test/ntdrivers/parport_false.i.cil.c | 402 ++++++++++++----- test/ntdrivers/parport_true.i.cil.c | 402 ++++++++++++----- 10 files changed, 1459 insertions(+), 628 deletions(-) diff --git a/include/smack/Debug.h b/include/smack/Debug.h index 533e3e441..9245ccd6c 100644 --- a/include/smack/Debug.h +++ b/include/smack/Debug.h @@ -36,6 +36,6 @@ extern bool DebugFlag; llvm::raw_ostream &dbgs(); #define SDEBUG(X) SMACK_DEBUG_WITH_TYPE(DEBUG_TYPE, X) -} +} // namespace smack #endif diff --git a/test/ntdrivers-simplified/cdaudio_simpl1_false.cil.c b/test/ntdrivers-simplified/cdaudio_simpl1_false.cil.c index 136b23ccd..979cfcdb9 100644 --- a/test/ntdrivers-simplified/cdaudio_simpl1_false.cil.c +++ b/test/ntdrivers-simplified/cdaudio_simpl1_false.cil.c @@ -2768,7 +2768,9 @@ int main(void) { } } else { if (status != 259) { - { errorFn(); } + { + errorFn(); + } } else { } } diff --git a/test/ntdrivers/cdaudio_true.i.cil.c b/test/ntdrivers/cdaudio_true.i.cil.c index 25e9bb22b..eaf4246e8 100644 --- a/test/ntdrivers/cdaudio_true.i.cil.c +++ b/test/ntdrivers/cdaudio_true.i.cil.c @@ -3387,7 +3387,9 @@ NTSTATUS CdAudioStartDevice(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } else { { tmp___7 = memcmp(inquiryDataPtr + 16, "CDR-3650/1650S ", 16); } if (tmp___7) { - { tmp___8 = memcmp(inquiryDataPtr + 16, "CDR-1750S ", 16); } + { + tmp___8 = memcmp(inquiryDataPtr + 16, "CDR-1750S ", 16); + } if (tmp___8) { } else { @@ -3578,7 +3580,9 @@ NTSTATUS CdAudioPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { return (status); switch_2_22: /* CIL Label */; if ((int)irpSp->Parameters.UsageNotification.Type != 1) { - { tmp = CdAudioSendToNextDriver(DeviceObject, Irp); } + { + tmp = CdAudioSendToNextDriver(DeviceObject, Irp); + } return (tmp); } else { } @@ -3603,7 +3607,9 @@ NTSTATUS CdAudioPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { { status = CdAudioForwardIrpSynchronous(DeviceObject, Irp); } if (status >= 0L) { if (irpSp->Parameters.UsageNotification.InPath) { - { InterlockedIncrement(&deviceExtension->PagingPathCount); } + { + InterlockedIncrement(&deviceExtension->PagingPathCount); + } } else { { InterlockedDecrement(&deviceExtension->PagingPathCount); } } @@ -3985,7 +3991,8 @@ NTSTATUS CdAudioNECDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { if (!(status >= 0L)) { if (status != -1073741764L) { { - /* ExFreePool(Toc); */ /* INLINED */ + /* ExFreePool(Toc); + */ /* INLINED */ Irp->IoStatus.Information = 0; } goto SetStatusAndReturn; @@ -4011,7 +4018,8 @@ NTSTATUS CdAudioNECDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } if (*((ULONG *)(Toc + 14)) == 0UL) { { - /* ExFreePool(Toc); */ /* INLINED */ + /* ExFreePool(Toc); + */ /* INLINED */ } goto switch_4_break; } else { @@ -4043,7 +4051,8 @@ NTSTATUS CdAudioNECDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { (unsigned char)(address >> 8); cdaudioDataOut->TrackData[0].Address[3] = (unsigned char)address; - /* ExFreePool(Toc); */ /* INLINED */ + /* ExFreePool(Toc); + */ /* INLINED */ } goto switch_4_break; switch_4_exp_1 : /* CIL Label */ @@ -4092,7 +4101,8 @@ NTSTATUS CdAudioNECDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { if (status != -1073741764L) { { Irp->IoStatus.Information = 0; - /* ExFreePool(Toc); */ /* INLINED */ + /* ExFreePool(Toc); + */ /* INLINED */ } goto SetStatusAndReturn; } else { @@ -4215,7 +4225,8 @@ NTSTATUS CdAudioNECDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { Irp->IoStatus .Information = (unsigned long)(( long)(&((CDROM_TOC *)0)->TrackData[i])); - /* ExFreePool(Toc); */ /* INLINED */ + /* ExFreePool(Toc); + */ /* INLINED */ } goto switch_4_break; switch_4_exp_2 : /* CIL Label */ @@ -4346,7 +4357,8 @@ NTSTATUS CdAudioNECDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { Irp->IoStatus.Information = 0; if (SubQPtr) { { - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ } } else { } @@ -4365,7 +4377,8 @@ NTSTATUS CdAudioNECDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { userPtr) ->Format != 1) { { - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ status = -1073741823L; Irp->IoStatus.Information = 0; } @@ -4473,7 +4486,8 @@ NTSTATUS CdAudioNECDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } } { - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ } goto switch_4_break; switch_4_exp_8 : /* CIL Label */ @@ -4529,7 +4543,8 @@ NTSTATUS CdAudioNECDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } else { } { - /* IoSetHardErrorOrVerifyDevice(Irp, deviceExtension->TargetDeviceObject); */ /* INLINED */ + /* IoSetHardErrorOrVerifyDevice(Irp, + * deviceExtension->TargetDeviceObject); */ /* INLINED */ Irp->IoStatus.Information = 0; } } else { @@ -4682,7 +4697,8 @@ NTSTATUS CdAudioPioneerDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } if (!(status >= 0L)) { { - /* ExFreePool(Toc); */ /* INLINED */ + /* ExFreePool(Toc); + */ /* INLINED */ Irp->IoStatus.Information = 0; } goto SetStatusAndReturn; @@ -4700,7 +4716,8 @@ NTSTATUS CdAudioPioneerDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } if (!(status >= 0L)) { { - /* ExFreePool(Toc); */ /* INLINED */ + /* ExFreePool(Toc); + */ /* INLINED */ Irp->IoStatus.Information = 0; } goto SetStatusAndReturn; @@ -4765,7 +4782,8 @@ NTSTATUS CdAudioPioneerDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } if (!(status >= 0L)) { { - /* ExFreePool(Toc); */ /* INLINED */ + /* ExFreePool(Toc); + */ /* INLINED */ Irp->IoStatus.Information = 0; } goto SetStatusAndReturn; @@ -4805,7 +4823,8 @@ NTSTATUS CdAudioPioneerDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } if (!(status >= 0L)) { { - /* ExFreePool(Toc); */ /* INLINED */ + /* ExFreePool(Toc); + */ /* INLINED */ Irp->IoStatus.Information = 0; } goto SetStatusAndReturn; @@ -4832,7 +4851,8 @@ NTSTATUS CdAudioPioneerDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { { Irp->IoStatus.Information = (unsigned long)(( long)(&((CDROM_TOC *)0)->TrackData[i])); - /* ExFreePool(Toc); */ /* INLINED */ + /* ExFreePool(Toc); + */ /* INLINED */ } goto switch_6_break; switch_6_exp_14 : /* CIL Label */ @@ -5025,7 +5045,8 @@ NTSTATUS CdAudioPioneerDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { Irp->IoStatus.Information = 0; if (SubQPtr) { { - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ } } else { } @@ -5047,7 +5068,8 @@ NTSTATUS CdAudioPioneerDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { userPtr) ->Format != 1) { { - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ memset(userPtr, 0, sizeof(SUB_Q_CURRENT_POSITION)); Irp->IoStatus.Information = 0; @@ -5110,7 +5132,8 @@ NTSTATUS CdAudioPioneerDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } } else { { - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ Irp->IoStatus.Information = 0; } goto SetStatusAndReturn; @@ -5184,7 +5207,8 @@ NTSTATUS CdAudioPioneerDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { Irp->IoStatus.Information = 0; } { - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ } goto switch_6_break; switch_6_exp_20: /* CIL Label */ @@ -5247,7 +5271,8 @@ NTSTATUS CdAudioPioneerDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } else { } { - /* IoSetHardErrorOrVerifyDevice(Irp, deviceExtension->TargetDeviceObject); */ /* INLINED */ + /* IoSetHardErrorOrVerifyDevice(Irp, + * deviceExtension->TargetDeviceObject); */ /* INLINED */ Irp->IoStatus.Information = 0; } } else { @@ -5400,7 +5425,8 @@ NTSTATUS CdAudioDenonDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { if (status != -1073741764L) { if (status != -1073741764L) { { - /* ExFreePool(Toc); */ /* INLINED */ + /* ExFreePool(Toc); + */ /* INLINED */ Irp->IoStatus.Information = 0; } goto SetStatusAndReturn; @@ -5523,7 +5549,8 @@ NTSTATUS CdAudioDenonDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { deviceExtension->LastEndM = 0; deviceExtension->LastEndS = 0; deviceExtension->LastEndF = 0; - /* ExFreePool(Toc); */ /* INLINED */ + /* ExFreePool(Toc); + */ /* INLINED */ } goto switch_13_break; switch_13_exp_27: /* CIL Label */; @@ -5688,7 +5715,8 @@ NTSTATUS CdAudioDenonDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } if ((int)deviceExtension->Paused == 1) { { - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ status = 0L; } goto SetStatusAndReturn; @@ -5704,7 +5732,8 @@ NTSTATUS CdAudioDenonDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } if (!(status >= 0L)) { { - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ } goto SetStatusAndReturn; } else { @@ -5722,7 +5751,8 @@ NTSTATUS CdAudioDenonDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } if (!(status >= 0L)) { { - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ } goto SetStatusAndReturn; } else { @@ -5732,7 +5762,8 @@ NTSTATUS CdAudioDenonDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { deviceExtension->PausedM = *(SubQPtr + 7); deviceExtension->PausedS = *(SubQPtr + 8); deviceExtension->PausedF = *(SubQPtr + 9); - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ } goto switch_13_break; switch_13_exp_31: /* CIL Label */ @@ -5781,7 +5812,8 @@ NTSTATUS CdAudioDenonDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { Irp->IoStatus.Information = 0; if (SubQPtr___0) { { - /* ExFreePool(SubQPtr___0); */ /* INLINED */ + /* ExFreePool(SubQPtr___0); + */ /* INLINED */ } } else { } @@ -5803,7 +5835,8 @@ NTSTATUS CdAudioDenonDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { userPtr) ->Format != 1) { { - /* ExFreePool(SubQPtr___0); */ /* INLINED */ + /* ExFreePool(SubQPtr___0); + */ /* INLINED */ memset(userPtr, 0, sizeof(SUB_Q_CURRENT_POSITION)); status = -1073741823L; @@ -5882,7 +5915,8 @@ NTSTATUS CdAudioDenonDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { Irp->IoStatus.Information = 0; } { - /* ExFreePool(SubQPtr___0); */ /* INLINED */ + /* ExFreePool(SubQPtr___0); + */ /* INLINED */ } goto switch_13_break; switch_13_exp_33 : /* CIL Label */ @@ -5938,7 +5972,8 @@ NTSTATUS CdAudioDenonDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } else { } { - /* IoSetHardErrorOrVerifyDevice(Irp, deviceExtension->TargetDeviceObject); */ /* INLINED */ + /* IoSetHardErrorOrVerifyDevice(Irp, + * deviceExtension->TargetDeviceObject); */ /* INLINED */ Irp->IoStatus.Information = 0; } } else { @@ -6130,7 +6165,8 @@ NTSTATUS CdAudioHitachiDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { if (status != -1073741764L) { if (status != -1073741764L) { { - /* ExFreePool(Toc); */ /* INLINED */ + /* ExFreePool(Toc); + */ /* INLINED */ Irp->IoStatus.Information = 0; } goto SetStatusAndReturn; @@ -6331,7 +6367,8 @@ NTSTATUS CdAudioHitachiDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { long)(&((CDROM_TOC *)0)->TrackData[i])); } { - /* ExFreePool(Toc); */ /* INLINED */ + /* ExFreePool(Toc); + */ /* INLINED */ } goto switch_15_break; switch_15_exp_39 : /* CIL Label */ @@ -6467,7 +6504,8 @@ NTSTATUS CdAudioHitachiDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { deviceExtension->PausedM = *(PausePos + 0); deviceExtension->PausedS = *(PausePos + 1); deviceExtension->PausedF = *(PausePos + 2); - /* ExFreePool(PausePos); */ /* INLINED */ + /* ExFreePool(PausePos); + */ /* INLINED */ } goto switch_15_break; switch_15_exp_43 : /* CIL Label */ @@ -6512,7 +6550,8 @@ NTSTATUS CdAudioHitachiDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { Irp->IoStatus.Information = 0; if (SubQPtr) { { - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ } } else { } @@ -6530,7 +6569,8 @@ NTSTATUS CdAudioHitachiDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { userPtr) ->Format != 1) { { - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ status = -1073741823L; Irp->IoStatus.Information = 0; } @@ -6600,7 +6640,8 @@ NTSTATUS CdAudioHitachiDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } } { - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ } goto switch_15_break; switch_15_exp_45 : /* CIL Label */ @@ -6636,7 +6677,8 @@ NTSTATUS CdAudioHitachiDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } else { } { - /* ExFreePool(EjectStatus); */ /* INLINED */ + /* ExFreePool(EjectStatus); + */ /* INLINED */ } goto switch_15_break; switch_15_exp_46: /* CIL Label */; @@ -6680,7 +6722,8 @@ NTSTATUS CdAudioHitachiDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } else { } { - /* IoSetHardErrorOrVerifyDevice(Irp, deviceExtension->TargetDeviceObject); */ /* INLINED */ + /* IoSetHardErrorOrVerifyDevice(Irp, + * deviceExtension->TargetDeviceObject); */ /* INLINED */ Irp->IoStatus.Information = 0; } } else { @@ -6817,7 +6860,8 @@ NTSTATUS CdAudio535DeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } if (!(status >= 0L)) { { - /* ExFreePool(lastSession); */ /* INLINED */ + /* ExFreePool(lastSession); + */ /* INLINED */ Irp->IoStatus.Information = 0; } goto SetStatusAndReturn; @@ -6837,7 +6881,8 @@ NTSTATUS CdAudio535DeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } if (lastSession->LogicalBlockAddress == 0UL) { { - /* ExFreePool(lastSession); */ /* INLINED */ + /* ExFreePool(lastSession); + */ /* INLINED */ } goto switch_18_break; } else { @@ -6848,7 +6893,8 @@ NTSTATUS CdAudio535DeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { *((ULONG *)(&cdaudioDataOut->TrackData[0] .Address[0])) = lastSession->LogicalBlockAddress; - /* ExFreePool(lastSession); */ /* INLINED */ + /* ExFreePool(lastSession); + */ /* INLINED */ } goto switch_18_break; switch_18_exp_51: /* CIL Label */; @@ -6898,7 +6944,8 @@ NTSTATUS CdAudio535DeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { if (status != -1073741764L) { if (status != -1073741764L) { { - /* ExFreePool(Toc); */ /* INLINED */ + /* ExFreePool(Toc); + */ /* INLINED */ Irp->IoStatus.Information = 0; } goto SetStatusAndReturn; @@ -7009,7 +7056,8 @@ NTSTATUS CdAudio535DeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { Irp->IoStatus.Information = 0; if (SubQPtr) { { - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ } } else { } @@ -7031,7 +7079,8 @@ NTSTATUS CdAudio535DeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { userPtr) ->Format != 1) { { - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ memset(userPtr, 0, sizeof(SUB_Q_CURRENT_POSITION)); status = -1073741823L; @@ -7228,7 +7277,8 @@ NTSTATUS CdAudio535DeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { SetStatusAndReturn: if (status == -2147483626L) { { - /* IoSetHardErrorOrVerifyDevice(Irp, deviceExtension->TargetDeviceObject); */ /* INLINED */ + /* IoSetHardErrorOrVerifyDevice(Irp, + * deviceExtension->TargetDeviceObject); */ /* INLINED */ Irp->IoStatus.Information = 0; } } else { @@ -7380,7 +7430,8 @@ NTSTATUS CdAudio435DeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { if (status != -1073741764L) { if (status != -1073741764L) { { - /* ExFreePool(Toc); */ /* INLINED */ + /* ExFreePool(Toc); + */ /* INLINED */ Irp->IoStatus.Information = 0; } goto SetStatusAndReturn; @@ -7482,7 +7533,8 @@ NTSTATUS CdAudio435DeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { deviceExtension->LastEndM = 0; deviceExtension->LastEndS = 0; deviceExtension->LastEndF = 0; - /* ExFreePool(Toc); */ /* INLINED */ + /* ExFreePool(Toc); + */ /* INLINED */ } goto switch_20_break; switch_20_exp_61: /* CIL Label */; @@ -7615,7 +7667,8 @@ NTSTATUS CdAudio435DeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } if ((int)deviceExtension->Paused == 1) { { - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ status = 0L; } goto SetStatusAndReturn; @@ -7635,7 +7688,8 @@ NTSTATUS CdAudio435DeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } if (!(status >= 0L)) { { - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ } goto SetStatusAndReturn; } else { @@ -7653,7 +7707,8 @@ NTSTATUS CdAudio435DeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } if (!(status >= 0L)) { { - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ } goto SetStatusAndReturn; } else { @@ -7664,7 +7719,8 @@ NTSTATUS CdAudio435DeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { deviceExtension->PausedM = *(SubQPtr + 9); deviceExtension->PausedS = *(SubQPtr + 10); deviceExtension->PausedF = *(SubQPtr + 11); - /* ExFreePool(SubQPtr); */ /* INLINED */ + /* ExFreePool(SubQPtr); + */ /* INLINED */ } goto switch_20_break; switch_20_exp_65: /* CIL Label */ @@ -7713,7 +7769,8 @@ NTSTATUS CdAudio435DeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { Irp->IoStatus.Information = 0; if (SubQPtr___0) { { - /* ExFreePool(SubQPtr___0); */ /* INLINED */ + /* ExFreePool(SubQPtr___0); + */ /* INLINED */ } } else { } @@ -7735,7 +7792,8 @@ NTSTATUS CdAudio435DeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { userPtr) ->Format != 1) { { - /* ExFreePool(SubQPtr___0); */ /* INLINED */ + /* ExFreePool(SubQPtr___0); + */ /* INLINED */ memset(userPtr, 0, sizeof(SUB_Q_CURRENT_POSITION)); status = -1073741823L; @@ -7803,7 +7861,8 @@ NTSTATUS CdAudio435DeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { Irp->IoStatus.Information = 0; } { - /* ExFreePool(SubQPtr___0); */ /* INLINED */ + /* ExFreePool(SubQPtr___0); + */ /* INLINED */ } goto switch_20_break; switch_20_exp_67 : /* CIL Label */ @@ -7873,7 +7932,8 @@ NTSTATUS CdAudio435DeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { SetStatusAndReturn: if (status == -2147483626L) { { - /* IoSetHardErrorOrVerifyDevice(Irp, deviceExtension->TargetDeviceObject); */ /* INLINED */ + /* IoSetHardErrorOrVerifyDevice(Irp, + * deviceExtension->TargetDeviceObject); */ /* INLINED */ Irp->IoStatus.Information = 0; } } else { @@ -8005,10 +8065,14 @@ NTSTATUS CdAudioHPCdrDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { nextIrpSp->Control = 0; } if (s != NP) { - { errorFn(); } + { + errorFn(); + } } else { if (compRegistered != 0) { - { errorFn(); } + { + errorFn(); + } } else { compRegistered = 1; routine = 0; @@ -8058,10 +8122,14 @@ NTSTATUS CdAudioForwardIrpSynchronous(PDEVICE_OBJECT DeviceObject, PIRP Irp) { nextIrpSp->Control = 0; } if (s != NP) { - { errorFn(); } + { + errorFn(); + } } else { if (compRegistered != 0) { - { errorFn(); } + { + errorFn(); + } } else { compRegistered = 1; routine = 1; @@ -8266,7 +8334,9 @@ int main(void) { if (s != SKIP2) { if (s != IPC) { if (s != DC) { - { errorFn(); } + { + errorFn(); + } } else { goto _L___0; } @@ -8277,18 +8347,24 @@ int main(void) { _L___0: /* CIL Label */ if (pended == 1) { if (status != 259L) { - { errorFn(); } + { + errorFn(); + } } else { } } else { if (s == DC) { if (status == 259L) { - { errorFn(); } + { + errorFn(); + } } else { } } else { if (status != (NTSTATUS)lowerDriverReturn) { - { errorFn(); } + { + errorFn(); + } } else { } } @@ -8744,7 +8820,9 @@ NTSTATUS IofCallDriver(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } } if ((long)compRetStatus == -1073741802L) { - { stubMoreProcessingRequired(); } + { + stubMoreProcessingRequired(); + } } else { } } else { @@ -8902,7 +8980,9 @@ NTSTATUS KeWaitForSingleObject(PVOID Object, KWAIT_REASON WaitReason, customIrp = 0; } else { if (s == MPR3) { - { errorFn(); } + { + errorFn(); + } } else { } } @@ -9048,7 +9128,9 @@ NTSTATUS PoCallDriver(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } } if ((long)compRetStatus == -1073741802L) { - { stubMoreProcessingRequired(); } + { + stubMoreProcessingRequired(); + } } else { } } else { diff --git a/test/ntdrivers/diskperf_false.i.cil.c b/test/ntdrivers/diskperf_false.i.cil.c index d5525c8da..96d7530bb 100644 --- a/test/ntdrivers/diskperf_false.i.cil.c +++ b/test/ntdrivers/diskperf_false.i.cil.c @@ -2402,10 +2402,14 @@ NTSTATUS DiskPerfForwardIrpSynchronous(PDEVICE_OBJECT DeviceObject, PIRP Irp) { nextIrpSp->Control = 0; } if (s != NP) { - { errorFn(); } + { + errorFn(); + } } else { if (compRegistered != 0) { - { errorFn(); } + { + errorFn(); + } } else { compRegistered = 1; compFptr = &DiskPerfIrpCompletion; @@ -2480,15 +2484,21 @@ NTSTATUS DiskPerfReadWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } else { } if (deviceExtension->CountersEnabled <= 0L) { - { tmp___0 = DiskPerfSendToNextDriver(DeviceObject, Irp); } + { + tmp___0 = DiskPerfSendToNextDriver(DeviceObject, Irp); + } return (tmp___0); } else { if ((int)deviceExtension->PhysicalDeviceNameBuffer[0] == 0) { - { tmp___0 = DiskPerfSendToNextDriver(DeviceObject, Irp); } + { + tmp___0 = DiskPerfSendToNextDriver(DeviceObject, Irp); + } return (tmp___0); } else { if ((unsigned int)partitionCounters == (unsigned int)((void *)0)) { - { tmp___0 = DiskPerfSendToNextDriver(DeviceObject, Irp); } + { + tmp___0 = DiskPerfSendToNextDriver(DeviceObject, Irp); + } return (tmp___0); } else { } @@ -2507,10 +2517,14 @@ NTSTATUS DiskPerfReadWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } else { } if (s != NP) { - { errorFn(); } + { + errorFn(); + } } else { if (compRegistered != 0) { - { errorFn(); } + { + errorFn(); + } } else { compRegistered = 1; compFptr = &DiskPerfIoCompletion; @@ -2565,7 +2579,9 @@ NTSTATUS DiskPerfIoCompletion(PDEVICE_OBJECT DeviceObject, PIRP Irp, queueLen = InterlockedDecrement(&deviceExtension->QueueDepth); } if (queueLen < 0L) { - { queueLen = InterlockedIncrement(&deviceExtension->QueueDepth); } + { + queueLen = InterlockedIncrement(&deviceExtension->QueueDepth); + } } else { } if (queueLen == 0L) { @@ -2712,7 +2728,9 @@ NTSTATUS DiskPerfWmi(PDEVICE_OBJECT DeviceObject, PIRP Irp) { deviceExtension = DeviceObject->DeviceExtension; wmilibContext = &deviceExtension->WmilibContext; if (wmilibContext->GuidCount == 0UL) { - { tmp = DiskPerfSendToNextDriver(DeviceObject, Irp); } + { + tmp = DiskPerfSendToNextDriver(DeviceObject, Irp); + } return (tmp); } else { } @@ -2795,7 +2813,9 @@ NTSTATUS DiskPerfRegisterDevice(PDEVICE_OBJECT DeviceObject) { (void *)0, 0, &number, sizeof(number), 0, &event, &ioStatus); } if (!irp) { - { DiskPerfLogError(DeviceObject, 256, 0L, -1073479678L); } + { + DiskPerfLogError(DeviceObject, 256, 0L, -1073479678L); + } return (-1073741670L); } else { } @@ -2816,7 +2836,8 @@ NTSTATUS DiskPerfRegisterDevice(PDEVICE_OBJECT DeviceObject) { "\000d\000\\\000P\000a\000r\000t\000i\000t\000i\000o\000n\000%" "\000d\000", number.DeviceNumber, number.PartitionNumber); - /* RtlInitUnicodeString(& deviceExtension->PhysicalDeviceName, & deviceExtension->PhysicalDeviceNameBuffer[0]); */ /* INLINED */ + /* RtlInitUnicodeString(& deviceExtension->PhysicalDeviceName, & + * deviceExtension->PhysicalDeviceNameBuffer[0]); */ /* INLINED */ memcpy(&deviceExtension->StorageManagerName[0], "P\000h\000y\000s\000D\000i\000s\000k\000", 8U * sizeof(WCHAR)); } @@ -2827,7 +2848,9 @@ NTSTATUS DiskPerfRegisterDevice(PDEVICE_OBJECT DeviceObject) { output = tmp; } if (!output) { - { DiskPerfLogError(DeviceObject, 257, 0L, -1073479678L); } + { + DiskPerfLogError(DeviceObject, 257, 0L, -1073479678L); + } return (-1073741670L); } else { } @@ -2862,7 +2885,9 @@ NTSTATUS DiskPerfRegisterDevice(PDEVICE_OBJECT DeviceObject) { output = tmp___0; } if (!output) { - { DiskPerfLogError(DeviceObject, 258, 0L, -1073479678L); } + { + DiskPerfLogError(DeviceObject, 258, 0L, -1073479678L); + } return (-1073741670L); } else { } @@ -2919,7 +2944,9 @@ NTSTATUS DiskPerfRegisterDevice(PDEVICE_OBJECT DeviceObject) { sizeof(VOLUME_NUMBER), 0, &event, &ioStatus); } if (!irp) { - { DiskPerfLogError(DeviceObject, 265, 0L, -1073479678L); } + { + DiskPerfLogError(DeviceObject, 265, 0L, -1073479678L); + } return (-1073741670L); } else { } @@ -2956,7 +2983,9 @@ NTSTATUS DiskPerfRegisterDevice(PDEVICE_OBJECT DeviceObject) { } { status = IoWMIRegistrationControl(DeviceObject, 1UL | registrationFlag); } if (!(status >= 0L)) { - { DiskPerfLogError(DeviceObject, 261, 0L, -1073479668L); } + { + DiskPerfLogError(DeviceObject, 261, 0L, -1073479668L); + } } else { } return (status); @@ -3127,7 +3156,9 @@ NTSTATUS DiskperfWmiFunctionControl(PDEVICE_OBJECT DeviceObject, PIRP Irp, if (GuidIndex == 0UL) { if ((int)Function == 1) { if (Enable) { - { tmp = InterlockedIncrement(&deviceExtension->CountersEnabled); } + { + tmp = InterlockedIncrement(&deviceExtension->CountersEnabled); + } if (tmp == 1L) { if ((unsigned int)deviceExtension->DiskCounters != (unsigned int)((void *)0)) { @@ -3350,7 +3381,9 @@ int main(void) { if (s != SKIP2) { if (s != IPC) { if (s != DC) { - { errorFn(); } + { + errorFn(); + } } else { goto _L___0; } @@ -3361,15 +3394,21 @@ int main(void) { _L___0: /* CIL Label */ if (pended == 1) { if (status != 259L) { - { errorFn(); } + { + errorFn(); + } } else { } } else { if (s == DC) { - { errorFn(); } + { + errorFn(); + } } else { if (status != (NTSTATUS)lowerDriverReturn) { - { errorFn(); } + { + errorFn(); + } } else { } } @@ -3809,7 +3848,9 @@ NTSTATUS IofCallDriver(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } } if ((long)compRetStatus == -1073741802L) { - { stubMoreProcessingRequired(); } + { + stubMoreProcessingRequired(); + } } else { } } else { @@ -3963,7 +4004,9 @@ NTSTATUS KeWaitForSingleObject(PVOID Object, KWAIT_REASON WaitReason, customIrp = 0; } else { if (s == MPR3) { - { errorFn(); } + { + errorFn(); + } } else { } } @@ -4109,7 +4152,9 @@ NTSTATUS PoCallDriver(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } } if ((long)compRetStatus == -1073741802L) { - { stubMoreProcessingRequired(); } + { + stubMoreProcessingRequired(); + } } else { } } else { diff --git a/test/ntdrivers/diskperf_true.i.cil.c b/test/ntdrivers/diskperf_true.i.cil.c index 379e33d82..f24b841e8 100644 --- a/test/ntdrivers/diskperf_true.i.cil.c +++ b/test/ntdrivers/diskperf_true.i.cil.c @@ -2402,10 +2402,14 @@ NTSTATUS DiskPerfForwardIrpSynchronous(PDEVICE_OBJECT DeviceObject, PIRP Irp) { nextIrpSp->Control = 0; } if (s != NP) { - { errorFn(); } + { + errorFn(); + } } else { if (compRegistered != 0) { - { errorFn(); } + { + errorFn(); + } } else { compRegistered = 1; compFptr = &DiskPerfIrpCompletion; @@ -2480,15 +2484,21 @@ NTSTATUS DiskPerfReadWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } else { } if (deviceExtension->CountersEnabled <= 0L) { - { tmp___0 = DiskPerfSendToNextDriver(DeviceObject, Irp); } + { + tmp___0 = DiskPerfSendToNextDriver(DeviceObject, Irp); + } return (tmp___0); } else { if ((int)deviceExtension->PhysicalDeviceNameBuffer[0] == 0) { - { tmp___0 = DiskPerfSendToNextDriver(DeviceObject, Irp); } + { + tmp___0 = DiskPerfSendToNextDriver(DeviceObject, Irp); + } return (tmp___0); } else { if ((unsigned int)partitionCounters == (unsigned int)((void *)0)) { - { tmp___0 = DiskPerfSendToNextDriver(DeviceObject, Irp); } + { + tmp___0 = DiskPerfSendToNextDriver(DeviceObject, Irp); + } return (tmp___0); } else { } @@ -2507,10 +2517,14 @@ NTSTATUS DiskPerfReadWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } else { } if (s != NP) { - { errorFn(); } + { + errorFn(); + } } else { if (compRegistered != 0) { - { errorFn(); } + { + errorFn(); + } } else { compRegistered = 1; compFptr = &DiskPerfIoCompletion; @@ -2565,7 +2579,9 @@ NTSTATUS DiskPerfIoCompletion(PDEVICE_OBJECT DeviceObject, PIRP Irp, queueLen = InterlockedDecrement(&deviceExtension->QueueDepth); } if (queueLen < 0L) { - { queueLen = InterlockedIncrement(&deviceExtension->QueueDepth); } + { + queueLen = InterlockedIncrement(&deviceExtension->QueueDepth); + } } else { } if (queueLen == 0L) { @@ -2712,7 +2728,9 @@ NTSTATUS DiskPerfWmi(PDEVICE_OBJECT DeviceObject, PIRP Irp) { deviceExtension = DeviceObject->DeviceExtension; wmilibContext = &deviceExtension->WmilibContext; if (wmilibContext->GuidCount == 0UL) { - { tmp = DiskPerfSendToNextDriver(DeviceObject, Irp); } + { + tmp = DiskPerfSendToNextDriver(DeviceObject, Irp); + } return (tmp); } else { } @@ -2795,7 +2813,9 @@ NTSTATUS DiskPerfRegisterDevice(PDEVICE_OBJECT DeviceObject) { (void *)0, 0, &number, sizeof(number), 0, &event, &ioStatus); } if (!irp) { - { DiskPerfLogError(DeviceObject, 256, 0L, -1073479678L); } + { + DiskPerfLogError(DeviceObject, 256, 0L, -1073479678L); + } return (-1073741670L); } else { } @@ -2816,7 +2836,8 @@ NTSTATUS DiskPerfRegisterDevice(PDEVICE_OBJECT DeviceObject) { "\000d\000\\\000P\000a\000r\000t\000i\000t\000i\000o\000n\000%" "\000d\000", number.DeviceNumber, number.PartitionNumber); - /* RtlInitUnicodeString(& deviceExtension->PhysicalDeviceName, & deviceExtension->PhysicalDeviceNameBuffer[0]); */ /* INLINED */ + /* RtlInitUnicodeString(& deviceExtension->PhysicalDeviceName, & + * deviceExtension->PhysicalDeviceNameBuffer[0]); */ /* INLINED */ memcpy(&deviceExtension->StorageManagerName[0], "P\000h\000y\000s\000D\000i\000s\000k\000", 8U * sizeof(WCHAR)); } @@ -2827,7 +2848,9 @@ NTSTATUS DiskPerfRegisterDevice(PDEVICE_OBJECT DeviceObject) { output = tmp; } if (!output) { - { DiskPerfLogError(DeviceObject, 257, 0L, -1073479678L); } + { + DiskPerfLogError(DeviceObject, 257, 0L, -1073479678L); + } return (-1073741670L); } else { } @@ -2862,7 +2885,9 @@ NTSTATUS DiskPerfRegisterDevice(PDEVICE_OBJECT DeviceObject) { output = tmp___0; } if (!output) { - { DiskPerfLogError(DeviceObject, 258, 0L, -1073479678L); } + { + DiskPerfLogError(DeviceObject, 258, 0L, -1073479678L); + } return (-1073741670L); } else { } @@ -2919,7 +2944,9 @@ NTSTATUS DiskPerfRegisterDevice(PDEVICE_OBJECT DeviceObject) { sizeof(VOLUME_NUMBER), 0, &event, &ioStatus); } if (!irp) { - { DiskPerfLogError(DeviceObject, 265, 0L, -1073479678L); } + { + DiskPerfLogError(DeviceObject, 265, 0L, -1073479678L); + } return (-1073741670L); } else { } @@ -2956,7 +2983,9 @@ NTSTATUS DiskPerfRegisterDevice(PDEVICE_OBJECT DeviceObject) { } { status = IoWMIRegistrationControl(DeviceObject, 1UL | registrationFlag); } if (!(status >= 0L)) { - { DiskPerfLogError(DeviceObject, 261, 0L, -1073479668L); } + { + DiskPerfLogError(DeviceObject, 261, 0L, -1073479668L); + } } else { } return (status); @@ -3127,7 +3156,9 @@ NTSTATUS DiskperfWmiFunctionControl(PDEVICE_OBJECT DeviceObject, PIRP Irp, if (GuidIndex == 0UL) { if ((int)Function == 1) { if (Enable) { - { tmp = InterlockedIncrement(&deviceExtension->CountersEnabled); } + { + tmp = InterlockedIncrement(&deviceExtension->CountersEnabled); + } if (tmp == 1L) { if ((unsigned int)deviceExtension->DiskCounters != (unsigned int)((void *)0)) { @@ -3350,7 +3381,9 @@ int main(void) { if (s != SKIP2) { if (s != IPC) { if (s != DC) { - { errorFn(); } + { + errorFn(); + } } else { goto _L___0; } @@ -3361,18 +3394,24 @@ int main(void) { _L___0: /* CIL Label */ if (pended == 1) { if (status != 259L) { - { errorFn(); } + { + errorFn(); + } } else { } } else { if (s == DC) { if (status == 259L) { - { errorFn(); } + { + errorFn(); + } } else { } } else { if (status != (NTSTATUS)lowerDriverReturn) { - { errorFn(); } + { + errorFn(); + } } else { } } @@ -3812,7 +3851,9 @@ NTSTATUS IofCallDriver(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } } if ((long)compRetStatus == -1073741802L) { - { stubMoreProcessingRequired(); } + { + stubMoreProcessingRequired(); + } } else { } } else { @@ -3966,7 +4007,9 @@ NTSTATUS KeWaitForSingleObject(PVOID Object, KWAIT_REASON WaitReason, customIrp = 0; } else { if (s == MPR3) { - { errorFn(); } + { + errorFn(); + } } else { } } @@ -4112,7 +4155,9 @@ NTSTATUS PoCallDriver(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } } if ((long)compRetStatus == -1073741802L) { - { stubMoreProcessingRequired(); } + { + stubMoreProcessingRequired(); + } } else { } } else { diff --git a/test/ntdrivers/floppy_false.i.cil.c b/test/ntdrivers/floppy_false.i.cil.c index df610e792..de2af3864 100644 --- a/test/ntdrivers/floppy_false.i.cil.c +++ b/test/ntdrivers/floppy_false.i.cil.c @@ -2261,7 +2261,8 @@ NTSTATUS FloppyAddDevice(PDRIVER_OBJECT DriverObject, { disketteExtension->DeviceName.Length = 0; disketteExtension->DeviceName.MaximumLength = deviceName.Length; - /* RtlCopyUnicodeString(& disketteExtension->DeviceName, & deviceName); */ /* INLINED */ + /* RtlCopyUnicodeString(& disketteExtension->DeviceName, & + * deviceName); */ /* INLINED */ tmp___1 = IoGetConfigurationInformation(); tmp___1->FloppyCount += 1UL; sprintf(arcNameBuffer, "%s(%d)disk(%d)fdisk(%d)", "\\ArcName\\multi", @@ -2273,7 +2274,9 @@ NTSTATUS FloppyAddDevice(PDRIVER_OBJECT DriverObject, &arcNameString, 1); } if (ntStatus >= 0L) { - { IoCreateSymbolicLink(&disketteExtension->ArcName, &deviceName); } + { + IoCreateSymbolicLink(&disketteExtension->ArcName, &deviceName); + } } else { } deviceObject->Flags |= 8208UL; @@ -2289,17 +2292,21 @@ NTSTATUS FloppyAddDevice(PDRIVER_OBJECT DriverObject, IoAttachDeviceToDeviceStack(deviceObject, PhysicalDeviceObject); } {} { - /* KeInitializeSemaphore(& disketteExtension->RequestSemaphore, 0L, 2147483647); */ /* INLINED */ + /* KeInitializeSemaphore(& disketteExtension->RequestSemaphore, + * 0L, 2147483647); */ /* INLINED */ disketteExtension->PowerDownMutex.Count = 1; disketteExtension->PowerDownMutex.Contention = 0; - /* KeInitializeEvent(& disketteExtension->PowerDownMutex.Event, 1, 0); */ /* INLINED */ + /* KeInitializeEvent(& disketteExtension->PowerDownMutex.Event, + * 1, 0); */ /* INLINED */ /* KeInitializeSpinLock(& disketteExtension->ListSpinLock); */ /* INLINED */ disketteExtension->ThreadReferenceMutex.Count = 1; disketteExtension->ThreadReferenceMutex.Contention = 0; - /* KeInitializeEvent(& disketteExtension->ThreadReferenceMutex.Event, 1, 0); */ /* INLINED */ + /* KeInitializeEvent(& + * disketteExtension->ThreadReferenceMutex.Event, 1, 0); */ /* INLINED */ disketteExtension->HoldNewReqMutex.Count = 1; disketteExtension->HoldNewReqMutex.Contention = 0; - /* KeInitializeEvent(& disketteExtension->HoldNewReqMutex.Event, 1, 0); */ /* INLINED */ + /* KeInitializeEvent(& disketteExtension->HoldNewReqMutex.Event, + * 1, 0); */ /* INLINED */ disketteExtension->ListEntry.Blink = &disketteExtension->ListEntry; disketteExtension->ListEntry.Flink = disketteExtension->ListEntry.Blink; @@ -2311,8 +2318,10 @@ NTSTATUS FloppyAddDevice(PDRIVER_OBJECT DriverObject, &disketteExtension->NewRequestQueue; disketteExtension->NewRequestQueue.Flink = disketteExtension->NewRequestQueue.Blink; - /* KeInitializeSpinLock(& disketteExtension->NewRequestQueueSpinLock); */ /* INLINED */ - /* KeInitializeSpinLock(& disketteExtension->FlCancelSpinLock); */ /* INLINED */ + /* KeInitializeSpinLock(& + * disketteExtension->NewRequestQueueSpinLock); */ /* INLINED */ + /* KeInitializeSpinLock(& disketteExtension->FlCancelSpinLock); + */ /* INLINED */ disketteExtension->FloppyControllerAllocated = 0; disketteExtension->ReleaseFdcWithMotorRunning = 0; disketteExtension->DeviceObject = deviceObject; @@ -2647,7 +2656,8 @@ NTSTATUS FlQueueIrpToThread(PIRP Irp, PDISKETTE_EXTENSION DisketteExtension) { } { /* ExReleaseFastMutex(PagingMutex); */ /* INLINED */ - /* ExReleaseFastMutex(& DisketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * DisketteExtension->ThreadReferenceMutex); */ /* INLINED */ } return (status); } else { @@ -2901,7 +2911,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { if (irpSp->Parameters.DeviceIoControl .InputBufferLength < (ULONG)sizeof(FORMAT_PARAMETERS)) { - {} + { + } ntStatus = -1073741811L; goto switch_16_break; } else { @@ -2987,7 +2998,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { .OutputBufferLength; if (outputBufferLength < (ULONG)sizeof(DISK_GEOMETRY)) { - {} + { + } ntStatus = -1073741789L; goto switch_16_break; } else { @@ -3001,7 +3013,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { (int) lowestDriveMediaType) + 1))) { - {} + { + } ntStatus = -2147483643L; highestDriveMediaType = (enum _DRIVE_MEDIA_TYPE)( @@ -3055,7 +3068,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { switch_16_exp_10: /* CIL Label */; if ((int)((KUSER_SHARED_DATA *const)4292804608U) ->AlternativeArchitecture == 1) { - {} + { + } if (!(DeviceObject->Characteristics & 1UL)) { ntStatus = -1073741275L; goto switch_16_break; @@ -3107,7 +3121,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } if (!(ntStatus >= 0L)) { { - /* ExFreePool(valueName); */ /* INLINED */ + /* ExFreePool(valueName); + */ /* INLINED */ } goto switch_16_break; } else { @@ -3115,7 +3130,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { if ((int)driveLetterName.Length != 4) { { ntStatus = -1073741275L; - /* ExFreePool(valueName); */ /* INLINED */ + /* ExFreePool(valueName); + */ /* INLINED */ } goto switch_16_break; } else { @@ -3123,7 +3139,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { 65) { { ntStatus = -1073741275L; - /* ExFreePool(valueName); */ /* INLINED */ + /* ExFreePool(valueName); + */ /* INLINED */ } goto switch_16_break; } else { @@ -3131,7 +3148,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { 90) { { ntStatus = -1073741275L; - /* ExFreePool(valueName); */ /* INLINED */ + /* ExFreePool(valueName); + */ /* INLINED */ } goto switch_16_break; } else { @@ -3139,7 +3157,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { 1) != 58) { { ntStatus = -1073741275L; - /* ExFreePool(valueName); */ /* INLINED */ + /* ExFreePool(valueName); + */ /* INLINED */ } goto switch_16_break; } else { @@ -3164,7 +3183,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { Irp->IoStatus.Information = sizeof(MOUNTDEV_SUGGESTED_LINK_NAME); ntStatus = -2147483643L; - /* ExFreePool(valueName); */ /* INLINED */ + /* ExFreePool(valueName); + */ /* INLINED */ } goto switch_16_break; } else { @@ -3178,7 +3198,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { "\000s\000t\000e\000m\000\\\000D\000" "I\000S\000K\000", valueName); - /* ExFreePool(valueName); */ /* INLINED */ + /* ExFreePool(valueName); + */ /* INLINED */ memcpy(suggestedName->Name, "\\\000D\000o\000s\000D\000e\000v" "\000i\000c\000e\000s\000\\\000", @@ -3193,11 +3214,13 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { switch_16_exp_11: /* CIL Label */; if ((int)((KUSER_SHARED_DATA *const)4292804608U) ->AlternativeArchitecture == 1) { - {} + { + } if (irpSp->Parameters.DeviceIoControl .OutputBufferLength < (ULONG)sizeof(SENSE_DEVISE_STATUS_PTOS)) { - {} + { + } ntStatus = -1073741811L; goto switch_16_break; } else { @@ -3358,7 +3381,8 @@ NTSTATUS FloppyPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { switch_32_5: /* CIL Label */; switch_32_1: /* CIL Label */; if ((int)irpSp->MinorFunction == 5) { - {} + { + } } else { {} } @@ -3380,9 +3404,11 @@ NTSTATUS FloppyPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } else { } { - /* ExAcquireFastMutex(& disketteExtension->HoldNewReqMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * disketteExtension->HoldNewReqMutex); */ /* INLINED */ disketteExtension->HoldNewRequests = 1; - /* ExReleaseFastMutex(& disketteExtension->HoldNewReqMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->HoldNewReqMutex); */ /* INLINED */ ntStatus = FlQueueIrpToThread(Irp, disketteExtension); } if (ntStatus == 259L) { @@ -3393,7 +3419,8 @@ NTSTATUS FloppyPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { if ((unsigned int)disketteExtension->FloppyThread != (unsigned int)((void *)0)) { { - /* ObfDereferenceObject(disketteExtension->FloppyThread); */ /* INLINED */ + /* ObfDereferenceObject(disketteExtension->FloppyThread); + */ /* INLINED */ } } else { } @@ -3426,7 +3453,8 @@ NTSTATUS FloppyPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { switch_32_6: /* CIL Label */; switch_32_3: /* CIL Label */; if ((int)irpSp->MinorFunction == 6) { - {} + { + } } else { {} } @@ -3461,13 +3489,18 @@ NTSTATUS FloppyPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { (long)(&((IO_STACK_LOCATION *)0) ->CompletionRoutine)); nextIrpSp->Control = 0; - /* KeInitializeEvent(& doneEvent, 1, 0); */ /* INLINED */ + /* KeInitializeEvent(& doneEvent, + * 1, 0); */ /* INLINED */ } if (s != NP) { - { errorFn(); } + { + errorFn(); + } } else { if (compRegistered != 0) { - { errorFn(); } + { + errorFn(); + } } else { compRegistered = 1; compFptr = &FloppyPnpComplete; @@ -3496,9 +3529,11 @@ NTSTATUS FloppyPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } else { } { - /* ExAcquireFastMutex(& disketteExtension->HoldNewReqMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * disketteExtension->HoldNewReqMutex); */ /* INLINED */ disketteExtension->HoldNewRequests = 0; - /* ExReleaseFastMutex(& disketteExtension->HoldNewReqMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->HoldNewReqMutex); */ /* INLINED */ FloppyProcessQueuedRequests(disketteExtension); Irp->IoStatus.__annonCompField4.Status = ntStatus; myStatus = ntStatus; @@ -3528,9 +3563,11 @@ NTSTATUS FloppyPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { goto switch_32_break; switch_32_2: /* CIL Label */; {} { - /* ExAcquireFastMutex(& disketteExtension->HoldNewReqMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * disketteExtension->HoldNewReqMutex); */ /* INLINED */ disketteExtension->HoldNewRequests = 0; - /* ExReleaseFastMutex(& disketteExtension->HoldNewReqMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->HoldNewReqMutex); */ /* INLINED */ disketteExtension->IsStarted = 0; disketteExtension->IsRemoved = 1; FloppyProcessQueuedRequests(disketteExtension); @@ -3555,25 +3592,32 @@ NTSTATUS FloppyPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { { IoSetDeviceInterfaceState( &disketteExtension->InterfaceString, 0); - /* RtlFreeUnicodeString(& disketteExtension->InterfaceString); */ /* INLINED */ - /* RtlInitUnicodeString(& disketteExtension->InterfaceString, (void *)0); */ /* INLINED */ + /* RtlFreeUnicodeString(& + * disketteExtension->InterfaceString); */ /* INLINED */ + /* RtlInitUnicodeString(& + * disketteExtension->InterfaceString, (void *)0); */ /* INLINED */ } } else { } { - /* RtlFreeUnicodeString(& disketteExtension->DeviceName); */ /* INLINED */ - /* RtlInitUnicodeString(& disketteExtension->DeviceName, (void *)0); */ /* INLINED */ + /* RtlFreeUnicodeString(& + * disketteExtension->DeviceName); */ /* INLINED */ + /* RtlInitUnicodeString(& + * disketteExtension->DeviceName, (void *)0); */ /* INLINED */ } if ((int)disketteExtension->ArcName.Length != 0) { { IoDeleteSymbolicLink(&disketteExtension->ArcName); - /* RtlFreeUnicodeString(& disketteExtension->ArcName); */ /* INLINED */ - /* RtlInitUnicodeString(& disketteExtension->ArcName, (void *)0); */ /* INLINED */ + /* RtlFreeUnicodeString(& + * disketteExtension->ArcName); */ /* INLINED */ + /* RtlInitUnicodeString(& + * disketteExtension->ArcName, (void *)0); */ /* INLINED */ } } else { } { - /* IoDetachDevice(disketteExtension->TargetObject); */ /* INLINED */ + /* IoDetachDevice(disketteExtension->TargetObject); + */ /* INLINED */ /* IoDeleteDevice(DeviceObject); */ /* INLINED */ tmp = IoGetConfigurationInformation(); tmp->FloppyCount -= 1UL; @@ -3651,10 +3695,14 @@ NTSTATUS FloppyStartDevice(PDEVICE_OBJECT DeviceObject, PIRP Irp) { nextIrpSp->Control = 0; } if (s != NP) { - { errorFn(); } + { + errorFn(); + } } else { if (compRegistered != 0) { - { errorFn(); } + { + errorFn(); + } } else { compRegistered = 1; compFptr = &FloppyPnpComplete; @@ -3689,7 +3737,9 @@ NTSTATUS FloppyStartDevice(PDEVICE_OBJECT DeviceObject, PIRP Irp) { disketteExtension->MaxTransferSize = fdcInfo.MaxTransferSize; if (fdcInfo.AcpiBios) { if (fdcInfo.AcpiFdiSupported) { - { ntStatus = FlAcpiConfigureFloppy(disketteExtension, &fdcInfo); } + { + ntStatus = FlAcpiConfigureFloppy(disketteExtension, &fdcInfo); + } if ((int)disketteExtension->DriveType == 4) { disketteExtension->PerpendicularMode = (int)disketteExtension->PerpendicularMode | @@ -3724,7 +3774,8 @@ NTSTATUS FloppyStartDevice(PDEVICE_OBJECT DeviceObject, PIRP Irp) { &FlConfigCallBack, disketteExtension); } if (ntStatus >= 0L) { - {} + { + } goto while_43_break; } else { } @@ -3822,7 +3873,8 @@ NTSTATUS FloppyPower(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } else { } { - /* ExAcquireFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ } if (disketteExtension->ThreadReferenceCount >= 0L) { { @@ -3838,17 +3890,20 @@ NTSTATUS FloppyPower(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } else { } { - /* ExReleaseFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ ntStatus = 0L; } goto switch_46_break; switch_46_2: /* CIL Label */; if ((int)type == 0) { { - /* ExAcquireFastMutex(& disketteExtension->PowerDownMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * disketteExtension->PowerDownMutex); */ /* INLINED */ } if ((int)state.SystemState == 1) { - {} + { + } disketteExtension->PoweringDown = 0; WaitForCompletion = 0; } else { @@ -3857,7 +3912,8 @@ NTSTATUS FloppyPower(PDEVICE_OBJECT DeviceObject, PIRP Irp) { disketteExtension->PoweringDown = 1; } { - /* ExReleaseFastMutex(& disketteExtension->PowerDownMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->PowerDownMutex); */ /* INLINED */ } if ((unsigned int)disketteExtension->FloppyThread != (unsigned int)((void *)0)) { @@ -3996,7 +4052,8 @@ NTSTATUS FlInterpretError(UCHAR StatusRegister1, UCHAR StatusRegister2) { } } if ((int)StatusRegister1 & 16) { - {} + { + } return (-1073741764L); } else { } @@ -4025,17 +4082,20 @@ NTSTATUS FlInterpretError(UCHAR StatusRegister1, UCHAR StatusRegister2) { } } if ((int)StatusRegister1 & 2) { - {} + { + } return (-1073741662L); } else { } if ((int)StatusRegister1 & 1) { - {} + { + } return (-1073741467L); } else { } if ((int)StatusRegister2 & 16) { - {} + { + } return (-1073741466L); } else { } @@ -4054,14 +4114,19 @@ void FlFinishOperation(PIRP Irp, PDISKETTE_EXTENSION DisketteExtension) { DisketteExtension->HardwareFailCount = (UCHAR)((int)DisketteExtension->HardwareFailCount + 1); if ((int)DisketteExtension->HardwareFailCount < 2) { - { ntStatus = FlInitializeControllerHardware(DisketteExtension); } + { + ntStatus = FlInitializeControllerHardware(DisketteExtension); + } if (ntStatus >= 0L) { - {} + { + } DisketteExtension->MediaType = -1; {} { - /* ExAcquireFastMutex(& DisketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * DisketteExtension->ThreadReferenceMutex); */ /* INLINED */ DisketteExtension->ThreadReferenceCount += 1L; - /* ExReleaseFastMutex(& DisketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * DisketteExtension->ThreadReferenceMutex); */ /* INLINED */ ExfInterlockedInsertHeadList( &DisketteExtension->ListEntry, &Irp->Tail.Overlay.__annonCompField17.ListEntry, @@ -4110,7 +4175,8 @@ void FlFinishOperation(PIRP Irp, PDISKETTE_EXTENSION DisketteExtension) { } if ((unsigned char)tmp) { { - /* IoSetHardErrorOrVerifyDevice(Irp, DisketteExtension->DeviceObject); */ /* INLINED */ + /* IoSetHardErrorOrVerifyDevice(Irp, + * DisketteExtension->DeviceObject); */ /* INLINED */ } } else { } @@ -4119,7 +4185,8 @@ void FlFinishOperation(PIRP Irp, PDISKETTE_EXTENSION DisketteExtension) { if (myStatus != 0L) { if (myStatus != -2147483626L) { if (myStatus != -1073741805L) { - {} + { + } } else { goto _L___0; } @@ -4201,7 +4268,8 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, if ((int)((DisketteExtension->DeviceObject)->Vpb)->Flags & 1) { if (Irp) { { - /* IoSetHardErrorOrVerifyDevice(Irp, DisketteExtension->DeviceObject); */ /* INLINED */ + /* IoSetHardErrorOrVerifyDevice(Irp, + * DisketteExtension->DeviceObject); */ /* INLINED */ } } else { } @@ -4220,7 +4288,8 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, DisketteExtension->FifoBuffer, (void *)0, 0, 0); } if (!(ntStatus >= 0L)) { - {} + { + } return (ntStatus); } else { } @@ -4230,7 +4299,8 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, driveStatus = 128; } if ((int)driveStatus & 128) { - {} + { + } if ((int)((DisketteExtension->DeviceObject)->Vpb)->Flags & 1) { (DisketteExtension->DeviceObject)->Flags &= 4294967293UL; } else { @@ -4249,7 +4319,8 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, DisketteExtension->FifoBuffer, (void *)0, 0, 0); } if (!(ntStatus >= 0L)) { - {} + { + } return (ntStatus); } else { if (!((int)DisketteExtension->FifoBuffer[0] & 32)) { @@ -4279,7 +4350,8 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, KeDelayExecutionThread(0, 0, &delay); } if (!(ntStatus >= 0L)) { - {} + { + } return (ntStatus); } else { if (!((int)DisketteExtension->FifoBuffer[0] & 32)) { @@ -4305,7 +4377,8 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, DisketteExtension->FifoBuffer, (void *)0, 0, 0); } if (!(ntStatus >= 0L)) { - {} + { + } return (ntStatus); } else { } @@ -4327,7 +4400,8 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, } } if ((int)driveStatus & 128) { - {} + { + } if ((int)((DisketteExtension->DeviceObject)->Vpb)->Flags & 1) { (DisketteExtension->DeviceObject)->Flags &= 4294967293UL; } else { @@ -4339,7 +4413,8 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, } if ((int)IgnoreChange == 0) { if ((int)((DisketteExtension->DeviceObject)->Vpb)->Flags & 1) { - {} + { + } return (-2147483626L); } else { return (-1073741435L); @@ -4353,24 +4428,32 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, _L___2: /* CIL Label */ if ((int)((KUSER_SHARED_DATA *const)4292804608U) ->AlternativeArchitecture == 1) { - { FlHdbit(DisketteExtension); } + { + FlHdbit(DisketteExtension); + } } else { } } } if (SetUpMedia) { if ((int)DisketteExtension->MediaType == -1) { - { ntStatus = FlDetermineMediaType(DisketteExtension); } + { + ntStatus = FlDetermineMediaType(DisketteExtension); + } } else { if ((int)DisketteExtension->MediaType == 0) { - {} + { + } return (-1073741804L); } else { if ((int)DisketteExtension->DriveMediaType != (int)DisketteExtension->LastDriveMediaType) { - { ntStatus = FlDatarateSpecifyConfigure(DisketteExtension); } + { + ntStatus = FlDatarateSpecifyConfigure(DisketteExtension); + } if (!(ntStatus >= 0L)) { - {} + { + } } else { } } else { @@ -4389,21 +4472,24 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, DisketteExtension->FifoBuffer, (void *)0, 0, 0); } if (!(ntStatus >= 0L)) { - {} + { + } return (ntStatus); } else { } if ((int)((KUSER_SHARED_DATA *const)4292804608U) ->AlternativeArchitecture == 1) { if (!((int)DisketteExtension->FifoBuffer[0] & 32)) { - {} + { + } return (-1073741805L); } else { } } else { } if ((int)DisketteExtension->FifoBuffer[0] & 64) { - {} + { + } return (-1073741662L); } else { } @@ -4465,7 +4551,9 @@ NTSTATUS FlDatarateSpecifyConfigure(PDISKETTE_EXTENSION DisketteExtension) { &DisketteExtension->DriveMediaConstants.DataTransferRate); } if (ntStatus >= 0L) { - { ntStatus = FlRecalibrateDrive(DisketteExtension); } + { + ntStatus = FlRecalibrateDrive(DisketteExtension); + } } else { } } else { @@ -4502,7 +4590,8 @@ NTSTATUS FlRecalibrateDrive(PDISKETTE_EXTENSION DisketteExtension) { DisketteExtension->FifoBuffer, (void *)0, 0, 0); } if (!(ntStatus >= 0L)) { - {} + { + } } else { } if (ntStatus >= 0L) { @@ -4518,7 +4607,8 @@ NTSTATUS FlRecalibrateDrive(PDISKETTE_EXTENSION DisketteExtension) { DisketteExtension->FifoBuffer, (void *)0, 0, 0); } if (!(ntStatus >= 0L)) { - {} + { + } return (ntStatus); } else { } @@ -4607,7 +4697,8 @@ NTSTATUS FlDetermineMediaType(PDISKETTE_EXTENSION DisketteExtension) { } { ntStatus = FlDatarateSpecifyConfigure(DisketteExtension); } if (!(ntStatus >= 0L)) { - {} + { + } mediaTypesExhausted = 1; } else { { @@ -4716,7 +4807,8 @@ NTSTATUS FlDetermineMediaType(PDISKETTE_EXTENSION DisketteExtension) { } if (!irp) { {} { - /* ExFreePool(bootSector); */ /* INLINED */ + /* ExFreePool(bootSector); + */ /* INLINED */ } return (-1073741670L); } else { @@ -4729,14 +4821,17 @@ NTSTATUS FlDetermineMediaType(PDISKETTE_EXTENSION DisketteExtension) { ntStatus = FlReadWrite(DisketteExtension, irp, 1); } {} { - /* MmUnlockPages(irp->MdlAddress); */ /* INLINED */ - /* IoFreeMdl(irp->MdlAddress); */ /* INLINED */ + /* MmUnlockPages(irp->MdlAddress); + */ /* INLINED */ + /* IoFreeMdl(irp->MdlAddress); + */ /* INLINED */ /* IoFreeIrp(irp); */ /* INLINED */ /* ExFreePool(bootSector); */ /* INLINED */ } if (!(ntStatus >= 0L)) { - {} + { + } DisketteExtension->DriveMediaType = (DRIVE_MEDIA_TYPE)( (int)DisketteExtension->DriveMediaType - 1); @@ -4779,7 +4874,8 @@ NTSTATUS FlDetermineMediaType(PDISKETTE_EXTENSION DisketteExtension) { while_101_break: /* CIL Label */; } if (ntStatus >= 0L) { - {} + { + } goto while_99_break; } else { } @@ -4962,20 +5058,23 @@ void FloppyThread(PVOID Context) { } else { } { - /* ExAcquireFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ } if (disketteExtension->ThreadReferenceCount == 0L) { disketteExtension->ThreadReferenceCount = -1; if ((unsigned int)disketteExtension->FloppyThread != (unsigned int)((void *)0)) { { - /* ObfDereferenceObject(disketteExtension->FloppyThread); */ /* INLINED */ + /* ObfDereferenceObject(disketteExtension->FloppyThread); + */ /* INLINED */ disketteExtension->FloppyThread = (void *)0; } } else { } { - /* ExReleaseFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ } if ((int)((KUSER_SHARED_DATA *const)4292804608U) ->AlternativeArchitecture == 1) { @@ -5013,7 +5112,8 @@ void FloppyThread(PVOID Context) { } else { } { - /* ExReleaseFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ } goto __Cont; } else { @@ -5023,7 +5123,8 @@ void FloppyThread(PVOID Context) { while_117_continue: /* CIL Label */; { request = (void *)0; - /* ExfInterlockedRemoveHeadList(& disketteExtension->ListEntry, & disketteExtension->ListSpinLock); */ /* INLINED */ + /* ExfInterlockedRemoveHeadList(& disketteExtension->ListEntry, & + * disketteExtension->ListSpinLock); */ /* INLINED */ } if (request) { @@ -5031,16 +5132,19 @@ void FloppyThread(PVOID Context) { goto while_117_break; } { - /* ExAcquireFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ disketteExtension->ThreadReferenceCount -= 1L; - /* ExReleaseFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ disketteExtension->HardwareFailed = 0; irp = (IRP *)((CHAR *)request - (unsigned long)(&((IRP *)0) ->Tail.Overlay.__annonCompField17 .ListEntry)); - /* ExAcquireFastMutex(& disketteExtension->PowerDownMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& disketteExtension->PowerDownMutex); + */ /* INLINED */ } if ((int)disketteExtension->PoweringDown == 1) { { @@ -5117,10 +5221,13 @@ void FloppyThread(PVOID Context) { } else { } { - /* ExAcquireFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ disketteExtension->ThreadReferenceCount = -1; - /* ExReleaseFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ - /* ExAcquireFastMutex(PagingMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExAcquireFastMutex(PagingMutex); + */ /* INLINED */ PagingReferenceCount -= 1UL; } if (PagingReferenceCount == 0UL) { @@ -5131,7 +5238,8 @@ void FloppyThread(PVOID Context) { } else { } { - /* ExReleaseFastMutex(PagingMutex); */ /* INLINED */ + /* ExReleaseFastMutex(PagingMutex); + */ /* INLINED */ PsTerminateSystemThread(0L); } } else { @@ -5161,7 +5269,8 @@ void FloppyThread(PVOID Context) { } if ((disketteExtension->DeviceObject)->Flags & 2UL) { if (!((int)irpSp->Flags & 2)) { - {} + { + } ntStatus = -2147483626L; } else { { @@ -5193,7 +5302,8 @@ void FloppyThread(PVOID Context) { } if ((disketteExtension->DeviceObject)->Flags & 2UL) { if (!((int)irpSp->Flags & 2)) { - {} + { + } ntStatus = -2147483626L; } else { goto _L___2; @@ -5283,7 +5393,8 @@ void FloppyThread(PVOID Context) { disketteExtension->MediaType; if ((int)disketteExtension ->MediaType == 0) { - {} + { + } outputBuffer->Cylinders .__annonCompField1.LowPart = 0; @@ -5421,16 +5532,20 @@ void FloppyThread(PVOID Context) { irp->IoStatus.__annonCompField4.Status = -2147483631L; IofCompleteRequest(irp, 1); request = (void *)0; - /* ExfInterlockedRemoveHeadList(& disketteExtension->ListEntry, & disketteExtension->ListSpinLock); */ /* INLINED */ + /* ExfInterlockedRemoveHeadList(& + * disketteExtension->ListEntry, & + * disketteExtension->ListSpinLock); */ /* INLINED */ } if (!request) { goto while_134_break; } else { } { - /* ExAcquireFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ disketteExtension->ThreadReferenceCount -= 1L; - /* ExReleaseFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ irp = (IRP *)((CHAR *)request - (unsigned long)(&((IRP *)0) ->Tail.Overlay @@ -5443,7 +5558,9 @@ void FloppyThread(PVOID Context) { } else { irp->IoStatus.__annonCompField4.Status = ntStatus; if (disketteExtension->IoBuffer) { - { FlFreeIoBuffer(disketteExtension); } + { + FlFreeIoBuffer(disketteExtension); + } } else { } { FlFinishOperation(irp, disketteExtension); } @@ -5872,7 +5989,8 @@ NTSTATUS FlReadWriteTrack(PDISKETTE_EXTENSION DisketteExtension, PMDL IoMdl, } } if (!(status >= 0L)) { - {} + { + } recalibrateDrive = 1; goto __Cont; } else { @@ -5956,7 +6074,8 @@ NTSTATUS FlReadWriteTrack(PDISKETTE_EXTENSION DisketteExtension, PMDL IoMdl, } else { } if (ioRetry >= 2UL) { - {} + { + } goto while_149_break; } else { } @@ -5976,7 +6095,8 @@ NTSTATUS FlReadWriteTrack(PDISKETTE_EXTENSION DisketteExtension, PMDL IoMdl, } if (!(status >= 0L)) { if ((int)NumberOfSectors > 1) { - {} + { + } i = 0; { while (1) { @@ -5994,7 +6114,8 @@ NTSTATUS FlReadWriteTrack(PDISKETTE_EXTENSION DisketteExtension, PMDL IoMdl, (unsigned char)((int)Sector + (int)i), 1, 0); } if (!(status >= 0L)) { - {} + { + } DisketteExtension->HardwareFailed = 1; goto while_153_break; } else { @@ -6041,7 +6162,8 @@ NTSTATUS FlReadWrite(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, {} if ((int)irpSp->MajorFunction == 4) { if (DisketteExtension->IsReadOnly) { - {} + { + } return (-1073741811L); } else { } @@ -6059,17 +6181,21 @@ NTSTATUS FlReadWrite(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, } } if (!(status >= 0L)) { - {} + { + } return (status); } else { } if ((int)((KUSER_SHARED_DATA *const)4292804608U)->AlternativeArchitecture == 1) { - { FlHdbit(DisketteExtension); } + { + FlHdbit(DisketteExtension); + } } else { } if ((int)DisketteExtension->MediaType == 0) { - {} + { + } return (-1073741804L); } else { } @@ -6086,12 +6212,14 @@ NTSTATUS FlReadWrite(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, } else { { tmp___0 = (void *)0; - /* MmMapLockedPagesSpecifyCache(Irp->MdlAddress, 0, 1, (void *)0, 0, 32); */ /* INLINED */ + /* MmMapLockedPagesSpecifyCache(Irp->MdlAddress, 0, 1, (void *)0, 0, + * 32); */ /* INLINED */ userBuffer = tmp___0; } } if ((unsigned int)userBuffer == (unsigned int)((void *)0)) { - {} + { + } return (-1073741670L); } else { } @@ -6122,7 +6250,8 @@ NTSTATUS FlReadWrite(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, if (trackSize > DisketteExtension->MaxTransferSize) { {} { FlAllocateIoBuffer(DisketteExtension, trackSize); } if (!DisketteExtension->IoBuffer) { - {} + { + } return (-1073741670L); } else { } @@ -6301,11 +6430,15 @@ NTSTATUS FlFormat(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp) { {} if ((int)((KUSER_SHARED_DATA *const)4292804608U)->AlternativeArchitecture == 1) { - { FlHdbit(DisketteExtension); } + { + FlHdbit(DisketteExtension); + } } else { } if ((int)DisketteExtension->LastDriveMediaType != (int)driveMediaType) { - { ntStatus = FlDatarateSpecifyConfigure(DisketteExtension); } + { + ntStatus = FlDatarateSpecifyConfigure(DisketteExtension); + } if (!(ntStatus >= 0L)) { return (ntStatus); } else { @@ -6366,7 +6499,8 @@ NTSTATUS FlFormat(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp) { } else { } if (!(ntStatus >= 0L)) { - {} + { + } return (ntStatus); } else { } @@ -6423,7 +6557,8 @@ NTSTATUS FlFormat(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp) { 0, length); } if (!(ntStatus >= 0L)) { - {} + { + } } else { } if (ntStatus >= 0L) { @@ -6473,7 +6608,8 @@ NTSTATUS FlFormat(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp) { DisketteExtension->FifoBuffer, (void *)0, 0, 0); } if (!(ntStatus >= 0L)) { - {} + { + } return (ntStatus); } else { } @@ -6684,7 +6820,8 @@ NTSTATUS FlFdcDeviceIo(PDEVICE_OBJECT DeviceObject, ULONG Ioctl, PVOID Data) { (void *)0, 0, 1, &doneEvent, &ioStatus); } if ((unsigned int)irp == (unsigned int)((void *)0)) { - {} + { + } return (-1073741670L); } else { } @@ -6862,7 +6999,9 @@ NTSTATUS FlHdbit(PDISKETTE_EXTENSION DisketteExtension) { } else { } if (setHdBitParameter.ChangedHdBit) { - { ntStatus = FlDatarateSpecifyConfigure(DisketteExtension); } + { + ntStatus = FlDatarateSpecifyConfigure(DisketteExtension); + } } else { } return (ntStatus); @@ -6900,7 +7039,8 @@ NTSTATUS FloppyQueueRequest(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp) { Irp->IoStatus.__annonCompField4.Status = -1073741536L; myStatus = -1073741536L; Irp->IoStatus.Information = 0; - /* KfReleaseSpinLock(& DisketteExtension->FlCancelSpinLock, oldIrql); */ /* INLINED */ + /* KfReleaseSpinLock(& DisketteExtension->FlCancelSpinLock, + * oldIrql); */ /* INLINED */ IofCompleteRequest(Irp, 0); /* ExAcquireFastMutex(PagingMutex); */ /* INLINED */ PagingReferenceCount -= 1UL; @@ -6937,7 +7077,8 @@ NTSTATUS FloppyQueueRequest(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp) { &DisketteExtension->NewRequestQueue, &Irp->Tail.Overlay.__annonCompField17.ListEntry, &DisketteExtension->NewRequestQueueSpinLock); - /* KfReleaseSpinLock(& DisketteExtension->FlCancelSpinLock, oldIrql); */ /* INLINED */ + /* KfReleaseSpinLock(& DisketteExtension->FlCancelSpinLock, + * oldIrql); */ /* INLINED */ ntStatus = 259L; } } @@ -7024,7 +7165,8 @@ void FloppyProcessQueuedRequests(PDISKETTE_EXTENSION DisketteExtension) { currentIrp = (void *)0; } { - /* KfReleaseSpinLock(& DisketteExtension->FlCancelSpinLock, oldIrql); */ /* INLINED */ + /* KfReleaseSpinLock(& DisketteExtension->FlCancelSpinLock, + * oldIrql); */ /* INLINED */ } if (currentIrp) { if (DisketteExtension->IsRemoved) { @@ -7233,7 +7375,9 @@ int main(void) { } } if (we_should_unload) { - { FloppyUnload(&d); } + { + FloppyUnload(&d); + } } else { } } else { @@ -7263,7 +7407,9 @@ int main(void) { if (s != SKIP2) { if (s != IPC) { if (s != DC) { - { errorFn(); } + { + errorFn(); + } } else { goto _L___0; } @@ -7279,10 +7425,14 @@ int main(void) { } } else { if (s == DC) { - { errorFn(); } + { + errorFn(); + } } else { if (status != (NTSTATUS)lowerDriverReturn) { - { errorFn(); } + { + errorFn(); + } } else { } } @@ -7720,7 +7870,9 @@ NTSTATUS IofCallDriver(PDEVICE_OBJECT DeviceObject, PIRP Irp) { compRetStatus1 = tmp; } if ((long)compRetStatus1 == -1073741802L) { - { stubMoreProcessingRequired(); } + { + stubMoreProcessingRequired(); + } } else { } } else { @@ -7874,7 +8026,9 @@ NTSTATUS KeWaitForSingleObject(PVOID Object, KWAIT_REASON WaitReason, customIrp = 0; } else { if (s == MPR3) { - { errorFn(); } + { + errorFn(); + } } else { } } @@ -8009,7 +8163,9 @@ NTSTATUS PoCallDriver(PDEVICE_OBJECT DeviceObject, PIRP Irp) { compRetStatus = tmp; } if ((long)compRetStatus == -1073741802L) { - { stubMoreProcessingRequired(); } + { + stubMoreProcessingRequired(); + } } else { } } else { diff --git a/test/ntdrivers/floppy_true.i.cil.c b/test/ntdrivers/floppy_true.i.cil.c index deb7c036b..d548c4135 100644 --- a/test/ntdrivers/floppy_true.i.cil.c +++ b/test/ntdrivers/floppy_true.i.cil.c @@ -2261,7 +2261,8 @@ NTSTATUS FloppyAddDevice(PDRIVER_OBJECT DriverObject, { disketteExtension->DeviceName.Length = 0; disketteExtension->DeviceName.MaximumLength = deviceName.Length; - /* RtlCopyUnicodeString(& disketteExtension->DeviceName, & deviceName); */ /* INLINED */ + /* RtlCopyUnicodeString(& disketteExtension->DeviceName, & + * deviceName); */ /* INLINED */ tmp___1 = IoGetConfigurationInformation(); tmp___1->FloppyCount += 1UL; sprintf(arcNameBuffer, "%s(%d)disk(%d)fdisk(%d)", "\\ArcName\\multi", @@ -2273,7 +2274,9 @@ NTSTATUS FloppyAddDevice(PDRIVER_OBJECT DriverObject, &arcNameString, 1); } if (ntStatus >= 0L) { - { IoCreateSymbolicLink(&disketteExtension->ArcName, &deviceName); } + { + IoCreateSymbolicLink(&disketteExtension->ArcName, &deviceName); + } } else { } deviceObject->Flags |= 8208UL; @@ -2289,17 +2292,21 @@ NTSTATUS FloppyAddDevice(PDRIVER_OBJECT DriverObject, IoAttachDeviceToDeviceStack(deviceObject, PhysicalDeviceObject); } {} { - /* KeInitializeSemaphore(& disketteExtension->RequestSemaphore, 0L, 2147483647); */ /* INLINED */ + /* KeInitializeSemaphore(& disketteExtension->RequestSemaphore, + * 0L, 2147483647); */ /* INLINED */ disketteExtension->PowerDownMutex.Count = 1; disketteExtension->PowerDownMutex.Contention = 0; - /* KeInitializeEvent(& disketteExtension->PowerDownMutex.Event, 1, 0); */ /* INLINED */ + /* KeInitializeEvent(& disketteExtension->PowerDownMutex.Event, + * 1, 0); */ /* INLINED */ /* KeInitializeSpinLock(& disketteExtension->ListSpinLock); */ /* INLINED */ disketteExtension->ThreadReferenceMutex.Count = 1; disketteExtension->ThreadReferenceMutex.Contention = 0; - /* KeInitializeEvent(& disketteExtension->ThreadReferenceMutex.Event, 1, 0); */ /* INLINED */ + /* KeInitializeEvent(& + * disketteExtension->ThreadReferenceMutex.Event, 1, 0); */ /* INLINED */ disketteExtension->HoldNewReqMutex.Count = 1; disketteExtension->HoldNewReqMutex.Contention = 0; - /* KeInitializeEvent(& disketteExtension->HoldNewReqMutex.Event, 1, 0); */ /* INLINED */ + /* KeInitializeEvent(& disketteExtension->HoldNewReqMutex.Event, + * 1, 0); */ /* INLINED */ disketteExtension->ListEntry.Blink = &disketteExtension->ListEntry; disketteExtension->ListEntry.Flink = disketteExtension->ListEntry.Blink; @@ -2311,8 +2318,10 @@ NTSTATUS FloppyAddDevice(PDRIVER_OBJECT DriverObject, &disketteExtension->NewRequestQueue; disketteExtension->NewRequestQueue.Flink = disketteExtension->NewRequestQueue.Blink; - /* KeInitializeSpinLock(& disketteExtension->NewRequestQueueSpinLock); */ /* INLINED */ - /* KeInitializeSpinLock(& disketteExtension->FlCancelSpinLock); */ /* INLINED */ + /* KeInitializeSpinLock(& + * disketteExtension->NewRequestQueueSpinLock); */ /* INLINED */ + /* KeInitializeSpinLock(& disketteExtension->FlCancelSpinLock); + */ /* INLINED */ disketteExtension->FloppyControllerAllocated = 0; disketteExtension->ReleaseFdcWithMotorRunning = 0; disketteExtension->DeviceObject = deviceObject; @@ -2647,7 +2656,8 @@ NTSTATUS FlQueueIrpToThread(PIRP Irp, PDISKETTE_EXTENSION DisketteExtension) { } { /* ExReleaseFastMutex(PagingMutex); */ /* INLINED */ - /* ExReleaseFastMutex(& DisketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * DisketteExtension->ThreadReferenceMutex); */ /* INLINED */ } return (status); } else { @@ -2901,7 +2911,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { if (irpSp->Parameters.DeviceIoControl .InputBufferLength < (ULONG)sizeof(FORMAT_PARAMETERS)) { - {} + { + } ntStatus = -1073741811L; goto switch_16_break; } else { @@ -2987,7 +2998,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { .OutputBufferLength; if (outputBufferLength < (ULONG)sizeof(DISK_GEOMETRY)) { - {} + { + } ntStatus = -1073741789L; goto switch_16_break; } else { @@ -3001,7 +3013,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { (int) lowestDriveMediaType) + 1))) { - {} + { + } ntStatus = -2147483643L; highestDriveMediaType = (enum _DRIVE_MEDIA_TYPE)( @@ -3055,7 +3068,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { switch_16_exp_10: /* CIL Label */; if ((int)((KUSER_SHARED_DATA *const)4292804608U) ->AlternativeArchitecture == 1) { - {} + { + } if (!(DeviceObject->Characteristics & 1UL)) { ntStatus = -1073741275L; goto switch_16_break; @@ -3107,7 +3121,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } if (!(ntStatus >= 0L)) { { - /* ExFreePool(valueName); */ /* INLINED */ + /* ExFreePool(valueName); + */ /* INLINED */ } goto switch_16_break; } else { @@ -3115,7 +3130,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { if ((int)driveLetterName.Length != 4) { { ntStatus = -1073741275L; - /* ExFreePool(valueName); */ /* INLINED */ + /* ExFreePool(valueName); + */ /* INLINED */ } goto switch_16_break; } else { @@ -3123,7 +3139,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { 65) { { ntStatus = -1073741275L; - /* ExFreePool(valueName); */ /* INLINED */ + /* ExFreePool(valueName); + */ /* INLINED */ } goto switch_16_break; } else { @@ -3131,7 +3148,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { 90) { { ntStatus = -1073741275L; - /* ExFreePool(valueName); */ /* INLINED */ + /* ExFreePool(valueName); + */ /* INLINED */ } goto switch_16_break; } else { @@ -3139,7 +3157,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { 1) != 58) { { ntStatus = -1073741275L; - /* ExFreePool(valueName); */ /* INLINED */ + /* ExFreePool(valueName); + */ /* INLINED */ } goto switch_16_break; } else { @@ -3164,7 +3183,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { Irp->IoStatus.Information = sizeof(MOUNTDEV_SUGGESTED_LINK_NAME); ntStatus = -2147483643L; - /* ExFreePool(valueName); */ /* INLINED */ + /* ExFreePool(valueName); + */ /* INLINED */ } goto switch_16_break; } else { @@ -3178,7 +3198,8 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { "\000s\000t\000e\000m\000\\\000D\000" "I\000S\000K\000", valueName); - /* ExFreePool(valueName); */ /* INLINED */ + /* ExFreePool(valueName); + */ /* INLINED */ memcpy(suggestedName->Name, "\\\000D\000o\000s\000D\000e\000v" "\000i\000c\000e\000s\000\\\000", @@ -3193,11 +3214,13 @@ NTSTATUS FloppyDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { switch_16_exp_11: /* CIL Label */; if ((int)((KUSER_SHARED_DATA *const)4292804608U) ->AlternativeArchitecture == 1) { - {} + { + } if (irpSp->Parameters.DeviceIoControl .OutputBufferLength < (ULONG)sizeof(SENSE_DEVISE_STATUS_PTOS)) { - {} + { + } ntStatus = -1073741811L; goto switch_16_break; } else { @@ -3358,7 +3381,8 @@ NTSTATUS FloppyPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { switch_32_5: /* CIL Label */; switch_32_1: /* CIL Label */; if ((int)irpSp->MinorFunction == 5) { - {} + { + } } else { {} } @@ -3380,9 +3404,11 @@ NTSTATUS FloppyPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } else { } { - /* ExAcquireFastMutex(& disketteExtension->HoldNewReqMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * disketteExtension->HoldNewReqMutex); */ /* INLINED */ disketteExtension->HoldNewRequests = 1; - /* ExReleaseFastMutex(& disketteExtension->HoldNewReqMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->HoldNewReqMutex); */ /* INLINED */ ntStatus = FlQueueIrpToThread(Irp, disketteExtension); } if (ntStatus == 259L) { @@ -3393,7 +3419,8 @@ NTSTATUS FloppyPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { if ((unsigned int)disketteExtension->FloppyThread != (unsigned int)((void *)0)) { { - /* ObfDereferenceObject(disketteExtension->FloppyThread); */ /* INLINED */ + /* ObfDereferenceObject(disketteExtension->FloppyThread); + */ /* INLINED */ } } else { } @@ -3426,7 +3453,8 @@ NTSTATUS FloppyPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { switch_32_6: /* CIL Label */; switch_32_3: /* CIL Label */; if ((int)irpSp->MinorFunction == 6) { - {} + { + } } else { {} } @@ -3461,13 +3489,18 @@ NTSTATUS FloppyPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { (long)(&((IO_STACK_LOCATION *)0) ->CompletionRoutine)); nextIrpSp->Control = 0; - /* KeInitializeEvent(& doneEvent, 1, 0); */ /* INLINED */ + /* KeInitializeEvent(& doneEvent, + * 1, 0); */ /* INLINED */ } if (s != NP) { - { errorFn(); } + { + errorFn(); + } } else { if (compRegistered != 0) { - { errorFn(); } + { + errorFn(); + } } else { compRegistered = 1; compFptr = &FloppyPnpComplete; @@ -3496,9 +3529,11 @@ NTSTATUS FloppyPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } else { } { - /* ExAcquireFastMutex(& disketteExtension->HoldNewReqMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * disketteExtension->HoldNewReqMutex); */ /* INLINED */ disketteExtension->HoldNewRequests = 0; - /* ExReleaseFastMutex(& disketteExtension->HoldNewReqMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->HoldNewReqMutex); */ /* INLINED */ FloppyProcessQueuedRequests(disketteExtension); Irp->IoStatus.__annonCompField4.Status = ntStatus; myStatus = ntStatus; @@ -3528,9 +3563,11 @@ NTSTATUS FloppyPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { goto switch_32_break; switch_32_2: /* CIL Label */; {} { - /* ExAcquireFastMutex(& disketteExtension->HoldNewReqMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * disketteExtension->HoldNewReqMutex); */ /* INLINED */ disketteExtension->HoldNewRequests = 0; - /* ExReleaseFastMutex(& disketteExtension->HoldNewReqMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->HoldNewReqMutex); */ /* INLINED */ disketteExtension->IsStarted = 0; disketteExtension->IsRemoved = 1; FloppyProcessQueuedRequests(disketteExtension); @@ -3555,25 +3592,32 @@ NTSTATUS FloppyPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { { IoSetDeviceInterfaceState( &disketteExtension->InterfaceString, 0); - /* RtlFreeUnicodeString(& disketteExtension->InterfaceString); */ /* INLINED */ - /* RtlInitUnicodeString(& disketteExtension->InterfaceString, (void *)0); */ /* INLINED */ + /* RtlFreeUnicodeString(& + * disketteExtension->InterfaceString); */ /* INLINED */ + /* RtlInitUnicodeString(& + * disketteExtension->InterfaceString, (void *)0); */ /* INLINED */ } } else { } { - /* RtlFreeUnicodeString(& disketteExtension->DeviceName); */ /* INLINED */ - /* RtlInitUnicodeString(& disketteExtension->DeviceName, (void *)0); */ /* INLINED */ + /* RtlFreeUnicodeString(& + * disketteExtension->DeviceName); */ /* INLINED */ + /* RtlInitUnicodeString(& + * disketteExtension->DeviceName, (void *)0); */ /* INLINED */ } if ((int)disketteExtension->ArcName.Length != 0) { { IoDeleteSymbolicLink(&disketteExtension->ArcName); - /* RtlFreeUnicodeString(& disketteExtension->ArcName); */ /* INLINED */ - /* RtlInitUnicodeString(& disketteExtension->ArcName, (void *)0); */ /* INLINED */ + /* RtlFreeUnicodeString(& + * disketteExtension->ArcName); */ /* INLINED */ + /* RtlInitUnicodeString(& + * disketteExtension->ArcName, (void *)0); */ /* INLINED */ } } else { } { - /* IoDetachDevice(disketteExtension->TargetObject); */ /* INLINED */ + /* IoDetachDevice(disketteExtension->TargetObject); + */ /* INLINED */ /* IoDeleteDevice(DeviceObject); */ /* INLINED */ tmp = IoGetConfigurationInformation(); tmp->FloppyCount -= 1UL; @@ -3651,10 +3695,14 @@ NTSTATUS FloppyStartDevice(PDEVICE_OBJECT DeviceObject, PIRP Irp) { nextIrpSp->Control = 0; } if (s != NP) { - { errorFn(); } + { + errorFn(); + } } else { if (compRegistered != 0) { - { errorFn(); } + { + errorFn(); + } } else { compRegistered = 1; compFptr = &FloppyPnpComplete; @@ -3689,7 +3737,9 @@ NTSTATUS FloppyStartDevice(PDEVICE_OBJECT DeviceObject, PIRP Irp) { disketteExtension->MaxTransferSize = fdcInfo.MaxTransferSize; if (fdcInfo.AcpiBios) { if (fdcInfo.AcpiFdiSupported) { - { ntStatus = FlAcpiConfigureFloppy(disketteExtension, &fdcInfo); } + { + ntStatus = FlAcpiConfigureFloppy(disketteExtension, &fdcInfo); + } if ((int)disketteExtension->DriveType == 4) { disketteExtension->PerpendicularMode = (int)disketteExtension->PerpendicularMode | @@ -3724,7 +3774,8 @@ NTSTATUS FloppyStartDevice(PDEVICE_OBJECT DeviceObject, PIRP Irp) { &FlConfigCallBack, disketteExtension); } if (ntStatus >= 0L) { - {} + { + } goto while_43_break; } else { } @@ -3822,7 +3873,8 @@ NTSTATUS FloppyPower(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } else { } { - /* ExAcquireFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ } if (disketteExtension->ThreadReferenceCount >= 0L) { { @@ -3838,17 +3890,20 @@ NTSTATUS FloppyPower(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } else { } { - /* ExReleaseFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ ntStatus = 0L; } goto switch_46_break; switch_46_2: /* CIL Label */; if ((int)type == 0) { { - /* ExAcquireFastMutex(& disketteExtension->PowerDownMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * disketteExtension->PowerDownMutex); */ /* INLINED */ } if ((int)state.SystemState == 1) { - {} + { + } disketteExtension->PoweringDown = 0; WaitForCompletion = 0; } else { @@ -3857,7 +3912,8 @@ NTSTATUS FloppyPower(PDEVICE_OBJECT DeviceObject, PIRP Irp) { disketteExtension->PoweringDown = 1; } { - /* ExReleaseFastMutex(& disketteExtension->PowerDownMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->PowerDownMutex); */ /* INLINED */ } if ((unsigned int)disketteExtension->FloppyThread != (unsigned int)((void *)0)) { @@ -3996,7 +4052,8 @@ NTSTATUS FlInterpretError(UCHAR StatusRegister1, UCHAR StatusRegister2) { } } if ((int)StatusRegister1 & 16) { - {} + { + } return (-1073741764L); } else { } @@ -4025,17 +4082,20 @@ NTSTATUS FlInterpretError(UCHAR StatusRegister1, UCHAR StatusRegister2) { } } if ((int)StatusRegister1 & 2) { - {} + { + } return (-1073741662L); } else { } if ((int)StatusRegister1 & 1) { - {} + { + } return (-1073741467L); } else { } if ((int)StatusRegister2 & 16) { - {} + { + } return (-1073741466L); } else { } @@ -4054,14 +4114,19 @@ void FlFinishOperation(PIRP Irp, PDISKETTE_EXTENSION DisketteExtension) { DisketteExtension->HardwareFailCount = (UCHAR)((int)DisketteExtension->HardwareFailCount + 1); if ((int)DisketteExtension->HardwareFailCount < 2) { - { ntStatus = FlInitializeControllerHardware(DisketteExtension); } + { + ntStatus = FlInitializeControllerHardware(DisketteExtension); + } if (ntStatus >= 0L) { - {} + { + } DisketteExtension->MediaType = -1; {} { - /* ExAcquireFastMutex(& DisketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * DisketteExtension->ThreadReferenceMutex); */ /* INLINED */ DisketteExtension->ThreadReferenceCount += 1L; - /* ExReleaseFastMutex(& DisketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * DisketteExtension->ThreadReferenceMutex); */ /* INLINED */ ExfInterlockedInsertHeadList( &DisketteExtension->ListEntry, &Irp->Tail.Overlay.__annonCompField17.ListEntry, @@ -4110,7 +4175,8 @@ void FlFinishOperation(PIRP Irp, PDISKETTE_EXTENSION DisketteExtension) { } if ((unsigned char)tmp) { { - /* IoSetHardErrorOrVerifyDevice(Irp, DisketteExtension->DeviceObject); */ /* INLINED */ + /* IoSetHardErrorOrVerifyDevice(Irp, + * DisketteExtension->DeviceObject); */ /* INLINED */ } } else { } @@ -4119,7 +4185,8 @@ void FlFinishOperation(PIRP Irp, PDISKETTE_EXTENSION DisketteExtension) { if (myStatus != 0L) { if (myStatus != -2147483626L) { if (myStatus != -1073741805L) { - {} + { + } } else { goto _L___0; } @@ -4201,7 +4268,8 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, if ((int)((DisketteExtension->DeviceObject)->Vpb)->Flags & 1) { if (Irp) { { - /* IoSetHardErrorOrVerifyDevice(Irp, DisketteExtension->DeviceObject); */ /* INLINED */ + /* IoSetHardErrorOrVerifyDevice(Irp, + * DisketteExtension->DeviceObject); */ /* INLINED */ } } else { } @@ -4220,7 +4288,8 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, DisketteExtension->FifoBuffer, (void *)0, 0, 0); } if (!(ntStatus >= 0L)) { - {} + { + } return (ntStatus); } else { } @@ -4230,7 +4299,8 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, driveStatus = 128; } if ((int)driveStatus & 128) { - {} + { + } if ((int)((DisketteExtension->DeviceObject)->Vpb)->Flags & 1) { (DisketteExtension->DeviceObject)->Flags &= 4294967293UL; } else { @@ -4249,7 +4319,8 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, DisketteExtension->FifoBuffer, (void *)0, 0, 0); } if (!(ntStatus >= 0L)) { - {} + { + } return (ntStatus); } else { if (!((int)DisketteExtension->FifoBuffer[0] & 32)) { @@ -4279,7 +4350,8 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, KeDelayExecutionThread(0, 0, &delay); } if (!(ntStatus >= 0L)) { - {} + { + } return (ntStatus); } else { if (!((int)DisketteExtension->FifoBuffer[0] & 32)) { @@ -4305,7 +4377,8 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, DisketteExtension->FifoBuffer, (void *)0, 0, 0); } if (!(ntStatus >= 0L)) { - {} + { + } return (ntStatus); } else { } @@ -4327,7 +4400,8 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, } } if ((int)driveStatus & 128) { - {} + { + } if ((int)((DisketteExtension->DeviceObject)->Vpb)->Flags & 1) { (DisketteExtension->DeviceObject)->Flags &= 4294967293UL; } else { @@ -4339,7 +4413,8 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, } if ((int)IgnoreChange == 0) { if ((int)((DisketteExtension->DeviceObject)->Vpb)->Flags & 1) { - {} + { + } return (-2147483626L); } else { return (-1073741435L); @@ -4353,24 +4428,32 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, _L___2: /* CIL Label */ if ((int)((KUSER_SHARED_DATA *const)4292804608U) ->AlternativeArchitecture == 1) { - { FlHdbit(DisketteExtension); } + { + FlHdbit(DisketteExtension); + } } else { } } } if (SetUpMedia) { if ((int)DisketteExtension->MediaType == -1) { - { ntStatus = FlDetermineMediaType(DisketteExtension); } + { + ntStatus = FlDetermineMediaType(DisketteExtension); + } } else { if ((int)DisketteExtension->MediaType == 0) { - {} + { + } return (-1073741804L); } else { if ((int)DisketteExtension->DriveMediaType != (int)DisketteExtension->LastDriveMediaType) { - { ntStatus = FlDatarateSpecifyConfigure(DisketteExtension); } + { + ntStatus = FlDatarateSpecifyConfigure(DisketteExtension); + } if (!(ntStatus >= 0L)) { - {} + { + } } else { } } else { @@ -4389,21 +4472,24 @@ NTSTATUS FlStartDrive(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, DisketteExtension->FifoBuffer, (void *)0, 0, 0); } if (!(ntStatus >= 0L)) { - {} + { + } return (ntStatus); } else { } if ((int)((KUSER_SHARED_DATA *const)4292804608U) ->AlternativeArchitecture == 1) { if (!((int)DisketteExtension->FifoBuffer[0] & 32)) { - {} + { + } return (-1073741805L); } else { } } else { } if ((int)DisketteExtension->FifoBuffer[0] & 64) { - {} + { + } return (-1073741662L); } else { } @@ -4465,7 +4551,9 @@ NTSTATUS FlDatarateSpecifyConfigure(PDISKETTE_EXTENSION DisketteExtension) { &DisketteExtension->DriveMediaConstants.DataTransferRate); } if (ntStatus >= 0L) { - { ntStatus = FlRecalibrateDrive(DisketteExtension); } + { + ntStatus = FlRecalibrateDrive(DisketteExtension); + } } else { } } else { @@ -4502,7 +4590,8 @@ NTSTATUS FlRecalibrateDrive(PDISKETTE_EXTENSION DisketteExtension) { DisketteExtension->FifoBuffer, (void *)0, 0, 0); } if (!(ntStatus >= 0L)) { - {} + { + } } else { } if (ntStatus >= 0L) { @@ -4518,7 +4607,8 @@ NTSTATUS FlRecalibrateDrive(PDISKETTE_EXTENSION DisketteExtension) { DisketteExtension->FifoBuffer, (void *)0, 0, 0); } if (!(ntStatus >= 0L)) { - {} + { + } return (ntStatus); } else { } @@ -4607,7 +4697,8 @@ NTSTATUS FlDetermineMediaType(PDISKETTE_EXTENSION DisketteExtension) { } { ntStatus = FlDatarateSpecifyConfigure(DisketteExtension); } if (!(ntStatus >= 0L)) { - {} + { + } mediaTypesExhausted = 1; } else { { @@ -4716,7 +4807,8 @@ NTSTATUS FlDetermineMediaType(PDISKETTE_EXTENSION DisketteExtension) { } if (!irp) { {} { - /* ExFreePool(bootSector); */ /* INLINED */ + /* ExFreePool(bootSector); + */ /* INLINED */ } return (-1073741670L); } else { @@ -4729,14 +4821,17 @@ NTSTATUS FlDetermineMediaType(PDISKETTE_EXTENSION DisketteExtension) { ntStatus = FlReadWrite(DisketteExtension, irp, 1); } {} { - /* MmUnlockPages(irp->MdlAddress); */ /* INLINED */ - /* IoFreeMdl(irp->MdlAddress); */ /* INLINED */ + /* MmUnlockPages(irp->MdlAddress); + */ /* INLINED */ + /* IoFreeMdl(irp->MdlAddress); + */ /* INLINED */ /* IoFreeIrp(irp); */ /* INLINED */ /* ExFreePool(bootSector); */ /* INLINED */ } if (!(ntStatus >= 0L)) { - {} + { + } DisketteExtension->DriveMediaType = (DRIVE_MEDIA_TYPE)( (int)DisketteExtension->DriveMediaType - 1); @@ -4779,7 +4874,8 @@ NTSTATUS FlDetermineMediaType(PDISKETTE_EXTENSION DisketteExtension) { while_101_break: /* CIL Label */; } if (ntStatus >= 0L) { - {} + { + } goto while_99_break; } else { } @@ -4962,20 +5058,23 @@ void FloppyThread(PVOID Context) { } else { } { - /* ExAcquireFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ } if (disketteExtension->ThreadReferenceCount == 0L) { disketteExtension->ThreadReferenceCount = -1; if ((unsigned int)disketteExtension->FloppyThread != (unsigned int)((void *)0)) { { - /* ObfDereferenceObject(disketteExtension->FloppyThread); */ /* INLINED */ + /* ObfDereferenceObject(disketteExtension->FloppyThread); + */ /* INLINED */ disketteExtension->FloppyThread = (void *)0; } } else { } { - /* ExReleaseFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ } if ((int)((KUSER_SHARED_DATA *const)4292804608U) ->AlternativeArchitecture == 1) { @@ -5013,7 +5112,8 @@ void FloppyThread(PVOID Context) { } else { } { - /* ExReleaseFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ } goto __Cont; } else { @@ -5023,7 +5123,8 @@ void FloppyThread(PVOID Context) { while_117_continue: /* CIL Label */; { request = (void *)0; - /* ExfInterlockedRemoveHeadList(& disketteExtension->ListEntry, & disketteExtension->ListSpinLock); */ /* INLINED */ + /* ExfInterlockedRemoveHeadList(& disketteExtension->ListEntry, & + * disketteExtension->ListSpinLock); */ /* INLINED */ } if (request) { @@ -5031,16 +5132,19 @@ void FloppyThread(PVOID Context) { goto while_117_break; } { - /* ExAcquireFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ disketteExtension->ThreadReferenceCount -= 1L; - /* ExReleaseFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ disketteExtension->HardwareFailed = 0; irp = (IRP *)((CHAR *)request - (unsigned long)(&((IRP *)0) ->Tail.Overlay.__annonCompField17 .ListEntry)); - /* ExAcquireFastMutex(& disketteExtension->PowerDownMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& disketteExtension->PowerDownMutex); + */ /* INLINED */ } if ((int)disketteExtension->PoweringDown == 1) { { @@ -5117,10 +5221,13 @@ void FloppyThread(PVOID Context) { } else { } { - /* ExAcquireFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ disketteExtension->ThreadReferenceCount = -1; - /* ExReleaseFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ - /* ExAcquireFastMutex(PagingMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExAcquireFastMutex(PagingMutex); + */ /* INLINED */ PagingReferenceCount -= 1UL; } if (PagingReferenceCount == 0UL) { @@ -5131,7 +5238,8 @@ void FloppyThread(PVOID Context) { } else { } { - /* ExReleaseFastMutex(PagingMutex); */ /* INLINED */ + /* ExReleaseFastMutex(PagingMutex); + */ /* INLINED */ PsTerminateSystemThread(0L); } } else { @@ -5161,7 +5269,8 @@ void FloppyThread(PVOID Context) { } if ((disketteExtension->DeviceObject)->Flags & 2UL) { if (!((int)irpSp->Flags & 2)) { - {} + { + } ntStatus = -2147483626L; } else { { @@ -5193,7 +5302,8 @@ void FloppyThread(PVOID Context) { } if ((disketteExtension->DeviceObject)->Flags & 2UL) { if (!((int)irpSp->Flags & 2)) { - {} + { + } ntStatus = -2147483626L; } else { goto _L___2; @@ -5283,7 +5393,8 @@ void FloppyThread(PVOID Context) { disketteExtension->MediaType; if ((int)disketteExtension ->MediaType == 0) { - {} + { + } outputBuffer->Cylinders .__annonCompField1.LowPart = 0; @@ -5421,16 +5532,20 @@ void FloppyThread(PVOID Context) { irp->IoStatus.__annonCompField4.Status = -2147483631L; IofCompleteRequest(irp, 1); request = (void *)0; - /* ExfInterlockedRemoveHeadList(& disketteExtension->ListEntry, & disketteExtension->ListSpinLock); */ /* INLINED */ + /* ExfInterlockedRemoveHeadList(& + * disketteExtension->ListEntry, & + * disketteExtension->ListSpinLock); */ /* INLINED */ } if (!request) { goto while_134_break; } else { } { - /* ExAcquireFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExAcquireFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ disketteExtension->ThreadReferenceCount -= 1L; - /* ExReleaseFastMutex(& disketteExtension->ThreadReferenceMutex); */ /* INLINED */ + /* ExReleaseFastMutex(& + * disketteExtension->ThreadReferenceMutex); */ /* INLINED */ irp = (IRP *)((CHAR *)request - (unsigned long)(&((IRP *)0) ->Tail.Overlay @@ -5443,7 +5558,9 @@ void FloppyThread(PVOID Context) { } else { irp->IoStatus.__annonCompField4.Status = ntStatus; if (disketteExtension->IoBuffer) { - { FlFreeIoBuffer(disketteExtension); } + { + FlFreeIoBuffer(disketteExtension); + } } else { } { FlFinishOperation(irp, disketteExtension); } @@ -5872,7 +5989,8 @@ NTSTATUS FlReadWriteTrack(PDISKETTE_EXTENSION DisketteExtension, PMDL IoMdl, } } if (!(status >= 0L)) { - {} + { + } recalibrateDrive = 1; goto __Cont; } else { @@ -5956,7 +6074,8 @@ NTSTATUS FlReadWriteTrack(PDISKETTE_EXTENSION DisketteExtension, PMDL IoMdl, } else { } if (ioRetry >= 2UL) { - {} + { + } goto while_149_break; } else { } @@ -5976,7 +6095,8 @@ NTSTATUS FlReadWriteTrack(PDISKETTE_EXTENSION DisketteExtension, PMDL IoMdl, } if (!(status >= 0L)) { if ((int)NumberOfSectors > 1) { - {} + { + } i = 0; { while (1) { @@ -5994,7 +6114,8 @@ NTSTATUS FlReadWriteTrack(PDISKETTE_EXTENSION DisketteExtension, PMDL IoMdl, (unsigned char)((int)Sector + (int)i), 1, 0); } if (!(status >= 0L)) { - {} + { + } DisketteExtension->HardwareFailed = 1; goto while_153_break; } else { @@ -6041,7 +6162,8 @@ NTSTATUS FlReadWrite(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, {} if ((int)irpSp->MajorFunction == 4) { if (DisketteExtension->IsReadOnly) { - {} + { + } return (-1073741811L); } else { } @@ -6059,17 +6181,21 @@ NTSTATUS FlReadWrite(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, } } if (!(status >= 0L)) { - {} + { + } return (status); } else { } if ((int)((KUSER_SHARED_DATA *const)4292804608U)->AlternativeArchitecture == 1) { - { FlHdbit(DisketteExtension); } + { + FlHdbit(DisketteExtension); + } } else { } if ((int)DisketteExtension->MediaType == 0) { - {} + { + } return (-1073741804L); } else { } @@ -6086,12 +6212,14 @@ NTSTATUS FlReadWrite(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, } else { { tmp___0 = (void *)0; - /* MmMapLockedPagesSpecifyCache(Irp->MdlAddress, 0, 1, (void *)0, 0, 32); */ /* INLINED */ + /* MmMapLockedPagesSpecifyCache(Irp->MdlAddress, 0, 1, (void *)0, 0, + * 32); */ /* INLINED */ userBuffer = tmp___0; } } if ((unsigned int)userBuffer == (unsigned int)((void *)0)) { - {} + { + } return (-1073741670L); } else { } @@ -6122,7 +6250,8 @@ NTSTATUS FlReadWrite(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp, if (trackSize > DisketteExtension->MaxTransferSize) { {} { FlAllocateIoBuffer(DisketteExtension, trackSize); } if (!DisketteExtension->IoBuffer) { - {} + { + } return (-1073741670L); } else { } @@ -6301,11 +6430,15 @@ NTSTATUS FlFormat(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp) { {} if ((int)((KUSER_SHARED_DATA *const)4292804608U)->AlternativeArchitecture == 1) { - { FlHdbit(DisketteExtension); } + { + FlHdbit(DisketteExtension); + } } else { } if ((int)DisketteExtension->LastDriveMediaType != (int)driveMediaType) { - { ntStatus = FlDatarateSpecifyConfigure(DisketteExtension); } + { + ntStatus = FlDatarateSpecifyConfigure(DisketteExtension); + } if (!(ntStatus >= 0L)) { return (ntStatus); } else { @@ -6366,7 +6499,8 @@ NTSTATUS FlFormat(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp) { } else { } if (!(ntStatus >= 0L)) { - {} + { + } return (ntStatus); } else { } @@ -6423,7 +6557,8 @@ NTSTATUS FlFormat(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp) { 0, length); } if (!(ntStatus >= 0L)) { - {} + { + } } else { } if (ntStatus >= 0L) { @@ -6473,7 +6608,8 @@ NTSTATUS FlFormat(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp) { DisketteExtension->FifoBuffer, (void *)0, 0, 0); } if (!(ntStatus >= 0L)) { - {} + { + } return (ntStatus); } else { } @@ -6684,7 +6820,8 @@ NTSTATUS FlFdcDeviceIo(PDEVICE_OBJECT DeviceObject, ULONG Ioctl, PVOID Data) { (void *)0, 0, 1, &doneEvent, &ioStatus); } if ((unsigned int)irp == (unsigned int)((void *)0)) { - {} + { + } return (-1073741670L); } else { } @@ -6862,7 +6999,9 @@ NTSTATUS FlHdbit(PDISKETTE_EXTENSION DisketteExtension) { } else { } if (setHdBitParameter.ChangedHdBit) { - { ntStatus = FlDatarateSpecifyConfigure(DisketteExtension); } + { + ntStatus = FlDatarateSpecifyConfigure(DisketteExtension); + } } else { } return (ntStatus); @@ -6900,7 +7039,8 @@ NTSTATUS FloppyQueueRequest(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp) { Irp->IoStatus.__annonCompField4.Status = -1073741536L; myStatus = -1073741536L; Irp->IoStatus.Information = 0; - /* KfReleaseSpinLock(& DisketteExtension->FlCancelSpinLock, oldIrql); */ /* INLINED */ + /* KfReleaseSpinLock(& DisketteExtension->FlCancelSpinLock, + * oldIrql); */ /* INLINED */ IofCompleteRequest(Irp, 0); /* ExAcquireFastMutex(PagingMutex); */ /* INLINED */ PagingReferenceCount -= 1UL; @@ -6937,7 +7077,8 @@ NTSTATUS FloppyQueueRequest(PDISKETTE_EXTENSION DisketteExtension, PIRP Irp) { &DisketteExtension->NewRequestQueue, &Irp->Tail.Overlay.__annonCompField17.ListEntry, &DisketteExtension->NewRequestQueueSpinLock); - /* KfReleaseSpinLock(& DisketteExtension->FlCancelSpinLock, oldIrql); */ /* INLINED */ + /* KfReleaseSpinLock(& DisketteExtension->FlCancelSpinLock, + * oldIrql); */ /* INLINED */ ntStatus = 259L; } } @@ -7024,7 +7165,8 @@ void FloppyProcessQueuedRequests(PDISKETTE_EXTENSION DisketteExtension) { currentIrp = (void *)0; } { - /* KfReleaseSpinLock(& DisketteExtension->FlCancelSpinLock, oldIrql); */ /* INLINED */ + /* KfReleaseSpinLock(& DisketteExtension->FlCancelSpinLock, + * oldIrql); */ /* INLINED */ } if (currentIrp) { if (DisketteExtension->IsRemoved) { @@ -7234,7 +7376,9 @@ int main(void) { } } if (we_should_unload) { - { FloppyUnload(&d); } + { + FloppyUnload(&d); + } } else { } } else { @@ -7264,7 +7408,9 @@ int main(void) { if (s != SKIP2) { if (s != IPC) { if (s != DC) { - { errorFn(); } + { + errorFn(); + } } else { goto _L___0; } @@ -7281,12 +7427,16 @@ int main(void) { } else { if (s == DC) { if (status == 259L) { - { errorFn(); } + { + errorFn(); + } } else { } } else { if (status != (NTSTATUS)lowerDriverReturn) { - { errorFn(); } + { + errorFn(); + } } else { } } @@ -7724,7 +7874,9 @@ NTSTATUS IofCallDriver(PDEVICE_OBJECT DeviceObject, PIRP Irp) { compRetStatus1 = tmp; } if ((long)compRetStatus1 == -1073741802L) { - { stubMoreProcessingRequired(); } + { + stubMoreProcessingRequired(); + } } else { } } else { @@ -7878,7 +8030,9 @@ NTSTATUS KeWaitForSingleObject(PVOID Object, KWAIT_REASON WaitReason, customIrp = 0; } else { if (s == MPR3) { - { errorFn(); } + { + errorFn(); + } } else { } } @@ -8013,7 +8167,9 @@ NTSTATUS PoCallDriver(PDEVICE_OBJECT DeviceObject, PIRP Irp) { compRetStatus = tmp; } if ((long)compRetStatus == -1073741802L) { - { stubMoreProcessingRequired(); } + { + stubMoreProcessingRequired(); + } } else { } } else { diff --git a/test/ntdrivers/kbfiltr_false.i.cil.c b/test/ntdrivers/kbfiltr_false.i.cil.c index f2adaad6f..70f9ab73b 100644 --- a/test/ntdrivers/kbfiltr_false.i.cil.c +++ b/test/ntdrivers/kbfiltr_false.i.cil.c @@ -2060,13 +2060,18 @@ NTSTATUS KbFilter_PnP(PDEVICE_OBJECT DeviceObject, PIRP Irp) { *)0) ->CompletionRoutine)); nextIrpSp->Control = 0; - /* KeInitializeEvent(& event, 0, 0); */ /* INLINED */ + /* KeInitializeEvent(& + * event, 0, 0); */ /* INLINED */ } if (s != NP) { - { errorFn(); } + { + errorFn(); + } } else { if (compRegistered != 0) { - { errorFn(); } + { + errorFn(); + } } else { compRegistered = 1; compFptr = @@ -2168,8 +2173,10 @@ NTSTATUS KbFilter_PnP(PDEVICE_OBJECT DeviceObject, PIRP Irp) { IofCallDriver( devExt->TopOfStack, Irp); - /* IoDetachDevice(devExt->TopOfStack); */ /* INLINED */ - /* IoDeleteDevice(DeviceObject); */ /* INLINED */ + /* IoDetachDevice(devExt->TopOfStack); + */ /* INLINED */ + /* IoDeleteDevice(DeviceObject); + */ /* INLINED */ status = 0L; } goto switch_2_break; @@ -2569,13 +2576,17 @@ int main(void) { _L___0: /* CIL Label */ if (pended == 1) { if (status != 259L) { - { errorFn(); } + { + errorFn(); + } } else { } } else { if (s == DC) { if (status == 259L) { - { errorFn(); } + { + errorFn(); + } } else { } } else { @@ -3012,7 +3023,9 @@ NTSTATUS IofCallDriver(PDEVICE_OBJECT DeviceObject, PIRP Irp) { compRetStatus = tmp; } if ((long)compRetStatus == -1073741802L) { - { stubMoreProcessingRequired(); } + { + stubMoreProcessingRequired(); + } } else { } } else { @@ -3166,7 +3179,9 @@ NTSTATUS KeWaitForSingleObject(PVOID Object, KWAIT_REASON WaitReason, customIrp = 0; } else { if (s == MPR3) { - { errorFn(); } + { + errorFn(); + } } else { } } @@ -3301,7 +3316,9 @@ NTSTATUS PoCallDriver(PDEVICE_OBJECT DeviceObject, PIRP Irp) { compRetStatus = tmp; } if ((long)compRetStatus == -1073741802L) { - { stubMoreProcessingRequired(); } + { + stubMoreProcessingRequired(); + } } else { } } else { diff --git a/test/ntdrivers/parport_false.i.cil.c b/test/ntdrivers/parport_false.i.cil.c index 25a8f2d41..8f6290522 100644 --- a/test/ntdrivers/parport_false.i.cil.c +++ b/test/ntdrivers/parport_false.i.cil.c @@ -2617,7 +2617,9 @@ void PptLogError(PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT DeviceObject, ErrorLogEntry->FinalStatus = FinalStatus; ErrorLogEntry->DumpDataSize = DumpToAllocate; if (DumpToAllocate) { - { memcpy(ErrorLogEntry->DumpData, &P1, sizeof(PHYSICAL_ADDRESS)); } + { + memcpy(ErrorLogEntry->DumpData, &P1, sizeof(PHYSICAL_ADDRESS)); + } if ((unsigned int)DumpToAllocate > sizeof(PHYSICAL_ADDRESS)) { { memcpy((UCHAR *)(ErrorLogEntry->DumpData) + sizeof(PHYSICAL_ADDRESS), @@ -2670,7 +2672,8 @@ NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, ExAllocatePoolWithTag(1, pRegistryPath->MaximumLength, 1349673296UL); } if ((unsigned int)((void *)0) == (unsigned int)Buffer) { - {} + { + } return (-1073741670L); } else { { @@ -2718,7 +2721,9 @@ void PptUnload(PDRIVER_OBJECT DriverObject) { } Extension = CurrentDevice->DeviceExtension; if (Extension->InterruptRefCount) { - { PptDisconnectInterrupt(Extension); } + { + PptDisconnectInterrupt(Extension); + } } else { } { @@ -2855,7 +2860,8 @@ PptAddPptRemovalRelation(PDEVICE_EXTENSION Extension, } {} if (!node) { - {} + { + } return (-1073741670L); } else { } @@ -2876,7 +2882,8 @@ PptAddPptRemovalRelation(PDEVICE_EXTENSION Extension, { node->DeviceName.MaximumLength = (PptRemovalRelations->DeviceName)->MaximumLength; - /* RtlCopyUnicodeString(& node->DeviceName, PptRemovalRelations->DeviceName); */ /* INLINED */ + /* RtlCopyUnicodeString(& node->DeviceName, + * PptRemovalRelations->DeviceName); */ /* INLINED */ /* ExAcquireFastMutex(& Extension->ExtensionFastMutex); */ /* INLINED */ _EX_ListHead = &Extension->RemovalRelationsList; _EX_Blink = _EX_ListHead->Blink; @@ -2950,16 +2957,19 @@ PptRemovePptRemovalRelation(PDEVICE_EXTENSION Extension, (unsigned long)(&((REMOVAL_RELATIONS_LIST_ENTRY *)0) ->ListEntry)); if ((unsigned int)node->DeviceObject == (unsigned int)callerDevObj) { - {} + { + } found = 1; done = 1; } else { if ((unsigned int)firstListEntry == (unsigned int)thisListEntry) { - {} + { + } done = 1; } else { if (!firstListEntry) { - {} + { + } firstListEntry = thisListEntry; } else { } @@ -3116,7 +3126,8 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, } { Status = PptAcquireRemoveLockOrFailIrp(DeviceObject, Irp); } if (!(Status >= 0L)) { - {} + { + } return (Status); } else { } @@ -3195,13 +3206,15 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, .InputBufferLength < (ULONG)sizeof( PARPORT_REMOVAL_RELATIONS)) { - {} + { + } Status = -1073741789L; } else { { removalRelations = Irp->AssociatedIrp.SystemBuffer; - /* PptDumpPptRemovalRelationsStruct(removalRelations); */ /* INLINED */ + /* PptDumpPptRemovalRelationsStruct(removalRelations); + */ /* INLINED */ PptDumpRemovalRelationsList( Extension); PptAddPptRemovalRelation( @@ -3227,13 +3240,15 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, .InputBufferLength < (ULONG)sizeof( PARPORT_REMOVAL_RELATIONS)) { - {} + { + } Status = -1073741789L; } else { { removalRelations___0 = Irp->AssociatedIrp.SystemBuffer; - /* PptDumpPptRemovalRelationsStruct(Irp->AssociatedIrp.SystemBuffer); */ /* INLINED */ + /* PptDumpPptRemovalRelationsStruct(Irp->AssociatedIrp.SystemBuffer); + */ /* INLINED */ PptDumpRemovalRelationsList( Extension); PptRemovePptRemovalRelation( @@ -3328,7 +3343,8 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, } } { - /* IoReleaseCancelSpinLock(CancelIrql); */ /* INLINED */ + /* IoReleaseCancelSpinLock(CancelIrql); + */ /* INLINED */ } goto switch_41_break; switch_41_exp_4: /* CIL Label */; @@ -3399,7 +3415,8 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, EnableConnectInterruptIoctl = 0; {} if (0UL == EnableConnectInterruptIoctl) { - {} + { + } Status = -1073741823L; goto targetExit; } else { @@ -3429,12 +3446,14 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, { Extension->InterruptRefCount += 1UL; - /* IoReleaseCancelSpinLock(CancelIrql); */ /* INLINED */ + /* IoReleaseCancelSpinLock(CancelIrql); + */ /* INLINED */ Status = 0L; } } else { { - /* IoReleaseCancelSpinLock(CancelIrql); */ /* INLINED */ + /* IoReleaseCancelSpinLock(CancelIrql); + */ /* INLINED */ Status = PptConnectInterrupt( Extension); } @@ -3444,7 +3463,8 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, &CancelIrql); Extension->InterruptRefCount += 1UL; - /* IoReleaseCancelSpinLock(CancelIrql); */ /* INLINED */ + /* IoReleaseCancelSpinLock(CancelIrql); + */ /* INLINED */ } } else { } @@ -3517,7 +3537,8 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, } if (Extension->InterruptRefCount) { { - /* IoReleaseCancelSpinLock(CancelIrql); */ /* INLINED */ + /* IoReleaseCancelSpinLock(CancelIrql); + */ /* INLINED */ DisconnectContext.Extension = Extension; DisconnectContext.IsrInfo = IsrInfo; @@ -3541,7 +3562,8 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, DisconnectInterrupt = 0; } { - /* IoReleaseCancelSpinLock(CancelIrql); */ /* INLINED */ + /* IoReleaseCancelSpinLock(CancelIrql); + */ /* INLINED */ } } else { Status = -1073741811L; @@ -3549,13 +3571,16 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, } } else { { - /* IoReleaseCancelSpinLock(CancelIrql); */ /* INLINED */ + /* IoReleaseCancelSpinLock(CancelIrql); + */ /* INLINED */ DisconnectInterrupt = 0; Status = -1073741811L; } } if (DisconnectInterrupt) { - { PptDisconnectInterrupt(Extension); } + { + PptDisconnectInterrupt(Extension); + } } else { } } @@ -3606,7 +3631,8 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, .InputBufferLength < (ULONG)sizeof( PARALLEL_1284_COMMAND)) { - {} + { + } Status = -1073741789L; } else { if (Irp->Cancel) { @@ -3662,7 +3688,8 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, } else { } { - /* IoReleaseCancelSpinLock(CancelIrql); */ /* INLINED */ + /* IoReleaseCancelSpinLock(CancelIrql); + */ /* INLINED */ } } } @@ -3673,7 +3700,8 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, .InputBufferLength < (ULONG)sizeof( PARALLEL_1284_COMMAND)) { - {} + { + } Status = -1073741789L; } else { { @@ -3854,7 +3882,8 @@ NTSTATUS PptDispatchCreate(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } { status = PptAcquireRemoveLockOrFailIrp(DeviceObject, Irp); } if (!(status >= 0L)) { - {} + { + } return (status); } else { } @@ -3904,9 +3933,13 @@ NTSTATUS PptDispatchClose(PDEVICE_OBJECT DeviceObject, PIRP Irp) { { /* ExAcquireFastMutex(& extension->OpenCloseMutex); */ /* INLINED */ } if (extension->OpenCloseRefCount > 0L) { - { tmp = InterlockedDecrement(&extension->OpenCloseRefCount); } + { + tmp = InterlockedDecrement(&extension->OpenCloseRefCount); + } if (tmp < 0L) { - { InterlockedIncrement(&extension->OpenCloseRefCount); } + { + InterlockedIncrement(&extension->OpenCloseRefCount); + } } else { } { @@ -4017,11 +4050,15 @@ NTSTATUS PptTrySelectDevice(PVOID Context, PVOID TrySelectCommand) { success = 0; {} if (Command->CommandFlags & 4UL) { - { tmp = PptTrySelectLegacyZip(Context, TrySelectCommand); } + { + tmp = PptTrySelectLegacyZip(Context, TrySelectCommand); + } return (tmp); } else { if ((int)Command->ID == 5) { - { tmp = PptTrySelectLegacyZip(Context, TrySelectCommand); } + { + tmp = PptTrySelectLegacyZip(Context, TrySelectCommand); + } return (tmp); } else { } @@ -4029,7 +4066,8 @@ NTSTATUS PptTrySelectDevice(PVOID Context, PVOID TrySelectCommand) { DeviceID = Command->ID; if (!(Command->CommandFlags & 1UL)) { if ((ULONG)DeviceID > Extension->PnpInfo.Ieee1284_3DeviceCount) { - {} + { + } Status = -1073741811L; } else { goto _L___1; @@ -4062,7 +4100,8 @@ NTSTATUS PptTrySelectDevice(PVOID Context, PVOID TrySelectCommand) { while_79_break: /* CIL Label */; } if (success) { - {} + { + } Status = 0L; } else { {} @@ -4124,7 +4163,8 @@ NTSTATUS PptTrySelectDevice(PVOID Context, PVOID TrySelectCommand) { while_85_break: /* CIL Label */; } if (success) { - {} + { + } Status = 0L; } else { {} @@ -4160,11 +4200,15 @@ NTSTATUS PptDeselectDevice(PVOID Context, PVOID DeselectCommand) { success = 0; {} if (Command->CommandFlags & 4UL) { - { tmp = PptDeselectLegacyZip(Context, DeselectCommand); } + { + tmp = PptDeselectLegacyZip(Context, DeselectCommand); + } return (tmp); } else { if ((int)Command->ID == 5) { - { tmp = PptDeselectLegacyZip(Context, DeselectCommand); } + { + tmp = PptDeselectLegacyZip(Context, DeselectCommand); + } return (tmp); } else { } @@ -4172,7 +4216,8 @@ NTSTATUS PptDeselectDevice(PVOID Context, PVOID DeselectCommand) { DeviceID = Command->ID; if (!(Command->CommandFlags & 1UL)) { if ((ULONG)DeviceID > Extension->PnpInfo.Ieee1284_3DeviceCount) { - {} + { + } Status = -1073741811L; } else { goto _L___0; @@ -4203,9 +4248,12 @@ NTSTATUS PptDeselectDevice(PVOID Context, PVOID DeselectCommand) { while_91_break: /* CIL Label */; } if (success) { - {} + { + } if (!(Command->CommandFlags & 2UL)) { - { PptFreePort(Extension); } + { + PptFreePort(Extension); + } } else { } Status = 0L; @@ -4220,7 +4268,9 @@ NTSTATUS PptDeselectDevice(PVOID Context, PVOID DeselectCommand) { _L : /* CIL Label */ {} if (!(Command->CommandFlags & 2UL)) { - { PptFreePort(Extension); } + { + PptFreePort(Extension); + } } else { } Status = 0L; @@ -4277,7 +4327,9 @@ ULONG Ppt1284_3AssignAddress(PDEVICE_EXTENSION DeviceExtension) { status = READ_PORT_UCHAR(CurrentStatus); } if (((int)status & 48) == 48) { - { KeStallExecutionProcessor(Delay); } + { + KeStallExecutionProcessor(Delay); + } { while (1) { while_95_continue: /* CIL Label */; @@ -4337,7 +4389,9 @@ ULONG Ppt1284_3AssignAddress(PDEVICE_EXTENSION DeviceExtension) { } else { } if (1 == (int)bStlNon1284_3Found) { - { tmp___1 = PptCheckIfStlProductId(DeviceExtension, idx); } + { + tmp___1 = PptCheckIfStlProductId(DeviceExtension, idx); + } if (1 == (int)tmp___1) { bStlNon1284_3Valid = 1; goto __Cont; @@ -4758,7 +4812,8 @@ BOOLEAN PptSend1284_3Command(PDEVICE_EXTENSION DeviceExtension, UCHAR Command) { } else { } if (!success) { - {} + { + } } else { } goto switch_99_break; @@ -4772,7 +4827,8 @@ BOOLEAN PptSend1284_3Command(PDEVICE_EXTENSION DeviceExtension, UCHAR Command) { } else { } if (!success) { - {} + { + } } else { } goto switch_99_break; @@ -4960,7 +5016,9 @@ NTSTATUS PptDetectPortCapabilities(PDEVICE_EXTENSION Extension) { if (!Extension->NationalChipFound) { {} {} { PptDetectEppPortIfDot3DevicePresent(Extension); } if (!Extension->CheckedForGenericEpp) { - { PptDetectEppPortIfUserRequested(Extension); } + { + PptDetectEppPortIfUserRequested(Extension); + } } else { } } else { @@ -4979,7 +5037,8 @@ NTSTATUS PptDetectPortCapabilities(PDEVICE_EXTENSION Extension) { } {} { PptDetectBytePort(Extension); } if (Extension->PnpInfo.HardwareCapabilities & 11UL) { - {} + { + } return (0L); } else { } @@ -5000,7 +5059,8 @@ void PptDetectEcpPort(PDEVICE_EXTENSION Extension) { wPortDCR = Controller + 2; if ((unsigned int)((PUCHAR)0) == (unsigned int)Extension->PnpInfo.EcpController) { - {} + { + } return; } else { } @@ -5091,7 +5151,8 @@ void PptDetectEppPortIfDot3DevicePresent(PDEVICE_EXTENSION Extension) { Forward = (unsigned char)6; daisyChainDevicePresent = 0; if (0UL == Extension->PnpInfo.Ieee1284_3DeviceCount) { - {} + { + } return; } else { } @@ -5102,7 +5163,8 @@ void PptDetectEppPortIfDot3DevicePresent(PDEVICE_EXTENSION Extension) { status = PptTrySelectDevice(Extension, &Command); } if (!(status >= 0L)) { - {} + { + } return; } else { } @@ -5114,7 +5176,8 @@ void PptDetectEppPortIfDot3DevicePresent(PDEVICE_EXTENSION Extension) { status = PptDeselectDevice(Extension, &Command); } if (!(status >= 0L)) { - {} + { + } } else { {} } @@ -5127,7 +5190,9 @@ void PptDetectEppPortIfUserRequested(PDEVICE_EXTENSION Extension) { { RequestEppTest = 0; if (RequestEppTest) { - { PptDetectEppPort(Extension); } + { + PptDetectEppPort(Extension); + } } else { } return; @@ -5172,7 +5237,8 @@ void PptDetectEppPort(PDEVICE_EXTENSION Extension) { Extension->CheckedForGenericEpp = 1; } if (Extension->PnpInfo.HardwareCapabilities & 2UL) { - {} + { + } } else { {} } @@ -5186,7 +5252,8 @@ void PptDetectBytePort(PDEVICE_EXTENSION Extension) { Status = 0L; {} { Status = PptSetByteMode(Extension, 52); } if (Status >= 0L) { - {} + { + } Extension->PnpInfo.HardwareCapabilities |= 8UL; } else { {} @@ -5262,7 +5329,9 @@ void PptDetermineFifoDepth(PDEVICE_EXTENSION Extension) { } { testData = READ_PORT_UCHAR(wPortDFIFO); } if ((int)testData != ((int)readFifoDepth & 255)) { - { WRITE_PORT_UCHAR(wPortECR, ecrLast); } + { + WRITE_PORT_UCHAR(wPortECR, ecrLast); + } {} return; } else { @@ -5318,7 +5387,8 @@ NTSTATUS PptSetChipMode(PDEVICE_EXTENSION Extension, UCHAR ChipMode) { EcrMode = (unsigned char)((int)ChipMode & -32); {} if (Extension->PnpInfo.CurrentMode != 0UL) { - {} + { + } Status = -1073741436L; goto ExitSetChipModeNoChange; } else { @@ -5332,7 +5402,8 @@ NTSTATUS PptSetChipMode(PDEVICE_EXTENSION Extension, UCHAR ChipMode) { {} if ((int)EcrMode == 96) { if ((Extension->PnpInfo.HardwareCapabilities & 1UL) ^ 1UL) { - {} + { + } return (-1073741810L); } else { } @@ -5342,7 +5413,8 @@ NTSTATUS PptSetChipMode(PDEVICE_EXTENSION Extension, UCHAR ChipMode) { } if ((int)EcrMode == 128) { if ((Extension->PnpInfo.HardwareCapabilities & 2UL) ^ 2UL) { - {} + { + } return (-1073741810L); } else { } @@ -5352,7 +5424,8 @@ NTSTATUS PptSetChipMode(PDEVICE_EXTENSION Extension, UCHAR ChipMode) { } if ((int)EcrMode == 32) { if ((Extension->PnpInfo.HardwareCapabilities & 8UL) ^ 8UL) { - {} + { + } return (-1073741810L); } else { } @@ -5363,7 +5436,8 @@ NTSTATUS PptSetChipMode(PDEVICE_EXTENSION Extension, UCHAR ChipMode) { } ExitSetChipModeWithChanges: if (Status >= 0L) { - {} + { + } Extension->PnpInfo.CurrentMode = EcrMode; } else { {} @@ -5381,7 +5455,8 @@ NTSTATUS PptClearChipMode(PDEVICE_EXTENSION Extension, UCHAR ChipMode) { EcrMode = (int)ChipMode & -32; {} if (EcrMode != Extension->PnpInfo.CurrentMode) { - {} + { + } Status = -1073741436L; goto ExitClearChipModeNoChange; } else { @@ -5394,24 +5469,31 @@ NTSTATUS PptClearChipMode(PDEVICE_EXTENSION Extension, UCHAR ChipMode) { } else { {} if (EcrMode == 96UL) { - { Status = PptEcrClearMode(Extension); } + { + Status = PptEcrClearMode(Extension); + } goto ExitClearChipModeWithChanges; } else { } if (EcrMode == 128UL) { - { Status = PptEcrClearMode(Extension); } + { + Status = PptEcrClearMode(Extension); + } goto ExitClearChipModeWithChanges; } else { } if (EcrMode == 32UL) { - { Status = PptClearByteMode(Extension); } + { + Status = PptClearByteMode(Extension); + } goto ExitClearChipModeWithChanges; } else { } } ExitClearChipModeWithChanges: if (Status >= 0L) { - {} + { + } Extension->PnpInfo.CurrentMode = 0; } else { } @@ -5444,7 +5526,9 @@ NTSTATUS PptSetByteMode(PDEVICE_EXTENSION Extension, UCHAR ChipMode) { { if (Extension->PnpInfo.HardwareCapabilities & 1UL) { - { Status = PptEcrSetMode(Extension, ChipMode); } + { + Status = PptEcrSetMode(Extension, ChipMode); + } } else { } { Status = PptCheckByteMode(Extension); } @@ -5457,7 +5541,9 @@ NTSTATUS PptClearByteMode(PDEVICE_EXTENSION Extension) { { Status = 0L; if (Extension->PnpInfo.HardwareCapabilities & 1UL) { - { Status = PptEcrClearMode(Extension); } + { + Status = PptEcrClearMode(Extension); + } } else { } return (Status); @@ -5551,7 +5637,8 @@ NTSTATUS PptFindNatChip(PDEVICE_EXTENSION Extension) { NationalChecked = 0; NationalChipFound = 0; if ((int)Extension->NationalChecked == 1) { - {} + { + } return (0L); } else { } @@ -5574,7 +5661,8 @@ NTSTATUS PptFindNatChip(PDEVICE_EXTENSION Extension) { Resources = (struct _CM_RESOURCE_LIST *)tmp; } if ((unsigned int)Resources == (unsigned int)((void *)0)) { - {} + { + } return (-1073741823L); } else { } @@ -5596,12 +5684,14 @@ NTSTATUS PptFindNatChip(PDEVICE_EXTENSION Extension) { /* ExFreePool(Resources); */ /* INLINED */ } if (!(Status >= 0L)) { - {} + { + } return (Status); } else { } if (Conflict) { - {} + { + } return (-1073741823L); } else { } @@ -5623,7 +5713,9 @@ NTSTATUS PptFindNatChip(PDEVICE_EXTENSION Extension) { tmp___1 = READ_PORT_UCHAR(PortAddr); } if ((int)tmp___1 == 136) { - { tmp___2 = READ_PORT_UCHAR(PortAddr); } + { + tmp___2 = READ_PORT_UCHAR(PortAddr); + } if ((int)tmp___2 < 32) { OkToLook = 1; } else { @@ -5636,7 +5728,9 @@ NTSTATUS PptFindNatChip(PDEVICE_EXTENSION Extension) { cr = READ_PORT_UCHAR(PortAddr); } if ((int)cr != 255) { - { tmp___0 = READ_PORT_UCHAR(PortAddr); } + { + tmp___0 = READ_PORT_UCHAR(PortAddr); + } if ((int)tmp___0 == (int)cr) { OkToLook = 1; } else { @@ -5928,7 +6022,8 @@ PDEVICE_RELATIONS PptPnpBuildRemovalRelations(PDEVICE_EXTENSION Extension) { /* ExAcquireFastMutex(& Extension->ExtensionFastMutex); */ /* INLINED */ } if ((unsigned int)listHead->Flink == (unsigned int)listHead) { - {} + { + } goto targetExit; } else { } @@ -5970,7 +6065,8 @@ PDEVICE_RELATIONS PptPnpBuildRemovalRelations(PDEVICE_EXTENSION Extension) { count += 1UL; } if (!firstListEntry) { - {} + { + } firstListEntry = thisListEntry; } else { } @@ -5986,7 +6082,8 @@ PDEVICE_RELATIONS PptPnpBuildRemovalRelations(PDEVICE_EXTENSION Extension) { relations = tmp; } if (!relations) { - {} + { + } goto targetExit; } else { } @@ -6196,13 +6293,15 @@ BOOLEAN PptIsPci(PDEVICE_EXTENSION Extension, PIRP Irp) { ResourceList = irpStack->Parameters.StartDevice.AllocatedResourcesTranslated; if ((unsigned int)ResourceList == (unsigned int)((void *)0)) { - {} + { + } return (0); } else { } FullResourceDescriptor = &ResourceList->List[0]; if (FullResourceDescriptor) { - {} + { + } PartialResourceList = &FullResourceDescriptor->PartialResourceList; i = 0; { @@ -6226,7 +6325,8 @@ BOOLEAN PptIsPci(PDEVICE_EXTENSION Extension, PIRP Irp) { {} portResourceDescriptorCount += 1UL; if (rangeLength > 8UL) { - {} + { + } largePortRangeFound = 1; } else { } @@ -6299,7 +6399,8 @@ NTSTATUS PptPnpAddDevice(PDRIVER_OBJECT pDriverObject, PptBuildDeviceObject(pDriverObject, pPhysicalDeviceObject); } if ((unsigned int)((void *)0) == (unsigned int)pDeviceObject) { - {} + { + } return (-1073741823L); } else { } @@ -6351,7 +6452,9 @@ NTSTATUS PptDispatchPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { .CurrentStackLocation; minorFunction = irpStack->MinorFunction; if ((int)minorFunction > 24) { - { status = PptPnpUnhandledIrp(DeviceObject, Irp); } + { + status = PptPnpUnhandledIrp(DeviceObject, Irp); + } } else { if (__BLAST_NONDET == 0) { goto switch_214_0; @@ -6511,7 +6614,9 @@ NTSTATUS PptPnpStartDevice(PDEVICE_OBJECT DeviceObject, PIRP Irp) { status = PptDetectChipFilter(extension); } if (!(status >= 0L)) { - { PptDetectPortType(extension); } + { + PptDetectPortType(extension); + } } else { } { status = PptWmiInitWmi(DeviceObject); } @@ -6573,14 +6678,17 @@ NTSTATUS PptPnpStartScanCmResourceList(PDEVICE_EXTENSION Extension, PIRP Irp, ResourceList = irpStack->Parameters.StartDevice.AllocatedResourcesTranslated; if ((unsigned int)ResourceList == (unsigned int)((void *)0)) { - {} + { + } status = -1073741670L; goto targetExit; } else { } if ((int)((KUSER_SHARED_DATA *const)4292804608U)->AlternativeArchitecture != 1) { - { tmp = PptIsPci(Extension, Irp); } + { + tmp = PptIsPci(Extension, Irp); + } if (1 == (int)tmp) { {} { status = PptPnpStartScanPciCardCmResourceList( @@ -6630,7 +6738,8 @@ NTSTATUS PptPnpStartScanCmResourceList(PDEVICE_EXTENSION Extension, PIRP Irp, .__annonCompField1.LowPart == 0UL) { if (Extension->PortInfo.OriginalController .__annonCompField1.HighPart == 0L) { - {} + { + } Extension->PortInfo.OriginalController = PartialResourceDescriptor->u.Port.Start; Extension->PortInfo.SpanOfController = @@ -6641,7 +6750,9 @@ NTSTATUS PptPnpStartScanCmResourceList(PDEVICE_EXTENSION Extension, PIRP Irp, Extension->AddressSpace = PartialResourceDescriptor->Flags; if (Extension->PortInfo.SpanOfController == 4096UL) { - { tmp___0 = PptIsNecR98Machine(); } + { + tmp___0 = PptIsNecR98Machine(); + } if (tmp___0) { Extension->PortInfo.SpanOfController = 8; } else { @@ -6667,7 +6778,8 @@ NTSTATUS PptPnpStartScanCmResourceList(PDEVICE_EXTENSION Extension, PIRP Irp, .__annonCompField1.HighPart < Extension->PortInfo.OriginalController .__annonCompField1.HighPart) { - {} + { + } Extension->PnpInfo.OriginalEcpController = Extension->PortInfo.OriginalController; Extension->PnpInfo.SpanOfEcpController = @@ -6688,7 +6800,9 @@ NTSTATUS PptPnpStartScanCmResourceList(PDEVICE_EXTENSION Extension, PIRP Irp, PartialResourceDescriptor->Flags; if (Extension->PortInfo.SpanOfController == 4096UL) { - { tmp___1 = PptIsNecR98Machine(); } + { + tmp___1 = PptIsNecR98Machine(); + } if (tmp___1) { Extension->PortInfo.SpanOfController = 8; } else { @@ -6941,7 +7055,8 @@ BOOLEAN PptPnpFilterExistsNonIrqResourceList( } {} if ((int)curDesc->Type == 2) { - {} + { + } foundIrq = 1; goto while_243_break; } else { @@ -6952,7 +7067,8 @@ BOOLEAN PptPnpFilterExistsNonIrqResourceList( while_243_break: /* CIL Label */; } if ((int)foundIrq == 0) { - {} + { + } return (1); } else { } @@ -6996,7 +7112,8 @@ void PptPnpFilterRemoveIrqResourceLists( } {} {} { tmp___0 = PptPnpListContainsIrqResourceDescriptor(curList); } if (tmp___0) { - {} + { + } nextList = (struct _IO_RESOURCE_LIST *)(curList->Descriptors + curList->Count); bytesToMove = @@ -7142,13 +7259,15 @@ NTSTATUS PptPnpQueryDeviceRelations(PDEVICE_OBJECT DeviceObject, PIRP Irp) { switch_261_3: /* CIL Label */; {} { PptDumpRemovalRelationsList(extension); } if (Irp->IoStatus.Information) { - {} + { + } } else { { removalRelations = PptPnpBuildRemovalRelations(extension); } if (removalRelations) { - {} + { + } Irp->IoStatus.__annonCompField4.Status = 0L; myStatus = 0L; Irp->IoStatus.Information = @@ -7416,10 +7535,14 @@ NTSTATUS PptPnpBounceAndCatchPnpIrp(PDEVICE_EXTENSION Extension, PIRP Irp) { nextIrpSp->Control = 0; } if (s != NP) { - { errorFn(); } + { + errorFn(); + } } else { if (compRegistered != 0) { - { errorFn(); } + { + errorFn(); + } } else { compRegistered = 1; compFptr = &PptSynchCompletionRoutine; @@ -7682,7 +7805,9 @@ NTSTATUS PptDispatchPower(PDEVICE_OBJECT pDeviceObject, PIRP pIrp) { hookit = 1; if ((int)((KUSER_SHARED_DATA *const)4292804608U) ->AlternativeArchitecture == 1) { - { InitNEC_98(Extension); } + { + InitNEC_98(Extension); + } } else { } } else { @@ -7743,10 +7868,14 @@ NTSTATUS PptDispatchPower(PDEVICE_OBJECT pDeviceObject, PIRP pIrp) { } else { if (hookit) { if (s != NP) { - { errorFn(); } + { + errorFn(); + } } else { if (compRegistered != 0) { - { errorFn(); } + { + errorFn(); + } } else { compRegistered = 1; compFptr = &PptPowerComplete; @@ -7905,17 +8034,22 @@ NTSTATUS PptTrySelectLegacyZip(PVOID Context, PVOID TrySelectCommand) { if (Status >= 0L) { if (Status != 259L) { if (Command->CommandFlags & 32UL) { - { PptLegacyZipSetDiskMode(Controller, (unsigned char)207); } + { + PptLegacyZipSetDiskMode(Controller, (unsigned char)207); + } } else { { PptLegacyZipSetDiskMode(Controller, (unsigned char)143); } } { tmp = PptLegacyZipCheckDevice(Controller); } if (tmp) { - {} + { + } if (!Extension->CheckedForGenericEpp) { if (Extension->PnpInfo.HardwareCapabilities & 1UL) { if (!Extension->NationalChipFound) { - { PptDetectEppPort(Extension); } + { + PptDetectEppPort(Extension); + } } else { } } else { @@ -7951,7 +8085,9 @@ NTSTATUS PptDeselectLegacyZip(PVOID Context, PVOID DeselectCommand) { PptLegacyZipClockPrtModeByte(Controller, (unsigned char)15); } if (!(Command->CommandFlags & 2UL)) { - { PptFreePort(Extension); } + { + PptFreePort(Extension); + } } else { } return (0L); @@ -8078,7 +8214,8 @@ NTSTATUS PptRegSetDeviceParameterDword(PDEVICE_OBJECT Pdo, PWSTR ParameterName, { { status = IoOpenDeviceRegistryKey(Pdo, 1, 131078L, &hKey); } if (!(status >= 0L)) { - {} + { + } return (status); } else { } @@ -8088,7 +8225,8 @@ NTSTATUS PptRegSetDeviceParameterDword(PDEVICE_OBJECT Pdo, PWSTR ParameterName, ZwSetValueKey(hKey, &valueName, 0, 4, ParameterValue, sizeof(ULONG)); } if (!(status >= 0L)) { - {} + { + } } else { } { ZwClose(hKey); } @@ -8150,7 +8288,9 @@ NTSTATUS PptAcquireRemoveLockOrFailIrp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { status = tmp; } if (!(status >= 0L)) { - { PptFailRequest(Irp, status); } + { + PptFailRequest(Irp, status); + } } else { } return (status); @@ -8210,7 +8350,8 @@ PWSTR PptGetPortNameFromPhysicalDeviceObject( IoOpenDeviceRegistryKey(PhysicalDeviceObject, 1, 2031616L, &hKey); } if (!(status >= 0L)) { - {} + { + } return ((void *)0); } else { } @@ -8750,7 +8891,8 @@ NTSTATUS PptBuildParallelPortDeviceName(ULONG Number, status = RtlIntegerToUnicodeString(Number, 10, &uniPortNumberString); } if (!(status >= 0L)) { - {} + { + } return (status); } else { } @@ -8764,7 +8906,8 @@ NTSTATUS PptBuildParallelPortDeviceName(ULONG Number, DeviceName->Buffer = tmp; } if ((unsigned int)((void *)0) == (unsigned int)DeviceName->Buffer) { - {} + { + } return (-1073741670L); } else { } @@ -8857,7 +9000,8 @@ NTSTATUS PptGetPortNumberFromLptName(PWSTR PortName, PULONG PortNumber) { { if (__BLAST_NONDET) { - {} + { + } return (-1073741823L); } else { } @@ -8866,12 +9010,14 @@ NTSTATUS PptGetPortNumberFromLptName(PWSTR PortName, PULONG PortNumber) { status = RtlUnicodeStringToInteger(&str, 10, PortNumber); } if (!(status >= 0L)) { - {} + { + } return (-1073741823L); } else { } if (*PortNumber == 0UL) { - {} + { + } return (-1073741823L); } else { } @@ -8899,7 +9045,8 @@ PDEVICE_OBJECT PptBuildDeviceObject(PDRIVER_OBJECT DriverObject, portName = PptGetPortNameFromPhysicalDeviceObject(PhysicalDeviceObject); } if ((unsigned int)((void *)0) == (unsigned int)portName) { - {} + { + } goto targetExit; } else { } @@ -8923,7 +9070,8 @@ PDEVICE_OBJECT PptBuildDeviceObject(PDRIVER_OBJECT DriverObject, &uniNameString, 22, 256, 0, &deviceObject); } if (-1073741771L == status) { - {} + { + } portNumber = 7; { while (1) { @@ -9361,7 +9509,9 @@ int main(void) { } } if (we_should_unload) { - { PptUnload(&d); } + { + PptUnload(&d); + } } else { } } else { @@ -9391,7 +9541,9 @@ int main(void) { if (s != SKIP2) { if (s != IPC) { if (s != DC) { - { errorFn(); } + { + errorFn(); + } } else { goto _L___0; } @@ -9402,15 +9554,21 @@ int main(void) { _L___0: /* CIL Label */ if (pended == 1) { if (status != 259L) { - { errorFn(); } + { + errorFn(); + } } else { } } else { if (s == DC) { - { errorFn(); } + { + errorFn(); + } } else { if (status != (NTSTATUS)lowerDriverReturn) { - { errorFn(); } + { + errorFn(); + } } else { } } @@ -9854,7 +10012,9 @@ NTSTATUS IofCallDriver(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } } if ((long)compRetStatus == -1073741802L) { - { stubMoreProcessingRequired(); } + { + stubMoreProcessingRequired(); + } } else { } } else { @@ -10008,7 +10168,9 @@ NTSTATUS KeWaitForSingleObject(PVOID Object, KWAIT_REASON WaitReason, customIrp = 0; } else { if (s == MPR3) { - { errorFn(); } + { + errorFn(); + } } else { } } @@ -10154,7 +10316,9 @@ NTSTATUS PoCallDriver(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } } if ((long)compRetStatus == -1073741802L) { - { stubMoreProcessingRequired(); } + { + stubMoreProcessingRequired(); + } } else { } } else { diff --git a/test/ntdrivers/parport_true.i.cil.c b/test/ntdrivers/parport_true.i.cil.c index 4d417f898..36921913e 100644 --- a/test/ntdrivers/parport_true.i.cil.c +++ b/test/ntdrivers/parport_true.i.cil.c @@ -2617,7 +2617,9 @@ void PptLogError(PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT DeviceObject, ErrorLogEntry->FinalStatus = FinalStatus; ErrorLogEntry->DumpDataSize = DumpToAllocate; if (DumpToAllocate) { - { memcpy(ErrorLogEntry->DumpData, &P1, sizeof(PHYSICAL_ADDRESS)); } + { + memcpy(ErrorLogEntry->DumpData, &P1, sizeof(PHYSICAL_ADDRESS)); + } if ((unsigned int)DumpToAllocate > sizeof(PHYSICAL_ADDRESS)) { { memcpy((UCHAR *)(ErrorLogEntry->DumpData) + sizeof(PHYSICAL_ADDRESS), @@ -2670,7 +2672,8 @@ NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, ExAllocatePoolWithTag(1, pRegistryPath->MaximumLength, 1349673296UL); } if ((unsigned int)((void *)0) == (unsigned int)Buffer) { - {} + { + } return (-1073741670L); } else { { @@ -2718,7 +2721,9 @@ void PptUnload(PDRIVER_OBJECT DriverObject) { } Extension = CurrentDevice->DeviceExtension; if (Extension->InterruptRefCount) { - { PptDisconnectInterrupt(Extension); } + { + PptDisconnectInterrupt(Extension); + } } else { } { @@ -2855,7 +2860,8 @@ PptAddPptRemovalRelation(PDEVICE_EXTENSION Extension, } {} if (!node) { - {} + { + } return (-1073741670L); } else { } @@ -2876,7 +2882,8 @@ PptAddPptRemovalRelation(PDEVICE_EXTENSION Extension, { node->DeviceName.MaximumLength = (PptRemovalRelations->DeviceName)->MaximumLength; - /* RtlCopyUnicodeString(& node->DeviceName, PptRemovalRelations->DeviceName); */ /* INLINED */ + /* RtlCopyUnicodeString(& node->DeviceName, + * PptRemovalRelations->DeviceName); */ /* INLINED */ /* ExAcquireFastMutex(& Extension->ExtensionFastMutex); */ /* INLINED */ _EX_ListHead = &Extension->RemovalRelationsList; _EX_Blink = _EX_ListHead->Blink; @@ -2950,16 +2957,19 @@ PptRemovePptRemovalRelation(PDEVICE_EXTENSION Extension, (unsigned long)(&((REMOVAL_RELATIONS_LIST_ENTRY *)0) ->ListEntry)); if ((unsigned int)node->DeviceObject == (unsigned int)callerDevObj) { - {} + { + } found = 1; done = 1; } else { if ((unsigned int)firstListEntry == (unsigned int)thisListEntry) { - {} + { + } done = 1; } else { if (!firstListEntry) { - {} + { + } firstListEntry = thisListEntry; } else { } @@ -3116,7 +3126,8 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, } { Status = PptAcquireRemoveLockOrFailIrp(DeviceObject, Irp); } if (!(Status >= 0L)) { - {} + { + } return (Status); } else { } @@ -3195,13 +3206,15 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, .InputBufferLength < (ULONG)sizeof( PARPORT_REMOVAL_RELATIONS)) { - {} + { + } Status = -1073741789L; } else { { removalRelations = Irp->AssociatedIrp.SystemBuffer; - /* PptDumpPptRemovalRelationsStruct(removalRelations); */ /* INLINED */ + /* PptDumpPptRemovalRelationsStruct(removalRelations); + */ /* INLINED */ PptDumpRemovalRelationsList( Extension); PptAddPptRemovalRelation( @@ -3227,13 +3240,15 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, .InputBufferLength < (ULONG)sizeof( PARPORT_REMOVAL_RELATIONS)) { - {} + { + } Status = -1073741789L; } else { { removalRelations___0 = Irp->AssociatedIrp.SystemBuffer; - /* PptDumpPptRemovalRelationsStruct(Irp->AssociatedIrp.SystemBuffer); */ /* INLINED */ + /* PptDumpPptRemovalRelationsStruct(Irp->AssociatedIrp.SystemBuffer); + */ /* INLINED */ PptDumpRemovalRelationsList( Extension); PptRemovePptRemovalRelation( @@ -3328,7 +3343,8 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, } } { - /* IoReleaseCancelSpinLock(CancelIrql); */ /* INLINED */ + /* IoReleaseCancelSpinLock(CancelIrql); + */ /* INLINED */ } goto switch_41_break; switch_41_exp_4: /* CIL Label */; @@ -3399,7 +3415,8 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, EnableConnectInterruptIoctl = 0; {} if (0UL == EnableConnectInterruptIoctl) { - {} + { + } Status = -1073741823L; goto targetExit; } else { @@ -3429,12 +3446,14 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, { Extension->InterruptRefCount += 1UL; - /* IoReleaseCancelSpinLock(CancelIrql); */ /* INLINED */ + /* IoReleaseCancelSpinLock(CancelIrql); + */ /* INLINED */ Status = 0L; } } else { { - /* IoReleaseCancelSpinLock(CancelIrql); */ /* INLINED */ + /* IoReleaseCancelSpinLock(CancelIrql); + */ /* INLINED */ Status = PptConnectInterrupt( Extension); } @@ -3444,7 +3463,8 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, &CancelIrql); Extension->InterruptRefCount += 1UL; - /* IoReleaseCancelSpinLock(CancelIrql); */ /* INLINED */ + /* IoReleaseCancelSpinLock(CancelIrql); + */ /* INLINED */ } } else { } @@ -3517,7 +3537,8 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, } if (Extension->InterruptRefCount) { { - /* IoReleaseCancelSpinLock(CancelIrql); */ /* INLINED */ + /* IoReleaseCancelSpinLock(CancelIrql); + */ /* INLINED */ DisconnectContext.Extension = Extension; DisconnectContext.IsrInfo = IsrInfo; @@ -3541,7 +3562,8 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, DisconnectInterrupt = 0; } { - /* IoReleaseCancelSpinLock(CancelIrql); */ /* INLINED */ + /* IoReleaseCancelSpinLock(CancelIrql); + */ /* INLINED */ } } else { Status = -1073741811L; @@ -3549,13 +3571,16 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, } } else { { - /* IoReleaseCancelSpinLock(CancelIrql); */ /* INLINED */ + /* IoReleaseCancelSpinLock(CancelIrql); + */ /* INLINED */ DisconnectInterrupt = 0; Status = -1073741811L; } } if (DisconnectInterrupt) { - { PptDisconnectInterrupt(Extension); } + { + PptDisconnectInterrupt(Extension); + } } else { } } @@ -3606,7 +3631,8 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, .InputBufferLength < (ULONG)sizeof( PARALLEL_1284_COMMAND)) { - {} + { + } Status = -1073741789L; } else { if (Irp->Cancel) { @@ -3662,7 +3688,8 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, } else { } { - /* IoReleaseCancelSpinLock(CancelIrql); */ /* INLINED */ + /* IoReleaseCancelSpinLock(CancelIrql); + */ /* INLINED */ } } } @@ -3673,7 +3700,8 @@ NTSTATUS PptDispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, .InputBufferLength < (ULONG)sizeof( PARALLEL_1284_COMMAND)) { - {} + { + } Status = -1073741789L; } else { { @@ -3854,7 +3882,8 @@ NTSTATUS PptDispatchCreate(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } { status = PptAcquireRemoveLockOrFailIrp(DeviceObject, Irp); } if (!(status >= 0L)) { - {} + { + } return (status); } else { } @@ -3904,9 +3933,13 @@ NTSTATUS PptDispatchClose(PDEVICE_OBJECT DeviceObject, PIRP Irp) { { /* ExAcquireFastMutex(& extension->OpenCloseMutex); */ /* INLINED */ } if (extension->OpenCloseRefCount > 0L) { - { tmp = InterlockedDecrement(&extension->OpenCloseRefCount); } + { + tmp = InterlockedDecrement(&extension->OpenCloseRefCount); + } if (tmp < 0L) { - { InterlockedIncrement(&extension->OpenCloseRefCount); } + { + InterlockedIncrement(&extension->OpenCloseRefCount); + } } else { } { @@ -4017,11 +4050,15 @@ NTSTATUS PptTrySelectDevice(PVOID Context, PVOID TrySelectCommand) { success = 0; {} if (Command->CommandFlags & 4UL) { - { tmp = PptTrySelectLegacyZip(Context, TrySelectCommand); } + { + tmp = PptTrySelectLegacyZip(Context, TrySelectCommand); + } return (tmp); } else { if ((int)Command->ID == 5) { - { tmp = PptTrySelectLegacyZip(Context, TrySelectCommand); } + { + tmp = PptTrySelectLegacyZip(Context, TrySelectCommand); + } return (tmp); } else { } @@ -4029,7 +4066,8 @@ NTSTATUS PptTrySelectDevice(PVOID Context, PVOID TrySelectCommand) { DeviceID = Command->ID; if (!(Command->CommandFlags & 1UL)) { if ((ULONG)DeviceID > Extension->PnpInfo.Ieee1284_3DeviceCount) { - {} + { + } Status = -1073741811L; } else { goto _L___1; @@ -4062,7 +4100,8 @@ NTSTATUS PptTrySelectDevice(PVOID Context, PVOID TrySelectCommand) { while_79_break: /* CIL Label */; } if (success) { - {} + { + } Status = 0L; } else { {} @@ -4124,7 +4163,8 @@ NTSTATUS PptTrySelectDevice(PVOID Context, PVOID TrySelectCommand) { while_85_break: /* CIL Label */; } if (success) { - {} + { + } Status = 0L; } else { {} @@ -4160,11 +4200,15 @@ NTSTATUS PptDeselectDevice(PVOID Context, PVOID DeselectCommand) { success = 0; {} if (Command->CommandFlags & 4UL) { - { tmp = PptDeselectLegacyZip(Context, DeselectCommand); } + { + tmp = PptDeselectLegacyZip(Context, DeselectCommand); + } return (tmp); } else { if ((int)Command->ID == 5) { - { tmp = PptDeselectLegacyZip(Context, DeselectCommand); } + { + tmp = PptDeselectLegacyZip(Context, DeselectCommand); + } return (tmp); } else { } @@ -4172,7 +4216,8 @@ NTSTATUS PptDeselectDevice(PVOID Context, PVOID DeselectCommand) { DeviceID = Command->ID; if (!(Command->CommandFlags & 1UL)) { if ((ULONG)DeviceID > Extension->PnpInfo.Ieee1284_3DeviceCount) { - {} + { + } Status = -1073741811L; } else { goto _L___0; @@ -4203,9 +4248,12 @@ NTSTATUS PptDeselectDevice(PVOID Context, PVOID DeselectCommand) { while_91_break: /* CIL Label */; } if (success) { - {} + { + } if (!(Command->CommandFlags & 2UL)) { - { PptFreePort(Extension); } + { + PptFreePort(Extension); + } } else { } Status = 0L; @@ -4220,7 +4268,9 @@ NTSTATUS PptDeselectDevice(PVOID Context, PVOID DeselectCommand) { _L : /* CIL Label */ {} if (!(Command->CommandFlags & 2UL)) { - { PptFreePort(Extension); } + { + PptFreePort(Extension); + } } else { } Status = 0L; @@ -4277,7 +4327,9 @@ ULONG Ppt1284_3AssignAddress(PDEVICE_EXTENSION DeviceExtension) { status = READ_PORT_UCHAR(CurrentStatus); } if (((int)status & 48) == 48) { - { KeStallExecutionProcessor(Delay); } + { + KeStallExecutionProcessor(Delay); + } { while (1) { while_95_continue: /* CIL Label */; @@ -4337,7 +4389,9 @@ ULONG Ppt1284_3AssignAddress(PDEVICE_EXTENSION DeviceExtension) { } else { } if (1 == (int)bStlNon1284_3Found) { - { tmp___1 = PptCheckIfStlProductId(DeviceExtension, idx); } + { + tmp___1 = PptCheckIfStlProductId(DeviceExtension, idx); + } if (1 == (int)tmp___1) { bStlNon1284_3Valid = 1; goto __Cont; @@ -4758,7 +4812,8 @@ BOOLEAN PptSend1284_3Command(PDEVICE_EXTENSION DeviceExtension, UCHAR Command) { } else { } if (!success) { - {} + { + } } else { } goto switch_99_break; @@ -4772,7 +4827,8 @@ BOOLEAN PptSend1284_3Command(PDEVICE_EXTENSION DeviceExtension, UCHAR Command) { } else { } if (!success) { - {} + { + } } else { } goto switch_99_break; @@ -4960,7 +5016,9 @@ NTSTATUS PptDetectPortCapabilities(PDEVICE_EXTENSION Extension) { if (!Extension->NationalChipFound) { {} {} { PptDetectEppPortIfDot3DevicePresent(Extension); } if (!Extension->CheckedForGenericEpp) { - { PptDetectEppPortIfUserRequested(Extension); } + { + PptDetectEppPortIfUserRequested(Extension); + } } else { } } else { @@ -4979,7 +5037,8 @@ NTSTATUS PptDetectPortCapabilities(PDEVICE_EXTENSION Extension) { } {} { PptDetectBytePort(Extension); } if (Extension->PnpInfo.HardwareCapabilities & 11UL) { - {} + { + } return (0L); } else { } @@ -5000,7 +5059,8 @@ void PptDetectEcpPort(PDEVICE_EXTENSION Extension) { wPortDCR = Controller + 2; if ((unsigned int)((PUCHAR)0) == (unsigned int)Extension->PnpInfo.EcpController) { - {} + { + } return; } else { } @@ -5091,7 +5151,8 @@ void PptDetectEppPortIfDot3DevicePresent(PDEVICE_EXTENSION Extension) { Forward = (unsigned char)6; daisyChainDevicePresent = 0; if (0UL == Extension->PnpInfo.Ieee1284_3DeviceCount) { - {} + { + } return; } else { } @@ -5102,7 +5163,8 @@ void PptDetectEppPortIfDot3DevicePresent(PDEVICE_EXTENSION Extension) { status = PptTrySelectDevice(Extension, &Command); } if (!(status >= 0L)) { - {} + { + } return; } else { } @@ -5114,7 +5176,8 @@ void PptDetectEppPortIfDot3DevicePresent(PDEVICE_EXTENSION Extension) { status = PptDeselectDevice(Extension, &Command); } if (!(status >= 0L)) { - {} + { + } } else { {} } @@ -5127,7 +5190,9 @@ void PptDetectEppPortIfUserRequested(PDEVICE_EXTENSION Extension) { { RequestEppTest = 0; if (RequestEppTest) { - { PptDetectEppPort(Extension); } + { + PptDetectEppPort(Extension); + } } else { } return; @@ -5172,7 +5237,8 @@ void PptDetectEppPort(PDEVICE_EXTENSION Extension) { Extension->CheckedForGenericEpp = 1; } if (Extension->PnpInfo.HardwareCapabilities & 2UL) { - {} + { + } } else { {} } @@ -5186,7 +5252,8 @@ void PptDetectBytePort(PDEVICE_EXTENSION Extension) { Status = 0L; {} { Status = PptSetByteMode(Extension, 52); } if (Status >= 0L) { - {} + { + } Extension->PnpInfo.HardwareCapabilities |= 8UL; } else { {} @@ -5262,7 +5329,9 @@ void PptDetermineFifoDepth(PDEVICE_EXTENSION Extension) { } { testData = READ_PORT_UCHAR(wPortDFIFO); } if ((int)testData != ((int)readFifoDepth & 255)) { - { WRITE_PORT_UCHAR(wPortECR, ecrLast); } + { + WRITE_PORT_UCHAR(wPortECR, ecrLast); + } {} return; } else { @@ -5318,7 +5387,8 @@ NTSTATUS PptSetChipMode(PDEVICE_EXTENSION Extension, UCHAR ChipMode) { EcrMode = (unsigned char)((int)ChipMode & -32); {} if (Extension->PnpInfo.CurrentMode != 0UL) { - {} + { + } Status = -1073741436L; goto ExitSetChipModeNoChange; } else { @@ -5332,7 +5402,8 @@ NTSTATUS PptSetChipMode(PDEVICE_EXTENSION Extension, UCHAR ChipMode) { {} if ((int)EcrMode == 96) { if ((Extension->PnpInfo.HardwareCapabilities & 1UL) ^ 1UL) { - {} + { + } return (-1073741810L); } else { } @@ -5342,7 +5413,8 @@ NTSTATUS PptSetChipMode(PDEVICE_EXTENSION Extension, UCHAR ChipMode) { } if ((int)EcrMode == 128) { if ((Extension->PnpInfo.HardwareCapabilities & 2UL) ^ 2UL) { - {} + { + } return (-1073741810L); } else { } @@ -5352,7 +5424,8 @@ NTSTATUS PptSetChipMode(PDEVICE_EXTENSION Extension, UCHAR ChipMode) { } if ((int)EcrMode == 32) { if ((Extension->PnpInfo.HardwareCapabilities & 8UL) ^ 8UL) { - {} + { + } return (-1073741810L); } else { } @@ -5363,7 +5436,8 @@ NTSTATUS PptSetChipMode(PDEVICE_EXTENSION Extension, UCHAR ChipMode) { } ExitSetChipModeWithChanges: if (Status >= 0L) { - {} + { + } Extension->PnpInfo.CurrentMode = EcrMode; } else { {} @@ -5381,7 +5455,8 @@ NTSTATUS PptClearChipMode(PDEVICE_EXTENSION Extension, UCHAR ChipMode) { EcrMode = (int)ChipMode & -32; {} if (EcrMode != Extension->PnpInfo.CurrentMode) { - {} + { + } Status = -1073741436L; goto ExitClearChipModeNoChange; } else { @@ -5394,24 +5469,31 @@ NTSTATUS PptClearChipMode(PDEVICE_EXTENSION Extension, UCHAR ChipMode) { } else { {} if (EcrMode == 96UL) { - { Status = PptEcrClearMode(Extension); } + { + Status = PptEcrClearMode(Extension); + } goto ExitClearChipModeWithChanges; } else { } if (EcrMode == 128UL) { - { Status = PptEcrClearMode(Extension); } + { + Status = PptEcrClearMode(Extension); + } goto ExitClearChipModeWithChanges; } else { } if (EcrMode == 32UL) { - { Status = PptClearByteMode(Extension); } + { + Status = PptClearByteMode(Extension); + } goto ExitClearChipModeWithChanges; } else { } } ExitClearChipModeWithChanges: if (Status >= 0L) { - {} + { + } Extension->PnpInfo.CurrentMode = 0; } else { } @@ -5444,7 +5526,9 @@ NTSTATUS PptSetByteMode(PDEVICE_EXTENSION Extension, UCHAR ChipMode) { { if (Extension->PnpInfo.HardwareCapabilities & 1UL) { - { Status = PptEcrSetMode(Extension, ChipMode); } + { + Status = PptEcrSetMode(Extension, ChipMode); + } } else { } { Status = PptCheckByteMode(Extension); } @@ -5457,7 +5541,9 @@ NTSTATUS PptClearByteMode(PDEVICE_EXTENSION Extension) { { Status = 0L; if (Extension->PnpInfo.HardwareCapabilities & 1UL) { - { Status = PptEcrClearMode(Extension); } + { + Status = PptEcrClearMode(Extension); + } } else { } return (Status); @@ -5551,7 +5637,8 @@ NTSTATUS PptFindNatChip(PDEVICE_EXTENSION Extension) { NationalChecked = 0; NationalChipFound = 0; if ((int)Extension->NationalChecked == 1) { - {} + { + } return (0L); } else { } @@ -5574,7 +5661,8 @@ NTSTATUS PptFindNatChip(PDEVICE_EXTENSION Extension) { Resources = (struct _CM_RESOURCE_LIST *)tmp; } if ((unsigned int)Resources == (unsigned int)((void *)0)) { - {} + { + } return (-1073741823L); } else { } @@ -5596,12 +5684,14 @@ NTSTATUS PptFindNatChip(PDEVICE_EXTENSION Extension) { /* ExFreePool(Resources); */ /* INLINED */ } if (!(Status >= 0L)) { - {} + { + } return (Status); } else { } if (Conflict) { - {} + { + } return (-1073741823L); } else { } @@ -5623,7 +5713,9 @@ NTSTATUS PptFindNatChip(PDEVICE_EXTENSION Extension) { tmp___1 = READ_PORT_UCHAR(PortAddr); } if ((int)tmp___1 == 136) { - { tmp___2 = READ_PORT_UCHAR(PortAddr); } + { + tmp___2 = READ_PORT_UCHAR(PortAddr); + } if ((int)tmp___2 < 32) { OkToLook = 1; } else { @@ -5636,7 +5728,9 @@ NTSTATUS PptFindNatChip(PDEVICE_EXTENSION Extension) { cr = READ_PORT_UCHAR(PortAddr); } if ((int)cr != 255) { - { tmp___0 = READ_PORT_UCHAR(PortAddr); } + { + tmp___0 = READ_PORT_UCHAR(PortAddr); + } if ((int)tmp___0 == (int)cr) { OkToLook = 1; } else { @@ -5928,7 +6022,8 @@ PDEVICE_RELATIONS PptPnpBuildRemovalRelations(PDEVICE_EXTENSION Extension) { /* ExAcquireFastMutex(& Extension->ExtensionFastMutex); */ /* INLINED */ } if ((unsigned int)listHead->Flink == (unsigned int)listHead) { - {} + { + } goto targetExit; } else { } @@ -5970,7 +6065,8 @@ PDEVICE_RELATIONS PptPnpBuildRemovalRelations(PDEVICE_EXTENSION Extension) { count += 1UL; } if (!firstListEntry) { - {} + { + } firstListEntry = thisListEntry; } else { } @@ -5986,7 +6082,8 @@ PDEVICE_RELATIONS PptPnpBuildRemovalRelations(PDEVICE_EXTENSION Extension) { relations = tmp; } if (!relations) { - {} + { + } goto targetExit; } else { } @@ -6196,13 +6293,15 @@ BOOLEAN PptIsPci(PDEVICE_EXTENSION Extension, PIRP Irp) { ResourceList = irpStack->Parameters.StartDevice.AllocatedResourcesTranslated; if ((unsigned int)ResourceList == (unsigned int)((void *)0)) { - {} + { + } return (0); } else { } FullResourceDescriptor = &ResourceList->List[0]; if (FullResourceDescriptor) { - {} + { + } PartialResourceList = &FullResourceDescriptor->PartialResourceList; i = 0; { @@ -6226,7 +6325,8 @@ BOOLEAN PptIsPci(PDEVICE_EXTENSION Extension, PIRP Irp) { {} portResourceDescriptorCount += 1UL; if (rangeLength > 8UL) { - {} + { + } largePortRangeFound = 1; } else { } @@ -6299,7 +6399,8 @@ NTSTATUS PptPnpAddDevice(PDRIVER_OBJECT pDriverObject, PptBuildDeviceObject(pDriverObject, pPhysicalDeviceObject); } if ((unsigned int)((void *)0) == (unsigned int)pDeviceObject) { - {} + { + } return (-1073741823L); } else { } @@ -6351,7 +6452,9 @@ NTSTATUS PptDispatchPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { .CurrentStackLocation; minorFunction = irpStack->MinorFunction; if ((int)minorFunction > 24) { - { status = PptPnpUnhandledIrp(DeviceObject, Irp); } + { + status = PptPnpUnhandledIrp(DeviceObject, Irp); + } } else { if (__BLAST_NONDET == 0) { goto switch_214_0; @@ -6511,7 +6614,9 @@ NTSTATUS PptPnpStartDevice(PDEVICE_OBJECT DeviceObject, PIRP Irp) { status = PptDetectChipFilter(extension); } if (!(status >= 0L)) { - { PptDetectPortType(extension); } + { + PptDetectPortType(extension); + } } else { } { status = PptWmiInitWmi(DeviceObject); } @@ -6573,14 +6678,17 @@ NTSTATUS PptPnpStartScanCmResourceList(PDEVICE_EXTENSION Extension, PIRP Irp, ResourceList = irpStack->Parameters.StartDevice.AllocatedResourcesTranslated; if ((unsigned int)ResourceList == (unsigned int)((void *)0)) { - {} + { + } status = -1073741670L; goto targetExit; } else { } if ((int)((KUSER_SHARED_DATA *const)4292804608U)->AlternativeArchitecture != 1) { - { tmp = PptIsPci(Extension, Irp); } + { + tmp = PptIsPci(Extension, Irp); + } if (1 == (int)tmp) { {} { status = PptPnpStartScanPciCardCmResourceList( @@ -6630,7 +6738,8 @@ NTSTATUS PptPnpStartScanCmResourceList(PDEVICE_EXTENSION Extension, PIRP Irp, .__annonCompField1.LowPart == 0UL) { if (Extension->PortInfo.OriginalController .__annonCompField1.HighPart == 0L) { - {} + { + } Extension->PortInfo.OriginalController = PartialResourceDescriptor->u.Port.Start; Extension->PortInfo.SpanOfController = @@ -6641,7 +6750,9 @@ NTSTATUS PptPnpStartScanCmResourceList(PDEVICE_EXTENSION Extension, PIRP Irp, Extension->AddressSpace = PartialResourceDescriptor->Flags; if (Extension->PortInfo.SpanOfController == 4096UL) { - { tmp___0 = PptIsNecR98Machine(); } + { + tmp___0 = PptIsNecR98Machine(); + } if (tmp___0) { Extension->PortInfo.SpanOfController = 8; } else { @@ -6667,7 +6778,8 @@ NTSTATUS PptPnpStartScanCmResourceList(PDEVICE_EXTENSION Extension, PIRP Irp, .__annonCompField1.HighPart < Extension->PortInfo.OriginalController .__annonCompField1.HighPart) { - {} + { + } Extension->PnpInfo.OriginalEcpController = Extension->PortInfo.OriginalController; Extension->PnpInfo.SpanOfEcpController = @@ -6688,7 +6800,9 @@ NTSTATUS PptPnpStartScanCmResourceList(PDEVICE_EXTENSION Extension, PIRP Irp, PartialResourceDescriptor->Flags; if (Extension->PortInfo.SpanOfController == 4096UL) { - { tmp___1 = PptIsNecR98Machine(); } + { + tmp___1 = PptIsNecR98Machine(); + } if (tmp___1) { Extension->PortInfo.SpanOfController = 8; } else { @@ -6941,7 +7055,8 @@ BOOLEAN PptPnpFilterExistsNonIrqResourceList( } {} if ((int)curDesc->Type == 2) { - {} + { + } foundIrq = 1; goto while_243_break; } else { @@ -6952,7 +7067,8 @@ BOOLEAN PptPnpFilterExistsNonIrqResourceList( while_243_break: /* CIL Label */; } if ((int)foundIrq == 0) { - {} + { + } return (1); } else { } @@ -6996,7 +7112,8 @@ void PptPnpFilterRemoveIrqResourceLists( } {} {} { tmp___0 = PptPnpListContainsIrqResourceDescriptor(curList); } if (tmp___0) { - {} + { + } nextList = (struct _IO_RESOURCE_LIST *)(curList->Descriptors + curList->Count); bytesToMove = @@ -7142,13 +7259,15 @@ NTSTATUS PptPnpQueryDeviceRelations(PDEVICE_OBJECT DeviceObject, PIRP Irp) { switch_261_3: /* CIL Label */; {} { PptDumpRemovalRelationsList(extension); } if (Irp->IoStatus.Information) { - {} + { + } } else { { removalRelations = PptPnpBuildRemovalRelations(extension); } if (removalRelations) { - {} + { + } Irp->IoStatus.__annonCompField4.Status = 0L; myStatus = 0L; Irp->IoStatus.Information = @@ -7416,10 +7535,14 @@ NTSTATUS PptPnpBounceAndCatchPnpIrp(PDEVICE_EXTENSION Extension, PIRP Irp) { nextIrpSp->Control = 0; } if (s != NP) { - { errorFn(); } + { + errorFn(); + } } else { if (compRegistered != 0) { - { errorFn(); } + { + errorFn(); + } } else { compRegistered = 1; compFptr = &PptSynchCompletionRoutine; @@ -7682,7 +7805,9 @@ NTSTATUS PptDispatchPower(PDEVICE_OBJECT pDeviceObject, PIRP pIrp) { hookit = 1; if ((int)((KUSER_SHARED_DATA *const)4292804608U) ->AlternativeArchitecture == 1) { - { InitNEC_98(Extension); } + { + InitNEC_98(Extension); + } } else { } } else { @@ -7743,10 +7868,14 @@ NTSTATUS PptDispatchPower(PDEVICE_OBJECT pDeviceObject, PIRP pIrp) { } else { if (hookit) { if (s != NP) { - { errorFn(); } + { + errorFn(); + } } else { if (compRegistered != 0) { - { errorFn(); } + { + errorFn(); + } } else { compRegistered = 1; compFptr = &PptPowerComplete; @@ -7905,17 +8034,22 @@ NTSTATUS PptTrySelectLegacyZip(PVOID Context, PVOID TrySelectCommand) { if (Status >= 0L) { if (Status != 259L) { if (Command->CommandFlags & 32UL) { - { PptLegacyZipSetDiskMode(Controller, (unsigned char)207); } + { + PptLegacyZipSetDiskMode(Controller, (unsigned char)207); + } } else { { PptLegacyZipSetDiskMode(Controller, (unsigned char)143); } } { tmp = PptLegacyZipCheckDevice(Controller); } if (tmp) { - {} + { + } if (!Extension->CheckedForGenericEpp) { if (Extension->PnpInfo.HardwareCapabilities & 1UL) { if (!Extension->NationalChipFound) { - { PptDetectEppPort(Extension); } + { + PptDetectEppPort(Extension); + } } else { } } else { @@ -7951,7 +8085,9 @@ NTSTATUS PptDeselectLegacyZip(PVOID Context, PVOID DeselectCommand) { PptLegacyZipClockPrtModeByte(Controller, (unsigned char)15); } if (!(Command->CommandFlags & 2UL)) { - { PptFreePort(Extension); } + { + PptFreePort(Extension); + } } else { } return (0L); @@ -8078,7 +8214,8 @@ NTSTATUS PptRegSetDeviceParameterDword(PDEVICE_OBJECT Pdo, PWSTR ParameterName, { { status = IoOpenDeviceRegistryKey(Pdo, 1, 131078L, &hKey); } if (!(status >= 0L)) { - {} + { + } return (status); } else { } @@ -8088,7 +8225,8 @@ NTSTATUS PptRegSetDeviceParameterDword(PDEVICE_OBJECT Pdo, PWSTR ParameterName, ZwSetValueKey(hKey, &valueName, 0, 4, ParameterValue, sizeof(ULONG)); } if (!(status >= 0L)) { - {} + { + } } else { } { ZwClose(hKey); } @@ -8150,7 +8288,9 @@ NTSTATUS PptAcquireRemoveLockOrFailIrp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { status = tmp; } if (!(status >= 0L)) { - { PptFailRequest(Irp, status); } + { + PptFailRequest(Irp, status); + } } else { } return (status); @@ -8210,7 +8350,8 @@ PWSTR PptGetPortNameFromPhysicalDeviceObject( IoOpenDeviceRegistryKey(PhysicalDeviceObject, 1, 2031616L, &hKey); } if (!(status >= 0L)) { - {} + { + } return ((void *)0); } else { } @@ -8750,7 +8891,8 @@ NTSTATUS PptBuildParallelPortDeviceName(ULONG Number, status = RtlIntegerToUnicodeString(Number, 10, &uniPortNumberString); } if (!(status >= 0L)) { - {} + { + } return (status); } else { } @@ -8764,7 +8906,8 @@ NTSTATUS PptBuildParallelPortDeviceName(ULONG Number, DeviceName->Buffer = tmp; } if ((unsigned int)((void *)0) == (unsigned int)DeviceName->Buffer) { - {} + { + } return (-1073741670L); } else { } @@ -8857,7 +9000,8 @@ NTSTATUS PptGetPortNumberFromLptName(PWSTR PortName, PULONG PortNumber) { { if (__BLAST_NONDET) { - {} + { + } return (-1073741823L); } else { } @@ -8866,12 +9010,14 @@ NTSTATUS PptGetPortNumberFromLptName(PWSTR PortName, PULONG PortNumber) { status = RtlUnicodeStringToInteger(&str, 10, PortNumber); } if (!(status >= 0L)) { - {} + { + } return (-1073741823L); } else { } if (*PortNumber == 0UL) { - {} + { + } return (-1073741823L); } else { } @@ -8899,7 +9045,8 @@ PDEVICE_OBJECT PptBuildDeviceObject(PDRIVER_OBJECT DriverObject, portName = PptGetPortNameFromPhysicalDeviceObject(PhysicalDeviceObject); } if ((unsigned int)((void *)0) == (unsigned int)portName) { - {} + { + } goto targetExit; } else { } @@ -8923,7 +9070,8 @@ PDEVICE_OBJECT PptBuildDeviceObject(PDRIVER_OBJECT DriverObject, &uniNameString, 22, 256, 0, &deviceObject); } if (-1073741771L == status) { - {} + { + } portNumber = 7; { while (1) { @@ -9361,7 +9509,9 @@ int main(void) { } } if (we_should_unload) { - { PptUnload(&d); } + { + PptUnload(&d); + } } else { } } else { @@ -9391,7 +9541,9 @@ int main(void) { if (s != SKIP2) { if (s != IPC) { if (s != DC) { - { errorFn(); } + { + errorFn(); + } } else { goto _L___0; } @@ -9402,18 +9554,24 @@ int main(void) { _L___0: /* CIL Label */ if (pended == 1) { if (status != 259L) { - { errorFn(); } + { + errorFn(); + } } else { } } else { if (s == DC) { if (status == 259L) { - { errorFn(); } + { + errorFn(); + } } else { } } else { if (status != (NTSTATUS)lowerDriverReturn) { - { errorFn(); } + { + errorFn(); + } } else { } } @@ -9857,7 +10015,9 @@ NTSTATUS IofCallDriver(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } } if ((long)compRetStatus == -1073741802L) { - { stubMoreProcessingRequired(); } + { + stubMoreProcessingRequired(); + } } else { } } else { @@ -10011,7 +10171,9 @@ NTSTATUS KeWaitForSingleObject(PVOID Object, KWAIT_REASON WaitReason, customIrp = 0; } else { if (s == MPR3) { - { errorFn(); } + { + errorFn(); + } } else { } } @@ -10157,7 +10319,9 @@ NTSTATUS PoCallDriver(PDEVICE_OBJECT DeviceObject, PIRP Irp) { } } if ((long)compRetStatus == -1073741802L) { - { stubMoreProcessingRequired(); } + { + stubMoreProcessingRequired(); + } } else { } } else { From 0a302c945574cafb2dfce69cdee51816c778e79d Mon Sep 17 00:00:00 2001 From: Zvonimir Date: Fri, 26 Jul 2019 13:47:51 -0600 Subject: [PATCH 7/8] Added half-precision float type to handling of constants --- lib/smack/SmackRep.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/smack/SmackRep.cpp b/lib/smack/SmackRep.cpp index 6fbc645aa..be0bdf4e7 100644 --- a/lib/smack/SmackRep.cpp +++ b/lib/smack/SmackRep.cpp @@ -647,7 +647,10 @@ const Expr *SmackRep::lit(const llvm::Value *v, bool isUnsigned) { const APFloat APF = CFP->getValueAPF(); const Type *type = CFP->getType(); unsigned expSize, sigSize; - if (type->isFloatTy()) { + if (type->isHalfTy()) { + expSize = 5; + sigSize = 11; + } else if (type->isFloatTy()) { expSize = 8; sigSize = 24; } else if (type->isDoubleTy()) { From a981734547fe3d4e518cd09c077d8616fd39afb7 Mon Sep 17 00:00:00 2001 From: Zvonimir Date: Sun, 28 Jul 2019 14:54:09 -0600 Subject: [PATCH 8/8] Bumped version number to 2.2.0 --- Doxyfile | 2 +- share/smack/reach.py | 2 +- share/smack/top.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Doxyfile b/Doxyfile index 2b459766a..67c0f7512 100644 --- a/Doxyfile +++ b/Doxyfile @@ -5,7 +5,7 @@ #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = smack -PROJECT_NUMBER = 2.1.0 +PROJECT_NUMBER = 2.2.0 PROJECT_BRIEF = "A bounded software verifier." PROJECT_LOGO = OUTPUT_DIRECTORY = docs diff --git a/share/smack/reach.py b/share/smack/reach.py index ab212e1f2..7e491684d 100755 --- a/share/smack/reach.py +++ b/share/smack/reach.py @@ -11,7 +11,7 @@ from smackgen import * from smackverify import * -VERSION = '2.1.0' +VERSION = '2.2.0' def reachParser(): parser = argparse.ArgumentParser(add_help=False, parents=[verifyParser()]) diff --git a/share/smack/top.py b/share/smack/top.py index e3927fd28..a161d6a33 100755 --- a/share/smack/top.py +++ b/share/smack/top.py @@ -15,7 +15,7 @@ from replay import replay_error_trace from frontend import link_bc_files, frontends, languages, extra_libs -VERSION = '2.1.0' +VERSION = '2.2.0' def results(args): """A dictionary of the result output messages."""