Skip to contentSkip to conversation

Improve progres bar for booting from USB stick.

PATCH New Remy Bohmer 2 participants 2 messages Dec 4, 2008 – Dec 15, 2008

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 Improve progres bar for booting from USB stick.

Dear Remy Bohmer,

Quoted 17 lines · In message <[email protected]> you wrote:

The progress bar that is displayed during booting from USB stick runs out out the screen This change limits the 'dots' to 60 characters at most on a line.

---
 common/usb_storage.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Index: u-boot-usb.new/common/usb_storage.c
===================================================================

common/usb_storage.c +0 -1
@@ -175,10 +175,15 @@ block_dev_desc_t *usb_stor_get_dev(int i
 	return (index < USB_MAX_STOR_DEV) ? &usb_dev_desc[index] : NULL;
 }
 
-

common/usb_storage.c block_dev_desc_t *usb_stor_get_dev(int i · line 187

Quoted 10 lines
common/usb_storage.c +6 -0
 void usb_show_progress(void)
 {
+	static int cnt;
+
 	printf(".");
+	if (cnt++ == 60) {
+		cnt = 0;
+		printf("\n");
+	}
 }

We should use putc() here, in both calls.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It may be that your whole purpose in life is simply  to  serve  as  a
warning to others.