Skip to content

Commit

Permalink
[VFD] Add support for installing driver from System32\drivers.
Browse files Browse the repository at this point in the history
Patch by Doug Lyons.

CORE-14090
  • Loading branch information
HeisSpiter committed Dec 23, 2017
1 parent f941c78 commit fc92142
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions modules/rosapps/lib/vfdlib/vfdctl.c
Expand Up @@ -255,6 +255,10 @@ DWORD WINAPI VfdInstallDriver(
DWORD len;
DWORD ret = ERROR_SUCCESS;

#ifdef __REACTOS__
CHAR full_file_path[MAX_PATH];
#endif

// get SystemRoot directory path

// len = GetEnvironmentVariable(
Expand All @@ -270,6 +274,12 @@ DWORD WINAPI VfdInstallDriver(

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
//
// use embedded driver file
Expand Down Expand Up @@ -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

ret = VfdCheckDriverFile(file_path, NULL);
Expand Down

0 comments on commit fc92142

Please sign in to comment.