* util/misc.c (grub_util_get_disk_size) [__MINGW32__]: Strip trailing
slashes on PHYSICALDRIVE%d paths when making Windows CreateFile calls.
This commit is contained in:
parent
c05de0329b
commit
d1ab689de8
2 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2011-09-29 Mario Limonciello <mario_limonciello@dell.com>
|
||||||
|
|
||||||
|
* util/misc.c (grub_util_get_disk_size) [__MINGW32__]: Strip trailing
|
||||||
|
slashes on PHYSICALDRIVE%d paths when making Windows CreateFile calls.
|
||||||
|
|
||||||
2011-09-29 Mario Limonciello <mario_limonciello@dell.com>
|
2011-09-29 Mario Limonciello <mario_limonciello@dell.com>
|
||||||
|
|
||||||
* grub-core/kern/emu/misc.c (canonicalize_file_name) [__MINGW32__]: Use
|
* grub-core/kern/emu/misc.c (canonicalize_file_name) [__MINGW32__]: Use
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <winioctl.h>
|
#include <winioctl.h>
|
||||||
|
#include "dirname.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GRUB_UTIL
|
#ifdef GRUB_UTIL
|
||||||
|
@ -322,6 +323,7 @@ grub_util_get_disk_size (char *name)
|
||||||
HANDLE hd;
|
HANDLE hd;
|
||||||
grub_int64_t size = -1LL;
|
grub_int64_t size = -1LL;
|
||||||
|
|
||||||
|
strip_trailing_slashes(name);
|
||||||
hd = CreateFile (name, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
|
hd = CreateFile (name, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||||
0, OPEN_EXISTING, 0, 0);
|
0, OPEN_EXISTING, 0, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue