aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2015-04-22 19:06:58 +0000
committerRafał Miłecki <zajec5@gmail.com>2015-04-22 19:06:58 +0000
commitf73ca80b8c624d7920a4c639bccb22f467266ce2 (patch)
tree9aa1b8915301fdb33a942069bdfa57f04993d08b
parent8cb4c59a16a8f002ee513444ee96be144d17163e (diff)
downloadmaster-187ad058-f73ca80b8c624d7920a4c639bccb22f467266ce2.tar.gz
master-187ad058-f73ca80b8c624d7920a4c639bccb22f467266ce2.tar.bz2
master-187ad058-f73ca80b8c624d7920a4c639bccb22f467266ce2.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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45562 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/utils/nvram/src/nvram.c14
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);