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 bfe91e7f9..0d473fce4 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 "print_sha1.h"
#include "tune2fs.h"
@@ -993,6 +1006,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());
}
@@ -1019,6 +1033,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() {