forked from LineageOS/android_system_core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make log_event_list.h available to vendor code.
This is required in order to be able to log audit events from wpa_supplicant. Only log writing functions from log_event_list.h are made available. Test: manually Bug: 70886042 Change-Id: I097d4ad1de573662658678e6a9f1fc8f17820542
- Loading branch information
Pavel Grafov
committed
Feb 13, 2018
1 parent
1cb765c
commit 446d01c
Showing
2 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
* Copyright (C) 2005-2016 The Android Open Source Project | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/* Special log_event_list.h file for VNDK linking modules */ | ||
|
||
#ifndef _LIBS_LOG_EVENT_LIST_H | ||
#define _LIBS_LOG_EVENT_LIST_H | ||
|
||
#include <stdint.h> | ||
|
||
#include <log/log_id.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#define __ANDROID_USE_LIBLOG_EVENT_INTERFACE 1 | ||
|
||
/* | ||
* The opaque context used to manipulate lists of events. | ||
*/ | ||
#ifndef __android_log_context_defined | ||
#define __android_log_context_defined | ||
typedef struct android_log_context_internal* android_log_context; | ||
#endif | ||
|
||
/* | ||
* Creates a context associated with an event tag to write elements to | ||
* the list of events. | ||
*/ | ||
android_log_context create_android_logger(uint32_t tag); | ||
|
||
/* All lists must be braced by a begin and end call */ | ||
/* | ||
* NB: If the first level braces are missing when specifying multiple | ||
* elements, we will manufacturer a list to embrace it for your API | ||
* convenience. For a single element, it will remain solitary. | ||
*/ | ||
int android_log_write_list_begin(android_log_context ctx); | ||
int android_log_write_list_end(android_log_context ctx); | ||
|
||
int android_log_write_int32(android_log_context ctx, int32_t value); | ||
int android_log_write_int64(android_log_context ctx, int64_t value); | ||
int android_log_write_string8(android_log_context ctx, const char* value); | ||
int android_log_write_string8_len(android_log_context ctx, const char* value, | ||
size_t maxlen); | ||
int android_log_write_float32(android_log_context ctx, float value); | ||
|
||
/* Submit the composed list context to the specified logger id */ | ||
/* NB: LOG_ID_EVENTS and LOG_ID_SECURITY only valid binary buffers */ | ||
int android_log_write_list(android_log_context ctx, log_id_t id); | ||
|
||
/* Finished with reader or writer context */ | ||
int android_log_destroy(android_log_context* ctx); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* _LIBS_LOG_EVENT_LIST_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters