From patchwork Wed Sep 16 12:33:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1365264 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::139; helo=mail-lf1-x139.google.com; envelope-from=swupdate+bncbcxploxj6ikrbfmmrd5qkgqebsskugy@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de 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=h9XclFkR; dkim-atps=neutral Received: from mail-lf1-x139.google.com (mail-lf1-x139.google.com [IPv6:2a00:1450:4864:20::139]) (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 4BrzzF6xZkz9sTS for ; Wed, 16 Sep 2020 22:33:29 +1000 (AEST) Received: by mail-lf1-x139.google.com with SMTP id a4sf1117860lff.21 for ; Wed, 16 Sep 2020 05:33:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1600259605; cv=pass; d=google.com; s=arc-20160816; b=e8bqxCV2WTao5SSDdRI8kCdwMq/ZLpld4IkrzuDT0m5bm12TFmtxsYljKT33UFVSJs vSi5+AzdiMzg6rB73vQ+vZbMWit72yksic3H8ALZuv1iEy+Lx8ThmNkP8mD7JT2p6s7H GmNNfpT+vTuM5/75dA06VjMS0X49XH1LxyC7eDjDetQayNZLSiGTe+sdXyrn4eTg3lDG 4H+AmOI51ZmEPvzNu8gonE727BZo6+QLcnDyOWzD2cf5DhlteJbP19nB0zdheFVkhCav +B5Ab/Eh6s2EfOx1n8gdMFVNiF2OKoF1HCWbVaoOw24D5EQWHvxRIUzpIvki4pqVy5OV BACg== 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:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=ETE22/+fzrhDEg3OvIgzEwQsKTg9QsXCgSDYMhu2a1k=; b=nyPmU/hwxtHP7o/VkJ5RwSUdaykRJ3uuypsymfVU1Xs+8yZH/filOTncGhgA+xvII+ N3Jqlkv1jjDc9h5X156xpMCY3cvrQfXLi5ll56o16kPIsKi+qcud5VfYHP54Axb8i9/T j6HhLzo5og0JvMQqMIM/NHxAgDH4XbOmWKLHON9uvbA9QrbM3mYs3ZB+GacZkNW90SkA AHpovsEJHSlQ+xd3FOeKkoz0bO0jIOPgyaWd5D+rTKzj4vCRw8I/xdp1JsizI4BuSGiY +9fr3kkd1bVUHZqh+xYbD5hSVTQ0icB1PevYG4xzT0/sJrAvsH0lEK+gW95uZiRK8c32 WDkQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=ETE22/+fzrhDEg3OvIgzEwQsKTg9QsXCgSDYMhu2a1k=; b=h9XclFkRUUJ/NbB/j4naIFHAuoN8DmpGA/vdOQwh8pB19eaH3KbB7QZs8JuHl+6uTs ImS26b46pd3t8aBo4gx2fyDtgtDp/IX/QglwyMAcpTQbmQyVtFwhGlsNBbhPhyeSJENd G4XqXaSoXzCgi5yLI85qSUrryzZ40LPt+Eef9ZQv233P7Dz5SGMP6+qMs+pcVbq5CJeX z7CCdg5n0BDWMHtJpC3jq2RnZZFi56jlcwyvrF2BvMfLpqV7cVTKuhfJfG3g+9NeQgbw dNCdpb9G3OLKFVfi3ovzAjH0w038o9DHFtXya7Gx+K8/4WKjHppZv5JCYY/FIgD6CJjo 57RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version: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=ETE22/+fzrhDEg3OvIgzEwQsKTg9QsXCgSDYMhu2a1k=; b=kHa3DC0fNFcQ+9B56RSCZdrZzqQ0mN3DX457ve6+XWnxxrPwr3O4YdG0o1JOGhszH8 rOIKyULgimfEDfWVWSaw9WQeZ/p2b+DOlgdIgAOOyKytWdZ8TUzqYgG6EqZVtzXaVkDw 78csCrFXd0W67UodfkirfpLSsuYwKHNbTxVBCTfQBmFALGCU/Tu3T5B6YW+Y9gm3qfkE DSA6v86ojIRZCVmWTMXKu/397vGmTClxhEGIrMWaKyHiNZkEkTXMgphzhC9ytE9k76O7 +03ixq2AsPtAgnk8k+rdmz9ALTjhyDgJt6nwGsnVj5GW+izSqz1PYy4JZezln1HXTFVx Ag4g== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM532N9ye8kbD5ghyWkC1UiEVdGG+k5+mefv4se1gvziLOIwe4kSh/ G6NIZMV08XavtQdu51uoDjw= X-Google-Smtp-Source: ABdhPJwii42cms1ZHtLTajk7HrHquoIICl7dpCg+H4IkPLfNTquwEUrC0kV4sJ3N8oeE/pqQzLMqBw== X-Received: by 2002:ac2:4a73:: with SMTP id q19mr8533179lfp.569.1600259605512; Wed, 16 Sep 2020 05:33:25 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:ac2:544e:: with SMTP id d14ls705313lfn.2.gmail; Wed, 16 Sep 2020 05:33:24 -0700 (PDT) X-Received: by 2002:a19:391:: with SMTP id 139mr8449458lfd.246.1600259604248; Wed, 16 Sep 2020 05:33:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600259604; cv=none; d=google.com; s=arc-20160816; b=ByixbNu0vbvxO46RiGC7uNpntUP8qyyCiGG6SyFlY447i75C951S16gufby449hGlU RavE3de0olJVteoUyi+PecIOiOtBc1aIOUZUso/lrh7yw0WJUTEtKusP0DdIGArVwYRd pxNAIaVi3Wx7/US96X0UgdacT3xi0rp2WuQv2apdNWYvIgRF8co8YiuF6Wf15lpRyhOf Uay+fA+SMQNLgrP3WeYpA4UEnUYHZe6/LtQzclIDQiMMuecfalFWkVhe2frvB/y/VCfK KtPTu3gBfIEPM5zYUEtZEzvd+xXeTDeTk6G6e9ePUnQEgTP1SIQFf7I4YzUnzSa7yBAu JIeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=OEZ9kBTraZDJvxyTnDC+6e3jPSgY2va4KxKEohk4WmM=; b=yuF8v32aljX/yZe0kdsr2wG5ms2usyJtHem+eKVqvOiYgzTVptjPmZ5izMRiOYD3VL nRkdO54QL6ENde05RUp8VXsTSuCZTxEEb6YQLghwRxza6VEZE1bBIWsrQ9I6eHxKVQWQ GJHoWuSrMuWixObDKdHjCCa5rQxOrJDY6Wlza23u1gE5x5YQp5Mu5YhcWyksEkx4B2tL GYRcjoolMl1uAXSuGFvpx7CmNko1O3OHGVIDXqBCgOU6p4Au9PLXSUZtCuP8JxaevoaK 2uMBeQYLAhwwlIAxS1lk5j5DWor23kxuXVbxwsDRUIDYxDsWH3TaAesShJk78xxO9IWS zG1g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id 14si517908lfq.5.2020.09.16.05.33.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Sep 2020 05:33:24 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4Brzz75WZcz1qs3T; Wed, 16 Sep 2020 14:33:23 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4Brzz759shz1qvJd; Wed, 16 Sep 2020 14:33:23 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 66XLwuzthwUV; Wed, 16 Sep 2020 14:33:22 +0200 (CEST) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Wed, 16 Sep 2020 14:33:22 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id A2BDF4540460; Wed, 16 Sep 2020 14:33:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id c98q-MHNZx7P; Wed, 16 Sep 2020 14:33:20 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.64]) by babic.homelinux.org (Postfix) with ESMTP id 8E72D45402F0; Wed, 16 Sep 2020 14:33:19 +0200 (CEST) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic , Christian Storm Subject: [swupdate] [PATCH] Make logcolors optional in configuration file Date: Wed, 16 Sep 2020 14:33:18 +0200 Message-Id: <20200916123318.112079-1-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de 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: , Commit 5507fe lets set the colors for logging on the console, but the setup is mandatory if a configuration file is given. Remove the check if "logcolors" is found to let the parameter optional. Signed-off-by: Stefano Babic Reported-by: Christian Storm --- core/swupdate.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/swupdate.c b/core/swupdate.c index ac0515c..07c79f9 100644 --- a/core/swupdate.c +++ b/core/swupdate.c @@ -730,12 +730,12 @@ int main(int argc, char **argv) if (swcfg.globals.verbose) loglevel = TRACELEVEL; - if (read_module_settings(cfgfname, "logcolors", - read_console_settings, &swcfg)) { - fprintf(stderr, - "Error parsing configuration file, exiting.\n"); - exit(EXIT_FAILURE); - } + /* + * logcolors is optional, ignore error code + * if not found + */ + (void)read_module_settings(cfgfname, "logcolors", + read_console_settings, &swcfg); int ret = read_module_settings(cfgfname, "processes", read_processes_settings,