[Skiboot] [RFC PATCH 0/2] Ensure libflash/blocklevel always returns OPAL API error codes
Cyril Bur
cyril.bur at au1.ibm.com
Wed Jan 25 18:56:51 AEDT 2017
Theres been a fair bit of churn here and a lot of the blocklevel code
was written for userspace and then used in skiboot. One thing that may
have been neglected is ensuring that (when in skiboot) OPAL API error
codes get returned back to those who expect them.
Luckily I haven't found any places where we obviously get it wrong and
where we're going to confuse Linux but lets get it right.
This issue was reported to me by Benh.
It might be interesting to have this also be usable by external/ tools
but pulling in opal-api.h was a rabbithole I didn't want to go down
for now, it isn't as simple as just including it.
Feedback welcome,
Cyril
Cyril Bur (2):
libflash/blocklevel: Optionally always return opal-api return codes
core/flash: Force blocklevel to return only opal-api return codes
core/flash.c | 3 ++
libflash/Makefile.inc | 4 ++-
libflash/blocklevel-errors.c | 67 ++++++++++++++++++++++++++++++++++++++++++++
libflash/blocklevel-errors.h | 30 ++++++++++++++++++++
libflash/blocklevel.c | 59 +++++++++++++++++++++-----------------
libflash/blocklevel.h | 3 ++
6 files changed, 140 insertions(+), 26 deletions(-)
create mode 100644 libflash/blocklevel-errors.c
create mode 100644 libflash/blocklevel-errors.h
--
2.11.0
More information about the Skiboot
mailing list