]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/bios_emulator/x86emu/debug.c
Unified codebase for TX28, TX48, TX51, TX53
[karo-tx-uboot.git] / drivers / bios_emulator / x86emu / debug.c
index 29fe3f169edd4a80051e110cf8b05c1b92409efa..6417d099988d27b392caf8fcd9a4e9e8af4c7ca0 100644 (file)
@@ -39,9 +39,7 @@
 
 #include <stdarg.h>
 #include <common.h>
-
-#if defined(CONFIG_BIOSEMU)
-
+#include <linux/ctype.h>
 #include "x86emu/x86emui.h"
 
 /*----------------------------- Implementation ----------------------------*/
@@ -336,7 +334,7 @@ static int x86emu_parse_line(char *s, int *ps, int *n)
        int cmd;
 
        *n = 0;
-       while (*s == ' ' || *s == '\t')
+       while (isblank(*s))
                s++;
        ps[*n] = *s;
        switch (*s) {
@@ -349,13 +347,13 @@ static int x86emu_parse_line(char *s, int *ps, int *n)
        }
 
        while (1) {
-               while (*s != ' ' && *s != '\t' && *s != '\n')
+               while (!isblank(*s) && *s != '\n')
                        s++;
 
                if (*s == '\n')
                        return cmd;
 
-               while (*s == ' ' || *s == '\t')
+               while (isblank(*s))
                        s++;
 
                *n += 1;
@@ -463,5 +461,3 @@ void x86emu_dump_xregs(void)
                printk("NC ");
        printk("\n");
 }
-
-#endif