Skip to content

Commit 31e47cf

Browse files
phcoderDaniel Kiper
authored and
Daniel Kiper
committed
util/editenv: Don't use %m formatter
It's not available on NetBSD outside of syslog. Using strerror() is more reliable as we retrieve errno immediately rather than down the stack. Signed-off-by: Vladimir Serbinenko <[email protected]> Reviewed-by: Daniel Kiper <[email protected]>
1 parent f5905f6 commit 31e47cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

util/editenv.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ grub_util_create_envblk_file (const char *name)
9191
else if (retsize < 0)
9292
{
9393
free (linkbuf);
94-
grub_util_error (_("cannot rename the file %s to %s: %m"), namenew, name);
94+
grub_util_error (_("cannot rename the file %s to %s: %s"), namenew, name, strerror (errno));
9595
}
9696
else if (retsize == size)
9797
{
@@ -128,7 +128,7 @@ grub_util_create_envblk_file (const char *name)
128128
free (rename_target);
129129

130130
if (rc < 0)
131-
grub_util_error (_("cannot rename the file %s to %s: %m"), namenew, name);
131+
grub_util_error (_("cannot rename the file %s to %s: %s"), namenew, name, strerror (errno));
132132
#endif
133133

134134
free (namenew);

0 commit comments

Comments
 (0)