mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
* grub-core/kern/emu/hostdisk.c (open_device): Set data->fd to -1 if
openning fails. Reported by: Mark Korenberg.
This commit is contained in:
1 parent
157effb745
commit
fa68d99c45
2 files changed
+8
No files matched your search
@@ -1,3 +1,9 @@
|
|||||||
|
2011-05-09 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/kern/emu/hostdisk.c (open_device): Set data->fd to -1 if
|
||||||
|
openning fails.
|
||||||
|
Reported by: Mark Korenberg.
|
||||||
|
|
||||||
2011-05-09 Vladimir Serbinenko <phcoder@gmail.com>
|
2011-05-09 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/kern/emu/hostdisk.c (linux_find_partition): Prevent possible
|
* grub-core/kern/emu/hostdisk.c (linux_find_partition): Prevent possible
|
||||||
|
|||||||
@@ -678,6 +678,7 @@ open_device (const grub_disk_t disk, grub_disk_addr_t sector, int flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
close (data->fd);
|
close (data->fd);
|
||||||
|
data->fd = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Open the partition. */
|
/* Open the partition. */
|
||||||
@@ -736,6 +737,7 @@ open_device (const grub_disk_t disk, grub_disk_addr_t sector, int flags)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
close (data->fd);
|
close (data->fd);
|
||||||
|
data->fd = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fd = open (map[disk->id].device, flags);
|
fd = open (map[disk->id].device, flags);
|
||||||
|
|||||||
Reference in new issue
Block a user