forked from namjaejeon/ksmbd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglob.h
More file actions
65 lines (51 loc) · 1.36 KB
/
Copy pathglob.h
File metadata and controls
65 lines (51 loc) · 1.36 KB
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
61
62
63
64
65
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2016 Namjae Jeon <linkinjeon@gmail.com>
* Copyright (C) 2018 Samsung Electronics Co., Ltd.
*/
#ifndef __SMBD_GLOB_H
#define __SMBD_GLOB_H
#include <linux/ctype.h>
#include <linux/version.h>
#include "unicode.h"
#include "vfs_cache.h"
#include "smberr.h"
#define SMBD_VERSION "3.0.2"
/* @FIXME clean up this code */
extern int smbd_debugging;
extern int smbd_caseless_search;
#define DATA_STREAM 1
#define DIR_STREAM 2
#ifndef smbd_pr_fmt
#ifdef SUBMOD_NAME
#define smbd_pr_fmt(fmt) "ksmbd: " SUBMOD_NAME ": " fmt
#else
#define smbd_pr_fmt(fmt) "ksmbd: " fmt
#endif
#endif
#ifdef CONFIG_SMB_SERVER_DEBUGGING
#define smbd_debug(fmt, ...) \
do { \
if (smbd_debugging) \
pr_info(smbd_pr_fmt("%s:%d: " fmt), \
__func__, \
__LINE__, \
##__VA_ARGS__); \
} while (0)
#else
#define smbd_debug(fmt, ...)
#endif
#define smbd_info(fmt, ...) \
pr_info(smbd_pr_fmt(fmt), ##__VA_ARGS__)
#define smbd_err(fmt, ...) \
pr_err(smbd_pr_fmt("%s:%d: " fmt), \
__func__, \
__LINE__, \
##__VA_ARGS__)
#define UNICODE_LEN(x) ((x) * 2)
/* @FIXME clean up this code */
/* @FIXME clean up this code */
/* @FIXME clean up this code */
/* smbd misc functions */
extern void ntstatus_to_dos(__u32 ntstatus, __u8 *eclass, __u16 *ecode);
#endif /* __SMBD_GLOB_H */