You've already forked linux-apfs-oot
mirror of
https://github.com/linux-apfs/linux-apfs-oot.git
synced 2026-05-01 15:01:20 -07:00
72e6425af6
Copy the code of the APFS module into its own repository, without the rest of the kernel tree. Development will continue upstream, but the intention is to make life easier for potential users. To get the module to build independently, rewrite the Makefile and add a definition for the APFS_SUPER_MAGIC macro. Since the intention is to support a range of kernel versions, use preprocessor checks to handle kernels without statx, without iversion, and without SB_RDONLY. Provide a README file based on the upstream documentation, but with additional build and mount instructions. Add a LICENSE file as well. Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
30 lines
881 B
C
30 lines
881 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* linux/fs/apfs/unicode.h
|
|
*
|
|
* Copyright (C) 2018 Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
|
|
*/
|
|
|
|
#ifndef _APFS_UNICODE_H
|
|
#define _APFS_UNICODE_H
|
|
|
|
#include <linux/nls.h>
|
|
|
|
/*
|
|
* This structure helps apfs_normalize_next() to retrieve one normalized
|
|
* (and case-folded) UTF-32 character at a time from a UTF-8 string.
|
|
*/
|
|
struct apfs_unicursor {
|
|
const char *utf8curr; /* Start of UTF-8 to decompose and reorder */
|
|
int length; /* Length of normalization until next starter */
|
|
int last_pos; /* Offset in substring of last char returned */
|
|
u8 last_ccc; /* CCC of the last character returned */
|
|
};
|
|
|
|
extern void apfs_init_unicursor(struct apfs_unicursor *cursor,
|
|
const char *utf8str);
|
|
extern unicode_t apfs_normalize_next(struct apfs_unicursor *cursor,
|
|
bool case_fold);
|
|
|
|
#endif /* _APFS_UNICODE_H */
|