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 <phco...@gmail.com> -- Regards Vladimir 'phcoder' Serbinenko
From c8990bda2de54cf87de65835436ba0b2182b0e5c Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko <phco...@gmail.com> Date: Thu, 24 Aug 2023 22:32:45 +0200 Subject: [PATCH 07/14] 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 <phco...@gmail.com> --- util/editenv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/editenv.c b/util/editenv.c index c532b046f..9cafd838d 100644 --- a/util/editenv.c +++ b/util/editenv.c @@ -91,7 +91,7 @@ grub_util_create_envblk_file (const char *name) else if (retsize < 0) { free (linkbuf); - grub_util_error (_("cannot rename the file %s to %s: %m"), namenew, name); + grub_util_error (_("cannot rename the file %s to %s: %s"), namenew, name, strerror(errno)); } else if (retsize == size) { @@ -128,7 +128,7 @@ grub_util_create_envblk_file (const char *name) free (rename_target); if (rc < 0) - grub_util_error (_("cannot rename the file %s to %s: %m"), namenew, name); + grub_util_error (_("cannot rename the file %s to %s: %s"), namenew, name, strerror(errno)); #endif free (namenew); -- 2.39.2
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel