From patchwork Fri Jan 22 11:27:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 368619 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp1424137jam; Fri, 22 Jan 2021 03:27:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJpr8gEnSWEHJQBiMTU9IWoGRsbKzqeATcKs3QLSkJ9tDjYrM3wV3xe/eBpso9Dr2ZkBvT X-Received: by 2002:a05:6402:70f:: with SMTP id w15mr2862694edx.121.1611314867374; Fri, 22 Jan 2021 03:27:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611314867; cv=none; d=google.com; s=arc-20160816; b=MKubteW3aQ1cDjD2ip+utl2zAAAW/W44tOk7lyS1BFYgGhtyrApwIMscNzYd5XdOmZ DOoWBGFSbMBV82iY9iyr5U4uXaXwkKN8FqmPO8EDBYESlGb8HQeaCfdwIfVWG4S8F0ZF J2yRhHWds53uCs26TTBYB9Eu9Cw8DIgMKPWlCVeiJCc0VNjUQTadSYBMRO2RbgEEB8D1 /ly2P8NyKoCwUkV7OljLUNNJPL5oKWU4cpIwMNjD5H9ioCNqhqcEtruGjyilZ39vJvBT ElnWChKIWcsyLy2CM9PpnYo9c+tFkOMED4WXfjPjJvpT6u1nFcIFZNA5UyEIOkPGnBnw UPBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:cms-type:message-id :date:subject:cc:to:from:dkim-signature:dkim-filter; bh=RzpdX1Q75pjTW74j0M0PBlyTOgqDdF1ihR4j1bn0bUY=; b=ClnI48q5GBGImfk/So3/skdqOONkFKgwzTDky3MvKjDWNwtm28IvA2CUPOsrLeQlKV 9l6pFHx0p5p4c2PSOKr0l64nkbChjlivHCctJP2ZVVu/1g3pwsNPL/kvnLon9sZ2yPnW TdiNz3Ysby2dgWht7x3OaRne/kM2hPVSWWA9qD1JzTmd2mgFo3GuCcydv2qvnDQBDapG xRIoYVU6CEM7JzVJrAFKk3U70H55Se+90TAaS/ke4cy4pnxSzoOmcl0QLBbRPAQtSBov NTL7a43XQKhl1j089d0nqBJc6CxbPPsCfymIaJ0irDV2l/H06S0OLBft96wRkpTVGeJy Ny8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=lYoRLgm8; 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=samsung.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id y13si3481535edv.304.2021.01.22.03.27.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jan 2021 03:27:47 -0800 (PST) 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=@samsung.com header.s=mail20170921 header.b=lYoRLgm8; 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=samsung.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 73FBB827A0; Fri, 22 Jan 2021 12:27:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=samsung.com header.i=@samsung.com header.b="lYoRLgm8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 912D6827BD; Fri, 22 Jan 2021 12:27:43 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CFCFD8279F for ; Fri, 22 Jan 2021 12:27:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=m.szyprowski@samsung.com Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20210122112740euoutp02628419cec6d7726e90911d8373acc4cf~cilP97Jzu2999229992euoutp02T for ; Fri, 22 Jan 2021 11:27:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20210122112740euoutp02628419cec6d7726e90911d8373acc4cf~cilP97Jzu2999229992euoutp02T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1611314860; bh=RzpdX1Q75pjTW74j0M0PBlyTOgqDdF1ihR4j1bn0bUY=; h=From:To:Cc:Subject:Date:References:From; b=lYoRLgm8KMmzMwfvnxciWUD2BAwOYBQA6BPAlwTIqiVD07dl+LwASb1ePEZ48lMpg UKZpiUS4qygE5pj/UHGXW80qrGpTx/XgJpldRNqRCTeuHdEXZ2ZY3s3VfJ6lSNSRul 7JD6rHCH6zGFVZrdKupeVihigRKTRR+O6mbnB2K4= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20210122112739eucas1p1fd30aa021520cf2e381416b6ae340d2a~cilPs1wgq1873718737eucas1p1V; Fri, 22 Jan 2021 11:27:39 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 70.85.44805.BA6BA006; Fri, 22 Jan 2021 11:27:39 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20210122112739eucas1p1ae7fa48eea75d2bf85f132f05eeb229b~cilPRIQw-1671816718eucas1p1X; Fri, 22 Jan 2021 11:27:39 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210122112739eusmtrp1e3de9d7c4e5154b2846e399d902bc9be~cilPQkoDL1850918509eusmtrp1X; Fri, 22 Jan 2021 11:27:39 +0000 (GMT) X-AuditID: cbfec7f4-b37ff7000000af05-58-600ab6abd627 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 77.C0.16282.BA6BA006; Fri, 22 Jan 2021 11:27:39 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210122112738eusmtip2f88e44d24294901455fb5457ecbbe947~cilO1h-Ni0039700397eusmtip2M; Fri, 22 Jan 2021 11:27:38 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de Cc: Marek Szyprowski , Simon Glass , Jaehoon Chung , Bartlomiej Zolnierkiewicz Subject: [PATCH] cmd: misc: Fix return value for the sleep command Date: Fri, 22 Jan 2021 12:27:31 +0100 Message-Id: <20210122112731.10956-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAA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LMWRmVeSWpSXmKPExsVy+t/xe7qrt3ElGPx5z2GxccZ6Vosbv9pY LdYeuctu8W3LNkaLt3s72R1YPWY3XGTxOHtnB6NH35ZVjAHMUXo2RfmlJakKGfnFJbZK0YYW RnqGlhZ6RiaWeobG5rFWRqZK+nY2Kak5mWWpRfp2CXoZbfN2MxfsYqk4flW8gfEYcxcjJ4eE gInEmr/f2LoYuTiEBJYySrRfO8sGkZCRODmtgRXCFpb4c60LqugTo8Tpm7PAutkEDCW63naB NYgISEj86r/KCFLELLCZUWLt7N9MIAlhASeJpv6HYDaLgKpEy4ZzYM28ArYS6+8chzpDXmL1 hgPMExh5FjAyrGIUSS0tzk3PLTbSK07MLS7NS9dLzs/dxAgMr23Hfm7Zwbjy1Ue9Q4xMHIyH GCU4mJVEeB9ZciQI8aYkVlalFuXHF5XmpBYfYjQF2jeRWUo0OR8Y4Hkl8YZmBqaGJmaWBqaW ZsZK4rwmR9bECwmkJ5akZqemFqQWwfQxcXBKNTDVVy/eOO/gSgcpxbaParK7EladXspesuTL p+q0GStyzK9fMNw5+covlUNz31zm7Vhxc96tinD7U9nx9Y8n1yZpVDvZql7Wcz919ViVUPP2 uzeaT2b/VNGreRFz3ERBqlVyrcndG07PrrLuzLjoFhnbePl0XunZ4xvcrp5Oldx15+Sjo9/e f7LhWLDB+X/8qtTphzVvBd3rFqktWbvg/hnVV5cu7bxwfvXSm/LV/LyGU9OF52zZ8DhSiO9a 41FXKw+D2Ru6DbZ/jfucfKic7y2rRJXn1GXLNndZ/Jnj4bRsxrUa1VdbzPsm/2uRqrv33Ls5 KkxNj11pd6p9wam1Yq9E2Ry91j82nuhzTWhamciVNCWW4oxEQy3mouJEAIdD3C+4AgAA X-CMS-MailID: 20210122112739eucas1p1ae7fa48eea75d2bf85f132f05eeb229b X-Msg-Generator: CA X-RootMTR: 20210122112739eucas1p1ae7fa48eea75d2bf85f132f05eeb229b X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20210122112739eucas1p1ae7fa48eea75d2bf85f132f05eeb229b References: X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean If sleeping has been interrupted, return CMD_RET_FAILURE instead of -1 (CMD_RET_USAGE). Signed-off-by: Marek Szyprowski --- cmd/sleep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 Reviewed-by: Simon Glass Reviewed-by: Jaehoon Chung diff --git a/cmd/sleep.c b/cmd/sleep.c index f0c78a8efb..1fff400c79 100644 --- a/cmd/sleep.c +++ b/cmd/sleep.c @@ -40,7 +40,7 @@ static int do_sleep(struct cmd_tbl *cmdtp, int flag, int argc, while (get_timer(start) < delay) { if (ctrlc()) - return (-1); + return CMD_RET_FAILURE; udelay(100); }