Message ID | 20200405094443.10201-1-sbabic@denx.de |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRBE6RU32AKGQEOYXZ6UI@googlegroups.com> 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::33b; helo=mail-wm1-x33b.google.com; envelope-from=swupdate+bncbcxploxj6ikrbe6ru32akgqeoyxz6ui@googlegroups.com; receiver=<UNKNOWN>) 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=hcP3MOLM; dkim-atps=neutral Received: from mail-wm1-x33b.google.com (mail-wm1-x33b.google.com [IPv6:2a00:1450:4864:20::33b]) (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 48w80R1Bbfz9sSK for <incoming@patchwork.ozlabs.org>; Sun, 5 Apr 2020 19:44:54 +1000 (AEST) Received: by mail-wm1-x33b.google.com with SMTP id r8sf2217577wmn.1 for <incoming@patchwork.ozlabs.org>; Sun, 05 Apr 2020 02:44:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1586079891; cv=pass; d=google.com; s=arc-20160816; b=T0BH6d0hqLaWxVpkVOUed+HPHwBpinPTBKYCBy62IWqAI2GNEDYDm623jyV3zwRCjp l3ljSyFRTew4UcmNXnQJveTdrjZxT4aQ3JsDgfJKNjn3jGvaPNp9LcCQdCTdq1+lvD4t TKknHNS6rMLlsptbFMcDSXe5scokkxvSq6H4IhwmvOdPr32RmANgsAur6VUrxK8ept4J kaGpAw8b9BOB/bMObr4Hcz/OSfi2VNcbU/xnlTN4Q+2H+vfmvHUGGZ5NhJp8VYM5k4hA WfNUqsjoc4t9EiNkGod34yw+TTs8pb0lKscMWdl2do4VrOanEUBgD9RxNg29c3wu0LwN nOBg== 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=65N2yo3PdqEswNanfFwmLq6LeVTDvB7hxYrsYv/JhdI=; b=Tu2pGKfFtgausnh0rzxMMbHwTO5vTyYSDX5D98Hz7i3Os3fFEV0BFfi1+vzxh4hX7Q TdlbGxxSGlXl3Y5GjbreeyaGIzBQJ43ekxfZ+N3ty3XLb1lrNcSHYSksvAKbN3BKYrmx ZFy1WDCUlNxj+kvLsd331PaqYli1VGGmVMIMeiFgcGfBg37sjOgrbulloqalDTR5Amc1 itVjIrV3af0V5UuIn1dYv+QXcs037Nlmav66A7Vk3DtYsXTdVfCCxFsGRfhKjuyq4KKc tpny5js94bvTN9JsXOuXL78IUhcYUib7uLHLL0PcxChCfK28vE2NO3JdHawwkOihip0C ewaA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 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=65N2yo3PdqEswNanfFwmLq6LeVTDvB7hxYrsYv/JhdI=; b=hcP3MOLMeSu9EZgsAKuMDDFwDZJi2oEpf518rhjIVpsfOFl/gRV4npNQS/Xs/i4st/ YM13PlAWoFeJM1uBFcRuUMApwN2dDUbYAy06xq+JJLOltp0gMQhU/XXyInVu+BtN9kTd WB7LaQ+aFSCb0HzsGD2xWGQXEoaCsjMMoXx5hnkcy/q3sAJ0UPOliVcrkGWhXb7EqT+0 ILFmAOE876wQL9W6KAm5mo1V2SE2UWNslTjjMCxk2/vNEc8HRRllae/htfZXdXy8rUD9 wE9HM/tzAi5ojlzDChvU7GMLMPzaqp3i9yGQ+mm4YBsTZw+QX9liPiPdH5Vcf0EpSDar PVfg== 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=65N2yo3PdqEswNanfFwmLq6LeVTDvB7hxYrsYv/JhdI=; b=O6Vh8ahmD+UElGZ7Jd2YsEkPssbi7QltGxjKIJFcIzES1g2xtZ9I8B4Ms5nzKHfE1c FfDgH43KbPGSSEr63Qgf+858lJ6fjbjyRg1COwSVLcCwibiRS0v073xcyXK922BsnMA7 pJ1lth6/O+gFv42hy2e5sW6duJqxoaW/Dhx5I81QCMikwSv1QY3TKl7L3bG7lSaXAdhC VOzhJuSi0e6W8fYHZVXC5jCHPg7hC0gSDlXrbzx1ZmL86/C2H7y4FTZ6hUPM8Qu7hfd1 sdoD0CSCxTbue5ES1eGg5YuVCp+FJkOxxC+umyxP4HmyZTOnwVGPvQDXVIV3Z5DeyDCk fVeQ== Sender: swupdate@googlegroups.com X-Gm-Message-State: AGi0PuYFMB3QQdpPFZGia1GwWVwo8Sk58ksl9cyMupMgMolKT8B03j5o NjMpuXY5fKfJsOe54ftT0W4= X-Google-Smtp-Source: APiQypIhDYF6z0gfrpcHtJBlgHqhgupPALrV0QFnw03BEbxBfbWdrT3EVrXKTDHgYeqzdjMgLTx5Ww== X-Received: by 2002:adf:ef08:: with SMTP id e8mr19242908wro.66.1586079891743; Sun, 05 Apr 2020 02:44:51 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a1c:6402:: with SMTP id y2ls4156407wmb.1.canary-gmail; Sun, 05 Apr 2020 02:44:50 -0700 (PDT) X-Received: by 2002:a05:600c:2214:: with SMTP id z20mr53909wml.189.1586079890864; Sun, 05 Apr 2020 02:44:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586079890; cv=none; d=google.com; s=arc-20160816; b=R2VMbKsq7GDsNsgJ/hHRj21/EN1xmvkvLLIIoDfThVt648KBB+LodZicE0pEbKSzgC mue2CrJhiuilEmqlipjEf+pCcyDnj8gV2g7At1L8oup8mBTOh8iW7hzSVWx6fFGgRjWR znTJqJinVigB1fwuXE+zOsF2jSD9LriW6qzaXJg6X397SZFL3hMGbiH2fNNNKMGQM31y +gzFlcaPXHuiOkMa+KlTGcqbrKjN1ZrdzPivGwznqI0TuCoYhmo3qnPUlyH4ifWkDVDr 6pH+9WmlRzsJEaKgfm+LOr0v4Bv3jr5O2linc9Sj+atQ4mcks1tqRF82rwceeFetAV3C ubmg== 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=uHaALVUWSfcW6zFBokQcOGbc3JDsle1N2e7UlsGAVg4=; b=y26cqpJKKPadv+SHum4ujsNovUs3HuMWCiM/defPliqwkFiQgtwRNSaWb+yqcRwbMv BfoNUr2n6VCxT/iAIJdQgRNgHzWTjJMpsndL0mtHLYqFdGecUiyQccniiJKsRm1siWme +gTy5/URqPF0xTHc3wm8b9yjL4KwPsfCleMDviNaFL70CHf8+dC26MmXGA4XWnUtLT34 BNHLKWopSXGtMiAd0rPcUST8IPATNqQU1Vvl3Rops8fMCuo8PMBoKhVsty9SApDSVCd2 wtxlnSsUjbe61BRWAm6JhMzcwuSyYnIMNWNDBU1O7KKT2Pnh6sdMw1F/IYaepPm4iTl8 5bqA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 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. [2001:a60:0:28:0:1:25:1]) by gmr-mx.google.com with ESMTPS id l20si258583wrc.0.2020.04.05.02.44.50 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Apr 2020 02:44:50 -0700 (PDT) Received-SPF: neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=2001:a60:0:28:0:1:25:1; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 48w80L52Pxz1rpFv; Sun, 5 Apr 2020 11:44:50 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 48w80L4qLQz1qqkk; Sun, 5 Apr 2020 11:44:50 +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 KER4xCqNfQ4e; Sun, 5 Apr 2020 11:44:50 +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; Sun, 5 Apr 2020 11:44:50 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 71E2C454060A; Sun, 5 Apr 2020 11:44:50 +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 GkzFISAh2yHF; Sun, 5 Apr 2020 11:44:48 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.38]) by babic.homelinux.org (Postfix) with ESMTP id 51B5D454063F; Sun, 5 Apr 2020 11:44:44 +0200 (CEST) From: Stefano Babic <sbabic@denx.de> To: swupdate@googlegroups.com Cc: Stefano Babic <sbabic@denx.de> Subject: [swupdate] [PATCH] Do not raise ERROR if MTD is not present Date: Sun, 5 Apr 2020 11:44:43 +0200 Message-Id: <20200405094443.10201-1-sbabic@denx.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
Do not raise ERROR if MTD is not present
|
expand
|
diff --git a/corelib/mtd-interface.c b/corelib/mtd-interface.c index 9a193d9..bdc109b 100644 --- a/corelib/mtd-interface.c +++ b/corelib/mtd-interface.c @@ -141,8 +141,8 @@ void mtd_init(void) flash->libmtd = libmtd_open(); if (flash->libmtd == NULL) { if (errno == 0) - ERROR("MTD is not present in the system"); - ERROR("cannot open libmtd"); + WARN("MTD is not present in the system"); + WARN("cannot open libmtd"); } } @@ -388,7 +388,7 @@ int scan_mtd_devices (void) bool black; if (!libmtd) { - ERROR("MTD is not present on the target"); + WARN("MTD is not present on the target"); return -1; } err = mtd_get_info(libmtd, mtd_info);
If MTD is not present on device, raise a WARN instead of an error. MTD could be ininfluent or an update, and if it is required, a runtime error will be raised when it tries to access. Signed-off-by: Stefano Babic <sbabic@denx.de> --- corelib/mtd-interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)