Add stub headers for Linux kernel interfaces that ext4 code expects: - capability.h: stub capability checks (always return true) - cred.h: stub credential types and macros - file.h: stub file descriptor helpers - path.h: basic path structure definition - security.h: stub LSM hooks (no-ops) - seq_file.h: stub seq_file interface These provide minimal definitions to allow ext4 code to compile. Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com>
30 lines
466 B
C
30 lines
466 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Wrapper functions for accessing the file_struct fd array.
|
|
*/
|
|
#ifndef _LINUX_FILE_H
|
|
#define _LINUX_FILE_H
|
|
|
|
/*
|
|
* Stub definitions for Linux kernel file handling.
|
|
*/
|
|
|
|
struct file;
|
|
struct fd {
|
|
struct file *file;
|
|
unsigned int flags;
|
|
};
|
|
|
|
#define EMPTY_FD ((struct fd){ NULL, 0 })
|
|
|
|
static inline struct fd fdget(unsigned int fd)
|
|
{
|
|
return EMPTY_FD;
|
|
}
|
|
|
|
static inline void fdput(struct fd fd)
|
|
{
|
|
}
|
|
|
|
#endif /* _LINUX_FILE_H */
|