[device] Introduce device header and move details there
authorShao Miller <Shao.Miller@yrdsb.edu.on.ca>
Tue, 18 May 2010 20:39:41 +0000 (16:39 -0400)
committerShao Miller <Shao.Miller@yrdsb.edu.on.ca>
Tue, 18 May 2010 20:39:41 +0000 (16:39 -0400)
Move device specifics out of the driver header and into a
device headers, instead.  We are on our way to a form of
device functionality inheritance...  Something like:

  device
  ..bus
  ..disk
  ....aoe
  ....ramdisk
  ....filedisk

"And the rest." - Gilligan's Island

22 files changed:
WinVBlock.dev
src/aoe/driver.c
src/aoe/protocol.c
src/include/device.h [new file with mode: 0644]
src/include/disk.h
src/include/driver.h
src/winvblock/bus/bus.c
src/winvblock/bus/dev_ctl.c
src/winvblock/bus/pnp.c
src/winvblock/debug.c
src/winvblock/disk/dev_ctl.c
src/winvblock/disk/disk.c
src/winvblock/disk/pnp.c
src/winvblock/disk/scsi.c
src/winvblock/driver.c
src/winvblock/filedisk.c
src/winvblock/irp.c
src/winvblock/probe.c
src/winvblock/ramdisk/grub4dos.c
src/winvblock/ramdisk/memdisk.c
src/winvblock/ramdisk/ramdisk.c
src/winvblock/registry.c

index e8bf9b0..66fd257 100644 (file)
 [Project]\r
 FileName=WinVBlock.dev\r
 Name=WinVBlock\r
-UnitCount=52\r
+UnitCount=54\r
 PchHead=-1\r
 PchSource=-1\r
 Ver=3\r
 IsCpp=1\r
 ProfilesCount=2\r
 ProfileIndex=0\r
-Folders=AoE,HTTPDisk,HTTPDisk_Util\r
+Folders=AoE,HTTPDisk,HTTPDisk_Util,Include,Util,WinVBlock,WinVBlock/Bus,WinVBlock/Disk,WinVBlock/RAMDisk\r
 \r
-[Unit1]\r
-FileName=src\loader\loader.c\r
+[VersionInfo]\r
+Major=0\r
+Minor=1\r
+Release=1\r
+Build=1\r
+LanguageID=1033\r
+CharsetID=1252\r
+CompanyName=\r
+FileVersion=\r
+FileDescription=\r
+InternalName=\r
+LegalCopyright=\r
+LegalTrademarks=\r
+OriginalFilename=\r
+ProductName=\r
+ProductVersion=\r
+AutoIncBuildNrOnRebuild=0\r
+AutoIncBuildNrOnCompile=0\r
+\r
+[Profile1]\r
+ProfileName=Mingw 3.4.2\r
+Type=1\r
+ObjFiles=\r
+Includes=\r
+Libs=\r
+ResourceIncludes=\r
+MakeIncludes=\r
+Compiler=\r
+CppCompiler=\r
+Linker=\r
+PreprocDefines=\r
+CompilerSettings=0000000000000000000000\r
+Icon=\r
+ExeOutput=Output\MingW\r
+ObjectOutput=Objects\MingW\r
+OverrideOutput=0\r
+OverrideOutputName=WinVBlock.exe\r
+HostApplication=\r
+CommandLine=\r
+UseCustomMakefile=0\r
+CustomMakefile=\r
+IncludeVersionInfo=0\r
+SupportXPThemes=0\r
+CompilerSet=0\r
+CompilerType=0\r
+\r
+[Profile2]\r
+ProfileName=MS VC++ 2005\r
+Type=1\r
+ObjFiles=\r
+Includes=\r
+Libs=\r
+ResourceIncludes=\r
+MakeIncludes=\r
+Compiler=\r
+CppCompiler=\r
+Linker=\r
+PreprocDefines=\r
+CompilerSettings=000000000000010000000000000000000000\r
+Icon=\r
+ExeOutput=Output\MSVC++2005\r
+ObjectOutput=Objects\MSVC++2005\r
+OverrideOutput=0\r
+OverrideOutputName=\r
+HostApplication=\r
+CommandLine=\r
+UseCustomMakefile=0\r
+CustomMakefile=\r
+IncludeVersionInfo=0\r
+SupportXPThemes=0\r
+CompilerSet=1\r
+CompilerType=1\r
+\r
+[Unit21]\r
+FileName=src\winvblock\disk\disk.c\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=WinVBlock/Disk\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit2]\r
-FileName=src\util\mount.c\r
+[Unit23]\r
+FileName=src\winvblock\disk\scsi.c\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=WinVBlock/Disk\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit4]\r
-FileName=src\bus\bus_dev_ctl.c\r
+[Unit22]\r
+FileName=src\winvblock\disk\pnp.c\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=WinVBlock/Disk\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit5]\r
-FileName=src\bus\bus_pnp.c\r
-CompileCpp=1\r
-Folder=WinVBlock\r
+[Unit24]\r
+FileName=src\winvblock\ramdisk\grub4dos.c\r
+Folder=WinVBlock/RAMDisk\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
+CompileCpp=1\r
 \r
