Skip to content

Commit

Permalink
Change %i to %d, don't push char varags
Browse files Browse the repository at this point in the history
  • Loading branch information
ghaerr committed Sep 16, 2024
1 parent 947c4fd commit 8f071f6
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions elks/arch/i86/drivers/char/console-direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,6 @@ struct tty_ops dircon_ops = {
};

#ifndef CONFIG_CONSOLE_DUAL

#ifdef DEBUG
static const char *type_string[] = {
"MDA",
"CGA",
"EGA",
"VGA",
};
#endif

void INITPROC console_init(void)
{
Console *C = &Con[0];
Expand Down Expand Up @@ -268,14 +258,24 @@ void INITPROC console_init(void)
kbd_name, Width, Height, NumConsoles);
}
#else

#ifdef DEBUG
static const char *type_string[] = {
"MDA",
"CGA",
"EGA",
"VGA",
};
#endif

void INITPROC console_init(void)
{
Console *C = &Con[0];
int i, j, dev;
int screens = 0;
unsigned short boot_crtc;
unsigned char boot_type;
unsigned char screens = 0;
unsigned char cur_display = 0;
unsigned char boot_type;

boot_crtc = peekw(0x63, 0x40);
for (i = 0; i < N_DEVICETYPES; ++i) {
Expand Down Expand Up @@ -318,10 +318,10 @@ void INITPROC console_init(void)
VideoSeg = Visible[0]->vseg;

kbd_init();
printk("Direct console %s kbd"TERM_TYPE"(%d screens, %i consoles)\n",
printk("Direct console %s kbd"TERM_TYPE"(%d screens, %d consoles)\n",
kbd_name, screens, NumConsoles);
for (i = 0; i < NumConsoles; ++i) {
debug("/dev/tty%i, %s, %ux%u\n", i + 1, type_string[Con[i].type], Con[i].Width, Con[i].Height);
debug("/dev/tty%d, %s, %ux%u\n", i + 1, type_string[Con[i].type], Con[i].Width, Con[i].Height);
}
}
#endif

0 comments on commit 8f071f6

Please sign in to comment.