From: Christophe Lucas <clucas@rotomalug.org>
To: akpm@osdl.org, kernel-janitors@lists.osdl.org
Cc: domen@coderock.org, linux-kernel@vger.kernel.org
Subject: [PATCH] sh64 (kernel/process.c): procfs_failure && create_proc*
Date: Fri, 5 Aug 2005 17:38:47 +0200 [thread overview]
Message-ID: <20050805153847.GI5233@rhum.iomeda.fr> (raw)
description:
audit return code of create_proc_* function is a entry in janitors
TODO list. Audit this return and printk() when it fails, can spam a lot
system without compiled proc support. So this patch can audit return
code by means of procfs_failure().
Signed-off-by: Christophe Lucas <clucas@rotomalug.org>
diff -urpNX dontdiff linux-2.6.13-rc4-mm1.orig/arch/sh64/kernel/process.c linux-2.6.13-rc4-mm1/arch/sh64/kernel/process.c
--- linux-2.6.13-rc4-mm1.orig/arch/sh64/kernel/process.c 2005-07-29 00:44:44.000000000 +0200
+++ linux-2.6.13-rc4-mm1/arch/sh64/kernel/process.c 2005-08-03 12:42:07.000000000 +0200
@@ -953,8 +953,11 @@ asids_proc_info(char *buf, char **start,
static int __init register_proc_asids(void)
{
- create_proc_read_entry("asids", 0, NULL, asids_proc_info, NULL);
- return 0;
+ struct proc_dir_entry* ent;
+ ent = create_proc_read_entry("asids", 0, NULL, asids_proc_info, NULL);
+ if (!ent)
+ procfs_failure("process: Unable to create asids /proc entry.\n");
+ return 0;
}
__initcall(register_proc_asids);
reply other threads:[~2005-08-05 15:42 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=20050805153847.GI5233@rhum.iomeda.fr \
--to=clucas@rotomalug.org \
--cc=akpm@osdl.org \
--cc=domen@coderock.org \
--cc=kernel-janitors@lists.osdl.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®