mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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:
committed by
Brian Behlendorf
parent
692f0daba3
commit
401c3563d4
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user