summaryrefslogtreecommitdiffstats
path: root/updater/install.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--updater/install.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/updater/install.cpp b/updater/install.cpp
index 1a647dfa5..88f771471 100644
--- a/updater/install.cpp
+++ b/updater/install.cpp
@@ -54,8 +54,12 @@
#include "openssl/sha.h"
#include "ota_io.h"
#include "updater.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"
@@ -1559,6 +1563,7 @@ Value* EnableRebootFn(const char* name, State* state, int argc, Expr* argv[]) {
}
Value* Tune2FsFn(const char* name, State* state, int argc, Expr* argv[]) {
+#ifdef HAVE_LIBTUNE2FS
if (argc == 0) {
return ErrorAbort(state, kArgsParsingFailure, "%s() expects args, got %d", name, argc);
}
@@ -1587,6 +1592,9 @@ Value* Tune2FsFn(const char* name, State* state, int argc, Expr* argv[]) {
name, result);
}
return StringValue(strdup("t"));
+#else
+ return ErrorAbort(state, "%s() support not present, no libtune2fs", name);
+#endif // HAVE_LIBTUNE2FS
}
void RegisterInstallFunctions() {