Skip to content

Commit

Permalink
fix: printing foe read/write counter
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-burger committed Sep 24, 2024
1 parent 231ca58 commit bdf058a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tools/foe_tool/foe_tool.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ void no_verbose_log(int lvl, void *user, const char *format, ...) {

va_list ap;
va_start(ap, format);
if ( (strstr(format, "sending file offset") != NULL) ||
(strstr(format, "retrieving file offset") != NULL) )
vsnprintf(&message[1], 511, format, ap);

if ( (strstr(&message[1], "sending file offset") != NULL) ||
(strstr(&message[1], "retrieving file offset") != NULL) )
{
vsnprintf(&message[1], 511, format, ap);
message[0] = '\r';
message[strlen(message)-1] = '\0';
fprintf(stderr, "%s", message);
Expand All @@ -86,6 +87,7 @@ void no_verbose_log(int lvl, void *user, const char *format, ...) {
fprintf(stderr, "\n");
}

va_start(ap, format);
vfprintf(stderr, format, ap);
}
va_end(ap);
Expand Down

0 comments on commit bdf058a

Please sign in to comment.