From patchwork Wed Apr 7 10:14:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Henriksson X-Patchwork-Id: 1463279 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::43f; helo=mail-wr1-x43f.google.com; envelope-from=swupdate+bncbch5pdgzrylbbdumw2bqmgqe5hhhlmq@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=EXyyR+fi; dkim-atps=neutral Received: from mail-wr1-x43f.google.com (mail-wr1-x43f.google.com [IPv6:2a00:1450:4864:20::43f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FFgHT2cYPz9sV5 for ; Wed, 7 Apr 2021 20:14:42 +1000 (AEST) Received: by mail-wr1-x43f.google.com with SMTP id v8sf5231522wrv.7 for ; Wed, 07 Apr 2021 03:14:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1617790479; cv=pass; d=google.com; s=arc-20160816; b=iHrAG9b2cA8eskzhQg9CT5pp9j30GuA+ARz2Ry1A742GXczUXTX82GgXRksmUGjPuA N8OkGBJPDCcaAa0ZlEjfsj4wdIQ0IX2ik9Eq63LRUJU0JHNcR5zakunE+gCHX1n+K7Zh bWndxEBfRMVB9fuzFNo7/6g3dKxXnWwymgKd3tpTUfBK+4O0ryNoDps/tZFqxW3vk9YS kTo7QaMMKp7jMM/gyf27CYA78zsE8Znn0VsafIf/RyDAByRXpeP+KQJPfmNpnSpQu6V4 JQIY9FGLHUk+quUN8vSkzr9j2SdGAGL+Kt+eJLD0MQ4Ui0KT5nZ9UZjtfw4uGqvxfcef qvzA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:message-id:date:subject:cc:to:from :mime-version:sender:dkim-signature; bh=NeBHzK53x7XvOgAYl5CXuJ+Jk74mc0bGB/Rncqx9UfI=; b=R53AzYrI9kPUb3iz38FUlU8gqGFofsZYa7syyBmOunUi5yUBp4V3MroktNUGh9phSR t3fFgTcP3byMF0utnwtlvZAFlykW6P1QhLpHPA9rjLNWzCkgT2b0m6c7UfI7xw3q4wMv d7hZs8erCFdmXFJYgYKDJ3OdKRcxzSHQSBVIHZv70yEb4fztWweymUyzBq+cla4tzUB8 VmhOT8nuOzXYUDpy7Pv/xNESAmKpUru1vBJ+aFzZz3g3+o20I7n9Bi+n3tpu+ax3y+My F9olaBTG7wrkUko2O3ib7RyErf8EAro0IEx4OMcc2ajaS6RbVhACyAsa5LNgSXXf6IuK btWA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 94.255.170.6 is neither permitted nor denied by best guess record for domain of ah@fatal.se) smtp.mailfrom=ah@fatal.se DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=NeBHzK53x7XvOgAYl5CXuJ+Jk74mc0bGB/Rncqx9UfI=; b=EXyyR+fiNHkiBnlnKd/nN6ILjkEpgH0bwjbAuR0o1Q2slf7QHRPRUWpehBuOxuK5FA ymvOJRV2+b/fJyDY2VJwj/R+xWimVedjjhNQmAQI/0NLm8xtcUbPhpU/fRxxRVCawNya gGx54yfyMY/1KTfhAAomVBZqn8YXySVA7Q7UJ9IYNVQNRPFEAeTxb5foIyNTjcEU0hFo xqRd5HftaCgSWdz4J1xye/TanrubddRl1Wnjb76Qd/3MZjiQ0dn6UXxzqTk+1TzQXYSP ZT0JMrnQEUzq+8Xcmr2/nfzU/7Fy2+YIJvjwHTYA/RRj8/ZgG3eLIzsCs8nsxNRw7FD1 CSWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:from:to:cc:subject:date :message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=NeBHzK53x7XvOgAYl5CXuJ+Jk74mc0bGB/Rncqx9UfI=; b=jG8fd663fNqqol1lKTl94yghPa4YnElO0o00H1RTK6vSWphz0TPpa28BVB4UbGlW+O yz9I9s5qjEmXRqslOac9NyOkzmt7yxvqeBzS43W0xcKwFdwr6Ez4zqQanqeNV687QNQv lC2pq3/WSKpaasLrjN5maS9BnJUnKKUUXGWvpmqSKwJdAyh2YWddhzOQiQViQdUUT5w/ emK+3EV45fs+RUHsPk33/2l0aMCFstM7MCuURMUHfNuRkVtalfNw+EANe/jwuCyQyEM6 cs0zQWVeZGJ4GMrQF6s6VpN4mr/87BoNm0y6nPcLzs9ftFQAVkOeurAfQm+D2D+gCz7X 0ZTQ== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM532uk5d6W9QuP1gf0TlmNQe9jpPThXzHvWNu0lTsX6UX2eRicLeF 0o4dhVwgD6jjVkGHExm6sxM= X-Google-Smtp-Source: ABdhPJyahcEbktUOfaFN7Y+NLbytx6/Z388Q7t55A63WmK02t2nUEJb7i08T87I4SOFWESthFVGD4w== X-Received: by 2002:a05:6000:2a7:: with SMTP id l7mr2444290wry.413.1617790478933; Wed, 07 Apr 2021 03:14:38 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:600c:285:: with SMTP id 5ls777575wmk.3.gmail; Wed, 07 Apr 2021 03:14:38 -0700 (PDT) X-Received: by 2002:a1c:e243:: with SMTP id z64mr2402254wmg.49.1617790477971; Wed, 07 Apr 2021 03:14:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617790477; cv=none; d=google.com; s=arc-20160816; b=MQ+zqALFKcrjOIxQXWHtFoHwM+sS+1ngcQK249y0KT/TLe4sM6EpgSr3F4XMp6o0uK lvNUxhHgS1gH+bjOMuOmmtfpTrclMzo8/3rIybsabBv75xCUm3flHibgCbIx6jX0tuSz gtKQ4697nPhfcRbvHE2ohq1TsO+54jOlroPUKZBRv8BpTSiB/q+mEf3M8xcEKKkXPXFD ezPa708RJc4tnHCPSgGDQzlmnQOWAFcmAilATLSw8ylPP/CGFMI8yUjEElox2vALs/7e d7JEeoQxR0Q/civ0SsYE2uGBrfUJbWpt2140RbsbdtZqkqnH5TMQQwP/ij5HCrkFHN8j CnzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from; bh=UhctNwYlkzDs3PMbMZDq4sKOTIwEfra5GBcndRkub/M=; b=aO4xYXFnXPcw5bLCenr12Mn4wUUaFks7m4ftpmqKSs3UJoDgHAJjGW6kTNTm6LWVQt U3Yjhab7AY9KctpL+aLmPP4/dBcYtZLX5xZBBZTDbfHSuZSANa1CyLIJBtjQ9/62cN1T 24L+Yr5ljOtQK/lfCoSPlQkzfYQoHrjcHu+gjnjnUJNApQr5p3qhNgBHo2c6wwBAm6c1 +ZnZ0Xmrysst3IWDF0J+abygryuYCjImxGcD+AdbEp2nZC5yUe/tcS5iTFTaBs9+SJEu hTeQkBjJ3VC2osrXOy1MClRwfBEjLKcAScGakZze/sGBQwQigEb2FfAWlsGR6A2NFEFH Vb2w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 94.255.170.6 is neither permitted nor denied by best guess record for domain of ah@fatal.se) smtp.mailfrom=ah@fatal.se Received: from pi.fatal.se (94-255-170-6.cust.bredband2.com. [94.255.170.6]) by gmr-mx.google.com with ESMTP id w2si394220wmb.4.2021.04.07.03.14.37 for ; Wed, 07 Apr 2021 03:14:37 -0700 (PDT) Received-SPF: neutral (google.com: 94.255.170.6 is neither permitted nor denied by best guess record for domain of ah@fatal.se) client-ip=94.255.170.6; Received: by pi.fatal.se (Postfix, from userid 1000) id AA16A2761B; Wed, 7 Apr 2021 12:14:36 +0200 (CEST) From: Andreas Henriksson To: swupdate@googlegroups.com Cc: Andreas Henriksson Subject: [swupdate] [PATCH] Drop NDEBUG debug prints which breaks fw_printenv Date: Wed, 7 Apr 2021 12:14:25 +0200 Message-Id: <20210407101425.8988-1-andreas@fatal.se> X-Mailer: git-send-email 2.11.0 X-Original-Sender: andreas@fatal.se X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 94.255.170.6 is neither permitted nor denied by best guess record for domain of ah@fatal.se) smtp.mailfrom=ah@fatal.se Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Seems like cmake sometimes magically defines NDEBUG, but also it's way to easy to trigger a build where it's not defined and thus the debug output is printed messing up fw_printenv output and breaking just about every tool that tries to parse it's output. Specially `fw_printenv -n foo` becomes useless (print only value). FYI this is exactly what happened in https://bugs.debian.org/985948 I quickly searched the mailinglist and it seems any attempt at adding further NDEBUG's have been met with opposition as nothing sets NDEBUG. Thus remove the last two remaining NDEBUG debug prints to avoid this problem ever happening. Signed-off-by: Andreas Henriksson --- src/uboot_env.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/uboot_env.c b/src/uboot_env.c index 30c39eb..8cb0887 100644 --- a/src/uboot_env.c +++ b/src/uboot_env.c @@ -1027,11 +1027,6 @@ static int libuboot_load(struct uboot_ctx *ctx) } } -#if !defined(NDEBUG) - fprintf(stdout, "Environment %s, copy %d\n", - ctx->valid ? "OK" : "WRONG", ctx->current); -#endif - data = (uint8_t *)(buf[ctx->current] + offsetdata); char *flagsvar = NULL; @@ -1069,9 +1064,6 @@ static int libuboot_load(struct uboot_ctx *ctx) char *pvar; char *pval; if (flagsvar) { -#if !defined(NDEBUG) - fprintf(stdout, "Environment FLAGS %s\n", flagsvar); -#endif pvar = flagsvar; while (*pvar && (pvar - flagsvar) < strlen(flagsvar)) {