comparison drivers/mga_vid.c @ 9449:502105e32ac2

Fix mistake in applying patch from Alex Beregszaszi. There's no security problem here, but better safe then sorry.
author eyck
date Mon, 17 Feb 2003 06:46:31 +0000
parents ed98b850668d
children 182d6c136095
comparison
equal deleted inserted replaced
9448:5b130e0682a8 9449:502105e32ac2
1414 1414
1415 static void mga_param_buff_fill( void ) 1415 static void mga_param_buff_fill( void )
1416 { 1416 {
1417 unsigned len; 1417 unsigned len;
1418 len = 0; 1418 len = 0;
1419 len += sprintf(&mga_param_buff[len]-len,"Interface version: %04X\n",MGA_VID_VERSION); 1419 len += snprintf(&mga_param_buff[len],PARAM_BUFF_SIZE-len,"Interface version: %04X\n",MGA_VID_VERSION);
1420 len += sprintf(&mga_param_buff[len]-len,"Memory: %x:%dM\n",mga_mem_base,(unsigned int) mga_ram_size); 1420 len += snprintf(&mga_param_buff[len],PARAM_BUFF_SIZE-len,"Memory: %x:%dM\n",mga_mem_base,(unsigned int) mga_ram_size);
1421 len += sprintf(&mga_param_buff[len]-len,"MMIO: %p\n",mga_mmio_base); 1421 len += snprintf(&mga_param_buff[len],PARAM_BUFF_SIZE-len,"MMIO: %p\n",mga_mmio_base);
1422 len += sprintf(&mga_param_buff[len]-len ,"Configurable stuff:\n"); 1422 len += snprintf(&mga_param_buff[len],PARAM_BUFF_SIZE-len,"Configurable stuff:\n");
1423 len += sprintf(&mga_param_buff[len]-len,"~~~~~~~~~~~~~~~~~~~\n"); 1423 len += snprintf(&mga_param_buff[len],PARAM_BUFF_SIZE-len,"~~~~~~~~~~~~~~~~~~~\n");
1424 len += sprintf(&mga_param_buff[len]-len,PARAM_BRIGHTNESS"%d\n",mga_brightness); 1424 len += snprintf(&mga_param_buff[len],PARAM_BUFF_SIZE-len,PARAM_BRIGHTNESS"%d\n",mga_brightness);
1425 len += sprintf(&mga_param_buff[len]-len,PARAM_CONTRAST"%d\n",mga_contrast); 1425 len += snprintf(&mga_param_buff[len],PARAM_BUFF_SIZE-len,PARAM_CONTRAST"%d\n",mga_contrast);
1426 len += sprintf(&mga_param_buff[len]-len,PARAM_BLACKIE"%s\n",regs.blackie?"on":"off"); 1426 len += snprintf(&mga_param_buff[len],PARAM_BUFF_SIZE-len,PARAM_BLACKIE"%s\n",regs.blackie?"on":"off");
1427 mga_param_buff_len = len; 1427 mga_param_buff_len = len;
1428 // check boundaries of mga_param_buff before writing to it!!! 1428 // check boundaries of mga_param_buff before writing to it!!!
1429 } 1429 }
1430 1430
1431 1431