K 10 svn:author V 7 asomers K 8 svn:date V 27 2013-10-14T22:58:48.165891Z K 7 svn:log V 2976 Extract devctl event processing support out of zfsd and into a new library: libdevctl. etc/mtree/BSD.include.dist: Add the /usr/include/devctl directory to the base system. lib/Makefile: lib/libdevctl/Makefile: Build support for the new library. lib/libdevctl/consumer.cc: lib/libdevctl/consumer.h: cddl/sbin/zfsd/zfsd.cc: cddl/sbin/zfsd/zfsd.h: New class, DevCtl::Consumer, from functionality extracted from ZfsDaemon, which can connect to devd, parse an event stream, and invoke event handlers. lib/libdevctl/event.cc: lib/libdevctl/event.h: cddl/sbin/zfsd/dev_ctl_event.cc: cddl/sbin/zfsd/dev_ctl_event.h: Strip Zfsd specific event handling from Zfsd's event classes to create DevCtl::Event, DevCtl::DevfsEvent, and DevCtl::ZfsEvent. lib/libdevctl/event_buffer.cc: lib/libdevctl/event_buffer.h: cddl/sbin/zfsd/zfsd.cc: cddl/sbin/zfsd/zfsd.h: DevCtl::EventBuffer: buffer for incoming devctl stream used to parse/extract individual event strings. lib/libdevctl/event_factory.cc: lib/libdevctl/event_factory.h: cddl/sbin/zfsd/zfsd.cc: cddl/sbin/zfsd/zfsd.h: DevCtl::EventFactory: Method map for converting event strings to Devctl::Event objects. lib/libdevctl/exception.cc: lib/libdevctl/exception.h: cddl/sbin/zfsd/zfsd_exception.cc: cddl/sbin/zfsd/zfsd_exception.h: DevCtl::Exception and DevCtl::ParseException, the exceptions which are thrown by this library. lib/libdevctl/guid.cc: lib/libdevctl/guid.h: cddl/sbin/zfsd/guid.cc: cddl/sbin/zfsd/guid.h: DevCtl::Guid: Helper routines for dealing with 64bit GUIDs such as found in Zfs pools and vdevs. lib/libdevctl/reader.cc: lib/libdevctl/reader.h: cddl/sbin/zfsd/zfsd.cc: cddl/sbin/zfsd/zfsd.h: DevCtl::Reader class hierarchy. Used to direct a Consumer to an event stream (e.g. from devd or a local/saved file). cddl/sbin/zfsd/zfsd_event.cc: cddl/sbin/zfsd/zfsd_event.h: Zfsd specialization of DevCtl::Event types. cddl/sbin/zfsd/zfsd_exception.cc: cddl/sbin/zfsd/zfsd_exception.h: Zfsd specific exception types, now derived from DevCtl::Excpetion. cddl/sbin/zfsd/Makefile: cddl/sbin/zfsd/callout.cc: cddl/sbin/zfsd/callout.h: cddl/sbin/zfsd/case_file.cc: cddl/sbin/zfsd/case_file.h: cddl/sbin/zfsd/vdev.cc: cddl/sbin/zfsd/vdev.h: cddl/sbin/zfsd/vdev_iterator.cc: cddl/sbin/zfsd/vdev_iterator.h: cddl/sbin/zfsd/zfsd.cc: cddl/sbin/zfsd/zfsd.h: cddl/sbin/zfsd/zfsd_event.cc: cddl/sbin/zfsd/zfsd_event.h: cddl/sbin/zfsd/zfsd_exception.cc: cddl/sbin/zfsd/zfsd_exception.h: cddl/sbin/zfsd/zfsd_main.cc: cddl/sbin/zfsd/zpool_list.cc: cddl/sbin/zfsd/zpool_list.h: Miscelaneuous refactoring to support using libdevctl instead of local implementation. cddl/sbin/zfsd/Makefile: cddl/sbin/zfsd/Makefile.common: tools/regression/zfsd/Makefile: Export common build information for zfsd and its unit tests to a "Makefile.common". Submitted by: gibbs Approved by: ken (mentor) Sponsored by: Spectra Logic Corporation END