From 615fef1ab8051d06482aa59a2709825f0e2e3047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Wed, 22 Apr 2015 19:06:58 +0000 Subject: nvram: drop support for ancient /dev/mtdblock/%d MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Path /dev/mtdblock%d is used for years now. Signed-off-by: Rafał Miłecki SVN-Revision: 45562 --- package/utils/nvram/src/nvram.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'package/utils/nvram/src') diff --git a/package/utils/nvram/src/nvram.c b/package/utils/nvram/src/nvram.c index a0bc006..b3ef426 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); -- cgit v1.1