Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/dist/drm strlcpy instead of strcpy, p_...



details:   https://anonhg.NetBSD.org/src/rev/0020bef2b22b
branches:  trunk
changeset: 1027867:0020bef2b22b
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 01:00:02 2021 +0000

description:
strlcpy instead of strcpy, p_comm instead of comm.

diffstat:

 sys/external/bsd/drm2/dist/drm/drm_framebuffer.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r 037088dc61cd -r 0020bef2b22b sys/external/bsd/drm2/dist/drm/drm_framebuffer.c
--- a/sys/external/bsd/drm2/dist/drm/drm_framebuffer.c  Sun Dec 19 00:59:53 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_framebuffer.c  Sun Dec 19 01:00:02 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_framebuffer.c,v 1.2 2021/12/18 23:44:57 riastradh Exp $    */
+/*     $NetBSD: drm_framebuffer.c,v 1.3 2021/12/19 01:00:02 riastradh Exp $    */
 
 /*
  * Copyright (c) 2016 Intel Corporation
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_framebuffer.c,v 1.2 2021/12/18 23:44:57 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_framebuffer.c,v 1.3 2021/12/19 01:00:02 riastradh Exp $");
 
 #include <linux/export.h>
 #include <linux/uaccess.h>
@@ -736,7 +736,11 @@
        INIT_LIST_HEAD(&fb->filp_head);
 
        fb->funcs = funcs;
+#ifdef __NetBSD__
+       strlcpy(fb->comm, curproc->p_comm, sizeof fb->comm);
+#else
        strcpy(fb->comm, current->comm);
+#endif
 
        ret = __drm_mode_object_add(dev, &fb->base, DRM_MODE_OBJECT_FB,
                                    false, drm_framebuffer_free);



Home | Main Index | Thread Index | Old Index