Changeset 93239 in vbox for trunk/src/VBox/HostDrivers/Support
- Timestamp:
- Jan 14, 2022 7:15:41 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 149301
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 5 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/Makefile.kmk
r93115 r93239 621 621 VBoxDrv_NAME.freebsd = vboxdrv 622 622 VBoxDrv_NAME.solaris = vboxdrv 623 VBoxDrv_NAME.win = VBoxSup 623 624 ifdef VBOX_SIGNING_MODE 624 625 VBoxDrv_INSTTYPE.win = none … … 829 830 830 831 ifeq ($(KBUILD_TARGET), win) 831 INSTALLS.win += VBox Drv-inf832 VBox Drv-inf_TEMPLATE = VBoxR0DrvInfCat833 VBox Drv-inf_SOURCES = \834 $(PATH_TARGET)/VBox DrvCat.dir/VBoxDrv.inf835 VBox Drv-inf_CLEAN = $(VBoxDrv-inf_SOURCES)836 VBox Drv-inf_BLDDIRS = $(PATH_TARGET)/VBoxDrvCat.dir837 838 $(PATH_TARGET)/VBox DrvCat.dir/VBoxDrv.inf: $(PATH_SUB_CURRENT)/win/VBoxDrv.inf $(MAKEFILE_CURRENT) | $$(dir $$@)839 $(call MSG_GENERATE,VBox Drv-inf,$@,$<)832 INSTALLS.win += VBoxSup-inf 833 VBoxSup-inf_TEMPLATE = VBoxR0DrvInfCat 834 VBoxSup-inf_SOURCES = \ 835 $(PATH_TARGET)/VBoxSupCat.dir/VBoxSup.inf 836 VBoxSup-inf_CLEAN = $(VBoxSup-inf_SOURCES) 837 VBoxSup-inf_BLDDIRS = $(PATH_TARGET)/VBoxSupCat.dir 838 839 $(PATH_TARGET)/VBoxSupCat.dir/VBoxSup.inf: $(PATH_SUB_CURRENT)/win/VBoxSup.inf $(MAKEFILE_CURRENT) | $$(dir $$@) 840 $(call MSG_GENERATE,VBoxSup-inf,$@,$<) 840 841 $(call VBOX_EDIT_INF_FN,$<,$@) 841 842 842 843 ifdef VBOX_SIGNING_MODE 843 VBox Drv-inf_SOURCES += \844 $(PATH_TARGET)/VBox DrvCat.dir/VBoxDrv.sys \845 $(PATH_TARGET)/VBox DrvCat.dir/VBoxDrv.cat \846 $(PATH_TARGET)/VBox DrvCat.dir/VBoxDrv.cat=>VBoxDrv-PreW10.cat847 848 $(PATH_TARGET)/VBox DrvCat.dir/VBoxDrv.sys: $$(VBoxDrv_1_TARGET) | $$(dir $$@)849 $(INSTALL) -m 644 $< $(@D)850 851 $(PATH_TARGET)/VBox DrvCat.dir/VBoxDrv.cat: \852 $(PATH_TARGET)/VBox DrvCat.dir/VBoxDrv.inf \853 $(PATH_TARGET)/VBox DrvCat.dir/VBoxDrv.sys854 $(call MSG_TOOL,Inf2Cat,VBox Drv-inf,$@,$<)844 VBoxSup-inf_SOURCES += \ 845 $(PATH_TARGET)/VBoxSupCat.dir/VBoxSup.sys \ 846 $(PATH_TARGET)/VBoxSupCat.dir/VBoxSup.cat \ 847 $(PATH_TARGET)/VBoxSupCat.dir/VBoxSup.cat=>VBoxSup-PreW10.cat 848 849 $(PATH_TARGET)/VBoxSupCat.dir/VBoxSup.sys: $$(VBoxDrv_1_TARGET) | $$(dir $$@) 850 $(INSTALL) -m 644 -- "$<" "$(@D)" 851 852 $(PATH_TARGET)/VBoxSupCat.dir/VBoxSup.cat: \ 853 $(PATH_TARGET)/VBoxSupCat.dir/VBoxSup.inf \ 854 $(PATH_TARGET)/VBoxSupCat.dir/VBoxSup.sys 855 $(call MSG_TOOL,Inf2Cat,VBoxSup-inf,$@,$<) 855 856 $(call VBOX_MAKE_CAT_FN, $(@D),$@) 856 857 endif # signing -
trunk/src/VBox/HostDrivers/Support/SUPLibLdr.cpp
r93115 r93239 152 152 if ( pszModule 153 153 && *pszModule 154 && strcmp(pszModule, "VBoxDrv.sys") 154 && strcmp(pszModule, "VBoxSup.sys") 155 && strcmp(pszModule, "VBoxDrv.sys") /* old name */ 155 156 && strcmp(pszModule, "VMMR0.r0")) 156 157 { -
trunk/src/VBox/HostDrivers/Support/SUPR0-def-pe.sed
r93115 r93239 68 68 i\; 69 69 i 70 i\LIBRARY VBox Drv.sys70 i\LIBRARY VBoxSup.sys 71 71 i 72 72 i\EXPORTS -
trunk/src/VBox/HostDrivers/Support/win/SUPLib-win.cpp
r93115 r93239 67 67 *********************************************************************************************************************************/ 68 68 /** The support service name. */ 69 #define SERVICE_NAME "VBox Drv"69 #define SERVICE_NAME "VBoxSup" 70 70 71 71 … … 314 314 { 315 315 char szDriver[RTPATH_MAX]; 316 rc = RTPathExecDir(szDriver, sizeof(szDriver) - sizeof("\\VBox Drv.sys"));316 rc = RTPathExecDir(szDriver, sizeof(szDriver) - sizeof("\\VBoxSup.sys")); 317 317 if (RT_SUCCESS(rc)) 318 318 { 319 strcat(szDriver, "\\VBox Drv.sys");319 strcat(szDriver, "\\VBoxSup.sys"); 320 320 SC_HANDLE hService = CreateService(hSMgrCreate, 321 321 SERVICE_NAME, … … 431 431 int suplibOsDeleteService(void) 432 432 { 433 /* 434 * Assume it didn't exist, so we'll create the service. 435 */ 436 int rc; 433 int rcRet = VINF_SUCCESS; 437 434 SC_HANDLE hSMgr = OpenSCManager(NULL, NULL, SERVICE_CHANGE_CONFIG); 438 435 DWORD dwErr = GetLastError(); … … 440 437 if (hSMgr) 441 438 { 442 SC_HANDLE hService = OpenService(hSMgr, SERVICE_NAME, DELETE); 439 /* 440 * Old service name. 441 */ 442 SC_HANDLE hService = OpenService(hSMgr, "VBoxDrv", DELETE); 443 443 if (hService) 444 444 { 445 /* 446 * Delete the service. 447 */ 448 if (DeleteService(hService)) 449 rc = VINF_SUCCESS; 450 else 445 if (!DeleteService(hService)) 451 446 { 452 447 dwErr = GetLastError(); 453 AssertMsgFailed(("DeleteService failed dwErr=%Rwa\n", dwErr));454 rc = RTErrConvertFromWin32(dwErr);448 AssertMsgFailed(("DeleteService failed for VBoxDrv dwErr=%Rwa\n", dwErr)); 449 rcRet = RTErrConvertFromWin32(dwErr); 455 450 } 456 451 CloseServiceHandle(hService); … … 459 454 { 460 455 dwErr = GetLastError(); 461 if (dwErr == ERROR_SERVICE_DOES_NOT_EXIST) 462 rc = VINF_SUCCESS; 463 else 464 { 465 AssertMsgFailed(("OpenService failed dwErr=%Rwa\n", dwErr)); 466 rc = RTErrConvertFromWin32(dwErr); 456 if (dwErr != ERROR_SERVICE_DOES_NOT_EXIST) 457 { 458 AssertMsgFailed(("OpenService failed for VBoxDrv dwErr=%Rwa\n", dwErr)); 459 rcRet = RTErrConvertFromWin32(dwErr); 460 } 461 } 462 463 /* 464 * The new service. 465 */ 466 hService = OpenService(hSMgr, SERVICE_NAME, DELETE); 467 if (hService) 468 { 469 if (!DeleteService(hService)) 470 { 471 dwErr = GetLastError(); 472 AssertMsgFailed(("DeleteService for " SERVICE_NAME " failed dwErr=%Rwa\n", dwErr)); 473 rcRet = RTErrConvertFromWin32(dwErr); 474 } 475 CloseServiceHandle(hService); 476 } 477 else 478 { 479 dwErr = GetLastError(); 480 if (dwErr != ERROR_SERVICE_DOES_NOT_EXIST) 481 { 482 AssertMsgFailed(("OpenService failed for " SERVICE_NAME " dwErr=%Rwa\n", dwErr)); 483 rcRet = RTErrConvertFromWin32(dwErr); 467 484 } 468 485 } … … 470 487 } 471 488 else 472 rc = RTErrConvertFromWin32(dwErr);473 return rc ;489 rcRet = RTErrConvertFromWin32(dwErr); 490 return rcRet; 474 491 } 475 492 … … 495 512 { 496 513 char szDriver[RTPATH_MAX]; 497 int rc = RTPathExecDir(szDriver, sizeof(szDriver) - sizeof("\\VBox Drv.sys"));514 int rc = RTPathExecDir(szDriver, sizeof(szDriver) - sizeof("\\VBoxSup.sys")); 498 515 if (RT_SUCCESS(rc)) 499 516 { 500 strcat(szDriver, "\\VBox Drv.sys");517 strcat(szDriver, "\\VBoxSup.sys"); 501 518 502 519 SC_LOCK hLock = LockServiceDatabase(hSMgr); -
trunk/src/VBox/HostDrivers/Support/win/VBoxDrv.rc
r93115 r93239 44 44 BEGIN 45 45 VALUE "FileDescription", "VirtualBox Support Driver\0" 46 VALUE "InternalName", "VBox Drv\0"47 VALUE "OriginalFilename", "VBox Drv.sys\0"46 VALUE "InternalName", "VBoxSup\0" 47 VALUE "OriginalFilename", "VBoxSup.sys\0" 48 48 VALUE "CompanyName", VBOX_RC_COMPANY_NAME 49 49 VALUE "FileVersion", VBOX_RC_FILE_VERSION_STR -
trunk/src/VBox/HostDrivers/Support/win/VBoxSup.inf
r93237 r93239 32 32 ;edit-DriverVer=08/26/2008,2.00.0000 33 33 DriverPackageType=KernelService 34 ;cat CatalogFile=VBox Drv.cat34 ;cat CatalogFile=VBoxSup.cat 35 35 36 36 [DestinationDirs] … … 38 38 39 39 [DefaultInstall@DOT-NT-ARCH@] 40 CopyFiles=VBox Drv_CopyFiles40 CopyFiles=VBoxSup_CopyFiles 41 41 42 42 [DefaultInstall@[email protected]] 43 AddService=VBox Drv,0x00000002,VBoxDrv_Service43 AddService=VBoxSup,0x00000002,VBoxSup_Service 44 44 45 45 [DefaultUninstall@DOT-NT-ARCH@] 46 DefFiles=VBox Drv_CopyFiles46 DefFiles=VBoxSup_CopyFiles 47 47 48 48 [DefaultUninstall@[email protected]] 49 DelService=VBox Drv,0x0000020049 DelService=VBoxSup,0x00000200 50 50 51 51 ;; This doesn't actually work either (see VBoxUSBMon), though it triggers in the 52 52 ;; installer rather at manual installation on my test system (could be polluted & confused). 53 ;; This may apparently also causes unloading trouble due to 'root\VBox Drv' or something related to that.53 ;; This may apparently also causes unloading trouble due to 'root\VBoxSup' or something related to that. 54 54 ;; [Manufacturer] 55 55 ;; %ORACLE%=Oracle@COMMA-NT-ARCH@ … … 57 57 ;; ; Models section (referenced by [Manufacturer]). 58 58 ;; [Oracle@DOT-NT-ARCH@] 59 ;; %VBox Drv.DRVDESC%=VBoxDrvInstall,root\VBoxDrv59 ;; %VBoxSup.DRVDESC%=VBoxSupInstall,root\VBoxSup 60 60 ;; 61 ;; [VBox DrvInstall@DOT-NT-ARCH@]62 ;; CopyFiles=VBox Drv_CopyFiles61 ;; [VBoxSupInstall@DOT-NT-ARCH@] 62 ;; CopyFiles=VBoxSup_CopyFiles 63 63 ;; 64 ;; [VBox DrvInstall@[email protected]]65 ;; AddService=VBox Drv,0x00000002,VBoxDrv_Service64 ;; [VBoxSupInstall@[email protected]] 65 ;; AddService=VBoxSup,0x00000002,VBoxSup_Service 66 66 67 67 [SourceDisksFiles] 68 VBox Drv.sys=168 VBoxSup.sys=1 69 69 70 70 [SourceDisksNames] 71 1=%VBox Drv.DSKDESC%,71 1=%VBoxSup.DSKDESC%, 72 72 73 [VBox Drv_CopyFiles]74 VBox Drv.sys73 [VBoxSup_CopyFiles] 74 VBoxSup.sys 75 75 76 [VBox Drv_Service]77 DisplayName = %VBox Drv.SVCDESC%76 [VBoxSup_Service] 77 DisplayName = %VBoxSup.SVCDESC% 78 78 ServiceType = 1 ; SERVICE_KERNEL_DRIVER 79 79 ;StartType = 3 ; SERVICE_DEMAND_START 80 80 StartType = 1 ; autostart to fix Vista problem 81 81 ErrorControl = 1 ; SERVICE_ERROR_NORMAL 82 ServiceBinary = %12%\VBox Drv.sys82 ServiceBinary = %12%\VBoxSup.sys 83 83 84 84 [Strings] 85 85 ORACLE = "Oracle Corporation" 86 VBox Drv.SVCDESC = "VirtualBox Service"87 VBox Drv.DRVDESC = "VirtualBoxDriver"88 VBox Drv.DSKDESC = "VirtualBoxDriver Installation Disk"86 VBoxSup.SVCDESC = "VirtualBox Service" 87 VBoxSup.DRVDESC = "VirtualBox Support Driver" 88 VBoxSup.DSKDESC = "VirtualBox Support Driver Installation Disk"
Note:
See TracChangeset
for help on using the changeset viewer.