changeset 4527:832c4dc794e0

print also contrast on cat /dev/mga_vid
author eyck
date Mon, 04 Feb 2002 16:05:37 +0000
parents c619a7271690
children bd2324553533
files drivers/mga_vid.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/drivers/mga_vid.c	Mon Feb 04 15:03:18 2002 +0000
+++ b/drivers/mga_vid.c	Mon Feb 04 16:05:37 2002 +0000
@@ -1360,13 +1360,15 @@
     unsigned len;
     len = 0;
     len += sprintf(&mga_param_buff[len],"Interface version: %04X\n",MGA_VID_VERSION);
-    len += sprintf(&mga_param_buff[len],"Memory: %x:%xM\n",mga_mem_base,mga_ram_size);
+    len += sprintf(&mga_param_buff[len],"Memory: %x:%dM\n",mga_mem_base,(unsigned int) mga_ram_size);
     len += sprintf(&mga_param_buff[len],"MMIO: %p\n",mga_mmio_base);
     len += sprintf(&mga_param_buff[len],"Configurable stuff:\n");
     len += sprintf(&mga_param_buff[len],"~~~~~~~~~~~~~~~~~~~\n");
-    len += sprintf(&mga_param_buff[len],PARAM_BRIGHTNESS"%X\n",regs.brightness);
+    len += sprintf(&mga_param_buff[len],PARAM_BRIGHTNESS"%d\n",regs.brightness);
+    len += sprintf(&mga_param_buff[len],PARAM_CONTRAST"%d\n",regs.contrast);
     len += sprintf(&mga_param_buff[len],PARAM_BLACKIE"%s\n",regs.blackie?"on":"off");
     mga_param_buff_len = len;
+    // check boundaries of mga_param_buff before writing to it!!!
 }