MCPcopy Create free account
hub / github.com/apache/nuttx / process_kconfigfile

Function process_kconfigfile

tools/kconfig2html.c:2439–2470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2437 ****************************************************************************/
2438
2439static void process_kconfigfile(const char *kconfigdir,
2440 const char *kconfigname)
2441{
2442 FILE *stream;
2443 char *kconfigpath;
2444
2445 /* Create the full path to the Kconfig file */
2446
2447 asprintf(&kconfigpath, "%s/%s", kconfigdir, kconfigname);
2448 debug("process_kconfigfile: Entry\n");
2449 debug(" kconfigdir: %s\n", kconfigdir);
2450 debug(" kconfigpath: %s\n", kconfigpath);
2451 debug(" level: %d\n", g_level);
2452
2453 /* Open the Kconfig file */
2454
2455 stream = fopen(kconfigpath, "r");
2456 if (!stream)
2457 {
2458 error("open %s failed: %s\n", kconfigpath, strerror(errno));
2459 exit(ERROR_KCONFIG_OPEN_FAILURE);
2460 }
2461
2462 /* Process each line in the Kconfig file */
2463
2464 parse_kconfigfile(stream, kconfigdir, kconfigname);
2465
2466 /* Close the Kconfig file and release the memory holding the full path */
2467
2468 fclose(stream);
2469 free(kconfigpath);
2470}
2471
2472/****************************************************************************
2473 * Public Functions

Callers 2

parse_kconfigfileFunction · 0.85
mainFunction · 0.85

Calls 9

asprintfFunction · 0.85
fopenFunction · 0.85
errorFunction · 0.85
strerrorFunction · 0.85
exitFunction · 0.85
parse_kconfigfileFunction · 0.85
fcloseFunction · 0.85
debugFunction · 0.70
freeFunction · 0.50

Tested by

no test coverage detected