linux: print memory map to stderr when fixed path not available

This commit is contained in:
Ilia Mirkin 2015-06-19 18:14:32 -04:00
parent a9fc0f5aa8
commit 6d3269c91d
1 changed files with 6 additions and 1 deletions

View File

@ -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,6 +216,7 @@ void print_mem_addr()
}
fclose(ifp);
if (ofp != stderr)
fclose(ofp);
}