Search
lxdream.org :: lxdream/src/config.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/config.c
changeset 470:e09a16196693
prev464:8e099fad42a6
next475:49841795db97
author nkeynes
date Sun Oct 28 08:29:29 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change Maintain current gdrom and recently-used list in config file
file annotate diff log raw
1.1 --- a/src/config.c Sat Oct 27 05:44:54 2007 +0000
1.2 +++ b/src/config.c Sun Oct 28 08:29:29 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: config.c,v 1.4 2007-10-27 05:44:53 nkeynes Exp $
1.6 + * $Id: config.c,v 1.5 2007-10-28 08:29:29 nkeynes Exp $
1.7 *
1.8 * User configuration support
1.9 *
1.10 @@ -38,6 +38,7 @@
1.11 { "save path", CONFIG_TYPE_PATH, "save" },
1.12 { "bootstrap", CONFIG_TYPE_FILE, "IP.BIN" },
1.13 { "gdrom", CONFIG_TYPE_FILE, NULL },
1.14 + { "recent", CONFIG_TYPE_FILE, NULL },
1.15 { NULL, CONFIG_TYPE_NONE }};
1.16
1.17 static struct lxdream_config_entry serial_config[] =
1.18 @@ -290,7 +291,9 @@
1.19
1.20 if( entry != NULL ) {
1.21 while( entry->key != NULL ) {
1.22 - fprintf( f, "%s = %s\n", entry->key, entry->value );
1.23 + if( entry->value != NULL ) {
1.24 + fprintf( f, "%s = %s\n", entry->key, entry->value );
1.25 + }
1.26 entry++;
1.27 }
1.28 } else if( strcmp(group->key, "controllers") == 0 ) {
1.29 @@ -305,7 +308,9 @@
1.30 fprintf( f, "Subdevice %d = %s\n", j, dev->device_class->name );
1.31 entry = dev->get_config(dev);
1.32 while( entry->key != NULL ) {
1.33 - fprintf( f, "%*c%s = %s\n", j==0?4:8, ' ',entry->key, entry->value );
1.34 + if( entry->value != NULL ) {
1.35 + fprintf( f, "%*c%s = %s\n", j==0?4:8, ' ',entry->key, entry->value );
1.36 + }
1.37 entry++;
1.38 }
1.39 }
.