3 fs/proc/ (implementações de alguns arquivos também)
4 Documentation/filesystem/proc.txt (apenas descrição de alguns arquivos)
6 struct file_operations (já visto em char device)
7 #include <linux/proc_fs.h>
8 PDE (proc dir entry) - detalhe de implementação
10 pde = create_proc_entry(name, mode, parent);
11 pde->proc_fops = &fops;
14 remove_proc_entry(name, parent);
15 proc_mkdir(name, parent);
16 proc_mkdir_mode(name, mode, parent);
17 proc_create(name, mode, parent, fops);
19 proc_net_mkdir(net, name, parent);
20 proc_net_remove(net, name);
21 proc_net_fops_create(net, name, mode, fops);
23 struct net * serve para limitar a um net_namespace apenas.
29 #include <linux/seq_file.h>
30 Documentation/filesystems/seq_file.txt
32 struct seq_operations ops = {
39 void * start(struct seq_file *, loff_t *pos);
40 void * next(struct seq_file *, void *, loff_t *pos);
41 void stop(struct seq_file *, void *);
42 int show(struct seq_file *, void *v);
44 int seq_printf(struct seq_file *, fmt, ...);
46 int open(struct inode *inode, struct file *fp)
48 return seq_open(fp, &seq_ops);
53 .release = seq_release,
60 int single_open(struct file *, show, void *data);
62 int show(struct seq_file *, void *);