summaryrefslogtreecommitdiffstats
path: root/common/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/console.c')
-rw-r--r--common/console.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/common/console.c b/common/console.c
index a541892583..a67f169b42 100644
--- a/common/console.c
+++ b/common/console.c
@@ -164,7 +164,7 @@ int console_set_baudrate(struct console_device *cdev, unsigned baudrate)
if (cdev->f_active) {
mdelay(50);
do {
- c = getc();
+ c = getchar();
} while (c != '\r' && c != '\n');
}
@@ -208,8 +208,8 @@ static void console_set_stdoutpath(struct console_device *cdev)
if (id < 0)
return;
- str = asprintf("console=%s%d,%dn8", cdev->linux_console_name,
- id, cdev->baudrate);
+ str = basprintf("console=%s%d,%dn8", cdev->linux_console_name, id,
+ cdev->baudrate);
globalvar_add_simple("linux.bootargs.console", str);
@@ -345,7 +345,7 @@ static int tstc_raw(void)
return 0;
}
-int getc(void)
+int getchar(void)
{
unsigned char ch;
uint64_t start;
@@ -380,17 +380,7 @@ int getc(void)
return ch;
}
-EXPORT_SYMBOL(getc);
-
-int fgetc(int fd)
-{
- char c;
-
- if (!fd)
- return getc();
- return read(fd, &c, 1);
-}
-EXPORT_SYMBOL(fgetc);
+EXPORT_SYMBOL(getchar);
int tstc(void)
{
@@ -476,7 +466,7 @@ int ctrlc (void)
{
poller_call();
- if (tstc() && getc() == 3)
+ if (tstc() && getchar() == 3)
return 1;
return 0;
}