Pass the othermonitor_* values into the main state, and add TODO markers for next steps (#67).

This commit is contained in:
Andrew Wood
2026-03-29 21:49:47 +01:00
parent 2a54d4edcc
commit 00f06f2b2c
7 changed files with 25 additions and 9 deletions
+2 -9
View File
@@ -286,14 +286,7 @@ static int pv__store_and_forward(pvstate_t state, opts_t opts, bool can_have_eta
* As a side effect, "command_fd" is closed.
*/
static int pv__run_monitor(const char *program_name, pvstate_t state, pvside_t side, int command_fd,
/*@unused@ */
__attribute__((unused)) pid_t othermonitor_pid,
/*@unused@ */
__attribute__((unused))
int othermonitor_read_fd,
/*@unused@ */
__attribute__((unused))
int othermonitor_write_fd)
pid_t othermonitor_pid, int othermonitor_read_fd, int othermonitor_write_fd)
{
const char *dummy_argv[1]; /* flawfinder: ignore */
@@ -325,7 +318,7 @@ static int pv__run_monitor(const char *program_name, pvstate_t state, pvside_t s
fprintf(stderr, "%s: %s\n", program_name, strerror(errno));
}
/* TODO: pass othermonitor_* into the state for ratio display. */
pv_state_othermonitor_set(state, othermonitor_pid, othermonitor_read_fd, othermonitor_write_fd);
/*@-observertrans@ */
dummy_argv[0] = "-";
+1
View File
@@ -1290,6 +1290,7 @@ opts_t opts_parse(unsigned int argc, char **argv)
opts->eta = true;
opts->rate = true;
opts->bytes = true;
/* TODO: add ratio format if "-M both" */
}
/* If -Z was given but not -E, pretend one -E was given too. */