-[Unit6]\r
-FileName=src\bus\debug.c\r
+[Unit25]\r
+FileName=src\winvblock\ramdisk\memdisk.c\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=WinVBlock/RAMDisk\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit8]\r
-FileName=src\bus\disk_dev_ctl.c\r
+[Unit26]\r
+FileName=src\winvblock\ramdisk\ramdisk.c\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=WinVBlock/RAMDisk\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit9]\r
-FileName=src\bus\disk_pnp.c\r
+[Unit27]\r
+FileName=src\winvblock\winvblock.rc\r
 CompileCpp=1\r
 Folder=WinVBlock\r
 Compile=1\r
-Link=1\r
+Link=0\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit10]\r
-FileName=src\bus\disk_scsi.c\r
+[Unit28]\r
+FileName=src\include\aoe.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit11]\r
-FileName=src\bus\driver.c\r
+[Unit29]\r
+FileName=src\include\bus.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit12]\r
-FileName=src\bus\filedisk.c\r
+[Unit30]\r
+FileName=src\include\bus_dev_ctl.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit13]\r
-FileName=src\bus\grub4dos.c\r
+[Unit31]\r
+FileName=src\include\bus_pnp.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit14]\r
-FileName=src\bus\memdisk.c\r
+[Unit32]\r
+FileName=src\include\debug.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit15]\r
-FileName=src\bus\probe.c\r
+[Unit33]\r
+FileName=src\include\disk.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit17]\r
-FileName=src\bus\registry.c\r
+[Unit34]\r
+FileName=src\include\disk_dev_ctl.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[VersionInfo]\r
-Major=0\r
-Minor=1\r
-Release=1\r
-Build=1\r
-LanguageID=1033\r
-CharsetID=1252\r
-CompanyName=\r
-FileVersion=\r
-FileDescription=\r
-InternalName=\r
-LegalCopyright=\r
-LegalTrademarks=\r
-OriginalFilename=\r
-ProductName=\r
-ProductVersion=\r
-AutoIncBuildNrOnRebuild=0\r
-AutoIncBuildNrOnCompile=0\r
-\r
-[Profile1]\r
-ProfileName=Mingw 3.4.2\r
-Type=1\r
-ObjFiles=\r
-Includes=\r
-Libs=\r
-ResourceIncludes=\r
-MakeIncludes=\r
-Compiler=\r
-CppCompiler=\r
-Linker=\r
-PreprocDefines=\r
-CompilerSettings=0000000000000000000000\r
-Icon=\r
-ExeOutput=Output\MingW\r
-ObjectOutput=Objects\MingW\r
-OverrideOutput=0\r
-OverrideOutputName=WinVBlock.exe\r
-HostApplication=\r
-CommandLine=\r
-UseCustomMakefile=0\r
-CustomMakefile=\r
-IncludeVersionInfo=0\r
-SupportXPThemes=0\r
-CompilerSet=0\r
-CompilerType=0\r
-\r
-[Profile2]\r
-ProfileName=MS VC++ 2005\r
-Type=1\r
-ObjFiles=\r
-Includes=\r
-Libs=\r
-ResourceIncludes=\r
-MakeIncludes=\r
-Compiler=\r
-CppCompiler=\r
-Linker=\r
-PreprocDefines=\r
-CompilerSettings=000000000000010000000000000000000000\r
-Icon=\r
-ExeOutput=Output\MSVC++2005\r
-ObjectOutput=Objects\MSVC++2005\r
-OverrideOutput=0\r
-OverrideOutputName=\r
-HostApplication=\r
-CommandLine=\r
-UseCustomMakefile=0\r
-CustomMakefile=\r
-IncludeVersionInfo=0\r
-SupportXPThemes=0\r
-CompilerSet=1\r
-CompilerType=1\r
-\r
-[Unit7]\r
-FileName=src\bus\disk.c\r
+[Unit35]\r
+FileName=src\include\disk_pnp.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit20]\r
-FileName=src\include\bus_dev_ctl.h\r
+[Unit36]\r
+FileName=src\include\disk_scsi.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit21]\r
-FileName=src\include\bus_pnp.h\r
+[Unit19]\r
+FileName=src\winvblock\bus\pnp.c\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=WinVBlock/Bus\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit18]\r
-FileName=src\include\aoe.h\r
+[Unit37]\r
+FileName=src\include\driver.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit23]\r
-FileName=src\include\disk.h\r
+[Unit38]\r
+FileName=src\include\filedisk.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit22]\r
-FileName=src\include\debug.h\r
+[Unit39]\r
+FileName=src\include\grub4dos.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit24]\r
-FileName=src\include\disk_dev_ctl.h\r
-Folder=WinVBlock\r
+[Unit40]\r
+FileName=src\include\httpdisk.h\r
+CompileCpp=1\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
-CompileCpp=1\r
 \r
