diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-04-22 19:06:58 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2015-04-22 19:06:58 +0000 |
commit | 615fef1ab8051d06482aa59a2709825f0e2e3047 (patch) | |
tree | 1ab118ecd33324079ef8e8238ce35a655a349763 /package | |
parent | 05d28c47e8d86cc7305f900edcb75459ffe97131 (diff) | |
download | upstream-615fef1ab8051d06482aa59a2709825f0e2e3047.tar.gz upstream-615fef1ab8051d06482aa59a2709825f0e2e3047.tar.bz2 upstream-615fef1ab8051d06482aa59a2709825f0e2e3047.zip |
nvram: drop support for ancient /dev/mtdblock/%d
Path /dev/mtdblock%d is used for years now.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 45562
Diffstat (limited to 'package')
-rw-r--r-- | package/utils/nvram/src/nvram.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/package/utils/nvram/src/nvram.c b/package/utils/nvram/src/nvram.c index a0bc006d15..b3ef4262a5 100644 --- a/package/utils/nvram/src/nvram.c +++ b/package/utils/nvram/src/nvram.c @@ -445,7 +445,7 @@ char * nvram_find_mtd(void) { nvram_erase_size = esz; - sprintf(dev, "/dev/mtdblock/%d", i); + sprintf(dev, "/dev/mtdblock%d", i); if( stat(dev, &s) > -1 && (s.st_mode & S_IFBLK) ) { if( (path = (char *) malloc(strlen(dev)+1)) != NULL ) @@ -454,18 +454,6 @@ char * nvram_find_mtd(void) break; } } - else - { - sprintf(dev, "/dev/mtdblock%d", i); - if( stat(dev, &s) > -1 && (s.st_mode & S_IFBLK) ) - { - if( (path = (char *) malloc(strlen(dev)+1)) != NULL ) - { - strncpy(path, dev, strlen(dev)+1); - break; - } - } - } } } fclose(fp); |