This is the second of two parts for coLinux 0.7.3. * Changed NT and FLTK consoles to 60x120 * CO_OPERATION_CONSOLE_SIZES: Linux kernel gets size from ntkernel now. Please add the file console-size-runtime-linux-2.6.22.18-co-0.7.3.patch to list of patches (see last hunk in console-size-60x120-colinux-0.7.3.patch) or patch the Linux kernel manualy after all other coLinux patches. Than make clean Linux kernel and coLinux daemons and build it all. Replace vmlinux and all other daemons, reinstall the coLinux driver. Based on patch from Reini Urban 2004-11-07 http://xarch.tu-graz.ac.at/home/rurban/ Ported to coLinux 0.8.x and 0.7.x by Henry Nestler Index: linux-2.6.22.18-source/drivers/video/console/cocon.c =================================================================== --- linux-2.6.22.18-source.orig/drivers/video/console/cocon.c +++ linux-2.6.22.18-source/drivers/video/console/cocon.c @@ -30,6 +30,9 @@ * Interface used by the world */ +static int cocon_cols = 80; +static int cocon_rows = 25; + static const char __init *cocon_startup(void) { unsigned long flags; @@ -45,7 +48,12 @@ co_message->type = CO_MESSAGE_TYPE_STRING; co_message->size = ((char *)(&message->type + 1)) - ((char *)message); message->type = CO_OPERATION_CONSOLE_STARTUP; - co_send_message_restore(flags); + co_switch_wrapper(); + if (message->type == CO_OPERATION_CONSOLE_SIZES) { + cocon_cols = message->sizes.cols; + cocon_rows = message->sizes.rows; + } + co_passage_page_release(flags); } return "CoCON"; @@ -59,8 +67,8 @@ /* We cannot be loaded as a module, therefore init is always 1 */ c->vc_can_do_color = 1; - c->vc_cols = 80; - c->vc_rows = 25; + c->vc_cols = cocon_cols; + c->vc_rows = cocon_rows; c->vc_complement_mask = 0x7700; c->vc_visible_origin = 0; c->vc_origin = 0; Index: linux-2.6.22.18-source/include/linux/cooperative.h =================================================================== --- linux-2.6.22.18-source.orig/include/linux/cooperative.h +++ linux-2.6.22.18-source/include/linux/cooperative.h @@ -200,6 +200,7 @@ CO_OPERATION_CONSOLE_SET_ORIGIN, CO_OPERATION_CONSOLE_SAVE_SCREEN, CO_OPERATION_CONSOLE_INVERT_REGION, + CO_OPERATION_CONSOLE_SIZES, } co_operation_console_t; @@ -252,6 +253,11 @@ co_console_unit bottom; co_console_unit right; } bmove; + struct { + co_console_unit rows; + co_console_unit cols; + co_console_unit backbuf; + } sizes; co_cursor_pos_t cursor; }; } __attribute__((packed)) co_console_message_t;