Rewrite syslog(3) to use Android logging.
Since we don't have syslogd on Android and you can't run one on a non-rooted
device, it's more useful if syslog output just goes to the regular Android
logging system.
Bug: 14292866
(cherry picked from commit 3ad8ecb64e)
Change-Id: I3038855ca4f22532bf6d2c45d3f8028b866975f9
This commit is contained in:
@@ -176,3 +176,14 @@ TEST(libc_logging, lld_LLONG_MIN) {
|
||||
GTEST_LOG_(INFO) << "This test does nothing.\n";
|
||||
#endif // __BIONIC__
|
||||
}
|
||||
|
||||
TEST(libc_logging, m) {
|
||||
#if defined(__BIONIC__)
|
||||
char buf[BUFSIZ];
|
||||
errno = EBADF;
|
||||
__libc_format_buffer(buf, sizeof(buf), "<%m>");
|
||||
EXPECT_STREQ("<Bad file number>", buf);
|
||||
#else // __BIONIC__
|
||||
GTEST_LOG_(INFO) << "This test does nothing.\n";
|
||||
#endif // __BIONIC__
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user