Commit Graph

39 Commits

Author SHA1 Message Date
Mark Salyzyn 30f991f251 liblog: use log/log.h when utilizing ALOG macros
Test: compile
Bug: 30465923
Change-Id: Id6d76510819ebd88c3f5003d00d73a0dbe85e943
2017-01-11 09:31:15 -08:00
Nick Kralevich 6b694a76f5 ion.c: add O_CLOEXEC to /dev/ion open
Test: device boots and no obvious problems.
Change-Id: I0845b79de49b77878adaf6cd14cc506f7586cccb
2016-11-29 15:20:33 -08:00
Jeff Vander Stoep 1ba4e981db libion: open /dev/ion read-only
/dev/ion driver does not recognize the write operation [1] so open it
read-only.

[1] http://lxr.free-electrons.com/source/drivers/staging/android/ion/ion.c?v=4.5#L1369

Test: Angler builds and boots
Bug: 32120194
Change-Id: I9b26d43ea32cb24426404668701df1f1648d336c
2016-10-21 14:29:22 -07:00
Mark Salyzyn cfd5b080af system/core: preparation to pull back interfaces from android/log.h
Point to log/log.h where necessary, define LOG_TAG where necessary.
Accept that private/android_logger.h is suitable replacement for
log/logger.h and android/log.h.

Correct liblog/README

Effectively a cleanup and controlled select revert of
'system/core: drop or replace log/logger.h' and
'system/core: Replace log/log.h with android/log.h'.

Test: compile
Bug: 30465923
Change-Id: Ic2ad157bad6f5efe2c6af293a73bb753300b17a2
2016-10-20 08:11:39 -07:00
Mark Salyzyn 66ce3e08c5 system/core Replace cutils/log.h with android/log.h
Should use android/log.h instead of cutils/log.h as a good example
to all others.  Adjust header order to comply with Android Coding
standards.

Test: Compile
Bug: 26552300
Bug: 31289077
Change-Id: I2c9cbbbd64d8dccf2d44356361d9742e4a9b9031
2016-09-30 12:47:05 -07:00
Dan Willemsen 45f05240c2 Convert more Android.mk files to Android.bp
These modules have their dependencies satisfied, and aren't doing
anything strange.

Change-Id: I72039a15256cbd5e5eee0d79a15d66d74a6c087d
2016-07-13 17:41:45 -07:00
Chih-Hung Hsieh eabd5108b3 Fix misc-macro-parentheses warnings in libion, libsparse, libmem*
Bug: 28705665
Change-Id: I3dd5c086787f5e48ab100a71a42109ea0e417bf9
2016-05-18 15:41:16 -07:00
Chih-Hung Hsieh f60cbb7245 Use unique_ptr to free objects when ASSERT* fail.
Now need c++14 and clang to compile std::make_unique.

BUG: 27479198
Change-Id: Ib0f2279de85c6259330d5436257f6b978420601a
2016-03-04 11:30:50 -08:00
Elliott Hughes c72bd16ce8 am 8d2cd035: am 2ddb9cb1: am ed43be39: Merge "Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it\'s not needed."
* commit '8d2cd03547c76f6c670b33d4fe6d44b646c14b45':
  Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it's not needed.
2015-04-02 22:07:16 +00:00
Elliott Hughes bcc2b5f44a Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it's not needed.
Change-Id: I720b8ef1050da45a7833adef8219b6acb2cf3a38
2015-04-02 14:31:07 -07:00
Elliott Hughes d2ac374909 am 2e14f617: am 06b4e982: Merge "Add missing <malloc.h> and <string.h> includes."
* commit '2e14f61731adbb1f0d0d54bab82bc2f0ecee6a11':
  Add missing <malloc.h> and <string.h> includes.
2015-01-28 22:08:15 +00:00
Elliott Hughes a744b05984 Add missing <malloc.h> and <string.h> includes.
Change-Id: Ia41756e607663d056e7d2fdd7ecbec7e5841a913
2015-01-28 11:37:57 -08:00
Andreas Gampe 58b80be811 am fcb2f0ab: am 0b7e6516: Merge "Libion: Remove unused variables"
* commit 'fcb2f0abe07ffd1c7a87bdcd7878a556ce0049fb':
  Libion: Remove unused variables
2014-11-25 20:03:45 +00:00
Andreas Gampe f0a54c17d8 Libion: Remove unused variables
For build-system CFLAGS clean-up, fix unused variables.

Fix missing close of file descriptors. Explicitly exit after a fork.

Change-Id: I76affbc8647c3a760ed3cacc7f3ada3f59e283b1
2014-11-25 10:16:06 -08:00
Dan Albert 2dd1bbacde am 9f5f81bf: am 133b7d4a: Merge "Don\'t manually link libgtest_main in libion tests."
* commit '9f5f81bfa2c7eb581fd6b2c735ac143fca07e70e':
  Don't manually link libgtest_main in libion tests.
2014-11-14 21:55:42 +00:00
Dan Albert abe8d148b9 Don't manually link libgtest_main in libion tests.
This is actually probably broken right now, since these tests are
getting both the libc++ flavor and stlport flavor of libgtest_main.

Bug: 15193147
Change-Id: Ic2f8dda98240c12591803f3c3522505314a05609
2014-11-14 11:00:46 -08:00
Dan Albert c7c75cd483 am 21d8d89c: am 06279285: Merge "Revert "Move some tests to libc++.""
* commit '21d8d89c7cda35ad1571375cf051c0b050604619':
  Revert "Move some tests to libc++."
