Created
August 27, 2012 02:28
-
-
Save sakuramilk/3485111 to your computer and use it in GitHub Desktop.
0001-updater-added-ignore-kernel-flash-in-extract_file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 75230bd9805fa1111b333208a4a20ae9e2683642 Mon Sep 17 00:00:00 2001 | |
From: sakuramilk <[email protected]> | |
Date: Mon, 27 Aug 2012 11:01:25 +0900 | |
Subject: [PATCH] updater: added ignore kernel flash in extract_file | |
--- | |
updater/install.c | 8 ++++++++ | |
1 files changed, 8 insertions(+), 0 deletions(-) | |
diff --git a/updater/install.c b/updater/install.c | |
index ad88a94..ad1b0b5 100644 | |
--- a/updater/install.c | |
+++ b/updater/install.c | |
@@ -412,8 +412,16 @@ Value* PackageExtractFileFn(const char* name, State* state, | |
char* zip_path; | |
char* dest_path; | |
+ char* kernel_flash; | |
if (ReadArgs(state, argv, 2, &zip_path, &dest_path) < 0) return NULL; | |
+ kernel_flash = getenv("KERNEL_FLASH"); | |
+ if (kernel_flash != NULL && kernel_flash[0] == '0' && strstr(dest_path, MMCBLK_BOOT)) { | |
+ fprintf(stderr, "package_extract_file: skip flash kernel"); | |
+ success = true; | |
+ goto done2; | |
+ } | |
+ | |
ZipArchive* za = ((UpdaterInfo*)(state->cookie))->package_zip; | |
const ZipEntry* entry = mzFindZipEntry(za, zip_path); | |
if (entry == NULL) { | |
-- | |
1.7.0.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment