app/trace: don't use shm_name when using file_name during remaping trace
Change-Id: I9449d40ff31039f3f59bc60c956592e0e565437a Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/435114 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
This commit is contained in:
parent
e5b455a150
commit
6b8ca50e84
@ -383,7 +383,7 @@ int main(int argc, char **argv)
|
|||||||
munmap(history_ptr, sizeof(*g_histories));
|
munmap(history_ptr, sizeof(*g_histories));
|
||||||
history_ptr = mmap(NULL, trace_histories_size, PROT_READ, MAP_SHARED, fd, 0);
|
history_ptr = mmap(NULL, trace_histories_size, PROT_READ, MAP_SHARED, fd, 0);
|
||||||
if (history_ptr == MAP_FAILED) {
|
if (history_ptr == MAP_FAILED) {
|
||||||
fprintf(stderr, "Could not mmap shm %s.\n", shm_name);
|
fprintf(stderr, "Could not mmap %s.\n", file_name ? file_name : shm_name);
|
||||||
usage();
|
usage();
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user