Workaround windows bug when querying EFI system partition parameters.

This commit is contained in:
Vladimir Serbinenko 2013-12-14 23:23:11 +01:00
parent 6a5fe1328b
commit 4bad23a15f
4 changed files with 87 additions and 17 deletions

View file

@ -44,8 +44,6 @@ grub_make_system_path_relative_to_its_root (const char *path)
{
TCHAR *dirwindows, *mntpointwindows;
TCHAR *ptr;
TCHAR volumename[100];
size_t mntpointwindows_sz;
size_t offset, flen;
TCHAR *ret;
char *cret;
@ -54,12 +52,9 @@ grub_make_system_path_relative_to_its_root (const char *path)
if (!dirwindows)
return xstrdup (path);
mntpointwindows_sz = strlen (path) * 2 + 1;
mntpointwindows = xmalloc ((mntpointwindows_sz + 1) * sizeof (mntpointwindows[0]));
mntpointwindows = grub_get_mount_point (dirwindows);
if (!GetVolumePathName (dirwindows,
mntpointwindows,
mntpointwindows_sz))
if (!mntpointwindows)
{
offset = 0;
if (dirwindows[0] && dirwindows[1] == ':')