-[Unit25]\r
-FileName=src\include\disk_pnp.h\r
+[Unit41]\r
+FileName=src\include\irp.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit26]\r
-FileName=src\include\disk_scsi.h\r
+[Unit42]\r
+FileName=src\include\mdi.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit27]\r
-FileName=src\include\driver.h\r
-CompileCpp=1\r
-Folder=WinVBlock\r
+[Unit43]\r
+FileName=src\include\memdisk.h\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
+CompileCpp=1\r
 \r
-[Unit28]\r
-FileName=src\include\filedisk.h\r
+[Unit44]\r
+FileName=src\include\mount.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit29]\r
-FileName=src\include\grub4dos.h\r
+[Unit45]\r
+FileName=src\include\portable.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit30]\r
-FileName=src\include\irp.h\r
+[Unit46]\r
+FileName=src\include\probe.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit31]\r
-FileName=src\include\mdi.h\r
-CompileCpp=1\r
-Folder=WinVBlock\r
+[Unit47]\r
+FileName=src\include\protocol.h\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
+CompileCpp=1\r
 \r
-[Unit32]\r
-FileName=src\include\memdisk.h\r
+[Unit48]\r
+FileName=src\include\ramdisk.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit33]\r
-FileName=src\include\mount.h\r
+[Unit49]\r
+FileName=src\include\registry.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit34]\r
-FileName=src\include\portable.h\r
+[Unit50]\r
+FileName=src\include\resource.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit35]\r
-FileName=src\include\probe.h\r
-CompileCpp=1\r
-Folder=WinVBlock\r
+[Unit51]\r
+FileName=src\include\winvblock.h\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
+CompileCpp=1\r
 \r
