
Anton Vorontsov wrote:
Thanks for review Jerry.
On Wed, Sep 16, 2009 at 08:59:14AM -0400, Jerry Van Baren wrote: [...]
Below is a *HAND MODIFIED* (i.e. probably broken) edit of Anton's patch reflecting my thoughts.
I'll leave it up to Anton and Kumar... I'm OK with Anton's original patch and you have my Acked-by: Gerald Van Baren vanbaren@cideas.com or you can verify and adopt my proposed change (more work :-() and add a Signed-off-by: Gerald Van Baren vanbaren@cideas.com to Anton's s-o-b.
Thanks, gvb
[...]
#ifdef CONFIG_OF_STDOUT_VIA_ALIAS
+#ifdef CONFIG_SERIAL_MULTI +static void fdt_fill_sername(char *sername, size_t maxlen) +{
- const char *outname = stdio_devices[stdout]->name;
- if (strcmp(outname, "serial") > 0)
strncpy(sername, outname, maxlen);
(1)
- /* eserial? */
- if (strcmp(outname + 1, "serial") > 0)
strncpy(sername, outname + 1, maxlen);
+} +#else +static inline void fdt_fill_sername(char *sername, size_t maxlen) +{
- sprintf(sername, "serial%d", CONFIG_CONS_INDEX - 1);
This case is also needed with multiserial, since 'serial' is what you get by default, and (1) doesn't account 'serial' name.
Ahh, whups, missed that.
So, we can either leave the patch as, or duplicate some code for multiserial case, or do this ugly thing (I quite dislike #ifdef like this, i.e. inside the code flow):
[snip]
Though, I'll do whatever you prefer.
Lets use the original patch.
Acked-by: Gerald Van Baren vanbaren@cideas.com
Thanks, gvb