]> git.tue.mpg.de Git - paraslash.git/commitdiff
Consolidate EOF error codes.
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 30 Dec 2022 14:08:59 +0000 (15:08 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 11 Mar 2023 18:16:46 +0000 (19:16 +0100)
Currently we have ~15 error codes which indicate an EOF condition. One
should suffice, so drop all codes except the generic E_EOF and use
that everywhere.

25 files changed:
afh_recv.c
alsa_write.c
amp_filter.c
ao_write.c
audioc.c
buffer_tree.c
client.c
client_common.c
compress_filter.c
error.h
fecdec_filter.c
flacdec_filter.c
interactive.c
mp3dec_filter.c
oggdec_filter.c
opusdec_filter.c
oss_write.c
play.c
resample_filter.c
sched.c
sync_filter.c
udp_recv.c
wav_filter.c
wmadec_filter.c
write.c

index eebac67f9c80a270cd91337190ed9ad1eb569898..8449e787f96fa24b60c2c3af9ec5218eb264ff53 100644 (file)
@@ -205,7 +205,7 @@ static int afh_recv_post_monitor(__a_unused struct sched *s, void *context)
                        PARA_DEBUG_LOG("adding %u bytes\n", len);
                        btr_add_output_dont_free(start, len, btrn);
                }
-               ret = -E_RECV_EOF;
+               ret = -E_EOF;
                goto out;
        }
        if (pard->current_chunk == pard->first_chunk)
@@ -226,7 +226,7 @@ static int afh_recv_post_monitor(__a_unused struct sched *s, void *context)
        PARA_DEBUG_LOG("adding chunk %u\n", pard->current_chunk);
        btr_add_output_dont_free(start, len, btrn);
        if (pard->current_chunk >= pard->last_chunk) {
-               ret = -E_RECV_EOF;
+               ret = -E_EOF;
                goto out;
        }
        pard->current_chunk++;
index 92d6cb703b7a4911d0b5aa61282f703ce0bb490c..53d7b1b454932c36b3e578d794d688cee6cf7270 100644 (file)
@@ -277,7 +277,7 @@ again:
        bytes = btr_next_buffer(btrn, &data);
        if (ret < 0 || bytes < wn->min_iqs) { /* eof */
                assert(btr_no_parent(btrn));
-               ret = -E_WRITE_COMMON_EOF;
+               ret = -E_EOF;
                if (!pad)
                        goto err;
                /* wait until pending frames are played */
index 360e3fc2d7429bb7aa8219248ff4d38505a86ac2..be69ad67a8d78d419f3147546785130e42c7b80b 100644 (file)
@@ -67,7 +67,7 @@ next_buffer:
        in_bytes = btr_next_buffer(btrn, (char **)&in);
        len = in_bytes / 2;
        if (len == 0) { /* eof and in_bytes == 1 */
-               ret = -E_AMP_EOF;
+               ret = -E_EOF;
                goto err;
        }
 
index 950f8f73808e0b6528c0b73a2a43da58ec17f4ee..43a58dd6d5a364f2370659608302e6c7d9f24324 100644 (file)
@@ -266,7 +266,7 @@ static void *aow_play(void *priv)
                                if (frames > 0)
                                        break;
                                /* eof and less than a single frame available */
-                               ret = -E_WRITE_COMMON_EOF;
+                               ret = -E_EOF;
                                goto fail;
                        }
                        /*
@@ -388,7 +388,7 @@ static int aow_post_monitor(__a_unused struct sched *s, void *context)
        if (!wn->btrn) {
                if (!pawd->thread_btrn) {
                        pthread_join(pawd->thread, NULL);
-                       return -E_AO_EOF;
+                       return -E_EOF;
                }
                PARA_INFO_LOG("waiting for play thread to terminate\n");
                return 0;
index d6c14cbcf7245a3a7db4bb3f86cf7e35efb8384b..f2e4cb91de228dcd78cae534e08d76e8514b6d88 100644 (file)
--- a/audioc.c
+++ b/audioc.c
@@ -175,7 +175,7 @@ static int audioc_post_monitor(struct sched *s, void *context)
        ret = recv_bin_buffer(at->fd, buf, bufsize);
        PARA_DEBUG_LOG("recv: %d\n", ret);
        if (ret == 0)
-               ret = -E_AUDIOC_EOF;
+               ret = -E_EOF;
        if (ret < 0)
                goto out;
        btr_add_output(buf, ret, at->btrn);
index 05cdfa83630004e49561f0c7bef0138bd0a35c27..35353f56c9f69cb99be6bb6a319f680876d4a9cc 100644 (file)
@@ -1208,7 +1208,7 @@ int btr_node_status(struct btr_node *btrn, size_t min_iqs,
        if (type != BTR_NT_LEAF && btr_no_children(btrn))
                return -E_BTR_NO_CHILD;
        if (type != BTR_NT_ROOT && btr_eof(btrn))
-               return -E_BTR_EOF;
+               return -E_EOF;
 
        if (btr_get_output_queue_size(btrn) > BTRN_MAX_PENDING)
                return 0;
index a6aee0f8b9afc79439032db3695ba9c82bb594a1..84b7580cf9554c433651da1f3eed28a6f1f39a74 100644 (file)
--- a/client.c
+++ b/client.c
@@ -666,8 +666,6 @@ int main(int argc, char *argv[])
                        /* these are not errors */
                        case -E_SERVER_CMD_SUCCESS:
                        case -E_EOF:
