Skip to contentSkip to conversation

fastboot: update error and warning messages

PATCH New Steve Rae 3 participants 5 messages Jan 27, 2016 – Feb 16, 2016 USB

lore
Share & tools
lore

Steve Rae

author
#0 lore raw

PATCH 1/1 fastboot: update error and warning messages

Fix the formatting in error messages, and demote one error message to a warning, as it is only informational.

---

 drivers/usb/gadget/f_fastboot.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/usb/gadget/f_fastboot.c +5 -5
index 87e54eb..a54b4ee 100644
@@ -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");
 		}
 	}
Signature · 1 line
1.8.5
#1 lore raw

PATCH 1/1 fastboot: update error and warning messages

Quoted 4 lines · Steve Rae

Fix the formatting in error messages, and demote one error message to a warning, as it is only informational.

I'd leave this to Lukasz, if he doesn't respond, ping me in a week or so.

Best regards,
Marek Vasut

author
#2 lore raw

PATCH 1/1 fastboot: update error and warning messages

ping -- Thanks!

Quoted 11 lines · Marek Vasut
Quoted 4 lines · Steve Rae

Fix the formatting in error messages, and demote one error message to a warning, as it is only informational.

I'd leave this to Lukasz, if he doesn't respond, ping me in a week or so.

Best regards,
Marek Vasut

#3 lore raw

PATCH 1/1 fastboot: update error and warning messages

Quoted 14 lines · Steve Rae

ping -- Thanks!

Quoted 11 lines · Marek Vasut
Quoted 4 lines · Steve Rae

Fix the formatting in error messages, and demote one error message to a warning, as it is only informational.

I'd leave this to Lukasz, if he doesn't respond, ping me in a week or so.

Best regards,
Marek Vasut

Applied to u-boot-usb/master, thanks!

#4 lore raw

PATCH 1/1 fastboot: update error and warning messages

Hi Marek,

Quoted 10 lines · Steve Rae
Quoted 9 lines

ping -- Thanks!

Quoted 6 lines · Marek Vasut
Quoted 4 lines · Steve Rae

Fix the formatting in error messages, and demote one error message to a warning, as it is only informational.

Quoted 9 lines
Quoted 6 lines
Quoted 6 lines

I'd leave this to Lukasz, if he doesn't respond, ping me in a week or so.

Best regards,
Marek Vasut

Applied to u-boot-usb/master, thanks!

+1

Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group