mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
Added missing diagnostics
This commit is contained in:
parent
3260487fe2
commit
b0cd1da822
18 changed files with 321 additions and 116 deletions
|
@ -48,14 +48,14 @@ int snd_seq_open(snd_seq_t **seqp, char *name,
|
|||
return -ENOENT;
|
||||
}
|
||||
if (snd_config_type(seq_conf) != SND_CONFIG_TYPE_COMPOUND) {
|
||||
ERR("Invalid type for SEQ definition");
|
||||
ERR("Invalid type for SEQ %s definition", name);
|
||||
return -EINVAL;
|
||||
}
|
||||
err = snd_config_search(seq_conf, "streams", &conf);
|
||||
if (err >= 0) {
|
||||
err = snd_config_string_get(conf, &str);
|
||||
if (err < 0) {
|
||||
ERR("Invalid type for streams");
|
||||
ERR("Invalid type for %s", conf->id);
|
||||
return err;
|
||||
}
|
||||
if (strcmp(str, "output") == 0) {
|
||||
|
@ -68,7 +68,7 @@ int snd_seq_open(snd_seq_t **seqp, char *name,
|
|||
if (streams != SND_SEQ_OPEN_DUPLEX)
|
||||
return -EINVAL;
|
||||
} else {
|
||||
ERR("Invalid value for streams");
|
||||
ERR("Invalid value for %s", conf->id);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ int snd_seq_open(snd_seq_t **seqp, char *name,
|
|||
}
|
||||
err = snd_config_string_get(conf, &str);
|
||||
if (err < 0) {
|
||||
ERR("Invalid type for type");
|
||||
ERR("Invalid type for %s", conf->id);
|
||||
return err;
|
||||
}
|
||||
err = snd_config_searchv(snd_config, &type_conf, "seqtype", str, 0);
|
||||
|
@ -94,7 +94,7 @@ int snd_seq_open(snd_seq_t **seqp, char *name,
|
|||
if (strcmp(n->id, "lib") == 0) {
|
||||
err = snd_config_string_get(n, &lib);
|
||||
if (err < 0) {
|
||||
ERR("Invalid type for lib");
|
||||
ERR("Invalid type for %s", n->id);
|
||||
return -EINVAL;
|
||||
}
|
||||
continue;
|
||||
|
@ -102,11 +102,11 @@ int snd_seq_open(snd_seq_t **seqp, char *name,
|
|||
if (strcmp(n->id, "open") == 0) {
|
||||
err = snd_config_string_get(n, &open);
|
||||
if (err < 0) {
|
||||
ERR("Invalid type for open");
|
||||
ERR("Invalid type for %s", n->id);
|
||||
return -EINVAL;
|
||||
}
|
||||
continue;
|
||||
ERR("Unknown field: %s", n->id);
|
||||
ERR("Unknown field %s", n->id);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue