dev_init() and bus_init() are now both obsolete.

con_init() now takes care of the initialization of its currently built-in
console drivers itself.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10836 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-01-18 16:44:44 +00:00
parent 19abe05796
commit 568f1574d2
2 changed files with 26 additions and 19 deletions

View File

@ -1,9 +1,13 @@
/*
* Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
* Distributed under the terms of the NewOS License.
*/
/* This file contains the kprintf stuff and console init */
/*
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
#include <OS.h>
#include <KernelExport.h>
@ -15,10 +19,18 @@
#include <unistd.h>
// from con.h
// ToDo: this mechanism will be changed so that these lines can go away
#ifdef ARCH_x86
# include <arch/x86/console_dev.h>
#else
enum {
CONSOLE_OP_WRITEXY = 2376
};
#endif
#include <fb_console.h>
struct console_op_xy_struct {
int x;
@ -57,7 +69,7 @@ kprintf_xy(int x, int y, const char *fmt, ...)
va_start(args, fmt);
ret = vsprintf(buf.buf,fmt,args);
va_end(args);
buf.x = x;
buf.y = y;
ioctl(console_fd, CONSOLE_OP_WRITEXY, &buf, ret + sizeof(buf.x) + sizeof(buf.y));
@ -66,12 +78,15 @@ kprintf_xy(int x, int y, const char *fmt, ...)
int
con_init(kernel_args *ka)
con_init(kernel_args *args)
{
dprintf("con_init: entry\n");
/* now run the oddballs we have, consoles at present */
// ToDo: this mechanism will be changed so that these lines can go away
#ifdef ARCH_x86
console_dev_init(args);
#endif
fb_console_dev_init(args);
console_fd = open("/dev/console", O_RDWR);
dprintf("console_fd = %d\n", console_fd);
return 0;
return console_fd >= 0;
}

View File

@ -23,11 +23,9 @@
#include <sem.h>
#include <port.h>
#include <vfs.h>
#include <dev.h>
#include <cbuf.h>
#include <elf.h>
#include <cpu.h>
#include <devs.h>
#include <bus.h>
#include <kdriver_settings.h>
#include <kmodule.h>
@ -208,12 +206,6 @@ main2(void *unused)
TRACE(("Mount boot file system\n"));
vfs_mount_boot_file_system(&ka);
TRACE(("Init busses\n"));
bus_init(&ka);
TRACE(("Init devices\n"));
dev_init(&ka);
TRACE(("Init console\n"));
con_init(&ka);