Displaying 1 result from an estimated 1 matches for "color_array".
2010 Oct 22
0
[PATCH node] First draft of replacing some of the ovirt-config-* scripts with python equivalents.
...\
+ "/etc/logrotate.d/ovirt-logrotate.conf" ]
+
+def log(log_entry):
+ # placeholder for now
+ print log_entry
+
+def set_console_colors():
+ GIO_CMAP = 0x4B70
+ PIO_CMAP = 0x4B71
+
+ tty_file = open("/dev/console", "rw")
+ existing_color_array = bytearray(fcntl.ioctl(tty_file.fileno(), GIO_CMAP, b"\x00" * 48))
+ color_array = existing_color_array
+ color_array[3] = 0xde
+ color_array[4] = 0xde
+ color_array[5] = 0xde
+ color_array[6] = 0x30
+ color_array[7] = 0x30
+ color_array[8] = 0x30
+ color_array[12...