mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-01 21:59:42 +02:00
always unlock
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@745 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
f4161bd955
commit
770185e2dc
@ -237,7 +237,6 @@ void usage(void)
|
|||||||
" erase erase all data on device\n"
|
" erase erase all data on device\n"
|
||||||
" write <imagefile> write imagefile to device\n"
|
" write <imagefile> write imagefile to device\n"
|
||||||
"Following options are available:\n"
|
"Following options are available:\n"
|
||||||
" -u unlock device before accessing it\n"
|
|
||||||
" -r reboot after successful command\n"
|
" -r reboot after successful command\n"
|
||||||
" -e <device> erase <device> before executing the command\n\n"
|
" -e <device> erase <device> before executing the command\n\n"
|
||||||
"Example: To write linux.trx to mtd4 labeled as linux and reboot afterwards\n"
|
"Example: To write linux.trx to mtd4 labeled as linux and reboot afterwards\n"
|
||||||
@ -257,13 +256,9 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
erase[0] = NULL;
|
erase[0] = NULL;
|
||||||
boot = 0;
|
boot = 0;
|
||||||
unlock = 0;
|
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "ure:")) != -1)
|
while ((ch = getopt(argc, argv, "re:")) != -1)
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'u':
|
|
||||||
unlock = 1;
|
|
||||||
break;
|
|
||||||
case 'r':
|
case 'r':
|
||||||
boot = 1;
|
boot = 1;
|
||||||
break;
|
break;
|
||||||
@ -308,12 +303,10 @@ int main (int argc, char **argv)
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unlock)
|
|
||||||
mtd_unlock(device);
|
mtd_unlock(device);
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case CMD_UNLOCK:
|
case CMD_UNLOCK:
|
||||||
mtd_unlock(device);
|
|
||||||
break;
|
break;
|
||||||
case CMD_ERASE:
|
case CMD_ERASE:
|
||||||
mtd_erase(device);
|
mtd_erase(device);
|
||||||
|
Loading…
Reference in New Issue
Block a user