get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2074172/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2074172,
    "url": "http://patchwork.ozlabs.org/api/patches/2074172/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20250417132718.2023555-3-jerome.forissier@linaro.org/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20250417132718.2023555-3-jerome.forissier@linaro.org>",
    "list_archive_url": null,
    "date": "2025-04-17T13:26:58",
    "name": "[v5,2/4] net, net-lwip: wget: suppress console output when called by EFI",
    "commit_ref": "9349fc2e9c76d042f424edfa69cf421225bf0fcc",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "ecb070c8a6d23f5b434ae18007c926f59cf04d11",
    "submitter": {
        "id": 69192,
        "url": "http://patchwork.ozlabs.org/api/people/69192/?format=api",
        "name": "Jerome Forissier",
        "email": "jerome.forissier@linaro.org"
    },
    "delegate": {
        "id": 157425,
        "url": "http://patchwork.ozlabs.org/api/users/157425/?format=api",
        "username": "jforissier",
        "first_name": "Jerome",
        "last_name": "Forissier",
        "email": "jerome.forissier@linaro.org"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20250417132718.2023555-3-jerome.forissier@linaro.org/mbox/",
    "series": [
        {
            "id": 453241,
            "url": "http://patchwork.ozlabs.org/api/series/453241/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=453241",
            "date": "2025-04-17T13:26:56",
            "name": "NET_LWIP LMB fixes",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/453241/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2074172/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2074172/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=dOSrk6fb;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=linaro.org",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.b=\"dOSrk6fb\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=linaro.org",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=jerome.forissier@linaro.org"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4Zddx92SzWz1yJL\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 17 Apr 2025 23:27:41 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id B51F583061;\n\tThu, 17 Apr 2025 15:27:35 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 76F6482CA8; Thu, 17 Apr 2025 15:27:34 +0200 (CEST)",
            "from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com\n [IPv6:2a00:1450:4864:20::42f])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 74AB283013\n for <u-boot@lists.denx.de>; Thu, 17 Apr 2025 15:27:31 +0200 (CEST)",
            "by mail-wr1-x42f.google.com with SMTP id\n ffacd0b85a97d-39149bccb69so781530f8f.2\n for <u-boot@lists.denx.de>; Thu, 17 Apr 2025 06:27:31 -0700 (PDT)",
            "from builder.. ([2a01:e0a:3cb:7bb0:a07e:3f08:7eef:b036])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-39eae977513sm19951605f8f.42.2025.04.17.06.27.30\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 17 Apr 2025 06:27:30 -0700 (PDT)"
        ],
        "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,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1744896451; x=1745501251; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=eZOQjJFalRgpPeuxaB4yi+NuMS9a1y2RFiAI5YGeXrE=;\n b=dOSrk6fb2soE3N0ie1NrTFpLGhpW7RJNm5ecRF6MjwEPVOaDzlSvI1GF9BrGZ9gDPU\n iuRn3oKuL8kqJ2cKMvuWP51xdzSqYlMQE2B2r+gBM0uiVxfWiUVO/SbAm9HKVS8cSpsI\n ic7Jm1G/jo+2lfqoU3KKcZ6AZwYRKd1l6+JK2p83kN7+qYoHYGYcAQJRgVxRchTH8wMx\n KTHdkUjm8vocYh0SFt9ekCqcM0YBGjq8J6YEmeLIqFoA4/6oy1rL/Zxt2tKQ4wVh2em3\n t4hWkpoWfX4xO8EDjnGt1nwvdwF5k7yTctdAb7EZJuXxusjRbiMXvNS1ju6RI8dKcDpc\n PMNw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1744896451; x=1745501251;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=eZOQjJFalRgpPeuxaB4yi+NuMS9a1y2RFiAI5YGeXrE=;\n b=iTUtQW7yCuvxpAmv+QOS68i+ar6LnmJLZuqT89FpWYlESt7CKip+x9Q208icI7gQ6X\n IUhh14lG1Y+NdtJe95vho5DCrP0SGCF74bcOW5KcGZFsxk2KwOFUqodHQLPFH+b6IeJI\n I82XCcGh7zNqhGld59QtVwYgQ++bYMQy/xW8tVLSbDFq94ytK8ZAiMxrT9nvBn01DfJe\n qR/u5qqWz/8GPKRaHtZ3GCSwiLBQORRPENUTvBwA674g0z1MYSEI8l3ZxF8c736M0JBj\n ESmF7wlSBSK2xoGevxVWtffAA4vdXBagErJNMucBWJnzMK+XuW3w7gOJ4Y/rloCKXy4M\n 0uhQ==",
        "X-Gm-Message-State": "AOJu0Yxkb+LdXNYGd1Y8OG0gbUYLp/SRnUcaCl13PhrnChI0hczxsD7p\n /hXe0XJDOUr3rMXj3kHWPneDSUTg/2YDrvVMwb+ZhMggn9pIWhMKbxkXISe3WITDi8cungdWpnd\n JP4w=",
        "X-Gm-Gg": "ASbGncuuSEjHCzmYovdYygHqD56KCPeLK/kBluWEP7GfmI/9KL4H1rtXFj8tj28kX3l\n r/ge+q97f/fezf8ZZo7nAqLyRbQXJTGSXm1xklCxyt+ibYIEtShmKtu+esxxiBKUE8O23g6Lnaa\n r3erfp0vCgROE1oBhwfLsgaOVo2gdx61S/DyQjmRAr9e2Zm1kClM5mnzfZBwCWzzl0qDZroy28Y\n Qi05iMKBDNN+eO78RBOyQdsWizyM1UZrnyEk+4rqmfkudb4DnAh/6HCcltvhb2IHJavasf1Z51v\n zMK0yypqMB70G23Irugc34ypkwa1NMAvxAzmuNcl0yKMxhdHJA==",
        "X-Google-Smtp-Source": "\n AGHT+IGxv1XjDwYiZm5j6jxQ0lUPnt2Hzt/omgrtm6RzxeXJXAyT9ms4dGySzoifOT8+O2QZLNlC7w==",
        "X-Received": "by 2002:a5d:5f82:0:b0:39c:1404:3748 with SMTP id\n ffacd0b85a97d-39ee5b14a71mr5222860f8f.16.1744896450652;\n Thu, 17 Apr 2025 06:27:30 -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>,\n Heinrich Schuchardt <xypron.glpk@gmx.de>,\n Adriano Cordova <adrianox@gmail.com>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>,\n Javier Tia <javier.tia@linaro.org>,\n Joe Hershberger <joe.hershberger@ni.com>,\n Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>,\n Ramon Fried <rfried.dev@gmail.com>, Simon Glass <sjg@chromium.org>,\n Sughosh Ganu <sughosh.ganu@linaro.org>, Tom Rini <trini@konsulko.com>",
        "Subject": "[PATCH v5 2/4] net,\n net-lwip: wget: suppress console output when called by EFI",
        "Date": "Thu, 17 Apr 2025 15:26:58 +0200",
        "Message-ID": "<20250417132718.2023555-3-jerome.forissier@linaro.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20250417132718.2023555-1-jerome.forissier@linaro.org>",
        "References": "<20250417132718.2023555-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>,\n <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>,\n <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"
    },
    "content": "Functions called from EFI applications should not do console output.\nRefactor the wget code to implement this requirement. The wget_http_info\nstruct is used to hold the boolean that signifies whether the output is\nallowed or not.\n\nSigned-off-by: Jerome Forissier <jerome.forissier@linaro.org>\nReported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>\n---\n\nChanges in v5:\n- Remove extra hunk in wget_do_request() already added by \"net-lwip:\nchange static function wget_loop() to be wget_do_request():\n- Do not forget to silence the printf's that were added inside lwIP\nby commit 7a15ccb66217 (\"lwip: tls: warn when no CA exists amd log\ncertificate validation errors\"). The \"no CA certificates\" and\n\"verification failed\" messages are moved outside of lwIP into wget.c,\nwith the help of errno for the certificate verification case.\n\nChanges in v4:\n- Patch renamed, deals with NET in addition to NET_LWIP\n\nChanges in v3:\n- New patch\n\n doc/usage/cmd/wget.rst                        |  2 +-\n include/net-common.h                          |  2 +\n lib/efi_loader/efi_net.c                      |  2 +-\n .../src/apps/altcp_tls/altcp_tls_mbedtls.c    |  8 ++--\n net/lwip/wget.c                               | 37 ++++++++++++++-----\n net/wget.c                                    | 23 +++++++++---\n 6 files changed, 52 insertions(+), 22 deletions(-)",
    "diff": "diff --git a/doc/usage/cmd/wget.rst b/doc/usage/cmd/wget.rst\nindex cc82e495a29..44033aaff39 100644\n--- a/doc/usage/cmd/wget.rst\n+++ b/doc/usage/cmd/wget.rst\n@@ -141,9 +141,9 @@ https://cacerts.digicert.com/DigiCertTLSRSA4096RootG5.crt.\n    Bytes transferred = 1864 (748 hex)\n    # Another server not signed against Digicert will fail\n    => wget https://www.google.com/\n-   Certificate verification failed\n \n    HTTP client error 4\n+   Certificate verification failed\n    # Disable authentication to allow the command to proceed anyways\n    => wget cacert none\n    => wget https://www.google.com/\ndiff --git a/include/net-common.h b/include/net-common.h\nindex 30860f5975a..1043b24d0b9 100644\n--- a/include/net-common.h\n+++ b/include/net-common.h\n@@ -555,6 +555,7 @@ enum wget_http_method {\n  *\t\t\tFilled by client.\n  * @hdr_cont_len:\tcontent length according to headers. Filled by wget\n  * @headers:\t\tbuffer for headers. Filled by wget.\n+ * @silent:\t\tdo not print anything to the console. Filled by client.\n  */\n struct wget_http_info {\n \tenum wget_http_method method;\n@@ -565,6 +566,7 @@ struct wget_http_info {\n \tbool check_buffer_size;\n \tu32 hdr_cont_len;\n \tchar *headers;\n+\tbool silent;\n };\n \n extern struct wget_http_info default_wget_info;\ndiff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c\nindex b3291b4f1d5..9ff0b691ee1 100644\n--- a/lib/efi_loader/efi_net.c\n+++ b/lib/efi_loader/efi_net.c\n@@ -51,7 +51,7 @@ static int next_dp_entry;\n static struct wget_http_info efi_wget_info = {\n \t.set_bootdev = false,\n \t.check_buffer_size = true,\n-\n+\t.silent = true,\n };\n #endif\n \ndiff --git a/lib/lwip/lwip/src/apps/altcp_tls/altcp_tls_mbedtls.c b/lib/lwip/lwip/src/apps/altcp_tls/altcp_tls_mbedtls.c\nindex ef51a5ac168..7459bfa468f 100644\n--- a/lib/lwip/lwip/src/apps/altcp_tls/altcp_tls_mbedtls.c\n+++ b/lib/lwip/lwip/src/apps/altcp_tls/altcp_tls_mbedtls.c\n@@ -60,6 +60,8 @@\n \n #if LWIP_ALTCP_TLS && LWIP_ALTCP_TLS_MBEDTLS\n \n+#include \"lwip/errno.h\"\n+\n #include \"lwip/altcp.h\"\n #include \"lwip/altcp_tls.h\"\n #include \"lwip/priv/altcp_priv.h\"\n@@ -299,7 +301,8 @@ altcp_mbedtls_lower_recv_process(struct altcp_pcb *conn, altcp_mbedtls_state_t *\n       LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, (\"mbedtls_ssl_handshake failed: %d\\n\", ret));\n       /* handshake failed, connection has to be closed */\n       if (ret == MBEDTLS_ERR_X509_CERT_VERIFY_FAILED) {\n-        printf(\"Certificate verification failed\\n\");\n+\t/* provide a cause for why the connection is closed to the called */\n+        errno = EPERM;\n       }\n       if (conn->err) {\n         conn->err(conn->arg, ERR_CLSD);\n@@ -844,9 +847,6 @@ altcp_tls_create_config(int is_server, u8_t cert_count, u8_t pkey_count, int hav\n     altcp_mbedtls_free_config(conf);\n     return NULL;\n   }\n-  if (authmode == MBEDTLS_SSL_VERIFY_NONE) {\n-     printf(\"WARNING: no CA certificates, HTTPS connections not authenticated\\n\");\n-  }\n   mbedtls_ssl_conf_authmode(&conf->conf, authmode);\n \n   mbedtls_ssl_conf_rng(&conf->conf, mbedtls_ctr_drbg_random, &altcp_tls_entropy_rng->ctr_drbg);\ndiff --git a/net/lwip/wget.c b/net/lwip/wget.c\nindex 2b512a1bc84..63583e4c6e7 100644\n--- a/net/lwip/wget.c\n+++ b/net/lwip/wget.c\n@@ -8,6 +8,7 @@\n #include <image.h>\n #include <lwip/apps/http_client.h>\n #include \"lwip/altcp_tls.h\"\n+#include <lwip/errno.h>\n #include <lwip/timeouts.h>\n #include <rng.h>\n #include <mapmem.h>\n@@ -217,7 +218,8 @@ static err_t httpc_recv_cb(void *arg, struct altcp_pcb *pcb, struct pbuf *pbuf,\n \t\tmemcpy((void *)ctx->daddr, buf->payload, buf->len);\n \t\tctx->daddr += buf->len;\n \t\tctx->size += buf->len;\n-\t\tif (ctx->size - ctx->prevsize > PROGRESS_PRINT_STEP_BYTES) {\n+\t\tif (!wget_info->silent &&\n+\t\t    ctx->size - ctx->prevsize > PROGRESS_PRINT_STEP_BYTES) {\n \t\t\tprintf(\"#\");\n \t\t\tctx->prevsize = ctx->size;\n \t\t}\n@@ -255,11 +257,15 @@ static void httpc_result_cb(void *arg, httpc_result_t httpc_result,\n \telapsed = get_timer(ctx->start_time);\n \tif (!elapsed)\n \t\telapsed = 1;\n-\tif (rx_content_len > PROGRESS_PRINT_STEP_BYTES)\n-\t\tprintf(\"\\n\");\n-\tprintf(\"%u bytes transferred in %lu ms (\", rx_content_len, elapsed);\n-\tprint_size(rx_content_len / elapsed * 1000, \"/s)\\n\");\n-\tprintf(\"Bytes transferred = %lu (%lx hex)\\n\", ctx->size, ctx->size);\n+\tif (!wget_info->silent) {\n+\t\tif (rx_content_len > PROGRESS_PRINT_STEP_BYTES)\n+\t\t\tprintf(\"\\n\");\n+\t\tprintf(\"%u bytes transferred in %lu ms (\", rx_content_len,\n+\t\t       elapsed);\n+\t\tprint_size(rx_content_len / elapsed * 1000, \"/s)\\n\");\n+\t\tprintf(\"Bytes transferred = %lu (%lx hex)\\n\", ctx->size,\n+\t\t       ctx->size);\n+\t}\n \tif (wget_info->set_bootdev)\n \t\tefi_set_bootdev(\"Http\", ctx->server_name, ctx->path, map_sysmem(ctx->saved_daddr, 0),\n \t\t\t\trx_content_len);\n@@ -339,7 +345,8 @@ static int _set_cacert(const void *addr, size_t sz)\n \tmbedtls_x509_crt_init(&crt);\n \tret = mbedtls_x509_crt_parse(&crt, cacert, cacert_size);\n \tif (ret) {\n-\t\tprintf(\"Could not parse certificates (%d)\\n\", ret);\n+\t\tif (!wget_info->silent)\n+\t\t\tprintf(\"Could not parse certificates (%d)\\n\", ret);\n \t\tfree(cacert);\n \t\tcacert = NULL;\n \t\tcacert_size = 0;\n@@ -421,9 +428,10 @@ int wget_do_request(ulong dst_addr, char *uri)\n \n \t\tif (cacert_auth_mode == AUTH_REQUIRED) {\n \t\t\tif (!ca || !ca_sz) {\n-\t\t\t\tprintf(\"Error: cacert authentication mode is \"\n-\t\t\t\t       \"'required' but no CA certificates \"\n-\t\t\t\t       \"given\\n\");\n+\t\t\t\tif (!wget_info->silent)\n+\t\t\t\t\tprintf(\"Error: cacert authentication \"\n+\t\t\t\t\t       \"mode is 'required' but no CA \"\n+\t\t\t\t\t       \"certificates given\\n\");\n \t\t\t\treturn CMD_RET_FAILURE;\n \t\t       }\n \t\t} else if (cacert_auth_mode == AUTH_NONE) {\n@@ -438,6 +446,10 @@ int wget_do_request(ulong dst_addr, char *uri)\n \t\t\t */\n \t\t}\n \n+\t\tif (!ca && !wget_info->silent) {\n+\t\t\tprintf(\"WARNING: no CA certificates, \");\n+\t\t\tprintf(\"HTTPS connections not authenticated\\n\");\n+\t\t}\n \t\ttls_allocator.alloc = &altcp_tls_alloc;\n \t\ttls_allocator.arg =\n \t\t\taltcp_tls_create_config_client(ca, ca_sz,\n@@ -462,6 +474,8 @@ int wget_do_request(ulong dst_addr, char *uri)\n \t\treturn CMD_RET_FAILURE;\n \t}\n \n+\terrno = 0;\n+\n \twhile (!ctx.done) {\n \t\tnet_lwip_rx(udev, netif);\n \t\tsys_check_timeouts();\n@@ -474,6 +488,9 @@ int wget_do_request(ulong dst_addr, char *uri)\n \tif (ctx.done == SUCCESS)\n \t\treturn 0;\n \n+\tif (errno == EPERM && !wget_info->silent)\n+\t\tprintf(\"Certificate verification failed\\n\");\n+\n \treturn -1;\n }\n \ndiff --git a/net/wget.c b/net/wget.c\nindex c73836cbc9d..3c0fff488eb 100644\n--- a/net/wget.c\n+++ b/net/wget.c\n@@ -59,8 +59,10 @@ static inline int store_block(uchar *src, unsigned int offset, unsigned int len)\n \tif (CONFIG_IS_ENABLED(LMB) && wget_info->set_bootdev) {\n \t\tif (store_addr < image_load_addr ||\n \t\t    lmb_read_check(store_addr, len)) {\n-\t\t\tprintf(\"\\nwget error: \");\n-\t\t\tprintf(\"trying to overwrite reserved memory...\\n\");\n+\t\t\tif (!wget_info->silent) {\n+\t\t\t\tprintf(\"\\nwget error: \");\n+\t\t\t\tprintf(\"trying to overwrite reserved memory\\n\");\n+\t\t\t}\n \t\t\treturn -1;\n \t\t}\n \t}\n@@ -76,6 +78,9 @@ static void show_block_marker(u32 packets)\n {\n \tint cnt;\n \n+\tif (wget_info->silent)\n+\t\treturn;\n+\n \tif (content_length != -1) {\n \t\tif (net_boot_file_size > content_length)\n \t\t\tcontent_length = net_boot_file_size;\n@@ -101,11 +106,15 @@ static void tcp_stream_on_closed(struct tcp_stream *tcp)\n \tnet_set_state(wget_loop_state);\n \tif (wget_loop_state != NETLOOP_SUCCESS) {\n \t\tnet_boot_file_size = 0;\n-\t\tprintf(\"\\nwget: Transfer Fail, TCP status - %d\\n\", tcp->status);\n+\t\tif (!wget_info->silent)\n+\t\t\tprintf(\"\\nwget: Transfer Fail, TCP status - %d\\n\",\n+\t\t\t       tcp->status);\n \t\treturn;\n \t}\n \n-\tprintf(\"\\nPackets received %d, Transfer Successful\\n\", tcp->rx_packets);\n+\tif (!wget_info->silent)\n+\t\tprintf(\"\\nPackets received %d, Transfer Successful\\n\",\n+\t\t       tcp->rx_packets);\n \twget_info->file_size = net_boot_file_size;\n \tif (wget_info->method == WGET_HTTP_METHOD_GET && wget_info->set_bootdev) {\n \t\tefi_set_bootdev(\"Http\", NULL, image_url,\n@@ -139,7 +148,8 @@ static void tcp_stream_on_rcv_nxt_update(struct tcp_stream *tcp, u32 rx_bytes)\n \t\t    tcp->state == TCP_ESTABLISHED)\n \t\t\tgoto end;\n \n-\t\tprintf(\"ERROR: misssed HTTP header\\n\");\n+\t\tif (!wget_info->silent)\n+\t\t\tprintf(\"ERROR: misssed HTTP header\\n\");\n \t\ttcp_stream_close(tcp);\n \t\tgoto end;\n \t}\n@@ -346,7 +356,8 @@ void wget_start(void)\n \ttcp_stream_set_on_create_handler(tcp_stream_on_create);\n \ttcp = tcp_stream_connect(web_server_ip, server_port);\n \tif (!tcp) {\n-\t\tprintf(\"No free tcp streams\\n\");\n+\t\tif (!wget_info->silent)\n+\t\t\tprintf(\"No free tcp streams\\n\");\n \t\tnet_set_state(NETLOOP_FAIL);\n \t\treturn;\n \t}\n",
    "prefixes": [
        "v5",
        "2/4"
    ]
}