From: Luke Kim Date: Wed, 29 Nov 2006 14:13:45 +0900 Subject: [U-Boot-Users] console initialization Message-ID: <000601c71375$255dbcb0$8af938d3@astelluke> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear U-boot Developers Hello, my name is Luke Kim from Korea. I've been looking at the u-boot code for debugging, and I think I found something in function 'console_init_r' function in file 'common/console.c'. /***********************line 505****************************/ /* Scan devices looking for input and output devices */ for (i = 1; (i <= items) && ((inputdev == NULL) || (outputdev == NULL)); i++ ) { device_t *dev = ListGetPtrToItem (devlist, i); if ((dev->flags & DEV_FLAGS_INPUT) && (inputdev == NULL)) { inputdev = dev; } if ((dev->flags & DEV_FLAGS_OUTPUT) && (outputdev == NULL)) { outputdev = dev; } } /* Initializes output console first */ if (outputdev != NULL) { console_setfile (stdout, outputdev); console_setfile (stderr, outputdev); } /* Initializes input console */ if (inputdev != NULL) { console_setfile (stdin, inputdev); } gd->flags |= GD_FLG_DEVINIT; /* device initialization completed */ At the last line, it sets the 'GD_FLG_DEVINIT' flag. But doesn't it have to check 'inputdev' and 'outputdev' first to check if it's NULL? I think functions such as 'fputc' will malfunction if the 'GD_FLG_DEVINIT' flag is set when 'stdio_devices' are NULL. Best Regards Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.denx.de/pipermail/u-boot/attachments/20061129/a3f883ab/attachment.htm