Update of /cvsroot/alsa/alsa-utils/alsactl In directory sc8-pr-cvs1:/tmp/cvs-serv2828
Modified Files: alsactl.c Log Message: - search cardX entry if no card is found and -F option is given (i.e. force to read the old-style entry). Index: alsactl.c =================================================================== RCS file: /cvsroot/alsa/alsa-utils/alsactl/alsactl.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- alsactl.c 1 Apr 2003 15:51:16 -0000 1.52 +++ alsactl.c 20 Jun 2003 18:09:49 -0000 1.53 @@ -972,7 +972,7 @@ snd_config_t *control; snd_config_iterator_t i, next; int err; - char name[32]; + char name[32], tmpid[16]; const char *id; snd_ctl_card_info_alloca(&info); @@ -990,9 +990,18 @@ id = snd_ctl_card_info_get_id(info); err = snd_config_searchv(top, &control, "state", id, "control", 0); if (err < 0) { - err = 0; - fprintf(stderr, "No state is present for card %s\n", id); - goto _close; + if (force_restore) { + sprintf(tmpid, "card%d", card); + err = snd_config_searchv(top, &control, "state", tmpid, "control", 0); + if (! err) + id = tmpid; + } + if (err < 0) { + err = 0; + fprintf(stderr, "No state is present for card %s\n", id); + goto _close; + } + id = tmpid; } if (snd_config_get_type(control) != SND_CONFIG_TYPE_COMPOUND) { error("state.%s.control is not a compound\n", id); ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog