0001
0002
0003
0004
0005
0006
0007 #ifndef __KSMBD_GLOB_H
0008 #define __KSMBD_GLOB_H
0009
0010 #include <linux/ctype.h>
0011
0012 #include "unicode.h"
0013 #include "vfs_cache.h"
0014
0015 #define KSMBD_VERSION "3.4.2"
0016
0017 extern int ksmbd_debug_types;
0018
0019 #define KSMBD_DEBUG_SMB BIT(0)
0020 #define KSMBD_DEBUG_AUTH BIT(1)
0021 #define KSMBD_DEBUG_VFS BIT(2)
0022 #define KSMBD_DEBUG_OPLOCK BIT(3)
0023 #define KSMBD_DEBUG_IPC BIT(4)
0024 #define KSMBD_DEBUG_CONN BIT(5)
0025 #define KSMBD_DEBUG_RDMA BIT(6)
0026 #define KSMBD_DEBUG_ALL (KSMBD_DEBUG_SMB | KSMBD_DEBUG_AUTH | \
0027 KSMBD_DEBUG_VFS | KSMBD_DEBUG_OPLOCK | \
0028 KSMBD_DEBUG_IPC | KSMBD_DEBUG_CONN | \
0029 KSMBD_DEBUG_RDMA)
0030
0031 #ifdef pr_fmt
0032 #undef pr_fmt
0033 #endif
0034
0035 #ifdef SUBMOD_NAME
0036 #define pr_fmt(fmt) "ksmbd: " SUBMOD_NAME ": " fmt
0037 #else
0038 #define pr_fmt(fmt) "ksmbd: " fmt
0039 #endif
0040
0041 #define ksmbd_debug(type, fmt, ...) \
0042 do { \
0043 if (ksmbd_debug_types & KSMBD_DEBUG_##type) \
0044 pr_info(fmt, ##__VA_ARGS__); \
0045 } while (0)
0046
0047 #define UNICODE_LEN(x) ((x) * 2)
0048
0049 #endif