Skip to contentSkip to conversation

kexec/crashdump.c: remove useless code

PATCH Applied WANG Cong 2 participants 2 messages Jul 10, 2008

Subsystems (2)
lore
Share & tools
lore

WANG Cong

author
#0 lore raw

PATCH 1/1 kexec/crashdump.c: remove useless code

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

Cc Simon Horman <[email protected]>

---

kexec/crashdump.c +1 -3
index 92de524..257b3f5 100644
@@ -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