MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / apfs_fprintf

Function apfs_fprintf

libraries/AP_Filesystem/posix_compat.cpp:86–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86int apfs_fprintf(APFS_FILE *stream, const char *fmt, ...)
87{
88 CHECK_STREAM(stream, -1);
89 va_list va;
90 char* buf = NULL;
91 int16_t len;
92 va_start(va, fmt);
93 len = vasprintf(&buf, fmt, va);
94 va_end(va);
95 if (len > 0) {
96 len = AP::FS().write(stream->fd, buf, len);
97 free(buf);
98 }
99
100 return len;
101}
102
103int apfs_fflush(APFS_FILE *stream)
104{

Callers

nothing calls this directly

Calls 3

vasprintfFunction · 0.85
freeFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected