Date: Fri, 6 Feb 2015 21:58:10 +0200 From: Ivan Klymenko <fidaj@ukr.net> To: John Baldwin <jhb@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r278320 - in head: contrib/mdocml lib lib/libdevctl share/mk sys/dev/acpica sys/dev/pci sys/kern sys/sys usr.sbin usr.sbin/devctl Message-ID: <20150206215810.532ce926@nonamehost.local> In-Reply-To: <201502061609.t16G92rn091851@svn.freebsd.org> References: <201502061609.t16G92rn091851@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
=D0=92 Fri, 6 Feb 2015 16:09:02 +0000 (UTC) John Baldwin <jhb@FreeBSD.org> =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > Author: jhb > Date: Fri Feb 6 16:09:01 2015 > New Revision: 278320 > URL: https://svnweb.freebsd.org/changeset/base/278320 >=20 > Log: > Add a new device control utility for new-bus devices called > devctl. This allows the user to request administrative changes to > individual devices such as attach or detaching drivers or disabling > and re-enabling devices. > - Add a new /dev/devctl2 character device which uses ioctls for > device requests. The ioctls use a common 'struct devreq' which is > somewhat similar to 'struct ifreq'. > - The ioctls identify the device to operate on via a string. This > string can either by the device's name, or it can be a > bus-specific address. (For unattached devices, a bus address is the > only way to locate a device.) Bus drivers register an eventhandler > to claim unrecognized device names that the driver recognizes as a > valid address. Two buses currently support addresses: ACPI recognizes > any device in the ACPI namespace via its full path starting with "\" > and the PCI bus driver recognizes an address specification of > 'pci[<domain>:]<bus>:<slot>:<func>' (identical to the PCI selector > strings supported by pciconf). > - To make it easier to cut and paste, change the PnP location string > in the PCI bus driver to output a full PCI selector string rather > than 'slot=3D<slot> function=3D<func>'. > - Add a devctl(3) interface in libdevctl which provides a wrapper > around the ioctls and is the preferred interface for other userland > code. > - Add a devctl(8) program which is a simple wrapper around the > requests supported by devctl(3). > - Add a device_is_suspended() function to check DF_SUSPENDED. > - Add a resource_unset_value() function that can be used to remove a > hint from the kernel environment. This is used to clear a > hint.<driver>.<unit>.disabled hint when re-enabling a boot-time > disabled device. > =20 > Reviewed by: imp (parts) > Requested by: imp (changing PCI location string) > Relnotes: yes >=20 > Added: > head/lib/libdevctl/ > head/lib/libdevctl/Makefile (contents, props changed) > head/lib/libdevctl/devctl.3 (contents, props changed) > head/lib/libdevctl/devctl.c (contents, props changed) > head/lib/libdevctl/devctl.h (contents, props changed) > head/usr.sbin/devctl/ > head/usr.sbin/devctl/Makefile (contents, props changed) > head/usr.sbin/devctl/devctl.8 (contents, props changed) > head/usr.sbin/devctl/devctl.c (contents, props changed) > Modified: > head/contrib/mdocml/lib.in > head/lib/Makefile > head/share/mk/bsd.libnames.mk > head/share/mk/src.libnames.mk > head/sys/dev/acpica/acpi.c > head/sys/dev/pci/pci.c > head/sys/kern/subr_bus.c > head/sys/kern/subr_hints.c > head/sys/sys/bus.h > head/usr.sbin/Makefile >=20 > Modified: head/contrib/mdocml/lib.in ... --- alias_dummy.o --- /usr/local/libexec/ccache/world/cc -target x86_64-unknown-freebsd11.0 -O2 = -pipe -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 -mavx -mae= s -mpclmul -march=3Dnative -std=3Dgnu99 -fstack-protector -Wsystem-headers= -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused= -const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parenthese= s-equality -Wno-unused-function -Wno-enum-conversion -Wno-switch -Wno-switc= h-enum -Wno-knr-promoted-parameter -Wno-parentheses -Qunused-arguments -c /= usr/src/lib/libalias/modules/dummy/../../../../sys/netinet/libalias/alias_d= ummy.c -o alias_dummy.o --- libalias_dummy.so --- building shared library libalias_dummy.so --- all_subdir_libdevctl --- /usr/src/lib/libdevctl/devctl.c:38:35: error: declaration of 'struct devreq= ' will not be visible outside of this function [-Werror,-Wvisibility] devctl_request(u_long cmd, struct devreq *req) ^ /usr/src/lib/libdevctl/devctl.c:47:10: error: implicit declaration of funct= ion 'ioctl' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return (ioctl(devctl2_fd, cmd, req)); ^ /usr/src/lib/libdevctl/devctl.c:53:16: error: variable has incomplete type = 'struct devreq' struct devreq req; ^ /usr/src/lib/libdevctl/devctl.c:53:9: note: forward declaration of 'struct = devreq' struct devreq req; ^ /usr/src/lib/libdevctl/devctl.c:69:32: error: use of undeclared identifier = 'DEV_ATTACH' return (devctl_simple_request(DEV_ATTACH, device, 0)); ^ /usr/src/lib/libdevctl/devctl.c:76:32: error: use of undeclared identifier = 'DEV_DETACH' return (devctl_simple_request(DEV_DETACH, device, force ? ^ /usr/src/lib/libdevctl/devctl.c:77:6: error: use of undeclared identifier '= DEVF_FORCE_DETACH' DEVF_FORCE_DETACH : 0)); ^ /usr/src/lib/libdevctl/devctl.c:84:32: error: use of undeclared identifier = 'DEV_ENABLE' return (devctl_simple_request(DEV_ENABLE, device, 0)); ^ /usr/src/lib/libdevctl/devctl.c:91:32: error: use of undeclared identifier = 'DEV_DISABLE' return (devctl_simple_request(DEV_DISABLE, device, force_detach ? ^ /usr/src/lib/libdevctl/devctl.c:92:6: error: use of undeclared identifier '= DEVF_FORCE_DETACH' DEVF_FORCE_DETACH : 0)); ^ /usr/src/lib/libdevctl/devctl.c:99:32: error: use of undeclared identifier = 'DEV_SUSPEND' return (devctl_simple_request(DEV_SUSPEND, device, 0)); ^ /usr/src/lib/libdevctl/devctl.c:106:32: error: use of undeclared identifier= 'DEV_RESUME' return (devctl_simple_request(DEV_RESUME, device, 0)); ^ /usr/src/lib/libdevctl/devctl.c:112:16: error: variable has incomplete type= 'struct devreq' struct devreq req; ^ /usr/src/lib/libdevctl/devctl.c:112:9: note: forward declaration of 'struct= devreq' struct devreq req; ^ /usr/src/lib/libdevctl/devctl.c:122:19: error: use of undeclared identifier= 'DEVF_SET_DRIVER_DETACH' req.dr_flags |=3D DEVF_SET_DRIVER_DETACH; ^ /usr/src/lib/libdevctl/devctl.c:123:25: error: use of undeclared identifier= 'DEV_SET_DRIVER' return (devctl_request(DEV_SET_DRIVER, &req)); ^ 14 errors generated. *** [devctl.So] Error code 1 make[5]: stopped in /usr/src/lib/libdevctl 1 error make[5]: stopped in /usr/src/lib/libdevctl *** [all_subdir_libdevctl] Error code 2 make[4]: stopped in /usr/src/lib --- all_subdir_libcompat --- A failure has been detected in another branch of the parallel make make[5]: stopped in /usr/src/lib/libcompat *** [all_subdir_libcompat] Error code 2 make[4]: stopped in /usr/src/lib --- all_subdir_libalias --- A failure has been detected in another branch of the parallel make make[7]: stopped in /usr/src/lib/libalias/modules/dummy *** [_sub.all] Error code 2 make[6]: stopped in /usr/src/lib/libalias/modules 1 error make[6]: stopped in /usr/src/lib/libalias/modules *** [_sub.all] Error code 2 make[5]: stopped in /usr/src/lib/libalias 1 error make[5]: stopped in /usr/src/lib/libalias *** [all_subdir_libalias] Error code 2 make[4]: stopped in /usr/src/lib --- all_subdir_libbsm --- A failure has been detected in another branch of the parallel make make[5]: stopped in /usr/src/lib/libbsm *** [all_subdir_libbsm] Error code 2 make[4]: stopped in /usr/src/lib 4 errors make[4]: stopped in /usr/src/lib A failure has been detected in another branch of the parallel make make[3]: stopped in /usr/src *** [libraries] Error code 2 make[2]: stopped in /usr/src 1 error make[2]: stopped in /usr/src *** [_libraries] Error code 2 make[1]: stopped in /usr/src 1 error make[1]: stopped in /usr/src *** [buildworld] Error code 2 make: stopped in /usr/src 1 error make: stopped in /usr/src root@nonamehost:/usr/src #=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150206215810.532ce926>