From 7a89ac4d26cdf52fbf3f71ce7b24981da2282b5e Mon Sep 17 00:00:00 2001 From: Marius Strobl Date: Sat, 16 Jun 2007 21:31:53 +0000 Subject: - Define data of struct gfb_font a const as it's only used to supply font data and remove the array size from the definition as f.e. the gallant 12 x 22 font data is 256 * 44 in size, exceeding the previously hard- coded size. - Declare the bold8x16 instance of struct gfb_font as const as it's not intended to be changed at run-time as a whole either. - Use __FBSDID in xboxfb.c Tested by: rink --- sys/dev/fb/boot_font.c | 2 +- sys/dev/fb/gfb.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/fb') diff --git a/sys/dev/fb/boot_font.c b/sys/dev/fb/boot_font.c index b89216876233..b1cc5f08a81b 100644 --- a/sys/dev/fb/boot_font.c +++ b/sys/dev/fb/boot_font.c @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); #include -struct gfb_font bold8x16 = { +const struct gfb_font bold8x16 = { 8, 16, { diff --git a/sys/dev/fb/gfb.h b/sys/dev/fb/gfb.h index 85ace52ce6fe..ee70640b8a5f 100644 --- a/sys/dev/fb/gfb.h +++ b/sys/dev/fb/gfb.h @@ -35,7 +35,7 @@ struct gfb_font { int width; int height; - u_char data[256 * 32]; + const u_char data[]; }; #endif /* _FB_GFB_H_ */ -- cgit v1.3