mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-03-22 08:51:30 +03:00
libspl: move cmn_err definitions from zfs_context.h
Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #17861
This commit is contained in:
parent
e7a856d954
commit
7234d69748
@ -122,6 +122,7 @@ extern "C" {
|
|||||||
#include <sys/mutex.h>
|
#include <sys/mutex.h>
|
||||||
#include <sys/rwlock.h>
|
#include <sys/rwlock.h>
|
||||||
#include <sys/condvar.h>
|
#include <sys/condvar.h>
|
||||||
|
#include <sys/cmn_err.h>
|
||||||
#include <sys/zfs_delay.h>
|
#include <sys/zfs_delay.h>
|
||||||
|
|
||||||
#include <sys/zfs_context_os.h>
|
#include <sys/zfs_context_os.h>
|
||||||
@ -134,37 +135,6 @@ extern "C" {
|
|||||||
#define likely(x) __builtin_expect((x), 1)
|
#define likely(x) __builtin_expect((x), 1)
|
||||||
#define unlikely(x) __builtin_expect((x), 0)
|
#define unlikely(x) __builtin_expect((x), 0)
|
||||||
|
|
||||||
/*
|
|
||||||
* Debugging
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Note that we are not using the debugging levels.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define CE_CONT 0 /* continuation */
|
|
||||||
#define CE_NOTE 1 /* notice */
|
|
||||||
#define CE_WARN 2 /* warning */
|
|
||||||
#define CE_PANIC 3 /* panic */
|
|
||||||
#define CE_IGNORE 4 /* print nothing */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ZFS debugging
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern void dprintf_setup(int *argc, char **argv);
|
|
||||||
|
|
||||||
extern void cmn_err(int, const char *, ...)
|
|
||||||
__attribute__((format(printf, 2, 3)));
|
|
||||||
extern void vcmn_err(int, const char *, va_list)
|
|
||||||
__attribute__((format(printf, 2, 0)));
|
|
||||||
extern void panic(const char *, ...)
|
|
||||||
__attribute__((format(printf, 1, 2), noreturn));
|
|
||||||
extern void vpanic(const char *, va_list)
|
|
||||||
__attribute__((format(printf, 1, 0), noreturn));
|
|
||||||
|
|
||||||
#define fm_panic panic
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DTrace SDT probes have different signatures in userland than they do in
|
* DTrace SDT probes have different signatures in userland than they do in
|
||||||
* the kernel. If they're being used in kernel code, re-define them out of
|
* the kernel. If they're being used in kernel code, re-define them out of
|
||||||
|
|||||||
@ -62,4 +62,31 @@ do { \
|
|||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Note that we are not using the debugging levels.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define CE_CONT 0 /* continuation */
|
||||||
|
#define CE_NOTE 1 /* notice */
|
||||||
|
#define CE_WARN 2 /* warning */
|
||||||
|
#define CE_PANIC 3 /* panic */
|
||||||
|
#define CE_IGNORE 4 /* print nothing */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ZFS debugging
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern void dprintf_setup(int *argc, char **argv);
|
||||||
|
|
||||||
|
extern void cmn_err(int, const char *, ...)
|
||||||
|
__attribute__((format(printf, 2, 3)));
|
||||||
|
extern void vcmn_err(int, const char *, va_list)
|
||||||
|
__attribute__((format(printf, 2, 0)));
|
||||||
|
extern void panic(const char *, ...)
|
||||||
|
__attribute__((format(printf, 1, 2), noreturn));
|
||||||
|
extern void vpanic(const char *, va_list)
|
||||||
|
__attribute__((format(printf, 1, 0), noreturn));
|
||||||
|
|
||||||
|
#define fm_panic panic
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user