Use operator<< with String16 rather than char16_t*
std::stringstream's operator<< overload for char16_t* is deleted
after upgrading libc++ because it surprisingly outputs an address
rather than string content. See wg21.link/p1423r3.
Bug: 175635923
Test: m MODULES-IN-frameworks-native-cmds-cmd
Change-Id: I90602eca166d5da347f7efba22f21bc1a5d38a11
diff --git a/cmds/cmd/cmd.cpp b/cmds/cmd/cmd.cpp
index 0ce7711..9695e07 100644
--- a/cmds/cmd/cmd.cpp
+++ b/cmds/cmd/cmd.cpp
@@ -95,7 +95,7 @@
flags = O_RDWR;
checkRead = checkWrite = true;
} else {
- mErrorLog << "Invalid mode requested: " << mode.c_str() << endl;
+ mErrorLog << "Invalid mode requested: " << mode << endl;
return -EINVAL;
}
int fd = open(fullPath.c_str(), flags, S_IRWXU|S_IRWXG);