diff options
author | Tianjie Xu <xunchang@google.com> | 2019-03-29 23:04:04 +0100 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-03-29 23:04:04 +0100 |
commit | 8e39f3d54e0cb403be80c248286be14a5a427814 (patch) | |
tree | b31bd3f84794bbbea30d04e2e7465d0957fee209 /otautil | |
parent | Merge "Use flags = 0 to avoid fd closing for child updater process" am: 50bda24f1e am: 111663d893 (diff) | |
parent | Merge "Move install to separate module" am: a232d9dccb (diff) | |
download | android_bootable_recovery-8e39f3d54e0cb403be80c248286be14a5a427814.tar android_bootable_recovery-8e39f3d54e0cb403be80c248286be14a5a427814.tar.gz android_bootable_recovery-8e39f3d54e0cb403be80c248286be14a5a427814.tar.bz2 android_bootable_recovery-8e39f3d54e0cb403be80c248286be14a5a427814.tar.lz android_bootable_recovery-8e39f3d54e0cb403be80c248286be14a5a427814.tar.xz android_bootable_recovery-8e39f3d54e0cb403be80c248286be14a5a427814.tar.zst android_bootable_recovery-8e39f3d54e0cb403be80c248286be14a5a427814.zip |
Diffstat (limited to '')
-rw-r--r-- | otautil/Android.bp | 11 | ||||
-rw-r--r-- | otautil/include/otautil/roots.h (renamed from roots.h) | 5 | ||||
-rw-r--r-- | otautil/roots.cpp (renamed from roots.cpp) | 8 |
3 files changed, 15 insertions, 9 deletions
diff --git a/otautil/Android.bp b/otautil/Android.bp index 41018dd2f..b4936c08b 100644 --- a/otautil/Android.bp +++ b/otautil/Android.bp @@ -42,12 +42,23 @@ cc_library_static { "dirutil.cpp", "mounts.cpp", "parse_install_logs.cpp", + "roots.cpp", "sysutil.cpp", "thermalutil.cpp", ], + include_dirs: [ + "system/vold", + ], + + static_libs: [ + "libfstab", + ], + shared_libs: [ "libcutils", + "libext4_utils", + "libfs_mgr", "libselinux", ], }, diff --git a/roots.h b/otautil/include/otautil/roots.h index 7b031a188..482f3d050 100644 --- a/roots.h +++ b/otautil/include/otautil/roots.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef RECOVERY_ROOTS_H_ -#define RECOVERY_ROOTS_H_ +#pragma once #include <string> @@ -58,5 +57,3 @@ int setup_install_mounts(); bool logical_partitions_mapped(); std::string get_system_root(); - -#endif // RECOVERY_ROOTS_H_ diff --git a/roots.cpp b/otautil/roots.cpp index c42723f0c..815d644e5 100644 --- a/roots.cpp +++ b/otautil/roots.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "roots.h" +#include "otautil/roots.h" #include <ctype.h> #include <fcntl.h> @@ -174,11 +174,9 @@ int format_volume(const std::string& volume, const std::string& directory) { PLOG(ERROR) << "format_volume: failed to open " << v->blk_device; return -1; } - length = - get_file_size(fd.get(), v->length ? -v->length : CRYPT_FOOTER_OFFSET); + length = get_file_size(fd.get(), v->length ? -v->length : CRYPT_FOOTER_OFFSET); if (length <= 0) { - LOG(ERROR) << "get_file_size: invalid size " << length << " for " - << v->blk_device; + LOG(ERROR) << "get_file_size: invalid size " << length << " for " << v->blk_device; return -1; } } |