diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-12-08 12:05:04 +1100 |
---|---|---|
committer | Stephen Cprek <smcprek@us.ibm.com> | 2016-02-19 15:31:33 -0600 |
commit | ad7a994f5d8b37ffe56e7f296dd0348da2a45686 (patch) | |
tree | e7049030990c8e4a2a670d8ed305c20d254b562d | |
parent | 2cae5d32fd564af2024ad028e8fcd8bec081e23d (diff) | |
download | talos-hostboot-ad7a994f5d8b37ffe56e7f296dd0348da2a45686.tar.gz talos-hostboot-ad7a994f5d8b37ffe56e7f296dd0348da2a45686.zip |
linker/genlist: use stderr for displaying error messages
Since genlist is used in makefiles and stdout redirected,
if there is an error, you will not see it in make output at
all, instead having things fail in weird ways.
Use fprintf for stderr rather than to stdout to avoid
Change-Id: Ief51d85817540437c2831719270a04efbe2a2feb
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Patrick Williams <iawillia@us.ibm.com>
Forwardport: yes
Github: See open-power/hostboot#39
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/23179
Tested-by: Jenkins Server
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/23184
-rw-r--r-- | src/build/linker/genlist.C | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/build/linker/genlist.C b/src/build/linker/genlist.C index 69b52a1cc..053f7aaa2 100644 --- a/src/build/linker/genlist.C +++ b/src/build/linker/genlist.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,2015 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -109,7 +111,7 @@ int main(int argc, char** argv) g_crossPrefix = getenv("CROSS_PREFIX"); if (NULL == g_crossPrefix) { - printf("Environment variable CROSS_PREFIX not set.\n"); + fprintf(stderr, "Environment variable CROSS_PREFIX not set.\n"); exit(-1); } g_crossPrefix = strdup(g_crossPrefix); @@ -155,7 +157,7 @@ int main(int argc, char** argv) void print_usage() { - printf("genlist <image>\n"); + fprintf(stderr, "genlist <image>\n"); exit(-1); } @@ -176,7 +178,7 @@ void parse_modinfo_file(const string& i_image) FILE* modinfo_file = fopen(modinfo_name.c_str(), "r"); if (NULL == modinfo_file) { - printf("Unable to open modinfo file.\n"); + fprintf(stderr, "Unable to open modinfo file.\n"); exit(-1); } @@ -217,7 +219,7 @@ void parse_syms_file(const string& i_image) FILE* syms_file = fopen(syms_name.c_str(), "r"); if (NULL == syms_file) { - printf("Unable to open syms file.\n"); + fprintf(stderr, "Unable to open syms file.\n"); exit(-1); } |