From patchwork Tue Sep 25 14:40:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 147468 Delivered-To: patches@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp812427lji; Tue, 25 Sep 2018 07:40:36 -0700 (PDT) X-Received: by 2002:a19:4f47:: with SMTP id a7-v6mr1010929lfk.121.1537886435969; Tue, 25 Sep 2018 07:40:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537886435; cv=none; d=google.com; s=arc-20160816; b=ZIwwU/1hTC2t8x6JrDIz2z0jE6XCxSV0fUISKQEaAQF5x9rk/mjDsPk5zpEFYoPuG3 QJ548sAbPaN3pOHqnNfhpPB/a/YJXPDTxijw66YnS2gxFR79a/eU8oQUB5+PzG9F1WvU fu+jYQyUSuIcsrdNDHjcjsligXQNADavZPzTcj7m7mFn7xEs7XgkTkLyejA60CZf6Uf5 p1Tzm/FTwQLDHRAHeMTxAvbdOUHphvZOdCUdZqh02hpWnngKlARM+sh9Ae7VvRevMvfY kgEHGy2e9TWellbrWzYoqL0n6anSHDX5Peupqqqh6ijaE2GMVnIa54+FIiyxc8a2x8jq sRmQ== 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; bh=h6g+h+ZtnoYTDzdxUc+VajLlQroiy/9mFI7V8zec+L0=; b=0bJj3RSajJb7AcduQzkoChyxd9FBAci91xyrO9OSKY2GcIWXaWX09CKwM1kvmiibO8 7cM9VOA5TPzEd4PO0pgBq2PKuKleW79Mp8AkzREBDTtvSyYodojUtDWiake/f/QMALAx qdTYYbevUMc1ys0XivYeVNtw0lemEcRqGRXFS8PJcMij4w8lW52MnCDdXDZKaiiP8X/q +9OarqzakER+8BZ+LQAB4swMGCa03K3YazEgKgbqcWPJBkGPLBQilUSORvELXOBhDCaT msHuqqHGkwtO1IUwjIR5EJeMPBYbfM4kUxzTkxJVUhRNMk3mev3h+7ycxhYNUYyfGQxa pCdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hH46xv6r; 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 h126-v6sor1179332lfg.22.2018.09.25.07.40.35 for (Google Transport Security); Tue, 25 Sep 2018 07:40:35 -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=hH46xv6r; 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=hH46xv6rZ5cY7fJdzie1jALgzjWbL40uAylL191Uc9D+dJfbEswEbMtFl2/SSUX/m/ J0C8aDQG3xiiBJy/P8Mp17n/cV7mqIpi4m082ZNbnA6opjoxr66xytf7yjPfJe+LOEH/ AzOfuEE5SpwJUwXeTk4tK91chnUinFe51okiY= 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=VmaFxY/NCsCJlLfjosuZQToKTrCjj0wa/nJrNTskOuMG7Q9dbpd8nR6qPhaWEgvCji xsslBWDaonC6xsE0Or4EQ1Rbzkd/kzQdpk9XxwEH338Z0zVzoqcP7Toy3oppvOCiOH0y 62Bpy2YjJuqZTBp7HPJKjCLBvTJAjY2XDI261nsV44GBsXsesgax8jt29lVLY2AGHWNK sc/3Z9USqrqizbI3Zt+loTA7we8mKqtv4Tn0nXrd84FWKTDWfFI//YO3iQsnX/6D7BCM qxkEBKtemR3B2eedWCZ1yRP2z3Ae4gAzcT1hCy9mNMayaDq3KR3cghIhBjcbmOeRRGCy eiDg== X-Gm-Message-State: ABuFfog4bnykD+7fXe/TFVQRZWUZ2m5C62ErH8fDJ2wnXrORrlQErO1W O5yu4ffEqwdAh8UC09IK5OFe1OWS X-Google-Smtp-Source: ACcGV63AZqyeZ7RRhmaX2LQ0Ayad7IrwfKnj8ZcSaXn41hkOAWd6cUHuPLpBREY0gAudsp7IoY7Tgg== X-Received: by 2002:a19:2288:: with SMTP id i130-v6mr1103258lfi.50.1537886435438; Tue, 25 Sep 2018 07:40:35 -0700 (PDT) Return-Path: Received: from jax.urgonet (h-84-105.A175.priv.bahnhof.se. [79.136.84.105]) by smtp.gmail.com with ESMTPSA id g14-v6sm14483lja.96.2018.09.25.07.40.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Sep 2018 07:40:34 -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 v4 03/19] cmd: avb: print error message if command fails Date: Tue, 25 Sep 2018 16:40:07 +0200 Message-Id: <20180925144023.24555-4-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180925144023.24555-1-jens.wiklander@linaro.org> References: <20180925144023.24555-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; }