diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-03-18 11:59:31 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-03-18 11:59:31 -0400 |
commit | e0171ac5d5b9b17e07c8e26160e602f4e4c32a20 (patch) | |
tree | 8d88485d39a74790dca1506879c8ff2058d4b2f0 /src | |
parent | 130312cb2eb3f938fbf4bf552867dae048275342 (diff) | |
download | spmc-e0171ac5d5b9b17e07c8e26160e602f4e4c32a20.tar.gz |
Increased verbosity shows shell execution
Diffstat (limited to 'src')
-rw-r--r-- | src/relocation.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/relocation.c b/src/relocation.c index 3be3e4b..f22a25d 100644 --- a/src/relocation.c +++ b/src/relocation.c @@ -361,6 +361,10 @@ int relocate(const char *_filename, const char *_oldstr, const char *_newstr) { memset(cmd, '\0', sizeof(cmd)); sprintf(cmd, "reloc \"%s\" \"%s\" \"%s\" \"%s\" 2>&1", oldstr, newstr, filename, filename); + if (SPM_GLOBAL.verbose > 1) { + printf(" EXEC : %s\n", cmd); + } + shell(&proc, SHELL_OUTPUT, cmd); if (!proc) { free(oldstr); @@ -419,7 +423,10 @@ void relocate_root(const char *destroot, const char *baseroot) { if (t_record) { for (int i = 0; t_record[i] != NULL; i++) { if (SPM_GLOBAL.verbose) { - printf("Relocate TEXT : %s (%s -> %s)\n", t_record[i]->path, t_record[i]->prefix, destroot); + printf("Relocate TEXT : %s\n", t_record[i]->path); + } + if (SPM_GLOBAL.verbose > 1) { + printf(" EDIT : '%s' -> '%s'\n", t_record[i]->prefix, destroot); } file_replace_text(t_record[i]->path, t_record[i]->prefix, destroot); } |