Don't copy original loader service script to output file
Bug: 109664165
Test: LS script test
Change-Id: I1a2981e644963d87f710d9f8acb70e4cc92ba52a
diff --git a/ls_client/src/LsClient.cpp b/ls_client/src/LsClient.cpp
index c500398..c63d340 100644
--- a/ls_client/src/LsClient.cpp
+++ b/ls_client/src/LsClient.cpp
@@ -113,26 +113,10 @@
} else {
ALOGD_IF(ese_debug_enabled, "%s File opened %s\n", __func__,
lsUpdateBackupPath);
- fseek(fIn, 0, SEEK_END);
- long fsize = ftell(fIn);
- rewind(fIn);
-
- char* lsUpdateBuf = (char*)phNxpEse_memalloc(fsize + 1);
- fread(lsUpdateBuf, fsize, 1, fIn);
FILE* fOut = fopen(lsUpdateBackupOutPath, "wb+");
if (fOut == NULL) {
ALOGE("%s Failed to open file %s\n", __func__, lsUpdateBackupOutPath);
- phNxpEse_free(lsUpdateBuf);
- pthread_exit(NULL);
- cCallback->onStateChange(true);
- return NULL;
- }
-
- long size = fwrite(lsUpdateBuf, 1, fsize, fOut);
- if (size != fsize) {
- ALOGE("%s ERROR - Failed to write %ld bytes to file\n", __func__, fsize);
- phNxpEse_free(lsUpdateBuf);
pthread_exit(NULL);
cCallback->onStateChange(true);
return NULL;
@@ -155,7 +139,6 @@
}
cCallback->onStateChange(false);
}
- phNxpEse_free(lsUpdateBuf);
}
pthread_exit(NULL);
ALOGD_IF(ese_debug_enabled, "%s pthread_exit\n", __func__);