grub-install: Use a+ in fopen rather than r+.
r+ does not create a file if none exists.
This commit is contained in:
parent
368ecfc3a0
commit
a2721778e5
1 changed files with 1 additions and 1 deletions
|
@ -1727,7 +1727,7 @@ main (int argc, char *argv[])
|
||||||
grub_elf = grub_util_path_concat (2, core_services, "grub.elf");
|
grub_elf = grub_util_path_concat (2, core_services, "grub.elf");
|
||||||
grub_install_copy_file (imgfile, grub_elf, 1);
|
grub_install_copy_file (imgfile, grub_elf, 1);
|
||||||
|
|
||||||
f = grub_util_fopen (mach_kernel, "r+");
|
f = grub_util_fopen (mach_kernel, "a+");
|
||||||
if (!f)
|
if (!f)
|
||||||
grub_util_error (_("Can't create file: %s"), strerror (errno));
|
grub_util_error (_("Can't create file: %s"), strerror (errno));
|
||||||
fclose (f);
|
fclose (f);
|
||||||
|
|
Loading…
Reference in a new issue