-[Unit36]\r
-FileName=src\include\protocol.h\r
+[Unit52]\r
+FileName=src\util\mount.c\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=Util\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit19]\r
-FileName=src\include\bus.h\r
+[Unit1]\r
+FileName=src\aoe\driver.c\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=AoE\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit37]\r
-FileName=src\include\ramdisk.h\r
+[Unit2]\r
+FileName=src\aoe\protocol.c\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=AoE\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit38]\r
-FileName=src\include\registry.h\r
+[Unit3]\r
+FileName=src\httpdisk\ktdi.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=HTTPDisk\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit39]\r
-FileName=src\include\resource.h\r
+[Unit4]\r
+FileName=src\httpdisk\httpdisk.c\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=HTTPDisk\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit40]\r
-FileName=src\include\winvblock.h\r
+[Unit5]\r
+FileName=src\httpdisk\httpdisk.rc\r
+Folder=HTTPDisk\r
+Compile=1\r
+Link=0\r
+Priority=1000\r
+OverrideBuildCmd=0\r
+BuildCmd=\r
+\r
+[Unit6]\r
+FileName=src\httpdisk\ksocket.c\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=HTTPDisk\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit41]\r
-FileName=src\bus\winvblock.rc\r
+[Unit7]\r
+FileName=src\httpdisk\ksocket.h\r
 CompileCpp=1\r
-Folder=WinVBlock\r
+Folder=HTTPDisk\r
 Compile=1\r
-Link=0\r
+Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit42]\r
-FileName=src\aoe\driver.c\r
+[Unit8]\r
+FileName=src\httpdisk\ktdi.c\r
 CompileCpp=1\r
-Folder=AoE\r
+Folder=HTTPDisk\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit43]\r
-FileName=src\bus\irp.c\r
-Folder=WinVBlock\r
+[Unit9]\r
+FileName=src\httpdisk_util\httpdisk.rc\r
+Folder=HTTPDisk_Util\r
 Compile=1\r
-Link=1\r
+Link=0\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
+\r
+[Unit10]\r
+FileName=src\httpdisk_util\httpdisk.c\r
 CompileCpp=1\r
+Folder=HTTPDisk_Util\r
+Compile=1\r
+Link=1\r
+Priority=1000\r
+OverrideBuildCmd=0\r
+BuildCmd=\r
 \r
-[Unit44]\r
-FileName=src\aoe\protocol.c\r
+[Unit11]\r
+FileName=src\winvblock\debug.c\r
 CompileCpp=1\r
-Folder=AoE\r
+Folder=WinVBlock\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit45]\r
-FileName=src\httpdisk\ktdi.h\r
+[Unit12]\r
+FileName=src\winvblock\driver.c\r
 CompileCpp=1\r
-Folder=HTTPDisk\r
+Folder=WinVBlock\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit3]\r
-FileName=src\bus\bus.c\r
+[Unit13]\r
+FileName=src\winvblock\filedisk.c\r
 CompileCpp=1\r
 Folder=WinVBlock\r
 Compile=1\r
@@ -523,8 +541,8 @@ Priority=1000
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit16]\r
-FileName=src\bus\ramdisk.c\r
+[Unit14]\r
+FileName=src\winvblock\irp.c\r
 CompileCpp=1\r
 Folder=WinVBlock\r
 Compile=1\r
@@ -533,68 +551,69 @@ Priority=1000
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit46]\r
-FileName=src\httpdisk\httpdisk.c\r
+[Unit15]\r
+FileName=src\winvblock\probe.c\r
 CompileCpp=1\r
-Folder=HTTPDisk\r
+Folder=WinVBlock\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit47]\r
-FileName=src\httpdisk\httpdisk.rc\r
-Folder=HTTPDisk\r
+[Unit16]\r
+FileName=src\winvblock\registry.c\r
+CompileCpp=1\r
+Folder=WinVBlock\r
 Compile=1\r
