diff options
author | Roland Veloz <rveloz@us.ibm.com> | 2019-07-02 04:00:24 -0500 |
---|---|---|
committer | Nicholas E. Bofferding <bofferdn@us.ibm.com> | 2019-07-09 08:58:20 -0500 |
commit | c4d644e0244ff77159115b31f13ebddbeda93953 (patch) | |
tree | 820f82bbd73afe91160b39dc77bb30ff5e4208dd | |
parent | 025067bcd46e8a97852576e378fc52f3acc4e62d (diff) | |
download | talos-hostboot-c4d644e0244ff77159115b31f13ebddbeda93953.tar.gz talos-hostboot-c4d644e0244ff77159115b31f13ebddbeda93953.zip |
Temporary fix: skipping over printing doubles to avoid a crash
The printing of double, for the trace FAPI_INF, was never implemented
and thus when a double is encountered via open power, a crash would
happen. This fix just simply skips over the double, printing nothing,
to avoid the crash. An implementation of the double will follow
later.
This fix is done because Romulus is blocked on this issue.
Change-Id: I48804de3cfecc966ba9541e1981aca342d7cbb83
CQ: SW464805
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79885
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
-rw-r--r-- | src/lib/sprintf.C | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/lib/sprintf.C b/src/lib/sprintf.C index c50ed3966..2cac40421 100644 --- a/src/lib/sprintf.C +++ b/src/lib/sprintf.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,2019 */ +/* [+] 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. */ @@ -70,6 +72,7 @@ struct format_options TYPE_CHAR, TYPE_STRING, TYPE_PTR, + TYPE_DOUBLE, }; types type; @@ -253,6 +256,10 @@ void parse_format_options(format_options& opt, const char*& fmt) opt.type = opt.TYPE_PTR; break; + case 'f': + opt.type = opt.TYPE_DOUBLE; + break; + default: opt.type = opt.TYPE_PERCENT; } @@ -312,6 +319,16 @@ size_t display_string(ConsoleBufferInterface& func, return count; } +size_t display_double(ConsoleBufferInterface& func, + const format_options& f, double number) +{ + // TODO: CQ SW464805 Put in an implementation for double + + size_t count(0); + + return count; +} + size_t display_number(ConsoleBufferInterface& func, const format_options& f, uint64_t number) { @@ -492,6 +509,10 @@ size_t vasprintf(ConsoleBufferInterface& func, const char* fmt, va_list& args) count += display_string(func, f, va_arg(args,const char*)); break; + case format_options::TYPE_DOUBLE: + count += display_double(func, f, va_arg(args,double)); + break; + // All the number cases. default: { |