Skip to content

Commit

Permalink
udhcpc[6]: fix messages referring to select() while we use poll()
Browse files Browse the repository at this point in the history
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
  • Loading branch information
Denys Vlasenko committed Jul 24, 2017
1 parent e34dbc4 commit de6cb41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions networking/udhcp/d6_dhcpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv)
retval = 0;
/* If we already timed out, fall through with retval = 0, else... */
if (tv > 0) {
log1("waiting on select %u seconds", tv);
log1("waiting %u seconds", tv);
timestamp_before_wait = (unsigned)monotonic_sec();
retval = poll(pfds, 2, tv < INT_MAX/1000 ? tv * 1000 : INT_MAX);
if (retval < 0) {
Expand All @@ -1248,7 +1248,7 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv)
continue;
}
/* Else: an error occured, panic! */
bb_perror_msg_and_die("select");
bb_perror_msg_and_die("poll");
}
}

Expand Down
4 changes: 2 additions & 2 deletions networking/udhcp/dhcpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
retval = 0;
/* If we already timed out, fall through with retval = 0, else... */
if (tv > 0) {
log1("waiting on select %u seconds", tv);
log1("waiting %u seconds", tv);
timestamp_before_wait = (unsigned)monotonic_sec();
retval = poll(pfds, 2, tv < INT_MAX/1000 ? tv * 1000 : INT_MAX);
if (retval < 0) {
Expand All @@ -1465,7 +1465,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
continue;
}
/* Else: an error occurred, panic! */
bb_perror_msg_and_die("select");
bb_perror_msg_and_die("poll");
}
}

Expand Down

0 comments on commit de6cb41

Please sign in to comment.