/* * The following can probably have any value... Do we need to * set all of them? */ var.bits_per_pixel = p->bits_per_pixel; var.xres_virtual = p->xres_virtual; var.yres_virtual = p->yres_virtual; var.accel_flags = p->accel_flags; var.width = p->width; var.height = p->height; var.red = p->red; var.green = p->green; var.blue = p->blue; var.transp = p->transp; var.nonstd = p->nonstd; 
static int fbcon_resize(struct vc_data *vc, unsigned int width, 			unsigned int height){	struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];	struct display *p = &fb_display[vc->vc_num];	struct fb_var_screeninfo var = info->var;	int x_diff, y_diff;	int fw = vc->vc_font.width;	int fh = vc->vc_font.height;	var.xres = width * fw;	var.yres = height * fh;	x_diff = info->var.xres - var.xres;	y_diff = info->var.yres - var.yres;	if (x_diff < 0 || x_diff > fw || (y_diff < 0 || y_diff > fh)) {		struct fb_videomode *mode;		DPRINTK("attempting resize %ix%i\n", var.xres, var.yres);		mode = fb_find_best_mode(&var, &info->modelist);		if (mode == NULL)			return -EINVAL;		fb_videomode_to_var(&var, mode);		if (width > var.xres/fw || height > var.yres/fh)			return -EINVAL;		/*		 * The following can probably have any value... Do we need to		 * set all of them?		 */		var.bits_per_pixel = p->bits_per_pixel;		var.xres_virtual = p->xres_virtual;		var.yres_virtual = p->yres_virtual;		var.accel_flags = p->accel_flags;		var.width = p->width;		var.height = p->height;		var.red = p->red;		var.green = p->green;		var.blue = p->blue;		var.transp = p->transp;		var.nonstd = p->nonstd;		DPRINTK("resize now %ix%i\n", var.xres, var.yres);		if (CON_IS_VISIBLE(vc)) {			var.activate = FB_ACTIVATE_NOW |				FB_ACTIVATE_FORCE;			fb_set_var(info, &var);		}		var_to_display(p, &info->var, info);	}	updatescrollmode(p, info, vc);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/3084a895c2a963cb9b32271061c832977ff7293c/fbcon.c/clean/drivers/video/console/fbcon.c