aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2017-10-18 13:06:36 -0500
committerTao Bao2017-10-18 13:08:37 -0500
commit245c5225880f763a31e9ac0fd42dee2cc42cfc9d (patch)
tree263387efad391594209239cb153126d0fdc3f21a /rotate_logs.h
parentbab1e8efc87029c347fdf14dea6d154889695b18 (diff)
downloadplatform-bootable-recovery-245c5225880f763a31e9ac0fd42dee2cc42cfc9d.tar.gz
platform-bootable-recovery-245c5225880f763a31e9ac0fd42dee2cc42cfc9d.tar.xz
platform-bootable-recovery-245c5225880f763a31e9ac0fd42dee2cc42cfc9d.zip
rotate_logs: Clean up the header includes.
Also clang-format rotate_logs.cpp to get consistent style. Test: mmma bootable/recovery Test: recovery_manual_test works on marlin. Change-Id: I1210a346b97bbf0e1a8c3f8e3e73a7c114858ca8
Diffstat (limited to 'rotate_logs.h')
-rw-r--r--rotate_logs.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/rotate_logs.h b/rotate_logs.h
index 809c213b..007c33d4 100644
--- a/rotate_logs.h
+++ b/rotate_logs.h
@@ -17,24 +17,18 @@
17#ifndef _ROTATE_LOGS_H 17#ifndef _ROTATE_LOGS_H
18#define _ROTATE_LOGS_H 18#define _ROTATE_LOGS_H
19 19
20#include <string> 20#include <stddef.h>
21#include <sys/types.h>
21 22
22#include <private/android_logger.h> /* private pmsg functions */ 23#include <log/log_id.h>
23 24
24constexpr int KEEP_LOG_COUNT = 10; 25static constexpr int KEEP_LOG_COUNT = 10;
25 26
26ssize_t logbasename(log_id_t /* logId */, 27ssize_t logbasename(log_id_t id, char prio, const char* filename, const char* buf, size_t len,
27 char /* prio */, 28 void* arg);
28 const char *filename,
29 const char * /* buf */, size_t len,
30 void *arg);
31 29
32ssize_t logrotate( 30ssize_t logrotate(log_id_t id, char prio, const char* filename, const char* buf, size_t len,
33 log_id_t logId, 31 void* arg);
34 char prio,
35 const char *filename,
36 const char *buf, size_t len,
37 void *arg);
38 32
39// Rename last_log -> last_log.1 -> last_log.2 -> ... -> last_log.$max. 33// Rename last_log -> last_log.1 -> last_log.2 -> ... -> last_log.$max.
40// Similarly rename last_kmsg -> last_kmsg.1 -> ... -> last_kmsg.$max. 34// Similarly rename last_kmsg -> last_kmsg.1 -> ... -> last_kmsg.$max.