Source-Changes-HG archive

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

[src/trunk]: src Fix fallout from hid factorisation:



details:   https://anonhg.NetBSD.org/src/rev/f39ec3bc93cc
branches:  trunk
changeset: 828389:f39ec3bc93cc
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sun Dec 10 20:38:13 2017 +0000

description:
Fix fallout from hid factorisation:
- need to install sys/dev/hid/hid.h for userland
- include it where needed - most of the time in place if usb/usbhid.h

diffstat:

 distrib/sets/lists/base/mi          |  3 ++-
 distrib/sets/lists/comp/mi          |  3 ++-
 etc/mtree/NetBSD.dist.base          |  3 ++-
 lib/libusbhid/parse.c               |  6 +++---
 sys/dev/Makefile                    |  4 ++--
 sys/dev/hid/Makefile                |  8 ++++++++
 sys/dev/hid/hid.h                   |  6 +++---
 tests/dev/usb/libhid/Makefile       |  4 ++--
 tests/dev/usb/t_hid/Makefile        |  6 ++++--
 usr.bin/usbhidaction/usbhidaction.c |  6 +++---
 usr.bin/usbhidctl/usbhid.c          |  5 +++--
 usr.sbin/btdevctl/print.c           |  6 +++---
 usr.sbin/btdevctl/sdp.c             |  5 +++--
 13 files changed, 40 insertions(+), 25 deletions(-)

diffs (270 lines):

diff -r 6b8ab7b14412 -r f39ec3bc93cc distrib/sets/lists/base/mi
--- a/distrib/sets/lists/base/mi        Sun Dec 10 20:30:45 2017 +0000
+++ b/distrib/sets/lists/base/mi        Sun Dec 10 20:38:13 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1164 2017/10/24 02:22:09 kre Exp $
+# $NetBSD: mi,v 1.1165 2017/12/10 20:38:13 bouyer Exp $
 #
 # Note:        Don't delete entries from here - mark them as "obsolete" instead,
 #      unless otherwise stated below.
@@ -1069,6 +1069,7 @@
 ./usr/include/dev/filemon                      base-c-usr
 ./usr/include/dev/hdaudio                      base-c-usr
 ./usr/include/dev/hdmicec                      base-c-usr
+./usr/include/dev/hid                          base-c-usr
 ./usr/include/dev/hpc                          base-c-usr
 ./usr/include/dev/i2c                          base-c-usr
 ./usr/include/dev/i2o                          base-c-usr
diff -r 6b8ab7b14412 -r f39ec3bc93cc distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi        Sun Dec 10 20:30:45 2017 +0000
+++ b/distrib/sets/lists/comp/mi        Sun Dec 10 20:38:13 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: mi,v 1.2161 2017/11/30 08:14:03 martin Exp $
+#      $NetBSD: mi,v 1.2162 2017/12/10 20:38:14 bouyer Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.comp                           comp-sys-root
@@ -413,6 +413,7 @@
 ./usr/include/dev/hdaudio/hdaudioio.h          comp-c-include
 ./usr/include/dev/hdaudio/hdaudioreg.h         comp-c-include
 ./usr/include/dev/hdmicec/hdmicecio.h          comp-c-include
+./usr/include/dev/hid/hid.h                    comp-c-include
 ./usr/include/dev/hpc/hpcfbio.h                        comp-c-include
 ./usr/include/dev/i2c/i2c_bus.h                        comp-obsolete           obsolete
 ./usr/include/dev/i2c/i2c_eeprom.h             comp-obsolete           obsolete
diff -r 6b8ab7b14412 -r f39ec3bc93cc etc/mtree/NetBSD.dist.base
--- a/etc/mtree/NetBSD.dist.base        Sun Dec 10 20:30:45 2017 +0000
+++ b/etc/mtree/NetBSD.dist.base        Sun Dec 10 20:38:13 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: NetBSD.dist.base,v 1.163 2017/10/21 05:30:48 kre Exp $
+#      $NetBSD: NetBSD.dist.base,v 1.164 2017/12/10 20:38:14 bouyer Exp $
 #      @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -116,6 +116,7 @@
 ./usr/include/dev/dmover
 ./usr/include/dev/dtv
 ./usr/include/dev/filemon
+./usr/include/dev/hid
 ./usr/include/dev/hpc
 ./usr/include/dev/i2c
 ./usr/include/dev/i2o
