Now uses kernel exported POSIX functions instead of their internal counterparts.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8269 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9835b64792
commit
7b89ff958c
@ -4,18 +4,16 @@
|
||||
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
#include <kernel.h>
|
||||
#include <console.h>
|
||||
#include <arch/debug.h>
|
||||
#include <arch/int.h>
|
||||
#include <smp.h>
|
||||
|
||||
#include <OS.h>
|
||||
#include <vfs.h>
|
||||
#include <debug.h>
|
||||
#include <fd.h>
|
||||
#include <KernelExport.h>
|
||||
#include <boot/kernel_args.h>
|
||||
#include <console.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
// from con.h
|
||||
enum {
|
||||
@ -42,8 +40,8 @@ kprintf(const char *fmt, ...)
|
||||
va_start(args, fmt);
|
||||
ret = vsprintf(temp,fmt,args);
|
||||
va_end(args);
|
||||
|
||||
_kern_write(console_fd, 0, temp, ret);
|
||||
|
||||
write_pos(console_fd, 0, temp, ret);
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,7 +60,7 @@ kprintf_xy(int x, int y, const char *fmt, ...)
|
||||
|
||||
buf.x = x;
|
||||
buf.y = y;
|
||||
_kern_ioctl(console_fd, CONSOLE_OP_WRITEXY, &buf, ret + sizeof(buf.x) + sizeof(buf.y));
|
||||
ioctl(console_fd, CONSOLE_OP_WRITEXY, &buf, ret + sizeof(buf.x) + sizeof(buf.y));
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,7 +70,7 @@ con_init(kernel_args *ka)
|
||||
{
|
||||
dprintf("con_init: entry\n");
|
||||
|
||||
console_fd = _kern_open("/dev/console", 0);
|
||||
console_fd = open("/dev/console", O_RDRW);
|
||||
dprintf("console_fd = %d\n", console_fd);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user