View | Details | Raw Unified | Return to bug 62077
Collapse All | Expand All

(-)mixer/mixer.8 (+3 lines)
Line 90 Link Here
91
The argument 
92
.Ar dev
93
may be abbreviated to its shortest non-ambigious form.
(-)mixer/mixer.c (-5 / +9 lines)
Line 62 Link Here
62
	int foo;
62
	int device, i, matches;
Lines 64-66 Link Here
64
	for (foo = 0; foo < SOUND_MIXER_NRDEVICES; foo++)
64
	matches = 0;
65
		if ((1 << foo) & mask && !strcmp(names[foo], name))
65
	for (i = 0; i < SOUND_MIXER_NRDEVICES; i++)
66
			break;
66
		if ((1 << i) & mask
67
				&& !strncmp(names[i], name, strlen(name))) {
68
			device = i;
69
			matches++;
70
		}
Line 68 Link Here
68
	return foo == SOUND_MIXER_NRDEVICES ? -1 : foo;
72
	return (matches == 1 ? device : -1);

Return to bug 62077