projects
/
openwrt
/
staging
/
neocturne.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05d28c4
)
nvram: drop support for ancient /dev/mtdblock/%d
author
Rafał Miłecki
<zajec5@gmail.com>
Wed, 22 Apr 2015 19:06:58 +0000
(19:06 +0000)
committer
Rafał Miłecki
<zajec5@gmail.com>
Wed, 22 Apr 2015 19:06:58 +0000
(19:06 +0000)
Path /dev/mtdblock%d is used for years now.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 45562
package/utils/nvram/src/nvram.c
patch
|
blob
|
history
diff --git
a/package/utils/nvram/src/nvram.c
b/package/utils/nvram/src/nvram.c
index a0bc006d15322540978f6496c98f8c360ab7d0dd..b3ef4262a52a8cfab9a9b492dae7af3fc6dacc96 100644
(file)
--- 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);