diff -r 6b8ab7b14412 -r f39ec3bc93cc lib/libusbhid/parse.c
--- a/lib/libusbhid/parse.c     Sun Dec 10 20:30:45 2017 +0000
+++ b/lib/libusbhid/parse.c     Sun Dec 10 20:38:13 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.9 2016/01/07 16:10:49 jakllsch Exp $       */
+/*     $NetBSD: parse.c,v 1.10 2017/12/10 20:38:14 bouyer Exp $        */
 
 /*
  * Copyright (c) 1999, 2001 Lennart Augustsson <augustss%NetBSD.org@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: parse.c,v 1.9 2016/01/07 16:10:49 jakllsch Exp $");
+__RCSID("$NetBSD: parse.c,v 1.10 2017/12/10 20:38:14 bouyer Exp $");
 
 #include <assert.h>
 #include <stdlib.h>
@@ -35,7 +35,7 @@
 #include <sys/time.h>
 
 #include <dev/usb/usb.h>
-#include <dev/usb/usbhid.h>
+#include <dev/hid/hid.h>
 
 #include "usbhid.h"
 #include "usbvar.h"
diff -r 6b8ab7b14412 -r f39ec3bc93cc sys/dev/Makefile
--- a/sys/dev/Makefile  Sun Dec 10 20:30:45 2017 +0000
+++ b/sys/dev/Makefile  Sun Dec 10 20:38:13 2017 +0000
@@ -1,6 +1,6 @@
-#      $NetBSD: Makefile,v 1.38 2016/12/09 04:46:39 christos Exp $
+#      $NetBSD: Makefile,v 1.39 2017/12/10 20:38:14 bouyer Exp $
 
-SUBDIR=        apm ata bluetooth dec dm dmover dtv filemon hdaudio hdmicec hpc \
+SUBDIR=        apm ata bluetooth dec dm dmover dtv filemon hdaudio hdmicec hid hpc \
        i2c i2o ic ieee1394 ir isa \
        microcode ofw pci pckbport pcmcia pud putter raidframe sbus scsipi \
        sun tc usb vme wscons
diff -r 6b8ab7b14412 -r f39ec3bc93cc sys/dev/hid/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/dev/hid/Makefile      Sun Dec 10 20:38:13 2017 +0000
@@ -0,0 +1,8 @@
+#      $NetBSD: Makefile,v 1.1 2017/12/10 20:38:14 bouyer Exp $
+
+INCSDIR= /usr/include/dev/hid
+
+# Only install includes which are used by userland
+INCS=  hid.h
+
+.include <bsd.kinc.mk>
diff -r 6b8ab7b14412 -r f39ec3bc93cc sys/dev/hid/hid.h
--- a/sys/dev/hid/hid.h Sun Dec 10 20:30:45 2017 +0000
+++ b/sys/dev/hid/hid.h Sun Dec 10 20:38:13 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hid.h,v 1.1 2017/12/10 17:03:07 bouyer Exp $   */
+/*     $NetBSD: hid.h,v 1.2 2017/12/10 20:38:14 bouyer Exp $   */
 /*     $FreeBSD: src/sys/dev/usb/hid.h,v 1.7 1999/11/17 22:33:40 n_hibma Exp $ */
 
 /*
@@ -34,7 +34,7 @@
 #ifndef _HIDHID_H_
 #define _HIDHID_H_
 
-#ifdef _KERNEL
+#if defined(_KERNEL) || defined(_RUMPKERNEL)
 
 enum hid_kind {
        hid_input,
@@ -93,7 +93,7 @@
 u_long hid_get_udata(const u_char *, const struct hid_location *);
 int hid_is_collection(const void *, int, uint8_t, uint32_t);
 
-#endif /*  _KERNEL */
+#endif /* _KERNEL || _RUMPKERNEL */
 
 /* Usage pages */
 #define HUP_UNDEFINED          0x0000
diff -r 6b8ab7b14412 -r f39ec3bc93cc tests/dev/usb/libhid/Makefile
--- a/tests/dev/usb/libhid/Makefile     Sun Dec 10 20:30:45 2017 +0000
+++ b/tests/dev/usb/libhid/Makefile     Sun Dec 10 20:38:13 2017 +0000
@@ -1,10 +1,10 @@
-#      $NetBSD: Makefile,v 1.1 2016/01/05 17:22:39 jakllsch Exp $
+#      $NetBSD: Makefile,v 1.2 2017/12/10 20:38:14 bouyer Exp $
 #
 
 .include <bsd.own.mk>
 
 RUMPTOP= ${NETBSDSRCDIR}/sys/rump
-.PATH: ${.CURDIR}/../../../../sys/dev/usb
+.PATH: ${.CURDIR}/../../../../sys/dev/hid
 
 LIB=   rumpdev_hid
 LIBISPRIVATE= #defined
diff -r 6b8ab7b14412 -r f39ec3bc93cc tests/dev/usb/t_hid/Makefile
--- a/tests/dev/usb/t_hid/Makefile      Sun Dec 10 20:30:45 2017 +0000
+++ b/tests/dev/usb/t_hid/Makefile      Sun Dec 10 20:38:13 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.1 2016/01/08 17:27:48 jakllsch Exp $
+#      $NetBSD: Makefile,v 1.2 2017/12/10 20:38:14 bouyer Exp $
 #
 
 PROG= t_hid
@@ -6,7 +6,9 @@
 
 .PATH: ${.CURDIR}/..
 
