* 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:
Mario Limonciello 2011-09-29 10:39:44 +02:00 committed by Vladimir 'phcoder' Serbinenko
parent c05de0329b
commit d1ab689de8
2 changed files with 7 additions and 0 deletions

View file

@ -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>
* grub-core/kern/emu/misc.c (canonicalize_file_name) [__MINGW32__]: Use

View file

@ -55,6 +55,7 @@
#ifdef __MINGW32__
#include <windows.h>
#include <winioctl.h>
#include "dirname.h"
#endif
#ifdef GRUB_UTIL
@ -322,6 +323,7 @@ grub_util_get_disk_size (char *name)
HANDLE hd;
grub_int64_t size = -1LL;
strip_trailing_slashes(name);
hd = CreateFile (name, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
0, OPEN_EXISTING, 0, 0);