MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / systemCommand

Function systemCommand

tools/serial2xsbug/serial2xsbug.c:463–478  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

461}
462
463static void systemCommand(char* command, char **buffer){
464 char line[1024];
465 FILE *fp = NULL;
466 char *out = calloc(1, 1);
467
468 fp = popen(command, "r");
469 if (fp){
470 while (fgets(line, sizeof(line)-1, fp) != NULL) {
471 out = realloc(out, strlen(out) + strlen(line));
472 strcat(out, line);
473 }
474 pclose(fp);
475 }
476
477 *buffer = out;
478}
479
480static char* printAddress(char* address){
481 char* commandPart = "/xtensa-lx106-elf-addr2line -aipfC -e ";

Callers 2

printAddressFunction · 0.85
fxReadSerialBufferFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected