Author: charles                      Date: Sun Jan 15 21:02:34 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- for 2.6.15

---- Files affected:
SOURCES:
   bootsplash-3.1.6-2.6.15.diff (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/bootsplash-3.1.6-2.6.15.diff
diff -u /dev/null SOURCES/bootsplash-3.1.6-2.6.15.diff:1.1
--- /dev/null   Sun Jan 15 22:02:34 2006
+++ SOURCES/bootsplash-3.1.6-2.6.15.diff        Sun Jan 15 22:02:29 2006
@@ -0,0 +1,2790 @@
+diff -urN linux-2.6.15/drivers/char/keyboard.c 
linux-2.6.15-bootsplash/drivers/char/keyboard.c
+--- linux-2.6.15/drivers/char/keyboard.c       2006-01-02 19:21:10.000000000 
-0800
++++ linux-2.6.15-bootsplash/drivers/char/keyboard.c    2006-01-03 
09:37:50.480401000 -0800
+@@ -1062,6 +1062,15 @@
+                       if (keycode < BTN_MISC)
+                               printk(KERN_WARNING "keyboard.c: can't emulate 
rawmode for keycode %d\n", keycode);
+ 
++#ifdef CONFIG_BOOTSPLASH
++      /* This code has to be redone for some non-x86 platforms */
++      if (down == 1 && (keycode == 0x3c || keycode == 0x01)) {        /* F2 
and ESC on PC keyboard */
++              extern int splash_verbose(void);
++              if (splash_verbose())
++                      return; 
++      }       
++#endif
++
+ #ifdef CONFIG_MAGIC_SYSRQ            /* Handle the SysRq Hack */
+       if (keycode == KEY_SYSRQ && (sysrq_down || (down == 1 && sysrq_alt))) {
+               sysrq_down = down;
+diff -urN linux-2.6.15/drivers/char/n_tty.c 
linux-2.6.15-bootsplash/drivers/char/n_tty.c
+--- linux-2.6.15/drivers/char/n_tty.c  2006-01-02 19:21:10.000000000 -0800
++++ linux-2.6.15-bootsplash/drivers/char/n_tty.c       2006-01-03 
09:37:50.480401000 -0800
+@@ -1292,6 +1292,15 @@
+                       tty->minimum_to_wake = (minimum - (b - buf));
+               
+               if (!input_available_p(tty, 0)) {
++#ifdef CONFIG_BOOTSPLASH
++                      if (file->f_dentry->d_inode->i_rdev == 
MKDEV(TTY_MAJOR,0) ||
++                          file->f_dentry->d_inode->i_rdev == 
MKDEV(TTY_MAJOR,1) ||
++                          file->f_dentry->d_inode->i_rdev == 
MKDEV(TTYAUX_MAJOR,0) ||
++                          file->f_dentry->d_inode->i_rdev == 
MKDEV(TTYAUX_MAJOR,1)) {
++                              extern int splash_verbose(void);
++                              (void)splash_verbose();
++                      }
++#endif
+                       if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) {
+                               retval = -EIO;
+                               break;
+diff -urN linux-2.6.15/drivers/char/vt.c 
linux-2.6.15-bootsplash/drivers/char/vt.c
+--- linux-2.6.15/drivers/char/vt.c     2006-01-02 19:21:10.000000000 -0800
++++ linux-2.6.15-bootsplash/drivers/char/vt.c  2006-01-03 09:37:50.512403000 
-0800
+@@ -3260,6 +3260,31 @@
+       }
+ }
+ 
++#ifdef CONFIG_BOOTSPLASH
++void con_remap_def_color(struct vc_data *vc, int new_color)
++{
++       unsigned short *sbuf = vc->vc_screenbuf;
++       unsigned c, len = vc->vc_screenbuf_size >> 1;
++       int old_color;
++
++       if (sbuf) {
++             old_color = vc->vc_def_color << 8;
++             new_color <<= 8;
++             while(len--) {
++                     c = *sbuf;
++                     if (((c ^ old_color) & 0xf000) == 0)
++                             *sbuf ^= (old_color ^ new_color) & 0xf000; 
++                     if (((c ^ old_color) & 0x0f00) == 0)
++                             *sbuf ^= (old_color ^ new_color) & 0x0f00;
++                     sbuf++;
++             }
++             new_color >>= 8;
++       }
++       vc->vc_def_color = vc->vc_color = new_color;
++       update_attr(vc);
++}
++#endif
++
+ /*
+  *    Visible symbols for modules
+  */
+diff -urN linux-2.6.15/drivers/video/bootsplash/bootsplash.c 
linux-2.6.15-bootsplash/drivers/video/bootsplash/bootsplash.c
+--- linux-2.6.15/drivers/video/bootsplash/bootsplash.c 1969-12-31 
16:00:00.000000000 -0800
++++ linux-2.6.15-bootsplash/drivers/video/bootsplash/bootsplash.c      
2006-01-03 11:50:49.213721750 -0800
+@@ -0,0 +1,984 @@
++/* 
++ *           linux/drivers/video/bootsplash/bootsplash.c - 
++ *                 splash screen handling functions.
++ *    
++ *    (w) 2001-2004 by Volker Poplawski, <[EMAIL PROTECTED]>,
++ *                Stefan Reinauer, <[EMAIL PROTECTED]>,
++ *                Steffen Winterfeldt, <[EMAIL PROTECTED]>,
++ *                  Michael Schroeder <[EMAIL PROTECTED]>
++ *                
++ *        Ideas & SuSE screen work by Ken Wimer, <[EMAIL PROTECTED]>
++ *
++ *  For more information on this code check http://www.bootsplash.org/
++ */
++
++#include <linux/config.h>
++#include <linux/module.h>
++#include <linux/types.h>
++#include <linux/fb.h>
++#include <linux/vt_kern.h>
++#include <linux/vmalloc.h>
++#include <linux/unistd.h>
++#include <linux/syscalls.h>
++
++#include <asm/irq.h>
++#include <asm/system.h>
++
++#include "../console/fbcon.h"
++#include "bootsplash.h"
++#include "decode-jpg.h"
++
++/* extern struct fb_ops vesafb_ops; */
++extern signed char con2fb_map[MAX_NR_CONSOLES];
++
++#define SPLASH_VERSION "3.1.6-2004/03/31"
++
++/* These errors have to match fbcon-jpegdec.h */
++static unsigned char *jpg_errors[] = {
++      "no SOI found", 
++      "not 8 bit", 
++      "height mismatch", 
++      "width mismatch",
++      "bad width or height", 
++      "too many COMPPs", 
++      "illegal HV", 
++      "quant table selector",
++      "picture is not YCBCR 221111",
++      "unknow CID in scan",
++      "dct not sequential",
++      "wrong marker",
++      "no EOI",
++      "bad tables",
++      "depth mismatch"
++};
++
++static struct jpeg_decdata *decdata = 0; /* private decoder data */
++
++static int splash_registered = 0;
++static int splash_usesilent = 0;      /* shall we display the silentjpeg? */
++int splash_default = 0xf01;
++
++static int splash_check_jpeg(unsigned char *jpeg, int width, int height, int 
depth);
++
++static int __init splash_setup(char *options)
++{
++      if(!strncmp("silent", options, 6)) {
++              printk(KERN_INFO "bootsplash: silent mode.\n");
++              splash_usesilent = 1;
++              /* skip "silent," */
++              if (strlen(options) == 6)
++                      return 0;
++              options += 7;
++      }
++      if(!strncmp("verbose", options, 7)) {
++              printk(KERN_INFO "bootsplash: verbose mode.\n");
++              splash_usesilent = 0;
++              return 0;
++      }
++      splash_default = simple_strtoul(options, NULL, 0);
++      return 0;
++}
++
++__setup("splash=", splash_setup);
++
++
++static int splash_hasinter(unsigned char *buf, int num)
++{
++    unsigned char *bufend = buf + num * 12;
++    while(buf < bufend) {
++      if (buf[1] > 127)               /* inter? */
++          return 1;
++      buf += buf[3] > 127 ? 24 : 12;  /* blend? */
++    }
++    return 0;
++}
++
++static int boxextract(unsigned char *buf, unsigned short *dp, unsigned char 
*cols, int *blendp)
++{
++    dp[0] = buf[0] | buf[1] << 8;
++    dp[1] = buf[2] | buf[3] << 8;
++    dp[2] = buf[4] | buf[5] << 8;
++    dp[3] = buf[6] | buf[7] << 8;
++    *(unsigned int *)(cols + 0) =
++      *(unsigned int *)(cols + 4) =
++      *(unsigned int *)(cols + 8) =
++      *(unsigned int *)(cols + 12) = *(unsigned int *)(buf + 8);
++    if (dp[1] > 32767) {
++      dp[1] = ~dp[1];
++      *(unsigned int *)(cols + 4) = *(unsigned int *)(buf + 12);
++      *(unsigned int *)(cols + 8) = *(unsigned int *)(buf + 16);
++      *(unsigned int *)(cols + 12) = *(unsigned int *)(buf + 20);
++      *blendp = 1;
++      return 24;
++    }
++    return 12;
++}
++
++static void boxit(unsigned char *pic, int bytes, unsigned char *buf, int num, 
int percent, int overpaint)
++{
++    int x, y, i, p, doblend, r, g, b, a, add;
++    unsigned short data1[4];
++    unsigned char cols1[16];
++    unsigned short data2[4];
++    unsigned char cols2[16];
++    unsigned char *bufend;
++    unsigned short *picp;
++    unsigned int stipple[32], sti, stin, stinn, stixs, stixe, stiys, stiye;
++    int xs, xe, ys, ye, xo, yo;
++
++    if (num == 0)
++      return;
++    bufend = buf + num * 12;
++    stipple[0] = 0xffffffff;
++    stin = 1;
++    stinn = 0;
++    stixs = stixe = 0;
++    stiys = stiye = 0;
++    while(buf < bufend) {
++      doblend = 0;
++      buf += boxextract(buf, data1, cols1, &doblend);
++      if (data1[0] == 32767 && data1[1] == 32767) {
++          /* box stipple */
++          if (stinn == 32)
++              continue;
++          if (stinn == 0) {
++              stixs = data1[2];
++              stixe = data1[3];
++              stiys = stiye = 0;
++          } else if (stinn == 4) {
++              stiys = data1[2];
++              stiye = data1[3];
++          }
++          stipple[stinn++] = (cols1[ 0] << 24) | (cols1[ 1] << 16) | (cols1[ 
2] << 8) | cols1[ 3] ;
++          stipple[stinn++] = (cols1[ 4] << 24) | (cols1[ 5] << 16) | (cols1[ 
6] << 8) | cols1[ 7] ;
++          stipple[stinn++] = (cols1[ 8] << 24) | (cols1[ 9] << 16) | 
(cols1[10] << 8) | cols1[11] ;
++          stipple[stinn++] = (cols1[12] << 24) | (cols1[13] << 16) | 
(cols1[14] << 8) | cols1[15] ;
++          stin = stinn;
++          continue;
++      }
++      stinn = 0;
++      if (data1[0] > 32767)
++          buf += boxextract(buf, data2, cols2, &doblend);
++      if (data1[0] == 32767 && data1[1] == 32766) {
++          /* box copy */
++          i = 12 * (short)data1[3];
++          doblend = 0;
++          i += boxextract(buf + i, data1, cols1, &doblend);
++          if (data1[0] > 32767)
++              boxextract(buf + i, data2, cols2, &doblend);
++      }
++      if (data1[0] == 32767)
++          continue;
++      if (data1[2] > 32767) {
++          if (overpaint)
++              continue;
++          data1[2] = ~data1[2];
++      }
++      if (data1[3] > 32767) {
++          if (percent == 65536)
++              continue;
++          data1[3] = ~data1[3];
++      }
++      if (data1[0] > 32767) {
++          data1[0] = ~data1[0];
++          for (i = 0; i < 4; i++)
++              data1[i] = (data1[i] * (65536 - percent) + data2[i] * percent) 
>> 16;
++          for (i = 0; i < 16; i++)
++              cols1[i] = (cols1[i] * (65536 - percent) + cols2[i] * percent) 
>> 16;
++      }
++      *(unsigned int *)cols2 = *(unsigned int *)cols1;
++      a = cols2[3];
++      if (a == 0 && !doblend)
++          continue;
++
++      if (stixs >= 32768) {
++          xo = xs = (stixs ^ 65535) + data1[0];
++          xe = stixe ? stixe + data1[0] : data1[2];
++      } else if (stixe >= 32768) {
++          xs = stixs ? data1[2] - stixs : data1[0];
++          xe = data1[2] - (stixe ^ 65535);
++          xo = xe + 1;
++      } else {
++          xo = xs = stixs;
++          xe = stixe ? stixe : data1[2];
++      }
++      if (stiys >= 32768) {
++          yo = ys = (stiys ^ 65535) + data1[1];
++          ye = stiye ? stiye + data1[1] : data1[3];
++      } else if (stiye >= 32768) {
++          ys = stiys ? data1[3] - stiys : data1[1];
++          ye = data1[3] - (stiye ^ 65535);
++          yo = ye + 1;
++      } else {
++          yo = ys = stiys;
++          ye = stiye ? stiye : data1[3];
++      }
++      xo = 32 - (xo & 31);
++      yo = stin - (yo % stin);
++      if (xs < data1[0])
++          xs = data1[0];
++      if (xe > data1[2])
++          xe = data1[2];
++      if (ys < data1[1])
++          ys = data1[1];
++      if (ye > data1[3])
++          ye = data1[3];
++
++      for (y = ys; y <= ye; y++) {
++          sti = stipple[(y + yo) % stin];
++          x = (xs + xo) & 31;
++          if (x)
++              sti = (sti << x) | (sti >> (32 - x));
++          if (doblend) {
++              if ((p = data1[3] - data1[1]) != 0)
++                  p = ((y - data1[1]) << 16) / p;
++              for (i = 0; i < 8; i++)
++                  cols2[i + 8] = (cols1[i] * (65536 - p) + cols1[i + 8] * p) 
>> 16;
++          }
++          add = (xs & 1);
++          add ^= (add ^ y) & 1 ? 1 : 3;               /* 2x2 ordered 
dithering */
++          picp = (unsigned short *)(pic + xs * 2 + y * bytes);
++          for (x = xs; x <= xe; x++) {
++              if (!(sti & 0x80000000)) {
++                  sti <<= 1;
++                  picp++;
++                  add ^= 3;
++                  continue;
++              }
++              sti = (sti << 1) | 1;
++              if (doblend) {
++                  if ((p = data1[2] - data1[0]) != 0)
++                      p = ((x - data1[0]) << 16) / p;
++                  for (i = 0; i < 4; i++)
++                      cols2[i] = (cols2[i + 8] * (65536 - p) + cols2[i + 12] 
* p) >> 16;
++                  a = cols2[3];
++              }
++              r = cols2[0];
++              g = cols2[1];
++              b = cols2[2];
++              if (a != 255) {
++                  i = *picp;
++                  r = ((i >> 8 & 0xf8) * (255 - a) + r * a) / 255;
++                  g = ((i >> 3 & 0xfc) * (255 - a) + g * a) / 255;
++                  b = ((i << 3 & 0xf8) * (255 - a) + b * a) / 255;
++              }
++  #define CLAMP(x) ((x) >= 256 ? 255 : (x))
++              i = ((CLAMP(r + add*2+1) & 0xf8) <<  8) |
++                  ((CLAMP(g + add    ) & 0xfc) <<  3) |
++                  ((CLAMP(b + add*2+1)       ) >>  3);
++              *picp++ = i;
++              add ^= 3;
++          }
++      }
++    }
++}
++
++static int splash_check_jpeg(unsigned char *jpeg, int width, int height, int 
depth)
++{
++    int size, err;
++    unsigned char *mem;
++
++    size = ((width + 15) & ~15) * ((height + 15) & ~15) * (depth >> 3);
++    mem = vmalloc(size);
++    if (!mem) {
++      printk(KERN_INFO "bootsplash: no memory for decoded picture.\n");
++      return -1;
++    }
++    if (!decdata)
++      decdata = vmalloc(sizeof(*decdata));
++    if ((err = jpeg_decode(jpeg, mem, ((width + 15) & ~15), ((height + 15) & 
~15), depth, decdata)))
++        printk(KERN_INFO "bootsplash: error while decompressing picture: %s 
(%d)\n",jpg_errors[err - 1], err);
++    vfree(mem);
++    return err ? -1 : 0;
++}
++
++static void splash_free(struct vc_data *vc, struct fb_info *info)
++{
++    if (!vc->vc_splash_data)
++      return;
++    if (info->silent_screen_base)
++          info->screen_base = info->silent_screen_base;
++    info->silent_screen_base = 0;
++    if (vc->vc_splash_data->splash_silentjpeg)
++          vfree(vc->vc_splash_data->splash_sboxes);
++    vfree(vc->vc_splash_data);
++    vc->vc_splash_data = 0;
++    info->splash_data = 0;
++}
++
++static int splash_mkpenguin(struct splash_data *data, int pxo, int pyo, int 
pwi, int phe, int pr, int pg, int pb)
++{
++    unsigned char *buf;
++    int i;
++
++    if (pwi ==0 || phe == 0)
++      return 0;
++    buf = (unsigned char *)data + sizeof(*data);
++    pwi += pxo - 1;
++    phe += pyo - 1;
++    *buf++ = pxo;
++    *buf++ = pxo >> 8;
++    *buf++ = pyo;
++    *buf++ = pyo >> 8;
++    *buf++ = pwi;
++    *buf++ = pwi >> 8;
++    *buf++ = phe;
++    *buf++ = phe >> 8;
++    *buf++ = pr;
++    *buf++ = pg;
++    *buf++ = pb;
++    *buf++ = 0;
++    for (i = 0; i < 12; i++, buf++)
++      *buf = buf[-12];
++    buf[-24] ^= 0xff;
++    buf[-23] ^= 0xff;
++    buf[-1] = 0xff;
++    return 2;
++}
++
++static const int splash_offsets[3][16] = {
++    /* len, unit, size, state, fgcol, col, xo, yo, wi, he
++       boxcnt, ssize, sboxcnt, percent, overok, palcnt */
++    /* V1 */
++    {   20,   -1,   16,    -1,    -1,  -1,  8, 10, 12, 14,
++           -1,    -1,      -1,      -1,     -1,     -1 },
++    /* V2 */
++    {   35,    8,   12,     9,    10,  11, 16, 18, 20, 22,
++           -1,    -1,      -1,      -1,     -1,     -1 },
++    /* V3 */
++    {   38,    8,   12,     9,    10,  11, 16, 18, 20, 22,
++           24,    28,      32,      34,     36,     37 },
++};
++
++#define SPLASH_OFF_LEN     offsets[0]
++#define SPLASH_OFF_UNIT    offsets[1]
++#define SPLASH_OFF_SIZE    offsets[2]
++#define SPLASH_OFF_STATE   offsets[3]
++#define SPLASH_OFF_FGCOL   offsets[4]
++#define SPLASH_OFF_COL     offsets[5]
++#define SPLASH_OFF_XO      offsets[6]
++#define SPLASH_OFF_YO      offsets[7]
++#define SPLASH_OFF_WI      offsets[8]
++#define SPLASH_OFF_HE      offsets[9]
++#define SPLASH_OFF_BOXCNT  offsets[10]
++#define SPLASH_OFF_SSIZE   offsets[11]
++#define SPLASH_OFF_SBOXCNT offsets[12]
++#define SPLASH_OFF_PERCENT offsets[13]
++#define SPLASH_OFF_OVEROK  offsets[14]
++#define SPLASH_OFF_PALCNT  offsets[15]
++
++static inline int splash_getb(unsigned char *pos, int off)
++{
++    return off == -1 ? 0 : pos[off];
++}
++
++static inline int splash_gets(unsigned char *pos, int off)
++{
++    return off == -1 ? 0 : pos[off] | pos[off + 1] << 8;
++}
++
++static inline int splash_geti(unsigned char *pos, int off)
++{
++    return off == -1 ? 0 :
++           pos[off] | pos[off + 1] << 8 | pos[off + 2] << 16 | pos[off + 3] 
<< 24;
++}
++
++static int splash_getraw(unsigned char *start, unsigned char *end, int 
*update)
++{
++    unsigned char *ndata;
++    int version;
++    int splash_size;
++    int unit;
++    int width, height;
++    int silentsize;
++    int boxcnt;
++    int sboxcnt;
++    int palcnt;
++    int i, len;
++    const int *offsets;
++    struct vc_data *vc;
++    struct fb_info *info;
++    struct splash_data *sd;
++
++    if (update)
++      *update = -1;
++
++    if (!update || start[7] < '2' || start[7] > '3' || splash_geti(start, 12) 
!= (int)0xffffffff)
++      printk(KERN_INFO "bootsplash %s: looking for picture...", 
SPLASH_VERSION);
++
++    for (ndata = start; ndata < end; ndata++) {
++      if (ndata[0] != 'B' || ndata[1] != 'O' || ndata[2] != 'O' || ndata[3] 
!= 'T')
++          continue;
++      if (ndata[4] != 'S' || ndata[5] != 'P' || ndata[6] != 'L' || ndata[7] < 
'1' || ndata[7] > '3')
++          continue;
++      version = ndata[7] - '0';
++      offsets = splash_offsets[version - 1];
++      len = SPLASH_OFF_LEN;
++      unit = splash_getb(ndata, SPLASH_OFF_UNIT);
++      if (unit >= MAX_NR_CONSOLES)
++          continue;
++      if (unit) {
++              vc_allocate(unit);
++      }
++      vc = vc_cons[unit].d;
++      info = registered_fb[(int)con2fb_map[unit]];
++      width = info->var.xres;
++      height = info->var.yres;
++      splash_size = splash_geti(ndata, SPLASH_OFF_SIZE);
++      if (splash_size == (int)0xffffffff && version > 1) {
++          if ((sd = vc->vc_splash_data) != 0) {
++              int up = 0;
++              i = splash_getb(ndata, SPLASH_OFF_STATE);
++              if (i != 255) {
++                  sd->splash_state = i;
++                  up = -1;
++              }
++              i = splash_getb(ndata, SPLASH_OFF_FGCOL);
++              if (i != 255) {
++                  sd->splash_fg_color = i;
++                  up = -1;
++              }
++              i = splash_getb(ndata, SPLASH_OFF_COL);
++              if (i != 255) {
++                  sd->splash_color = i;
++                  up = -1;
++              }
++              boxcnt = sboxcnt = 0;
++              if (ndata + len <= end) {
++                  boxcnt = splash_gets(ndata, SPLASH_OFF_BOXCNT);
++                  sboxcnt = splash_gets(ndata, SPLASH_OFF_SBOXCNT);
++              }
++              if (boxcnt) {
++                  i = splash_gets(ndata, len);
++                  if (boxcnt + i <= sd->splash_boxcount && ndata + len + 2 + 
boxcnt * 12 <= end) {
++
++                      if (splash_geti(ndata, len + 2) != 0x7ffd7fff || 
!memcmp(ndata + len + 2, sd->splash_boxes + i * 12, 8)) {
++
++                          memcpy(sd->splash_boxes + i * 12, ndata + len + 2, 
boxcnt * 12);
++                          up |= 1;
++                      }
++                  }
++                  len += boxcnt * 12 + 2;
++              }
++              if (sboxcnt) {
++                  i = splash_gets(ndata, len);
++                  if (sboxcnt + i <= sd->splash_sboxcount && ndata + len + 2 
+ sboxcnt * 12 <= end) {
++                      if (splash_geti(ndata, len + 2) != 0x7ffd7fff || 
!memcmp(ndata + len + 2, sd->splash_sboxes + i * 12, 8)) {
++                          memcpy(sd->splash_sboxes + i * 12, ndata + len + 2, 
sboxcnt * 12);
++                          up |= 2;
++                      }
++                  }
++              }
++              if (update)
++                  *update = up;
++          }
++          return unit;
++      }
++      if (splash_size == 0) {
++          printk(KERN_INFO"...found, freeing memory.\n");
++          if (vc->vc_splash_data)
++              splash_free(vc, info);
++          return unit;
++      }
++      boxcnt = splash_gets(ndata, SPLASH_OFF_BOXCNT);
++      palcnt = 3 * splash_getb(ndata, SPLASH_OFF_PALCNT);
++      if (ndata + len + splash_size > end) {
++          printk(KERN_INFO "...found, but truncated!\n");
++          return -1;
++      }
++      if (!jpeg_check_size(ndata + len + boxcnt * 12 + palcnt, width, 
height)) {
++          ndata += len + splash_size - 1;
++          continue;
++      }
++      if (splash_check_jpeg(ndata + len + boxcnt * 12 + palcnt, width, 
height, info->var.bits_per_pixel))
++          return -1;
++      silentsize = splash_geti(ndata, SPLASH_OFF_SSIZE);
++      if (silentsize)
++          printk(KERN_INFO" silentjpeg size %d bytes,", silentsize);
++      if (silentsize >= splash_size) {
++          printk(KERN_INFO " bigger than splashsize!\n");
++          return -1;
++      }
++      splash_size -= silentsize;
++      if (!splash_usesilent)
++          silentsize = 0;
++      else if (height * 2 * info->fix.line_length > info->fix.smem_len) {
++          printk(KERN_INFO " does not fit into framebuffer.\n");
++          silentsize = 0;
++      }
++      sboxcnt = splash_gets(ndata, SPLASH_OFF_SBOXCNT);
++      if (silentsize) {
++          unsigned char *simage = ndata + len + splash_size + 12 * sboxcnt;
++          if (!jpeg_check_size(simage, width, height) ||
++              splash_check_jpeg(simage, width, height, 
info->var.bits_per_pixel)) {
++                  printk(KERN_INFO " error in silent jpeg.\n");
<<Diff was trimmed, longer than 597 lines>>
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to