From 76b383bbbe876d4200f82af25791a1553b0951c8 Mon Sep 17 00:00:00 2001 From: Felix Zielcke Date: Wed, 11 Nov 2009 22:20:03 +0100 Subject: [PATCH] 2009-11-11 Felix Zielcke * util/grub-probe.c (probe): Abort with an error if file can't be opened via GRUB facilities. --- ChangeLog.mkrelpath | 5 +++++ util/grub-probe.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.mkrelpath b/ChangeLog.mkrelpath index 3cd0d8bd2..d24262db5 100644 --- a/ChangeLog.mkrelpath +++ b/ChangeLog.mkrelpath @@ -1,3 +1,8 @@ +2009-11-11 Felix Zielcke + + * util/grub-probe.c (probe): Abort with an error if file can't be + opened via GRUB facilities. + 2009-11-11 Felix Zielcke * util/i386/pc/grub-setup.c (setup): Make core.img path relative diff --git a/util/grub-probe.c b/util/grub-probe.c index 051a38c72..1594d0dcb 100644 --- a/util/grub-probe.c +++ b/util/grub-probe.c @@ -253,6 +253,8 @@ probe (const char *path, char *device_name) free (rel_path); grub_util_info ("reading %s via GRUB facilities", grub_path); file = grub_file_open (grub_path); + if (! file) + grub_util_error ("can not open %s via GRUB facilities", grub_path); filebuf_via_grub = xmalloc (file->size); grub_file_read (file, filebuf_via_grub, file->size);