diff options
author | Justin Maggard <jmaggard@users.sourceforge.net> | 2011-02-18 03:00:16 +0300 |
---|---|---|
committer | Justin Maggard <jmaggard@users.sourceforge.net> | 2011-02-18 03:00:16 +0300 |
commit | 6fd118a998f840b22d3596688b2ec627fc8e85a5 (patch) | |
tree | a908976c638eaf0126634db65fde18f95ca7e665 | |
parent | 518f9654e932c4d794891ae01be03d475781c997 (diff) |
* Finish up the friendly name on ReadyNAS.
-rw-r--r-- | minidlna.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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 ) { |