K 10 svn:author V 7 asomers K 8 svn:date V 27 2013-10-11T23:11:33.047940Z K 7 svn:log V 1799 Style, organization, and syntax improvements to zfsd. cddl/sbin/zfsd/guid.cc: cddl/sbin/zfsd/guid.h: cddl/sbin/zfsd/vdev.h: cddl/sbin/zfsd/vdev.cc: cddl/sbin/zfsd/Makefile: o Since GUIDs pertain to more than just vdevs, move its implementation out into its own file. No functional changes. cddl/sbin/zfsd/case_file.cc: cddl/sbin/zfsd/zfsd.cc: cddl/sbin/zfsd/dev_ctl_event.cc: o Local varables declared in the same block are aligned by their first character. cddl/sbin/zfsd/case_file.cc: cddl/sbin/zfsd/zfsd.cc: cddl/sbin/zfsd/dev_ctl_event.cc: o Function arguments wrap to the first column after the function's opening '('. o syslog strings referencing a method use the fully qualified method name. o There are no spaces after '(' or before ')' in conditionals. o Boolean operators in conditionals are aligned on the right side and indented based on the level of their operation. o Cache return values in local variable to avoid the need to compress whitespace to make lines fit in 80 cols. o There is one newline between function declarations. cddl/sbin/zfsd/vdev.h: cddl/sbin/zfsd/vdev.cc: o Wrap comments at 76 cols (i.e. what fmt does by default). o Method names start with a capital letter. o Implementations are never inlined within a class definition. This just encourages consumers of an interface to depend unnecessarily upon the implementation. cddl/sbin/zfsd/zfsd.cc: o Simple checks in conditionals (like '==' and '!=') do not require extra parenthesis. cddl/sbin/zfsd/dev_ctl_event.cc: o Use a constant format string so that syslog() cannot be confused by random '%' characters in the string we are logging. Submitted by: gibbs Approved by: ken (mentor) Sponsored by: Spectra Logic Corporation END