Files
Ernesto A. Fernández 72e6425af6 Set up a standalone repository for the APFS module
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>
2019-03-03 17:29:23 -03:00

46 lines
888 B
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* linux/fs/apfs/dir.h
*
* Copyright (C) 2018 Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
*/
#ifndef _APFS_DIR_H
#define _APFS_DIR_H
#include <linux/types.h>
struct inode;
struct qstr;
struct apfs_query;
/*
* Structure of the value of a directory entry. This is the data in
* the catalog nodes for record type APFS_TYPE_DIR_REC.
*/
struct apfs_drec_val {
__le64 file_id;
__le64 date_added;
__le16 flags;
u8 xfields[];
} __packed;
/*
* Directory entry record in memory
*/
struct apfs_drec {
u8 *name;
u64 ino;
int name_len;
unsigned int type;
};
extern int apfs_drec_from_query(struct apfs_query *query,
struct apfs_drec *drec);
extern int apfs_inode_by_name(struct inode *dir, const struct qstr *child,
u64 *ino);
extern const struct file_operations apfs_dir_operations;
#endif /* _APFS_DIR_H */