]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - scrub/unicrash.h
xfsprogs: Release v6.7.0
[thirdparty/xfsprogs-dev.git] / scrub / unicrash.h
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3 * Copyright (C) 2018 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <darrick.wong@oracle.com>
5 */
6 #ifndef XFS_SCRUB_UNICRASH_H_
7 #define XFS_SCRUB_UNICRASH_H_
8
9 struct unicrash;
10
11 /* Unicode name collision detection. */
12 #ifdef HAVE_LIBICU
13
14 struct dirent;
15
16 bool unicrash_dir_init(struct unicrash **ucp, struct scrub_ctx *ctx,
17 struct xfs_bstat *bstat);
18 bool unicrash_xattr_init(struct unicrash **ucp, struct scrub_ctx *ctx,
19 struct xfs_bstat *bstat);
20 void unicrash_free(struct unicrash *uc);
21 bool unicrash_check_dir_name(struct unicrash *uc, const char *descr,
22 struct dirent *dirent);
23 bool unicrash_check_xattr_name(struct unicrash *uc, const char *descr,
24 const char *attrname);
25 #else
26 # define unicrash_dir_init(u, c, b) (true)
27 # define unicrash_xattr_init(u, c, b) (true)
28 # define unicrash_free(u) do {(u) = (u);} while (0)
29 # define unicrash_check_dir_name(u, d, n) (true)
30 # define unicrash_check_xattr_name(u, d, n) (true)
31 #endif /* HAVE_LIBICU */
32
33 #endif /* XFS_SCRUB_UNICRASH_H_ */