From patchwork Mon Sep 3 14:46:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 145800 Delivered-To: patches@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp2575417ljw; Mon, 3 Sep 2018 07:47:23 -0700 (PDT) X-Received: by 2002:a2e:7c12:: with SMTP id x18-v6mr4932987ljc.71.1535986043296; Mon, 03 Sep 2018 07:47:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535986043; cv=none; d=google.com; s=arc-20160816; b=NXImKWZbcO2naUXawg6+hpzgMDidQ3bn/tQ1YLvGDScr19i5Zpgep9QdlDyuYSwvWU 3FR55exIJJUqxw3+AOLzRQD1SNgPRkesojOdynlZubxBigZaHNm6Z3VZcq3JyIYX9c6S CsVUzxZm/bKOx/hciXeNIIMC/gY2Ed57Ce+nzXy+UWFDF/CQGNIMayBvuqqBvqR18hdV lVYpPbLmQ8Q/kQjrkpN8FGuvhjPwzUMH2VvFicXXaosdiFQZYcdpv3xChkCX+RwGxDFq oRsNYSGHRxhEF90lnsPqYPTCq+3ECdRdZIlyJsWtG6NdOWw0E3L14U9KJgw6dIGsClQE MWUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=h6g+h+ZtnoYTDzdxUc+VajLlQroiy/9mFI7V8zec+L0=; b=xYzOcAmYww2WjH2XwA7tgYvgIPnpyK3TtBj0all4F/IaOge/gSqr4EJiT2Nev2MCJt BHbGEd40f21j1IyHp4tnV7QaXc2EN18f2jeU55t8nDW+Dbml2mgXZAW7SGo8f5nLkopi JV0Hk+lPnc1EvBeEsb83d16De1zBbK5lI5+gYQGOMh+M3wj0xcV6r5QMZkODEXC6tT/b NU32k2dkthGs6yTcOTof/6cfx8lMnUgTWFhWwKTVJ+aX4rjDQgztdlJntiSk5xyWqQ+l p4qfGvzgd0mHgvFqKBJKgVczbuBRIRwkwkRJennVL8rUqrLWjN9rUkwcgqrM/dlDZq31 2pRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bdS2U6W9; spf=pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=jens.wiklander@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 17-v6sor7841251ljs.22.2018.09.03.07.47.23 for (Google Transport Security); Mon, 03 Sep 2018 07:47:23 -0700 (PDT) Received-SPF: pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bdS2U6W9; spf=pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=jens.wiklander@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=h6g+h+ZtnoYTDzdxUc+VajLlQroiy/9mFI7V8zec+L0=; b=bdS2U6W9BvJ5G+uj1zd2oPxOI8j7ddbGtL3QM0os2NjSj/Ufhq2PmrVHuZYHqIphci rKdY24dIBITlMYUcZMB/EEpbANUcGMUgxow+hRalRjdp8odZZJRfg9O9Ec2eIvhuiObt ZKoQQ0uV77KNzBn041qzjbMxtOeVZnYGzaqXI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=h6g+h+ZtnoYTDzdxUc+VajLlQroiy/9mFI7V8zec+L0=; b=lluOmSjHgW2Guwxv5waSnCF5wIIPIFr/woru1G5OSOoUXsmbT5TYOxoDYEKZ7sew2l Jki5X5mRNwJcusy+gSastBRgZAnlFKg+TjeW1g0yeEYj8mQ9IfFnvYJktKFUh+d8CN6H JVwoSDexmsJgVtDhqSkGWft/0OoRc3lJrTnU5sYFOvltiMpqBGLSX6qQojfFG2xbGFfK aC8XrbQCR7XRtIqRsdTTFUwZBSGvwKzNDohuBMLXF0OS9D+rD1zikb+qVe89j+vEgAYa 9G0ccVpAwNEPSxRKJw/XsSToeApoeHcnsMIaUGRH1nWA+8/AGrwpa3ljyRxJzaYKSWTZ Km/A== X-Gm-Message-State: APzg51AjzN/4DJpb5mm2Yb8m583yhWVz2q88Dw6zLCF7hzms5FH64Zyh c0UZE+OWnDqTmkganCFzm7KSesic X-Google-Smtp-Source: ANB0VdZPX4LbUIvAGwEvM4XblKfAcOih+j72zizr4CcneGZ8HN8EvDMnYAvMQ8V4o2yEgT5YjHwezg== X-Received: by 2002:a2e:990b:: with SMTP id v11-v6mr17578691lji.87.1535986043117; Mon, 03 Sep 2018 07:47:23 -0700 (PDT) Return-Path: Received: from jax.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id w18-v6sm3343431ljd.73.2018.09.03.07.47.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Sep 2018 07:47:22 -0700 (PDT) From: Jens Wiklander To: u-boot@lists.denx.de Cc: Simon Glass , Igor Opaniuk , Tom Rini , Jaehoon Chung , Pierre Aubert , Albert Aribaud , Peter Griffin , Michal Simek , Jens Wiklander Subject: [PATCH v3 03/20] cmd: avb: print error message if command fails Date: Mon, 3 Sep 2018 16:46:54 +0200 Message-Id: <20180903144711.31585-4-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180903144711.31585-1-jens.wiklander@linaro.org> References: <20180903144711.31585-1-jens.wiklander@linaro.org> Reviewed-by: Simon Glass Signed-off-by: Jens Wiklander --- cmd/avb.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -- 2.17.1 diff --git a/cmd/avb.c b/cmd/avb.c index ca4b26d5d7b3..ff00be4cee38 100644 --- a/cmd/avb.c +++ b/cmd/avb.c @@ -35,6 +35,8 @@ int do_avb_init(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (avb_ops) return CMD_RET_SUCCESS; + printf("Failed to initialize avb2\n"); + return CMD_RET_FAILURE; } @@ -65,6 +67,8 @@ int do_avb_read_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return CMD_RET_SUCCESS; } + printf("Failed to read from partition\n"); + return CMD_RET_FAILURE; } @@ -108,6 +112,8 @@ int do_avb_read_part_hex(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } + printf("Failed to read from partition\n"); + free(buffer); return CMD_RET_FAILURE; } @@ -138,6 +144,8 @@ int do_avb_write_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return CMD_RET_SUCCESS; } + printf("Failed to write in partition\n"); + return CMD_RET_FAILURE; } @@ -161,6 +169,9 @@ int do_avb_read_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) printf("Rollback index: %llx\n", rb_idx); return CMD_RET_SUCCESS; } + + printf("Failed to read rollback index\n"); + return CMD_RET_FAILURE; } @@ -184,6 +195,8 @@ int do_avb_write_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) AVB_IO_RESULT_OK) return CMD_RET_SUCCESS; + printf("Failed to write rollback index\n"); + return CMD_RET_FAILURE; } @@ -210,6 +223,8 @@ int do_avb_get_uuid(cmd_tbl_t *cmdtp, int flag, return CMD_RET_SUCCESS; } + printf("Failed to read UUID\n"); + return CMD_RET_FAILURE; } @@ -320,6 +335,8 @@ int do_avb_is_unlocked(cmd_tbl_t *cmdtp, int flag, return CMD_RET_SUCCESS; } + printf("Can't determine device lock state.\n"); + return CMD_RET_FAILURE; }