Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/osm0sis/mkbootimg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorosm0sis <osm0sis@outlook.com>2021-08-06 17:57:33 +0300
committerosm0sis <osm0sis@outlook.com>2021-08-06 17:59:04 +0300
commitf93877992eb4501131129b3e0c96781171da9275 (patch)
tree650df5da13e49284d1e597c119d822c4377cfec9
parent6031e6446b3a6162c8d8233732b9e24ef019863a (diff)
unpackbootimg: leave note on extra newlines for *-header_version (#15)2021.08.06
-rw-r--r--unpackbootimg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/unpackbootimg.c b/unpackbootimg.c
index 7d4ec0bb..f7cb7a74 100644
--- a/unpackbootimg.c
+++ b/unpackbootimg.c
@@ -285,7 +285,7 @@ int main(int argc, char **argv)
if(header.header_version <= hdr_ver_max) {
char hdrvertmp[200];
- sprintf(hdrvertmp, "%d\n", header.header_version);
+ sprintf(hdrvertmp, "%d\n", header.header_version); // extra newline to prevent some file editors from interpreting a 2-byte file as Unicode
write_string_to_file("header_version", hdrvertmp);
if(header.header_version > 1) {
@@ -346,7 +346,7 @@ int main(int argc, char **argv)
write_string_to_file("os_patch_level", oslvltmp);
char hdrvertmp[200];
- sprintf(hdrvertmp, "%d\n", header.header_version);
+ sprintf(hdrvertmp, "%d\n", header.header_version); // extra newline to prevent some file editors from interpreting a 2-byte file as Unicode
write_string_to_file("header_version", hdrvertmp);
total_read += sizeof(header);
@@ -409,7 +409,7 @@ int main(int argc, char **argv)
write_string_to_file("tags_offset", tagsofftmp);
char hdrvertmp[200];
- sprintf(hdrvertmp, "%d\n", header.header_version);
+ sprintf(hdrvertmp, "%d\n", header.header_version); // extra newline to prevent some file editors from interpreting a 2-byte file as Unicode
write_string_to_file("header_version", hdrvertmp);
char dtbofftmp[200];