mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-23 15:49:23 +00:00
Add a wrapper for fopen. On unix-like systems just pass-through. On
windows use unicode version.
This commit is contained in:
1 parent
ae5540d3d4
commit
bb338aaf24
27 files changed
+97
-41
No files matched your search
+3
-3
@@ -200,7 +200,7 @@ cmd_cp (char *src, const char *dest)
|
||||
.dest = dest
|
||||
};
|
||||
|
||||
ctx.ff = fopen (dest, "wb");
|
||||
ctx.ff = grub_util_fopen (dest, "wb");
|
||||
if (ctx.ff == NULL)
|
||||
{
|
||||
grub_util_error (_("cannot open OS file `%s': %s"), dest,
|
||||
@@ -310,7 +310,7 @@ cmd_cmp (char *src, char *dest)
|
||||
return;
|
||||
}
|
||||
|
||||
ff = fopen (dest, "rb");
|
||||
ff = grub_util_fopen (dest, "rb");
|
||||
if (ff == NULL)
|
||||
{
|
||||
grub_util_error (_("OS file %s open error: %s"), dest,
|
||||
@@ -562,7 +562,7 @@ argp_parser (int key, char *arg, struct argp_state *state)
|
||||
FILE *f;
|
||||
ssize_t real_size;
|
||||
grub_uint8_t buf[1024];
|
||||
f = fopen (arg, "rb");
|
||||
f = grub_util_fopen (arg, "rb");
|
||||
if (!f)
|
||||
{
|
||||
printf (_("%s: error:"), program_name);
|
||||
|
||||
Reference in new issue
Block a user