public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [patch] Improve progres bar for booting from USB stick.
@ 2008-12-04 21:25 Remy Bohmer
  2008-12-15 23:16 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Remy Bohmer @ 2008-12-04 21:25 UTC (permalink / raw)
  To: u-boot

An embedded and charset-unspecified text was scrubbed...
Name: improve-progress-printing-booting-from-usbstick.patch
Url: http://lists.denx.de/pipermail/u-boot/attachments/20081204/e1c00ade/attachment.txt 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] [patch] Improve progres bar for booting from USB stick.
  2008-12-04 21:25 [U-Boot] [patch] Improve progres bar for booting from USB stick Remy Bohmer
@ 2008-12-15 23:16 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2008-12-15 23:16 UTC (permalink / raw)
  To: u-boot

Dear Remy Bohmer,

In message <49384d2b.01b2420a.53e2.7d63@mx.google.com> 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.
> 
> Signed-off-by: Remy Bohmer <linux@bohmer.net>
> ---
>  common/usb_storage.c |    7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> Index: u-boot-usb.new/common/usb_storage.c
> ===================================================================
> --- u-boot-usb.new.orig/common/usb_storage.c	2008-12-04 21:59:18.000000000 +0100
> +++ u-boot-usb.new/common/usb_storage.c	2008-12-04 22:00:59.000000000 +0100
> @@ -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;
>  }
>  
> -
>  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

-- 
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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-15 23:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-04 21:25 [U-Boot] [patch] Improve progres bar for booting from USB stick Remy Bohmer
2008-12-15 23:16 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox