am 0167cb15: Always return success if the command was run.
* commit '0167cb15935592deea9abbd6a8bbe904e27bd101':
Always return success if the command was run.
diff --git a/CommandListener.cpp b/CommandListener.cpp
index 4c9e4bc..4459981 100644
--- a/CommandListener.cpp
+++ b/CommandListener.cpp
@@ -554,13 +554,11 @@
cli->sendMsg(ResponseCode::CommandSyntaxError, "Unknown cryptfs cmd", false);
}
- if (!rc) {
- cli->sendMsg(ResponseCode::CommandOkay, "cryptfs operation succeeded", false);
- } else {
- int erno = errno;
- rc = ResponseCode::convertFromErrno();
- cli->sendMsg(rc, "cryptfs operation failed", true);
- }
+ // Always report that the command succeeded and return the error code.
+ // The caller will check the return value to see what the error was.
+ char msg[255];
+ snprintf(msg, sizeof(msg), "%d", rc);
+ cli->sendMsg(ResponseCode::CommandOkay, msg, false);
return 0;
}