fbset: fix rgba parsing
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 27 Jul 2015 07:59:04 +0000 (09:59 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 30 Jul 2015 01:05:46 +0000 (03:05 +0200)
In commit b5c7220e7b2b6611fe5beca494c67bfe51fcfafb
"fbset: respect rgba configuration lines in fb.modes"
I somehow managed to swap the offset/length markers around.
The man page for fb.modes says it should be offset/length
not length/offset as I was accidentally parsing it.

As my fb.modes file was also reversed I didn't notice
until I tried someone elses fb.modes file. Mea culpa.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util-linux/fbset.c

index e9aacce4f253a300cee121f863dfe910c72f936b..ac0082f70727712b97c017f267974b880d11a194 100644 (file)
@@ -349,10 +349,10 @@ static int read_mode_db(struct fb_var_screeninfo *base, const char *fn,
                        int transp_offset, transp_length;
 
                        sscanf(p, "%d/%d,%d/%d,%d/%d,%d/%d",
-                               &red_offset, &red_length,
-                               &green_offset, &green_length,
-                               &blue_offset, &blue_length,
-                               &transp_offset, &transp_length);
+                               &red_length, &red_offset,
+                               &green_length, &green_offset,
+                               &blue_length, &blue_offset,
+                               &transp_length, &transp_offset);
                        base->red.offset = red_offset;
                        base->red.length = red_length;
                        base->red.msb_right = 0;