summaryrefslogtreecommitdiffstats
path: root/otautil
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--otautil/Android.bp11
-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;
}
}