summaryrefslogtreecommitdiffstats
path: root/updater/install.c
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2015-03-19 20:10:01 +0100
committerEthan Yonker <dees_troy@teamw.in>2015-03-19 20:10:01 +0100
commit7e1b986a31f44fbd67c892d873c18b19f547bcad (patch)
tree651f1d226636f52c564daa6939c644161706d5ae /updater/install.c
parentAllow multiple overlays (diff)
downloadandroid_bootable_recovery-7e1b986a31f44fbd67c892d873c18b19f547bcad.tar
android_bootable_recovery-7e1b986a31f44fbd67c892d873c18b19f547bcad.tar.gz
android_bootable_recovery-7e1b986a31f44fbd67c892d873c18b19f547bcad.tar.bz2
android_bootable_recovery-7e1b986a31f44fbd67c892d873c18b19f547bcad.tar.lz
android_bootable_recovery-7e1b986a31f44fbd67c892d873c18b19f547bcad.tar.xz
android_bootable_recovery-7e1b986a31f44fbd67c892d873c18b19f547bcad.tar.zst
android_bootable_recovery-7e1b986a31f44fbd67c892d873c18b19f547bcad.zip
Diffstat (limited to 'updater/install.c')
-rw-r--r--updater/install.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/updater/install.c b/updater/install.c
index 20ee431de..7a73f28b9 100644
--- a/updater/install.c
+++ b/updater/install.c
@@ -48,7 +48,9 @@
#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"
@@ -1491,6 +1493,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, "%s() expects args, got %d", name, argc);
}
@@ -1519,6 +1522,9 @@ Value* Tune2FsFn(const char* name, State* state, int argc, Expr* argv[]) {
return ErrorAbort(state, "%s() returned error code %d", name, result);
}
return StringValue(strdup("t"));
+#else
+ return ErrorAbort(state, "%s() support not present, no libtune2fs", name);
+#endif // HAVE_LIBTUNE2FS
}
void RegisterInstallFunctions() {