From 9db826e1492a0f30074418539fba7f94ef76cb00 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Tue, 24 Sep 2013 18:36:51 +0200 Subject: [PATCH] * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_close): Fix disk closing logic. --- ChangeLog | 5 +++++ grub-core/kern/emu/hostdisk.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 73c33e890..6ebd77ac9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-09-24 Vladimir Serbinenko + + * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_close): Fix + disk closing logic. + 2013-09-24 Andrey Borzenkov * docs/grub.texi (Simple configuration): Document GRUB_ENABLE_CRYPTODISK. diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c index cbf50771f..260362fa8 100644 --- a/grub-core/kern/emu/hostdisk.c +++ b/grub-core/kern/emu/hostdisk.c @@ -422,7 +422,7 @@ grub_util_biosdisk_close (struct grub_disk *disk) struct grub_util_hostdisk_data *data = disk->data; free (data->dev); - if (!GRUB_UTIL_FD_IS_VALID (data->fd)) + if (GRUB_UTIL_FD_IS_VALID (data->fd)) { if (data->access_mode == O_RDWR || data->access_mode == O_WRONLY) grub_util_biosdisk_flush (disk);