aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libspl/os
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2020-10-13 12:38:40 -0400
committerGitHub <[email protected]>2020-10-13 09:38:40 -0700
commite191b60ddc2bc5697f2b28558f8156d4357d79c0 (patch)
tree740bd1853429eceb55841630c83dffe2fadc158a /lib/libspl/os
parent7dfc56d8661aa862364f9ccf76751fe6d2946c29 (diff)
FreeBSD: Improve libzfs_error_init messages
It is a common mistake to have failed to autoload the module due to permission issues when running a ZFS command as a user. "Operation not permitted" is an unhelpfully vague error message. Use a thread-local message buffer to format a nicer error message. We can infer that loading the kernel module failed if the module is not loaded. This can be extended with heuristics for other errors in the future. While looking at this stuff, remove an unused thread-local message buffer found in libspl and remove some inaccurate verbiage from the comment on libzfs_load_module. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #11033
Diffstat (limited to 'lib/libspl/os')
-rw-r--r--lib/libspl/os/freebsd/getmntany.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/libspl/os/freebsd/getmntany.c b/lib/libspl/os/freebsd/getmntany.c
index b41e763ce..0ef24059e 100644
--- a/lib/libspl/os/freebsd/getmntany.c
+++ b/lib/libspl/os/freebsd/getmntany.c
@@ -37,10 +37,6 @@
#include <sys/stat.h>
#include <unistd.h>
-#define BUFSIZE (MNT_LINE_MAX + 2)
-
-__thread char buf[BUFSIZE];
-
int
getextmntent(const char *path, struct extmnttab *entry, struct stat64 *statbuf)
{