tools: rockchip: boot_merger: ignore "--prepath" for output path

Change-Id: I89335926cc161c484e813fbd8a699935762f1a34
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
Joseph Chen 2019-06-24 10:14:47 +08:00 committed by Jianhong Chen
parent 29cdb69100
commit 5f0203b772
2 changed files with 6 additions and 2 deletions

View File

@ -149,7 +149,8 @@ static inline void fixPath(char *path)
strcpy(path, gNewPath); strcpy(path, gNewPath);
strcat(path, tmp); 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(tmp, path);
strcpy(path, gPrePath); strcpy(path, gPrePath);
strcat(path, tmp); strcat(path, tmp);
@ -318,6 +319,7 @@ static bool parseOut(FILE *file)
} }
if (fscanf(file, OPT_OUT_PATH "=%[^\r^\n]", gOpts.outPath) != 1) if (fscanf(file, OPT_OUT_PATH "=%[^\r^\n]", gOpts.outPath) != 1)
return false; return false;
/* fixPath(gOpts.outPath); */
printf("out:%s\n", gOpts.outPath); printf("out:%s\n", gOpts.outPath);
return true; return true;
} }

View File

@ -110,7 +110,8 @@ static inline void fixPath(char *path)
strcpy(path, gNewPath); strcpy(path, gNewPath);
strcat(path, tmp); 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(tmp, path);
strcpy(path, gPrePath); strcpy(path, gPrePath);
strcat(path, tmp); strcat(path, tmp);
@ -220,6 +221,7 @@ static bool parseOut(FILE *file)
} }
if (fscanf(file, OPT_OUT_PATH "=%[^\r^\n]", gOpts.outPath) != 1) if (fscanf(file, OPT_OUT_PATH "=%[^\r^\n]", gOpts.outPath) != 1)
return false; return false;
/* fixPath(gOpts.outPath); */
printf("out:%s\n", gOpts.outPath); printf("out:%s\n", gOpts.outPath);
return true; return true;