Dan Albert
c007bc3856
Revert "Revert "Create libbase.""
...
This reverts commit a7870d8816
.
2015-03-16 10:08:46 -07:00
Nicolas Geoffray
a7870d8816
Revert "Create libbase."
...
Breaks internal master.
This reverts commit 98ff77204c
.
Change-Id: I18dc6021cb43efff8aa88486c2d980dc2b8eedba
2015-03-16 11:07:29 +00:00
Dan Albert
98ff77204c
Create libbase.
...
Move StringPrintf and the string based file I/O from libutils to
libbase.
Change-Id: I0297a6063874b9d92100e0dd5123fddfbda932fe
2015-03-14 16:36:18 -07:00
Elliott Hughes
c2f0ed64ce
Remove unused header file.
...
This library no longer exists.
Change-Id: I5582b41b70691171b1ac5f2bffd623f2b2fc10e5
2015-03-14 09:28:49 -07:00
Mark Salyzyn
e79201e4cb
am 4487c605
: Merge changes I0ec0fe3e,I9e5fccba
...
* commit '4487c605eaeea2b85c8511fe915a286c3aaf4da4':
liblog: logprint use <endian.h>
private: Add event payload structures to android_logger.h
2015-03-04 22:44:41 +00:00
Mark Salyzyn
fa1c063feb
private: Add event payload structures to android_logger.h
...
- common android_event_header_t
- android_event_int_t ANDROID_TYPE_INT payload
- android_log_event_int_t single ANDROID_TYPE_INT event
- android_event_long_t ANDROID_TYPE_LONG payload
- android_log_event_long_t single ANDROID_TYPE_LONG event
- android_event_string_t ANDROID_TYPE_STRING payload
- android_log_event_string_t single ANDROID_TYPE_STRING event
Change-Id: I9e5fccba38e3f230c2c4ec7dec51ed110c460f95
2015-03-04 12:48:04 -08:00
Mark Salyzyn
d851c80f0d
am ae19b631
: Merge "liblog: add pstore read"
...
* commit 'ae19b63168d1b958898180979156e2a4169ee4c2':
liblog: add pstore read
2015-02-26 17:29:05 +00:00
Mark Salyzyn
6eef417119
liblog: add pstore read
...
Used to pull the Android log messages after a reboot. Adding
an ANDROID_LOG_PSTORE flag to the mode parameter in calls to
android_logger_list_alloc() and android_logger_list_alloc_time().
The side effects are that android_logger_clear() and
android_logger_list_read() will react with the user space
pstore driver. Forms a companion to the pstore console logs.
Change-Id: I7bb07b87b3bf73f059a21af3f810af37c7715b6d
2015-02-26 06:37:35 -08:00
Mark Salyzyn
f5579498d9
am 110166c1
: Merge "liblog: introduce ANDROID_LOG_* flags"
...
* commit '110166c1dbcbe26e510ac3fdaf2e1fcc7efbcc4e':
liblog: introduce ANDROID_LOG_* flags
2015-02-25 18:12:48 +00:00
Mark Salyzyn
2d3f38a6b8
liblog: introduce ANDROID_LOG_* flags
...
Move away from using POSIX open(2) flags and introduce ANDROID_LOG_* flags to
replace them. Add security by preventing random mode flags from getting into
underlying POSIX calls. ANDROID_LOG_* flags overlap POSIX O_* flag definitions.
Change-Id: Ib32bb64c287e8bf150be62242e1ba46bb37839fc
2015-02-25 17:44:18 +00:00
Narayan Kamath
f9df4b13bc
am c40cf1ce
: Merge "Remove useless refCounting from FileMap."
...
* commit 'c40cf1ce9d6910685bf2242c1db390af00684d9d':
Remove useless refCounting from FileMap.
2015-02-24 12:56:45 +00:00
Narayan Kamath
6832a7a4e0
Remove useless refCounting from FileMap.
...
Nobody ever called acquire() so release() was always
equivalent to delete. Just use delete instead so that
people can use unique_ptr directly (or shared_ptr if
they really want refcounts).
Change-Id: I9e3ad5e0f6a4fcc4e02e5a2ff7ef9514fe234415
2015-02-23 15:49:43 +00:00
Andreas Gampe
f320e8e53d
am ed318bff
: Merge "log.h: Fix typo"
...
* commit 'ed318bff41c4515ca79a11afb97507a452e9fcd3':
log.h: Fix typo
2015-02-10 16:53:30 +00:00
Mark Salyzyn
8a5198a150
am fd867303
: Merge changes I420b5b8a,Ica23fe41
...
* commit 'fd867303861eb25bf7973739e71dc29b6356a336':
log.h: wrap android_testLog around __android_log_is_loggable
log.h: deprecate CONDITION
2015-02-10 16:53:24 +00:00
Mark Salyzyn
2671ffb619
am 95f7ecbd
: Merge "liblog: add __android_log_is_loggable()"
...
* commit '95f7ecbd38df680c5295295bd2277f4b26865f1f':
liblog: add __android_log_is_loggable()
2015-02-10 16:52:48 +00:00
Andreas Gampe
f45bbe496f
log.h: Fix typo
...
Change-Id: I6b5e9bc9d40e5e5ecf9f50f7392675391e6f18e6
2015-02-09 16:13:33 -08:00
Mark Salyzyn
1df92e523e
log.h: wrap android_testLog around __android_log_is_loggable
...
- take android_testLog from the bonepile and resurrect
- android_testLog is used, and makes sense in its current context
as a holder for Android Logging policy.
- Default level when not specified is ANDROID_LOG_VERBOSE for
eng and userdebug, and ANDROID_LOG_DEBUG for user.
NB: Properties, which are associated with __android_log_is_loggable are
not to be adjusted in user release; it would be useful at that juncture to
return a constant of (0) for VERBOSE, and a (1) for others on user builds.
Or default level to drop to ANDROID_LOG_DEBUG for all in future.
Bug: 17760225
Change-Id: I420b5b8a94d53d664c6a8b13546ebc424a147923
2015-02-09 15:37:32 -08:00
Mark Salyzyn
f5af82edf3
log.h: deprecate CONDITION
...
- replace CONDITION with __predict_false to match with bionic
Change-Id: Ica23fe41cf9a7ea5eaf1b8552780af9ec7827808
2015-02-09 15:25:48 -08:00
Mark Salyzyn
956870518e
liblog: add __android_log_is_loggable()
...
- Add new liblog API __android_log_is_loggable(prio, tag, def)
- future plan to integrate this into the runtime checks and into
the logd daemon for filtration. Inert for now.
Bug: 17760225
Change-Id: I16395b4d42acc08f0209f55a1cbf87b0b2112898
2015-02-09 22:12:59 +00:00
Christopher Ferris
e6ed63e610
am c9c401e6
: Merge "Move map data into backtrace data proper."
...
* commit 'c9c401e64ba00e8fa295cae30b2b0035fae1183a':
Move map data into backtrace data proper.
2015-02-06 23:43:11 +00:00
Christopher Ferris
c9c401e64b
Merge "Move map data into backtrace data proper."
2015-02-06 23:29:00 +00:00
Christopher Ferris
12385e3ad0
Move map data into backtrace data proper.
...
The backtrace structure used to include a pointer to a backtrace_map_t
that represented the map data for a particular pc. This introduced a
race condition where the pointer could be discarded, but the backtrace
structure still contained a pointer to garbage memory. Now all of the map
information is right in the structure.
Bug: 19028453
Change-Id: If7088a73f3c6bf1f3bc8cdd2bb4b62e7cab831c0
2015-02-06 15:00:09 -08:00
Elliott Hughes
b164b103eb
am 5e753100
: Merge "Clean up reading and writing in init."
...
* commit '5e753100c32c7b42ae4306a8023c419defd34c4e':
Clean up reading and writing in init.
2015-02-06 22:33:18 +00:00
Elliott Hughes
f682b4786a
Clean up reading and writing in init.
...
This isn't particularly useful in and of itself, but it does introduce the
first (trivial) unit test, improves the documentation (including details
about how to debug init crashes), and made me aware of how unpleasant the
existing parser is.
I also fixed a bug in passing --- unless you thought the "peboot" and "pm"
commands were features...
Bug: 19217569
Change-Id: I6ab76129a543ce3ed3dab52ef2c638009874c3de
2015-02-06 14:20:30 -08:00
Elliott Hughes
dcbeb41a67
am d558530b
: Merge "Fix Windows build."
...
* commit 'd558530ba90cb6218fe8e255c71a034c3fe1ea58':
Fix Windows build.
2015-02-05 18:51:07 +00:00
Elliott Hughes
d79801d60d
Fix Windows build.
...
Take 2. Probably should have done this in the beginning, but thought I was
being clever.
Change-Id: I85c6e487eece9bcc75f8f62c850c2d4d1ee9e908
2015-02-05 08:21:37 -08:00
Elliott Hughes
44fdd5d15a
am 27d28d3b
: Merge "Add a WriteStringToFile overload that cares about permissions."
...
* commit '27d28d3baff860d1fd936a5fcf2d920577c52575':
Add a WriteStringToFile overload that cares about permissions.
2015-02-05 02:31:31 +00:00
Elliott Hughes
202f024dee
Add a WriteStringToFile overload that cares about permissions.
...
Change-Id: I857a80b61768d4e9610bdd149eff2d9d8e48d2c0
2015-02-04 14:30:23 -08:00
Elliott Hughes
8a2634c2ab
am 55732f49
: Merge "android_reboot should take a const char*."
...
* commit '55732f49287a75f9baabe9f150443aec9234c90d':
android_reboot should take a const char*.
2015-02-04 01:20:40 +00:00
Elliott Hughes
0068da6a93
android_reboot should take a const char*.
...
The kernel argument is actually a void*, but it's only read from.
Change-Id: I305c50249bf12b7fbdea4721257aed52a0372f8d
2015-02-03 15:44:16 -08:00
Elliott Hughes
14fcc4c66c
am e44d25d6
: Merge "Add Google-style StringPrintf."
...
* commit 'e44d25d64537f4ea2abcb56aabc7a5bf0731c222':
Add Google-style StringPrintf.
2015-02-03 23:33:39 +00:00
Elliott Hughes
e44d25d645
Merge "Add Google-style StringPrintf."
2015-02-03 23:23:11 +00:00
Elliott Hughes
6b3be2902d
Add Google-style StringPrintf.
...
Change-Id: If333c28b8ed047346a2dd85e591c4bedbab874cc
2015-02-03 15:21:07 -08:00
Elliott Hughes
c3bf8d85b5
am 9fc43358
: Merge "Extra Win32 compatibility."
...
* commit '9fc43358f72a581beb26532ea2cb1f2adc053758':
Extra Win32 compatibility.
2015-02-03 22:36:57 +00:00
Elliott Hughes
714196d05c
Extra Win32 compatibility.
...
Change-Id: Ibc583aba580f4fc15c243f495ead44b2ce4c6e5e
2015-02-03 14:26:58 -08:00
Elliott Hughes
813d0ac136
am 6974ba4e
: Merge "Add Google-style ReadFileToString and WriteStringToFile."
...
* commit '6974ba4ed430ec3247c3a5c04a2263b4b04ff827':
Add Google-style ReadFileToString and WriteStringToFile.
2015-02-03 20:33:00 +00:00
Elliott Hughes
dec12b2b71
Add Google-style ReadFileToString and WriteStringToFile.
...
Bug: 19217569
Change-Id: I64789d3fa6777ee30a324cdf00fdc275c1230e1b
2015-02-03 12:18:11 -08:00
Elliott Hughes
dbf6f33e84
am 2b2b7632
: Merge "Revert "Remove netcfg\'s unused options.""
...
* commit '2b2b7632f55ca73562361cf4d06e60e7b62f7ff4':
Revert "Remove netcfg's unused options."
2015-02-03 20:09:30 +00:00
Elliott Hughes
c463025a19
Revert "Remove netcfg's unused options."
...
This reverts commit f8e83054cb
.
Change-Id: Iede772f96ff9008277df433dcbb5f6603de65283
2015-02-03 19:56:35 +00:00
Elliott Hughes
b862d3e8eb
am 6a728fde
: Merge "Remove netcfg\'s unused options."
...
* commit '6a728fde77d1367318c79e5b182f0cb316872a37':
Remove netcfg's unused options.
2015-02-03 19:16:42 +00:00
Elliott Hughes
5b253e55e0
am ef89e8d1
: Merge "Revert "Remove netcfg\'s unused options.""
...
* commit 'ef89e8d14619c68015103fd51ff75f82eeef8d61':
Revert "Remove netcfg's unused options."
2015-02-03 19:16:42 +00:00
Elliott Hughes
1ddbd76bd8
am 67900498
: Merge "Remove netcfg\'s unused options."
...
* commit '67900498cff54c8116b3f7afc84e046d98bb17e4':
Remove netcfg's unused options.
2015-02-03 19:12:53 +00:00
Elliott Hughes
f8e83054cb
Remove netcfg's unused options.
...
Only "netcfg" for a list of interfaces and "netcfg <interface> dhcp" still
seem to be used.
Change-Id: Iaf499c06b09ffe5e0925339b9cd6e502f3234a86
2015-02-03 11:08:07 -08:00
Elliott Hughes
ca77255c26
Revert "Remove netcfg's unused options."
...
This reverts commit 24c1885bc1
.
Change-Id: Iaae6502e2db90d67b4275faa104cfc6a0abc65c6
2015-02-03 19:07:43 +00:00
Elliott Hughes
24c1885bc1
Remove netcfg's unused options.
...
Only "netcfg" for a list of interfaces and "netcfg <interface> dhcp" still
seem to be used.
Change-Id: Ie0aecf5b18bd854cfb5878b6cfdd7160c9f42526
2015-02-02 14:39:42 -08:00
Dmitriy Ivanov
bbbe988539
am 7cb19579
: Merge "Add close_file flag to OpenArchiveFd()"
...
* commit '7cb19579bc22bf38e15b970f801f8065d629611d':
Add close_file flag to OpenArchiveFd()
2015-02-02 19:14:17 +00:00
Dmitriy Ivanov
40b52b2c88
Add close_file flag to OpenArchiveFd()
...
* We should be able to keep fd alive after CloseArchive()
Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
2015-01-30 17:57:13 -08:00
Yabin Cui
631965a32e
am e862350b
: Merge "Kill HAVE_PTHREADS."
...
* commit 'e862350bb2eb3d3eda526da7f3b6d5c2dd40a445':
Kill HAVE_PTHREADS.
2015-01-27 22:45:14 +00:00
Yabin Cui
4a6e5a3b64
Kill HAVE_PTHREADS.
...
Bug: 19083585
Change-Id: Ic09eb3dd250bc5c5b63cac7998f99f5fa007f407
2015-01-27 14:23:22 -08:00
Mark Salyzyn
982421df45
am 91581f19
: Merge "liblog: add pstore write"
...
* commit '91581f19906ade01eabc6e10a7dac209e710117a':
liblog: add pstore write
2015-01-23 23:59:45 +00:00