base.c (db985cbd67c45f875ef43cb5febfaa8cbd203c27) base.c (006f4ac49742b5f70ef7e39176fd42a500144ccc)
1/*
2 * linux/fs/proc/base.c
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 *
6 * proc base directory handling functions
7 *
8 * 1999, Al Viro. Rewritten. Now it covers the whole per-process part.

--- 362 unchanged lines hidden (view full) ---

371 .read = seq_read,
372 .write = lstats_write,
373 .llseek = seq_lseek,
374 .release = single_release,
375};
376
377#endif
378
1/*
2 * linux/fs/proc/base.c
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 *
6 * proc base directory handling functions
7 *
8 * 1999, Al Viro. Rewritten. Now it covers the whole per-process part.

--- 362 unchanged lines hidden (view full) ---

371 .read = seq_read,
372 .write = lstats_write,
373 .llseek = seq_lseek,
374 .release = single_release,
375};
376
377#endif
378
379#ifdef CONFIG_CGROUPS
380static int cgroup_open(struct inode *inode, struct file *file)
381{
382 struct pid *pid = PROC_I(inode)->pid;
383 return single_open(file, proc_cgroup_show, pid);
384}
385
386static const struct file_operations proc_cgroup_operations = {
387 .open = cgroup_open,
388 .read = seq_read,
389 .llseek = seq_lseek,
390 .release = single_release,
391};
392#endif
393
394#ifdef CONFIG_PROC_PID_CPUSET
395
396static int cpuset_open(struct inode *inode, struct file *file)
397{
398 struct pid *pid = PROC_I(inode)->pid;
399 return single_open(file, proc_cpuset_show, pid);
400}
401

--- 2169 unchanged lines hidden (view full) ---

2571#endif
2572#ifdef CONFIG_LATENCYTOP
2573 REG("latency", S_IRUGO, proc_lstats_operations),
2574#endif
2575#ifdef CONFIG_PROC_PID_CPUSET
2576 REG("cpuset", S_IRUGO, proc_cpuset_operations),
2577#endif
2578#ifdef CONFIG_CGROUPS
379#ifdef CONFIG_PROC_PID_CPUSET
380
381static int cpuset_open(struct inode *inode, struct file *file)
382{
383 struct pid *pid = PROC_I(inode)->pid;
384 return single_open(file, proc_cpuset_show, pid);
385}
386

--- 2169 unchanged lines hidden (view full) ---

2556#endif
2557#ifdef CONFIG_LATENCYTOP
2558 REG("latency", S_IRUGO, proc_lstats_operations),
2559#endif
2560#ifdef CONFIG_PROC_PID_CPUSET
2561 REG("cpuset", S_IRUGO, proc_cpuset_operations),
2562#endif
2563#ifdef CONFIG_CGROUPS
2579 REG("cgroup", S_IRUGO, proc_cgroup_operations),
2564 ONE("cgroup", S_IRUGO, proc_cgroup_show),
2580#endif
2581 ONE("oom_score", S_IRUGO, proc_oom_score),
2582 REG("oom_adj", S_IRUGO|S_IWUSR, proc_oom_adj_operations),
2583 REG("oom_score_adj", S_IRUGO|S_IWUSR, proc_oom_score_adj_operations),
2584#ifdef CONFIG_AUDITSYSCALL
2585 REG("loginuid", S_IWUSR|S_IRUGO, proc_loginuid_operations),
2586 REG("sessionid", S_IRUGO, proc_sessionid_operations),
2587#endif

--- 329 unchanged lines hidden (view full) ---

2917#endif
2918#ifdef CONFIG_LATENCYTOP
2919 REG("latency", S_IRUGO, proc_lstats_operations),
2920#endif
2921#ifdef CONFIG_PROC_PID_CPUSET
2922 REG("cpuset", S_IRUGO, proc_cpuset_operations),
2923#endif
2924#ifdef CONFIG_CGROUPS
2565#endif
2566 ONE("oom_score", S_IRUGO, proc_oom_score),
2567 REG("oom_adj", S_IRUGO|S_IWUSR, proc_oom_adj_operations),
2568 REG("oom_score_adj", S_IRUGO|S_IWUSR, proc_oom_score_adj_operations),
2569#ifdef CONFIG_AUDITSYSCALL
2570 REG("loginuid", S_IWUSR|S_IRUGO, proc_loginuid_operations),
2571 REG("sessionid", S_IRUGO, proc_sessionid_operations),
2572#endif

--- 329 unchanged lines hidden (view full) ---

2902#endif
2903#ifdef CONFIG_LATENCYTOP
2904 REG("latency", S_IRUGO, proc_lstats_operations),
2905#endif
2906#ifdef CONFIG_PROC_PID_CPUSET
2907 REG("cpuset", S_IRUGO, proc_cpuset_operations),
2908#endif
2909#ifdef CONFIG_CGROUPS
2925 REG("cgroup", S_IRUGO, proc_cgroup_operations),
2910 ONE("cgroup", S_IRUGO, proc_cgroup_show),
2926#endif
2927 ONE("oom_score", S_IRUGO, proc_oom_score),
2928 REG("oom_adj", S_IRUGO|S_IWUSR, proc_oom_adj_operations),
2929 REG("oom_score_adj", S_IRUGO|S_IWUSR, proc_oom_score_adj_operations),
2930#ifdef CONFIG_AUDITSYSCALL
2931 REG("loginuid", S_IWUSR|S_IRUGO, proc_loginuid_operations),
2932 REG("sessionid", S_IRUGO, proc_sessionid_operations),
2933#endif

--- 244 unchanged lines hidden ---
2911#endif
2912 ONE("oom_score", S_IRUGO, proc_oom_score),
2913 REG("oom_adj", S_IRUGO|S_IWUSR, proc_oom_adj_operations),
2914 REG("oom_score_adj", S_IRUGO|S_IWUSR, proc_oom_score_adj_operations),
2915#ifdef CONFIG_AUDITSYSCALL
2916 REG("loginuid", S_IWUSR|S_IRUGO, proc_loginuid_operations),
2917 REG("sessionid", S_IRUGO, proc_sessionid_operations),
2918#endif

--- 244 unchanged lines hidden ---