Merge "Erase PST partition if its marked to be erased." into lmp-dev
diff --git a/roots.cpp b/roots.cpp
index 61798f4..0d47577 100644
--- a/roots.cpp
+++ b/roots.cpp
@@ -237,15 +237,15 @@
result = make_ext4fs(v->blk_device, length, volume, sehandle);
} else { /* Has to be f2fs because we checked earlier. */
if (v->key_loc != NULL && strcmp(v->key_loc, "footer") == 0 && length < 0) {
- LOGE("format_volume: crypt footer + negative length (%lld) not supported on %s\n", v->fs_type, length);
+ LOGE("format_volume: crypt footer + negative length (%zd) not supported on %s\n", length, v->fs_type);
return -1;
}
if (length < 0) {
- LOGE("format_volume: negative length (%ld) not supported on %s\n", length, v->fs_type);
+ LOGE("format_volume: negative length (%zd) not supported on %s\n", length, v->fs_type);
return -1;
}
char *num_sectors;
- if (asprintf(&num_sectors, "%ld", length / 512) <= 0) {
+ if (asprintf(&num_sectors, "%zd", length / 512) <= 0) {
LOGE("format_volume: failed to create %s command for %s\n", v->fs_type, v->blk_device);
return -1;
}
diff --git a/uncrypt/uncrypt.c b/uncrypt/uncrypt.c
index 24d1ffc..bce53db 100644
--- a/uncrypt/uncrypt.c
+++ b/uncrypt/uncrypt.c
@@ -159,7 +159,7 @@
while (fgets(temp, sizeof(temp), f)) {
printf("read: %s", temp);
- if (strncmp(temp, "--update_package=", strlen("--update_package=")) == 0) {
+ if (strncmp(temp, "--update_package=/data/", strlen("--update_package=/data/")) == 0) {
fn = strdup(temp + strlen("--update_package="));
strcpy(temp, "--update_package=@" CACHE_BLOCK_MAP "\n");
}
diff --git a/updater/install.c b/updater/install.c
index 5025881..1986180 100644
--- a/updater/install.c
+++ b/updater/install.c
@@ -353,15 +353,14 @@
goto done;
}
if (strlen(dst_name) == 0) {
- ErrorAbort(state, "dst_name argument to %s() can't be empty",
- name);
+ ErrorAbort(state, "dst_name argument to %s() can't be empty", name);
goto done;
}
if (make_parents(dst_name) != 0) {
- ErrorAbort(state, "Creating parent of %s() failed, error %s()",
+ ErrorAbort(state, "Creating parent of %s failed, error %s",
dst_name, strerror(errno));
} else if (rename(src_name, dst_name) != 0) {
- ErrorAbort(state, "Rename of %s() to %s() failed, error %s()",
+ ErrorAbort(state, "Rename of %s to %s failed, error %s",
src_name, dst_name, strerror(errno));
} else {
result = dst_name;