mirror of
https://github.com/reactos/reactos.git
synced 2024-12-24 11:33:34 +08:00
[VFD] Add support for installing driver from System32\drivers.
Patch by Doug Lyons. CORE-14090
This commit is contained in:
parent
f941c78f50
commit
fc921423f3
@ -255,6 +255,10 @@ DWORD WINAPI VfdInstallDriver(
|
|||||||
DWORD len;
|
DWORD len;
|
||||||
DWORD ret = ERROR_SUCCESS;
|
DWORD ret = ERROR_SUCCESS;
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
CHAR full_file_path[MAX_PATH];
|
||||||
|
#endif
|
||||||
|
|
||||||
// get SystemRoot directory path
|
// get SystemRoot directory path
|
||||||
|
|
||||||
// len = GetEnvironmentVariable(
|
// len = GetEnvironmentVariable(
|
||||||
@ -270,6 +274,12 @@ DWORD WINAPI VfdInstallDriver(
|
|||||||
|
|
||||||
inst_path = &system_dir[len];
|
inst_path = &system_dir[len];
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
strcpy(full_file_path, system_dir);
|
||||||
|
strcat(full_file_path, VFD_INSTALL_DIRECTORY);
|
||||||
|
strcat(full_file_path, VFD_DRIVER_FILENAME);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef VFD_EMBED_DRIVER
|
#ifdef VFD_EMBED_DRIVER
|
||||||
//
|
//
|
||||||
// use embedded driver file
|
// use embedded driver file
|
||||||
@ -342,6 +352,14 @@ DWORD WINAPI VfdInstallDriver(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
// Check install directory & file exist or use full_file_path
|
||||||
|
|
||||||
|
if (GetFileAttributesA(file_path) == INVALID_FILE_ATTRIBUTES) {
|
||||||
|
strcpy(file_path, full_file_path);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Check if the file is a valid Virtual Floppy driver
|
// Check if the file is a valid Virtual Floppy driver
|
||||||
|
|
||||||
ret = VfdCheckDriverFile(file_path, NULL);
|
ret = VfdCheckDriverFile(file_path, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user