diff options
-rw-r--r-- | roots.cpp | 6 | ||||
-rw-r--r-- | uncrypt/uncrypt.c | 2 | ||||
-rw-r--r-- | updater/install.c | 7 |
3 files changed, 7 insertions, 8 deletions
@@ -237,15 +237,15 @@ int format_volume(const char* volume) { 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 24d1ffc2a..bce53dbb9 100644 --- a/uncrypt/uncrypt.c +++ b/uncrypt/uncrypt.c @@ -159,7 +159,7 @@ char* parse_recovery_command_file() 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 5025881d2..198618001 100644 --- a/updater/install.c +++ b/updater/install.c @@ -353,15 +353,14 @@ Value* RenameFn(const char* name, State* state, int argc, Expr* argv[]) { 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; |