* Finish up the friendly name on ReadyNAS.
This commit is contained in:
parent
ea1695b0b5
commit
f190964ab1
@ -227,18 +227,17 @@ getfriendlyname(char * buf, int len)
|
||||
#ifdef READYNAS
|
||||
FILE * info;
|
||||
char ibuf[64], *key, *val;
|
||||
snprintf(buf+off, len-off, "ReadyNAS");
|
||||
info = fopen("/proc/sys/dev/boot/info", "r");
|
||||
if( !info )
|
||||
{
|
||||
snprintf(buf+off, len-off, "ReadyNAS");
|
||||
return;
|
||||
}
|
||||
while( (val = fgets(ibuf, 64, info)) != NULL )
|
||||
{
|
||||
key = strsep(&val, ": \t");
|
||||
val = trim(val);
|
||||
if( strcmp(key, "model") == 0 )
|
||||
{
|
||||
snprintf(buf+off, len-off, "%s", val);
|
||||
key = strchr(val, ' ');
|
||||
if( key )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user