-                       case -E_SERVER_EOF:
-                       case -E_BTR_EOF:
                                ret = 0;
                                break;
                        default: ret = -E_SERVER_CMD_FAILURE;
index 95e59fd29de2015fcc65443a4ffc6442387ec0f8..2a6b47d6b2b095daadf05659eafd52abfb218b35 100644 (file)
@@ -398,12 +398,12 @@ static int client_post_monitor(struct sched *s, void *context)
                        char *buf2;
                        size_t sz;
                        ret = btr_node_status(ct->btrn[1], 0, BTR_NT_LEAF);
-                       if (ret == -E_BTR_EOF) {
+                       if (ret == -E_EOF) {
                                /* empty blob data packet indicates EOF */
                                PARA_INFO_LOG("blob sent\n");
                                ret = send_sb(ct, 1, NULL, 0, SBD_BLOB_DATA, true);
                                if (ret >= 0)
-                                       ret = -E_BTR_EOF;
+                                       ret = -E_EOF;
                        }
                        if (ret < 0)
                                goto close1;
index a6a001919acc5038039d5de0b0590a265052e978..1bce35f53f9ef3411a57bc6ea4564df6eea419b7 100644 (file)
@@ -59,7 +59,7 @@ next_buffer:
        btr_merge(btrn, fn->min_iqs);
        length = btr_next_buffer(btrn, &inbuf) & ~(size_t)1;
        if (length == 0) { /* eof and 1 byte available */
-               ret = -E_COMPRESS_EOF;
+               ret = -E_EOF;
                goto err;
        }
        ip = (int16_t *)inbuf;
diff --git a/error.h b/error.h
index 0e815444b821b6e5d7796a478a5fc209fd623c01..94f315ce9948c2a042c3014c5b5c334af1129da8 100644 (file)
--- a/error.h
+++ b/error.h
        PARA_ERROR(ALSA_MIX_OPEN, "could not open mixer"), \
        PARA_ERROR(ALSA_MIX_RANGE, "value control element out of range"), \
        PARA_ERROR(ALSA_MIX_SET_VAL, "could not set control element state"), \
-       PARA_ERROR(AMP_EOF, "amp: end of file"), \
        PARA_ERROR(AMP_ZERO_AMP, "no amplification necessary"), \
        PARA_ERROR(AO_APPEND_OPTION, "ao append option: memory allocation failure"), \
        PARA_ERROR(AO_BAD_DRIVER, "ao: invalid driver"), \
        PARA_ERROR(AO_BAD_OPTION, "ao option is not of type key:value"), \
        PARA_ERROR(AO_DEFAULT_DRIVER, "ao: no usable output device"), \
-       PARA_ERROR(AO_EOF, "ao: end of file"), \
        PARA_ERROR(AO_FILE_NOT_SUPP, "ao: file io drivers not supported"), \
        PARA_ERROR(AO_OPEN_LIVE, "ao: could not open audio device"), \
        PARA_ERROR(AO_PLAY, "ao_play() failed"), \
@@ -36,7 +34,6 @@
        PARA_ERROR(ATOI_OVERFLOW, "value too large"), \
        PARA_ERROR(ATTR_SYNTAX, "attribute syntax error"), \
        PARA_ERROR(ATT_TABLE_FULL, "no more space left in attribute table"), \
-       PARA_ERROR(AUDIOC_EOF, "audioc: end of file"), \
        PARA_ERROR(AUDIOD_OFF, "audiod switched off"), \
        PARA_ERROR(AUDIOD_SIGNAL, "caught deadly signal"), \
        PARA_ERROR(AUDIOD_TERM, "terminating on user request"), \
@@ -65,7 +62,6 @@
        PARA_ERROR(BIGNUM, "bignum error"), \
        PARA_ERROR(BLINDING, "failed to activate key blinding"), \
        PARA_ERROR(BLOB_SYNTAX, "blob syntax error"), \
-       PARA_ERROR(BTR_EOF, "buffer tree: end of file"), \
        PARA_ERROR(BTR_NAVAIL, "btr node: value currently unavailable"), \
        PARA_ERROR(BTR_NO_CHILD, "btr node has no children"), \
        PARA_ERROR(CHILD_CONTEXT, "now running in child context"), \
@@ -73,7 +69,6 @@
        PARA_ERROR(CLIENT_SYNTAX, "syntax error"), \
        PARA_ERROR(CLIENT_WRITE, "client write error"), \
        PARA_ERROR(COMMAND_SYNTAX, "syntax error in command"), \
-       PARA_ERROR(COMPRESS_EOF, "compress: end of file"), \
        PARA_ERROR(CREATE_OPUS_DECODER, "could not create opus decoder"), \
        PARA_ERROR(DCCP_OVERRUN, "dccp output buffer buffer overrun"), \
        PARA_ERROR(DECRYPT, "decrypt error"), \
@@ -84,7 +79,6 @@
        PARA_ERROR(EOF, "end of file"), \
        PARA_ERROR(EOP, "end of playlist"), \
        PARA_ERROR(FEC_BAD_IDX, "invalid index vector"), \
-       PARA_ERROR(FECDEC_EOF, "received eof packet"), \
        PARA_ERROR(FECDEC_OVERRUN, "fecdec output buffer overrun"), \
        PARA_ERROR(FEC_PARMS, "invalid fec parameters"), \
        PARA_ERROR(FEC_PIVOT, "pivot column not found"), \
@@ -97,7 +91,6 @@
        PARA_ERROR(FLAC_CHAIN_READ, "could not read meta chain"), \
        PARA_ERROR(FLACDEC_DECODER_ALLOC, "could not allocate stream decoder"), \
        PARA_ERROR(FLACDEC_DECODER_INIT, "could not init stream decoder"), \
-       PARA_ERROR(FLACDEC_EOF, "flacdec encountered end of file condition"), \
        PARA_ERROR(FLAC_DECODE_POS, "could not get decode position"), \
        PARA_ERROR(FLAC_ITER_ALLOC, "could not allocate meta iterator"), \
        PARA_ERROR(FLAC_REPLACE_COMMENT, "could not replace vorbis comment"), \
        PARA_ERROR(HEADER_BITRATE, "invalid header bitrate"), \
        PARA_ERROR(HEADER_FREQ, "invalid header frequency"), \
        PARA_ERROR(HTTP_RECV_OVERRUN, "http_recv: output buffer overrun"), \
-       PARA_ERROR(I9E_EOF, "end of input"), \
        PARA_ERROR(I9E_SETUPTERM, "failed to set up terminal"), \
        PARA_ERROR(I9E_TERM_RQ, "received termination request"), \
        PARA_ERROR(ID3_ATTACH, "could not attach id3 frame"), \
        PARA_ERROR(MISSING_COLON, "syntax error: missing colon"), \
        PARA_ERROR(MOOD_PARSE, "mood parse error"), \
        PARA_ERROR(MP3DEC_CORRUPT, "too many corrupt frames"), \
-       PARA_ERROR(MP3DEC_EOF, "mp3dec: end of file"), \
        PARA_ERROR(MP3_INFO, "could not read mp3 info"), \
        PARA_ERROR(MP4_READ, "mp4: read error or unexpected end of file"), \
        PARA_ERROR(MP4_CORRUPT, "invalid/corrupt mp4 file"), \
        PARA_ERROR(PRIVATE_KEY, "can not read private key"), \
        PARA_ERROR(QUEUE, "packet queue overrun"), \
        PARA_ERROR(READ_PATTERN, "did not read expected pattern"), \
-       PARA_ERROR(RECV_EOF, "end of file"), \
        PARA_ERROR(RECVMSG, "recvmsg() failed"), \
        PARA_ERROR(REGEX, "regular expression error"), \
-       PARA_ERROR(RESAMPLE_EOF, "resample filter: end of file"), \
        PARA_ERROR(RSA, "RSA error"), \
        PARA_ERROR(RSA_DECODE, "RSA decoding error"), \
        PARA_ERROR(SB_PACKET_SIZE, "invalid sideband packet size or protocol error"), \
        PARA_ERROR(SERVER_CMD_FAILURE, "command failed"), \
        PARA_ERROR(SERVER_CMD_SUCCESS, "command terminated successfully"), \
        PARA_ERROR(SERVER_CRASH, "para_server crashed -- can not live without it"), \
-       PARA_ERROR(SERVER_EOF, "connection closed by para_server"), \
        PARA_ERROR(SEXP_BUILD, "could not build S-expression"), \
        PARA_ERROR(SEXP_DECRYPT, "could not decrypt S-expression"), \
        PARA_ERROR(SEXP_ENCRYPT, "could not encrypt S-expression"), \
        PARA_ERROR(VORBIS_COMMENTHEADER, "could not create vorbis comment header"), \
        PARA_ERROR(VORBIS, "vorbis synthesis header-in error (not vorbis?)"), \
        PARA_ERROR(WAV_BAD_FC, "invalid filter configuration"), \
-       PARA_ERROR(WAV_EOF, "wav filter: end of file"), \
        PARA_ERROR(WAV_SUCCESS, "successfully wrote wav header"), \
        PARA_ERROR(WMA_BAD_PARAMS, "invalid WMA parameters"), \
        PARA_ERROR(WMA_BAD_SUPERFRAME, "invalid superframe"), \
        PARA_ERROR(WMA_BLOCK_SIZE, "invalid block size"), \
-       PARA_ERROR(WMADEC_EOF, "wmadec: end of file"), \
        PARA_ERROR(WMA_NO_GUID, "audio stream guid not found"), \
        PARA_ERROR(WMA_OUTPUT_SPACE, "insufficient output space"), \
-       PARA_ERROR(WRITE_COMMON_EOF, "end of file"), \
 
 /**
  * This is temporarily defined to expand to its first argument (prefixed by
index 1d8fbc16db71094d4f81b2c8c6bb88014087582c..375f4c0afb244b52e5d7b437a6b612c3da9d7f5b 100644 (file)
@@ -360,7 +360,7 @@ static int read_fec_header(char *buf, size_t len, struct fec_header *h)
        h->bos = read_u8(buf + 22);
        h->header_stream = read_u8(buf + 23);
        if (!memcmp(buf, FEC_EOF_PACKET, FEC_EOF_PACKET_LEN))
-               return -E_FECDEC_EOF;
+               return -E_EOF;
 //     PARA_DEBUG_LOG("group %u, slize %u, slices per group: %u\n",
 //             h->group_num, h->slice_num, h->slices_per_group);
        return 1;
index f3060f5721c1c22753cceb4229ee4dbe178dbf52..fb8ebf15d1ec664e39923c58515a3704441ab0da 100644 (file)
@@ -232,7 +232,7 @@ static int flacdec_post_monitor(__a_unused struct sched *s, void *context)
        if (output_queue_full(btrn))
                return 0;
        ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
-       if (ret < 0 && ret != -E_BTR_EOF) /* fatal error */
+       if (ret < 0 && ret != -E_EOF) /* fatal error */
                goto out;
        if (ret <= 0 && !pfd->have_more) /* nothing to do */
                goto out;
@@ -248,7 +248,7 @@ static int flacdec_post_monitor(__a_unused struct sched *s, void *context)
        pfd->have_more = false;
        FLAC__stream_decoder_process_single(pfd->decoder);
        state = FLAC__stream_decoder_get_state(pfd->decoder);
-       ret = -E_FLACDEC_EOF;
+       ret = -E_EOF;
        if (state == FLAC__STREAM_DECODER_END_OF_STREAM)
                goto out;
        if (state == FLAC__STREAM_DECODER_ABORTED) {
index e367a65920c53982af55436d7b96ea53138408f8..1376cf1d72739b3f7c9c3218dd96666a5d475812 100644 (file)
@@ -287,7 +287,7 @@ static int i9e_post_monitor(__a_unused struct sched *s, __a_unused void *context
        char *buf;
        size_t sz, consumed = 0;
 
-       ret = -E_I9E_EOF;
+       ret = -E_EOF;
        if (i9ep->input_eof)
                goto rm_btrn;
        ret = -E_I9E_TERM_RQ;
@@ -306,7 +306,7 @@ static int i9e_post_monitor(__a_unused struct sched *s, __a_unused void *context
                                        goto rm_btrn;
                                }
                                if (ret == 0) {
-                                       ret = -E_I9E_EOF;
+                                       ret = -E_EOF;
                                        goto rm_btrn;
                                }
                                buf[1] = '\0';
index bc8ccdaa99be724530372a03b71544abeece480b..d40df85edbe24b9dc54f01fc9305a1575c022507 100644 (file)
@@ -105,7 +105,7 @@ next_frame:
                mp3dec_consume(btrn, &pmd->stream, len);
                if (pmd->stream.error == MAD_ERROR_BUFLEN) {
                        if (len == iqs && btr_no_parent(btrn)) {
-                               ret = -E_MP3DEC_EOF;
+                               ret = -E_EOF;
                                goto err;
                        }
                        fn->min_iqs += 100;
@@ -127,7 +127,7 @@ decode:
                        goto err;
                mad_stream_sync(&pmd->stream);
                if (pmd->stream.error == MAD_ERROR_BUFLEN) {
-                       ret = -E_MP3DEC_EOF;
+                       ret = -E_EOF;
                        if (len == iqs && btr_no_parent(btrn))
                                goto err;
                        fn->min_iqs += 100;
index da70d4c04a2e2ec2dce8b955a5430442cd912519..b1aec4bc2c4cb0049ed942d3b7e7708b2de84688 100644 (file)
@@ -211,7 +211,7 @@ static int ogg_post_monitor(__a_unused struct sched *s, void *context)
 
        ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
        if (ret < 0) {
-               if (ret != -E_BTR_EOF) /* fatal error */
+               if (ret != -E_EOF) /* fatal error */
                        goto out;
                if (fn->min_iqs == 0 && !pod->have_more) /* EOF */
                        goto out;
index 85287be0c813d4899b2f802735f2684338ea420c..f36990faf43a4110c8e7f7dc2f822f5a8e09046c 100644 (file)
@@ -217,7 +217,7 @@ static int opusdec_post_monitor(__a_unused struct sched *s, void *context)
 
        ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
        if (ret < 0) {
-               if (ret != -E_BTR_EOF) /* fatal error */
+               if (ret != -E_EOF) /* fatal error */
                        goto out;
                if (!ctx->have_more) /* EOF */
                        goto out;
index 96d7b1871a941bff1662ae2a9512b85c79e7b4b9..4ea85afa73f45023c8f22ffe54e875343ea3d13e 100644 (file)
@@ -218,7 +218,7 @@ static int oss_post_monitor(__a_unused struct sched *s, void *context)
        bytes = btr_next_buffer(btrn, &data);
        frames = bytes / powd->bytes_per_frame;
        if (!frames) { /* eof and less than a single frame available */
-               ret = -E_WRITE_COMMON_EOF;
+               ret = -E_EOF;
                goto out;
        }
        ret = 0;
diff --git a/play.c b/play.c
index 8ee91504ffa6181030ababe8335d29b5dd7987fd..4024c8ea4fa5468ff81059f89e732df29dd5fbbf 100644 (file)
--- a/play.c
+++ b/play.c
@@ -230,8 +230,7 @@ static int get_playback_error(void)
                return 0;
        if (task_status(pt->rn.task) >= 0)
                return 0;
-       if (err == -E_BTR_EOF || err == -E_RECV_EOF || err == -E_EOF
-                       || err == -E_WRITE_COMMON_EOF)
+       if (err == -E_EOF)
                return 1;
        return err;
 }
index bf28e975de2720f001be95ee06b269a1a8ecdd2c..72cb3f62ea766ee7ed94e3a68ed5a17591f2f133 100644 (file)
@@ -220,7 +220,7 @@ static int resample_post_monitor(__a_unused struct sched *s, void *context)
        }
        btr_merge(btrn, fn->min_iqs);
        in_bytes = btr_next_buffer(btrn, (char **)&in);
-       ret = -E_RESAMPLE_EOF;
+       ret = -E_EOF;
        num_frames = in_bytes / 2 / ctx->channels;
        if (num_frames == 0)
                goto out;
diff --git a/sched.c b/sched.c
index 07703f929d15d197eda41897b6c7317f9a751750..20822038b81aff04d8ee8c21f7f8d7773831ca37 100644 (file)
--- a/sched.c
+++ b/sched.c
@@ -179,7 +179,7 @@ int task_reap(struct task **tptr)
        if (t->status >= 0)
                return 0;
        ret = t->status;
-       PARA_INFO_LOG("reaping %s (%s)\n", t->name, para_strerror(-ret));
+       PARA_INFO_LOG("reaping %s: %s\n", t->name, para_strerror(-ret));
        /*
         * With list_for_each_entry_safe() it is only safe to remove the
         * _current_ list item. Since we are being called from the loop in
index b4710f6704ce7a4fbd03567d806ce633df164008..20db1b1d1136066a7a12b88b0f4b8cc539daea62 100644 (file)
@@ -365,7 +365,7 @@ success:
        ret = -E_SYNC_COMPLETE; /* success */
        goto out;
 fail:
-       if (ret != -E_BTR_EOF)
+       if (ret != -E_EOF)
                PARA_WARNING_LOG("%s\n", para_strerror(-ret));
 out:
        sync_close_buddies(ctx);
index 365b6863087ca78c1bdc446099ff7f17c8b15c6c..f98a9664aec2d1ee3d8129e70442468423fa79a8 100644 (file)
@@ -40,14 +40,14 @@ static int udp_check_eof(size_t sz, struct iovec iov[2])
                if (memcmp(iov[0].iov_base, FEC_EOF_PACKET,
                                FEC_EOF_PACKET_LEN) != 0)
                        return 0;
-               return -E_RECV_EOF;
+               return -E_EOF;
        }
        if (memcmp(iov[0].iov_base, FEC_EOF_PACKET, iov[0].iov_len) != 0)
                return 0;
        if (memcmp(iov[1].iov_base, &FEC_EOF_PACKET[iov[0].iov_len],
                        FEC_EOF_PACKET_LEN - iov[0].iov_len) != 0)
                return 0;
-       return -E_RECV_EOF;
+       return -E_EOF;
 }
 
 static int udp_recv_post_monitor(__a_unused struct sched *s, void *context)
index 7d6c371433b13ae6f6d3d63e8de47f69fe133a17..de4a3e6aafc76b83de2d9e2f4112c39c6e038d06 100644 (file)
@@ -78,7 +78,7 @@ static int wav_post_monitor(__a_unused struct sched *s, void *context)
        int32_t rate, ch;
 
        if (iqs == 0) {
-               ret = -E_WAV_EOF;
+               ret = -E_EOF;
                if (btr_no_parent(btrn))
                        goto err;
                return 0;
index f7ee2c4dbd1281e49792693afd40e83f275cd919..f2ca273cd08979f33b42ab0a7f84b533fe29a583 100644 (file)
@@ -1176,7 +1176,7 @@ next_buffer:
                return 0;
        btr_merge(btrn, fn->min_iqs);
        len = btr_next_buffer(btrn, &in);
-       ret = -E_WMADEC_EOF;
+       ret = -E_EOF;
        if (len < fn->min_iqs)
                goto err;
        if (!pwd) {
diff --git a/write.c b/write.c
index f7018aa115a632f345f5136c734f44e2b79d87a5..cb32d391eaa0f856414aa23318a7573def0d9eef 100644 (file)
--- a/write.c
+++ b/write.c
@@ -104,7 +104,7 @@ static int setup_and_schedule(struct lls_parse_result *lpr)
                        struct writer_node *wn = wns + j;
                        ts = task_status(wn->task);
                        assert(ts < 0);
-                       if (ts != -E_WRITE_COMMON_EOF && ts != -E_BTR_EOF) {
+                       if (ts != -E_EOF) {
                                const char *name = writer_name(wn->wid);
                                PARA_ERROR_LOG("%s: %s\n", name,
                                        para_strerror(-ts));