Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/azatoth/minidlna.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Maggard <jmaggard@users.sourceforge.net>2011-02-18 03:00:16 +0300
committerJustin Maggard <jmaggard@users.sourceforge.net>2011-02-18 03:00:16 +0300
commit6fd118a998f840b22d3596688b2ec627fc8e85a5 (patch)
treea908976c638eaf0126634db65fde18f95ca7e665
parent518f9654e932c4d794891ae01be03d475781c997 (diff)
* Finish up the friendly name on ReadyNAS.
-rw-r--r--minidlna.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/minidlna.c b/minidlna.c
index a98234e..72835ee 100644
--- a/minidlna.c
+++ b/minidlna.c
@@ -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 )
{