Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/kqueue]: src/sys/dev/wsfont catch up with -current



details:   https://anonhg.NetBSD.org/src/rev/d288ed11b3a5
branches:  kqueue
changeset: 512464:d288ed11b3a5
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Jun 16 19:57:49 2002 +0000

description:
catch up with -current

diffstat:

 sys/dev/wsfont/wsfont.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (45 lines):

diff -r d24778891200 -r d288ed11b3a5 sys/dev/wsfont/wsfont.c
--- a/sys/dev/wsfont/wsfont.c   Sun Jun 16 09:51:12 2002 +0000
+++ b/sys/dev/wsfont/wsfont.c   Sun Jun 16 19:57:49 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wsfont.c,v 1.20.2.3 2002/03/16 16:01:45 jdolecek Exp $ */
+/*     $NetBSD: wsfont.c,v 1.20.2.4 2002/06/16 19:57:49 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.20.2.3 2002/03/16 16:01:45 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.20.2.4 2002/06/16 19:57:49 jdolecek Exp $");
 
 #include "opt_wsfont.h"
 
@@ -45,6 +45,7 @@
 #include <sys/systm.h>
 #include <sys/time.h>
 #include <sys/malloc.h>
+#include <sys/queue.h>
 
 #include <dev/wscons/wsdisplayvar.h>
 #include <dev/wscons/wsconsio.h>
@@ -339,7 +340,7 @@
        struct font *ent;
        size_t size;
 
-       ent = malloc(sizeof(struct font *), M_DEVBUF, M_WAITOK | M_ZERO);
+       ent = malloc(sizeof(struct font), M_DEVBUF, M_WAITOK | M_ZERO);
 
        /* Is this font statically allocated? */
        if (!copy) {
@@ -347,7 +348,8 @@
                ent->flags = WSFONT_STATIC;
        } else {
                ent->font = malloc(sizeof(struct wsdisplay_font), M_DEVBUF,
-                   M_WAITOK | M_ZERO);
+                   M_WAITOK);
+               memcpy(ent->font, font, sizeof(*ent->font));
 
                size = font->fontheight * font->numchars * font->stride;
                ent->font->data = malloc(size, M_DEVBUF, M_WAITOK);



Home | Main Index | Thread Index | Old Index