b4a93d3f89
(forwarded request 157376 from arvidjaar) OBS-URL: https://build.opensuse.org/request/show/157383 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=59
43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
From: Andrey Borzenkov <arvidjaar@gmail.com>
|
|
To: grub-devel@gnu.org
|
|
Subject: [PATCH] return failure from grub-mount if fuse_main failed
|
|
|
|
Currently there is no way to check that mount was successful. It caused
|
|
problem with os-prober which did not try kernel mount fallback.
|
|
|
|
Return value of fuse_init is currenty unused, but still it looks wrong
|
|
to always return success. In this case it should simply be void; if it
|
|
returns value, let value be correct.
|
|
|
|
Ref: https://bugzilla.novell.com/show_bug.cgi?id=802983
|
|
|
|
Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
|
|
|
|
---
|
|
util/grub-mount.c | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
Index: grub-2.00/util/grub-mount.c
|
|
===================================================================
|
|
--- grub-2.00.orig/util/grub-mount.c
|
|
+++ grub-2.00/util/grub-mount.c
|
|
@@ -383,7 +383,8 @@ fuse_init (void)
|
|
return grub_errno;
|
|
}
|
|
|
|
- fuse_main (fuse_argc, fuse_args, &grub_opers, NULL);
|
|
+ if (fuse_main (fuse_argc, fuse_args, &grub_opers, NULL))
|
|
+ grub_error (GRUB_ERR_UNKNOWN_FS, "fuse_main failed");
|
|
|
|
for (i = 0; i < num_disks; i++)
|
|
{
|
|
@@ -403,7 +404,7 @@ fuse_init (void)
|
|
grub_free (loop_name);
|
|
}
|
|
|
|
- return GRUB_ERR_NONE;
|
|
+ return grub_errno;
|
|
}
|
|
|
|
static struct argp_option options[] = {
|