Dear U-boot Developers
Hello, my name is Luke Kim
from
/***********************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