diff --git a/tools/rockchip/boot_merger.c b/tools/rockchip/boot_merger.c index e8ccea3828..eec0b3c2c3 100644 --- a/tools/rockchip/boot_merger.c +++ b/tools/rockchip/boot_merger.c @@ -149,7 +149,8 @@ static inline void fixPath(char *path) strcpy(path, gNewPath); strcat(path, tmp); } - } else if (gPrePath && strncmp(path, gPrePath, strlen(gPrePath))) { + } else if ((ulong)path != (ulong)gOpts.outPath && /* ignore output */ + gPrePath && strncmp(path, gPrePath, strlen(gPrePath))) { strcpy(tmp, path); strcpy(path, gPrePath); strcat(path, tmp); @@ -318,6 +319,7 @@ static bool parseOut(FILE *file) } if (fscanf(file, OPT_OUT_PATH "=%[^\r^\n]", gOpts.outPath) != 1) return false; + /* fixPath(gOpts.outPath); */ printf("out:%s\n", gOpts.outPath); return true; } diff --git a/tools/rockchip/trust_merger.c b/tools/rockchip/trust_merger.c index 601d33f9d4..f36b5c8008 100644 --- a/tools/rockchip/trust_merger.c +++ b/tools/rockchip/trust_merger.c @@ -110,7 +110,8 @@ static inline void fixPath(char *path) strcpy(path, gNewPath); strcat(path, tmp); } - } else if (gPrePath && strncmp(path, gPrePath, strlen(gPrePath))) { + } else if ((ulong)path != (ulong)gOpts.outPath && /* ignore output */ + gPrePath && strncmp(path, gPrePath, strlen(gPrePath))) { strcpy(tmp, path); strcpy(path, gPrePath); strcat(path, tmp); @@ -220,6 +221,7 @@ static bool parseOut(FILE *file) } if (fscanf(file, OPT_OUT_PATH "=%[^\r^\n]", gOpts.outPath) != 1) return false; + /* fixPath(gOpts.outPath); */ printf("out:%s\n", gOpts.outPath); return true;