public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Add background serial print and correct	search_device function
Date: Sat, 6 Sep 2008 20:29:33 +0200	[thread overview]
Message-ID: <20080906182933.GG1249@game.jcrosoft.org> (raw)
In-Reply-To: <1219251490-26134-1-git-send-email-ryan.chen@st.com>

On 12:58 Wed 20 Aug     , Ryan CHEN wrote:
> The patch introduces a new macro 'CFG_BG_CONSOLE_SERIAL'.
> It means print messages through serial port although current console isn't serial port.
> It is important for debugging and looks like multi-consoles in Linux but without input.
> 
> Another modification in the patch is that verify if search_device function found device. 
> If found, return dev. Otherwise, return NULL.
> 
> Signed-off-by: Ryan Chen <ryan.chen@st.com>
> 
> ---
>  common/console.c |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)
> 
  
>  void fprintf (int file, const char *fmt, ...)
> @@ -377,6 +385,7 @@ device_t *search_device (int flags, char *name)
>  {
>  	int i, items;
>  	device_t *dev = NULL;
> +	int found_flag = 0;
>  
>  	items = ListNumItems (devlist);
>  	if (name == NULL)
> @@ -385,9 +394,13 @@ device_t *search_device (int flags, char *name)
>  	for (i = 1; i <= items; i++) {
>  		dev = ListGetPtrToItem (devlist, i);
>  		if ((dev->flags & flags) && (strcmp (name, dev->name) == 0)) {
> +			found_flag = 1;
>  			break;
>  		}
>  	}
> +	
> +	if(!found_flag)
> +		return NULL;
>  	return dev;
>  }

This part is no more need, It's already fix by this commit
c1de7a6daf9c657484e1c6d433f01fccd49a7f48

Best Regards,
J.

      parent reply	other threads:[~2008-09-06 18:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20 16:58 [U-Boot] [PATCH] Add background serial print and correct search_device function Ryan CHEN
2008-09-06 15:48 ` Wolfgang Denk
2008-09-06 18:29 ` Jean-Christophe PLAGNIOL-VILLARD [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080906182933.GG1249@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox