MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / srd_decoder_load_all_path

Function srd_decoder_load_all_path

libsigrokdecode4DSL/decoder.c:1103–1126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1101}
1102
1103static void srd_decoder_load_all_path(char *path)
1104{
1105 GDir *dir;
1106 const gchar *direntry;
1107
1108 assert(path);
1109
1110 if (!(dir = g_dir_open(path, 0, NULL))) {
1111 /* Not really fatal. Try zipimport method too. */
1112 srd_decoder_load_all_zip_path(path);
1113 return;
1114 }
1115
1116 /*
1117 * This ignores errors returned by srd_decoder_load(). That
1118 * function will have logged the cause, but in any case we
1119 * want to continue anyway.
1120 */
1121 while ((direntry = g_dir_read_name(dir)) != NULL) {
1122 /* The directory name is the module name (e.g. "i2c"). */
1123 srd_decoder_load(direntry);
1124 }
1125 g_dir_close(dir);
1126}
1127
1128/**
1129 * Load all installed protocol decoders.

Callers 1

srd_decoder_load_allFunction · 0.85

Calls 2

srd_decoder_loadFunction · 0.85

Tested by

no test coverage detected