-Link=0\r
+Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit48]\r
-FileName=src\httpdisk\ksocket.c\r
+[Unit17]\r
+FileName=src\winvblock\bus\bus.c\r
 CompileCpp=1\r
-Folder=HTTPDisk\r
+Folder=WinVBlock/Bus\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit49]\r
-FileName=src\httpdisk\ksocket.h\r
+[Unit18]\r
+FileName=src\winvblock\bus\dev_ctl.c\r
 CompileCpp=1\r
-Folder=HTTPDisk\r
+Folder=WinVBlock/Bus\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit50]\r
-FileName=src\httpdisk\ktdi.c\r
+[Unit20]\r
+FileName=src\winvblock\disk\dev_ctl.c\r
 CompileCpp=1\r
-Folder=HTTPDisk\r
+Folder=WinVBlock/Disk\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit51]\r
-FileName=src\httpdisk_util\httpdisk.rc\r
-Folder=HTTPDisk_Util\r
+[Unit53]\r
+FileName=src\aoe\aoe.rc\r
+Folder=AoE\r
 Compile=1\r
 Link=0\r
 Priority=1000\r
 OverrideBuildCmd=0\r
 BuildCmd=\r
 \r
-[Unit52]\r
-FileName=src\httpdisk_util\httpdisk.c\r
+[Unit54]\r
+FileName=src\include\device.h\r
 CompileCpp=1\r
-Folder=HTTPDisk_Util\r
+Folder=Include\r
 Compile=1\r
 Link=1\r
 Priority=1000\r
index 5a358e6..a40eb71 100644 (file)
@@ -33,6 +33,7 @@
 #include "portable.h"
 #include "irp.h"
 #include "driver.h"
+#include "device.h"
 #include "disk.h"
 #include "mount.h"
 #include "bus.h"
index 4fc92fe..4286a3c 100644 (file)
@@ -34,6 +34,7 @@
 #include "portable.h"
 #include "irp.h"
 #include "driver.h"
+#include "device.h"
 #include "disk.h"
 #include "mount.h"
 #include "aoe.h"
diff --git a/src/include/device.h b/src/include/device.h
new file mode 100644 (file)
index 0000000..c1a0bf3
--- /dev/null
@@ -0,0 +1,127 @@
+/**
+ * Copyright (C) 2009-2010, Shao Miller <shao.miller@yrdsb.edu.on.ca>.
+ * Copyright 2006-2008, V.
+ * For WinAoE contact information, see http://winaoe.org/
+ *
+ * This file is part of WinVBlock, derived from WinAoE.
+ *
+ * WinVBlock is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * WinVBlock is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with WinVBlock.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef _device_h
+#  define _device_h
+
+/**
+ * @file
+ *
+ * Device specifics
+ *
+ */
+
+#  include "portable.h"
+
+enum _device__state
+{
+  NotStarted,
+  Started,
+  StopPending,
+  Stopped,
+  RemovePending,
+  SurpriseRemovePending,
+  Deleted
+};
+winvblock__def_enum ( device__state );
+
+/* Forward declaration */
+winvblock__def_struct ( device__type );
+
+/**
+ * Device PDO creation routine
+ *
+ * @v dev_ptr           The device whose PDO should be created
+ */
+#  define device__create_pdo_decl( x ) \
+\
+PDEVICE_OBJECT STDCALL \
+x ( \
+  IN device__type_ptr dev_ptr \
+ )
+/*
+ * Function pointer for a device initialization routine.
+ * 'indent' mangles this, so it looks weird
+ */
+typedef device__create_pdo_decl (
+   ( *device__create_pdo_routine )
+ );
+
+/**
+ * Device initialization routine
+ *
+ * @v dev_ptr           The device being initialized
+ */
+#  define device__init_decl( x ) \
+\
+winvblock__bool STDCALL \
+x ( \
+  IN device__type_ptr dev_ptr \
+ )
+/*
+ * Function pointer for a device initialization routine.
+ * 'indent' mangles this, so it looks weird
+ */
+typedef device__init_decl (
+   ( *device__init_routine )
+ );
+
+/**
+ * Device close routine
+ *
+ * @v dev_ptr           The device being closed
+ */
+#  define device__close_decl( x ) \
+\
+void STDCALL \
+x ( \
+  IN device__type_ptr dev_ptr \
+ )
+/*
+ * Function pointer for a device close routine.
+ * 'indent' mangles this, so it looks weird
+ */
+typedef device__close_decl (
+   ( *device__close_routine )
+ );
+
+winvblock__def_struct ( device__ops )
+{
+  device__create_pdo_routine create_pdo;
+  device__init_routine init;
+  device__close_routine close;
+};
+
+/* Details common to all devices this driver works with */
+struct _device__type
+{
+  size_t size;
+  winvblock__bool IsBus;       /* For debugging */
+  PDEVICE_OBJECT Self;
+  PDEVICE_OBJECT Parent;
+  PDRIVER_OBJECT DriverObject;
+  device__state State;
+  device__state OldState;
+  irp__handler_chain irp_handler_chain;
+  device__type_ptr next_sibling_ptr;
+  device__ops_ptr ops;
+};
+
+#endif                         /* _device_h */
index caded34..c46c070 100644 (file)
@@ -203,8 +203,8 @@ struct _disk__type
 };
 
 /* Device operations for disks */
