XenevaOS
Loading...
Searching...
No Matches
proc_fs.h
Go to the documentation of this file.
1#ifndef __LINUX_PROC_FS_H__
2#define __LINUX_PROC_FS_H__
3
4/*
5 * DCL <linux/proc_fs.h> -- Xeneva has no procfs, so this header exists to
6 * resolve the include and to declare what a ported file might reach for.
7 *
8 * None of the nine tty/serial files creates a proc entry: uart_proc_show() is
9 * only *assigned* under #ifdef CONFIG_PROC_FS (serial_core.c:2690), and DCL's
10 * autoconf does not define it -- so the whole /proc/tty/driver/serial path is
11 * compiled out, exactly as on a mainline kernel built without procfs. The
12 * declarations below are what the rest of that path would use, and the
13 * functions answer NULL/void rather than pretending an entry was created:
14 * a caller that checks the return (mainline does, and unwinds) then sees the
15 * truth.
16 *
17 * seq_printf()/seq_puts(), which uart_proc_show() writes through, live in
18 * <linux/seq_file.h> because they are used outside procfs too.
19 */
20
21#include <linux/kernel.h> /* umode_t -- kernel.h:57 owns the typedef */
22#include <linux/seq_file.h>
23
24struct proc_dir_entry;
25struct file;
26struct inode;
27
28struct proc_ops {
29 unsigned int (*proc_open)(struct inode*, struct file*);
30 long (*proc_read)(struct file*, char*, unsigned long, long long*);
31 long (*proc_lseek)(struct file*, long, int);
32 int (*proc_release)(struct inode*, struct file*);
33};
34
35struct proc_dir_entry* proc_create(const char* name, umode_t mode,
36 struct proc_dir_entry* parent,
37 const struct proc_ops* proc_ops);
38struct proc_dir_entry* proc_create_single(const char* name, umode_t mode,
39 struct proc_dir_entry* parent,
40 int (*show)(struct seq_file*, void*));
41void remove_proc_entry(const char* name, struct proc_dir_entry* parent);
42void proc_remove(struct proc_dir_entry* de);
43
44#endif /* __LINUX_PROC_FS_H__ */
struct drm_crtc struct drm_plane struct drm_plane const struct drm_crtc_funcs const char * name
Definition drm_crtc.h:1242
struct kobject * parent
Definition kobject.h:91
unsigned int umode_t
Definition kernel.h:58
void proc_remove(struct proc_dir_entry *de)
void remove_proc_entry(const char *name, struct proc_dir_entry *parent)
struct proc_dir_entry * proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops)
struct proc_dir_entry * proc_create_single(const char *name, umode_t mode, struct proc_dir_entry *parent, int(*show)(struct seq_file *, void *))
Definition fs.h:142
Definition fs.h:183
Definition proc_fs.h:28
long(* proc_lseek)(struct file *, long, int)
Definition proc_fs.h:31
unsigned int(* proc_open)(struct inode *, struct file *)
Definition proc_fs.h:29
long(* proc_read)(struct file *, char *, unsigned long, long long *)
Definition proc_fs.h:30
int(* proc_release)(struct inode *, struct file *)
Definition proc_fs.h:32
Definition seq_file.h:47
#define mode(x)