patch-2.1.63 linux/drivers/sound/sound_switch.c
Next file: linux/drivers/sound/soundcard.c
Previous file: linux/drivers/sound/sound_config.h
Back to the patch index
Back to the overall index
- Lines: 56
- Date:
Tue Sep 30 08:46:56 1997
- Orig file:
v2.1.62/linux/drivers/sound/sound_switch.c
- Orig date:
Wed May 28 10:51:33 1997
diff -u --recursive --new-file v2.1.62/linux/drivers/sound/sound_switch.c linux/drivers/sound/sound_switch.c
@@ -195,9 +195,6 @@
put_status (" ");
put_status (system_utsname.machine);
put_status ("\n");
-#ifdef MODULE
- put_status ("Driver loaded as a module\n");
-#endif
if (!put_status ("Config options: "))
@@ -511,7 +508,10 @@
return -EBUSY;
status_busy = 1;
if ((status_buf = (char *) vmalloc (4000)) == NULL)
- return -EIO;
+ {
+ status_busy = 0;
+ return -EIO;
+ }
status_len = status_ptr = 0;
init_status ();
break;
@@ -605,12 +605,15 @@
get_mixer_info (int dev, caddr_t arg)
{
mixer_info info;
+ int i;
if (dev < 0 || dev >= num_mixers)
return -ENXIO;
strcpy (info.id, mixer_devs[dev]->id);
- strcpy (info.name, mixer_devs[dev]->name);
+ for (i = 0; i < 32 && mixer_devs[dev]->name; i++)
+ info.name[i] = mixer_devs[dev]->name[i];
+ info.name[i] = 0;
info.modify_counter = mixer_devs[dev]->modify_counter;
memcpy ((&((char *) arg)[0]), (char *) &info, sizeof (info));
@@ -621,12 +624,15 @@
get_old_mixer_info (int dev, caddr_t arg)
{
_old_mixer_info info;
+ int i;
if (dev < 0 || dev >= num_mixers)
return -ENXIO;
strcpy (info.id, mixer_devs[dev]->id);
- strcpy (info.name, mixer_devs[dev]->name);
+ for (i = 0; i < 32 && mixer_devs[dev]->name; i++)
+ info.name[i] = mixer_devs[dev]->name[i];
+ info.name[i] = 0;
memcpy ((&((char *) arg)[0]), (char *) &info, sizeof (info));
return 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov