On Tue, Sep 25, 2012 at 2:06 PM, Florian Fainelli <[email protected]> wrote:
> From: Felix Fietkau <[email protected]>
>
> Signed-off-by: Felix Fietkau <[email protected]>
> ---
>  networking/udhcp/dhcpc.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
> index f72217c..f1013f4 100644
> --- a/networking/udhcp/dhcpc.c
> +++ b/networking/udhcp/dhcpc.c
> @@ -672,6 +672,7 @@ static int raw_bcast_from_client_config_ifindex(struct 
> dhcp_packet *packet)
>  static NOINLINE int send_discover(uint32_t xid, uint32_t requested)
>  {
>         struct dhcp_packet packet;
> +       static int msgs = 0;

Why static?

>         /* Fill in: op, htype, hlen, cookie, chaddr fields,
>          * random xid field (we override it below),
> @@ -689,7 +690,8 @@ static NOINLINE int send_discover(uint32_t xid, uint32_t 
> requested)
>          */
>         add_client_options(&packet);
>
> -       bb_info_msg("Sending discover...");
> +       if (msgs++ < 3)
> +               bb_info_msg("Sending discover...");
>         return raw_bcast_from_client_config_ifindex(&packet);
>  }

Why do you want to suppress the message?
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to