summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2012-06-23 16:54:05 +0200
committerPali Rohár <pali.rohar@gmail.com>2012-06-23 16:54:05 +0200
commit9195f3c7dadd3dd630884d7532cf977c2506ba98 (patch)
tree3178d17ccf7d62b55517774b00f5918314c526a1 /src/main.c
parent4f92794cdffb0936c308d46c3b5abd80c63b9b1a (diff)
download0xFFFF-9195f3c7dadd3dd630884d7532cf977c2506ba98.tar.bz2
Fixed creating fiasco images, added param version: for specifing sw-ver. Now generated fiasco images are valid for nokia flasher.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index ae35888..ae33d2e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -106,7 +106,7 @@ void show_usage()
printf ("Fiasco options:\n"
" -u [dir] unpack fiasco image to directory\n"
- " -g generate fiasco image\n"
+ " -g [ver] generate fiasco image for SW version\n"
"\n"
);
@@ -120,7 +120,6 @@ void show_usage()
" file is image file name\n"
" layout is file name for layout file\n"
" -F [file] specify Fiasco image\n"
- " (see '-p help' for supported types)\n"
" -t [type] specify image type\n"
" -s [ver] specify image with version\n"
" -d [dev] specify image for device\n"
@@ -140,7 +139,7 @@ void show_usage()
);
#if HAVE_SQUEUE
- printf( " -Q enter shared queues server mode (for gui or remote)\n");
+ printf( " -Q enter shared queues server mode (for gui or remote)\n\n");
#endif
printf( "R&D flags:\n"
@@ -195,6 +194,7 @@ void show_usage()
" -H [file] calculate hash for file\n"
" -I [piece] identify a firmware piece\n"
" -P [new-fiasco] creates a new fiasco package, pieces as arguments\n"
+ " optional argument 'version:<version>'\n"
" -u [fiasco] unpack target fiasco image\n"
" -v be verbose and noisy\n"
" -V show 0xFFFF version information\n"
@@ -229,7 +229,8 @@ int unpack_callback(struct header_t *header)
printf("Cannot open file.\n");
return 1;
}
- fwrite(header->data, header->size, 1, fd);
+ if (fwrite(header->data, header->size, 1, fd) != 1)
+ printf("Writing failed\n");
fclose(fd);
return 0;