Now use kernel exported POSIX functions instead of their internal counterparts.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8268 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
54f1ea35c7
commit
9835b64792
@ -3,22 +3,15 @@
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
#include <kernel.h>
|
||||
#include <console.h>
|
||||
#include <debug.h>
|
||||
#include <memheap.h>
|
||||
#include <int.h>
|
||||
#include <vm.h>
|
||||
#include <lock.h>
|
||||
#include <KernelExport.h>
|
||||
#include <Drivers.h>
|
||||
#include <Errors.h>
|
||||
#include <console.h>
|
||||
#include <vm.h>
|
||||
#include <devfs.h>
|
||||
|
||||
#include <arch/cpu.h>
|
||||
#include <arch/int.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <arch/x86/console_dev.h>
|
||||
|
||||
@ -200,7 +193,7 @@ static status_t
|
||||
console_read(void *cookie, off_t pos, void *buf, size_t *len)
|
||||
{
|
||||
/* XXX - optimistic!! */
|
||||
*len = _kern_read(keyboard_fd, 0, buf, *len);
|
||||
*len = read_pos(keyboard_fd, 0, buf, *len);
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
@ -327,7 +320,7 @@ console_dev_init(kernel_args *ka)
|
||||
update_cursor(x, y);
|
||||
|
||||
mutex_init(&console_lock, "console_lock");
|
||||
keyboard_fd = _kern_open("/dev/keyboard", 0);
|
||||
keyboard_fd = open("/dev/keyboard", O_RDONLY);
|
||||
if (keyboard_fd < 0)
|
||||
panic("console_dev_init: error opening /dev/keyboard\n");
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
** Distributed under the terms of the Haiku License.
|
||||
**
|
||||
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
@ -322,7 +322,7 @@ console_close(void * cookie)
|
||||
static status_t
|
||||
console_read(void * cookie, off_t pos, void *buffer, size_t *_length)
|
||||
{
|
||||
ssize_t bytesRead = _kern_read(console.keyboard_fd, 0, buffer, *_length);
|
||||
ssize_t bytesRead = read_pos(console.keyboard_fd, 0, buffer, *_length);
|
||||
if (bytesRead >= 0) {
|
||||
*_length = bytesRead;
|
||||
return B_OK;
|
||||
@ -507,7 +507,7 @@ fb_console_dev_init(kernel_args *ka)
|
||||
repaint();
|
||||
|
||||
mutex_init(&console.lock, "console_lock");
|
||||
console.keyboard_fd = _kern_open("/dev/keyboard", 0);
|
||||
console.keyboard_fd = open("/dev/keyboard", O_RDONLY);
|
||||
if (console.keyboard_fd < 0)
|
||||
panic("fb_console_dev_init: error opening /dev/keyboard\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user