svn commit: r305029 - in projects/clang390-import: cddl/usr.sbin/zfsd cddl/usr.sbin/zfsd/tests lib/libc/sys sys/boot/efi/libefi sys/dev/ioat usr.sbin/bluetooth/btpand
Dimitry Andric
dim at FreeBSD.org
Mon Aug 29 20:57:11 UTC 2016
Author: dim
Date: Mon Aug 29 20:57:09 2016
New Revision: 305029
URL: https://svnweb.freebsd.org/changeset/base/305029
Log:
Merge ^/head r305017 through r305028.
Modified:
projects/clang390-import/cddl/usr.sbin/zfsd/Makefile
projects/clang390-import/cddl/usr.sbin/zfsd/Makefile.common
projects/clang390-import/cddl/usr.sbin/zfsd/tests/Makefile
projects/clang390-import/lib/libc/sys/ptrace.2
projects/clang390-import/sys/boot/efi/libefi/efi_console.c
projects/clang390-import/sys/dev/ioat/ioat.c
projects/clang390-import/usr.sbin/bluetooth/btpand/bnep.c
projects/clang390-import/usr.sbin/bluetooth/btpand/btpand.h
Directory Properties:
projects/clang390-import/ (props changed)
projects/clang390-import/cddl/ (props changed)
Modified: projects/clang390-import/cddl/usr.sbin/zfsd/Makefile
==============================================================================
--- projects/clang390-import/cddl/usr.sbin/zfsd/Makefile Mon Aug 29 20:51:34 2016 (r305028)
+++ projects/clang390-import/cddl/usr.sbin/zfsd/Makefile Mon Aug 29 20:57:09 2016 (r305029)
@@ -1,6 +1,5 @@
# $FreeBSD$
-SRCDIR=${.CURDIR}/../../..
.include "Makefile.common"
PROG_CXX= zfsd
Modified: projects/clang390-import/cddl/usr.sbin/zfsd/Makefile.common
==============================================================================
--- projects/clang390-import/cddl/usr.sbin/zfsd/Makefile.common Mon Aug 29 20:51:34 2016 (r305028)
+++ projects/clang390-import/cddl/usr.sbin/zfsd/Makefile.common Mon Aug 29 20:57:09 2016 (r305029)
@@ -15,20 +15,20 @@ WARNS?= 3
# Ignore warnings about Solaris specific pragmas.
IGNORE_PRAGMA= YES
-INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/lib/libzpool/common
-INCFLAGS+= -I${SRCDIR}/cddl/compat/opensolaris/include
-INCFLAGS+= -I${SRCDIR}/cddl/compat/opensolaris/lib/libumem
-INCFLAGS+= -I${SRCDIR}/sys/cddl/compat/opensolaris
-INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/head
-INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/lib/libuutil/common
-INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/lib/libumem/common
-INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/lib/libzfs_core/common
-INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/lib/libzfs/common
-INCFLAGS+= -I${SRCDIR}/cddl/contrib/opensolaris/lib/libnvpair
-INCFLAGS+= -I${SRCDIR}/sys/cddl/contrib/opensolaris/common/zfs
-INCFLAGS+= -I${SRCDIR}/sys/cddl/contrib/opensolaris/uts/common
-INCFLAGS+= -I${SRCDIR}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-INCFLAGS+= -I${SRCDIR}/sys/cddl/contrib/opensolaris/uts/common/sys
+INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
+INCFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
+INCFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
+INCFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
+INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common
+INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libumem/common
+INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common
+INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common
+INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
+INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
+INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
+INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
CFLAGS= -g -DNEED_SOLARIS_BOOLEAN ${INCFLAGS}
Modified: projects/clang390-import/cddl/usr.sbin/zfsd/tests/Makefile
==============================================================================
--- projects/clang390-import/cddl/usr.sbin/zfsd/tests/Makefile Mon Aug 29 20:51:34 2016 (r305028)
+++ projects/clang390-import/cddl/usr.sbin/zfsd/tests/Makefile Mon Aug 29 20:57:09 2016 (r305029)
@@ -1,10 +1,7 @@
# $FreeBSD$
-SRCDIR=${.CURDIR}/../../../..
.include "${.CURDIR}/../Makefile.common"
-.PATH: ${.CURDIR}/..
-
-TESTSDIR?= ${TESTSBASE}/cddl/usr.sbin/zfsd
+.PATH: ${.CURDIR:H}
PLAIN_TESTS_CXX= zfsd_unittest
SRCS.zfsd_unittest:= ${SRCS:Nzfsd_main.cc}
@@ -12,7 +9,7 @@ SRCS.zfsd_unittest+= libmocks.c zfsd_un
SRCS=
# Use #include <zfsd/xxx.h> in test programs.
-INCFLAGS+= -I${.CURDIR}/../..
+INCFLAGS+= -I${.CURDIR:H:H}
.if defined(DESTDIR)
INCFLAGS+= -I${DESTDIR}/usr/include
@@ -27,7 +24,6 @@ LIBRARY_PATH=
.endif
# Googletest options
-LOCALBASE?= /usr/local
INCFLAGS+= -I${LOCALBASE}/include -D_THREAD_SAFE -pthread
LDFLAGS.zfsd_unittest+= -L${LOCALBASE}/lib -D_THREAD_SAFE -pthread
LDADD.zfsd_unittest+= ${LOCALBASE}/lib/libgtest.a
@@ -39,7 +35,4 @@ LDADD.zfsd_unittest+= ${LOCALBASE}/lib/l
# https://groups.google.com/forum/#!msg/googletestframework/h8ixEPCFm0o/amwfu4xGJb0J
CFLAGS.zfsd_unittest+= -DGTEST_HAS_PTHREAD
-# Install the tests
-TESTSBASE?= /usr/tests
-
.include <bsd.test.mk>
Modified: projects/clang390-import/lib/libc/sys/ptrace.2
==============================================================================
--- projects/clang390-import/lib/libc/sys/ptrace.2 Mon Aug 29 20:51:34 2016 (r305028)
+++ projects/clang390-import/lib/libc/sys/ptrace.2 Mon Aug 29 20:57:09 2016 (r305029)
@@ -2,7 +2,7 @@
.\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $
.\"
.\" This file is in the public domain.
-.Dd August 28, 2016
+.Dd August 29, 2016
.Dt PTRACE 2
.Os
.Sh NAME
@@ -104,7 +104,7 @@ Each traced process has a tracing event
An event in the traced process only reports a
signal stop if the corresponding flag is set in the tracing event mask.
The current set of tracing event flags include:
-.Bl -tag -width ".Dv PTRACE_SYSCALL"
+.Bl -tag -width "Dv PTRACE_SYSCALL"
.It Dv PTRACE_EXEC
Report a stop for a successful invocation of
.Xr execve 2 .
@@ -231,7 +231,7 @@ The
.Fa request
argument
can be:
-.Bl -tag -width 12n
+.Bl -tag -width "Dv PT_GET_EVENT_MASK"
.It Dv PT_TRACE_ME
This request is the only one used by the traced process; it declares
that the process expects to be traced by its parent.
@@ -469,31 +469,31 @@ The fields in the
.Vt "struct ptrace_lwpinfo"
have the following meaning:
.Bl -tag -width indent -compact
-.It pl_lwpid
+.It Va pl_lwpid
LWP id of the thread
-.It pl_event
+.It Va pl_event
Event that caused the stop.
-Currently defined events are
-.Bl -tag -width indent -compact
-.It PL_EVENT_NONE
+Currently defined events are:
+.Bl -tag -width "Dv PL_EVENT_SIGNAL" -compact
+.It Dv PL_EVENT_NONE
No reason given
-.It PL_EVENT_SIGNAL
+.It Dv PL_EVENT_SIGNAL
Thread stopped due to the pending signal
.El
-.It pl_flags
+.It Va pl_flags
Flags that specify additional details about observed stop.
Currently defined flags are:
.Bl -tag -width indent -compact
-.It PL_FLAG_SCE
+.It Dv PL_FLAG_SCE
The thread stopped due to system call entry, right after the kernel is entered.
The debugger may examine syscall arguments that are stored in memory and
registers according to the ABI of the current process, and modify them,
if needed.
-.It PL_FLAG_SCX
+.It Dv PL_FLAG_SCX
The thread is stopped immediately before syscall is returning to the usermode.
The debugger may examine system call return values in the ABI-defined registers
and/or memory.
-.It PL_FLAG_EXEC
+.It Dv PL_FLAG_EXEC
When
.Dv PL_FLAG_SCX
is set, this flag may be additionally specified to inform that the
@@ -501,13 +501,13 @@ program being executed by debuggee proce
execution of a system call from the
.Fn execve 2
family.
-.It PL_FLAG_SI
+.It Dv PL_FLAG_SI
Indicates that
.Va pl_siginfo
member of
.Vt "struct ptrace_lwpinfo"
contains valid information.
-.It PL_FLAG_FORKED
+.It Dv PL_FLAG_FORKED
Indicates that the process is returning from a call to
.Fn fork 2
that created a new child process.
@@ -515,42 +515,42 @@ The process identifier of the new proces
.Va pl_child_pid
member of
.Vt "struct ptrace_lwpinfo" .
-.It PL_FLAG_CHILD
+.It Dv PL_FLAG_CHILD
The flag is set for first event reported from a new child which is
automatically attached when
.Dv PTRACE_FORK
is enabled.
-.It PL_FLAG_BORN
+.It Dv PL_FLAG_BORN
This flag is set for the first event reported from a new LWP when
.Dv PTRACE_LWP
is enabled.
It is reported along with
.Dv PL_FLAG_SCX .
-.It PL_FLAG_EXITED
+.It Dv PL_FLAG_EXITED
This flag is set for the last event reported by an exiting LWP when
.Dv PTRACE_LWP
is enabled.
Note that this event is not reported when the last LWP in a process exits.
The termination of the last thread is reported via a normal process exit
event.
-.It PL_FLAG_VFORKED
+.It Dv PL_FLAG_VFORKED
Indicates that the thread is returning from a call to
.Xr vfork 2
that created a new child process.
This flag is set in addition to
.Dv PL_FLAG_FORKED .
-.It PL_FLAG_VFORK_DONE
+.It Dv PL_FLAG_VFORK_DONE
Indicates that the thread has resumed after a child process created via
.Xr vfork 2
has stopped sharing its address space with the traced process.
.El
-.It pl_sigmask
+.It Va pl_sigmask
The current signal mask of the LWP
-.It pl_siglist
+.It Va pl_siglist
The current pending set of signals for the LWP.
Note that signals that are delivered to the process would not appear
on an LWP siglist until the thread is selected for delivery.
-.It pl_siginfo
+.It Va pl_siginfo
The siginfo that accompanies the signal pending.
Only valid for
.Dv PL_EVENT_SIGNAL
@@ -558,9 +558,9 @@ stop when
.Dv PL_FLAG_SI
is set in
.Va pl_flags .
-.It pl_tdname
+.It Va pl_tdname
The name of the thread.
-.It pl_child_pid
+.It Va pl_child_pid
The process identifier of the new child process.
Only valid for a
.Dv PL_EVENT_SIGNAL
@@ -568,7 +568,7 @@ stop when
.Dv PL_FLAG_FORKED
is set in
.Va pl_flags .
-.It pl_syscall_code
+.It Va pl_syscall_code
The ABI-specific identifier of the current system call.
Note that for indirect system calls this field reports the indirected
system call.
@@ -578,7 +578,7 @@ or
.Dv PL_FLAG_SCX
is set in
.Va pl_flags.
-.It pl_syscall_narg
+.It Va pl_syscall_narg
The number of arguments passed to the current system call not counting
the system call identifier.
Note that for indirect system calls this field reports the arguments
@@ -590,10 +590,10 @@ or
is set in
.Va pl_flags.
.El
-.It PT_GETNUMLWPS
+.It Dv PT_GETNUMLWPS
This request returns the number of kernel threads associated with the
traced process.
-.It PT_GETLWPLIST
+.It Dv PT_GETLWPLIST
This request can be used to get the current thread list.
A pointer to an array of type
.Vt lwpid_t
@@ -604,15 +604,15 @@ with the array size specified by
The return value from
.Fn ptrace
is the count of array entries filled in.
-.It PT_SETSTEP
+.It Dv PT_SETSTEP
This request will turn on single stepping of the specified process.
-.It PT_CLEARSTEP
+.It Dv PT_CLEARSTEP
This request will turn off single stepping of the specified process.
-.It PT_SUSPEND
+.It Dv PT_SUSPEND
This request will suspend the specified thread.
-.It PT_RESUME
+.It Dv PT_RESUME
This request will resume the specified thread.
-.It PT_TO_SCE
+.It Dv PT_TO_SCE
This request will set the
.Dv PTRACE_SCE
event flag to trace all future system call entries and continue the process.
@@ -622,7 +622,7 @@ and
.Fa data
arguments are used the same as for
.Dv PT_CONTINUE.
-.It PT_TO_SCX
+.It Dv PT_TO_SCX
This request will set the
.Dv PTRACE_SCX
event flag to trace all future system call exits and continue the process.
@@ -632,7 +632,7 @@ and
.Fa data
arguments are used the same as for
.Dv PT_CONTINUE.
-.It PT_SYSCALL
+.It Dv PT_SYSCALL
This request will set the
.Dv PTRACE_SYSCALL
event flag to trace all future system call entries and exits and continue
@@ -643,7 +643,7 @@ and
.Fa data
arguments are used the same as for
.Dv PT_CONTINUE.
-.It PT_FOLLOW_FORK
+.It Dv PT_FOLLOW_FORK
This request controls tracing for new child processes of a traced process.
If
.Fa data
@@ -655,7 +655,7 @@ If
is zero,
.Dv PTRACE_FORK
is cleared from the traced process's event tracing mask.
-.It PT_LWP_EVENTS
+.It Dv PT_LWP_EVENTS
This request controls tracing of LWP creation and destruction.
If
.Fa data
@@ -667,25 +667,25 @@ If
is zero,
.Dv PTRACE_LWP
is cleared from the traced process's event tracing mask.
-.It PT_GET_EVENT_MASK
+.It Dv PT_GET_EVENT_MASK
This request reads the traced process's event tracing mask into the
integer pointed to by
.Fa addr .
The size of the integer must be passed in
.Fa data .
-.It PT_SET_EVENT_MASK
+.It Dv PT_SET_EVENT_MASK
This request sets the traced process's event tracing mask from the
integer pointed to by
.Fa addr .
The size of the integer must be passed in
.Fa data .
-.It PT_VM_TIMESTAMP
+.It Dv PT_VM_TIMESTAMP
This request returns the generation number or timestamp of the memory map of
the traced process as the return value from
.Fn ptrace .
This provides a low-cost way for the tracing process to determine if the
VM map changed since the last time this request was made.
-.It PT_VM_ENTRY
+.It Dv PT_VM_ENTRY
This request is used to iterate over the entries of the VM map of the traced
process.
The
@@ -900,19 +900,29 @@ argument is ignored.
.Pp
Additionally, other machine-specific requests can exist.
.Sh RETURN VALUES
+Most requests return 0 on success and \-1 on error.
Some requests can cause
.Fn ptrace
to return
\-1
-as a non-error value; to disambiguate,
+as a non-error value, among them are
+.Dv PT_READ_I
+and
+.Dv PT_READ_D ,
+which return the value read from the process memory on success.
+To disambiguate,
.Va errno
-is set to 0 in the libc wrapper for the
-.Fn ptrace
-system call and
+can be set to 0 before the call and checked afterwards.
+.Pp
+The current
.Fn ptrace
-callers can reliably check
+implementation always sets
+.Va errno
+to 0 before calling into the kernel, both for historic reasons and for
+consistency with other operating systems.
+It is recommended to assign zero to
.Va errno
-for non-zero value afterwards.
+explicitly for forward compatibility.
.Sh ERRORS
The
.Fn ptrace
Modified: projects/clang390-import/sys/boot/efi/libefi/efi_console.c
==============================================================================
--- projects/clang390-import/sys/boot/efi/libefi/efi_console.c Mon Aug 29 20:51:34 2016 (r305028)
+++ projects/clang390-import/sys/boot/efi/libefi/efi_console.c Mon Aug 29 20:57:09 2016 (r305029)
@@ -51,6 +51,9 @@ void HO(void);
void end_term(void);
#endif
+static EFI_INPUT_KEY key_cur;
+static int key_pending;
+
static void efi_cons_probe(struct console *);
static int efi_cons_init(int);
void efi_cons_putchar(int);
@@ -436,14 +439,20 @@ efi_cons_getchar()
EFI_STATUS status;
UINTN junk;
- /* Try to read a key stroke. We wait for one if none is pending. */
- status = conin->ReadKeyStroke(conin, &key);
- while (status == EFI_NOT_READY) {
- /* Some EFI implementation (u-boot for example) do not support WaitForKey */
- if (conin->WaitForKey != NULL)
- BS->WaitForEvent(1, &conin->WaitForKey, &junk);
+ if (key_pending) {
+ key = key_cur;
+ key_pending = 0;
+ } else {
+ /* Try to read a key stroke. We wait for one if none is pending. */
status = conin->ReadKeyStroke(conin, &key);
+ while (status == EFI_NOT_READY) {
+ /* Some EFI implementation (u-boot for example) do not support WaitForKey */
+ if (conin->WaitForKey != NULL)
+ BS->WaitForEvent(1, &conin->WaitForKey, &junk);
+ status = conin->ReadKeyStroke(conin, &key);
+ }
}
+
switch (key.ScanCode) {
case 0x17: /* ESC */
return (0x1b); /* esc */
@@ -456,9 +465,20 @@ efi_cons_getchar()
int
efi_cons_poll()
{
+ EFI_INPUT_KEY key;
+ EFI_STATUS status;
+
+ if (conin->WaitForKey == NULL) {
+ if (key_pending)
+ return (1);
+ status = conin->ReadKeyStroke(conin, &key);
+ if (status == EFI_SUCCESS) {
+ key_cur = key;
+ key_pending = 1;
+ }
+ return (key_pending);
+ }
- if (conin->WaitForKey == NULL)
- return (1);
/* This can clear the signaled state. */
return (BS->CheckEvent(conin->WaitForKey) == EFI_SUCCESS);
}
Modified: projects/clang390-import/sys/dev/ioat/ioat.c
==============================================================================
--- projects/clang390-import/sys/dev/ioat/ioat.c Mon Aug 29 20:51:34 2016 (r305028)
+++ projects/clang390-import/sys/dev/ioat/ioat.c Mon Aug 29 20:57:09 2016 (r305029)
@@ -683,7 +683,16 @@ ioat_process_events(struct ioat_softc *i
__func__, ioat->chan_idx, comp_update, ioat->last_seen);
status = comp_update & IOAT_CHANSTS_COMPLETED_DESCRIPTOR_MASK;
- while (ioat_get_active(ioat) > 0) {
+ if (status == ioat->last_seen) {
+ /*
+ * If we landed in process_events and nothing has been
+ * completed, check for a timeout due to channel halt.
+ */
+ goto out;
+ }
+
+ desc = ioat_get_ring_entry(ioat, ioat->tail - 1);
+ while (desc->hw_desc_bus_addr != status && ioat_get_active(ioat) > 0) {
desc = ioat_get_ring_entry(ioat, ioat->tail);
dmadesc = &desc->bus_dmadesc;
CTR4(KTR_IOAT, "channel=%u completing desc %u ok cb %p(%p)",
@@ -695,8 +704,6 @@ ioat_process_events(struct ioat_softc *i
completed++;
ioat->tail++;
- if (desc->hw_desc_bus_addr == status)
- break;
}
if (completed != 0) {
@@ -704,6 +711,7 @@ ioat_process_events(struct ioat_softc *i
ioat->stats.descriptors_processed += completed;
}
+out:
ioat_write_chanctrl(ioat, IOAT_CHANCTRL_RUN);
/* Perform a racy check first; only take the locks if it passes. */
@@ -1823,6 +1831,9 @@ ioat_reset_hw(struct ioat_softc *ioat)
ioat->resetting_cleanup = TRUE;
mtx_unlock(&ioat->cleanup_lock);
+ CTR2(KTR_IOAT, "%s channel=%u quiesced and drained", __func__,
+ ioat->chan_idx);
+
status = ioat_get_chansts(ioat);
if (is_ioat_active(status) || is_ioat_idle(status))
ioat_suspend(ioat);
@@ -1843,6 +1854,9 @@ ioat_reset_hw(struct ioat_softc *ioat)
chanerr = ioat_read_4(ioat, IOAT_CHANERR_OFFSET);
ioat_write_4(ioat, IOAT_CHANERR_OFFSET, chanerr);
+ CTR2(KTR_IOAT, "%s channel=%u hardware suspended", __func__,
+ ioat->chan_idx);
+
/*
* IOAT v3 workaround - CHANERRMSK_INT with 3E07h to masks out errors
* that can cause stability issues for IOAT v3.
@@ -1862,6 +1876,8 @@ ioat_reset_hw(struct ioat_softc *ioat)
}
ioat_reset(ioat);
+ CTR2(KTR_IOAT, "%s channel=%u hardware reset", __func__,
+ ioat->chan_idx);
/* Wait at most 20 ms */
for (timeout = 0; ioat_reset_pending(ioat) && timeout < 20; timeout++)
@@ -1911,21 +1927,24 @@ ioat_reset_hw(struct ioat_softc *ioat)
ioat_write_chancmp(ioat, ioat->comp_update_bus_addr);
ioat_write_chainaddr(ioat, ioat->ring[0]->hw_desc_bus_addr);
error = 0;
+ CTR2(KTR_IOAT, "%s channel=%u configured channel", __func__,
+ ioat->chan_idx);
out:
+ /* Enqueues a null operation and ensures it completes. */
+ if (error == 0) {
+ error = ioat_start_channel(ioat);
+ CTR2(KTR_IOAT, "%s channel=%u started channel", __func__,
+ ioat->chan_idx);
+ }
+
/*
* Resume completions now that ring state is consistent.
- * ioat_start_channel will add a pending completion and if we are still
- * blocking completions, we may livelock.
*/
mtx_lock(&ioat->cleanup_lock);
ioat->resetting_cleanup = FALSE;
mtx_unlock(&ioat->cleanup_lock);
- /* Enqueues a null operation and ensures it completes. */
- if (error == 0)
- error = ioat_start_channel(ioat);
-
/* Unblock submission of new work */
mtx_lock(IOAT_REFLK);
ioat->quiescing = FALSE;
@@ -1933,6 +1952,11 @@ out:
ioat->resetting = FALSE;
wakeup(&ioat->resetting);
+
+ if (ioat->is_completion_pending)
+ callout_reset(&ioat->poll_timer, 1, ioat_poll_timer_callback,
+ ioat);
+ CTR2(KTR_IOAT, "%s channel=%u reset done", __func__, ioat->chan_idx);
mtx_unlock(IOAT_REFLK);
return (error);
Modified: projects/clang390-import/usr.sbin/bluetooth/btpand/bnep.c
==============================================================================
--- projects/clang390-import/usr.sbin/bluetooth/btpand/bnep.c Mon Aug 29 20:51:34 2016 (r305028)
+++ projects/clang390-import/usr.sbin/bluetooth/btpand/bnep.c Mon Aug 29 20:57:09 2016 (r305029)
@@ -574,7 +574,7 @@ bnep_recv_filter_multi_addr_rsp(channel_
}
void
-bnep_send_control(channel_t *chan, uint8_t type, ...)
+bnep_send_control(channel_t *chan, unsigned type, ...)
{
packet_t *pkt;
uint8_t *p;
@@ -590,7 +590,7 @@ bnep_send_control(channel_t *chan, uint8
va_start(ap, type);
*p++ = BNEP_CONTROL;
- *p++ = type;
+ *p++ = (uint8_t)type;
switch(type) {
case BNEP_CONTROL_COMMAND_NOT_UNDERSTOOD:
Modified: projects/clang390-import/usr.sbin/bluetooth/btpand/btpand.h
==============================================================================
--- projects/clang390-import/usr.sbin/bluetooth/btpand/btpand.h Mon Aug 29 20:51:34 2016 (r305028)
+++ projects/clang390-import/usr.sbin/bluetooth/btpand/btpand.h Mon Aug 29 20:57:09 2016 (r305029)
@@ -183,7 +183,7 @@ b2eaddr(void *dst, bdaddr_t *src)
/* bnep.c */
bool bnep_send(channel_t *, packet_t *);
bool bnep_recv(packet_t *);
-void bnep_send_control(channel_t *, uint8_t, ...);
+void bnep_send_control(channel_t *, unsigned, ...);
/* channel.c */
void channel_init(void);
More information about the svn-src-projects
mailing list