summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorpancake <pancake@dazo>2007-06-10 16:15:30 +0200
committerpancake <pancake@dazo>2007-06-10 16:15:30 +0200
commit83b41f9371fa221ee701bb83cf5c72f5984dcfaa (patch)
tree8a042cd23c74fedfa2d53befecab1ccd75dc2169 /src/main.c
parentc46961d511ce87859e3bdd18ecf42ccd70ca525a (diff)
download0xFFFF-83b41f9371fa221ee701bb83cf5c72f5984dcfaa.tar.bz2
* Initial implementation of the "badblocks" (-C) command.
* Initial work on the reorganization of the dump.c code to avoid spagetti code. ATM is just a draft * Dump now shows you more info
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 86b52e2..045ad1f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -84,6 +84,7 @@ void show_usage()
printf(" -u [fiasco] unpack target fiasco image\n");
printf(" -U [0|1] disable/enable the usb host mode\n");
printf(" -s [serial] serial port console (minicom like terminal)\n");
+ printf(" -C [/dev/mtd] check bad blocks on mtd\n");
printf(" -c console prompt mode\n");
printf(" -h show this help message\n");
printf(" -i show device information (let standby mode)\n");
@@ -151,7 +152,7 @@ int main(int argc, char **argv)
{
int c;
- while((c = getopt(argc, argv, "cp:vVhRu:ib:U:r:e:ld:I:D:f:s:")) != -1) {
+ while((c = getopt(argc, argv, "C:cp:vVhRu:ib:U:r:e:ld:I:D:f:s:")) != -1) {
switch(c) {
case 'c':
return console_prompt();
@@ -203,6 +204,8 @@ int main(int argc, char **argv)
printf("%s: %s\n", fpid_file(optarg), optarg);
identify = 1;
break;
+ case 'C':
+ return check_badblocks(optarg);
case 'i':
info = 1;
break;
@@ -238,7 +241,7 @@ int main(int argc, char **argv)
{
printf("Usage: 0xFFFF [-hvVRi] [-e path] [-U 0|1] [-p [piece%%]file [-p ...]]\n");
printf(" [-b boot-args] [-I piece [-I ...]] [-u fiasco-image]\n");
- printf(" [-D 0|1|2] [-F rd flags] [-s serial-dev] [-c]\n");
+ printf(" [-D 0|1|2] [-F rd flags] [-s serial-dev] [-c] [-C mtd-dev]\n");
return 1;
}