trusty_apploader: log to stderr
Print an error message to stderr on connection failure, so that the command doesn't exit silently in case of the common user error of forgetting to run it as root. Bug: None Test: Run as regular user, see "permission denied" message. Change-Id: Ia213dedccab27e6152b5eb969fbee06d82d3d4ff
This commit is contained in:
parent
51fd280b8e
commit
92cd8891ff
1 changed files with 2 additions and 0 deletions
|
@ -245,6 +245,8 @@ static ssize_t send_app_package(const char* package_file_name) {
|
|||
tipc_fd = tipc_connect(dev_name, APPLOADER_PORT);
|
||||
if (tipc_fd < 0) {
|
||||
LOG(ERROR) << "Failed to connect to Trusty app loader: " << strerror(-tipc_fd);
|
||||
// print this to stderr too to avoid silently exiting when run as non-root
|
||||
fprintf(stderr, "Failed to connect to Trusty app loader: %s\n", strerror(-tipc_fd));
|
||||
rc = tipc_fd;
|
||||
goto err_tipc_connect;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue