mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user