summaryrefslogtreecommitdiffstats
path: root/fastboot/engine.c
diff options
context:
space:
mode:
authorjp abgrall <jpa@google.com>2013-06-26 03:54:56 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-06-26 03:54:57 +0000
commiteecf40fce8d502a9b35f79d73bba708bc35c9632 (patch)
tree11ec5f8f17810a4f08c66d981970691a9e52fb74 /fastboot/engine.c
parent2a25ca0a2462d58e2b9ade17cb146e03a0476add (diff)
parent88e8f61a9ef5cda24932f669d3b224e0216deba9 (diff)
downloadsystem_core-eecf40fce8d502a9b35f79d73bba708bc35c9632.zip
system_core-eecf40fce8d502a9b35f79d73bba708bc35c9632.tar.gz
system_core-eecf40fce8d502a9b35f79d73bba708bc35c9632.tar.bz2
Merge "Revert "fastboot: add preflash command to help with large downloads+flash""
Diffstat (limited to 'fastboot/engine.c')
-rw-r--r--fastboot/engine.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/fastboot/engine.c b/fastboot/engine.c
index 4045759..8d46991 100644
--- a/fastboot/engine.c
+++ b/fastboot/engine.c
@@ -76,7 +76,6 @@ char *mkmsg(const char *fmt, ...)
#define OP_NOTICE 4
#define OP_FORMAT 5
#define OP_DOWNLOAD_SPARSE 6
-#define OP_COMMAND_IGNORE_FAIL 7
typedef struct Action Action;
@@ -375,8 +374,6 @@ int fb_format(Action *a, usb_handle *usb, int skip_if_not_supported)
// Following piece of code is similar to fb_queue_flash() but executes
// actions directly without queuing
- snprintf(cmd, sizeof(cmd), "preflash:%s", partition);
- fb_command(usb, cmd); /* Ignore status */
fprintf(stderr, "sending '%s' (%lli KB)...\n", partition, image.image_size/1024);
status = fb_download_data(usb, image.buffer, image.image_size);
if (status) goto cleanup;
@@ -405,8 +402,6 @@ void fb_queue_flash(const char *ptn, void *data, unsigned sz)
{
Action *a;
- a = queue_action(OP_COMMAND_IGNORE_FAIL, "preflash:%s", ptn);
- a->msg = mkmsg("prep for '%s' (%d KB)", ptn, sz / 1024);
a = queue_action(OP_DOWNLOAD, "");
a->data = data;
a->size = sz;
@@ -420,8 +415,6 @@ void fb_queue_flash_sparse(const char *ptn, struct sparse_file *s, unsigned sz)
{
Action *a;
- a = queue_action(OP_COMMAND_IGNORE_FAIL, "preflash:%s", ptn);
- a->msg = mkmsg("prep for sparse '%s' (%d KB)", ptn, sz / 1024);
a = queue_action(OP_DOWNLOAD_SPARSE, "");
a->data = s;
a->size = 0;
@@ -582,9 +575,7 @@ void fb_queue_command(const char *cmd, const char *msg)
void fb_queue_download(const char *name, void *data, unsigned size)
{
- Action *a;
- a = queue_action(OP_COMMAND_IGNORE_FAIL, "preflash:");
- a = queue_action(OP_DOWNLOAD, "");
+ Action *a = queue_action(OP_DOWNLOAD, "");
a->data = data;
a->size = size;
a->msg = mkmsg("downloading '%s'", name);
@@ -623,8 +614,6 @@ int fb_execute_queue(usb_handle *usb)
status = fb_command(usb, a->cmd);
status = a->func(a, status, status ? fb_get_error() : "");
if (status) break;
- } else if (a->op == OP_COMMAND_IGNORE_FAIL) {
- fb_command(usb, a->cmd); /* Ignore status */
} else if (a->op == OP_QUERY) {
status = fb_command_response(usb, a->cmd, resp);
status = a->func(a, status, status ? fb_get_error() : resp);