[PATCH 3/4] kexec/fs2dt: cleanup pathname

Andrew Jones drjones at redhat.com
Fri Nov 20 09:31:53 PST 2015


putnode() will add the trailing '/', avoid having two. Also
pathstart is unused, get rid of it.

Signed-off-by: Andrew Jones <drjones at redhat.com>
---
 kexec/fs2dt.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c
index 9392e85d6d5f3..affee57b9bb62 100644
--- a/kexec/fs2dt.c
+++ b/kexec/fs2dt.c
@@ -39,7 +39,7 @@
 #define MEMRESERVE 256		/* max number of reserved memory blocks */
 #define MEM_RANGE_CHUNK_SZ 2048 /* Initial num dwords for mem ranges */
 
-static char pathname[MAXPATH], *pathstart;
+static char pathname[MAXPATH];
 static char propnames[NAMESPACE] = { 0 };
 static unsigned *dt_base, *dt;
 static unsigned int dt_cur_size;
@@ -800,9 +800,7 @@ static void add_boot_block(char **bufp, off_t *sizep)
 
 void create_flatten_tree(char **bufp, off_t *sizep, const char *cmdline)
 {
-	strcpy(pathname, "/proc/device-tree/");
-
-	pathstart = pathname + strlen(pathname);
+	strcpy(pathname, "/proc/device-tree");
 
 	dt_cur_size = INIT_TREE_WORDS;
 	dt_base = malloc(dt_cur_size*4);
-- 
2.4.3




More information about the kexec mailing list