With the conditional blocks, it may be useful to terminate
the hardware detection from the configuration. Introduce
'Error' keyword for the master UCM configuration file.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
return 0;
}
+/*
+ * Handle 'Error' configuration node.
+ */
+static int error_node(snd_use_case_mgr_t *uc_mgr, snd_config_t *cfg)
+{
+ int err;
+ char *s;
+
+ err = parse_string_substitute3(uc_mgr, cfg, &s);
+ if (err < 0) {
+ uc_error("error: failed to get Error string");
+ return err;
+ }
+ uc_error("%s", s);
+ free(s);
+ return -ENXIO;
+}
+
/*
* Evaluate variable regex definitions (in-place delete)
*/
continue;
}
+ /* error */
+ if (strcmp(id, "Error") == 0)
+ return error_node(uc_mgr, n);
+
uc_error("uknown master file field %s", id);
}
return 0;