util/spkmodem-recv: don't exit in print_stats

i treated ftell errors as fatal, but if fttell fails
with ESPIPE, and someone's using -d, the program may
exit immediately, even though there's no problem.

instead, skip printing the offset (basically no debug).

this fixes a bug that i introduced myself, when i forked
this code, because i added that error check; the GNU
code didn't have any check whatsoever.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-12 05:13:44 +00:00
parent 9ac0331595
commit 59f04eba9e
+8 -2
View File
@@ -239,8 +239,14 @@ print_stats(struct decoder_state *st)
long pos;
pos = ftell(stdin);
if (pos == -1)
err(errno, "ftell");
if (pos == -1) {
printf("%d %d %d\n",
st->freq_data,
st->freq_separator,
FREQ_DATA_THRESHOLD);
return;
}
printf("%d %d %d @%ld\n",
st->freq_data,