summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2008-07-10 11:48:23 +0100
committerSimon Horman <horms@verge.net.au>2008-07-11 09:10:29 +1000
commit1b33e8ec4c14bd244c7eb70fa4fa053d62f88b2d (patch)
tree0473c741956d93cb270e582ebef761eb060bf8a9
parent82842420947678b886a4b9daed9756a86ce8eaee (diff)
kexec/crashdump.c: remove useless code
I think we don't need to print fopen errors when stat fails. Signed-off-by: WANG Cong <wangcong@zeuux.org> Cc: Simon Horman <horms@verge.net.au> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/crashdump.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kexec/crashdump.c b/kexec/crashdump.c
index 92de524..257b3f5 100644
--- a/kexec/crashdump.c
+++ b/kexec/crashdump.c
@@ -84,14 +84,12 @@ int get_crash_notes_per_cpu(int cpu, uint64_t *addr, uint64_t *len)
strerror(fopen_errno));
if (!stat("/sys/devices", &cpu_stat)) {
stat_errno = errno;
- fprintf(stderr, "Could not open \"%s\": %s\n",
- crash_notes, strerror(fopen_errno));
if (stat_errno == ENOENT)
die("\"/sys/devices\" does not exist. "
"Sysfs does not seem to be mounted. "
"Try mounting sysfs.\n");
die("Could not open \"/sys/devices\": %s\n",
- crash_notes, strerror(stat_errno));
+ strerror(stat_errno));
}
/* CPU is not physically present.*/
return -1;