Message ID | 20250617100720.2544758-8-jerome.forissier@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:9b99:0:b0:3a4:ee3f:8f15 with SMTP id d25csp2061470wrc; Tue, 17 Jun 2025 03:08:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX8G1oHHwtTVBKuOPGD2mC1hqkNKZeLPmB7ae7Ocb/p5GW8UL+1Qyu58ltAZzilyXLgll5tGA==@linaro.org X-Google-Smtp-Source: AGHT+IFuPx7fJBtWoW36Mf+Nv/UdsuPWUg0xvZ9nemGa8/u94YMtPl7WpRI/kNKe9o3c1gVt+KsO X-Received: by 2002:a05:620a:1997:b0:7d2:26f3:881a with SMTP id af79cd13be357-7d3c6cfefefmr2150605185a.56.1750154930058; Tue, 17 Jun 2025 03:08:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1750154930; cv=none; d=google.com; s=arc-20240605; b=jAKoFxX6bQgZ4sOh4RiiRutNbvmIm5BWx2DdToml6cHe1BKTx2l8eg0+m69ij5HkT6 7FWMtjG7V9RMKZjG66lyid52l4B1TI7wOHuqQz8tuBsOtUCkXyNsa53NYtRTtfvOzEGc ilw8e0ypCMzWYDMfLMiK//Z9XwmpYR5NJZ7Nw4GN7HMX2jG9n07cRLivxuEpuEKkNgyf BbPB0LejQUjOzvv5GFkf8VVLgwmUxc948vCpjpMiKoOrEj8pFRkXAjNY+rRAZ1h6btVZ POwPg/vlted7yxwuAjIFxNByXsm3yxyHsBee8Jb80C885lYTWLmeJf/ZU+OkHMeFphKm 36xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zw2o6MnolNwOFvuGvEw5Nc0YvBVz9NEXlG0S6QtGMrM=; fh=UmjsKB3unp9m/Fk9s1BMSQpC/5itFxyvdTSgtmH1s3w=; b=ANbNUYiN2QJBRYqKdTYF4RmuXjhR0XGqaKQCqiW3lMrari9ToW2Ah4GQDI3Q5/k3iG Fxs+G8Em4eLawSyToQ1g9nk5feL2onXgRStsS4d7hWhraIrxudZ7ZhBon10SQsYLxWIo OAM/E+iU1FhUtxjInvqG3mpPpsOU6EYr7HvyV2nKui7yFY+rQUCEgyXKQhQSdwgiG/TW FxmCzIilTVEM7xVXgcyAwZxC04mXtSzNDauH5GsCS7lZTdl+6TdWQm/OBImuBvOTBun0 YpR7g6i/s7Q9kU/FPtRnF54g8jWky6xpmSx5zuRQRFg6mGsWDpcLnDOD73VSxdapM5X8 puaw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tbTzXsOk; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: <u-boot-bounces@lists.denx.de> Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id af79cd13be357-7d3b8dc342csi1289682785a.92.2025.06.17.03.08.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 03:08:50 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tbTzXsOk; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A63AB82D59; Tue, 17 Jun 2025 12:07:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="tbTzXsOk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C6E8E82CD5; Tue, 17 Jun 2025 12:07:51 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E037A80C83 for <u-boot@lists.denx.de>; Tue, 17 Jun 2025 12:07:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jerome.forissier@linaro.org Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3a4fb9c2436so3231660f8f.1 for <u-boot@lists.denx.de>; Tue, 17 Jun 2025 03:07:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1750154869; x=1750759669; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zw2o6MnolNwOFvuGvEw5Nc0YvBVz9NEXlG0S6QtGMrM=; b=tbTzXsOkit8y3pSth/W4OMrs/e/QcaYEA58ERsufHCH+i0QBFe8XjXFC0NpXjflIze 2lB1Cthp4lUmtxet75gNYphgB27hLSZAxjvCCykmT3TjdFGNJaZcrQQN05dpjx0QHbCQ F9LJsROvY/hZkRT2atDj9l/n30LLVercc3MoOb3UHF1tw+7TjFrUs+UevrO1sTz+kYx2 PtHWNh13+BMmCnlK8GbrBB9LWDIl4xSJMPuxm+rDOE+p76BeOOZMyz6JBnDevBK7zhKn Du4vDyYHsCVFzZUZapUEkopuuXuAPFYEQMuvZNkBC1pdtuxWAhpfViRP7X9CP7e4Y4AV /f0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750154869; x=1750759669; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zw2o6MnolNwOFvuGvEw5Nc0YvBVz9NEXlG0S6QtGMrM=; b=sJuHUGCxvO2HfcYFEYv+imsNSxDc1wWyk0YQby7WryJkNnQZqf1BqwVTYz8JAzG4Fy j8xF/G0TK/2UgL7lRfWNDZ+U1IExv+jNRVpz7nvgMgpIU7rVinUaCBckhajr6z8A/Kib X2n4ogGfOJkJ55Hn7gb2wpRZhSK+9rxBGrWIJsRLVLGIIIijwHnnzvmHpVq65sCRQAvR e6GguFott7YG6/n5h0elvFemPSdzoJeraN4oi/I9PreQhyhTYLTRC6+YjHNHfB4hf0kK X+leLJr03Z6TfhArQ2dQX77WtXTSsMc9uM/5jO8Xhvury8l+XV4/FXfEZOVMPVAw2vPP h23Q== X-Gm-Message-State: AOJu0YzS/RHKBmpLQdE6u7Om8oyN9/uEVQZguCTEQV7PcF7c1jXRBF1/ b9fPO8o2qw03nMSJCOCwk8brttZ4UxyVusfyT3JKiQENOA2h/Zfmfn/75JI8F0J7xS+ISGV8Dih 27uAL X-Gm-Gg: ASbGnctCwnSnw2pDUbA3Xbl03qPNqErfB4L75pfoXmZyTwpo2eynt9ztN98W0V5LSpi JMG5CvKR0e/YJJA4Ui2ydImg8ph1PKE+/19tNODt3PlB04b+gMJRsT3Ki0uU7GvQrBlivbVt9ck F8YztWqQ2ebIFr7bH4djYWFf9zlFNqSSPrYDNeysiFI/V2ywKwMkTsjztgMnmIMpk/1yA4z/ebP iMWY99rKPhOoQ+PBqEEfwxYOSm7Ab+iVY8tT8L1+0gS9RTbRRpp7N/7pMkPpjl1vTDuZkrYPgD0 lOqBxzfPtZcevCHYl0ZKJqf9pUGA5tfSWlEbNAdIoUUCsimOlUNv23fg29RyRM6EhUcroOE= X-Received: by 2002:a05:6000:2184:b0:3a5:783f:5297 with SMTP id ffacd0b85a97d-3a5783f5770mr5786983f8f.35.1750154868966; Tue, 17 Jun 2025 03:07:48 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:d4f5:465a:56e7:e545]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a568b61071sm13582412f8f.90.2025.06.17.03.07.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 03:07:48 -0700 (PDT) From: Jerome Forissier <jerome.forissier@linaro.org> To: U-Boot mailing list <u-boot@lists.denx.de> Cc: Jerome Forissier <jerome.forissier@linaro.org>, Heinrich Schuchardt <xypron.glpk@gmx.de>, Ilias Apalodimas <ilias.apalodimas@linaro.org>, Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com> Subject: [PATCH v3 07/13] lwip: dns: do not print IP address when a variable is specified Date: Tue, 17 Jun 2025 12:03:57 +0200 Message-ID: <20250617100720.2544758-8-jerome.forissier@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250617100720.2544758-1-jerome.forissier@linaro.org> References: <20250617100720.2544758-1-jerome.forissier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean |
Series |
sntp for NET_LWIP
|
expand
|
diff --git a/cmd/lwip/dns.c b/cmd/lwip/dns.c index 4689ecce513..344f9a68bb9 100644 --- a/cmd/lwip/dns.c +++ b/cmd/lwip/dns.c @@ -42,8 +42,6 @@ static void dns_cb(const char *name, const ip_addr_t *ipaddr, void *arg) if (dns_cb_arg->var) env_set(dns_cb_arg->var, ipstr); - - printf("%s\n", ipstr); } static int dns_loop(struct udevice *udev, const char *name, const char *var) @@ -107,8 +105,11 @@ static int dns_loop(struct udevice *udev, const char *name, const char *var) net_lwip_remove_netif(netif); - if (dns_cb_arg.done && dns_cb_arg.host_ipaddr.addr != 0) + if (dns_cb_arg.done && dns_cb_arg.host_ipaddr.addr != 0) { + if (!var) + printf("%s\n", ipaddr_ntoa(&ipaddr)); return CMD_RET_SUCCESS; + } return CMD_RET_FAILURE; }
When calling "dns <hostname> <varname>", do not print out the IP address of <hostname> onto the console. Print it only when no variable is passed. The reason is to be able to call do_dns() from another command in need of the DNS services without polluting the output. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> --- (no changes since v2) Changes in v2: - New patch cmd/lwip/dns.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)