libzfs: use zfs_strerror() in place of strerror()

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Richard Kojedzinszky <richard@kojedz.in>
Closes #15793
This commit is contained in:
Richard Kojedzinszky
2024-01-23 00:28:18 +01:00
committed by Brian Behlendorf
parent 692f0daba3
commit 401c3563d4
12 changed files with 65 additions and 47 deletions
+3 -2
View File
@@ -36,6 +36,7 @@
#include <sys/sysmacros.h>
#include <sys/stat.h>
#include <unistd.h>
#include <libzutil.h>
int
getextmntent(const char *path, struct extmnttab *entry, struct stat64 *statbuf)
@@ -49,13 +50,13 @@ getextmntent(const char *path, struct extmnttab *entry, struct stat64 *statbuf)
if (stat64(path, statbuf) != 0) {
(void) fprintf(stderr, "cannot open '%s': %s\n",
path, strerror(errno));
path, zfs_strerror(errno));
return (-1);
}
if (statfs(path, &sfs) != 0) {
(void) fprintf(stderr, "%s: %s\n", path,
strerror(errno));
zfs_strerror(errno));
return (-1);
}
statfs2mnttab(&sfs, (struct mnttab *)entry);