2014-11-12 16:37:16 +00:00
Dan Albert 1d3b492bde Revert "Move some tests to libc++."
The build system is still linking both libgcc and libcompiler-rt,
which is causing duplicate symbol errors on some architectures. This
requires a fix in the build system, so reverting for now.

This reverts commit e3cccbfd47.
2014-11-11 21:42:27 -08:00
Dan Albert e924cced8e am 498c8135: am 7d196df6: Merge "Move some tests to libc++."
* commit '498c8135b46b976806fb4e335071c11fc2c51776':
  Move some tests to libc++.
2014-11-12 03:43:52 +00:00
Dan Albert e3cccbfd47 Move some tests to libc++.
Bug: 15193147
Change-Id: I93244e4a5d0c751056910ec8005a92401d305716
2014-11-11 23:59:02 +00:00
Rom Lemarchand 5cdcdce50e libion: only modify parameters on success
Wait until a call is successful before modifying the value of pointers
passed

Change-Id: Iaeb2517c8cefeca2f60ebf610d38f264b48e59a0
2014-10-28 15:50:19 +00:00
Mark Salyzyn 72c22bf69b libion: Turn on -Werror
Change-Id: I0a933623147fb7bfb7251b1d9213cc174619ed42
2014-05-21 12:58:38 -07:00
Elliott Hughes ccecf14254 system/core 64-bit cleanup.
This cleans up most of the size-related problems in system/core.
There are still a few changes needed for a clean 64-bit build,
but they look like they might require changes to things like the
fastboot protocol.

Change-Id: I1560425a289fa158e13e2e3173cc3e71976f92c0
2014-01-16 12:54:18 -08:00
Colin Cross 735ead6e68 libion: add apache license header to ion_test.c
Change-Id: Ie4b641cd62b56f713178932cc5c08083c0d2452a
2013-12-19 19:31:46 -08:00
Colin Cross 363441b120 libion: initial unit tests
Change-Id: I5502b71d0c7c24d7fd59e4880033657f840b341a
2013-12-19 19:31:46 -08:00
Colin Cross b04f75ab12 libion: update ion_test.h
Update ion_test.h to include a padding word to keep the same
struct size on 32-bit and 64-bit.

Change-Id: I68086ce49ca4cc4ed8e251752eaed331a35fbbd2
2013-12-19 19:31:19 -08:00
Colin Cross dd6770bd49 libion: update to latest uapi header
Pull the uapi headers from android-3.10 directly into libion.
No other modules should be directly calling ion kernel
interfaces, so there is no reason to have those interfaces
exposed.

Change-Id: I2d3fef08f6bb381522ecf7bcffea2b8280d5e737
2013-12-18 18:43:22 -08:00
Colin Cross aab47b293f libion: return -errno from ion_close
Return -errno from ion_close instead of -1 on error.

Change-Id: Idb828aa4b4d1a660b79d2dba8be32f306eac959d
2013-12-18 18:27:57 -08:00
Colin Cross 51b6e42231 libion: add include for size_t
Add sys/types.h include for size_t

Change-Id: Ica764b1f5eca2df21d82c86493fc4e0d70b6628a
2013-12-18 18:27:57 -08:00
Colin Cross 7496318486 libion: add NULL checks
Check for NULL in any library function that takes a pointer.

Change-Id: I9ae8887b5ae0f231583173ee6a9dfd2f8c4611ec
2013-12-18 18:27:57 -08:00
Colin Cross 92d7ca6af3 libion: clean up whitespace
Convert everything to 4 space indents, no tabs.

Change-Id: I376fad866864f0579b91ffad406e872fcce566ad
2013-12-18 18:27:54 -08:00
Colin Cross 03c932dffa libion: move ion.h into local include directory
Export it to users of libion with LOCAL_C_EXPORT_INCLUDE_DIRS

Change-Id: I4d00a9dd2e99953723994d0304ca77e0ad50a3a9
2013-12-18 18:24:50 -08:00
Rom Lemarchand 969eac8161 ion: update struct and type definitions to match kernel header
- Replacing struct ion_handle * with ion_user_handle_t
- Replacing heap_mask field name with heap_id_mask

Change-Id: Iaba1ccc62b9398a7b37c5a734bc21a9ecbbc8277
2013-12-18 18:24:50 -08:00
Ashok Bhat aed6bec414 libion: Use %zu for size_t
Change-Id: If92fc31ab676a569530c21e655a1b5b451f5c5e5
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2013-12-10 18:13:04 +00:00
Elliott Hughes f98e4bf7fb Fix build.
Change-Id: I6552bf9f83faa97bd5a844381aceb3ef85f86c76
2013-11-21 22:09:46 -08:00
Rebecca Schultz Zavin 3cfcc30005 Add explicit sync call to ion library
Bug: 6854979
Change-Id: I535d55af897eeb4ed707b5da54f3fbf36afa452c
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2012-09-20 09:46:19 -07:00
Rebecca Schultz Zavin a50fd5568e Modify ion to use new definition of ALLOC ioctl argument
Also add ion_alloc_fd helper for when you only want a filedescriptor
and know you won't need to access this handle again by its ion_handle

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

Change-Id: Ia4bae22946b0078084b62f5447fecbf261dfaa83
2012-06-28 13:43:53 -07:00
Dima Zavin e92b158de7 libion: use correct build vars in makefile
Change-Id: I74c8e723e4f15d3806c1834b069bcb1fd56ac4fa
Signed-off-by: Dima Zavin <dima@android.com>
2012-02-27 16:32:15 -08:00
Rebecca Schultz Zavin afd9123946 Add ion helper library
This library contains helper functions for using ion

Change-Id: I7d7f76d6d3f36cd94d67797a38099a94214392b1
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2012-02-23 12:18:31 -08:00