-
-extern struct sr_context *sr_ctx;
-extern gchar *opt_drv;
-extern gchar *opt_probe_group;
-
-/* Convert driver options hash to GSList of struct sr_config. */
-static GSList *hash_to_hwopt(GHashTable *hash)
-{
- struct sr_config *src;
- GList *gl, *keys;
- GSList *opts;
- char *key;
-
- keys = g_hash_table_get_keys(hash);
- opts = NULL;
- for (gl = keys; gl; gl = gl->next) {
- key = gl->data;
- src = g_malloc(sizeof(struct sr_config));
- if (opt_to_gvar(key, g_hash_table_lookup(hash, key), src) != 0)
- return NULL;
- opts = g_slist_append(opts, src);
- }
- g_list_free(keys);
-
- return opts;
-}