From 6d3269c91d8c7980dff9c3e517a85f3af477cafd Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Fri, 19 Jun 2015 18:14:32 -0400 Subject: [PATCH] linux: print memory map to stderr when fixed path not available --- core/linux/common.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/linux/common.cpp b/core/linux/common.cpp index 422689aa4..478d2c410 100644 --- a/core/linux/common.cpp +++ b/core/linux/common.cpp @@ -203,7 +203,11 @@ void print_mem_addr() if (ofp == NULL) { fprintf(stderr, "Can't open output file %s!\n", outputFilename); +#if HOST_OS == OS_LINUX + ofp = stderr; +#else exit(1); +#endif } char line [ 512 ]; @@ -212,7 +216,8 @@ void print_mem_addr() } fclose(ifp); - fclose(ofp); + if (ofp != stderr) + fclose(ofp); } void VArray2::UnLockRegion(u32 offset,u32 size)