-CPPFLAGS.t_hid.c= -I${.CURDIR}/../../../../sys/dev/usb
+CPPFLAGS.t_hid.c= -I${.CURDIR}/../../../../sys/dev/hid
+CPPFLAGS.t_hid.c+= -I${.CURDIR}/../../../../sys/dev/usb
+CPPFLAGS.t_hid.c+= -D_RUMPKERNEL
 
 .include <bsd.own.mk>
 
diff -r 6b8ab7b14412 -r f39ec3bc93cc usr.bin/usbhidaction/usbhidaction.c
--- a/usr.bin/usbhidaction/usbhidaction.c       Sun Dec 10 20:30:45 2017 +0000
+++ b/usr.bin/usbhidaction/usbhidaction.c       Sun Dec 10 20:38:13 2017 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: usbhidaction.c,v 1.27 2016/12/31 10:13:15 dholland Exp $ */
+/*      $NetBSD: usbhidaction.c,v 1.28 2017/12/10 20:38:14 bouyer Exp $ */
 
 /*
  * Copyright (c) 2000, 2002 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: usbhidaction.c,v 1.27 2016/12/31 10:13:15 dholland Exp $");
+__RCSID("$NetBSD: usbhidaction.c,v 1.28 2017/12/10 20:38:14 bouyer Exp $");
 #endif
 
 #include <stdio.h>
@@ -45,7 +45,7 @@
 #include <sys/types.h>
 #include <sys/ioctl.h>
 #include <dev/usb/usb.h>
-#include <dev/usb/usbhid.h>
+#include <dev/hid/hid.h>
 #include <usbhid.h>
 #include <util.h>
 #include <syslog.h>
diff -r 6b8ab7b14412 -r f39ec3bc93cc usr.bin/usbhidctl/usbhid.c
--- a/usr.bin/usbhidctl/usbhid.c        Sun Dec 10 20:30:45 2017 +0000
+++ b/usr.bin/usbhidctl/usbhid.c        Sun Dec 10 20:38:13 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbhid.c,v 1.36 2011/09/16 15:39:30 joerg Exp $        */
+/*     $NetBSD: usbhid.c,v 1.37 2017/12/10 20:38:14 bouyer Exp $       */
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -31,13 +31,14 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: usbhid.c,v 1.36 2011/09/16 15:39:30 joerg Exp $");
+__RCSID("$NetBSD: usbhid.c,v 1.37 2017/12/10 20:38:14 bouyer Exp $");
 #endif
 
 #include <sys/types.h>
 
 #include <dev/usb/usb.h>
 #include <dev/usb/usbhid.h>
+#include <dev/hid/hid.h>
 
 #include <ctype.h>
 #include <err.h>
diff -r 6b8ab7b14412 -r f39ec3bc93cc usr.sbin/btdevctl/print.c
--- a/usr.sbin/btdevctl/print.c Sun Dec 10 20:30:45 2017 +0000
+++ b/usr.sbin/btdevctl/print.c Sun Dec 10 20:38:13 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: print.c,v 1.10 2010/04/28 06:18:07 plunky Exp $        */
+/*     $NetBSD: print.c,v 1.11 2017/12/10 20:38:14 bouyer Exp $        */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: print.c,v 1.10 2010/04/28 06:18:07 plunky Exp $");
+__RCSID("$NetBSD: print.c,v 1.11 2017/12/10 20:38:14 bouyer Exp $");
 
 #include <sys/types.h>
 
@@ -66,7 +66,7 @@
 #include <dev/bluetooth/bthidev.h>
 #include <dev/bluetooth/btsco.h>
 #include <dev/usb/usb.h>
-#include <dev/usb/usbhid.h>
+#include <dev/hid/hid.h>
 
 #include <prop/proplib.h>
 
diff -r 6b8ab7b14412 -r f39ec3bc93cc usr.sbin/btdevctl/sdp.c
--- a/usr.sbin/btdevctl/sdp.c   Sun Dec 10 20:30:45 2017 +0000
+++ b/usr.sbin/btdevctl/sdp.c   Sun Dec 10 20:38:13 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sdp.c,v 1.9 2011/03/20 19:46:13 plunky Exp $   */
+/*     $NetBSD: sdp.c,v 1.10 2017/12/10 20:38:14 bouyer Exp $  */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: sdp.c,v 1.9 2011/03/20 19:46:13 plunky Exp $");
+__RCSID("$NetBSD: sdp.c,v 1.10 2017/12/10 20:38:14 bouyer Exp $");
 
 #include <sys/types.h>
 
@@ -65,6 +65,7 @@
 #include <dev/bluetooth/btsco.h>
 #include <dev/usb/usb.h>
 #include <dev/usb/usbhid.h>
+#include <dev/hid/hid.h>
 
 #include <prop/proplib.h>
 



Home | Main Index | Thread Index | Old Index