summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [logd] Modernize codebase by replacing NULL with nullptrYi Kong2018-07-131-12/+12
| | | | | | | | Fixes -Wzero-as-null-pointer-constant warning. Test: m Bug: 68236239 Change-Id: I15ccb9cfc9967dae4320d9690f5097bc2f7d5bfe
* Don't use TEMP_FAILURE_RETRY on close()Nick Kralevich2017-10-241-3/+3
| | | | | | | | See https://lkml.org/lkml/2005/9/10/129 for details. Bug: 20501816 Test: code compiles and boots with no obvious problems. Change-Id: I5a9c470156d498852cfd81fbd59ddcf267309e73
* libcutils: compile with BOARD_VNDK_VERSION currentSteven Moreland2017-04-171-1/+1
| | | | | | | | | | | | | | | | - moved __android_log_is_debuggable to a new public header (log_properties.h) - vendor version of sched_policy uses ALOG* instead SLOG* Test: (sanity) liblog-unit-tests Test: (sanity) libcutils_test (noting b/b/32972117, two tests continue to fail) Test: system/core as a whole makes with BOARD_VNDK_VERSION := current now with no problems. Test: boots/works on internal marlin Bug: 33241851 Change-Id: I5bc1f348dc0f0c8814bec5b5c3d2c52c825ab640
* logd: specify clang formatMark Salyzyn2017-03-131-74/+73
| | | | | | | | | Switch _all_ file's coding style to match to ease all future changes. SideEffects: None Test: compile Bug: 35373582 Change-Id: I470cb17f64fa48f14aafc02f574e296bffe3a3f3
* logd: add getEventTag id= commandMark Salyzyn2017-02-221-0/+5
| | | | | | | | | | | | This is the precursor for "Plan B" recovery when access to /dev/event-log-tags is blocked to untrusted zones. Also deals with mitigating issues with long-lived mappings that do not update /dev/event-log-tags when dynamically changed. Test: gTest logd-unit-test --gtest_filter=logd.getEventTag_42 Bug: 31456426 Bug: 35326290 Change-Id: I3db2e73763603727a369da3952c5ab4cf709f901
* logd: add getEventTag command and serviceMark Salyzyn2017-02-021-0/+884
Will register a new event tag by name and format, and return an event-log-tags format response with the newly allocated tag. If format is not specified, then nothing will be recorded, but a pre-existing named entry will be listed. If name and format are not specified, list all dynamic entries. If name=* list all event log tag entries. Stickiness through logd crash will be managed with the tmpfs file /dev/event-log-tags and through a reboot with add_tag entries in the pmsg last logcat event log. On debug builds we retain a /data/misc/logd/event-log-tags file that aids stickiness and that can be picked up by the bugreport. If we detect truncation damage to /dev/event-log-tags, or to /data/misc/logd/event-log-tags, rebuild file with a new first line signature incorporating the time so mmap'd readers of the file can detect the possible change in shape and order. Manual testing: Make sure nc (netcat) is built for the target platform on the host: $ m nc Then the following can be used to issue a request on the platform: $ echo -n 'getEventTag name=<name> format="<format>"\0EXIT\0' | > nc -U /dev/socket/logd Test: gTest logd-unit-test --gtest_filter=getEventTag* Bug: 31456426 Change-Id: I5dacc5f84a24d52dae09cca5ee1a3a9f9207f06d