Thread (6 messages) 6 messages, 2 authors, 2005-06-23

PATCH: Make sysfs color_map attribute work

From: Jon Smirl <hidden>
Date: 2005-06-12 15:30:42

These two patches make the sysfs color_map attribute work. There is a
minor bug in sysfs fixed by sysfs_offbyone.patch. I sent the sysfs fix
separately to GregKH.

Sysfs usually works in text instead of binary. That lets scripts set
the attributes. You can set an attribute from a program with normal
file writes. The values have to be less than PAGE_SIZE in size.

Color maps have up to 256 entries. 4096/256 allows for 16 characters per line.

The format for a cmap entry is "%02x%c%4x%4x%4x\n"
%02x entry %c transp %4x red %4x blue %4x green

You don't have to start at zero, you can change one or more entries
this way. Build up a line per entry and set the whole block into the
attribute.

You can read the color_map with cat fb0/color_map.

My assumption from looking at the code that transparent is a boolean
flag. If the "%c" column is not a space transparent will be set for
that entry.

-- 
Jon Smirl
jonsmirl@gmail.com

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help