Skip to content

Commit

Permalink
Use TFTP spinner for NMRP too
Browse files Browse the repository at this point in the history
  • Loading branch information
jclehner committed Sep 30, 2024
1 parent b55f42b commit 20fb82a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions nmrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,12 +558,15 @@ int nmrp_do(struct nmrpd_args *args)
timeout = args->blind ? 10 : NMRP_ADVERTISE_TIMEOUT;
beg = time_monotonic();

printf("Advertising NMRP server on %s ... ", args->intf);

while (!g_interrupted) {
printf("\rAdvertising NMRP server on %s ... %c",
args->intf, spinner[i]);
fflush(stdout);
i = (i + 1) & 3;

printf("%c ", spinner[i]);
fflush(stdout);
printf("\b\b");

was_plugged_in |= !ethsock_is_unplugged(sock);

if (pkt_send(sock, &tx) < 0) {
Expand Down

0 comments on commit 20fb82a

Please sign in to comment.