-extern driver__dev_ops disk__dev_ops;
-extern winvblock__lib_func driver__dev_ops_ptr disk__get_ops (
+extern device__ops disk__dev_ops;
+extern winvblock__lib_func device__ops_ptr disk__get_ops (
   void
  );
 
index 08fe286..5bec5f0 100644 (file)
 
 #  include "portable.h"
 
-/**
- * #define RIS
- *
- * #define DEBUGIRPS
- * #define DEBUGMOSTPROTOCOLCALLS
- * #define DEBUGALLPROTOCOLCALLS
- */
+/* For testing and debugging */
+#  if 0
+#    define RIS
+#    define DEBUGIRPS
+#    define DEBUGMOSTPROTOCOLCALLS
+#    define DEBUGALLPROTOCOLCALLS
+#  endif
 
 #  define POOLSIZE 2048
 
-enum _driver__state
-{
-  NotStarted,
-  Started,
-  StopPending,
-  Stopped,
-  RemovePending,
-  SurpriseRemovePending,
-  Deleted
-};
-winvblock__def_enum ( driver__state );
-
 extern irp__handling driver__handling_table[];
 extern size_t driver__handling_table_size;
 extern PDRIVER_OBJECT driver__obj_ptr;
 
-/* Forward declaration */
-winvblock__def_struct ( device__type );
-
-/**
- * Device PDO creation routine
- *
- * @v dev_ptr           The device whose PDO should be created
- */
-#  define driver__dev_create_pdo_decl( x ) \
-\
-PDEVICE_OBJECT STDCALL \
-x ( \
-  IN device__type_ptr dev_ptr \
- )
-/*
- * Function pointer for a device initialization routine.
- * 'indent' mangles this, so it looks weird
- */
-typedef driver__dev_create_pdo_decl (
-   ( *driver__dev_create_pdo_routine )
- );
-
-/**
- * Device initialization routine
- *
- * @v dev_ptr           The device being initialized
- */
-#  define driver__dev_init_decl( x ) \
-\
-winvblock__bool STDCALL \
-x ( \
-  IN device__type_ptr dev_ptr \
- )
-/*
- * Function pointer for a device initialization routine.
- * 'indent' mangles this, so it looks weird
- */
-typedef driver__dev_init_decl (
-   ( *driver__dev_init_routine )
- );
-
-/**
- * Device close routine
- *
- * @v dev_ptr           The device being closed
- */
-#  define driver__dev_close_decl( x ) \
-\
-void STDCALL \
-x ( \
-  IN device__type_ptr dev_ptr \
- )
-/*
- * Function pointer for a device close routine.
- * 'indent' mangles this, so it looks weird
- */
-typedef driver__dev_close_decl (
-   ( *driver__dev_close_routine )
- );
-
-winvblock__def_struct ( driver__dev_ops )
-{
-  driver__dev_create_pdo_routine create_pdo;
-  driver__dev_init_routine init;
-  driver__dev_close_routine close;
-};
-
-/* Driver-common device extension detail */
-struct _device__type
-{
-  size_t size;
-  winvblock__bool IsBus;       /* For debugging */
-  PDEVICE_OBJECT Self;
-  PDEVICE_OBJECT Parent;
-  PDRIVER_OBJECT DriverObject;
-  driver__state State;
-  driver__state OldState;
-  irp__handler_chain irp_handler_chain;
-  device__type_ptr next_sibling_ptr;
-  driver__dev_ops_ptr ops;
-};
-
 extern winvblock__lib_func void STDCALL Driver_CompletePendingIrp (
   IN PIRP Irp
  );
index a366bda..6ead81f 100644 (file)
@@ -32,6 +32,7 @@
 #include "portable.h"
 #include "irp.h"
 #include "driver.h"
+#include "device.h"
 #include "bus.h"
 #include "bus_pnp.h"
 #include "bus_dev_ctl.h"
index c178c15..9e25af6 100644 (file)
@@ -32,6 +32,7 @@
 #include "portable.h"
 #include "irp.h"
 #include "driver.h"
+#include "device.h"
 #include "disk.h"
 #include "mount.h"
 #include "bus.h"
index 7a6af48..f960676 100644 (file)
@@ -32,6 +32,7 @@
 #include "portable.h"
 #include "irp.h"
 #include "driver.h"
+#include "device.h"
 #include "disk.h"
 #include "bus.h"
 #include "debug.h"
index 59d1de1..1d7aa0b 100644 (file)
@@ -38,6 +38,7 @@
 #include "portable.h"
 #include "irp.h"
 #include "driver.h"
+#include "device.h"
 #include "disk.h"
 #include "mount.h"
 #include "aoe.h"
index 3ff7fd0..eb6324b 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * Copyright (C) 2009, Shao Miller <shao.miller@yrdsb.edu.on.ca>.
+ * Copyright (C) 2009-2010, Shao Miller <shao.miller@yrdsb.edu.on.ca>.
  * Copyright 2006-2008, V.
  * For WinAoE contact information, see http://winaoe.org/
  *
@@ -39,6 +39,7 @@
 #include "portable.h"
 #include "irp.h"
 #include "driver.h"
+#include "device.h"
 #include "disk.h"
 #include "debug.h"
 
index 68e7c8b..d7bf3a3 100644 (file)
@@ -32,6 +32,7 @@
 #include "portable.h"
 #include "irp.h"
 #include "driver.h"
+#include "device.h"
 #include "disk.h"
 #include "disk_pnp.h"
 #include "disk_dev_ctl.h"
@@ -60,7 +61,7 @@ disk__max_xfer_len_decl ( disk__default_max_xfer_len )
 }
 
 static
