-
Notifications
You must be signed in to change notification settings - Fork 64
/
glob.h
60 lines (46 loc) · 1.39 KB
/
glob.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2016 Namjae Jeon <[email protected]>
* Copyright (C) 2018 Samsung Electronics Co., Ltd.
*/
#ifndef __KSMBD_GLOB_H
#define __KSMBD_GLOB_H
#include <linux/ctype.h>
#include "unicode.h"
#include "vfs_cache.h"
#define KSMBD_VERSION "3.5.0"
extern int ksmbd_debug_types;
#define KSMBD_DEBUG_SMB BIT(0)
#define KSMBD_DEBUG_AUTH BIT(1)
#define KSMBD_DEBUG_VFS BIT(2)
#define KSMBD_DEBUG_OPLOCK BIT(3)
#define KSMBD_DEBUG_IPC BIT(4)
#define KSMBD_DEBUG_CONN BIT(5)
#define KSMBD_DEBUG_RDMA BIT(6)
#define KSMBD_DEBUG_ALL (KSMBD_DEBUG_SMB | KSMBD_DEBUG_AUTH | \
KSMBD_DEBUG_VFS | KSMBD_DEBUG_OPLOCK | \
KSMBD_DEBUG_IPC | KSMBD_DEBUG_CONN | \
KSMBD_DEBUG_RDMA)
#ifdef pr_fmt
#undef pr_fmt
#endif
#ifdef SUBMOD_NAME
#define pr_fmt(fmt) "ksmbd: " SUBMOD_NAME ": " fmt
#else
#define pr_fmt(fmt) "ksmbd: " fmt
#endif
#define ksmbd_debug(type, fmt, ...) \
do { \
if (ksmbd_debug_types & KSMBD_DEBUG_##type) \
pr_info(fmt, ##__VA_ARGS__); \
} while (0)
#define UNICODE_LEN(x) ((x) * 2)
#ifdef CONFIG_SMB_INSECURE_SERVER
/* ksmbd misc functions */
extern void ntstatus_to_dos(__le32 ntstatus, __u8 *eclass, __le16 *ecode);
#endif
#ifndef LOOKUP_NO_SYMLINKS
#define LOOKUP_NO_SYMLINKS 0
#endif
#define KSMBD_DEFAULT_GFP GFP_KERNEL | __GFP_RETRY_MAYFAIL
#endif /* __KSMBD_GLOB_H */