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
This commit is contained in:
parent
05d28c47e8
commit
615fef1ab8
1 changed files with 1 additions and 13 deletions
|
@ -445,7 +445,7 @@ char * nvram_find_mtd(void)
|
||||||
{
|
{
|
||||||
nvram_erase_size = esz;
|
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( stat(dev, &s) > -1 && (s.st_mode & S_IFBLK) )
|
||||||
{
|
{
|
||||||
if( (path = (char *) malloc(strlen(dev)+1)) != NULL )
|
if( (path = (char *) malloc(strlen(dev)+1)) != NULL )
|
||||||
|
@ -454,18 +454,6 @@ char * nvram_find_mtd(void)
|
||||||
break;
|
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);
|
fclose(fp);
|
||||||
|
|
Loading…
Reference in a new issue