mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-03-05 03:01:42 +00:00
proc: remove '##' usage
Inability to jump to /proc/*/foo handlers with ctags is annoying. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
This commit is contained in:
parent
ecae934edc
commit
631f9c1868
183
fs/proc/base.c
183
fs/proc/base.c
@ -109,25 +109,22 @@ struct pid_entry {
|
|||||||
.op = OP, \
|
.op = OP, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DIR(NAME, MODE, OTYPE) \
|
#define DIR(NAME, MODE, iops, fops) \
|
||||||
NOD(NAME, (S_IFDIR|(MODE)), \
|
NOD(NAME, (S_IFDIR|(MODE)), &iops, &fops, {} )
|
||||||
&proc_##OTYPE##_inode_operations, &proc_##OTYPE##_operations, \
|
#define LNK(NAME, get_link) \
|
||||||
{} )
|
|
||||||
#define LNK(NAME, OTYPE) \
|
|
||||||
NOD(NAME, (S_IFLNK|S_IRWXUGO), \
|
NOD(NAME, (S_IFLNK|S_IRWXUGO), \
|
||||||
&proc_pid_link_inode_operations, NULL, \
|
&proc_pid_link_inode_operations, NULL, \
|
||||||
{ .proc_get_link = &proc_##OTYPE##_link } )
|
{ .proc_get_link = get_link } )
|
||||||
#define REG(NAME, MODE, OTYPE) \
|
#define REG(NAME, MODE, fops) \
|
||||||
NOD(NAME, (S_IFREG|(MODE)), NULL, \
|
NOD(NAME, (S_IFREG|(MODE)), NULL, &fops, {})
|
||||||
&proc_##OTYPE##_operations, {})
|
#define INF(NAME, MODE, read) \
|
||||||
#define INF(NAME, MODE, OTYPE) \
|
|
||||||
NOD(NAME, (S_IFREG|(MODE)), \
|
NOD(NAME, (S_IFREG|(MODE)), \
|
||||||
NULL, &proc_info_file_operations, \
|
NULL, &proc_info_file_operations, \
|
||||||
{ .proc_read = &proc_##OTYPE } )
|
{ .proc_read = read } )
|
||||||
#define ONE(NAME, MODE, OTYPE) \
|
#define ONE(NAME, MODE, show) \
|
||||||
NOD(NAME, (S_IFREG|(MODE)), \
|
NOD(NAME, (S_IFREG|(MODE)), \
|
||||||
NULL, &proc_single_file_operations, \
|
NULL, &proc_single_file_operations, \
|
||||||
{ .proc_show = &proc_##OTYPE } )
|
{ .proc_show = show } )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Count the number of hardlinks for the pid_entry table, excluding the .
|
* Count the number of hardlinks for the pid_entry table, excluding the .
|
||||||
@ -2134,12 +2131,12 @@ static const struct file_operations proc_pid_attr_operations = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const struct pid_entry attr_dir_stuff[] = {
|
static const struct pid_entry attr_dir_stuff[] = {
|
||||||
REG("current", S_IRUGO|S_IWUGO, pid_attr),
|
REG("current", S_IRUGO|S_IWUGO, proc_pid_attr_operations),
|
||||||
REG("prev", S_IRUGO, pid_attr),
|
REG("prev", S_IRUGO, proc_pid_attr_operations),
|
||||||
REG("exec", S_IRUGO|S_IWUGO, pid_attr),
|
REG("exec", S_IRUGO|S_IWUGO, proc_pid_attr_operations),
|
||||||
REG("fscreate", S_IRUGO|S_IWUGO, pid_attr),
|
REG("fscreate", S_IRUGO|S_IWUGO, proc_pid_attr_operations),
|
||||||
REG("keycreate", S_IRUGO|S_IWUGO, pid_attr),
|
REG("keycreate", S_IRUGO|S_IWUGO, proc_pid_attr_operations),
|
||||||
REG("sockcreate", S_IRUGO|S_IWUGO, pid_attr),
|
REG("sockcreate", S_IRUGO|S_IWUGO, proc_pid_attr_operations),
|
||||||
};
|
};
|
||||||
|
|
||||||
static int proc_attr_dir_readdir(struct file * filp,
|
static int proc_attr_dir_readdir(struct file * filp,
|
||||||
@ -2461,74 +2458,74 @@ static const struct file_operations proc_task_operations;
|
|||||||
static const struct inode_operations proc_task_inode_operations;
|
static const struct inode_operations proc_task_inode_operations;
|
||||||
|
|
||||||
static const struct pid_entry tgid_base_stuff[] = {
|
static const struct pid_entry tgid_base_stuff[] = {
|
||||||
DIR("task", S_IRUGO|S_IXUGO, task),
|
DIR("task", S_IRUGO|S_IXUGO, proc_task_inode_operations, proc_task_operations),
|
||||||
DIR("fd", S_IRUSR|S_IXUSR, fd),
|
DIR("fd", S_IRUSR|S_IXUSR, proc_fd_inode_operations, proc_fd_operations),
|
||||||
DIR("fdinfo", S_IRUSR|S_IXUSR, fdinfo),
|
DIR("fdinfo", S_IRUSR|S_IXUSR, proc_fdinfo_inode_operations, proc_fdinfo_operations),
|
||||||
#ifdef CONFIG_NET
|
#ifdef CONFIG_NET
|
||||||
DIR("net", S_IRUGO|S_IXUGO, net),
|
DIR("net", S_IRUGO|S_IXUGO, proc_net_inode_operations, proc_net_operations),
|
||||||
#endif
|
#endif
|
||||||
REG("environ", S_IRUSR, environ),
|
REG("environ", S_IRUSR, proc_environ_operations),
|
||||||
INF("auxv", S_IRUSR, pid_auxv),
|
INF("auxv", S_IRUSR, proc_pid_auxv),
|
||||||
ONE("status", S_IRUGO, pid_status),
|
ONE("status", S_IRUGO, proc_pid_status),
|
||||||
ONE("personality", S_IRUSR, pid_personality),
|
ONE("personality", S_IRUSR, proc_pid_personality),
|
||||||
INF("limits", S_IRUSR, pid_limits),
|
INF("limits", S_IRUSR, proc_pid_limits),
|
||||||
#ifdef CONFIG_SCHED_DEBUG
|
#ifdef CONFIG_SCHED_DEBUG
|
||||||
REG("sched", S_IRUGO|S_IWUSR, pid_sched),
|
REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_HAVE_ARCH_TRACEHOOK
|
#ifdef CONFIG_HAVE_ARCH_TRACEHOOK
|
||||||
INF("syscall", S_IRUSR, pid_syscall),
|
INF("syscall", S_IRUSR, proc_pid_syscall),
|
||||||
#endif
|
#endif
|
||||||
INF("cmdline", S_IRUGO, pid_cmdline),
|
INF("cmdline", S_IRUGO, proc_pid_cmdline),
|
||||||
ONE("stat", S_IRUGO, tgid_stat),
|
ONE("stat", S_IRUGO, proc_tgid_stat),
|
||||||
ONE("statm", S_IRUGO, pid_statm),
|
ONE("statm", S_IRUGO, proc_pid_statm),
|
||||||
REG("maps", S_IRUGO, maps),
|
REG("maps", S_IRUGO, proc_maps_operations),
|
||||||
#ifdef CONFIG_NUMA
|
#ifdef CONFIG_NUMA
|
||||||
REG("numa_maps", S_IRUGO, numa_maps),
|
REG("numa_maps", S_IRUGO, proc_numa_maps_operations),
|
||||||
#endif
|
#endif
|
||||||
REG("mem", S_IRUSR|S_IWUSR, mem),
|
REG("mem", S_IRUSR|S_IWUSR, proc_mem_operations),
|
||||||
LNK("cwd", cwd),
|
LNK("cwd", proc_cwd_link),
|
||||||
LNK("root", root),
|
LNK("root", proc_root_link),
|
||||||
LNK("exe", exe),
|
LNK("exe", proc_exe_link),
|
||||||
REG("mounts", S_IRUGO, mounts),
|
REG("mounts", S_IRUGO, proc_mounts_operations),
|
||||||
REG("mountinfo", S_IRUGO, mountinfo),
|
REG("mountinfo", S_IRUGO, proc_mountinfo_operations),
|
||||||
REG("mountstats", S_IRUSR, mountstats),
|
REG("mountstats", S_IRUSR, proc_mountstats_operations),
|
||||||
#ifdef CONFIG_PROC_PAGE_MONITOR
|
#ifdef CONFIG_PROC_PAGE_MONITOR
|
||||||
REG("clear_refs", S_IWUSR, clear_refs),
|
REG("clear_refs", S_IWUSR, proc_clear_refs_operations),
|
||||||
REG("smaps", S_IRUGO, smaps),
|
REG("smaps", S_IRUGO, proc_smaps_operations),
|
||||||
REG("pagemap", S_IRUSR, pagemap),
|
REG("pagemap", S_IRUSR, proc_pagemap_operations),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SECURITY
|
#ifdef CONFIG_SECURITY
|
||||||
DIR("attr", S_IRUGO|S_IXUGO, attr_dir),
|
DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_KALLSYMS
|
#ifdef CONFIG_KALLSYMS
|
||||||
INF("wchan", S_IRUGO, pid_wchan),
|
INF("wchan", S_IRUGO, proc_pid_wchan),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SCHEDSTATS
|
#ifdef CONFIG_SCHEDSTATS
|
||||||
INF("schedstat", S_IRUGO, pid_schedstat),
|
INF("schedstat", S_IRUGO, proc_pid_schedstat),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_LATENCYTOP
|
#ifdef CONFIG_LATENCYTOP
|
||||||
REG("latency", S_IRUGO, lstats),
|
REG("latency", S_IRUGO, proc_lstats_operations),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_PROC_PID_CPUSET
|
#ifdef CONFIG_PROC_PID_CPUSET
|
||||||
REG("cpuset", S_IRUGO, cpuset),
|
REG("cpuset", S_IRUGO, proc_cpuset_operations),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_CGROUPS
|
#ifdef CONFIG_CGROUPS
|
||||||
REG("cgroup", S_IRUGO, cgroup),
|
REG("cgroup", S_IRUGO, proc_cgroup_operations),
|
||||||
#endif
|
#endif
|
||||||
INF("oom_score", S_IRUGO, oom_score),
|
INF("oom_score", S_IRUGO, proc_oom_score),
|
||||||
REG("oom_adj", S_IRUGO|S_IWUSR, oom_adjust),
|
REG("oom_adj", S_IRUGO|S_IWUSR, proc_oom_adjust_operations),
|
||||||
#ifdef CONFIG_AUDITSYSCALL
|
#ifdef CONFIG_AUDITSYSCALL
|
||||||
REG("loginuid", S_IWUSR|S_IRUGO, loginuid),
|
REG("loginuid", S_IWUSR|S_IRUGO, proc_loginuid_operations),
|
||||||
REG("sessionid", S_IRUGO, sessionid),
|
REG("sessionid", S_IRUGO, proc_sessionid_operations),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_FAULT_INJECTION
|
#ifdef CONFIG_FAULT_INJECTION
|
||||||
REG("make-it-fail", S_IRUGO|S_IWUSR, fault_inject),
|
REG("make-it-fail", S_IRUGO|S_IWUSR, proc_fault_inject_operations),
|
||||||
#endif
|
#endif
|
||||||
#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE)
|
#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE)
|
||||||
REG("coredump_filter", S_IRUGO|S_IWUSR, coredump_filter),
|
REG("coredump_filter", S_IRUGO|S_IWUSR, proc_coredump_filter_operations),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_TASK_IO_ACCOUNTING
|
#ifdef CONFIG_TASK_IO_ACCOUNTING
|
||||||
INF("io", S_IRUGO, tgid_io_accounting),
|
INF("io", S_IRUGO, proc_tgid_io_accounting),
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2801,66 +2798,66 @@ out_no_task:
|
|||||||
* Tasks
|
* Tasks
|
||||||
*/
|
*/
|
||||||
static const struct pid_entry tid_base_stuff[] = {
|
static const struct pid_entry tid_base_stuff[] = {
|
||||||
DIR("fd", S_IRUSR|S_IXUSR, fd),
|
DIR("fd", S_IRUSR|S_IXUSR, proc_fd_inode_operations, proc_fd_operations),
|
||||||
DIR("fdinfo", S_IRUSR|S_IXUSR, fdinfo),
|
DIR("fdinfo", S_IRUSR|S_IXUSR, proc_fdinfo_inode_operations, proc_fd_operations),
|
||||||
REG("environ", S_IRUSR, environ),
|
REG("environ", S_IRUSR, proc_environ_operations),
|
||||||
INF("auxv", S_IRUSR, pid_auxv),
|
INF("auxv", S_IRUSR, proc_pid_auxv),
|
||||||
ONE("status", S_IRUGO, pid_status),
|
ONE("status", S_IRUGO, proc_pid_status),
|
||||||
ONE("personality", S_IRUSR, pid_personality),
|
ONE("personality", S_IRUSR, proc_pid_personality),
|
||||||
INF("limits", S_IRUSR, pid_limits),
|
INF("limits", S_IRUSR, proc_pid_limits),
|
||||||
#ifdef CONFIG_SCHED_DEBUG
|
#ifdef CONFIG_SCHED_DEBUG
|
||||||
REG("sched", S_IRUGO|S_IWUSR, pid_sched),
|
REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_HAVE_ARCH_TRACEHOOK
|
#ifdef CONFIG_HAVE_ARCH_TRACEHOOK
|
||||||
INF("syscall", S_IRUSR, pid_syscall),
|
INF("syscall", S_IRUSR, proc_pid_syscall),
|
||||||
#endif
|
#endif
|
||||||
INF("cmdline", S_IRUGO, pid_cmdline),
|
INF("cmdline", S_IRUGO, proc_pid_cmdline),
|
||||||
ONE("stat", S_IRUGO, tid_stat),
|
ONE("stat", S_IRUGO, proc_tid_stat),
|
||||||
ONE("statm", S_IRUGO, pid_statm),
|
ONE("statm", S_IRUGO, proc_pid_statm),
|
||||||
REG("maps", S_IRUGO, maps),
|
REG("maps", S_IRUGO, proc_maps_operations),
|
||||||
#ifdef CONFIG_NUMA
|
#ifdef CONFIG_NUMA
|
||||||
REG("numa_maps", S_IRUGO, numa_maps),
|
REG("numa_maps", S_IRUGO, proc_numa_maps_operations),
|
||||||
#endif
|
#endif
|
||||||
REG("mem", S_IRUSR|S_IWUSR, mem),
|
REG("mem", S_IRUSR|S_IWUSR, proc_mem_operations),
|
||||||
LNK("cwd", cwd),
|
LNK("cwd", proc_cwd_link),
|
||||||
LNK("root", root),
|
LNK("root", proc_root_link),
|
||||||
LNK("exe", exe),
|
LNK("exe", proc_exe_link),
|
||||||
REG("mounts", S_IRUGO, mounts),
|
REG("mounts", S_IRUGO, proc_mounts_operations),
|
||||||
REG("mountinfo", S_IRUGO, mountinfo),
|
REG("mountinfo", S_IRUGO, proc_mountinfo_operations),
|
||||||
#ifdef CONFIG_PROC_PAGE_MONITOR
|
#ifdef CONFIG_PROC_PAGE_MONITOR
|
||||||
REG("clear_refs", S_IWUSR, clear_refs),
|
REG("clear_refs", S_IWUSR, proc_clear_refs_operations),
|
||||||
REG("smaps", S_IRUGO, smaps),
|
REG("smaps", S_IRUGO, proc_smaps_operations),
|
||||||
REG("pagemap", S_IRUSR, pagemap),
|
REG("pagemap", S_IRUSR, proc_pagemap_operations),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SECURITY
|
#ifdef CONFIG_SECURITY
|
||||||
DIR("attr", S_IRUGO|S_IXUGO, attr_dir),
|
DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_KALLSYMS
|
#ifdef CONFIG_KALLSYMS
|
||||||
INF("wchan", S_IRUGO, pid_wchan),
|
INF("wchan", S_IRUGO, proc_pid_wchan),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SCHEDSTATS
|
#ifdef CONFIG_SCHEDSTATS
|
||||||
INF("schedstat", S_IRUGO, pid_schedstat),
|
INF("schedstat", S_IRUGO, proc_pid_schedstat),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_LATENCYTOP
|
#ifdef CONFIG_LATENCYTOP
|
||||||
REG("latency", S_IRUGO, lstats),
|
REG("latency", S_IRUGO, proc_lstats_operations),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_PROC_PID_CPUSET
|
#ifdef CONFIG_PROC_PID_CPUSET
|
||||||
REG("cpuset", S_IRUGO, cpuset),
|
REG("cpuset", S_IRUGO, proc_cpuset_operations),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_CGROUPS
|
#ifdef CONFIG_CGROUPS
|
||||||
REG("cgroup", S_IRUGO, cgroup),
|
REG("cgroup", S_IRUGO, proc_cgroup_operations),
|
||||||
#endif
|
#endif
|
||||||
INF("oom_score", S_IRUGO, oom_score),
|
INF("oom_score", S_IRUGO, proc_oom_score),
|
||||||
REG("oom_adj", S_IRUGO|S_IWUSR, oom_adjust),
|
REG("oom_adj", S_IRUGO|S_IWUSR, proc_oom_adjust_operations),
|
||||||
#ifdef CONFIG_AUDITSYSCALL
|
#ifdef CONFIG_AUDITSYSCALL
|
||||||
REG("loginuid", S_IWUSR|S_IRUGO, loginuid),
|
REG("loginuid", S_IWUSR|S_IRUGO, proc_loginuid_operations),
|
||||||
REG("sessionid", S_IRUSR, sessionid),
|
REG("sessionid", S_IRUSR, proc_sessionid_operations),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_FAULT_INJECTION
|
#ifdef CONFIG_FAULT_INJECTION
|
||||||
REG("make-it-fail", S_IRUGO|S_IWUSR, fault_inject),
|
REG("make-it-fail", S_IRUGO|S_IWUSR, proc_fault_inject_operations),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_TASK_IO_ACCOUNTING
|
#ifdef CONFIG_TASK_IO_ACCOUNTING
|
||||||
INF("io", S_IRUGO, tid_io_accounting),
|
INF("io", S_IRUGO, proc_tid_io_accounting),
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user