Support for ext2 and ext3 update-binary.
Change-Id: Ide34392bd8ac56878aa3e992b275a39d6b6bc7cf
diff --git a/updater/install.c b/updater/install.c
index 7f6a991..d23ec64 100644
--- a/updater/install.c
+++ b/updater/install.c
@@ -243,6 +243,24 @@
}
result = location;
#endif
+ } else if (strcmp(fs_type, "ext2") == 0) {
+ int status = format_ext2_device(location);
+ if (status != 0) {
+ fprintf(stderr, "%s: format_ext2_device failed (%d) on %s",
+ name, status, location);
+ result = strdup("");
+ goto done;
+ }
+ result = location;
+ } else if (strcmp(fs_type, "ext3") == 0) {
+ int status = format_ext3_device(location);
+ if (status != 0) {
+ fprintf(stderr, "%s: format_ext3_device failed (%d) on %s",
+ name, status, location);
+ result = strdup("");
+ goto done;
+ }
+ result = location;
} else {
fprintf(stderr, "%s: unsupported fs_type \"%s\" partition_type \"%s\"",
name, fs_type, partition_type);