]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - scrub/unicrash.h
xfsprogs: Release v6.7.0
[thirdparty/xfsprogs-dev.git] / scrub / unicrash.h
CommitLineData
8d318d62 1// SPDX-License-Identifier: GPL-2.0-or-later
4bbed4ec 2/*
52520522 3 * Copyright (C) 2018-2024 Oracle. All Rights Reserved.
8d318d62 4 * Author: Darrick J. Wong <djwong@kernel.org>
4bbed4ec
DW
5 */
6#ifndef XFS_SCRUB_UNICRASH_H_
7#define XFS_SCRUB_UNICRASH_H_
8
9struct unicrash;
10
11/* Unicode name collision detection. */
bff5d1a4 12#ifdef HAVE_LIBICU
4bbed4ec
DW
13
14struct dirent;
15
ac1c1f8e 16int unicrash_dir_init(struct unicrash **ucp, struct scrub_ctx *ctx,
4cca629d 17 struct xfs_bulkstat *bstat);
ac1c1f8e 18int unicrash_xattr_init(struct unicrash **ucp, struct scrub_ctx *ctx,
4cca629d 19 struct xfs_bulkstat *bstat);
ac1c1f8e 20int unicrash_fs_label_init(struct unicrash **ucp, struct scrub_ctx *ctx);
4bbed4ec 21void unicrash_free(struct unicrash *uc);
ac1c1f8e 22int unicrash_check_dir_name(struct unicrash *uc, struct descr *dsc,
4bbed4ec 23 struct dirent *dirent);
ac1c1f8e 24int unicrash_check_xattr_name(struct unicrash *uc, struct descr *dsc,
4bbed4ec 25 const char *attrname);
ac1c1f8e 26int unicrash_check_fs_label(struct unicrash *uc, struct descr *dsc,
3baa69cd 27 const char *label);
ff8717e5
DW
28bool unicrash_load(void);
29void unicrash_unload(void);
4bbed4ec 30#else
ac1c1f8e
DW
31# define unicrash_dir_init(u, c, b) (0)
32# define unicrash_xattr_init(u, c, b) (0)
33# define unicrash_fs_label_init(u, c) (0)
4bbed4ec 34# define unicrash_free(u) do {(u) = (u);} while (0)
ac1c1f8e
DW
35# define unicrash_check_dir_name(u, d, n) (0)
36# define unicrash_check_xattr_name(u, d, n) (0)
37# define unicrash_check_fs_label(u, d, n) (0)
ff8717e5
DW
38# define unicrash_load() (0)
39# define unicrash_unload() do { } while (0)
bff5d1a4 40#endif /* HAVE_LIBICU */
4bbed4ec
DW
41
42#endif /* XFS_SCRUB_UNICRASH_H_ */