summaryrefslogtreecommitdiff
path: root/bootctl
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2016-12-20 17:34:36 -0800
committerYifan Hong <elsk@google.com>2016-12-20 17:34:36 -0800
commit87d71f3586812c485c90bf16b57f7d3a55dfbf32 (patch)
tree206c2af3c06d549e432d9744eb510177ada4b49e /bootctl
parent3a1544a877787e89bf025da78bee5b9b841470ef (diff)
downloadextras-87d71f3586812c485c90bf16b57f7d3a55dfbf32.tar.gz
Update for hiding Status from Return<T> object.
Bug: 31348667 Test: compiles Change-Id: I31eb72e4e18dca68255a36915fcc980c928936d7
Diffstat (limited to 'bootctl')
-rw-r--r--bootctl/bootctl.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/bootctl/bootctl.cpp b/bootctl/bootctl.cpp
index 12baf831..ae808137 100644
--- a/bootctl/bootctl.cpp
+++ b/bootctl/bootctl.cpp
@@ -80,8 +80,8 @@ static std::function<void(CommandResult)> generate_callback(CommandResult *crp)
}
static int handle_return(Return<void> ret, CommandResult cr, const char* errStr) {
- if (!ret.getStatus().isOk()) {
- fprintf(stderr, errStr, ret.getStatus().exceptionMessage().string());
+ if (!ret.isOk()) {
+ fprintf(stderr, errStr, ret.description().c_str());
return EX_SOFTWARE;
} else if (!cr.success) {
fprintf(stderr, errStr, cr.errMsg.c_str());
@@ -114,8 +114,8 @@ static int do_set_slot_as_unbootable(sp<IBootControl> module,
}
static int handle_return(Return<BoolResult> ret, const char* errStr) {
- if (!ret.getStatus().isOk()) {
- fprintf(stderr, errStr, ret.getStatus().exceptionMessage().string());
+ if (!ret.isOk()) {
+ fprintf(stderr, errStr, ret.description().c_str());
return EX_SOFTWARE;
} else if (ret == BoolResult::INVALID_SLOT) {
fprintf(stderr, errStr, "Invalid slot");
@@ -145,9 +145,9 @@ static int do_get_suffix(sp<IBootControl> module, Slot slot_number) {
fprintf(stdout, "%s\n", suffix.c_str());
};
Return<void> ret = module->getSuffix(slot_number, cb);
- if (!ret.getStatus().isOk()) {
+ if (!ret.isOk()) {
fprintf(stderr, "Error calling getSuffix(): %s\n",
- ret.getStatus().exceptionMessage().string());
+ ret.description().c_str());
return EX_SOFTWARE;
}
return EX_OK;