I think we don't need to print fopen errors when stat fails.

Signed-off-by: WANG Cong <[EMAIL PROTECTED]>
Cc: Simon Horman <[EMAIL PROTECTED]>

---
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;

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Reply via email to