summaryrefslogtreecommitdiffstats
path: root/libcutils
Commit message (Collapse)AuthorAgeFilesLines
* Fix win32 undefined reference to `_socket_network_client_timeout'.Elliott Hughes2014-05-202-18/+9
| | | | Change-Id: I063213957b8452f4690da0f64872075f7c27b4cd
* Fix Windows socket_network_client.c build failures.Elliott Hughes2014-05-191-1/+8
| | | | Change-Id: Ie67a2305ade02e078bf0edf54104c295b091b1b7
* Bound the ADB connect time with a non-blocking connectKen Lierman2014-05-191-5/+72
| | | | | | | | | | | | | After a disconnect, the initial blocking connect takes a long time to return, while subsequent calls return quicks. Switch to a non-blocking connect to make the re-connect time more consistent and faster overall. Change-Id: I21d02b22a8eb9a457c2f1fa95eb17894d5612ccd Signed-off-by: Ken Lierman <ken.lierman@windriver.com> Reviewed-by: Gumbel, Matthew K <matthew.k.gumbel@intel.com> Reviewed-by: Jovanovic, Radivoje <radivoje.jovanovic@intel.com> Reviewed-by: Boie, Andrew P <andrew.p.boie@intel.com>
* Remove unused LOCAL_LDLIBS.Ying Wang2014-05-071-2/+0
| | | | Change-Id: I42aeb7668183e7a06207ee063f6eee4d37d66c6e
* Merge "Add Silvermont architecture cache sizes"Elliott Hughes2014-05-051-2/+9
|\
| * Add Silvermont architecture cache sizesHenrik Smiding2014-04-181-2/+9
| | | | | | | | | | | | | | Adds Silvermont specific cache sizes for memset16/32 SSE optimization. Change-Id: Ib5ea086d57544e74ac384ee1ef516b8511392f70 Signed-off-by: Henrik Smiding <henrik.smiding@intel.com>
* | libcutils: win_sdk build issuesMark Salyzyn2014-05-053-5/+14
| | | | | | | | Change-Id: Ic431166f686aebfd0ee00ad3224b95237ff7a0de
* | libcutils: Mac build pulls in __unused from sys/cdefs.hMark Salyzyn2014-05-021-0/+2
| | | | | | Change-Id: I2da8a52e07cef0b749f7e60709536e98bd96660e
* | libcutils: turn on -WerrorMark Salyzyn2014-05-0118-103/+96
| | | | | | | | | | | | - Deal with some -Wunused / -Wunused-variable issues Change-Id: I28c23fb213382a392ec30935749fb359e072d664
* | Use the si_code value bionic passes us.Elliott Hughes2014-04-251-2/+3
| | | | | | | | | | | | | | | | | | Bionic needs to re-raise various signals, which means the si_code debuggerd sees has been clobbered. If bionic sends us the original si_code value, we can use that instead of the one we see when the ptrace the crashed process' siginfo. Change-Id: If116a6bc667d55a6fb39b74f96673292af4e4c8c
* | Handle errno properly to avoid corrupt str_parmsJens Gulin2014-04-032-13/+54
|/ | | | | | | | | | | | | | | | | | | | | | | A normal sequence of calls is as follows: str_parms_create_str, str_parms_add_str, str_parms_destroy. In some cases the destroy caused double free. str_parms_add_str will clone the input and send it to hashmapPut for storage. If hashmapPut did not store the strings it will raise errno = ENOMEM and leave caller with ownership of the strings. In any of these cases it will be safe to destroy the str_parms. But what if it wasn't hashmapPut that said NOMEM? What if there was a stale NOMEM already before a successful hashmapPut? In that case the strings will be successfully added to the list (if new), but when str_parms_add_str sees the NOMEM it will free them anyway, leaving dangling pointers in the str_parms!! It is the responsibility of the caller to clear errno before any interesting call. This patch makes sure that str_parms_add_str reacts only on errno emmitted from hashmapPut. Change-Id: If87e4bcc482f09e1c66133d33517b152ebdac65f
* Merge "libcutils: 64-bit compile issues"Mark Salyzyn2014-03-071-9/+11
|\
| * libcutils: 64-bit compile issuesMark Salyzyn2014-03-071-9/+11
| | | | | | | | | | | | - Use inttypes.h to print uint64_t values. Change-Id: Ia10a3b67cadcce282563467a464ec07066cc2051
* | libcutils: add method to get klog levelAlex Ray2014-03-071-0/+4
|/ | | | Change-Id: I55e8311bae97703be26e57b415a8ab0a6d9b4361
* libcutils: Socket type might contain bitwise OR flagsPaul Kocialkowski2014-02-261-1/+3
| | | | | Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Change-Id: Ia5c8f136793a989fc1d71c61292afe4e5cf169fa
* Merge "Remove dead code."Elliott Hughes2014-02-207-764/+0
|\
| * Remove dead code.Elliott Hughes2014-02-207-764/+0
| | | | | | | | | | | | | | We have benchmarking for memset in bionic itself, and a benchmarking framework for other native benchmarking. Change-Id: I241a288a96d3b2d37f3d51b04a519ac23f18a989
* | Enable building init with -Wall -Werror.Stephen Smalley2014-02-191-4/+10
|/ | | | | | | | Eliminates various warnings from SELinux-related code. Bug: 12587913 Change-Id: I28921f0ebd934324436609540d95ccef58552b64 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* libcutils: resolve warning in iosched_policy.cMark Salyzyn2014-01-271-3/+6
| | | | | | (cherry picked from commit 407038cd937391216d93f72d4d13db3803c5b452) Change-Id: I35b0d1eeba21cc1ed9645a5acfa180ed20797c56
* libcutils: bug str_parms.c:str_parms_get_float().Mark Salyzyn2014-01-271-4/+5
| | | | | | | | | | str_parms_get_float did not return the output into *val. Only output if returning with no error. Audit shows no internal users of this library function (cherry picked from commit 8e71ddeac00d0733c7fcc2965d69f07aa5c5d0a3) Change-Id: I14a3f08a098072a159dd93f85ead36b3f445816f
* libcutils: UNUSED argument warningsMark Salyzyn2014-01-273-3/+9
| | | | | | (cherry picked from commit ba02cd1e9bccee9b112ccbee06bc204381b5a215) Change-Id: Ie427d481298af8d911bb2b157ebba30954335354
* libcutils: Move list.c to inlines on list.hMark Salyzyn2014-01-272-38/+0
| | | | | | (cherry picked from commit 0ea3624b3ef2a6545df770d06338c4655386220d) Change-Id: I0572555a194d2560e74dfbf07abcec05e9a276a2
* system/core: remove $(KERNEL_HEADERS) from includesColin Cross2014-01-221-1/+1
| | | | | | | | The kernel headers are already in the include path, and manually adding them again will break on a multiarch build, where the kernel headers may be different for each arch. Change-Id: Ib13d96543f2c97b1b487a46e1748ceb2c5724169
* Init the abort_msg_address value.Christopher Ferris2014-01-101-0/+2
| | | | | | | When initiating a manual dump, the abort_msg_address parameter is random garbage. Initialize this value to 0. Change-Id: I9ba817ee6104f47cfcb2b746bfa6f02a259c86d7
* Merge commit '536dea9d61a032e64bbe584a97463c6638ead009' into HEADThe Android Open Source Project2013-11-2214-2718/+108
|\ | | | | | | Change-Id: I5c469a4b738629d99d721cad7ded02d6c35f56d5
| * am 45ddf184: am 9b8a929d: Merge "libcutils doesn\'t need to be looking at ↵Elliott Hughes2013-10-101-5/+0
| |\ | | | | | | | | | | | | | | | | | | bionic\'s privates." * commit '45ddf184960225862c6e178588034cce676683e3': libcutils doesn't need to be looking at bionic's privates.
| * \ am 5baecee3: am be18538d: Merge "Cleanup x86 flags and memset versions"Elliott Hughes2013-10-103-21/+2
| |\ \ | | | | | | | | | | | | | | | | * commit '5baecee3c6bf348b77b8785bcd8e35362a3507fb': Cleanup x86 flags and memset versions
| * \ \ am 1690a5a6: am aa62be65: Merge "Use SSE2 enhanced memset for capable x86 ↵Ying Wang2013-09-261-11/+15
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | processors" * commit '1690a5a6943d4e4b65d5e4dcd077702c2c8f40a0': Use SSE2 enhanced memset for capable x86 processors
| * \ \ \ am 0ee7d8c6: Fix Mac builds, for realz.Jeff Sharkey2013-09-202-2/+10
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit '0ee7d8c68b57c02d02f707d6f71c731234d56eec': Fix Mac builds, for realz.
| | * | | | Fix Mac builds, for realz.Jeff Sharkey2013-09-202-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I63e21b90e5b8a8f016dd04ceca4354793faa5e37
| * | | | | am 4481c325: Fix Mac builds.Jeff Sharkey2013-09-201-6/+2
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | * commit '4481c325b16d4a42fd0ebf4c8a2bb5bcc09daf5e': Fix Mac builds.
| | * | | | Fix Mac builds.Jeff Sharkey2013-09-201-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I0eb029395a3afd2f93a7632d7d3d20d28c2ab189
| * | | | | am 44d6342c: Remove mkdir() side effect, add .nomedia, utils.Jeff Sharkey2013-09-201-0/+90
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | * commit '44d6342caa0db1f613809e9ba1ea8d9af0183b74': Remove mkdir() side effect, add .nomedia, utils.
| | * | | | Remove mkdir() side effect, add .nomedia, utils.Jeff Sharkey2013-09-201-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, FUSE lookup() would have the side effect of creating the directory on behalf of apps. This resulted in most directories being created just by Settings trying to measure disk space. Instead, we're switching to have vold do directory creation when an app doesn't have enough permissions. Create fs_mkdirs() utility to create all parent directories in a path as needed. Allow traversal (+x) into /storage directories. Fix FUSE derived permissions to be case insensitive. Mark well-known directories as .nomedia when created. Bug: 10577808, 10330221 Change-Id: I53114f2e63ffbe6de4ba6a72d94a232523231cad
| * | | | | am c9ff3714: am 596e9c63: Merge "fix valgrind ioctl warning."Colin Cross2013-09-051-1/+1
| |\ \ \ \ \ | | |/ / / / | |/| | | | | | | | | | | | | | | | * commit 'c9ff37144a7943ee1bc247cef3620c8cce22049d': fix valgrind ioctl warning.
| * | | | | Move liblog headers to system/core/include/logColin Cross2013-07-242-80/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the liblog headers to log/ instead of cutils/ to complete the separation of libcutils and liblog. cutils/log.h still exists and includes log/log.h in order to support the many existing modules that use cutils/log.h. Change-Id: I2758c9f4aedcb809ca7ba8383d0f55041dd44345
| * | | | | libcutils: reimplement property_list() using __system_property_foreach()Greg Hackmann2013-06-181-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I273fbf7151908ee57b9b951e7d8c5f4925bbc109 Signed-off-by: Greg Hackmann <ghackmann@google.com>
| * | | | | HACK: cutils: restore record_stream temporarilyDima Zavin2013-06-042-0/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restore the record_stream code in cutils that was removed in e00a12bf8a99eb6c4f278efa503488aa21dd8d4d as part of cutils cleanup. Unfortunately, there are some prebuilt vendor libs that rely on this functionality that we cannot currently rebuild. Remove at the earliest possible convenience once the vendor libs have been fixed. Bug: 9189218 Change-Id: I5d44126756f1e3ed194d1b5873d64d9154183199 Signed-off-by: Dima Zavin <dima@android.com>
| * | | | | libcutils: Don't build host property supportNick Kralevich2013-05-232-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only build property support for the device, not for the host. Host side property support is being removed, as it was only really used for the simulator. process_name.c: When building this for the host, don't reference properties. Change-Id: Idcea5ad52a85e47eef17a381cb0601657efbdf13
| * | | | | cutils: first pass at cleaning up legacy/obsolete code in cutilsDima Zavin2013-05-0710-2819/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed unused code and moved libraries with single clients near their respective users. Change-Id: I65f90f8659f27bd0f44ca5ddf33da2bce14674c1 Signed-off-by: Dima Zavin <dima@android.com>
| * | | | | Merge "Make init handle reboots"Nick Kralevich2013-04-241-5/+2
| |\ \ \ \ \
| | * | | | | Make init handle rebootsNick Kralevich2013-04-231-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the responsibility for rebooting the system from the reboot command to init. Init is in a better position to take actions to bring the system down cleanly, including making sure filesystems are mounted read-only. The only UIDs which can perform an init triggered reboot are root, system, and shell. Modify the reboot command so that it calls into init to perform the reboot. The reboot command no longer requires CAP_SYS_BOOT. Remove the -n reboot option and code which supports it. Anyone needing to do an unclean shutdown can just do a 'echo c > /proc/sysrq-trigger'. Modify adb so that it calls into init to perform a shutdown. Bug: 8646621 Change-Id: I84c0513acb549720cb0e8c9fcbda0050f5c396f5
| * | | | | | klog: error handling fixupsTodd Poynor2013-04-221-0/+3
| |/ / / / / | | | | | | | | | | | | | | | | | | Change-Id: I9014e62010c589ec30d5e99eef420353e35418b5
* | | | | | Replace __reboot call with syscallPavel Chupin2013-11-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __reboot is hidden for 64-bits and should be hidden on others Change-Id: Ib6435269aac7fa726e49cc02f8f76d2be2875bc6 Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
* | | | | | Fix a bunch of small system/core bugs.Elliott Hughes2013-10-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Missing frees in: adb/file_sync_client.c fastboot/fastboot.c libsparse/output_file.c Missing closedirs in: adb/file_sync_service.c cpio/mkbootfs.c libcutils/dir_hash.c Potential buffer overrun in: gpttool/gpttool.c Incorrect NULL check in: libsparse/backed_block.c Bug: https://code.google.com/p/android/issues/detail?id=61564 Change-Id: If97838a9e73a77aef7f416c31c237ce1fca4ce21
* | | | | | Eliminate text relocations in x86 optimized memset versionsPavel Chupin2013-10-242-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ieb72af8cf7f93210a68a87b1e2538deb5642f4d5 Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
* | | | | | Use %zd for size_t.Elliott Hughes2013-10-181-1/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | Change-Id: I0139243c309e85236eb00bb471736bdd99eeec84
* | | | | libcutils doesn't need to be looking at bionic's privates.Elliott Hughes2013-10-101-5/+0
| |_|_|/ |/| | | | | | | | | | | Change-Id: Ib11a0c1bdc4b85c58274b21a07aa92f958d23713
* | | | Cleanup x86 flags and memset versionsPavel Chupin2013-10-103-21/+2
| |_|/ |/| | | | | | | | | | | | | | | | | ARCH_X86_HAVE_SSE2 is always true Change-Id: I680493d14280aafad5448aec727e8d9a84a6db00 Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
* | | Use SSE2 enhanced memset for capable x86 processorsDaniel Leung2013-09-241-11/+15
| |/ |/| | | | | | | | | | | | | | | | | | | | | Originally, if TARGET_ARCH_VARIANT is x86-atom, the SSE2 enhanced memset is used. This patch extends this to all x86 processors which support SSE2 (i.e. ARCH_X86_HAVE_SSE2 is true). Indentation added to the ifeq cases to make this easier to read. Change-Id: I05f49e237a95359d3f2e3216b037e3fc1a0fbcb0 Signed-off-by: Daniel Leung <daniel.leung@intel.com> Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>