From 8504964f1a05e7f4ae388c690c398b008ad5ff1c Mon Sep 17 00:00:00 2001 From: Andrew Wood Date: Sun, 5 Oct 2025 18:07:02 +0100 Subject: [PATCH] Remove old non-functional code relating to ETAs and --size in the --watchfd loop. --- src/pv/loop.c | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/src/pv/loop.c b/src/pv/loop.c index 392a162..cd4caf5 100644 --- a/src/pv/loop.c +++ b/src/pv/loop.c @@ -823,35 +823,6 @@ int pv_watchfd_loop(pvstate_t state) if (all_watching_finished) goto end_pv_watchfd_loop; - /* - * TODO: special-case, if we are watching one single PID:FD, - * state->control.size < 1, then set state->control.size to the size - * that FD points to, and if there's still no size, remove the ETA - * from the format string. - * Need to check whether retaining this old feature is still - * relevant. - */ - /* Old code to refactor into here: */ -#if 0 - /* - * Use a size if one was passed, otherwise use the total size - * calculated. - */ - if (0 >= state->control.size) - state->control.size = info.size; - - if (state->control.size < 1) { - char *fmt; - while (NULL != (fmt = strstr(state->control.default_format, "%e"))) { - debug("%s", "zero size - removing ETA"); - /* strlen-1 here to include trailing \0 */ - memmove(fmt, fmt + 2, strlen(fmt) - 1); /* flawfinder: ignore */ - /* flawfinder: default_format is always \0 terminated */ - state->flags.reparse_display = 1; - } - } -#endif - /* * Prepare timing structures for the main loop. */