summaryrefslogtreecommitdiffstats
path: root/sys/i386/xbox
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2007-06-16 21:31:53 +0000
committermarius <marius@FreeBSD.org>2007-06-16 21:31:53 +0000
commit85ff88bb21884ad047d0e6910561de52b378a0d7 (patch)
treea71bf25d6e88b96c54f856880ca3261486521a95 /sys/i386/xbox
parent011d4e557f1b1c9f7dcf3ebf569f72bbe78d18f3 (diff)
downloadFreeBSD-src-85ff88bb21884ad047d0e6910561de52b378a0d7.zip
FreeBSD-src-85ff88bb21884ad047d0e6910561de52b378a0d7.tar.gz
- 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
Diffstat (limited to 'sys/i386/xbox')
-rw-r--r--sys/i386/xbox/xboxfb.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/i386/xbox/xboxfb.c b/sys/i386/xbox/xboxfb.c
index 57fffe6..fa9decb 100644
--- a/sys/i386/xbox/xboxfb.c
+++ b/sys/i386/xbox/xboxfb.c
@@ -23,10 +23,11 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD$
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
/*
* This is the syscon(4)-ized version of the Xbox Frame Buffer driver. It
* supports about all features required, such as mouse support.
@@ -71,7 +72,7 @@ struct xboxfb_softc {
char* sc_framebuffer;
/* pointer to the font used */
- struct gfb_font* sc_font;
+ const struct gfb_font* sc_font;
};
#define SCREEN_WIDTH 640
@@ -79,7 +80,7 @@ struct xboxfb_softc {
#define XBOXFB_DRIVER_NAME "xboxsc"
-extern struct gfb_font bold8x16;
+extern const struct gfb_font bold8x16;
static vi_probe_t xboxfb_probe;
static vi_init_t xboxfb_init;
@@ -593,7 +594,7 @@ xboxfb_putc(video_adapter_t *adp, vm_offset_t off, u_int8_t c, u_int8_t a)
int i, j;
struct xboxfb_softc* sc = &xboxfb_sc;
uint32_t* ptri = (uint32_t*)sc->sc_framebuffer;
- uint8_t* fontdata;
+ const uint8_t* fontdata;
uint32_t clr;
uint8_t mask;
OpenPOWER on IntegriCloud