Use the existing function rather that duplicating the code. Also fix up
the missing error handling.
Signed-off-by: Simon Glass <sjg@chromium.org>
char *const argv[])
{
struct udevice *dev;
- const char *s;
+ int ret;
if (argc != 2)
return CMD_RET_USAGE;
if (uclass_first_device_err(UCLASS_VIDEO_CONSOLE, &dev))
return CMD_RET_FAILURE;
- for (s = argv[1]; *s; s++)
- vidconsole_put_char(dev, *s);
+ ret = vidconsole_put_string(dev, argv[1]);
+ if (!ret)
+ ret = video_sync(dev->parent, false);
- return video_sync(dev->parent, false);
+ return ret ? CMD_RET_FAILURE : 0;
}
U_BOOT_CMD(