summaryrefslogtreecommitdiffstats
path: root/updater/install.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'updater/install.cpp')
-rw-r--r--updater/install.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/updater/install.cpp b/updater/install.cpp
index 84cf5d6c0..3adb37f95 100644
--- a/updater/install.cpp
+++ b/updater/install.cpp
@@ -60,6 +60,19 @@
#include "error_code.h"
#include "mounts.h"
#include "ota_io.h"
+
+#include "applypatch/applypatch.h"
+#include "flashutils/flashutils.h"
+#include "install.h"
+#ifdef HAVE_LIBTUNE2FS
+#include "tune2fs.h"
+#endif
+
+#ifdef USE_EXT4
+#include "make_ext4fs.h"
+#include "wipe.h"
+#endif
+
#include "otautil/DirUtil.h"
#include "otautil/ZipUtil.h"
#include "print_sha1.h"
@@ -1000,6 +1013,7 @@ Value* EnableRebootFn(const char* name, State* state, const std::vector<std::uni
}
Value* Tune2FsFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) {
+#ifdef HAVE_LIBTUNE2FS
if (argv.empty()) {
return ErrorAbort(state, kArgsParsingFailure, "%s() expects args, got %zu", name, argv.size());
}
@@ -1026,6 +1040,9 @@ Value* Tune2FsFn(const char* name, State* state, const std::vector<std::unique_p
return ErrorAbort(state, kTune2FsFailure, "%s() returned error code %d", name, result);
}
return StringValue("t");
+#else
+ return ErrorAbort(state, kTune2FsFailure, "%s() support not present, no libtune2fs", name);
+#endif // HAVE_LIBTUNE2FS
}
void RegisterInstallFunctions() {