]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
video: Handle the 'bell' character
authorSimon Glass <sjg@chromium.org>
Fri, 15 Jan 2016 01:10:38 +0000 (18:10 -0700)
committerAnatolij Gustschin <agust@denx.de>
Sat, 30 Jan 2016 09:55:02 +0000 (10:55 +0100)
This can be sent when to many characters are entered. Make sure it is
ignored and does not cause a character to be displayed.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/video/vidconsole-uclass.c
test/dm/video.c

index 3145fd8d6f9bab4f4ec810e4ac162153b0e08df3..4c0efd52f5cf03e2741a366b5095ee1a5528fb11 100644 (file)
@@ -91,6 +91,9 @@ int vidconsole_put_char(struct udevice *dev, char ch)
        int ret;
 
        switch (ch) {
+       case '\a':
+               /* beep */
+               break;
        case '\r':
                priv->xcur_frac = 0;
                break;
index be94633f7420061f5aa84ba9692fe42a8c879a53..4e3f9d558f403d8f1f7496aabd857bf542e32112 100644 (file)
@@ -124,7 +124,7 @@ DM_TEST(dm_test_video_text, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
 static int dm_test_video_chars(struct unit_test_state *uts)
 {
        struct udevice *dev, *con;
-       const char *test_string = "Well\b\b\b\bxhe is\r \n\ta very modest  \bman\n\t\tand Has much to\b\bto be modest about.";
+       const char *test_string = "Well\b\b\b\bxhe is\r \n\ta very \amodest  \bman\n\t\tand Has much to\b\bto be modest about.";
        const char *s;
 
        ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));