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

Function copy_optional

tools/configure.c:1289–1311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1287}
1288
1289static void copy_optional(void)
1290{
1291 int i;
1292
1293 for (i = 0; i < N_OPTFILES; i++)
1294 {
1295 snprintf(g_buffer, BUFFER_SIZE, "%s%c%s",
1296 g_configpath, g_delim, g_optfiles[i]);
1297
1298 if (verify_file(g_buffer))
1299 {
1300 char *optsrc = strdup(g_buffer);
1301
1302 snprintf(g_buffer, BUFFER_SIZE, "%s%c%s",
1303 g_topdir, g_delim, g_optfiles[i]);
1304
1305 debug("copy_optional: Copying from %s to %s\n", optsrc, g_buffer);
1306 copy_file(optsrc, g_buffer, 0644);
1307
1308 free(optsrc);
1309 }
1310 }
1311}
1312
1313static void enable_feature(const char *destconfig, const char *varname)
1314{

Callers 1

configureFunction · 0.85

Calls 6

verify_fileFunction · 0.85
strdupFunction · 0.85
debugFunction · 0.70
copy_fileFunction · 0.70
snprintfFunction · 0.50
freeFunction · 0.50

Tested by

no test coverage detected