mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 00:05:42 +01:00
Ignore errors with -s option
Ignore non-fatal errors when stdin is parsed with -s option.
This commit is contained in:
parent
483d8d65d9
commit
fea8dbf020
1 changed files with 2 additions and 2 deletions
|
@ -1372,7 +1372,7 @@ static int get_enum_item_index(snd_mixer_elem_t *elem, char **ptrp)
|
||||||
static int sset_enum(snd_mixer_elem_t *elem, unsigned int argc, char **argv)
|
static int sset_enum(snd_mixer_elem_t *elem, unsigned int argc, char **argv)
|
||||||
{
|
{
|
||||||
unsigned int idx, chn = 0;
|
unsigned int idx, chn = 0;
|
||||||
int check_flag = -1;
|
int check_flag = ignore_error ? 0 : -1;
|
||||||
|
|
||||||
for (idx = 1; idx < argc; idx++) {
|
for (idx = 1; idx < argc; idx++) {
|
||||||
char *ptr = argv[idx];
|
char *ptr = argv[idx];
|
||||||
|
@ -1396,7 +1396,7 @@ static int sset_channels(snd_mixer_elem_t *elem, unsigned int argc, char **argv)
|
||||||
unsigned int dir = 3, okflag = 3;
|
unsigned int dir = 3, okflag = 3;
|
||||||
unsigned int idx;
|
unsigned int idx;
|
||||||
snd_mixer_selem_channel_id_t chn;
|
snd_mixer_selem_channel_id_t chn;
|
||||||
int check_flag = -1;
|
int check_flag = ignore_error ? 0 : -1;
|
||||||
|
|
||||||
for (idx = 1; idx < argc; idx++) {
|
for (idx = 1; idx < argc; idx++) {
|
||||||
char *ptr = argv[idx], *optr;
|
char *ptr = argv[idx], *optr;
|
||||||
|
|
Loading…
Reference in a new issue