From patchwork Wed Jan 27 23:02:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Rae X-Patchwork-Id: 60666 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp132139lbb; Wed, 27 Jan 2016 15:04:13 -0800 (PST) X-Received: by 10.28.210.143 with SMTP id j137mr32244850wmg.13.1453935853465; Wed, 27 Jan 2016 15:04:13 -0800 (PST) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id h127si137666wmd.92.2016.01.27.15.04.12; Wed, 27 Jan 2016 15:04:13 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 229A9A7558; Thu, 28 Jan 2016 00:04:02 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ITTMNBXQ97C8; Thu, 28 Jan 2016 00:04:01 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8E69DA7537; Thu, 28 Jan 2016 00:04:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A0D37A74DA for ; Thu, 28 Jan 2016 00:03:58 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ir0ssJdVSSNO for ; Thu, 28 Jan 2016 00:03:58 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-gw3-out.broadcom.com (mail-gw3-out.broadcom.com [216.31.210.64]) by theia.denx.de (Postfix) with ESMTP id 229C84BE8A for ; Thu, 28 Jan 2016 00:03:46 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.22,356,1449561600"; d="scan'208";a="86348766" Received: from irvexchcas06.broadcom.com (HELO IRVEXCHCAS06.corp.ad.broadcom.com) ([10.9.208.53]) by mail-gw3-out.broadcom.com with ESMTP; 27 Jan 2016 15:44:12 -0800 Received: from IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) by IRVEXCHCAS06.corp.ad.broadcom.com (10.9.208.53) with Microsoft SMTP Server (TLS) id 14.3.235.1; Wed, 27 Jan 2016 15:03:40 -0800 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) with Microsoft SMTP Server id 14.3.235.1; Wed, 27 Jan 2016 15:03:39 -0800 Received: from mail.broadcom.com (unknown [10.136.4.105]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 871E4413EB; Wed, 27 Jan 2016 14:58:59 -0800 (PST) From: Steve Rae To: Date: Wed, 27 Jan 2016 15:02:41 -0800 Message-ID: <1453935761-24319-1-git-send-email-srae@broadcom.com> X-Mailer: git-send-email 1.8.5 MIME-Version: 1.0 Cc: Steve Rae , Marek Vasut Subject: [U-Boot] [PATCH] fastboot: update error and warning messages X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 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" Fix the formatting in error messages, and demote one error message to a warning, as it is only informational. Signed-off-by: Steve Rae --- drivers/usb/gadget/f_fastboot.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 1.8.5 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 87e54eb..a54b4ee 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -382,7 +382,7 @@ static void cb_getvar(struct usb_ep *ep, struct usb_request *req) strsep(&cmd, ":"); if (!cmd) { - error("missing variable\n"); + error("missing variable"); fastboot_tx_write_str("FAILmissing var"); return; } @@ -413,7 +413,7 @@ static void cb_getvar(struct usb_ep *ep, struct usb_request *req) else strcpy(response, "FAILValue not set"); } else { - error("unknown variable: %s\n", cmd); + printf("WARNING: unknown variable: %s\n", cmd); strcpy(response, "FAILVariable not implemented"); } fastboot_tx_write_str(response); @@ -561,7 +561,7 @@ static void cb_flash(struct usb_ep *ep, struct usb_request *req) strsep(&cmd, ":"); if (!cmd) { - error("missing partition name\n"); + error("missing partition name"); fastboot_tx_write_str("FAILmissing partition name"); return; } @@ -683,7 +683,7 @@ static void rx_handler_command(struct usb_ep *ep, struct usb_request *req) } if (!func_cb) { - error("unknown command: %s\n", cmdbuf); + error("unknown command: %s", cmdbuf); fastboot_tx_write_str("FAILunknown command"); } else { if (req->actual < req->length) { @@ -691,7 +691,7 @@ static void rx_handler_command(struct usb_ep *ep, struct usb_request *req) buf[req->actual] = 0; func_cb(ep, req); } else { - error("buffer overflow\n"); + error("buffer overflow"); fastboot_tx_write_str("FAILbuffer overflow"); } }