From: Hirofumi Nakagawa <hnakagawa@miraclelinux.com>
To: linux-kernel@vger.kernel.org
Cc: menage@google.com
Subject: [RFC][PATCH][2/3] move lnames from fs/proc/base.c to include/linux/resource.h
Date: Wed, 23 Jul 2008 21:24:07 +0900 [thread overview]
Message-ID: <488722E7.8040906@miraclelinux.com> (raw)
Signed-off-by: Hirofumi Nakagawa <hnakagawa@miraclelinux.com>
---
fs/proc/base.c | 24 ------------------------
include/linux/resource.h | 24 ++++++++++++++++++++++++
2 files changed, 24 insertions(+), 24 deletions(-)
--- linux-2.6.26-rc8-mm1.orig/fs/proc/base.c 2008-07-22 15:14:42.000000000 +0900
+++ linux-2.6.26-rc8-mm1/fs/proc/base.c 2008-07-22 15:14:47.000000000 +0900
@@ -431,30 +431,6 @@ static int proc_oom_score(struct task_st
return sprintf(buffer, "%lu\n", points);
}
-struct limit_names {
- char *name;
- char *unit;
-};
-
-static const struct limit_names lnames[RLIM_NLIMITS] = {
- [RLIMIT_CPU] = {"Max cpu time", "ms"},
- [RLIMIT_FSIZE] = {"Max file size", "bytes"},
- [RLIMIT_DATA] = {"Max data size", "bytes"},
- [RLIMIT_STACK] = {"Max stack size", "bytes"},
- [RLIMIT_CORE] = {"Max core file size", "bytes"},
- [RLIMIT_RSS] = {"Max resident set", "bytes"},
- [RLIMIT_NPROC] = {"Max processes", "processes"},
- [RLIMIT_NOFILE] = {"Max open files", "files"},
- [RLIMIT_MEMLOCK] = {"Max locked memory", "bytes"},
- [RLIMIT_AS] = {"Max address space", "bytes"},
- [RLIMIT_LOCKS] = {"Max file locks", "locks"},
- [RLIMIT_SIGPENDING] = {"Max pending signals", "signals"},
- [RLIMIT_MSGQUEUE] = {"Max msgqueue size", "bytes"},
- [RLIMIT_NICE] = {"Max nice priority", NULL},
- [RLIMIT_RTPRIO] = {"Max realtime priority", NULL},
- [RLIMIT_RTTIME] = {"Max realtime timeout", "us"},
-};
-
/* Display limits for a process */
static int proc_pid_limits(struct task_struct *task, char *buffer)
{
--- linux-2.6.26-rc8-mm1.orig/include/linux/resource.h 2008-07-22 15:14:42.000000000 +0900
+++ linux-2.6.26-rc8-mm1/include/linux/resource.h 2008-07-22 15:14:47.000000000 +0900
@@ -70,6 +70,30 @@ struct rlimit {
*/
#include <asm/resource.h>
+struct limit_names {
+ char *name;
+ char *unit;
+};
+
+static const struct limit_names lnames[RLIM_NLIMITS] = {
+ [RLIMIT_CPU] = {"Max cpu time", "ms"},
+ [RLIMIT_FSIZE] = {"Max file size", "bytes"},
+ [RLIMIT_DATA] = {"Max data size", "bytes"},
+ [RLIMIT_STACK] = {"Max stack size", "bytes"},
+ [RLIMIT_CORE] = {"Max core file size", "bytes"},
+ [RLIMIT_RSS] = {"Max resident set", "bytes"},
+ [RLIMIT_NPROC] = {"Max processes", "processes"},
+ [RLIMIT_NOFILE] = {"Max open files", "files"},
+ [RLIMIT_MEMLOCK] = {"Max locked memory", "bytes"},
+ [RLIMIT_AS] = {"Max address space", "bytes"},
+ [RLIMIT_LOCKS] = {"Max file locks", "locks"},
+ [RLIMIT_SIGPENDING] = {"Max pending signals", "signals"},
+ [RLIMIT_MSGQUEUE] = {"Max msgqueue size", "bytes"},
+ [RLIMIT_NICE] = {"Max nice priority", NULL},
+ [RLIMIT_RTPRIO] = {"Max realtime priority", NULL},
+ [RLIMIT_RTTIME] = {"Max realtime timeout", "us"},
+};
+
int getrusage(struct task_struct *p, int who, struct rusage __user *ru);
#endif
reply other threads:[~2008-07-23 12:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=488722E7.8040906@miraclelinux.com \
--to=hnakagawa@miraclelinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox