Index: fb.c =================================================================== RCS file: /cvsroot/linux-fbdev/FBdev/utlilities/fbtest/fb.c,v retrieving revision 1.7 diff -r1.7 fb.c 30c30 < static int fb_fd = -1; --- > int fb_fd = -1; Index: include/fb.h =================================================================== RCS file: /cvsroot/linux-fbdev/FBdev/utlilities/fbtest/include/fb.h,v retrieving revision 1.2 diff -r1.2 fb.h 19a20 > extern int fb_fd; Index: tests/test001.c =================================================================== RCS file: /cvsroot/linux-fbdev/FBdev/utlilities/fbtest/tests/test001.c,v retrieving revision 1.1 diff -r1.1 test001.c 11a12 > #include 12a14,16 > #include > #include > #include 23a28,29 > #define FBIOFILLRECT 0x4619 > 28a35,38 > u8 * screen; > u32 bytes; > struct fb_fillrect rect; > enum test_res res = TEST_OK; 37a48,74 > > bytes = (fb_var.xres * fb_var.yres * fb_var.bits_per_pixel) / 8; > if (!(screen = malloc(bytes))) > Fatal("malloc %d: %s\n", bytes, strerror(errno)); > memcpy(screen, fb, bytes); > > for (i = 1, y0 = 0; i <= Y_BLOCKS; i++, y0 = y1) { > y1 = i*fb_var.yres/Y_BLOCKS; > for (j = 1, x0 = 0; j <= X_BLOCKS; j++, x0 = x1) { > pixel = (i+j) & 1 ? white_pixel : black_pixel; > x1 = j*fb_var.xres/X_BLOCKS; > rect.dx = x0; > rect.dy = y0; > rect.width = x1 - x0; > rect.height = y1 - y0; > rect.color = (i+j) & 1 ? 15 : 0; > rect.rop = ROP_COPY; > > if (ioctl(fb_fd, FBIOFILLRECT, &rect) == -1) { > Fatal("ioctl FBIOFILLRECT: %s\n", strerror(errno)); > } > } > } > > if (memcmp(screen, fb, bytes) != 0) > res = TEST_FAIL; > free(screen); 39c76 < return TEST_OK; --- > return res;