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
Ivan Klymenko
fidaj at ukr.net
Fri Feb 6 20:20:21 UTC 2015
В Fri, 6 Feb 2015 16:09:02 +0000 (UTC)
John Baldwin <jhb at FreeBSD.org> пишет:
> Author: jhb
> Date: Fri Feb 6 16:09:01 2015
> New Revision: 278320
> URL: https://svnweb.freebsd.org/changeset/base/278320
>
> 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=<slot> function=<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.
>
> Reviewed by: imp (parts)
> Requested by: imp (changing PCI location string)
> Relnotes: yes
>
> 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
>
> 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 -maes -mpclmul -march=native -std=gnu99 -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-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -Qunused-arguments -c /usr/src/lib/libalias/modules/dummy/../../../../sys/netinet/libalias/alias_dummy.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 function '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 |= 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 at nonamehost:/usr/src #
More information about the svn-src-head
mailing list