Simplify kernel code down to a userland lookalike

This commit is contained in:
Pierre Pronchery 2018-06-07 11:35:01 -04:00
parent ba760161d8
commit 58e0cad31a
2 changed files with 2 additions and 13 deletions

View File

@ -5,15 +5,6 @@
#include <stdio.h> #include <stdio.h>
#include "drivers/bus.h"
#include "drivers/console.h"
#ifndef KERNEL_BUS
# define KERNEL_BUS "ioport"
#endif
#ifndef KERNEL_CONSOLE
# define KERNEL_CONSOLE "vga"
#endif
/* public */ /* public */
@ -21,12 +12,10 @@
/* main */ /* main */
int main(int argc, char * argv[]) int main(int argc, char * argv[])
{ {
ukBus * bus;
int i; int i;
bus = bus_init(KERNEL_BUS);
console_init(bus, KERNEL_CONSOLE);
puts("Starting DeforaOS..."); puts("Starting DeforaOS...");
puts("Command line:");
for(i = 0; i < argc; i++) for(i = 0; i < argc; i++)
printf("%s%s%s", (i > 0) ? " " : "", argv[i], printf("%s%s%s", (i > 0) ? " " : "", argv[i],
(i + 1 == argc) ? "\n" : ""); (i + 1 == argc) ? "\n" : "");

View File

@ -15,7 +15,7 @@ int main(int argc, char * argv[])
int i; int i;
puts("Failed to boot DeforaOS"); puts("Failed to boot DeforaOS");
puts("The command line was:"); puts("Command line:");
for(i = 0; i < argc; i++) for(i = 0; i < argc; i++)
printf("%s%s%s", (i > 0) ? " " : "", argv[i], printf("%s%s%s", (i > 0) ? " " : "", argv[i],
(i + 1 == argc) ? "\n" : ""); (i + 1 == argc) ? "\n" : "");