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

Function enable_feature

tools/configure.c:1313–1333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1311}
1312
1313static void enable_feature(const char *destconfig, const char *varname)
1314{
1315 int ret;
1316
1317 snprintf(g_buffer, BUFFER_SIZE,
1318 "kconfig-tweak --file %s --enable %s",
1319 destconfig, varname);
1320
1321 ret = system(g_buffer);
1322
1323#ifdef WEXITSTATUS
1324 if (ret < 0 || WEXITSTATUS(ret) != 0)
1325#else
1326 if (ret < 0)
1327#endif
1328 {
1329 fprintf(stderr, "ERROR: Failed to enable %s\n", varname);
1330 fprintf(stderr, " command: %s\n", g_buffer);
1331 exit(EXIT_FAILURE);
1332 }
1333}
1334
1335static void disable_feature(const char *destconfig, const char *varname)
1336{

Callers 1

set_hostFunction · 0.85

Calls 3

fprintfFunction · 0.85
exitFunction · 0.85
snprintfFunction · 0.50

Tested by

no test coverage detected