diff options
author | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-04-28 15:58:19 +0000 |
---|---|---|
committer | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-04-28 15:58:19 +0000 |
commit | f104b841808cd1384d37a395a7bd3bb5170cf319 (patch) | |
tree | c279c5119acf607e5fc052b7a45ed78fe86dfe49 /package/openwrt | |
parent | 42e74d4444f4672cd5b70f475755f3b54f4c407e (diff) |
always unlock
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@745 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/openwrt')
-rw-r--r-- | package/openwrt/mtd.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/package/openwrt/mtd.c b/package/openwrt/mtd.c index 6771b3c217..851f266282 100644 --- a/package/openwrt/mtd.c +++ b/package/openwrt/mtd.c @@ -237,7 +237,6 @@ void usage(void) " erase erase all data on device\n" " write <imagefile> write imagefile to device\n" "Following options are available:\n" - " -u unlock device before accessing it\n" " -r reboot after successful command\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" @@ -257,13 +256,9 @@ int main (int argc, char **argv) erase[0] = NULL; boot = 0; - unlock = 0; - while ((ch = getopt(argc, argv, "ure:")) != -1) + while ((ch = getopt(argc, argv, "re:")) != -1) switch (ch) { - case 'u': - unlock = 1; - break; case 'r': boot = 1; break; @@ -308,12 +303,10 @@ int main (int argc, char **argv) i++; } - if (unlock) - mtd_unlock(device); + mtd_unlock(device); switch (cmd) { case CMD_UNLOCK: - mtd_unlock(device); break; case CMD_ERASE: mtd_erase(device); |