Add Linux compatibility header stubs needed to compile extents_status.c: - backing-dev.h: Backing device info stub - dax.h: Direct Access (DAX) stubs - iomap.h: I/O mapping operations and structures - mman.h: Memory mapping flags - mount.h: VFS mount structures - pagevec.h: Page vector batching - pfn_t.h: Page frame number type - posix_acl_xattr.h: POSIX ACL xattr definitions - proc_fs.h: Proc filesystem stub - uio.h: User I/O vector definitions - xattr.h: Extended attributes - trace/events/ext4.h: Trace event stubs Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com>
67 lines
1.0 KiB
C
67 lines
1.0 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* Berkeley style UIO structures - Alan Cox 1994.
|
|
*/
|
|
#ifndef __LINUX_UIO_H
|
|
#define __LINUX_UIO_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct kvec {
|
|
void *iov_base;
|
|
size_t iov_len;
|
|
};
|
|
|
|
struct iovec {
|
|
void __user *iov_base;
|
|
size_t iov_len;
|
|
};
|
|
|
|
enum iter_type {
|
|
ITER_UBUF,
|
|
ITER_IOVEC,
|
|
ITER_BVEC,
|
|
ITER_KVEC,
|
|
ITER_XARRAY,
|
|
ITER_DISCARD,
|
|
};
|
|
|
|
struct iov_iter {
|
|
u8 iter_type;
|
|
bool nofault;
|
|
bool data_source;
|
|
size_t iov_offset;
|
|
union {
|
|
size_t count;
|
|
};
|
|
union {
|
|
const struct iovec *__iov;
|
|
const struct kvec *kvec;
|
|
const struct bio_vec *bvec;
|
|
struct xarray *xarray;
|
|
void __user *ubuf;
|
|
};
|
|
union {
|
|
unsigned long nr_segs;
|
|
loff_t xarray_start;
|
|
};
|
|
};
|
|
|
|
static inline size_t iov_iter_count(const struct iov_iter *i)
|
|
{
|
|
return i->count;
|
|
}
|
|
|
|
static inline void iov_iter_truncate(struct iov_iter *i, size_t count)
|
|
{
|
|
if (i->count > count)
|
|
i->count = count;
|
|
}
|
|
|
|
static inline size_t iov_iter_alignment(const struct iov_iter *i)
|
|
{
|
|
return 0; /* Stub - assume aligned */
|
|
}
|
|
|
|
#endif /* __LINUX_UIO_H */
|