-driver__dev_init_decl (
+device__init_decl (
   init
  )
 {
@@ -74,7 +75,7 @@ disk__init_decl ( disk__default_init )
 }
 
 static
-driver__dev_close_decl (
+device__close_decl (
   close
  )
 {
@@ -147,7 +148,7 @@ static irp__handling handling_table[] = {
  * Returns a Physical Device Object pointer on success, NULL for failure.
  */
 static
-driver__dev_create_pdo_decl (
+device__create_pdo_decl (
   create_pdo
  )
 {
@@ -237,13 +238,13 @@ driver__dev_create_pdo_decl (
 }
 
 /* Device operations for disks */
-driver__dev_ops disk__dev_ops = {
+device__ops disk__dev_ops = {
   create_pdo,
   init,
   close
 };
 
-winvblock__lib_func driver__dev_ops_ptr
+winvblock__lib_func device__ops_ptr
 disk__get_ops (
   void
  )
index 8f24302..c4df19c 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * Copyright (C) 2009, Shao Miller <shao.miller@yrdsb.edu.on.ca>.
+ * Copyright (C) 2009-2010, Shao Miller <shao.miller@yrdsb.edu.on.ca>.
  * Copyright 2006-2008, V.
  * For WinAoE contact information, see http://winaoe.org/
  *
@@ -34,6 +34,7 @@
 #include "portable.h"
 #include "irp.h"
 #include "driver.h"
+#include "device.h"
 #include "disk.h"
 #include "bus.h"
 #include "debug.h"
index 990140f..de8f4c7 100644 (file)
@@ -35,6 +35,7 @@
 #include "portable.h"
 #include "irp.h"
 #include "driver.h"
+#include "device.h"
 #include "disk.h"
 #include "debug.h"
 
index 96df247..8dfcfd4 100644 (file)
@@ -33,6 +33,7 @@
 #include "portable.h"
 #include "irp.h"
 #include "driver.h"
+#include "device.h"
 #include "disk.h"
 #include "registry.h"
 #include "mount.h"
index 56174ea..f8f846a 100644 (file)
@@ -31,6 +31,7 @@
 #include "portable.h"
 #include "irp.h"
 #include "driver.h"
+#include "device.h"
 #include "disk.h"
 #include "mount.h"
 #include "bus.h"
index a434652..283e98f 100644 (file)
@@ -31,6 +31,7 @@
 #include "portable.h"
 #include "irp.h"
 #include "driver.h"
+#include "device.h"
 #include "debug.h"
 
 /*
index e961412..dae76ed 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * Copyright (C) 2009, Shao Miller <shao.miller@yrdsb.edu.on.ca>.
+ * Copyright (C) 2009-2010, Shao Miller <shao.miller@yrdsb.edu.on.ca>.
  * Copyright 2006-2008, V.
  * For WinAoE contact information, see http://winaoe.org/
  *
@@ -32,6 +32,7 @@
 #include "portable.h"
 #include "irp.h"
 #include "driver.h"
+#include "device.h"
 #include "disk.h"
 #include "mount.h"
 #include "bus.h"
index 744d3b2..c2c3a02 100644 (file)
@@ -31,6 +31,7 @@
 #include "portable.h"
 #include "irp.h"
 #include "driver.h"
+#include "device.h"
 #include "disk.h"
 #include "bus.h"
 #include "ramdisk.h"
index d107916..7615ea3 100644 (file)
@@ -31,6 +31,7 @@
 #include "portable.h"
 #include "irp.h"
 #include "driver.h"
+#include "device.h"
 #include "disk.h"
 #include "bus.h"
 #include "ramdisk.h"
index 9b77615..034d94c 100644 (file)
@@ -31,6 +31,7 @@
 #include "portable.h"
 #include "irp.h"
 #include "driver.h"
+#include "device.h"
 #include "disk.h"
 #include "ramdisk.h"
 #include "debug.h"
index 5be02fd..6843335 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * Copyright (C) 2009, Shao Miller <shao.miller@yrdsb.edu.on.ca>.
+ * Copyright (C) 2009-2010, Shao Miller <shao.miller@yrdsb.edu.on.ca>.
  * Copyright (C) 2008, Michael Brown <mbrown@fensystems.co.uk>.
  * Copyright 2006-2008, V.
  * For WinAoE contact information, see http://winaoe.org/