mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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 <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #11033
This commit is contained in:
committed by
Brian Behlendorf
parent
c71847b77b
commit
a51019f4ec
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user