summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--COPYRIGHT2
-rw-r--r--LOCKS1
-rw-r--r--ObsoleteFiles.inc6
-rw-r--r--UPDATING18
-rw-r--r--bin/date/netdate.c2
-rw-r--r--bin/df/df.c2
-rw-r--r--bin/ln/ln.12
-rw-r--r--bin/ps/ps.c20
-rw-r--r--bin/sh/eval.c6
-rw-r--r--bin/sh/jobs.c21
-rw-r--r--bin/sh/output.c14
-rw-r--r--bin/sh/output.h2
-rw-r--r--bin/test/test.19
-rw-r--r--cddl/contrib/opensolaris/cmd/zdb/zdb.c26
-rw-r--r--cddl/contrib/opensolaris/cmd/zpool/zpool_main.c5
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c31
-rw-r--r--contrib/bind9/CHANGES112
-rw-r--r--contrib/bind9/Makefile.in2
-rw-r--r--contrib/bind9/README5
-rw-r--r--contrib/bind9/acconfig.h5
-rw-r--r--contrib/bind9/bin/Makefile.in2
-rw-r--r--contrib/bind9/bin/check/Makefile.in2
-rw-r--r--contrib/bind9/bin/check/check-tool.c5
-rw-r--r--contrib/bind9/bin/confgen/Makefile.in2
-rw-r--r--contrib/bind9/bin/confgen/unix/Makefile.in2
-rw-r--r--contrib/bind9/bin/dig/Makefile.in2
-rw-r--r--contrib/bind9/bin/dig/nslookup.c11
-rw-r--r--contrib/bind9/bin/dnssec/Makefile.in2
-rw-r--r--contrib/bind9/bin/dnssec/dnssec-dsfromkey.86
-rw-r--r--contrib/bind9/bin/dnssec/dnssec-dsfromkey.c7
-rw-r--r--contrib/bind9/bin/dnssec/dnssec-dsfromkey.docbook6
-rw-r--r--contrib/bind9/bin/dnssec/dnssec-dsfromkey.html19
-rw-r--r--contrib/bind9/bin/dnssec/dnssec-keyfromlabel.86
-rw-r--r--contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c8
-rw-r--r--contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook6
-rw-r--r--contrib/bind9/bin/dnssec/dnssec-keyfromlabel.html17
-rw-r--r--contrib/bind9/bin/dnssec/dnssec-keygen.810
-rw-r--r--contrib/bind9/bin/dnssec/dnssec-keygen.c23
-rw-r--r--contrib/bind9/bin/dnssec/dnssec-keygen.docbook12
-rw-r--r--contrib/bind9/bin/dnssec/dnssec-keygen.html25
-rw-r--r--contrib/bind9/bin/dnssec/dnssec-settime.c7
-rw-r--r--contrib/bind9/bin/dnssec/dnssec-signzone.c5
-rw-r--r--contrib/bind9/bin/named/Makefile.in2
-rw-r--r--contrib/bind9/bin/named/builtin.c6
-rw-r--r--contrib/bind9/bin/named/config.c4
-rw-r--r--contrib/bind9/bin/named/controlconf.c6
-rwxr-xr-xcontrib/bind9/bin/named/convertxsl.pl2
-rw-r--r--contrib/bind9/bin/named/query.c180
-rw-r--r--contrib/bind9/bin/named/server.c108
-rw-r--r--contrib/bind9/bin/named/statschannel.c37
-rw-r--r--contrib/bind9/bin/named/unix/Makefile.in2
-rw-r--r--contrib/bind9/bin/nsupdate/Makefile.in2
-rw-r--r--contrib/bind9/bin/nsupdate/nsupdate.c53
-rw-r--r--contrib/bind9/bin/rndc/Makefile.in2
-rw-r--r--contrib/bind9/bin/tools/Makefile.in2
-rw-r--r--contrib/bind9/config.h.in10
-rw-r--r--contrib/bind9/configure.in43
-rw-r--r--contrib/bind9/doc/Makefile.in2
-rw-r--r--contrib/bind9/doc/arm/Bv9ARM-book.xml179
-rw-r--r--contrib/bind9/doc/arm/Bv9ARM.ch04.html96
-rw-r--r--contrib/bind9/doc/arm/Bv9ARM.ch06.html260
-rw-r--r--contrib/bind9/doc/arm/Bv9ARM.ch07.html12
-rw-r--r--contrib/bind9/doc/arm/Bv9ARM.ch08.html16
-rw-r--r--contrib/bind9/doc/arm/Bv9ARM.ch09.html218
-rw-r--r--contrib/bind9/doc/arm/Bv9ARM.html96
-rw-r--r--contrib/bind9/doc/arm/Bv9ARM.pdf6512
-rw-r--r--contrib/bind9/doc/arm/Makefile.in2
-rw-r--r--contrib/bind9/doc/arm/man.arpaname.html6
-rw-r--r--contrib/bind9/doc/arm/man.ddns-confgen.html8
-rw-r--r--contrib/bind9/doc/arm/man.dig.html18
-rw-r--r--contrib/bind9/doc/arm/man.dnssec-dsfromkey.html17
-rw-r--r--contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html15
-rw-r--r--contrib/bind9/doc/arm/man.dnssec-keygen.html23
-rw-r--r--contrib/bind9/doc/arm/man.dnssec-revoke.html8
-rw-r--r--contrib/bind9/doc/arm/man.dnssec-settime.html12
-rw-r--r--contrib/bind9/doc/arm/man.dnssec-signzone.html10
-rw-r--r--contrib/bind9/doc/arm/man.genrandom.html8
-rw-r--r--contrib/bind9/doc/arm/man.host.html8
-rw-r--r--contrib/bind9/doc/arm/man.isc-hmac-fixup.html8
-rw-r--r--contrib/bind9/doc/arm/man.named-checkconf.html10
-rw-r--r--contrib/bind9/doc/arm/man.named-checkzone.html10
-rw-r--r--contrib/bind9/doc/arm/man.named-journalprint.html6
-rw-r--r--contrib/bind9/doc/arm/man.named.html14
-rw-r--r--contrib/bind9/doc/arm/man.nsec3hash.html8
-rw-r--r--contrib/bind9/doc/arm/man.nsupdate.html12
-rw-r--r--contrib/bind9/doc/arm/man.rndc-confgen.html10
-rw-r--r--contrib/bind9/doc/arm/man.rndc.conf.html10
-rw-r--r--contrib/bind9/doc/arm/man.rndc.html10
-rw-r--r--contrib/bind9/doc/misc/Makefile.in2
-rw-r--r--contrib/bind9/doc/misc/format-options.pl2
-rw-r--r--contrib/bind9/doc/misc/options18
-rwxr-xr-xcontrib/bind9/doc/misc/sort-options.pl2
-rw-r--r--contrib/bind9/isc-config.sh.in2
-rw-r--r--contrib/bind9/lib/Makefile.in2
-rw-r--r--contrib/bind9/lib/bind9/Makefile.in2
-rw-r--r--contrib/bind9/lib/bind9/api2
-rw-r--r--contrib/bind9/lib/bind9/check.c69
-rw-r--r--contrib/bind9/lib/bind9/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/bind9/include/bind9/Makefile.in2
-rw-r--r--contrib/bind9/lib/dns/Makefile.in5
-rw-r--r--contrib/bind9/lib/dns/adb.c44
-rw-r--r--contrib/bind9/lib/dns/api4
-rw-r--r--contrib/bind9/lib/dns/db.c9
-rw-r--r--contrib/bind9/lib/dns/dnssec.c115
-rw-r--r--contrib/bind9/lib/dns/ds.c35
-rw-r--r--contrib/bind9/lib/dns/dst_api.c16
-rw-r--r--contrib/bind9/lib/dns/dst_internal.h3
-rw-r--r--contrib/bind9/lib/dns/dst_openssl.h3
-rw-r--r--contrib/bind9/lib/dns/dst_parse.c61
-rw-r--r--contrib/bind9/lib/dns/dst_parse.h5
-rw-r--r--contrib/bind9/lib/dns/dst_result.c4
-rw-r--r--contrib/bind9/lib/dns/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/dns/include/dns/db.h8
-rw-r--r--contrib/bind9/lib/dns/include/dns/dnssec.h13
-rw-r--r--contrib/bind9/lib/dns/include/dns/ds.h7
-rw-r--r--contrib/bind9/lib/dns/include/dns/iptable.h4
-rw-r--r--contrib/bind9/lib/dns/include/dns/keyvalues.h10
-rw-r--r--contrib/bind9/lib/dns/include/dns/log.h1
-rw-r--r--contrib/bind9/lib/dns/include/dns/rdataset.h20
-rw-r--r--contrib/bind9/lib/dns/include/dns/rpz.h13
-rw-r--r--contrib/bind9/lib/dns/include/dns/stats.h10
-rw-r--r--contrib/bind9/lib/dns/include/dns/view.h2
-rw-r--r--contrib/bind9/lib/dns/include/dns/zone.h2
-rw-r--r--contrib/bind9/lib/dns/include/dst/Makefile.in2
-rw-r--r--contrib/bind9/lib/dns/include/dst/dst.h2
-rw-r--r--contrib/bind9/lib/dns/include/dst/result.h6
-rw-r--r--contrib/bind9/lib/dns/log.c1
-rw-r--r--contrib/bind9/lib/dns/master.c47
-rw-r--r--contrib/bind9/lib/dns/masterdump.c12
-rw-r--r--contrib/bind9/lib/dns/openssl_link.c40
-rw-r--r--contrib/bind9/lib/dns/openssldh_link.c18
-rw-r--r--contrib/bind9/lib/dns/openssldsa_link.c34
-rw-r--r--contrib/bind9/lib/dns/opensslecdsa_link.c596
-rw-r--r--contrib/bind9/lib/dns/opensslgost_link.c75
-rw-r--r--contrib/bind9/lib/dns/opensslrsa_link.c52
-rw-r--r--contrib/bind9/lib/dns/rbtdb.c39
-rw-r--r--contrib/bind9/lib/dns/rcode.c2
-rw-r--r--contrib/bind9/lib/dns/rdata.c12
-rw-r--r--contrib/bind9/lib/dns/rdata/generic/dlv_32769.c12
-rw-r--r--contrib/bind9/lib/dns/rdata/generic/ds_43.c12
-rw-r--r--contrib/bind9/lib/dns/rdataset.c28
-rw-r--r--contrib/bind9/lib/dns/resolver.c50
-rw-r--r--contrib/bind9/lib/dns/rpz.c133
-rwxr-xr-xcontrib/bind9/lib/dns/spnego_asn1.pl2
-rw-r--r--contrib/bind9/lib/dns/validator.c10
-rw-r--r--contrib/bind9/lib/dns/view.c2
-rw-r--r--contrib/bind9/lib/dns/zone.c101
-rw-r--r--contrib/bind9/lib/export/Makefile.in2
-rw-r--r--contrib/bind9/lib/export/dns/Makefile.in4
-rw-r--r--contrib/bind9/lib/export/dns/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/export/dns/include/dns/Makefile.in2
-rw-r--r--contrib/bind9/lib/export/dns/include/dst/Makefile.in2
-rw-r--r--contrib/bind9/lib/export/irs/include/irs/Makefile.in2
-rw-r--r--contrib/bind9/lib/export/isc/Makefile.in2
-rw-r--r--contrib/bind9/lib/export/isc/include/isc/Makefile.in2
-rw-r--r--contrib/bind9/lib/export/isc/nls/Makefile.in2
-rw-r--r--contrib/bind9/lib/export/isc/nothreads/Makefile.in2
-rw-r--r--contrib/bind9/lib/export/isc/nothreads/include/isc/Makefile.in2
-rw-r--r--contrib/bind9/lib/export/isc/pthreads/Makefile.in2
-rw-r--r--contrib/bind9/lib/export/isc/pthreads/include/isc/Makefile.in2
-rw-r--r--contrib/bind9/lib/export/isc/unix/Makefile.in2
-rw-r--r--contrib/bind9/lib/export/isc/unix/include/isc/Makefile.in2
-rw-r--r--contrib/bind9/lib/export/isccfg/include/isccfg/Makefile.in2
-rw-r--r--contrib/bind9/lib/export/samples/Makefile-postinstall.in2
-rw-r--r--contrib/bind9/lib/export/samples/Makefile.in2
-rw-r--r--contrib/bind9/lib/irs/Makefile.in2
-rw-r--r--contrib/bind9/lib/irs/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/irs/include/irs/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/alpha/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/alpha/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/alpha/include/isc/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/api6
-rw-r--r--contrib/bind9/lib/isc/ia64/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/ia64/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/ia64/include/isc/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/ia64/include/isc/atomic.h2
-rw-r--r--contrib/bind9/lib/isc/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/include/isc/file.h13
-rw-r--r--contrib/bind9/lib/isc/include/isc/namespace.h2
-rw-r--r--contrib/bind9/lib/isc/include/isc/task.h27
-rw-r--r--contrib/bind9/lib/isc/mem.c10
-rw-r--r--contrib/bind9/lib/isc/mips/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/mips/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/mips/include/isc/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/nls/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/noatomic/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/noatomic/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/noatomic/include/isc/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/nothreads/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/nothreads/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/nothreads/include/isc/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/powerpc/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/powerpc/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/powerpc/include/isc/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/pthreads/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/pthreads/condition.c11
-rw-r--r--contrib/bind9/lib/isc/pthreads/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/pthreads/include/isc/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/sparc64/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/sparc64/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/sparc64/include/isc/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/task.c45
-rw-r--r--contrib/bind9/lib/isc/task_api.c11
-rw-r--r--contrib/bind9/lib/isc/unix/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/unix/file.c31
-rw-r--r--contrib/bind9/lib/isc/unix/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/unix/include/isc/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/x86_32/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/x86_32/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/x86_32/include/isc/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/x86_64/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/x86_64/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/isc/x86_64/include/isc/Makefile.in2
-rw-r--r--contrib/bind9/lib/isccc/api2
-rw-r--r--contrib/bind9/lib/isccc/cc.c6
-rw-r--r--contrib/bind9/lib/isccc/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/isccc/include/isccc/Makefile.in2
-rw-r--r--contrib/bind9/lib/isccfg/api2
-rw-r--r--contrib/bind9/lib/isccfg/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/isccfg/include/isccfg/Makefile.in2
-rw-r--r--contrib/bind9/lib/isccfg/namedconf.c224
-rw-r--r--contrib/bind9/lib/lwres/Makefile.in2
-rw-r--r--contrib/bind9/lib/lwres/api2
-rw-r--r--contrib/bind9/lib/lwres/getaddrinfo.c8
-rw-r--r--contrib/bind9/lib/lwres/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/lwres/include/lwres/Makefile.in2
-rw-r--r--contrib/bind9/lib/lwres/man/Makefile.in2
-rw-r--r--contrib/bind9/make/rules.in2
-rw-r--r--contrib/bind9/version4
-rw-r--r--contrib/binutils/Makefile.in4
-rw-r--r--contrib/binutils/Makefile.tpl2
-rw-r--r--contrib/binutils/bfd/elflink.c1
-rw-r--r--contrib/binutils/gas/config/tc-arm.c1
-rw-r--r--contrib/binutils/libiberty/Makefile.in10
-rw-r--r--contrib/cvs/diff/Makefile.in4
-rw-r--r--contrib/cvs/lib/Makefile.in4
-rw-r--r--contrib/dialog/CHANGES175
-rw-r--r--contrib/dialog/VERSION2
-rw-r--r--contrib/dialog/aclocal.m4198
-rw-r--r--contrib/dialog/arrows.c34
-rw-r--r--contrib/dialog/buttons.c55
-rw-r--r--contrib/dialog/calendar.c61
-rw-r--r--contrib/dialog/checklist.c51
-rw-r--r--contrib/dialog/columns.c5
-rwxr-xr-xcontrib/dialog/configure2913
-rw-r--r--contrib/dialog/configure.in4
-rw-r--r--contrib/dialog/dialog.1217
-rw-r--r--contrib/dialog/dialog.3191
-rw-r--r--contrib/dialog/dialog.c136
-rw-r--r--contrib/dialog/dialog.h58
-rw-r--r--contrib/dialog/dlg_colors.h18
-rw-r--r--contrib/dialog/dlg_keys.c119
-rw-r--r--contrib/dialog/dlg_keys.h25
-rw-r--r--contrib/dialog/editbox.c103
-rw-r--r--contrib/dialog/formbox.c89
-rw-r--r--contrib/dialog/fselect.c136
-rw-r--r--contrib/dialog/guage.c30
-rwxr-xr-xcontrib/dialog/headers-sh.in38
-rw-r--r--contrib/dialog/inputbox.c18
-rw-r--r--contrib/dialog/inputstr.c6
-rw-r--r--contrib/dialog/makefile.in34
-rw-r--r--contrib/dialog/menubox.c51
-rw-r--r--contrib/dialog/mixedform.c6
-rw-r--r--contrib/dialog/mixedgauge.c31
-rw-r--r--contrib/dialog/msgbox.c64
-rw-r--r--contrib/dialog/package/debian/changelog35
-rw-r--r--contrib/dialog/package/dialog.spec10
-rw-r--r--contrib/dialog/pause.c60
-rw-r--r--contrib/dialog/po/cs.po54
-rw-r--r--contrib/dialog/po/el.po46
-rw-r--r--contrib/dialog/po/hr.po78
-rw-r--r--contrib/dialog/po/sr.po34
-rw-r--r--contrib/dialog/prgbox.c5
-rw-r--r--contrib/dialog/progressbox.c60
-rw-r--r--contrib/dialog/rc.c45
-rwxr-xr-xcontrib/dialog/samples/copifuncs/admin.funcs4
-rwxr-xr-xcontrib/dialog/samples/copifuncs/common.funcs2
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.funcs10
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.ifman23
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.ifpoll22
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.ifreq23
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.sendifm14
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.wheel8
-rwxr-xr-xcontrib/dialog/samples/copismall4
-rw-r--r--contrib/dialog/samples/debian.rc54
-rwxr-xr-xcontrib/dialog/samples/dft-cancel3
-rwxr-xr-xcontrib/dialog/samples/dft-extra3
-rwxr-xr-xcontrib/dialog/samples/dft-help3
-rwxr-xr-xcontrib/dialog/samples/dft-no3
-rw-r--r--contrib/dialog/samples/dialog.py3
-rwxr-xr-xcontrib/dialog/samples/dselect11
-rwxr-xr-xcontrib/dialog/samples/form16
-rwxr-xr-xcontrib/dialog/samples/fselect011
-rwxr-xr-xcontrib/dialog/samples/inputmenu83
-rwxr-xr-xcontrib/dialog/samples/inputmenu-stdout86
-rwxr-xr-xcontrib/dialog/samples/inputmenu14
-rwxr-xr-xcontrib/dialog/samples/inputmenu24
-rwxr-xr-xcontrib/dialog/samples/inputmenu34
-rwxr-xr-xcontrib/dialog/samples/inputmenu44
-rwxr-xr-xcontrib/dialog/samples/killall11
-rwxr-xr-xcontrib/dialog/samples/prgbox5
-rwxr-xr-xcontrib/dialog/samples/prgbox25
-rw-r--r--contrib/dialog/samples/report-button3
-rw-r--r--contrib/dialog/samples/report-edit3
-rw-r--r--contrib/dialog/samples/report-string3
-rw-r--r--contrib/dialog/samples/report-tempfile3
-rw-r--r--contrib/dialog/samples/report-yesno3
-rw-r--r--contrib/dialog/samples/setup-edit5
-rw-r--r--contrib/dialog/samples/setup-tempfile7
-rw-r--r--contrib/dialog/samples/setup-utf83
-rw-r--r--contrib/dialog/samples/setup-vars10
-rw-r--r--contrib/dialog/samples/slackware.rc47
-rw-r--r--contrib/dialog/samples/sourcemage.rc58
-rw-r--r--contrib/dialog/samples/suse.rc52
-rwxr-xr-xcontrib/dialog/samples/tailboxbg4
-rwxr-xr-xcontrib/dialog/samples/tailboxbg14
-rwxr-xr-xcontrib/dialog/samples/tailboxbg24
-rwxr-xr-xcontrib/dialog/samples/testdata-8bit11
-rw-r--r--contrib/dialog/samples/valgrind.log847
-rwxr-xr-xcontrib/dialog/samples/wheel6
-rw-r--r--contrib/dialog/samples/whiptail.rc56
-rwxr-xr-xcontrib/dialog/samples/with-dquotes3
-rwxr-xr-xcontrib/dialog/samples/with-squotes3
-rw-r--r--contrib/dialog/tailbox.c8
-rw-r--r--contrib/dialog/textbox.c22
-rw-r--r--contrib/dialog/timebox.c31
-rw-r--r--contrib/dialog/trace.c111
-rw-r--r--contrib/dialog/ui_getc.c6
-rw-r--r--contrib/dialog/util.c237
-rw-r--r--contrib/dialog/yesno.c19
-rw-r--r--contrib/dtc/Makefile2
-rw-r--r--contrib/gcc/Makefile.in4
-rw-r--r--contrib/gcc/config/arm/arm.h2
-rw-r--r--contrib/gcc/dwarf2out.c6
-rw-r--r--contrib/gcc/longlong.h2
-rw-r--r--contrib/gcclibs/libcpp/Makefile.in4
-rw-r--r--contrib/gcclibs/libdecnumber/Makefile.in4
-rw-r--r--contrib/gcclibs/libiberty/Makefile.in10
-rw-r--r--contrib/gdb/gdb/dwarf2read.c26
-rw-r--r--contrib/gdb/gdb/gdbtypes.c14
-rw-r--r--contrib/gdb/gdb/gdbtypes.h10
-rw-r--r--contrib/gdb/gdb/hpread.c3
-rw-r--r--contrib/gdb/gdb/parse.c42
-rw-r--r--contrib/gdb/gdb/stabsread.c4
-rw-r--r--contrib/gdtoa/makefile6
-rw-r--r--contrib/gperf/lib/Makefile.in6
-rw-r--r--contrib/libc-vis/unvis.3 (renamed from lib/libc/gen/unvis.3)155
-rw-r--r--contrib/libc-vis/unvis.c562
-rw-r--r--contrib/libc-vis/vis.3 (renamed from lib/libc/gen/vis.3)284
-rw-r--r--contrib/libc-vis/vis.c583
-rw-r--r--contrib/libc-vis/vis.h (renamed from include/vis.h)57
-rw-r--r--contrib/libstdc++/include/std/std_limits.h5
-rw-r--r--contrib/llvm/include/llvm/MC/MCExpr.h6
-rw-r--r--contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp2
-rw-r--r--contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp3
-rw-r--r--contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h2
-rw-r--r--contrib/llvm/lib/MC/MCExpr.cpp4
-rw-r--r--contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp4
-rw-r--r--contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp10
-rw-r--r--contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h8
-rw-r--r--contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp12
-rw-r--r--contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h12
-rw-r--r--contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp12
-rw-r--r--contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td2
-rw-r--r--contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp116
-rw-r--r--contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp261
-rw-r--r--contrib/llvm/lib/Target/Mips/MipsInstrInfo.td2
-rw-r--r--contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp15
-rw-r--r--contrib/llvm/lib/Target/Mips/MipsJITInfo.h7
-rw-r--r--contrib/llvm/lib/Target/Mips/MipsMCInstLower.cpp4
-rw-r--r--contrib/llvm/lib/Transforms/Scalar/SROA.cpp9
-rw-r--r--contrib/llvm/tools/clang/include/clang/Sema/Scope.h11
-rw-r--r--contrib/llvm/tools/clang/lib/Basic/Targets.cpp4
-rw-r--r--contrib/llvm/tools/clang/lib/Basic/Version.cpp2
-rw-r--r--contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp19
-rw-r--r--contrib/llvm/tools/clang/lib/Driver/ToolChains.h1
-rw-r--r--contrib/llvm/tools/clang/lib/Driver/Tools.cpp16
-rw-r--r--contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp3
-rw-r--r--contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp2
-rw-r--r--contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp13
-rw-r--r--contrib/mknod/pack_dev.c290
-rw-r--r--contrib/mknod/pack_dev.h52
-rw-r--r--contrib/mtree/Makefile20
-rw-r--r--contrib/mtree/compare.c528
-rw-r--r--contrib/mtree/crc.c163
-rw-r--r--contrib/mtree/create.c467
-rw-r--r--contrib/mtree/excludes.c121
-rw-r--r--contrib/mtree/extern.h87
-rw-r--r--contrib/mtree/getid.c431
-rw-r--r--contrib/mtree/misc.c312
-rw-r--r--contrib/mtree/mtree.8805
-rw-r--r--contrib/mtree/mtree.c327
-rw-r--r--contrib/mtree/mtree.h158
-rw-r--r--contrib/mtree/spec.c838
-rw-r--r--contrib/mtree/specspec.c273
-rw-r--r--contrib/mtree/verify.c303
-rw-r--r--contrib/ntp/arlib/Makefile.in4
-rw-r--r--contrib/ntp/libntp/Makefile.in2
-rw-r--r--contrib/ntp/libparse/Makefile.in2
-rw-r--r--contrib/ntp/ntpd/Makefile.in2
-rw-r--r--contrib/openbsm/INSTALL4
-rw-r--r--contrib/openbsm/NEWS8
-rw-r--r--contrib/openbsm/VERSION2
-rw-r--r--contrib/openbsm/bin/auditdistd/auditdistd.conf.54
-rw-r--r--contrib/openbsm/config/config.h6
-rwxr-xr-xcontrib/openbsm/configure34
-rw-r--r--contrib/openbsm/configure.ac16
-rw-r--r--contrib/openbsm/etc/audit_event3
-rw-r--r--contrib/openbsm/sys/bsm/audit_kevents.h3
-rw-r--r--contrib/openbsm/sys/bsm/audit_record.h4
-rw-r--r--contrib/opie/libmissing/Makefile.in2
-rw-r--r--contrib/opie/libopie/Makefile.in2
-rw-r--r--contrib/sendmail/FREEBSD-upgrade25
-rw-r--r--contrib/sendmail/LICENSE4
-rw-r--r--contrib/sendmail/PGPKEYS298
-rw-r--r--contrib/sendmail/RELEASE_NOTES51
-rw-r--r--contrib/sendmail/cf/README8
-rw-r--r--contrib/sendmail/cf/cf/submit.cf10
-rw-r--r--contrib/sendmail/cf/feature/ldap_routing.m42
-rw-r--r--contrib/sendmail/cf/m4/proto.m47
-rw-r--r--contrib/sendmail/cf/m4/version.m46
-rw-r--r--contrib/sendmail/doc/op/op.me12
-rw-r--r--contrib/sendmail/include/libmilter/mfapi.h5
-rw-r--r--contrib/sendmail/include/sm/clock.h4
-rw-r--r--contrib/sendmail/include/sm/tailq.h6
-rw-r--r--contrib/sendmail/libmilter/Makefile.m42
-rw-r--r--contrib/sendmail/libmilter/docs/api.html3
-rw-r--r--contrib/sendmail/libmilter/docs/smfi_setsymlist.html10
-rw-r--r--contrib/sendmail/libmilter/docs/smfi_settimeout.html17
-rw-r--r--contrib/sendmail/libmilter/worker.c37
-rw-r--r--contrib/sendmail/src/Makefile.m42
-rw-r--r--contrib/sendmail/src/TRACEFLAGS15
-rw-r--r--contrib/sendmail/src/collect.c5
-rw-r--r--contrib/sendmail/src/conf.c30
-rw-r--r--contrib/sendmail/src/daemon.c5
-rw-r--r--contrib/sendmail/src/deliver.c19
-rw-r--r--contrib/sendmail/src/headers.c6
-rw-r--r--contrib/sendmail/src/main.c8
-rw-r--r--contrib/sendmail/src/map.c14
-rw-r--r--contrib/sendmail/src/milter.c224
-rw-r--r--contrib/sendmail/src/parseaddr.c3
-rw-r--r--contrib/sendmail/src/queue.c25
-rw-r--r--contrib/sendmail/src/sasl.c14
-rw-r--r--contrib/sendmail/src/savemail.c34
-rw-r--r--contrib/sendmail/src/sendmail.h28
-rw-r--r--contrib/sendmail/src/srvrsmtp.c22
-rw-r--r--contrib/sendmail/src/stab.c8
-rw-r--r--contrib/sendmail/src/util.c17
-rw-r--r--contrib/sendmail/src/version.c6
-rw-r--r--contrib/tcp_wrappers/Makefile4
-rw-r--r--contrib/tcpdump/Makefile.in2
-rw-r--r--contrib/top/top.h2
-rw-r--r--contrib/xz/AUTHORS6
-rw-r--r--contrib/xz/ChangeLog332
-rw-r--r--contrib/xz/README54
-rw-r--r--contrib/xz/THANKS7
-rw-r--r--contrib/xz/po/de.po169
-rw-r--r--contrib/xz/po/fr.po237
-rw-r--r--contrib/xz/po/it.po311
-rw-r--r--contrib/xz/po/pl.po150
-rw-r--r--contrib/xz/src/common/sysdefs.h9
-rw-r--r--contrib/xz/src/liblzma/api/lzma/version.h2
-rw-r--r--contrib/xz/src/liblzma/simple/simple_coder.c5
-rw-r--r--contrib/xz/src/liblzma/simple/simple_private.h3
-rw-r--r--contrib/xz/src/xz/args.c2
-rw-r--r--contrib/xz/src/xz/coder.c5
-rw-r--r--contrib/xz/src/xz/message.c14
-rw-r--r--contrib/xz/src/xz/xz.121
-rw-r--r--crypto/heimdal/appl/ftp/common/Makefile.in2
-rw-r--r--crypto/heimdal/appl/telnet/libtelnet/Makefile.in2
-rw-r--r--crypto/openssl/Makefile.org4
-rw-r--r--crypto/openssl/crypto/Makefile3
-rw-r--r--crypto/openssl/crypto/bn/bn_word.c25
-rw-r--r--crypto/openssl/crypto/opensslv.h2
-rw-r--r--etc/defaults/rc.conf4
-rw-r--r--etc/devd/usb.conf26
-rw-r--r--etc/login.conf4
-rw-r--r--etc/mtree/BSD.var.dist2
-rw-r--r--etc/newsyslog.conf2
-rw-r--r--etc/periodic/daily/Makefile4
-rw-r--r--etc/pf.os12
-rw-r--r--etc/rc.d/auditdistd2
-rwxr-xr-xetc/rc.d/savecore2
-rwxr-xr-xetc/rc.d/sysctl50
-rw-r--r--etc/regdomain.xml42
-rw-r--r--etc/root/dot.cshrc5
-rw-r--r--etc/sendmail/freebsd.mc6
-rw-r--r--etc/sendmail/freebsd.submit.mc1
-rw-r--r--games/fortune/datfiles/fortunes4
-rw-r--r--gnu/lib/libdialog/dlg_config.h21
-rw-r--r--gnu/lib/libgcc/Makefile13
-rw-r--r--gnu/usr.bin/binutils/as/Makefile2
-rw-r--r--gnu/usr.bin/cc/cc_tools/Makefile2
-rw-r--r--gnu/usr.bin/dialog/Makefile2
-rw-r--r--include/Makefile5
-rw-r--r--lib/Makefile2
-rw-r--r--lib/bind/config.h8
-rw-r--r--lib/bind/dns/Makefile1
-rw-r--r--lib/bind/isc/isc/platform.h8
-rw-r--r--lib/clang/Makefile5
-rw-r--r--lib/clang/include/clang/Basic/Version.inc4
-rw-r--r--lib/libbsnmp/libbsnmp/Makefile1
-rw-r--r--lib/libc/gen/Makefile.inc7
-rw-r--r--lib/libc/gen/Symbol.map17
-rw-r--r--lib/libc/gen/check_utility_compat.c12
-rw-r--r--lib/libc/gen/fmtmsg.c2
-rw-r--r--lib/libc/gen/fstab.c12
-rw-r--r--lib/libc/gen/getcap.c4
-rw-r--r--lib/libc/gen/getgrent.c8
-rw-r--r--lib/libc/gen/getnetgrent.c4
-rw-r--r--lib/libc/gen/getttyent.c2
-rw-r--r--lib/libc/gen/getusershell.c2
-rw-r--r--lib/libc/gen/getutxent.c2
-rw-r--r--lib/libc/gen/sysctlbyname.c9
-rw-r--r--lib/libc/gen/unvis-compat.c (renamed from usr.sbin/sade/list.h)49
-rw-r--r--lib/libc/gen/unvis.c293
-rw-r--r--lib/libc/gen/vis.c201
-rw-r--r--lib/libc/iconv/citrus_mmap.c6
-rw-r--r--lib/libc/locale/collate.c2
-rw-r--r--lib/libc/locale/setrunelocale.c18
-rw-r--r--lib/libc/nls/Makefile.inc3
-rw-r--r--lib/libc/nls/msgcat.c1
-rw-r--r--lib/libc/nls/zh_CN.GB18030.msg297
-rw-r--r--lib/libc/nls/zh_CN.GB2312.msg297
-rw-r--r--lib/libc/nls/zh_CN.UTF-8.msg295
-rw-r--r--lib/libc/sys/bind.22
-rw-r--r--lib/libc/sys/mlock.217
-rw-r--r--lib/libc/sys/mlockall.217
-rw-r--r--lib/libc/sys/socket.219
-rw-r--r--lib/libcompiler_rt/Makefile11
-rw-r--r--lib/libdevstat/devstat.331
-rw-r--r--lib/libdevstat/devstat.c47
-rw-r--r--lib/libdevstat/devstat.h6
-rw-r--r--lib/libdisk/Makefile43
-rw-r--r--lib/libdisk/blocks.c50
-rw-r--r--lib/libdisk/change.c129
-rw-r--r--lib/libdisk/chunk.c595
-rw-r--r--lib/libdisk/create_chunk.c296
-rw-r--r--lib/libdisk/disk.c411
-rw-r--r--lib/libdisk/libdisk.3341
-rw-r--r--lib/libdisk/libdisk.h368
-rw-r--r--lib/libdisk/open_disk.c311
-rw-r--r--lib/libdisk/open_ia64_disk.c239
-rw-r--r--lib/libdisk/rules.c296
-rw-r--r--lib/libdisk/tst01.c323
-rw-r--r--lib/libdisk/write_amd64_disk.c204
-rw-r--r--lib/libdisk/write_disk.c76
-rw-r--r--lib/libdisk/write_i386_disk.c204
-rw-r--r--lib/libdisk/write_ia64_disk.c423
-rw-r--r--lib/libdisk/write_pc98_disk.c179
-rw-r--r--lib/libdisk/write_sparc64_disk.c106
-rw-r--r--lib/libedit/map.c4
-rw-r--r--lib/libipsec/policy_parse.y1
-rw-r--r--lib/libnetbsd/Makefile13
-rw-r--r--lib/libnetbsd/README7
-rw-r--r--lib/libnetbsd/rmd160.h44
-rw-r--r--lib/libnetbsd/sha1.h43
-rw-r--r--lib/libnetbsd/sha2.h (renamed from lib/libdisk/write_mips_disk.c)33
-rw-r--r--lib/libnetbsd/stdlib.h70
-rw-r--r--lib/libnetbsd/strsuftoll.c222
-rw-r--r--lib/libnetbsd/sys/cdefs.h50
-rw-r--r--lib/libnetbsd/util.c (renamed from lib/libdisk/write_powerpc_disk.c)53
-rw-r--r--lib/libnetbsd/util.h41
-rw-r--r--lib/libnetgraph/sock.c4
-rw-r--r--lib/libproc/test/t1-bkpt/t1-bkpt.c2
-rw-r--r--lib/libradius/Makefile1
-rw-r--r--lib/libradius/libradius.320
-rw-r--r--lib/libradius/radius.conf.516
-rw-r--r--lib/libradius/radlib.c204
-rw-r--r--lib/libradius/radlib.h5
-rw-r--r--lib/libradius/radlib_private.h9
-rw-r--r--lib/libradius/radlib_vs.h1
-rw-r--r--lib/libstand/amd64/_setjmp.S (renamed from sys/boot/userboot/libstand/amd64/_setjmp.S)0
-rw-r--r--lib/libutil/gr_util.c83
-rw-r--r--lib/libutil/libutil.h2
-rw-r--r--lib/libutil/pw_util.c7
-rw-r--r--libexec/rtld-elf/Makefile2
-rw-r--r--libexec/tftpd/tftp-io.c3
-rwxr-xr-xrelease/picobsd/build/picobsd3
-rw-r--r--release/picobsd/floppy.tree/etc/ppp/ppp.conf2
-rw-r--r--release/picobsd/mfs_tree/etc/remote8
-rw-r--r--sbin/comcontrol/comcontrol.82
-rw-r--r--sbin/devd/devd.cc31
-rw-r--r--sbin/devd/devd.hh8
-rw-r--r--sbin/growfs/growfs.c23
-rw-r--r--sbin/hastd/parse.y2
-rw-r--r--sbin/ifconfig/af_inet6.c5
-rw-r--r--sbin/ifconfig/af_nd6.c2
-rw-r--r--sbin/ifconfig/ifconfig.c2
-rw-r--r--sbin/mount_nfs/mount_nfs.814
-rw-r--r--sbin/pflogd/Makefile2
-rw-r--r--sbin/route/route.c63
-rw-r--r--sbin/savecore/savecore.815
-rw-r--r--sbin/savecore/savecore.c173
-rw-r--r--sbin/setkey/setkey.82
-rw-r--r--sbin/sysctl/sysctl.817
-rw-r--r--sbin/sysctl/sysctl.c261
-rw-r--r--share/examples/etc/make.conf26
-rw-r--r--share/examples/ppp/ppp.conf.sample12
-rw-r--r--share/examples/ppp/ppp.conf.span-isp2
-rw-r--r--share/i18n/csmapper/Makefile.part16
-rw-r--r--share/man/man4/arcmsr.44
-rw-r--r--share/man/man4/carp.417
-rw-r--r--share/man/man4/gdb.46
-rw-r--r--share/man/man4/mouse.42
-rw-r--r--share/man/man4/ng_netflow.46
-rw-r--r--share/man/man4/ng_ubt.44
-rw-r--r--share/man/man4/stf.418
-rw-r--r--share/man/man4/wbwd.46
-rw-r--r--share/man/man5/rc.conf.52
-rw-r--r--share/man/man5/remote.52
-rw-r--r--share/man/man7/tuning.748
-rw-r--r--share/man/man9/Makefile1
-rw-r--r--share/man/man9/domain.911
-rw-r--r--share/man/man9/lock.97
-rw-r--r--share/man/man9/make_dev.96
-rw-r--r--share/man/man9/taskqueue.99
-rw-r--r--share/man/man9/zone.917
-rw-r--r--share/misc/Makefile3
-rw-r--r--share/misc/committers-src.dot11
-rw-r--r--share/misc/iso63916
-rw-r--r--share/mk/bsd.cpu.mk74
-rw-r--r--share/mk/bsd.lib.mk44
-rw-r--r--share/mk/bsd.libnames.mk2
-rw-r--r--share/mk/bsd.own.mk12
-rw-r--r--share/mk/bsd.prog.mk16
-rw-r--r--share/mk/sys.mk6
-rw-r--r--share/skel/dot.cshrc5
-rw-r--r--share/syscons/keymaps/INDEX.keymaps2
-rw-r--r--share/syscons/keymaps/Makefile4
-rw-r--r--share/syscons/keymaps/spanish.dvorak.kbd2
-rw-r--r--share/syscons/keymaps/us.dvorakp.kbd117
-rw-r--r--sys/amd64/amd64/fpu.c14
-rw-r--r--sys/amd64/amd64/pmap.c43
-rw-r--r--sys/arm/arm/busdma_machdep-v6.c221
-rw-r--r--sys/arm/arm/busdma_machdep.c498
-rw-r--r--sys/arm/arm/cpufunc.c222
-rw-r--r--sys/arm/arm/cpufunc_asm_arm11x6.S216
-rw-r--r--sys/arm/arm/elf_trampoline.c2
-rw-r--r--sys/arm/arm/identcpu.c2
-rw-r--r--sys/arm/arm/locore.S8
-rw-r--r--sys/arm/arm/pl190.c187
-rw-r--r--sys/arm/arm/pl310.c272
-rw-r--r--sys/arm/arm/pmap-v6.c23
-rw-r--r--sys/arm/arm/pmap.c52
-rw-r--r--sys/arm/at91/if_ate.c6
-rw-r--r--sys/arm/at91/if_macb.c6
-rw-r--r--sys/arm/broadcom/bcm2835/bcm2835_fb.c141
-rw-r--r--sys/arm/broadcom/bcm2835/bcm2835_gpio.c189
-rw-r--r--sys/arm/broadcom/bcm2835/bcm2835_systimer.c18
-rw-r--r--sys/arm/broadcom/bcm2835/files.bcm28351
-rw-r--r--sys/arm/conf/PANDABOARD4
-rw-r--r--sys/arm/conf/RPI-B2
-rw-r--r--sys/arm/conf/VERSATILEPB101
-rw-r--r--sys/arm/econa/if_ece.c2
-rw-r--r--sys/arm/include/armreg.h26
-rw-r--r--sys/arm/include/cpuconf.h7
-rw-r--r--sys/arm/include/cpufunc.h18
-rw-r--r--sys/arm/include/intr.h2
-rw-r--r--sys/arm/include/pl310.h131
-rw-r--r--sys/arm/include/pmap.h7
-rw-r--r--sys/arm/include/vm.h3
-rw-r--r--sys/arm/lpc/if_lpe.c2
-rw-r--r--sys/arm/ti/cpsw/if_cpsw.c936
-rw-r--r--sys/arm/ti/cpsw/if_cpswreg.h14
-rw-r--r--sys/arm/ti/cpsw/if_cpswvar.h47
-rw-r--r--sys/arm/ti/omap4/omap4_l2cache.c79
-rw-r--r--sys/arm/ti/omap4/omap4_smc.h2
-rw-r--r--sys/arm/versatile/bus_space.c113
-rw-r--r--sys/arm/versatile/common.c75
-rw-r--r--sys/arm/versatile/files.versatile23
-rw-r--r--sys/arm/versatile/if_smc_fdt.c131
-rw-r--r--sys/arm/versatile/pl050.c713
-rw-r--r--sys/arm/versatile/sp804.c352
-rw-r--r--sys/arm/versatile/versatile_clcd.c959
-rw-r--r--sys/arm/versatile/versatile_machdep.c122
-rw-r--r--sys/arm/versatile/versatile_pci.c510
-rw-r--r--sys/arm/versatile/versatile_pci_bus_space.c153
-rw-r--r--sys/arm/versatile/versatile_pci_bus_space.h35
-rw-r--r--sys/arm/versatile/versatile_sic.c133
-rw-r--r--sys/arm/versatile/versatile_timer.c59
-rw-r--r--sys/arm/xscale/ixp425/if_npe.c6
-rw-r--r--sys/boot/arm/uboot/Makefile3
-rw-r--r--sys/boot/efi/libefi/libefi.c2
-rw-r--r--sys/boot/fdt/dts/pandaboard.dts2
-rw-r--r--sys/boot/fdt/dts/versatilepb.dts118
-rw-r--r--sys/boot/ficl/Makefile21
-rw-r--r--sys/boot/ficl64/Makefile8
-rw-r--r--sys/boot/forth/beastie.4th.87
-rw-r--r--sys/boot/forth/check-password.4th42
-rw-r--r--sys/boot/forth/check-password.4th.852
-rw-r--r--sys/boot/forth/frames.4th16
-rw-r--r--sys/boot/forth/loader.4th.82
-rw-r--r--sys/boot/forth/loader.conf.517
-rw-r--r--sys/boot/forth/menu.4th.87
-rw-r--r--sys/boot/forth/support.4th40
-rw-r--r--sys/boot/i386/efi/exec.c10
-rw-r--r--sys/boot/i386/efi/ldscript.amd6424
-rw-r--r--sys/boot/i386/efi/reloc.c31
-rw-r--r--sys/boot/sparc64/boot1/boot1.c6
-rw-r--r--sys/boot/userboot/libstand/Makefile2
-rw-r--r--sys/cam/cam_periph.c8
-rw-r--r--sys/cam/cam_xpt.c16
-rw-r--r--sys/cam/ctl/ctl.c63
-rw-r--r--sys/cam/ctl/ctl_frontend_cam_sim.c42
-rw-r--r--sys/cam/ctl/scsi_ctl.c35
-rw-r--r--sys/cam/scsi/scsi_ch.c97
-rw-r--r--sys/cam/scsi/scsi_enc.c63
-rw-r--r--sys/cam/scsi/scsi_enc_internal.h1
-rw-r--r--sys/cam/scsi/scsi_enc_ses.c12
-rw-r--r--sys/cam/scsi/scsi_pass.c65
-rw-r--r--sys/cam/scsi/scsi_sg.c94
-rw-r--r--sys/cddl/compat/opensolaris/kern/opensolaris_kstat.c2
-rw-r--r--sys/cddl/compat/opensolaris/sys/kstat.h2
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c2
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h8
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c15
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c4
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c7
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c25
-rw-r--r--sys/cddl/dev/dtrace/dtrace_debug.c98
-rw-r--r--sys/compat/linux/linux_socket.c2
-rw-r--r--sys/compat/ndis/kern_ndis.c6
-rw-r--r--sys/conf/files32
-rw-r--r--sys/conf/files.arm6
-rw-r--r--sys/conf/options.arm3
-rw-r--r--sys/dev/age/if_age.c6
-rw-r--r--sys/dev/agp/agp_ali.c2
-rw-r--r--sys/dev/agp/agp_amd.c2
-rw-r--r--sys/dev/agp/agp_amd64.c2
-rw-r--r--sys/dev/agp/agp_ati.c4
-rw-r--r--sys/dev/agp/agp_i810.c5
-rw-r--r--sys/dev/agp/agp_intel.c2
-rw-r--r--sys/dev/agp/agp_sis.c2
-rw-r--r--sys/dev/agp/agp_via.c2
-rw-r--r--sys/dev/ahci/ahci.c13
-rw-r--r--sys/dev/aic7xxx/aicasm/aicasm_gram.y1
-rw-r--r--sys/dev/alc/if_alc.c8
-rw-r--r--sys/dev/ale/if_ale.c8
-rw-r--r--sys/dev/an/if_an.c8
-rw-r--r--sys/dev/arcmsr/arcmsr.c1830
-rw-r--r--sys/dev/arcmsr/arcmsr.h613
-rw-r--r--sys/dev/ata/ata-pci.h19
-rw-r--r--sys/dev/ata/chipsets/ata-ati.c6
-rw-r--r--sys/dev/ata/chipsets/ata-intel.c12
-rw-r--r--sys/dev/ath/ath_dfs/null/dfs_null.c20
-rw-r--r--sys/dev/ath/ath_hal/ah.c2
-rw-r--r--sys/dev/ath/ath_hal/ah.h42
-rw-r--r--sys/dev/ath/ath_hal/ah_internal.h3
-rw-r--r--sys/dev/ath/ath_hal/ah_regdomain.c3
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416.h14
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416_attach.c28
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c10
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416_spectral.c244
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416phy.h33
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416reg.h1
-rw-r--r--sys/dev/ath/ath_hal/ar9002/ar9280_attach.c1
-rw-r--r--sys/dev/ath/ath_hal/ar9002/ar9285_attach.c6
-rw-r--r--sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c129
-rw-r--r--sys/dev/ath/ath_hal/ar9002/ar9287_attach.c1
-rw-r--r--sys/dev/ath/if_ath.c27
-rw-r--r--sys/dev/ath/if_ath_rx.c2
-rw-r--r--sys/dev/ath/if_ath_rx_edma.c2
-rw-r--r--sys/dev/ath/if_ath_spectral.c224
-rw-r--r--sys/dev/ath/if_ath_spectral.h40
-rw-r--r--sys/dev/ath/if_ath_tx.c43
-rw-r--r--sys/dev/ath/if_athdfs.h1
-rw-r--r--sys/dev/ath/if_athioctl.h22
-rw-r--r--sys/dev/ath/if_athvar.h16
-rw-r--r--sys/dev/atkbdc/psm.c12
-rw-r--r--sys/dev/bce/if_bce.c10
-rw-r--r--sys/dev/bfe/if_bfe.c4
-rw-r--r--sys/dev/bge/if_bge.c20
-rw-r--r--sys/dev/bm/if_bm.c6
-rw-r--r--sys/dev/bwi/if_bwi.c10
-rw-r--r--sys/dev/bwn/if_bwn.c8
-rw-r--r--sys/dev/bxe/if_bxe.c10
-rw-r--r--sys/dev/cas/if_cas.c10
-rw-r--r--sys/dev/ce/if_ce.c4
-rw-r--r--sys/dev/cm/smc90cx6.c4
-rw-r--r--sys/dev/cp/if_cp.c4
-rw-r--r--sys/dev/cs/if_cs.c4
-rw-r--r--sys/dev/ctau/if_ct.c4
-rw-r--r--sys/dev/cx/if_cx.c8
-rw-r--r--sys/dev/cxgb/cxgb_main.c2
-rw-r--r--sys/dev/cxgb/cxgb_sge.c8
-rw-r--r--sys/dev/cxgb/sys/uipc_mvec.c2
-rw-r--r--sys/dev/cxgbe/t4_l2t.c4
-rw-r--r--sys/dev/cxgbe/t4_main.c1
-rw-r--r--sys/dev/cxgbe/t4_sge.c2
-rw-r--r--sys/dev/cxgbe/tom/t4_ddp.c2
-rw-r--r--sys/dev/cxgbe/tom/t4_listen.c2
-rw-r--r--sys/dev/dc/if_dc.c8
-rw-r--r--sys/dev/de/if_de.c8
-rw-r--r--sys/dev/e1000/if_em.c10
-rw-r--r--sys/dev/e1000/if_igb.c12
-rw-r--r--sys/dev/e1000/if_lem.c6
-rw-r--r--sys/dev/ed/if_ed.c4
-rw-r--r--sys/dev/en/midway.c12
-rw-r--r--sys/dev/ep/if_ep.c8
-rw-r--r--sys/dev/et/if_et.c6
-rw-r--r--sys/dev/ex/if_ex.c6
-rw-r--r--sys/dev/fatm/if_fatm.c10
-rw-r--r--sys/dev/fdt/fdtbus.c2
-rw-r--r--sys/dev/fe/if_fe.c4
-rw-r--r--sys/dev/firewire/fwohci.c2
-rw-r--r--sys/dev/firewire/if_fwe.c6
-rw-r--r--sys/dev/firewire/if_fwip.c10
-rw-r--r--sys/dev/fxp/if_fxp.c6
-rw-r--r--sys/dev/gem/if_gem.c6
-rw-r--r--sys/dev/gxemul/ether/if_gx.c2
-rw-r--r--sys/dev/hatm/if_hatm_intr.c4
-rw-r--r--sys/dev/hatm/if_hatm_tx.c2
-rw-r--r--sys/dev/hifn/hifn7751.c12
-rw-r--r--sys/dev/hme/if_hme.c6
-rw-r--r--sys/dev/ichsmb/ichsmb_pci.c4
-rw-r--r--sys/dev/ichwd/ichwd.c3
-rw-r--r--sys/dev/ichwd/ichwd.h32
-rw-r--r--sys/dev/ie/if_ie.c6
-rw-r--r--sys/dev/if_ndis/if_ndis.c6
-rw-r--r--sys/dev/ipw/if_ipw.c6
-rw-r--r--sys/dev/isci/isci_io_request.c28
-rw-r--r--sys/dev/iwi/if_iwi.c6
-rw-r--r--sys/dev/iwn/if_iwn.c10
-rw-r--r--sys/dev/ixgb/if_ixgb.c2
-rw-r--r--sys/dev/ixgbe/ixgbe.c44
-rw-r--r--sys/dev/ixgbe/ixgbe.h4
-rw-r--r--sys/dev/ixgbe/ixv.c6
-rw-r--r--sys/dev/jme/if_jme.c6
-rw-r--r--sys/dev/le/lance.c6
-rw-r--r--sys/dev/lge/if_lge.c2
-rw-r--r--sys/dev/lmc/if_lmc.c6
-rw-r--r--sys/dev/malo/if_malo.c4
-rw-r--r--sys/dev/mge/if_mge.c4
-rw-r--r--sys/dev/mii/brgphy.c37
-rw-r--r--sys/dev/mii/miidevs2
-rw-r--r--sys/dev/mn/if_mn.c14
-rw-r--r--sys/dev/msk/if_msk.c8
-rw-r--r--sys/dev/mwl/if_mwl.c6
-rw-r--r--sys/dev/mxge/if_mxge.c6
-rw-r--r--sys/dev/my/if_my.c8
-rw-r--r--sys/dev/netmap/ixgbe_netmap.h8
-rw-r--r--sys/dev/nfe/if_nfe.c6
-rw-r--r--sys/dev/nge/if_nge.c4
-rw-r--r--sys/dev/nve/if_nve.c6
-rw-r--r--sys/dev/nvme/nvme.c24
-rw-r--r--sys/dev/nvme/nvme_ctrlr.c30
-rw-r--r--sys/dev/nvme/nvme_private.h14
-rw-r--r--sys/dev/nvme/nvme_test.c4
-rw-r--r--sys/dev/nxge/if_nxge.c6
-rw-r--r--sys/dev/oce/oce_if.c6
-rw-r--r--sys/dev/patm/if_patm_intr.c2
-rw-r--r--sys/dev/patm/if_patm_rx.c6
-rw-r--r--sys/dev/patm/if_patm_tx.c4
-rw-r--r--sys/dev/pci/pci_user.c6
-rw-r--r--sys/dev/pcn/if_pcn.c4
-rw-r--r--sys/dev/pdq/pdq_freebsd.h4
-rw-r--r--sys/dev/pdq/pdq_ifsubr.c4
-rw-r--r--sys/dev/pdq/pdqvar.h4
-rw-r--r--sys/dev/qlxgb/qla_os.c6
-rw-r--r--sys/dev/ral/rt2560.c6
-rw-r--r--sys/dev/ral/rt2661.c6
-rw-r--r--sys/dev/ral/rt2860.c8
-rw-r--r--sys/dev/re/if_re.c12
-rw-r--r--sys/dev/rt/if_rt.c6
-rw-r--r--sys/dev/safe/safe.c12
-rw-r--r--sys/dev/sbni/if_sbni.c4
-rw-r--r--sys/dev/sf/if_sf.c4
-rw-r--r--sys/dev/sfxge/sfxge_dma.c2
-rw-r--r--sys/dev/sfxge/sfxge_tx.c2
-rw-r--r--sys/dev/sge/if_sge.c6
-rw-r--r--sys/dev/sis/if_sis.c8
-rw-r--r--sys/dev/sk/if_sk.c6
-rw-r--r--sys/dev/smc/if_smc.c15
-rw-r--r--sys/dev/sn/if_sn.c4
-rw-r--r--sys/dev/snc/dp83932.c6
-rw-r--r--sys/dev/sound/pci/hda/hdaa_patches.c19
-rw-r--r--sys/dev/sound/pci/hda/hdac.c2
-rw-r--r--sys/dev/sound/pci/hda/hdac.h3
-rw-r--r--sys/dev/sound/usb/uaudio.c700
-rw-r--r--sys/dev/ste/if_ste.c4
-rw-r--r--sys/dev/stge/if_stge.c6
-rw-r--r--sys/dev/sym/sym_hipd.c2
-rw-r--r--sys/dev/ti/if_ti.c16
-rw-r--r--sys/dev/tl/if_tl.c6
-rw-r--r--sys/dev/tsec/if_tsec.c6
-rw-r--r--sys/dev/tx/if_tx.c8
-rw-r--r--sys/dev/txp/if_txp.c6
-rw-r--r--sys/dev/uart/uart_bus_fdt.c4
-rw-r--r--sys/dev/ubsec/ubsec.c12
-rw-r--r--sys/dev/usb/misc/udbp.c4
-rw-r--r--sys/dev/usb/net/if_axe.c2
-rw-r--r--sys/dev/usb/net/if_cdce.c6
-rw-r--r--sys/dev/usb/net/if_usie.c6
-rw-r--r--sys/dev/usb/net/uhso.c6
-rw-r--r--sys/dev/usb/net/usb_ethernet.c2
-rw-r--r--sys/dev/usb/quirk/usb_quirk.c1
-rw-r--r--sys/dev/usb/serial/u3g.c2
-rw-r--r--sys/dev/usb/serial/usb_serial.c8
-rw-r--r--sys/dev/usb/serial/usb_serial.h1
-rw-r--r--sys/dev/usb/storage/umass.c26
-rw-r--r--sys/dev/usb/storage/ustorage_fs.c174
-rw-r--r--sys/dev/usb/usb_busdma.c18
-rw-r--r--sys/dev/usb/usb_msctest.c74
-rw-r--r--sys/dev/usb/usb_transfer.c75
-rw-r--r--sys/dev/usb/usbdevs6
-rw-r--r--sys/dev/usb/usbdi.h4
-rw-r--r--sys/dev/usb/wlan/if_rum.c2
-rw-r--r--sys/dev/usb/wlan/if_run.c4
-rw-r--r--sys/dev/usb/wlan/if_uath.c82
-rw-r--r--sys/dev/usb/wlan/if_uathvar.h2
-rw-r--r--sys/dev/usb/wlan/if_upgt.c43
-rw-r--r--sys/dev/usb/wlan/if_upgtvar.h2
-rw-r--r--sys/dev/usb/wlan/if_ural.c2
-rw-r--r--sys/dev/usb/wlan/if_urtw.c98
-rw-r--r--sys/dev/usb/wlan/if_urtwvar.h1
-rw-r--r--sys/dev/usb/wlan/if_zyd.c4
-rw-r--r--sys/dev/vge/if_vge.c8
-rw-r--r--sys/dev/virtio/block/virtio_blk.c5
-rw-r--r--sys/dev/virtio/network/if_vtnet.c13
-rw-r--r--sys/dev/virtio/scsi/virtio_scsi.c14
-rw-r--r--sys/dev/vr/if_vr.c10
-rw-r--r--sys/dev/vte/if_vte.c10
-rw-r--r--sys/dev/vx/if_vx.c8
-rw-r--r--sys/dev/vxge/vxge.c4
-rw-r--r--sys/dev/wb/if_wb.c6
-rw-r--r--sys/dev/wbwd/wbwd.c258
-rw-r--r--sys/dev/wi/if_wi.c4
-rw-r--r--sys/dev/wl/if_wl.c2
-rw-r--r--sys/dev/wpi/if_wpi.c8
-rw-r--r--sys/dev/wtap/if_wtap.c21
-rw-r--r--sys/dev/wtap/plugins/visibility.c2
-rw-r--r--sys/dev/xe/if_xe.c4
-rw-r--r--sys/dev/xen/netfront/netfront.c6
-rw-r--r--sys/dev/xl/if_xl.c4
-rw-r--r--sys/fs/devfs/devfs_vnops.c11
-rwxr-xr-xsys/fs/ext2fs/ext2_dinode.h22
-rw-r--r--sys/fs/ext2fs/ext2_inode_cnv.c5
-rw-r--r--sys/fs/ext2fs/ext2_vfsops.c2
-rwxr-xr-xsys/fs/ext2fs/ext2fs.h20
-rw-r--r--sys/fs/nfs/nfs.h17
-rw-r--r--sys/fs/nfs/nfs_commonkrpc.c155
-rw-r--r--sys/fs/nfs/nfs_commonport.c6
-rw-r--r--sys/fs/nfs/nfs_commonsubs.c350
-rw-r--r--sys/fs/nfs/nfs_var.h68
-rw-r--r--sys/fs/nfs/nfscl.h2
-rw-r--r--sys/fs/nfs/nfsclstate.h208
-rw-r--r--sys/fs/nfs/nfsm_subs.h2
-rw-r--r--sys/fs/nfs/nfsport.h87
-rw-r--r--sys/fs/nfs/nfsproto.h128
-rw-r--r--sys/fs/nfsclient/nfs_clbio.c2
-rw-r--r--sys/fs/nfsclient/nfs_clcomsubs.c92
-rw-r--r--sys/fs/nfsclient/nfs_clkdtrace.c26
-rw-r--r--sys/fs/nfsclient/nfs_clkrpc.c19
-rw-r--r--sys/fs/nfsclient/nfs_clport.c9
-rw-r--r--sys/fs/nfsclient/nfs_clrpcops.c1845
-rw-r--r--sys/fs/nfsclient/nfs_clstate.c1168
-rw-r--r--sys/fs/nfsclient/nfs_clvfsops.c106
-rw-r--r--sys/fs/nfsclient/nfs_clvnops.c56
-rw-r--r--sys/fs/nfsclient/nfsmount.h8
-rw-r--r--sys/fs/nfsclient/nfsnode.h2
-rw-r--r--sys/fs/nfsserver/nfs_nfsdcache.c8
-rw-r--r--sys/fs/nfsserver/nfs_nfsdport.c4
-rw-r--r--sys/fs/nfsserver/nfs_nfsdstate.c5
-rw-r--r--sys/geom/geom_io.c3
-rw-r--r--sys/geom/label/g_label.c23
-rw-r--r--sys/kern/init_main.c2
-rw-r--r--sys/kern/kern_conf.c7
-rw-r--r--sys/kern/kern_descrip.c129
-rw-r--r--sys/kern/kern_fork.c6
-rw-r--r--sys/kern/kern_jail.c2
-rw-r--r--sys/kern/kern_ktr.c6
-rw-r--r--sys/kern/kern_lock.c24
-rw-r--r--sys/kern/kern_mbuf.c60
-rw-r--r--sys/kern/kern_mib.c11
-rw-r--r--sys/kern/kern_mutex.c4
-rw-r--r--sys/kern/kern_priv.c18
-rw-r--r--sys/kern/kern_rmlock.c5
-rw-r--r--sys/kern/kern_rwlock.c9
-rw-r--r--sys/kern/kern_shutdown.c142
-rw-r--r--sys/kern/kern_sig.c227
-rw-r--r--sys/kern/kern_switch.c6
-rw-r--r--sys/kern/kern_sx.c9
-rw-r--r--sys/kern/kern_time.c3
-rw-r--r--sys/kern/kern_timeout.c88
-rw-r--r--sys/kern/subr_busdma_bufalloc.c174
-rw-r--r--sys/kern/subr_mchain.c10
-rw-r--r--sys/kern/subr_param.c4
-rw-r--r--sys/kern/subr_smp.c3
-rw-r--r--sys/kern/subr_syscall.c18
-rw-r--r--sys/kern/subr_uio.c1
-rw-r--r--sys/kern/subr_witness.c134
-rw-r--r--sys/kern/sys_generic.c3
-rw-r--r--sys/kern/uipc_domain.c57
-rw-r--r--sys/kern/uipc_mbuf.c20
-rw-r--r--sys/kern/uipc_mbuf2.c6
-rw-r--r--sys/kern/uipc_sockbuf.c8
-rw-r--r--sys/kern/uipc_socket.c147
-rw-r--r--sys/kern/uipc_syscalls.c6
-rw-r--r--sys/kern/uipc_usrreq.c1
-rw-r--r--sys/kern/vfs_bio.c32
-rw-r--r--sys/kern/vfs_export.c2
-rw-r--r--sys/kern/vfs_mount.c10
-rw-r--r--sys/kern/vfs_mountroot.c9
-rw-r--r--sys/kern/vfs_subr.c115
-rw-r--r--sys/kern/vfs_vnops.c82
-rw-r--r--sys/kgssapi/gss_accept_sec_context.c11
-rw-r--r--sys/kgssapi/gss_acquire_cred.c11
-rw-r--r--sys/kgssapi/gss_canonicalize_name.c11
-rw-r--r--sys/kgssapi/gss_delete_sec_context.c13
-rw-r--r--sys/kgssapi/gss_display_status.c11
-rw-r--r--sys/kgssapi/gss_export_name.c11
-rw-r--r--sys/kgssapi/gss_impl.c37
-rw-r--r--sys/kgssapi/gss_import_name.c9
-rw-r--r--sys/kgssapi/gss_init_sec_context.c9
-rw-r--r--sys/kgssapi/gss_pname_to_uid.c24
-rw-r--r--sys/kgssapi/gss_release_cred.c14
-rw-r--r--sys/kgssapi/gss_release_name.c13
-rw-r--r--sys/kgssapi/gss_set_cred_option.c9
-rw-r--r--sys/kgssapi/gssapi_impl.h2
-rw-r--r--sys/mips/adm5120/if_admsw.c8
-rw-r--r--sys/mips/atheros/if_arge.c4
-rw-r--r--sys/mips/beri/beri_machdep.c22
-rw-r--r--sys/mips/cavium/if_octm.c2
-rw-r--r--sys/mips/cavium/octe/ethernet-mem.c2
-rw-r--r--sys/mips/cavium/octe/ethernet-rx.c2
-rw-r--r--sys/mips/idt/if_kr.c2
-rw-r--r--sys/mips/include/param.h14
-rw-r--r--sys/mips/nlm/dev/net/xlpge.c2
-rw-r--r--sys/mips/rmi/dev/nlge/if_nlge.c2
-rw-r--r--sys/mips/rmi/dev/xlr/rge.c2
-rw-r--r--sys/modules/ath/Makefile12
-rw-r--r--sys/net/bpf.c49
-rw-r--r--sys/net/bpf.h3
-rw-r--r--sys/net/bpf_buffer.c5
-rw-r--r--sys/net/bpfdesc.h1
-rw-r--r--sys/net/bridgestp.c4
-rw-r--r--sys/net/ieee8023ad_lacp.c4
-rw-r--r--sys/net/if_arcsubr.c10
-rw-r--r--sys/net/if_atmsubr.c2
-rw-r--r--sys/net/if_bridge.c20
-rw-r--r--sys/net/if_ef.c4
-rw-r--r--sys/net/if_ethersubr.c10
-rw-r--r--sys/net/if_fddisubr.c6
-rw-r--r--sys/net/if_fwsubr.c6
-rw-r--r--sys/net/if_gre.c4
-rw-r--r--sys/net/if_iso88025subr.c6
-rw-r--r--sys/net/if_llatbl.c6
-rw-r--r--sys/net/if_spppfr.c6
-rw-r--r--sys/net/if_spppsubr.c10
-rw-r--r--sys/net/if_stf.c12
-rw-r--r--sys/net/if_tap.c2
-rw-r--r--sys/net/if_tun.c6
-rw-r--r--sys/net/rtsock.c135
-rw-r--r--sys/net80211/ieee80211_adhoc.c5
-rw-r--r--sys/net80211/ieee80211_freebsd.c4
-rw-r--r--sys/net80211/ieee80211_hostap.c5
-rw-r--r--sys/net80211/ieee80211_hwmp.c2
-rw-r--r--sys/net80211/ieee80211_input.c2
-rw-r--r--sys/net80211/ieee80211_mesh.c2
-rw-r--r--sys/net80211/ieee80211_output.c20
-rw-r--r--sys/net80211/ieee80211_proto.c63
-rw-r--r--sys/net80211/ieee80211_regdomain.h11
-rw-r--r--sys/net80211/ieee80211_sta.c3
-rw-r--r--sys/net80211/ieee80211_sta.h6
-rw-r--r--sys/net80211/ieee80211_superg.c47
-rw-r--r--sys/net80211/ieee80211_superg.h11
-rw-r--r--sys/net80211/ieee80211_wds.c2
-rw-r--r--sys/netatalk/aarp.c10
-rw-r--r--sys/netatalk/ddp_output.c4
-rw-r--r--sys/netgraph/atm/ccatm/ng_ccatm.c4
-rw-r--r--sys/netgraph/atm/ng_atm.c6
-rw-r--r--sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c4
-rw-r--r--sys/netgraph/bluetooth/drivers/h4/ng_h4.c2
-rw-r--r--sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c20
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_cmds.c2
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_evnt.c2
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_misc.c2
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_ulpi.c10
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h22
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c2
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c2
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c2
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c6
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c6
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c14
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_sco.c4
-rw-r--r--sys/netgraph/netflow/netflow.c2
-rw-r--r--sys/netgraph/netflow/netflow_v9.c2
-rw-r--r--sys/netgraph/ng_UI.c2
-rw-r--r--sys/netgraph/ng_atmllc.c4
-rw-r--r--sys/netgraph/ng_bridge.c2
-rw-r--r--sys/netgraph/ng_cisco.c4
-rw-r--r--sys/netgraph/ng_deflate.c4
-rw-r--r--sys/netgraph/ng_device.c2
-rw-r--r--sys/netgraph/ng_frame_relay.c2
-rw-r--r--sys/netgraph/ng_gif.c2
-rw-r--r--sys/netgraph/ng_gif_demux.c2
-rw-r--r--sys/netgraph/ng_hub.c2
-rw-r--r--sys/netgraph/ng_iface.c2
-rw-r--r--sys/netgraph/ng_ipfw.c2
-rw-r--r--sys/netgraph/ng_l2tp.c14
-rw-r--r--sys/netgraph/ng_lmi.c2
-rw-r--r--sys/netgraph/ng_mppc.c6
-rw-r--r--sys/netgraph/ng_one2many.c2
-rw-r--r--sys/netgraph/ng_ppp.c6
-rw-r--r--sys/netgraph/ng_pppoe.c20
-rw-r--r--sys/netgraph/ng_pptpgre.c4
-rw-r--r--sys/netgraph/ng_pred1.c4
-rw-r--r--sys/netgraph/ng_rfc1490.c10
-rw-r--r--sys/netgraph/ng_source.c8
-rw-r--r--sys/netgraph/ng_tee.c2
-rw-r--r--sys/netgraph/ng_tty.c4
-rw-r--r--sys/netgraph/ng_vjc.c4
-rw-r--r--sys/netgraph/ng_vlan.c2
-rw-r--r--sys/netinet/if_ether.c18
-rw-r--r--sys/netinet/igmp.c18
-rw-r--r--sys/netinet/in.c15
-rw-r--r--sys/netinet/in_gif.c4
-rw-r--r--sys/netinet/in_pcb.c2
-rw-r--r--sys/netinet/ip_carp.c37
-rw-r--r--sys/netinet/ip_icmp.c6
-rw-r--r--sys/netinet/ip_input.c4
-rw-r--r--sys/netinet/ip_mroute.c12
-rw-r--r--sys/netinet/ip_options.c4
-rw-r--r--sys/netinet/ip_output.c10
-rw-r--r--sys/netinet/libalias/alias.c4
-rw-r--r--sys/netinet/raw_ip.c2
-rw-r--r--sys/netinet/sctp_asconf.c10
-rw-r--r--sys/netinet/sctp_auth.c4
-rw-r--r--sys/netinet/sctp_indata.c58
-rw-r--r--sys/netinet/sctp_input.c14
-rw-r--r--sys/netinet/sctp_output.c464
-rw-r--r--sys/netinet/sctp_output.h3
-rw-r--r--sys/netinet/sctp_pcb.c10
-rw-r--r--sys/netinet/sctp_timer.c4
-rw-r--r--sys/netinet/sctp_usrreq.c30
-rw-r--r--sys/netinet/sctputil.c36
-rw-r--r--sys/netinet/tcp_input.c16
-rw-r--r--sys/netinet/tcp_output.c6
-rw-r--r--sys/netinet/tcp_reass.c2
-rw-r--r--sys/netinet/tcp_subr.c5
-rw-r--r--sys/netinet/tcp_syncache.c4
-rw-r--r--sys/netinet/tcp_timewait.c2
-rw-r--r--sys/netinet/udp_usrreq.c3
-rw-r--r--sys/netinet6/frag6.c2
-rw-r--r--sys/netinet6/icmp6.c38
-rw-r--r--sys/netinet6/in6.c32
-rw-r--r--sys/netinet6/in6_gif.c4
-rw-r--r--sys/netinet6/in6_var.h24
-rw-r--r--sys/netinet6/ip6_input.c13
-rw-r--r--sys/netinet6/ip6_mroute.c2
-rw-r--r--sys/netinet6/ip6_output.c53
-rw-r--r--sys/netinet6/ip6_var.h2
-rw-r--r--sys/netinet6/mld6.c18
-rw-r--r--sys/netinet6/nd6.c10
-rw-r--r--sys/netinet6/nd6_nbr.c8
-rw-r--r--sys/netinet6/raw_ip6.c2
-rw-r--r--sys/netinet6/scope6.c9
-rw-r--r--sys/netinet6/scope6_var.h5
-rw-r--r--sys/netinet6/udp6_usrreq.c2
-rw-r--r--sys/netipsec/ipsec_mbuf.c8
-rw-r--r--sys/netipsec/ipsec_output.c4
-rw-r--r--sys/netipsec/key.c42
-rw-r--r--sys/netipsec/keysock.c8
-rw-r--r--sys/netipsec/xform_ipip.c4
-rw-r--r--sys/netipx/ipx_outputfl.c2
-rw-r--r--sys/netipx/ipx_usrreq.c4
-rw-r--r--sys/netipx/spx_reass.c2
-rw-r--r--sys/netipx/spx_usrreq.c10
-rw-r--r--sys/netnatm/natm.c2
-rw-r--r--sys/netncp/ncp_sock.c2
-rw-r--r--sys/netpfil/ipfw/ip_dn_glue.c2
-rw-r--r--sys/netpfil/ipfw/ip_fw2.c29
-rw-r--r--sys/netpfil/ipfw/ip_fw_dynamic.c5
-rw-r--r--sys/netpfil/ipfw/ip_fw_log.c8
-rw-r--r--sys/netpfil/ipfw/ip_fw_pfil.c4
-rw-r--r--sys/netpfil/ipfw/ip_fw_private.h2
-rw-r--r--sys/netpfil/pf/if_pflog.c5
-rw-r--r--sys/netpfil/pf/if_pfsync.c47
-rw-r--r--sys/netpfil/pf/pf.c34
-rw-r--r--sys/netpfil/pf/pf_if.c16
-rw-r--r--sys/netpfil/pf/pf_ioctl.c10
-rw-r--r--sys/netpfil/pf/pf_lb.c5
-rw-r--r--sys/netpfil/pf/pf_norm.c7
-rw-r--r--sys/netpfil/pf/pf_osfp.c5
-rw-r--r--sys/netpfil/pf/pf_ruleset.c5
-rw-r--r--sys/netpfil/pf/pf_table.c5
-rw-r--r--sys/netsmb/smb_iod.c2
-rw-r--r--sys/netsmb/smb_rq.c2
-rw-r--r--sys/netsmb/smb_trantcp.c2
-rw-r--r--sys/nfs/krpc_subr.c10
-rw-r--r--sys/nfs/nfs_common.c6
-rw-r--r--sys/nfsclient/nfs_krpc.c2
-rw-r--r--sys/nfsclient/nfs_subs.c16
-rw-r--r--sys/nfsclient/nfsargs.h1
-rw-r--r--sys/nfsserver/nfs_fha.c2
-rw-r--r--sys/nfsserver/nfs_serv.c8
-rw-r--r--sys/nfsserver/nfs_srvkrpc.c6
-rw-r--r--sys/nfsserver/nfs_srvsubs.c4
-rw-r--r--sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c2
-rw-r--r--sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c2
-rw-r--r--sys/ofed/drivers/infiniband/ulp/sdp/sdp_bcopy.c2
-rw-r--r--sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c8
-rw-r--r--sys/ofed/drivers/infiniband/ulp/sdp/sdp_tx.c2
-rw-r--r--sys/ofed/drivers/net/mlx4/en_tx.c2
-rw-r--r--sys/pci/if_rl.c2
-rw-r--r--sys/powerpc/ps3/if_glc.c4
-rw-r--r--sys/rpc/clnt.h1
-rw-r--r--sys/rpc/clnt_dg.c2
-rw-r--r--sys/rpc/clnt_rc.c38
-rw-r--r--sys/rpc/clnt_vc.c179
-rw-r--r--sys/rpc/krpc.h111
-rw-r--r--sys/rpc/rpc_generic.c4
-rw-r--r--sys/rpc/rpcm_subs.h2
-rw-r--r--sys/rpc/rpcsec_gss/rpcsec_gss_prot.c4
-rw-r--r--sys/rpc/svc.c4
-rw-r--r--sys/rpc/svc.h2
-rw-r--r--sys/rpc/svc_dg.c2
-rw-r--r--sys/rpc/svc_vc.c182
-rw-r--r--sys/security/audit/bsm_domain.c (renamed from sys/security/audit/audit_bsm_domain.c)0
-rw-r--r--sys/security/audit/bsm_errno.c (renamed from sys/security/audit/audit_bsm_errno.c)0
-rw-r--r--sys/security/audit/bsm_fcntl.c (renamed from sys/security/audit/audit_bsm_fcntl.c)0
-rw-r--r--sys/security/audit/bsm_socket_type.c (renamed from sys/security/audit/audit_bsm_socket_type.c)0
-rw-r--r--sys/security/audit/bsm_token.c (renamed from sys/security/audit/audit_bsm_token.c)0
-rw-r--r--sys/sparc64/conf/GENERIC2
-rw-r--r--sys/sys/buf_ring.h36
-rw-r--r--sys/sys/busdma_bufalloc.h118
-rw-r--r--sys/sys/copyright.h4
-rw-r--r--sys/sys/file.h3
-rw-r--r--sys/sys/fnv_hash.h3
-rw-r--r--sys/sys/kdb.h1
-rw-r--r--sys/sys/ktr.h44
-rw-r--r--sys/sys/mbuf.h15
-rw-r--r--sys/sys/mount.h15
-rw-r--r--sys/sys/protosw.h1
-rw-r--r--sys/sys/socketvar.h1
-rw-r--r--sys/sys/sysctl.h4
-rw-r--r--sys/sys/systm.h8
-rw-r--r--sys/sys/vnode.h4
-rw-r--r--sys/tools/vnode_if.awk27
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c3
-rw-r--r--sys/ufs/ffs/ffs_softdep.c2
-rw-r--r--sys/ufs/ufs/ufs_quota.c2
-rw-r--r--sys/vm/uma.h38
-rw-r--r--sys/vm/uma_core.c34
-rw-r--r--sys/vm/uma_int.h6
-rw-r--r--sys/vm/vm.h2
-rw-r--r--sys/vm/vm_fault.c4
-rw-r--r--sys/vm/vm_map.c60
-rw-r--r--sys/vm/vm_meter.c2
-rw-r--r--sys/vm/vm_mmap.c44
-rw-r--r--sys/vm/vm_object.c35
-rw-r--r--sys/vm/vm_object.h2
-rw-r--r--sys/vm/vm_page.c13
-rw-r--r--sys/vm/vm_pageout.c6
-rw-r--r--sys/vm/vm_unix.c33
-rw-r--r--sys/x86/include/bus.h38
-rw-r--r--tools/build/mk/OptionalObsoleteFiles.inc1
-rw-r--r--tools/debugscripts/dot.gdbinit14
-rw-r--r--tools/regression/bin/sh/errors/write-error1.03
-rw-r--r--tools/regression/lib/libc/stdio/test-perror.c1
-rw-r--r--tools/regression/usr.bin/printf/regress.sh6
-rw-r--r--tools/regression/usr.bin/printf/regress.zero.out1
-rw-r--r--tools/test/ppsapi/Makefile2
-rw-r--r--tools/test/ppsapi/README4
-rw-r--r--tools/tools/ath/Makefile2
-rw-r--r--tools/tools/ath/arcode/arcode.c2
-rw-r--r--tools/tools/ath/ath_prom_read/ath_prom_read.c2
-rw-r--r--tools/tools/ath/athdebug/athdebug.c8
-rw-r--r--tools/tools/ath/athdecode/main.c7
-rw-r--r--tools/tools/ath/athkey/athkey.c8
-rw-r--r--tools/tools/ath/athprom/athprom.c8
-rw-r--r--tools/tools/ath/athratestats/main.c16
-rw-r--r--tools/tools/ath/athspectral/Makefile16
-rw-r--r--tools/tools/ath/athspectral/athspectral.c323
-rw-r--r--tools/tools/ath/athstats/Makefile4
-rw-r--r--tools/tools/ath/athstats/athstats.c16
-rw-r--r--tools/tools/ath/athsurvey/athsurvey.c2
-rw-r--r--tools/tools/netrate/netreceive/Makefile1
-rw-r--r--tools/tools/netrate/netreceive/netreceive.c175
-rw-r--r--tools/tools/netrate/netsend/netsend.c19
-rw-r--r--tools/tools/sysbuild/sysbuild.sh66
-rw-r--r--usr.bin/calendar/parsedata.c12
-rw-r--r--usr.bin/clang/clang/clang.18
-rw-r--r--usr.bin/dc/bcode.c94
-rw-r--r--usr.bin/dc/bcode.h5
-rw-r--r--usr.bin/dc/inout.c9
-rw-r--r--usr.bin/fetch/fetch.c10
-rw-r--r--usr.bin/grep/grep.c3
-rw-r--r--usr.bin/grep/grep.h1
-rw-r--r--usr.bin/grep/util.c3
-rw-r--r--usr.bin/indent/indent_globs.h2
-rw-r--r--usr.bin/locate/locate/locate.c4
-rw-r--r--usr.bin/m4/Makefile1
-rw-r--r--usr.bin/printf/printf.c2
-rw-r--r--usr.bin/rctl/rctl.822
-rw-r--r--usr.bin/sort/sort.c37
-rw-r--r--usr.bin/sort/sort.h2
-rw-r--r--usr.bin/time/time.c4
-rw-r--r--usr.bin/tip/tip/cu.14
-rw-r--r--usr.sbin/Makefile1
-rw-r--r--usr.sbin/Makefile.amd643
-rw-r--r--usr.sbin/Makefile.i3863
-rw-r--r--usr.sbin/Makefile.sparc643
-rw-r--r--usr.sbin/acpi/acpidump/acpi.c275
-rw-r--r--usr.sbin/acpi/acpidump/acpidump.81
-rw-r--r--usr.sbin/bluetooth/hcseriald/hcseriald.82
-rw-r--r--usr.sbin/bluetooth/hcseriald/hcseriald.c2
-rwxr-xr-xusr.sbin/bsdconfig/bsdconfig23
-rwxr-xr-xusr.sbin/bsdconfig/console/console2
-rwxr-xr-xusr.sbin/bsdconfig/console/font2
-rwxr-xr-xusr.sbin/bsdconfig/console/keymap2
-rwxr-xr-xusr.sbin/bsdconfig/console/repeat2
-rwxr-xr-xusr.sbin/bsdconfig/console/saver31
-rwxr-xr-xusr.sbin/bsdconfig/console/screenmap2
-rwxr-xr-xusr.sbin/bsdconfig/console/ttys2
-rwxr-xr-xusr.sbin/bsdconfig/diskmgmt/diskmgmt2
-rwxr-xr-xusr.sbin/bsdconfig/docsinstall/docsinstall2
-rwxr-xr-xusr.sbin/bsdconfig/dot/dot1
-rw-r--r--usr.sbin/bsdconfig/examples/bsdconfigrc3
-rwxr-xr-xusr.sbin/bsdconfig/mouse/disable2
-rwxr-xr-xusr.sbin/bsdconfig/mouse/enable2
-rwxr-xr-xusr.sbin/bsdconfig/mouse/flags30
-rwxr-xr-xusr.sbin/bsdconfig/mouse/mouse2
-rwxr-xr-xusr.sbin/bsdconfig/mouse/port2
-rwxr-xr-xusr.sbin/bsdconfig/mouse/type2
-rwxr-xr-xusr.sbin/bsdconfig/networking/defaultrouter2
-rwxr-xr-xusr.sbin/bsdconfig/networking/devices2
-rwxr-xr-xusr.sbin/bsdconfig/networking/hostname2
-rwxr-xr-xusr.sbin/bsdconfig/networking/nameservers2
-rwxr-xr-xusr.sbin/bsdconfig/networking/networking2
-rw-r--r--usr.sbin/bsdconfig/networking/share/common.subr4
-rw-r--r--usr.sbin/bsdconfig/networking/share/device.subr17
-rw-r--r--usr.sbin/bsdconfig/networking/share/hostname.subr109
-rw-r--r--usr.sbin/bsdconfig/networking/share/ipaddr.subr65
-rw-r--r--usr.sbin/bsdconfig/networking/share/media.subr13
-rw-r--r--usr.sbin/bsdconfig/networking/share/netmask.subr99
-rw-r--r--usr.sbin/bsdconfig/networking/share/resolv.subr35
-rw-r--r--usr.sbin/bsdconfig/networking/share/routing.subr38
-rwxr-xr-xusr.sbin/bsdconfig/password/password2
-rw-r--r--usr.sbin/bsdconfig/password/share/password.subr5
-rwxr-xr-xusr.sbin/bsdconfig/security/kern_securelevel2
-rwxr-xr-xusr.sbin/bsdconfig/security/security2
-rw-r--r--usr.sbin/bsdconfig/share/common.subr103
-rw-r--r--usr.sbin/bsdconfig/share/dialog.subr99
-rw-r--r--usr.sbin/bsdconfig/share/mustberoot.subr11
-rw-r--r--usr.sbin/bsdconfig/share/strings.subr2
-rw-r--r--usr.sbin/bsdconfig/share/sysrc.subr9
-rwxr-xr-xusr.sbin/bsdconfig/startup/misc31
-rwxr-xr-xusr.sbin/bsdconfig/startup/rcadd2
-rwxr-xr-xusr.sbin/bsdconfig/startup/rcconf2
-rwxr-xr-xusr.sbin/bsdconfig/startup/rcdelete2
-rwxr-xr-xusr.sbin/bsdconfig/startup/rcedit2
-rwxr-xr-xusr.sbin/bsdconfig/startup/rcvar2
-rw-r--r--usr.sbin/bsdconfig/startup/share/rcconf.subr38
-rw-r--r--usr.sbin/bsdconfig/startup/share/rcedit.subr40
-rw-r--r--usr.sbin/bsdconfig/startup/share/rcvar.subr26
-rwxr-xr-xusr.sbin/bsdconfig/startup/startup2
-rw-r--r--usr.sbin/bsdconfig/timezone/share/continents.subr5
-rw-r--r--usr.sbin/bsdconfig/timezone/share/countries.subr2
-rw-r--r--usr.sbin/bsdconfig/timezone/share/iso3166.subr5
-rw-r--r--usr.sbin/bsdconfig/timezone/share/menus.subr5
-rw-r--r--usr.sbin/bsdconfig/timezone/share/zones.subr5
-rwxr-xr-xusr.sbin/bsdconfig/timezone/timezone2
-rwxr-xr-xusr.sbin/bsdconfig/ttys/ttys2
-rwxr-xr-xusr.sbin/bsdconfig/usermgmt/groupadd2
-rwxr-xr-xusr.sbin/bsdconfig/usermgmt/groupdel4
-rwxr-xr-xusr.sbin/bsdconfig/usermgmt/groupedit4
-rwxr-xr-xusr.sbin/bsdconfig/usermgmt/groupinput14
-rw-r--r--usr.sbin/bsdconfig/usermgmt/share/group_input.subr110
-rw-r--r--usr.sbin/bsdconfig/usermgmt/share/user_input.subr364
-rwxr-xr-xusr.sbin/bsdconfig/usermgmt/useradd2
-rwxr-xr-xusr.sbin/bsdconfig/usermgmt/userdel4
-rwxr-xr-xusr.sbin/bsdconfig/usermgmt/useredit4
-rwxr-xr-xusr.sbin/bsdconfig/usermgmt/userinput15
-rwxr-xr-xusr.sbin/bsdconfig/usermgmt/usermgmt4
-rw-r--r--usr.sbin/bsdinstall/partedit/Makefile3
-rw-r--r--usr.sbin/bsdinstall/partedit/partedit.c8
-rw-r--r--usr.sbin/bsdinstall/partedit/sade.8 (renamed from usr.sbin/sade/sade.8)30
-rwxr-xr-xusr.sbin/bsdinstall/scripts/mirrorselect14
-rw-r--r--usr.sbin/gssd/Makefile4
-rw-r--r--usr.sbin/gssd/gssd.828
-rw-r--r--usr.sbin/gssd/gssd.c329
-rw-r--r--usr.sbin/iostat/iostat.828
-rw-r--r--usr.sbin/iostat/iostat.c27
-rwxr-xr-xusr.sbin/mergemaster/mergemaster.sh19
-rw-r--r--usr.sbin/mountd/exports.57
-rw-r--r--usr.sbin/mountd/mountd.c2
-rw-r--r--usr.sbin/moused/moused.810
-rw-r--r--usr.sbin/mptable/mptable.c16
-rw-r--r--usr.sbin/mtest/mtest.c4
-rw-r--r--usr.sbin/ndiscvt/inf-parse.y1
-rw-r--r--usr.sbin/ndp/ndp.84
-rw-r--r--usr.sbin/ndp/ndp.c54
-rw-r--r--usr.sbin/nfsd/nfsd.c2
-rw-r--r--usr.sbin/nfsd/nfsv4.44
-rw-r--r--usr.sbin/nmtree/Makefile26
-rw-r--r--usr.sbin/pkg/Makefile2
-rw-r--r--usr.sbin/pkg/dns_utils.c136
-rw-r--r--usr.sbin/pkg/dns_utils.h (renamed from lib/libdisk/write_arm_disk.c)40
-rw-r--r--usr.sbin/pkg/pkg.c56
-rw-r--r--usr.sbin/portsnap/portsnap/portsnap.sh28
-rw-r--r--usr.sbin/ppp/README.changes2
-rw-r--r--usr.sbin/ppp/defs.h2
-rw-r--r--usr.sbin/ppp/ppp.8.m420
-rw-r--r--usr.sbin/pw/bitmap.c3
-rw-r--r--usr.sbin/pw/grupd.c11
-rw-r--r--usr.sbin/pw/pw_group.c5
-rw-r--r--usr.sbin/pw/pw_user.c26
-rw-r--r--usr.sbin/pw/pw_vpw.c236
-rw-r--r--usr.sbin/pw/pwupd.c16
-rw-r--r--usr.sbin/pw/rm_r.c2
-rw-r--r--usr.sbin/rpcbind/rpcbind.c4
-rw-r--r--usr.sbin/sade/Makefile27
-rw-r--r--usr.sbin/sade/command.c179
-rw-r--r--usr.sbin/sade/devices.c344
-rw-r--r--usr.sbin/sade/disks.c972
-rw-r--r--usr.sbin/sade/dmenu.c93
-rw-r--r--usr.sbin/sade/globals.c84
-rw-r--r--usr.sbin/sade/help/partition.hlp169
-rw-r--r--usr.sbin/sade/help/slice.hlp57
-rw-r--r--usr.sbin/sade/install.c249
-rw-r--r--usr.sbin/sade/label.c1646
-rw-r--r--usr.sbin/sade/main.c123
-rw-r--r--usr.sbin/sade/menus.c109
-rw-r--r--usr.sbin/sade/misc.c426
-rw-r--r--usr.sbin/sade/msg.c357
-rw-r--r--usr.sbin/sade/sade.h465
-rw-r--r--usr.sbin/sade/system.c304
-rw-r--r--usr.sbin/sade/termcap.c104
-rw-r--r--usr.sbin/sade/variable.c324
-rw-r--r--usr.sbin/sade/wizard.c200
-rw-r--r--usr.sbin/service/service.86
-rwxr-xr-xusr.sbin/service/service.sh31
-rw-r--r--usr.sbin/syslogd/syslogd.c6
-rw-r--r--usr.sbin/ypserv/yp_main.c2
1437 files changed, 41495 insertions, 29105 deletions
diff --git a/COPYRIGHT b/COPYRIGHT
index 8130d57..13b673a 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -4,7 +4,7 @@
The compilation of software known as FreeBSD is distributed under the
following terms:
-Copyright (c) 1992-2012 The FreeBSD Project. All rights reserved.
+Copyright (c) 1992-2013 The FreeBSD Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
diff --git a/LOCKS b/LOCKS
index 73b6670..a7a1e83 100644
--- a/LOCKS
+++ b/LOCKS
@@ -11,3 +11,4 @@ releng/4.* Requires Security Officer approval.
releng/5.* Requires Security Officer approval.
releng/6.* Requires Security Officer approval.
releng/7.* Requires Security Officer approval.
+releng/8.* Requires Security Officer approval.
diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index 5f88516..740b92d 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -38,6 +38,12 @@
# xargs -n1 | sort | uniq -d;
# done
+# 20121230: libdisk removed
+OLD_FILES+=usr/share/man/man3/libdisk.3.gz usr/include/libdisk.h
+OLD_FILES+=usr/lib/libdisk.a usr/lib32/libdisk.a
+# 20121230: remove wrongly created directories for auditdistd
+OLD_DIRS+=var/dist
+OLD_DIRS+=var/remote
# 20121114: zpool-features manual page moved from section 5 to 7
OLD_FILES+=usr/share/man/man5/zpool-features.5.gz
# 20121022: remove harp, hfa and idt man page
diff --git a/UPDATING b/UPDATING
index 40b3e5b..ce83d3f 100644
--- a/UPDATING
+++ b/UPDATING
@@ -26,6 +26,24 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
+20121223:
+ After switching to Clang as the default compiler some users of ZFS
+ on i386 systems started to experience stack overflow kernel panics.
+ Please consider using 'options KSTACK_PAGES=4' in such configurations.
+
+20121222:
+ GEOM_LABEL now mangles label names read from file system metadata.
+ Mangling affect labels containing spaces, non-printable characters,
+ '%' or '"'. Device names in /etc/fstab and other places may need to
+ be updated.
+
+20121217:
+ By default, only the 10 most recent kernel dumps will be saved. To
+ restore the previous behaviour (no limit on the number of kernel dumps
+ stored in the dump directory) add the following line to /etc/rc.conf:
+
+ savecore_flags=""
+
20121201:
With the addition of auditdistd(8), a new auditdistd user is now
depended on during installworld. "mergemaster -p" can be used to add
diff --git a/bin/date/netdate.c b/bin/date/netdate.c
index b085be4..e506e6d 100644
--- a/bin/date/netdate.c
+++ b/bin/date/netdate.c
@@ -85,7 +85,7 @@ netsettime(time_t tval)
dest.sin_addr.s_addr = htonl((u_long)INADDR_ANY);
s = socket(AF_INET, SOCK_DGRAM, 0);
if (s < 0) {
- if (errno != EPROTONOSUPPORT)
+ if (errno != EAFNOSUPPORT)
warn("timed");
return (retval = 2);
}
diff --git a/bin/df/df.c b/bin/df/df.c
index 3058da0..b430608 100644
--- a/bin/df/df.c
+++ b/bin/df/df.c
@@ -397,7 +397,7 @@ prthumanvalinode(int64_t bytes)
static intmax_t
fsbtoblk(int64_t num, uint64_t fsbs, u_long bs)
{
- return (num * (intmax_t) fsbs / bs);
+ return (num * (intmax_t) fsbs / (int64_t) bs);
}
/*
diff --git a/bin/ln/ln.1 b/bin/ln/ln.1
index fcf97da..610f7bb 100644
--- a/bin/ln/ln.1
+++ b/bin/ln/ln.1
@@ -291,7 +291,7 @@ implementations.
.Pp
The
.Fl F
-option is
+option is a
.Fx
extension and should not be used in portable scripts.
.Sh SEE ALSO
diff --git a/bin/ps/ps.c b/bin/ps/ps.c
index ebabc19..e9fc5fa 100644
--- a/bin/ps/ps.c
+++ b/bin/ps/ps.c
@@ -109,6 +109,7 @@ static int needcomm; /* -o "command" */
static int needenv; /* -e */
static int needuser; /* -o "user" */
static int optfatal; /* Fatal error parsing some list-option. */
+static int pid_max; /* kern.max_pid */
static enum sort { DEFAULT, SORTMEM, SORTCPU } sortby = DEFAULT;
@@ -148,6 +149,7 @@ static int pscomp(const void *, const void *);
static void saveuser(KINFO *);
static void scanvars(void);
static void sizevars(void);
+static void pidmax_init(void);
static void usage(void);
static char dfmt[] = "pid,tt,state,time,command";
@@ -200,6 +202,8 @@ main(int argc, char *argv[])
if (argc > 1)
argv[1] = kludge_oldps_options(PS_ARGS, argv[1], argv[2]);
+ pidmax_init();
+
all = descendancy = _fmt = nselectors = optfatal = 0;
prtheader = showthreads = wflag = xkeep_implied = 0;
xkeep = -1; /* Neither -x nor -X. */
@@ -722,7 +726,6 @@ addelem_gid(struct listinfo *inf, const char *elem)
return (1);
}
-#define BSD_PID_MAX 99999 /* Copy of PID_MAX from sys/proc.h. */
static int
addelem_pid(struct listinfo *inf, const char *elem)
{
@@ -740,7 +743,7 @@ addelem_pid(struct listinfo *inf, const char *elem)
if (*endp != '\0' || tempid < 0 || elem == endp) {
warnx("Invalid %s: %s", inf->lname, elem);
errno = ERANGE;
- } else if (errno != 0 || tempid > BSD_PID_MAX) {
+ } else if (errno != 0 || tempid > pid_max) {
warnx("%s too large: %s", inf->lname, elem);
errno = ERANGE;
}
@@ -753,7 +756,6 @@ addelem_pid(struct listinfo *inf, const char *elem)
inf->l.pids[(inf->count)++] = tempid;
return (1);
}
-#undef BSD_PID_MAX
/*-
* The user can specify a device via one of three formats:
@@ -1352,6 +1354,18 @@ kludge_oldps_options(const char *optlist, char *origval, const char *nextarg)
}
static void
+pidmax_init(void)
+{
+ size_t intsize;
+
+ intsize = sizeof(pid_max);
+ if (sysctlbyname("kern.pid_max", &pid_max, &intsize, NULL, 0) < 0) {
+ warn("unable to read kern.pid_max");
+ pid_max = 99999;
+ }
+}
+
+static void
usage(void)
{
#define SINGLE_OPTS "[-aCcde" OPT_LAZY_f "HhjlmrSTuvwXxZ]"
diff --git a/bin/sh/eval.c b/bin/sh/eval.c
index 8973f69..2e1315e 100644
--- a/bin/sh/eval.c
+++ b/bin/sh/eval.c
@@ -1070,6 +1070,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
}
handler = &jmploc;
redirect(cmd->ncmd.redirect, mode);
+ outclearerror(out1);
/*
* If there is no command word, redirection errors should
* not be fatal but assignment errors should.
@@ -1085,6 +1086,11 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
builtin_flags = flags;
exitstatus = (*builtinfunc[cmdentry.u.index])(argc, argv);
flushall();
+ if (outiserror(out1)) {
+ warning("write error on stdout");
+ if (exitstatus == 0 || exitstatus == 1)
+ exitstatus = 2;
+ }
cmddone:
if (argc > 0)
bltinunsetlocale();
diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c
index 05e2e88..02cf6e8 100644
--- a/bin/sh/jobs.c
+++ b/bin/sh/jobs.c
@@ -298,6 +298,7 @@ showjob(struct job *jp, int mode)
{
char s[64];
char statestr[64];
+ const char *sigstr;
struct procstat *ps;
struct job *j;
int col, curr, i, jobno, prev, procno;
@@ -324,8 +325,9 @@ showjob(struct job *jp, int mode)
i = WSTOPSIG(ps->status);
else
i = -1;
- if (i > 0 && i < sys_nsig && sys_siglist[i])
- strcpy(statestr, sys_siglist[i]);
+ sigstr = strsignal(i);
+ if (sigstr != NULL)
+ strcpy(statestr, sigstr);
else
strcpy(statestr, "Suspended");
#endif
@@ -337,10 +339,11 @@ showjob(struct job *jp, int mode)
WEXITSTATUS(ps->status));
} else {
i = WTERMSIG(ps->status);
- if (i > 0 && i < sys_nsig && sys_siglist[i])
- strcpy(statestr, sys_siglist[i]);
+ sigstr = strsignal(i);
+ if (sigstr != NULL)
+ strcpy(statestr, sigstr);
else
- fmtstr(statestr, 64, "Signal %d", i);
+ strcpy(statestr, "Unknown signal");
if (WCOREDUMP(ps->status))
strcat(statestr, " (core dumped)");
}
@@ -1019,6 +1022,7 @@ dowait(int mode, struct job *job)
struct procstat *sp;
struct job *jp;
struct job *thisjob;
+ const char *sigstr;
int done;
int stopped;
int sig;
@@ -1129,10 +1133,11 @@ dowait(int mode, struct job *job)
coredump = WCOREDUMP(sp->status);
}
if (sig > 0 && sig != SIGINT && sig != SIGPIPE) {
- if (sig < sys_nsig && sys_siglist[sig])
- out2str(sys_siglist[sig]);
+ sigstr = strsignal(sig);
+ if (sigstr != NULL)
+ out2str(sigstr);
else
- outfmt(out2, "Signal %d", sig);
+ out2str("Unknown signal");
if (coredump)
out2str(" (core dumped)");
out2c('\n');
diff --git a/bin/sh/output.c b/bin/sh/output.c
index b4dab51..d26adce 100644
--- a/bin/sh/output.c
+++ b/bin/sh/output.c
@@ -239,6 +239,20 @@ freestdout(void)
}
+int
+outiserror(struct output *file)
+{
+ return (file->flags & OUTPUT_ERR);
+}
+
+
+void
+outclearerror(struct output *file)
+{
+ file->flags &= ~OUTPUT_ERR;
+}
+
+
void
outfmt(struct output *file, const char *fmt, ...)
{
diff --git a/bin/sh/output.h b/bin/sh/output.h
index 5e3b048..51974d8 100644
--- a/bin/sh/output.h
+++ b/bin/sh/output.h
@@ -66,6 +66,8 @@ void emptyoutbuf(struct output *);
void flushall(void);
void flushout(struct output *);
void freestdout(void);
+int outiserror(struct output *);
+void outclearerror(struct output *);
void outfmt(struct output *, const char *, ...) __printflike(2, 3);
void out1fmt(const char *, ...) __printflike(1, 2);
void out2fmt_flush(const char *, ...) __printflike(1, 2);
diff --git a/bin/test/test.1 b/bin/test/test.1
index d73f794..885374e 100644
--- a/bin/test/test.1
+++ b/bin/test/test.1
@@ -32,7 +32,7 @@
.\" @(#)test.1 8.1 (Berkeley) 5/31/93
.\" $FreeBSD$
.\"
-.Dd September 10, 2010
+.Dd December 27, 2012
.Dt TEST 1
.Os
.Sh NAME
@@ -331,6 +331,13 @@ missing.
.It >1
An error occurred.
.El
+.Sh COMPATIBILITY
+For compatibility with some other implementations,
+the
+.Cm =
+primary can be substituted with
+.Cm ==
+with the same meaning.
.Sh SEE ALSO
.Xr builtin 1 ,
.Xr expr 1 ,
diff --git a/cddl/contrib/opensolaris/cmd/zdb/zdb.c b/cddl/contrib/opensolaris/cmd/zdb/zdb.c
index 2f8aa0e..362a405 100644
--- a/cddl/contrib/opensolaris/cmd/zdb/zdb.c
+++ b/cddl/contrib/opensolaris/cmd/zdb/zdb.c
@@ -61,14 +61,16 @@
#undef verify
#include <libzfs.h>
-#define ZDB_COMPRESS_NAME(idx) ((idx) < ZIO_COMPRESS_FUNCTIONS ? \
- zio_compress_table[(idx)].ci_name : "UNKNOWN")
-#define ZDB_CHECKSUM_NAME(idx) ((idx) < ZIO_CHECKSUM_FUNCTIONS ? \
- zio_checksum_table[(idx)].ci_name : "UNKNOWN")
-#define ZDB_OT_NAME(idx) ((idx) < DMU_OT_NUMTYPES ? \
- dmu_ot[(idx)].ot_name : DMU_OT_IS_VALID(idx) ? \
- dmu_ot_byteswap[DMU_OT_BYTESWAP(idx)].ob_name : "UNKNOWN")
-#define ZDB_OT_TYPE(idx) ((idx) < DMU_OT_NUMTYPES ? (idx) : DMU_OT_NUMTYPES)
+#define ZDB_COMPRESS_NAME(idx) ((idx) < ZIO_COMPRESS_FUNCTIONS ? \
+ zio_compress_table[(idx)].ci_name : "UNKNOWN")
+#define ZDB_CHECKSUM_NAME(idx) ((idx) < ZIO_CHECKSUM_FUNCTIONS ? \
+ zio_checksum_table[(idx)].ci_name : "UNKNOWN")
+#define ZDB_OT_NAME(idx) ((idx) < DMU_OT_NUMTYPES ? \
+ dmu_ot[(idx)].ot_name : DMU_OT_IS_VALID(idx) ? \
+ dmu_ot_byteswap[DMU_OT_BYTESWAP(idx)].ob_name : "UNKNOWN")
+#define ZDB_OT_TYPE(idx) ((idx) < DMU_OT_NUMTYPES ? (idx) : \
+ (((idx) == DMU_OTN_ZAP_DATA || (idx) == DMU_OTN_ZAP_METADATA) ? \
+ DMU_OT_ZAP_OTHER : DMU_OT_NUMTYPES))
#ifndef lint
extern int zfs_recover;
@@ -3194,7 +3196,13 @@ main(int argc, char **argv)
argv[i], strerror(errno));
}
}
- (os != NULL) ? dump_dir(os) : dump_zpool(spa);
+ if (os != NULL) {
+ dump_dir(os);
+ } else if (zopt_objects > 0 && !dump_opt['m']) {
+ dump_dir(spa->spa_meta_objset);
+ } else {
+ dump_zpool(spa);
+ }
} else {
flagbits['b'] = ZDB_FLAG_PRINT_BLKPTR;
flagbits['c'] = ZDB_FLAG_CHECKSUM;
diff --git a/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c b/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
index 3c2a625..dd6c90b 100644
--- a/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
+++ b/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
@@ -906,10 +906,11 @@ zpool_do_create(int argc, char **argv)
/*
* Check the validity of the mountpoint and direct the user to use the
* '-m' mountpoint option if it looks like its in use.
+ * Ignore the checks if the '-f' option is given.
*/
- if (mountpoint == NULL ||
+ if (!force && (mountpoint == NULL ||
(strcmp(mountpoint, ZFS_MOUNTPOINT_LEGACY) != 0 &&
- strcmp(mountpoint, ZFS_MOUNTPOINT_NONE) != 0)) {
+ strcmp(mountpoint, ZFS_MOUNTPOINT_NONE) != 0))) {
char buf[MAXPATHLEN];
DIR *dirp;
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
index 6bb16ac..662801e 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
@@ -727,7 +727,7 @@ send_iterate_fs(zfs_handle_t *zhp, void *arg)
sd->parent_fromsnap_guid = 0;
VERIFY(0 == nvlist_alloc(&sd->parent_snaps, NV_UNIQUE_NAME, 0));
VERIFY(0 == nvlist_alloc(&sd->snapprops, NV_UNIQUE_NAME, 0));
- (void) zfs_iter_snapshots(zhp, B_FALSE, send_iterate_snap, sd);
+ (void) zfs_iter_snapshots_sorted(zhp, send_iterate_snap, sd);
VERIFY(0 == nvlist_add_nvlist(nvfs, "snaps", sd->parent_snaps));
VERIFY(0 == nvlist_add_nvlist(nvfs, "snapprops", sd->snapprops));
nvlist_free(sd->parent_snaps);
@@ -1945,11 +1945,12 @@ recv_incremental_replication(libzfs_handle_t *hdl, const char *tofs,
recvflags_t *flags, nvlist_t *stream_nv, avl_tree_t *stream_avl,
nvlist_t *renamed)
{
- nvlist_t *local_nv;
+ nvlist_t *local_nv, *deleted = NULL;
avl_tree_t *local_avl;
nvpair_t *fselem, *nextfselem;
char *fromsnap;
char newname[ZFS_MAXNAMELEN];
+ char guidname[32];
int error;
boolean_t needagain, progress, recursive;
char *s1, *s2;
@@ -1965,6 +1966,8 @@ recv_incremental_replication(libzfs_handle_t *hdl, const char *tofs,
again:
needagain = progress = B_FALSE;
+ VERIFY(0 == nvlist_alloc(&deleted, NV_UNIQUE_NAME, 0));
+
if ((error = gather_nvlist(hdl, tofs, fromsnap, NULL,
recursive, &local_nv, &local_avl)) != 0)
return (error);
@@ -2079,6 +2082,8 @@ again:
needagain = B_TRUE;
else
progress = B_TRUE;
+ sprintf(guidname, "%lu", thisguid);
+ nvlist_add_boolean(deleted, guidname);
continue;
}
@@ -2134,6 +2139,8 @@ again:
needagain = B_TRUE;
else
progress = B_TRUE;
+ sprintf(guidname, "%lu", parent_fromsnap_guid);
+ nvlist_add_boolean(deleted, guidname);
continue;
}
@@ -2156,6 +2163,24 @@ again:
s2 = strrchr(stream_fsname, '/');
/*
+ * Check if we're going to rename based on parent guid change
+ * and the current parent guid was also deleted. If it was then
+ * rename will fail and is likely unneeded, so avoid this and
+ * force an early retry to determine the new
+ * parent_fromsnap_guid.
+ */
+ if (stream_parent_fromsnap_guid != 0 &&
+ parent_fromsnap_guid != 0 &&
+ stream_parent_fromsnap_guid != parent_fromsnap_guid) {
+ sprintf(guidname, "%lu", parent_fromsnap_guid);
+ if (nvlist_exists(deleted, guidname)) {
+ progress = B_TRUE;
+ needagain = B_TRUE;
+ goto doagain;
+ }
+ }
+
+ /*
* Check for rename. If the exact receive path is specified, it
* does not count as a rename, but we still need to check the
* datasets beneath it.
@@ -2209,8 +2234,10 @@ again:
}
}
+doagain:
fsavl_destroy(local_avl);
nvlist_free(local_nv);
+ nvlist_free(deleted);
if (needagain && progress) {
/* do another pass to fix up temporary names */
diff --git a/contrib/bind9/CHANGES b/contrib/bind9/CHANGES
index d9b6714..6d1ee31 100644
--- a/contrib/bind9/CHANGES
+++ b/contrib/bind9/CHANGES
@@ -1,15 +1,81 @@
- --- 9.8.3-P4 released ---
+ --- 9.8.4-P1 released ---
+
+3407. [security] Named could die on specific queries with dns64 enabled.
+ [Addressed in change #3388 for BIND 9.8.5 and 9.9.3.]
+
+ --- 9.8.4 released ---
3383. [security] A certain combination of records in the RBT could
cause named to hang while populating the additional
section of a response. [RT #31090]
- --- 9.8.3-P3 released ---
+3373. [bug] win32: open raw files in binary mode. [RT #30944]
3364. [security] Named could die on specially crafted record.
[RT #30416]
- --- 9.8.3-P2 released ---
+ --- 9.8.4rc1 released ---
+
+3369. [bug] nsupdate terminated unexpectedly in interactive mode
+ if built with readline support. [RT #29550]
+
+3368. [bug] <dns/iptable.h> and <dns/zone.h> were not C++ safe.
+
+3367. [bug] dns_dnsseckey_create() result was not being checked.
+ [RT #30685]
+
+3366. [bug] Fixed Read-After-Write dependency violation for IA64
+ atomic operations. [RT #25181]
+
+3365. [bug] Removed spurious newlines from log messages in
+ zone.c [RT #30675]
+
+3363. [bug] Need to allow "forward" and "fowarders" options
+ in static-stub zones; this had been overlooked.
+ [RT #30482]
+
+3362. [bug] Setting some option values to 0 in named.conf
+ could trigger an assertion failure on startup.
+ [RT #27730]
+
+3360. [bug] 'host -w' could die. [RT #18723]
+
+3359. [bug] An improperly-formed TSIG secret could cause a
+ memory leak. [RT #30607]
+
+3357. [port] Add support for libxml2-2.8.x [RT #30440]
+
+3356. [bug] Cap the TTL of signed RRsets when RRSIGs are
+ approaching their expiry, so they don't remain
+ in caches after expiry. [RT #26429]
+
+ --- 9.8.4b1 released ---
+
+3354. [func] Improve OpenSSL error logging. [RT #29932]
+
+3353. [bug] Use a single task for task exclusive operations.
+ [RT #29872]
+
+3352. [bug] Ensure that learned server attributes timeout of the
+ adb cache. [RT #29856]
+
+3351. [bug] isc_mem_put and isc_mem_putanddetach didn't report
+ caller if either ISC_MEM_DEBUGSIZE or ISC_MEM_DEBUGCTX
+ memory debugging flags are set. [RT #30243]
+
+3350. [bug] Memory read overrun in isc___mem_reallocate if
+ ISC_MEM_DEBUGCTX memory debugging flag is set.
+ [RT #30240]
+
+3348. [bug] Prevent RRSIG data from being cached if a negative
+ record matching the covering type exists at a higher
+ trust level. Such data already can't be retrieved from
+ the cache since change 3218 -- this prevents it
+ being inserted into the cache as well. [RT #26809]
+
+3347. [bug] dnssec-settime: Issue a warning when writing a new
+ private key file would cause a change in the
+ permissions of the existing file. [RT #27724]
3346. [security] Bad-cache data could be used before it was
initialized, causing an assert. [RT #30025]
@@ -18,11 +84,47 @@
resulting in excessive cpu usage in some cases.
[RT #29952]
- --- 9.8.3-P1 released ---
+3337. [bug] Change #3294 broke support for the multiple keys
+ in controls. [RT #29694]
+
+3335. [func] nslookup: return a nonzero exit code when unable
+ to get an answer. [RT #29492]
+
+3333. [bug] Setting resolver-query-timeout too low can cause
+ named to not recover if it loses connectivity.
+ [RT #29623]
+
+3332. [bug] Re-use cached DS rrsets if possible. [RT #29446]
3331. [security] dns_rdataslab_fromrdataset could produce bad
rdataslabs. [RT #29644]
-
+
+3330. [func] Fix missing signatures on NOERROR results despite
+ RPZ rewriting. Also
+ - add optional "recursive-only yes|no" to the
+ response-policy statement
+ - add optional "max-policy-ttl" to the response-policy
+ statement to limit the false data that
+ "recursive-only no" can introduce into
+ resolvers' caches
+ - add a RPZ performance test to bin/tests/system/rpz
+ when queryperf is available.
+ - the encoding of PASSTHRU action to "rpz-passthru".
+ (The old encoding is still accepted.)
+ [RT #26172]
+
+
+3329. [bug] Handle RRSIG signer-name case consistently: We
+ generate RRSIG records with the signer-name in
+ lower case. We accept them with any case, but if
+ they fail to validate, we try again in lower case.
+ [RT #27451]
+
+3328. [bug] Fixed inconsistent data checking in dst_parse.c.
+ [RT #29401]
+
+3317. [func] Add ECDSA support (RFC 6605). [RT #21918]
+
--- 9.8.3 released ---
3318. [tuning] Reduce the amount of work performed while holding a
diff --git a/contrib/bind9/Makefile.in b/contrib/bind9/Makefile.in
index 2a00df4..05d9c43 100644
--- a/contrib/bind9/Makefile.in
+++ b/contrib/bind9/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2009, 2011 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004-2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2002 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/README b/contrib/bind9/README
index ee56344..f797639 100644
--- a/contrib/bind9/README
+++ b/contrib/bind9/README
@@ -51,6 +51,11 @@ BIND 9
For up-to-date release notes and errata, see
http://www.isc.org/software/bind9/releasenotes
+BIND 9.8.4
+
+ BIND 9.8.4 includes several bug fixes and patches security
+ flaws described in CVE-2012-1667, CVE-2012-3817 and CVE-2012-4244.
+
BIND 9.8.3
BIND 9.8.3 is a maintenance release.
diff --git a/contrib/bind9/acconfig.h b/contrib/bind9/acconfig.h
index 736d1bc..3d412d9 100644
--- a/contrib/bind9/acconfig.h
+++ b/contrib/bind9/acconfig.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2008, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -138,6 +138,9 @@ int sigwait(const unsigned int *set, int *sig);
/* Define if OpenSSL includes DSA support */
#undef HAVE_OPENSSL_DSA
+/* Define if OpenSSL includes ECDSA support */
+#undef HAVE_OPENSSL_ECDSA
+
/* Define to the length type used by the socket API (socklen_t, size_t, int). */
#undef ISC_SOCKADDR_LEN_T
diff --git a/contrib/bind9/bin/Makefile.in b/contrib/bind9/bin/Makefile.in
index e480552..89b4673 100644
--- a/contrib/bind9/bin/Makefile.in
+++ b/contrib/bind9/bin/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/bin/check/Makefile.in b/contrib/bind9/bin/check/Makefile.in
index 403933b..c191605 100644
--- a/contrib/bind9/bin/check/Makefile.in
+++ b/contrib/bind9/bin/check/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004-2007, 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000-2003 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/bin/check/check-tool.c b/contrib/bind9/bin/check/check-tool.c
index 422d9b1..2bf16a6 100644
--- a/contrib/bind9/bin/check/check-tool.c
+++ b/contrib/bind9/bin/check/check-tool.c
@@ -639,6 +639,9 @@ dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
{
isc_result_t result;
FILE *output = stdout;
+ const char *flags;
+
+ flags = (fileformat == dns_masterformat_text) ? "w+" : "wb+";
if (debug) {
if (filename != NULL && strcmp(filename, "-") != 0)
@@ -649,7 +652,7 @@ dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
}
if (filename != NULL && strcmp(filename, "-") != 0) {
- result = isc_stdio_open(filename, "w+", &output);
+ result = isc_stdio_open(filename, flags, &output);
if (result != ISC_R_SUCCESS) {
fprintf(stderr, "could not open output "
diff --git a/contrib/bind9/bin/confgen/Makefile.in b/contrib/bind9/bin/confgen/Makefile.in
index 64ddf76..8b3e5aa 100644
--- a/contrib/bind9/bin/confgen/Makefile.in
+++ b/contrib/bind9/bin/confgen/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/bin/confgen/unix/Makefile.in b/contrib/bind9/bin/confgen/unix/Makefile.in
index 924701e..2ab6d92 100644
--- a/contrib/bind9/bin/confgen/unix/Makefile.in
+++ b/contrib/bind9/bin/confgen/unix/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/bin/dig/Makefile.in b/contrib/bind9/bin/dig/Makefile.in
index 19dc61c..2a3bc5d 100644
--- a/contrib/bind9/bin/dig/Makefile.in
+++ b/contrib/bind9/bin/dig/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2005, 2007, 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000-2002 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/bin/dig/nslookup.c b/contrib/bind9/bin/dig/nslookup.c
index 48c390b..2ef8f84 100644
--- a/contrib/bind9/bin/dig/nslookup.c
+++ b/contrib/bind9/bin/dig/nslookup.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -57,6 +57,7 @@ static isc_boolean_t in_use = ISC_FALSE;
static char defclass[MXRD] = "IN";
static char deftype[MXRD] = "A";
static isc_event_t *global_event = NULL;
+static int query_error = 1, print_error = 0;
static char domainopt[DNS_NAME_MAXTEXT];
@@ -406,6 +407,9 @@ isc_result_t
printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
char servtext[ISC_SOCKADDR_FORMATSIZE];
+ /* I've we've gotten this far, we've reached a server. */
+ query_error = 0;
+
debug("printmessage()");
isc_sockaddr_format(&query->sockaddr, servtext, sizeof(servtext));
@@ -433,6 +437,9 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
(msg->rcode != dns_rcode_nxdomain) ? nametext :
query->lookup->textname, rcode_totext(msg->rcode));
debug("returning with rcode == 0");
+
+ /* the lookup failed */
+ print_error |= 1;
return (ISC_R_SUCCESS);
}
@@ -887,5 +894,5 @@ main(int argc, char **argv) {
destroy_libs();
isc_app_finish();
- return (0);
+ return (query_error | print_error);
}
diff --git a/contrib/bind9/bin/dnssec/Makefile.in b/contrib/bind9/bin/dnssec/Makefile.in
index 6bfd162..0bca141 100644
--- a/contrib/bind9/bin/dnssec/Makefile.in
+++ b/contrib/bind9/bin/dnssec/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2005, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2005, 2007-2009, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000-2002 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/bin/dnssec/dnssec-dsfromkey.8 b/contrib/bind9/bin/dnssec/dnssec-dsfromkey.8
index 437aa37..ae9bb54 100644
--- a/contrib/bind9/bin/dnssec/dnssec-dsfromkey.8
+++ b/contrib/bind9/bin/dnssec/dnssec-dsfromkey.8
@@ -1,4 +1,4 @@
-.\" Copyright (C) 2008-2010 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2008-2010, 2012 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" Permission to use, copy, modify, and/or distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
@@ -55,7 +55,7 @@ Use SHA\-256 as the digest algorithm.
.RS 4
Select the digest algorithm. The value of
\fBalgorithm\fR
-must be one of SHA\-1 (SHA1), SHA\-256 (SHA256) or GOST. These values are case insensitive.
+must be one of SHA\-1 (SHA1), SHA\-256 (SHA256), GOST or SHA\-384 (SHA384). These values are case insensitive.
.RE
.PP
\-K \fIdirectory\fR
@@ -139,5 +139,5 @@ RFC 4509.
.PP
Internet Systems Consortium
.SH "COPYRIGHT"
-Copyright \(co 2008\-2010 Internet Systems Consortium, Inc. ("ISC")
+Copyright \(co 2008\-2010, 2012 Internet Systems Consortium, Inc. ("ISC")
.br
diff --git a/contrib/bind9/bin/dnssec/dnssec-dsfromkey.c b/contrib/bind9/bin/dnssec/dnssec-dsfromkey.c
index c4b157c..93d789b 100644
--- a/contrib/bind9/bin/dnssec/dnssec-dsfromkey.c
+++ b/contrib/bind9/bin/dnssec/dnssec-dsfromkey.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2011 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2008-2012 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -296,7 +296,7 @@ usage(void) {
fprintf(stderr, " -K <directory>: directory in which to find "
"key file or keyset file\n");
fprintf(stderr, " -a algorithm: digest algorithm "
- "(SHA-1, SHA-256 or GOST)\n");
+ "(SHA-1, SHA-256, GOST or SHA-384)\n");
fprintf(stderr, " -1: use SHA-1\n");
fprintf(stderr, " -2: use SHA-256\n");
fprintf(stderr, " -l: add lookaside zone and print DLV records\n");
@@ -415,6 +415,9 @@ main(int argc, char **argv) {
else if (strcasecmp(algname, "GOST") == 0)
dtype = DNS_DSDIGEST_GOST;
#endif
+ else if (strcasecmp(algname, "SHA384") == 0 ||
+ strcasecmp(algname, "SHA-384") == 0)
+ dtype = DNS_DSDIGEST_SHA384;
else
fatal("unknown algorithm %s", algname);
}
diff --git a/contrib/bind9/bin/dnssec/dnssec-dsfromkey.docbook b/contrib/bind9/bin/dnssec/dnssec-dsfromkey.docbook
index d139ba5..d705033 100644
--- a/contrib/bind9/bin/dnssec/dnssec-dsfromkey.docbook
+++ b/contrib/bind9/bin/dnssec/dnssec-dsfromkey.docbook
@@ -2,7 +2,7 @@
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2008-2010 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2008-2010, 2012 Internet Systems Consortium, Inc. ("ISC")
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -39,6 +39,7 @@
<year>2008</year>
<year>2009</year>
<year>2010</year>
+ <year>2012</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
@@ -107,7 +108,8 @@
<para>
Select the digest algorithm. The value of
<option>algorithm</option> must be one of SHA-1 (SHA1),
- SHA-256 (SHA256) or GOST. These values are case insensitive.
+ SHA-256 (SHA256), GOST or SHA-384 (SHA384).
+ These values are case insensitive.
</para>
</listitem>
</varlistentry>
diff --git a/contrib/bind9/bin/dnssec/dnssec-dsfromkey.html b/contrib/bind9/bin/dnssec/dnssec-dsfromkey.html
index 3031c39..24bc0c1 100644
--- a/contrib/bind9/bin/dnssec/dnssec-dsfromkey.html
+++ b/contrib/bind9/bin/dnssec/dnssec-dsfromkey.html
@@ -1,5 +1,5 @@
<!--
- - Copyright (C) 2008-2010 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2008-2010, 2012 Internet Systems Consortium, Inc. ("ISC")
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -32,14 +32,14 @@
<div class="cmdsynopsis"><p><code class="command">dnssec-dsfromkey</code> {-s} [<code class="option">-1</code>] [<code class="option">-2</code>] [<code class="option">-a <em class="replaceable"><code>alg</code></em></code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-l <em class="replaceable"><code>domain</code></em></code>] [<code class="option">-s</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-f <em class="replaceable"><code>file</code></em></code>] [<code class="option">-A</code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] {dnsname}</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2543465"></a><h2>DESCRIPTION</h2>
+<a name="id2543468"></a><h2>DESCRIPTION</h2>
<p><span><strong class="command">dnssec-dsfromkey</strong></span>
outputs the Delegation Signer (DS) resource record (RR), as defined in
RFC 3658 and RFC 4509, for the given key(s).
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2543477"></a><h2>OPTIONS</h2>
+<a name="id2543480"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-1</span></dt>
<dd><p>
@@ -54,7 +54,8 @@
<dd><p>
Select the digest algorithm. The value of
<code class="option">algorithm</code> must be one of SHA-1 (SHA1),
- SHA-256 (SHA256) or GOST. These values are case insensitive.
+ SHA-256 (SHA256), GOST or SHA-384 (SHA384).
+ These values are case insensitive.
</p></dd>
<dt><span class="term">-K <em class="replaceable"><code>directory</code></em></span></dt>
<dd><p>
@@ -100,7 +101,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2543664"></a><h2>EXAMPLE</h2>
+<a name="id2543667"></a><h2>EXAMPLE</h2>
<p>
To build the SHA-256 DS RR from the
<strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
@@ -115,7 +116,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2543693"></a><h2>FILES</h2>
+<a name="id2543697"></a><h2>FILES</h2>
<p>
The keyfile can be designed by the key identification
<code class="filename">Knnnn.+aaa+iiiii</code> or the full file name
@@ -129,13 +130,13 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2543729"></a><h2>CAVEAT</h2>
+<a name="id2543732"></a><h2>CAVEAT</h2>
<p>
A keyfile error can give a "file not found" even if the file exists.
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2543738"></a><h2>SEE ALSO</h2>
+<a name="id2543741"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
@@ -145,7 +146,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2543778"></a><h2>AUTHOR</h2>
+<a name="id2543781"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8 b/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8
index e3bb48f..9867ff7e 100644
--- a/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8
+++ b/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8
@@ -1,4 +1,4 @@
-.\" Copyright (C) 2008-2011 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2008-2012 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" Permission to use, copy, modify, and/or distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
@@ -47,7 +47,7 @@ of the key is specified on the command line. This must match the name of the zon
.RS 4
Selects the cryptographic algorithm. The value of
\fBalgorithm\fR
-must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512 or ECCGOST. These values are case insensitive.
+must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST, ECDSAP256SHA256 or ECDSAP384SHA384. These values are case insensitive.
.sp
If no algorithm is specified, then RSASHA1 will be used by default, unless the
\fB\-3\fR
@@ -215,5 +215,5 @@ RFC 4034.
.PP
Internet Systems Consortium
.SH "COPYRIGHT"
-Copyright \(co 2008\-2011 Internet Systems Consortium, Inc. ("ISC")
+Copyright \(co 2008\-2012 Internet Systems Consortium, Inc. ("ISC")
.br
diff --git a/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c b/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c
index 6a07146..e91e02d 100644
--- a/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c
+++ b/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007-2011 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2007-2012 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -55,7 +55,8 @@ int verbose;
static const char *algs = "RSA | RSAMD5 | DH | DSA | RSASHA1 |"
" NSEC3DSA | NSEC3RSASHA1 |"
- " RSASHA256 | RSASHA512 | ECCGOST";
+ " RSASHA256 | RSASHA512 | ECCGOST |"
+ " ECDSAP256SHA256 | ECDSAP384SHA384";
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
@@ -369,7 +370,8 @@ main(int argc, char **argv) {
if (use_nsec3 &&
alg != DST_ALG_NSEC3DSA && alg != DST_ALG_NSEC3RSASHA1 &&
alg != DST_ALG_RSASHA256 && alg != DST_ALG_RSASHA512 &&
- alg != DST_ALG_ECCGOST) {
+ alg != DST_ALG_ECCGOST &&
+ alg != DST_ALG_ECDSA256 && alg != DST_ALG_ECDSA384) {
fatal("%s is incompatible with NSEC3; "
"do not use the -3 option", algname);
}
diff --git a/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook b/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook
index 5f3e0e6..4662e87 100644
--- a/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook
+++ b/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook
@@ -2,7 +2,7 @@
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2008-2011 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2008-2012 Internet Systems Consortium, Inc. ("ISC")
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -40,6 +40,7 @@
<year>2009</year>
<year>2010</year>
<year>2011</year>
+ <year>2012</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
@@ -94,7 +95,8 @@
<para>
Selects the cryptographic algorithm. The value of
<option>algorithm</option> must be one of RSAMD5, RSASHA1,
- DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512 or ECCGOST.
+ DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
+ ECDSAP256SHA256 or ECDSAP384SHA384.
These values are case insensitive.
</para>
<para>
diff --git a/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.html b/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.html
index f2c72c5..0fa3aff 100644
--- a/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.html
+++ b/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.html
@@ -1,5 +1,5 @@
<!--
- - Copyright (C) 2008-2011 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2008-2012 Internet Systems Consortium, Inc. ("ISC")
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -31,7 +31,7 @@
<div class="cmdsynopsis"><p><code class="command">dnssec-keyfromlabel</code> {-l <em class="replaceable"><code>label</code></em>} [<code class="option">-3</code>] [<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>] [<code class="option">-A <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-D <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-E <em class="replaceable"><code>engine</code></em></code>] [<code class="option">-f <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-G</code>] [<code class="option">-I <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-k</code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>] [<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>] [<code class="option">-R <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-y</code>] {name}</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2543495"></a><h2>DESCRIPTION</h2>
+<a name="id2543498"></a><h2>DESCRIPTION</h2>
<p><span><strong class="command">dnssec-keyfromlabel</strong></span>
gets keys with the given label from a crypto hardware and builds
key files for DNSSEC (Secure DNS), as defined in RFC 2535
@@ -44,14 +44,15 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2543513"></a><h2>OPTIONS</h2>
+<a name="id2543516"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
<dd>
<p>
Selects the cryptographic algorithm. The value of
<code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
- DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512 or ECCGOST.
+ DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
+ ECDSAP256SHA256 or ECDSAP384SHA384.
These values are case insensitive.
</p>
<p>
@@ -163,7 +164,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2543877"></a><h2>TIMING OPTIONS</h2>
+<a name="id2543880"></a><h2>TIMING OPTIONS</h2>
<p>
Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS.
If the argument begins with a '+' or '-', it is interpreted as
@@ -210,7 +211,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2544043"></a><h2>GENERATED KEY FILES</h2>
+<a name="id2544046"></a><h2>GENERATED KEY FILES</h2>
<p>
When <span><strong class="command">dnssec-keyfromlabel</strong></span> completes
successfully,
@@ -249,7 +250,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2544116"></a><h2>SEE ALSO</h2>
+<a name="id2544119"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
@@ -257,7 +258,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2544149"></a><h2>AUTHOR</h2>
+<a name="id2544152"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/bin/dnssec/dnssec-keygen.8 b/contrib/bind9/bin/dnssec/dnssec-keygen.8
index 690abf9..689f23d 100644
--- a/contrib/bind9/bin/dnssec/dnssec-keygen.8
+++ b/contrib/bind9/bin/dnssec/dnssec-keygen.8
@@ -1,4 +1,4 @@
-.\" Copyright (C) 2004, 2005, 2007-2010 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2004, 2005, 2007-2010, 2012 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-2003 Internet Software Consortium.
.\"
.\" Permission to use, copy, modify, and/or distribute this software for any
@@ -48,7 +48,7 @@ of the key is specified on the command line. For DNSSEC keys, this must match th
.RS 4
Selects the cryptographic algorithm. For DNSSEC keys, the value of
\fBalgorithm\fR
-must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512 or ECCGOST. For TSIG/TKEY, the value must be DH (Diffie Hellman), HMAC\-MD5, HMAC\-SHA1, HMAC\-SHA224, HMAC\-SHA256, HMAC\-SHA384, or HMAC\-SHA512. These values are case insensitive.
+must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST, ECDSAP256SHA256 or ECDSAP384SHA384. For TSIG/TKEY, the value must be DH (Diffie Hellman), HMAC\-MD5, HMAC\-SHA1, HMAC\-SHA224, HMAC\-SHA256, HMAC\-SHA384, or HMAC\-SHA512. These values are case insensitive.
.sp
If no algorithm is specified, then RSASHA1 will be used by default, unless the
\fB\-3\fR
@@ -63,7 +63,7 @@ Note 2: DH, HMAC\-MD5, and HMAC\-SHA1 through HMAC\-SHA512 automatically set the
.PP
\-b \fIkeysize\fR
.RS 4
-Specifies the number of bits in the key. The choice of key size depends on the algorithm used. RSA keys must be between 512 and 2048 bits. Diffie Hellman keys must be between 128 and 4096 bits. DSA keys must be between 512 and 1024 bits and an exact multiple of 64. HMAC keys must be between 1 and 512 bits.
+Specifies the number of bits in the key. The choice of key size depends on the algorithm used. RSA keys must be between 512 and 2048 bits. Diffie Hellman keys must be between 128 and 4096 bits. DSA keys must be between 512 and 1024 bits and an exact multiple of 64. HMAC keys must be between 1 and 512 bits. Elliptic curve algorithms don't need this parameter.
.sp
The key size does not need to be specified if using a default algorithm. The default key size is 1024 bits for zone signing keys (ZSK's) and 2048 bits for key signing keys (KSK's, generated with
\fB\-f KSK\fR). However, if an algorithm is explicitly specified with the
@@ -81,7 +81,7 @@ must either be ZONE (for a DNSSEC zone key (KEY/DNSKEY)), HOST or ENTITY (for a
.PP
\-3
.RS 4
-Use an NSEC3\-capable algorithm to generate a DNSSEC key. If this option is used and no algorithm is explicitly set on the command line, NSEC3RSASHA1 will be used by default. Note that RSASHA256, RSASHA512 and ECCGOST algorithms are NSEC3\-capable.
+Use an NSEC3\-capable algorithm to generate a DNSSEC key. If this option is used and no algorithm is explicitly set on the command line, NSEC3RSASHA1 will be used by default. Note that RSASHA256, RSASHA512, ECCGOST, ECDSAP256SHA256 and ECDSAP384SHA384 algorithms are NSEC3\-capable.
.RE
.PP
\-C
@@ -298,7 +298,7 @@ RFC 4034.
.PP
Internet Systems Consortium
.SH "COPYRIGHT"
-Copyright \(co 2004, 2005, 2007\-2010 Internet Systems Consortium, Inc. ("ISC")
+Copyright \(co 2004, 2005, 2007\-2010, 2012 Internet Systems Consortium, Inc. ("ISC")
.br
Copyright \(co 2000\-2003 Internet Software Consortium.
.br
diff --git a/contrib/bind9/bin/dnssec/dnssec-keygen.c b/contrib/bind9/bin/dnssec/dnssec-keygen.c
index cc1d9b1..8af100c 100644
--- a/contrib/bind9/bin/dnssec/dnssec-keygen.c
+++ b/contrib/bind9/bin/dnssec/dnssec-keygen.c
@@ -1,5 +1,5 @@
/*
- * Portions Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -85,6 +85,7 @@ usage(void) {
fprintf(stderr, " RSA | RSAMD5 | DSA | RSASHA1 | NSEC3RSASHA1"
" | NSEC3DSA |\n");
fprintf(stderr, " RSASHA256 | RSASHA512 | ECCGOST |\n");
+ fprintf(stderr, " ECDSAP256SHA256 | ECDSAP384SHA384 |\n");
fprintf(stderr, " DH | HMAC-MD5 | HMAC-SHA1 | HMAC-SHA224 | "
"HMAC-SHA256 | \n");
fprintf(stderr, " HMAC-SHA384 | HMAC-SHA512\n");
@@ -102,6 +103,8 @@ usage(void) {
fprintf(stderr, " NSEC3DSA:\t[512..1024] and divisible "
"by 64\n");
fprintf(stderr, " ECCGOST:\tignored\n");
+ fprintf(stderr, " ECDSAP256SHA256:\tignored\n");
+ fprintf(stderr, " ECDSAP384SHA384:\tignored\n");
fprintf(stderr, " HMAC-MD5:\t[1..512]\n");
fprintf(stderr, " HMAC-SHA1:\t[1..160]\n");
fprintf(stderr, " HMAC-SHA224:\t[1..224]\n");
@@ -549,7 +552,8 @@ main(int argc, char **argv) {
if (use_nsec3 &&
alg != DST_ALG_NSEC3DSA && alg != DST_ALG_NSEC3RSASHA1 &&
alg != DST_ALG_RSASHA256 && alg!= DST_ALG_RSASHA512 &&
- alg != DST_ALG_ECCGOST) {
+ alg != DST_ALG_ECCGOST &&
+ alg != DST_ALG_ECDSA256 && alg != DST_ALG_ECDSA384) {
fatal("%s is incompatible with NSEC3; "
"do not use the -3 option", algname);
}
@@ -579,9 +583,11 @@ main(int argc, char **argv) {
size = 1024;
if (verbose > 0)
fprintf(stderr, "key size not "
- "specified; defaulting "
- "to %d\n", size);
- } else if (alg != DST_ALG_ECCGOST)
+ "specified; defaulting"
+ " to %d\n", size);
+ } else if (alg != DST_ALG_ECCGOST &&
+ alg != DST_ALG_ECDSA256 &&
+ alg != DST_ALG_ECDSA384)
fatal("key size not specified (-b option)");
}
@@ -710,6 +716,8 @@ main(int argc, char **argv) {
fatal("invalid DSS key size: %d", size);
break;
case DST_ALG_ECCGOST:
+ case DST_ALG_ECDSA256:
+ case DST_ALG_ECDSA384:
break;
case DST_ALG_HMACMD5:
options |= DST_TYPE_KEY;
@@ -775,7 +783,8 @@ main(int argc, char **argv) {
if (!(alg == DNS_KEYALG_RSAMD5 || alg == DNS_KEYALG_RSASHA1 ||
alg == DNS_KEYALG_NSEC3RSASHA1 || alg == DNS_KEYALG_RSASHA256 ||
- alg == DNS_KEYALG_RSASHA512 || alg == DST_ALG_ECCGOST) &&
+ alg == DNS_KEYALG_RSASHA512 || alg == DST_ALG_ECCGOST ||
+ alg == DST_ALG_ECDSA256 || alg == DST_ALG_ECDSA384) &&
rsa_exp != 0)
fatal("specified RSA exponent for a non-RSA key");
@@ -849,6 +858,8 @@ main(int argc, char **argv) {
case DNS_KEYALG_DSA:
case DNS_KEYALG_NSEC3DSA:
case DST_ALG_ECCGOST:
+ case DST_ALG_ECDSA256:
+ case DST_ALG_ECDSA384:
show_progress = ISC_TRUE;
/* fall through */
diff --git a/contrib/bind9/bin/dnssec/dnssec-keygen.docbook b/contrib/bind9/bin/dnssec/dnssec-keygen.docbook
index f0cf7f5..0a1926b 100644
--- a/contrib/bind9/bin/dnssec/dnssec-keygen.docbook
+++ b/contrib/bind9/bin/dnssec/dnssec-keygen.docbook
@@ -2,7 +2,7 @@
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2004, 2005, 2007-2010 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2004, 2005, 2007-2010, 2012 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2003 Internet Software Consortium.
-
- Permission to use, copy, modify, and/or distribute this software for any
@@ -43,6 +43,7 @@
<year>2008</year>
<year>2009</year>
<year>2010</year>
+ <year>2012</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
@@ -114,7 +115,8 @@
<para>
Selects the cryptographic algorithm. For DNSSEC keys, the value
of <option>algorithm</option> must be one of RSAMD5, RSASHA1,
- DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512 or ECCGOST.
+ DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
+ ECDSAP256SHA256 or ECDSAP384SHA384.
For TSIG/TKEY, the value must
be DH (Diffie Hellman), HMAC-MD5, HMAC-SHA1, HMAC-SHA224,
HMAC-SHA256, HMAC-SHA384, or HMAC-SHA512. These values are
@@ -148,7 +150,8 @@
between 512 and 2048 bits. Diffie Hellman keys must be between
128 and 4096 bits. DSA keys must be between 512 and 1024
bits and an exact multiple of 64. HMAC keys must be
- between 1 and 512 bits.
+ between 1 and 512 bits. Elliptic curve algorithms don't need
+ this parameter.
</para>
<para>
The key size does not need to be specified if using a default
@@ -184,7 +187,8 @@
Use an NSEC3-capable algorithm to generate a DNSSEC key.
If this option is used and no algorithm is explicitly
set on the command line, NSEC3RSASHA1 will be used by
- default. Note that RSASHA256, RSASHA512 and ECCGOST algorithms
+ default. Note that RSASHA256, RSASHA512, ECCGOST,
+ ECDSAP256SHA256 and ECDSAP384SHA384 algorithms
are NSEC3-capable.
</para>
</listitem>
diff --git a/contrib/bind9/bin/dnssec/dnssec-keygen.html b/contrib/bind9/bin/dnssec/dnssec-keygen.html
index 4bf1f6b..3bdfa07 100644
--- a/contrib/bind9/bin/dnssec/dnssec-keygen.html
+++ b/contrib/bind9/bin/dnssec/dnssec-keygen.html
@@ -1,5 +1,5 @@
<!--
- - Copyright (C) 2004, 2005, 2007-2010 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2004, 2005, 2007-2010, 2012 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2003 Internet Software Consortium.
-
- Permission to use, copy, modify, and/or distribute this software for any
@@ -32,7 +32,7 @@
<div class="cmdsynopsis"><p><code class="command">dnssec-keygen</code> [<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>] [<code class="option">-b <em class="replaceable"><code>keysize</code></em></code>] [<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>] [<code class="option">-3</code>] [<code class="option">-A <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-C</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-D <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-E <em class="replaceable"><code>engine</code></em></code>] [<code class="option">-e</code>] [<code class="option">-f <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-G</code>] [<code class="option">-g <em class="replaceable"><code>generator</code></em></code>] [<code class="option">-h</code>] [<code class="option">-I <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-i <em class="replaceable"><code>interval</code></em></code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-k</code>] [<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>] [<code class="option">-q</code>] [<code class="option">-R <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-S <em class="replaceable"><code>key</code></em></code>] [<code class="option">-s <em class="replaceable"><code>strength</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-z</code>] {name}</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2543579"></a><h2>DESCRIPTION</h2>
+<a name="id2543582"></a><h2>DESCRIPTION</h2>
<p><span><strong class="command">dnssec-keygen</strong></span>
generates keys for DNSSEC (Secure DNS), as defined in RFC 2535
and RFC 4034. It can also generate keys for use with
@@ -46,14 +46,15 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2543597"></a><h2>OPTIONS</h2>
+<a name="id2543601"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
<dd>
<p>
Selects the cryptographic algorithm. For DNSSEC keys, the value
of <code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
- DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512 or ECCGOST.
+ DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
+ ECDSAP256SHA256 or ECDSAP384SHA384.
For TSIG/TKEY, the value must
be DH (Diffie Hellman), HMAC-MD5, HMAC-SHA1, HMAC-SHA224,
HMAC-SHA256, HMAC-SHA384, or HMAC-SHA512. These values are
@@ -84,7 +85,8 @@
between 512 and 2048 bits. Diffie Hellman keys must be between
128 and 4096 bits. DSA keys must be between 512 and 1024
bits and an exact multiple of 64. HMAC keys must be
- between 1 and 512 bits.
+ between 1 and 512 bits. Elliptic curve algorithms don't need
+ this parameter.
</p>
<p>
The key size does not need to be specified if using a default
@@ -111,7 +113,8 @@
Use an NSEC3-capable algorithm to generate a DNSSEC key.
If this option is used and no algorithm is explicitly
set on the command line, NSEC3RSASHA1 will be used by
- default. Note that RSASHA256, RSASHA512 and ECCGOST algorithms
+ default. Note that RSASHA256, RSASHA512, ECCGOST,
+ ECDSAP256SHA256 and ECDSAP384SHA384 algorithms
are NSEC3-capable.
</p></dd>
<dt><span class="term">-C</span></dt>
@@ -248,7 +251,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2544166"></a><h2>TIMING OPTIONS</h2>
+<a name="id2544169"></a><h2>TIMING OPTIONS</h2>
<p>
Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS.
If the argument begins with a '+' or '-', it is interpreted as
@@ -319,7 +322,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2544356"></a><h2>GENERATED KEYS</h2>
+<a name="id2544359"></a><h2>GENERATED KEYS</h2>
<p>
When <span><strong class="command">dnssec-keygen</strong></span> completes
successfully,
@@ -365,7 +368,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2544506"></a><h2>EXAMPLE</h2>
+<a name="id2544441"></a><h2>EXAMPLE</h2>
<p>
To generate a 768-bit DSA key for the domain
<strong class="userinput"><code>example.com</code></strong>, the following command would be
@@ -386,7 +389,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2544550"></a><h2>SEE ALSO</h2>
+<a name="id2544485"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
<em class="citetitle">RFC 2539</em>,
@@ -395,7 +398,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2544581"></a><h2>AUTHOR</h2>
+<a name="id2544584"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/bin/dnssec/dnssec-settime.c b/contrib/bind9/bin/dnssec/dnssec-settime.c
index 7a81490..f7f4486 100644
--- a/contrib/bind9/bin/dnssec/dnssec-settime.c
+++ b/contrib/bind9/bin/dnssec/dnssec-settime.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009-2011 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2009-2012 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -38,6 +38,7 @@
#include <dns/keyvalues.h>
#include <dns/result.h>
+#include <dns/log.h>
#include <dst/dst.h>
@@ -151,6 +152,7 @@ main(int argc, char **argv) {
isc_boolean_t force = ISC_FALSE;
isc_boolean_t epoch = ISC_FALSE;
isc_boolean_t changed = ISC_FALSE;
+ isc_log_t *log = NULL;
if (argc == 1)
usage();
@@ -159,6 +161,8 @@ main(int argc, char **argv) {
if (result != ISC_R_SUCCESS)
fatal("Out of memory");
+ setup_logging(verbose, mctx, &log);
+
dns_result_register();
isc_commandline_errprint = ISC_FALSE;
@@ -578,6 +582,7 @@ main(int argc, char **argv) {
cleanup_entropy(&ectx);
if (verbose > 10)
isc_mem_stats(mctx, stdout);
+ cleanup_logging(&log);
isc_mem_free(mctx, directory);
isc_mem_destroy(&mctx);
diff --git a/contrib/bind9/bin/dnssec/dnssec-signzone.c b/contrib/bind9/bin/dnssec/dnssec-signzone.c
index 953e2b0..2376249 100644
--- a/contrib/bind9/bin/dnssec/dnssec-signzone.c
+++ b/contrib/bind9/bin/dnssec/dnssec-signzone.c
@@ -3893,7 +3893,10 @@ main(int argc, char *argv[]) {
check_result(result, "isc_file_mktemplate");
fp = NULL;
- result = isc_file_openunique(tempfile, &fp);
+ if (outputformat == dns_masterformat_text)
+ result = isc_file_openunique(tempfile, &fp);
+ else
+ result = isc_file_bopenunique(tempfile, &fp);
if (result != ISC_R_SUCCESS)
fatal("failed to open temporary output file: %s",
isc_result_totext(result));
diff --git a/contrib/bind9/bin/named/Makefile.in b/contrib/bind9/bin/named/Makefile.in
index 272cf96..ea919ae 100644
--- a/contrib/bind9/bin/named/Makefile.in
+++ b/contrib/bind9/bin/named/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2002 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/bin/named/builtin.c b/contrib/bind9/bin/named/builtin.c
index 754e73d..14204cd 100644
--- a/contrib/bind9/bin/named/builtin.c
+++ b/contrib/bind9/bin/named/builtin.c
@@ -99,9 +99,9 @@ static size_t
dns64_rdata(unsigned char *v, size_t start, unsigned char *rdata) {
size_t i, j = 0;
- for (i = 0; i < 4; i++) {
+ for (i = 0; i < 4U; i++) {
unsigned char c = v[start++];
- if (start == 7)
+ if (start == 7U)
start++;
if (c > 99) {
rdata[j++] = 3;
@@ -164,7 +164,7 @@ dns64_cname(const dns_name_t *zone, const dns_name_t *name,
i = (nlen % 4) == 2U ? 1 : 0;
j = nlen;
memset(v, 0, sizeof(v));
- while (j != 0) {
+ while (j != 0U) {
INSIST((i/2) < sizeof(v));
if (ndata[0] != 1)
return (ISC_R_NOTFOUND);
diff --git a/contrib/bind9/bin/named/config.c b/contrib/bind9/bin/named/config.c
index f5e93e4..9e453ad 100644
--- a/contrib/bind9/bin/named/config.c
+++ b/contrib/bind9/bin/named/config.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -89,7 +89,7 @@ options {\n\
#endif
"\
recursive-clients 1000;\n\
- resolver-query-timeout 30;\n\
+ resolver-query-timeout 10;\n\
rrset-order {type NS order random; order cyclic; };\n\
serial-queries 20;\n\
serial-query-rate 20;\n\
diff --git a/contrib/bind9/bin/named/controlconf.c b/contrib/bind9/bin/named/controlconf.c
index 926c205..daf00d0 100644
--- a/contrib/bind9/bin/named/controlconf.c
+++ b/contrib/bind9/bin/named/controlconf.c
@@ -373,8 +373,10 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
if (result == ISC_R_SUCCESS)
break;
isc_mem_put(listener->mctx, secret.rstart, REGION_SIZE(secret));
- log_invalid(&conn->ccmsg, result);
- goto cleanup;
+ if (result != ISCCC_R_BADAUTH) {
+ log_invalid(&conn->ccmsg, result);
+ goto cleanup;
+ }
}
if (key == NULL) {
diff --git a/contrib/bind9/bin/named/convertxsl.pl b/contrib/bind9/bin/named/convertxsl.pl
index 87550b3..f355368 100755
--- a/contrib/bind9/bin/named/convertxsl.pl
+++ b/contrib/bind9/bin/named/convertxsl.pl
@@ -1,6 +1,6 @@
#!/usr/bin/env perl
#
-# Copyright (C) 2006-2008 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2006-2008, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/bin/named/query.c b/contrib/bind9/bin/named/query.c
index 10a7d6d..9e67f2d 100644
--- a/contrib/bind9/bin/named/query.c
+++ b/contrib/bind9/bin/named/query.c
@@ -25,6 +25,7 @@
#include <isc/hex.h>
#include <isc/mem.h>
+#include <isc/serial.h>
#include <isc/stats.h>
#include <isc/util.h>
@@ -2775,11 +2776,12 @@ query_add_cname(ns_client_t *client, dns_name_t *qname, dns_name_t *tname,
*/
static void
mark_secure(ns_client_t *client, dns_db_t *db, dns_name_t *name,
- isc_uint32_t ttl, dns_rdataset_t *rdataset,
+ dns_rdata_rrsig_t *rrsig, dns_rdataset_t *rdataset,
dns_rdataset_t *sigrdataset)
{
isc_result_t result;
dns_dbnode_t *node = NULL;
+ isc_stdtime_t now;
rdataset->trust = dns_trust_secure;
sigrdataset->trust = dns_trust_secure;
@@ -2790,17 +2792,10 @@ mark_secure(ns_client_t *client, dns_db_t *db, dns_name_t *name,
result = dns_db_findnode(db, name, ISC_TRUE, &node);
if (result != ISC_R_SUCCESS)
return;
- /*
- * Bound the validated ttls then minimise.
- */
- if (sigrdataset->ttl > ttl)
- sigrdataset->ttl = ttl;
- if (rdataset->ttl > ttl)
- rdataset->ttl = ttl;
- if (rdataset->ttl > sigrdataset->ttl)
- rdataset->ttl = sigrdataset->ttl;
- else
- sigrdataset->ttl = rdataset->ttl;
+
+ isc_stdtime_get(&now);
+ dns_rdataset_trimttl(rdataset, sigrdataset, rrsig, now,
+ client->view->acceptexpired);
(void)dns_db_addrdataset(db, node, NULL, client->now, rdataset,
0, NULL);
@@ -2925,8 +2920,7 @@ validate(ns_client_t *client, dns_db_t *db, dns_name_t *name,
client->view->acceptexpired)) {
dst_key_free(&key);
dns_rdataset_disassociate(&keyrdataset);
- mark_secure(client, db, name,
- rrsig.originalttl,
+ mark_secure(client, db, name, &rrsig,
rdataset, sigrdataset);
return (ISC_TRUE);
}
@@ -3802,6 +3796,13 @@ rpz_clean(dns_zone_t **zonep, dns_db_t **dbp, dns_dbnode_t **nodep,
dns_rdataset_disassociate(*rdatasetp);
}
+static void
+rpz_match_clear(dns_rpz_st_t *st)
+{
+ rpz_clean(&st->m.zone, &st->m.db, &st->m.node, &st->m.rdataset);
+ st->m.version = NULL;
+}
+
static inline isc_result_t
rpz_ready(ns_client_t *client, dns_zone_t **zonep, dns_db_t **dbp,
dns_dbnode_t **nodep, dns_rdataset_t **rdatasetp)
@@ -3821,10 +3822,9 @@ static void
rpz_st_clear(ns_client_t *client) {
dns_rpz_st_t *st = client->query.rpz_st;
- rpz_clean(&st->m.zone, &st->m.db, &st->m.node, NULL);
- st->m.version = NULL;
if (st->m.rdataset != NULL)
query_putrdataset(client, &st->m.rdataset);
+ rpz_match_clear(st);
rpz_clean(NULL, &st->r.db, NULL, NULL);
if (st->r.ns_rdataset != NULL)
@@ -3974,6 +3974,9 @@ rpz_rewrite_ip(ns_client_t *client, dns_rdataset_t *rdataset,
for (rpz = ISC_LIST_HEAD(client->view->rpz_zones);
rpz != NULL;
rpz = ISC_LIST_NEXT(rpz, link)) {
+ if (!RECURSIONOK(client) && rpz->recursive_only)
+ continue;
+
/*
* Do not check policy zones that cannot replace a policy
* already known to match.
@@ -4002,9 +4005,8 @@ rpz_rewrite_ip(ns_client_t *client, dns_rdataset_t *rdataset,
* hit, if any. Note the domain name and quality of the
* best hit.
*/
- (void)dns_db_rpz_findips(rpz, rpz_type, zone, db, version,
- rdataset, st,
- client->query.rpz_st->qname);
+ dns_db_rpz_findips(rpz, rpz_type, zone, db, version,
+ rdataset, st, client->query.rpz_st->qname);
rpz_clean(&zone, &db, NULL, NULL);
}
return (ISC_R_SUCCESS);
@@ -4109,8 +4111,8 @@ rpz_rewrite_rrsets(ns_client_t *client, dns_rpz_type_t rpz_type,
*/
static isc_result_t
rpz_find(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qnamef,
- dns_name_t *sname, dns_rpz_type_t rpz_type, dns_zone_t **zonep,
- dns_db_t **dbp, dns_dbversion_t **versionp,
+ dns_name_t *sname, dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type,
+ dns_zone_t **zonep, dns_db_t **dbp, dns_dbversion_t **versionp,
dns_dbnode_t **nodep, dns_rdataset_t **rdatasetp,
dns_rpz_policy_t *policyp)
{
@@ -4149,7 +4151,7 @@ rpz_find(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qnamef,
if (result != ISC_R_SUCCESS) {
dns_db_detachnode(*dbp, nodep);
rpz_log_fail(client, DNS_RPZ_ERROR_LEVEL, rpz_type,
- qnamef, "allrdatasets()", result);
+ qnamef, "allrdatasets() ", result);
*policyp = DNS_RPZ_POLICY_ERROR;
return (DNS_R_SERVFAIL);
}
@@ -4166,7 +4168,7 @@ rpz_find(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qnamef,
if (result != ISC_R_SUCCESS) {
if (result != ISC_R_NOMORE) {
rpz_log_fail(client, DNS_RPZ_ERROR_LEVEL,
- rpz_type, qnamef, "rdatasetiter",
+ rpz_type, qnamef, "rdatasetiter ",
result);
*policyp = DNS_RPZ_POLICY_ERROR;
return (DNS_R_SERVFAIL);
@@ -4194,7 +4196,7 @@ rpz_find(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qnamef,
if ((*rdatasetp)->type != dns_rdatatype_cname) {
policy = DNS_RPZ_POLICY_RECORD;
} else {
- policy = dns_rpz_decode_cname(*rdatasetp, sname);
+ policy = dns_rpz_decode_cname(rpz, *rdatasetp, sname);
if ((policy == DNS_RPZ_POLICY_RECORD ||
policy == DNS_RPZ_POLICY_WILDCNAME) &&
qtype != dns_rdatatype_cname &&
@@ -4265,6 +4267,9 @@ rpz_rewrite_name(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qname,
for (rpz = ISC_LIST_HEAD(client->view->rpz_zones);
rpz != NULL;
rpz = ISC_LIST_NEXT(rpz, link)) {
+ if (!RECURSIONOK(client) && rpz->recursive_only)
+ continue;
+
/*
* Do not check policy zones that cannot replace a policy
* already known to match.
@@ -4310,11 +4315,11 @@ rpz_rewrite_name(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qname,
}
/*
- * See if the policy record exists.
+ * See if the policy record exists and get its policy.
*/
- result = rpz_find(client, qtype, rpz_qname, qname, rpz_type,
- &zone, &db, &version, &node, rdatasetp,
- &policy);
+ result = rpz_find(client, qtype, rpz_qname, qname, rpz,
+ rpz_type, &zone, &db, &version, &node,
+ rdatasetp, &policy);
switch (result) {
case DNS_R_NXDOMAIN:
case DNS_R_EMPTYNAME:
@@ -4350,8 +4355,7 @@ rpz_rewrite_name(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qname,
continue;
}
- rpz_clean(&st->m.zone, &st->m.db, &st->m.node,
- &st->m.rdataset);
+ rpz_match_clear(st);
st->m.rpz = rpz;
st->m.type = rpz_type;
st->m.prefix = 0;
@@ -4365,9 +4369,11 @@ rpz_rewrite_name(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qname,
trdataset = st->m.rdataset;
st->m.rdataset = *rdatasetp;
*rdatasetp = trdataset;
- st->m.ttl = st->m.rdataset->ttl;
+ st->m.ttl = ISC_MIN(st->m.rdataset->ttl,
+ rpz->max_policy_ttl);
} else {
- st->m.ttl = DNS_RPZ_TTL_DEFAULT;
+ st->m.ttl = ISC_MIN(DNS_RPZ_TTL_DEFAULT,
+ rpz->max_policy_ttl);
}
st->m.node = node;
node = NULL;
@@ -4462,13 +4468,13 @@ rpz_rewrite(ns_client_t *client, dns_rdatatype_t qtype, isc_result_t qresult,
case DNS_R_BROKENCHAIN:
rpz_log_fail(client, DNS_RPZ_DEBUG_LEVEL3, DNS_RPZ_TYPE_QNAME,
client->query.qname,
- "stop on qresult in rpz_rewrite()",
+ "stop on qresult in rpz_rewrite() ",
qresult);
return (ISC_R_SUCCESS);
default:
rpz_log_fail(client, DNS_RPZ_DEBUG_LEVEL1, DNS_RPZ_TYPE_QNAME,
client->query.qname,
- "stop on unrecognized qresult in rpz_rewrite()",
+ "stop on unrecognized qresult in rpz_rewrite() ",
qresult);
return (ISC_R_SUCCESS);
}
@@ -4647,10 +4653,11 @@ cleanup:
if (st->m.policy == DNS_RPZ_POLICY_MISS ||
st->m.policy == DNS_RPZ_POLICY_PASSTHRU ||
st->m.policy == DNS_RPZ_POLICY_ERROR) {
- if (st->m.policy == DNS_RPZ_POLICY_PASSTHRU)
+ if (st->m.policy == DNS_RPZ_POLICY_PASSTHRU &&
+ result != DNS_R_DELEGATION)
rpz_log_rewrite(client, "", st->m.policy, st->m.type,
st->qname);
- rpz_clean(&st->m.zone, &st->m.db, &st->m.node, &st->m.rdataset);
+ rpz_match_clear(st);
}
if (st->m.policy == DNS_RPZ_POLICY_ERROR) {
st->m.type = DNS_RPZ_TYPE_BAD;
@@ -4664,6 +4671,64 @@ cleanup:
}
/*
+ * See if response policy zone rewriting is allowed a lack of interest
+ * by the client in DNSSEC or a lack of signatures.
+ */
+static isc_boolean_t
+rpz_ck_dnssec(ns_client_t *client, isc_result_t result,
+ dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset)
+{
+ dns_fixedname_t fixed;
+ dns_name_t *found;
+ dns_rdataset_t trdataset;
+ dns_rdatatype_t type;
+
+ if (client->view->rpz_break_dnssec)
+ return (ISC_TRUE);
+ /*
+ * sigrdataset == NULL if and only !WANTDNSSEC(client)
+ */
+ if (sigrdataset == NULL)
+ return (ISC_TRUE);
+ if (dns_rdataset_isassociated(sigrdataset))
+ return (ISC_FALSE);
+
+ /*
+ * We are happy to rewrite nothing.
+ */
+ if (rdataset == NULL || !dns_rdataset_isassociated(rdataset))
+ return (ISC_TRUE);
+ /*
+ * Do not rewrite if there is any sign of signatures.
+ */
+ if (rdataset->type == dns_rdatatype_nsec ||
+ rdataset->type == dns_rdatatype_nsec3 ||
+ rdataset->type == dns_rdatatype_rrsig)
+ return (ISC_FALSE);
+
+ /*
+ * Look for a signature in a negative cache rdataset.
+ */
+ if ((rdataset->attributes & DNS_RDATASETATTR_NEGATIVE) == 0)
+ return (ISC_TRUE);
+ dns_fixedname_init(&fixed);
+ found = dns_fixedname_name(&fixed);
+ dns_rdataset_init(&trdataset);
+ for (result = dns_rdataset_first(rdataset);
+ result == ISC_R_SUCCESS;
+ result = dns_rdataset_next(rdataset)) {
+ dns_ncache_current(rdataset, found, &trdataset);
+ type = trdataset.type;
+ dns_rdataset_disassociate(&trdataset);
+ if (type == dns_rdatatype_nsec ||
+ type == dns_rdatatype_nsec3 ||
+ type == dns_rdatatype_rrsig)
+ return (ISC_FALSE);
+ }
+ return (ISC_TRUE);
+}
+
+/*
* Add a CNAME to the query response, including translating foo.evil.com and
* *.evil.com CNAME *.example.com
* to
@@ -4707,7 +4772,8 @@ rpz_add_cname(ns_client_t *client, dns_rpz_st_t *st,
* Turn off DNSSEC because the results of a
* response policy zone cannot verify.
*/
- client->attributes &= ~NS_CLIENTATTR_WANTDNSSEC;
+ client->attributes &= ~(NS_CLIENTATTR_WANTDNSSEC |
+ DNS_MESSAGEFLAG_AD);
return (ISC_R_SUCCESS);
}
@@ -5117,10 +5183,12 @@ dns64_ttl(dns_db_t *db, dns_dbversion_t *version) {
isc_result_t result;
isc_uint32_t ttl = ISC_UINT32_MAX;
+ dns_rdataset_init(&rdataset);
+
result = dns_db_getoriginnode(db, &node);
if (result != ISC_R_SUCCESS)
goto cleanup;
- dns_rdataset_init(&rdataset);
+
result = dns_db_findrdataset(db, node, version, dns_rdatatype_soa,
0, 0, &rdataset, NULL);
if (result != ISC_R_SUCCESS)
@@ -5502,9 +5570,9 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
CTRACE("query_find: resume");
if (!ISC_LIST_EMPTY(client->view->rpz_zones) &&
- RECURSIONOK(client) && !RECURSING(client) &&
- (!WANTDNSSEC(client) || sigrdataset == NULL ||
- !dns_rdataset_isassociated(sigrdataset)) &&
+ (RECURSIONOK(client) || !client->view->rpz_recursive_only) &&
+ rpz_ck_dnssec(client, result, rdataset, sigrdataset) &&
+ !RECURSING(client) &&
(client->query.rpz_st == NULL ||
(client->query.rpz_st->state & DNS_RPZ_REWRITTEN) == 0) &&
!dns_name_equal(client->query.qname, dns_rootname)) {
@@ -5578,10 +5646,22 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
break;
case DNS_RPZ_POLICY_RECORD:
result = rpz_st->m.result;
- if (type == dns_rdatatype_any &&
- result != DNS_R_CNAME &&
- dns_rdataset_isassociated(rdataset))
- dns_rdataset_disassociate(rdataset);
+ if (qtype == dns_rdatatype_any &&
+ result != DNS_R_CNAME) {
+ /*
+ * We will add all of the rdatasets of
+ * the node by iterating, setting the
+ * TTL then.
+ */
+ if (dns_rdataset_isassociated(rdataset))
+ dns_rdataset_disassociate(rdataset);
+ } else {
+ /*
+ * We will add this rdataset.
+ */
+ rdataset->ttl = ISC_MIN(rdataset->ttl,
+ rpz_st->m.ttl);
+ }
break;
case DNS_RPZ_POLICY_WILDCNAME:
result = dns_rdataset_first(rdataset);
@@ -5620,7 +5700,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
* Turn off DNSSEC because the results of a
* response policy zone cannot verify.
*/
- client->attributes &= ~NS_CLIENTATTR_WANTDNSSEC;
+ client->attributes &= ~(NS_CLIENTATTR_WANTDNSSEC |
+ DNS_MESSAGEFLAG_AD);
query_putrdataset(client, &sigrdataset);
is_zone = ISC_TRUE;
rpz_log_rewrite(client, "", rpz_st->m.policy,
@@ -6560,6 +6641,10 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
noqname = rdataset;
else
noqname = NULL;
+ rpz_st = client->query.rpz_st;
+ if (rpz_st != NULL)
+ rdataset->ttl = ISC_MIN(rdataset->ttl,
+ rpz_st->m.ttl);
query_addrrset(client,
fname != NULL ? &fname : &tname,
&rdataset, NULL,
@@ -6852,8 +6937,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
*/
rpz_st = client->query.rpz_st;
if (rpz_st != NULL && (rpz_st->state & DNS_RPZ_RECURSING) == 0) {
- rpz_clean(&rpz_st->m.zone, &rpz_st->m.db, &rpz_st->m.node,
- &rpz_st->m.rdataset);
+ rpz_match_clear(rpz_st);
rpz_st->state &= ~DNS_RPZ_DONE_QNAME;
}
if (rdataset != NULL)
diff --git a/contrib/bind9/bin/named/server.c b/contrib/bind9/bin/named/server.c
index 666d854..c3eb1ea 100644
--- a/contrib/bind9/bin/named/server.c
+++ b/contrib/bind9/bin/named/server.c
@@ -1430,15 +1430,14 @@ cleanup:
}
static isc_result_t
-configure_rpz(dns_view_t *view, const cfg_listelt_t *element) {
- const cfg_obj_t *rpz_obj, *policy_obj;
+configure_rpz(dns_view_t *view, const cfg_listelt_t *element,
+ isc_boolean_t recursive_only_def, dns_ttl_t ttl_def)
+{
+ const cfg_obj_t *rpz_obj, *policy_obj, *obj;
const char *str;
- dns_fixedname_t fixed;
- dns_name_t *origin;
dns_rpz_zone_t *old, *new;
dns_zone_t *zone = NULL;
isc_result_t result;
- unsigned int l1, l2;
new = isc_mem_get(view->mctx, sizeof(*new));
if (new == NULL) {
@@ -1447,9 +1446,10 @@ configure_rpz(dns_view_t *view, const cfg_listelt_t *element) {
}
memset(new, 0, sizeof(*new));
- dns_name_init(&new->nsdname, NULL);
dns_name_init(&new->origin, NULL);
+ dns_name_init(&new->nsdname, NULL);
dns_name_init(&new->cname, NULL);
+ dns_name_init(&new->passthru, NULL);
ISC_LIST_INITANDAPPEND(view->rpz_zones, new, link);
rpz_obj = cfg_listelt_value(element);
@@ -1457,15 +1457,31 @@ configure_rpz(dns_view_t *view, const cfg_listelt_t *element) {
if (cfg_obj_isvoid(policy_obj)) {
new->policy = DNS_RPZ_POLICY_GIVEN;
} else {
- str = cfg_obj_asstring(policy_obj);
+ str = cfg_obj_asstring(cfg_tuple_get(policy_obj,
+ "policy name"));
new->policy = dns_rpz_str2policy(str);
INSIST(new->policy != DNS_RPZ_POLICY_ERROR);
}
- dns_fixedname_init(&fixed);
- origin = dns_fixedname_name(&fixed);
- str = cfg_obj_asstring(cfg_tuple_get(rpz_obj, "name"));
- result = dns_name_fromstring(origin, str, DNS_NAME_DOWNCASE, NULL);
+ obj = cfg_tuple_get(rpz_obj, "recursive-only");
+ if (cfg_obj_isvoid(obj)) {
+ new->recursive_only = recursive_only_def;
+ } else {
+ new->recursive_only = cfg_obj_asboolean(obj);
+ }
+ if (!new->recursive_only)
+ view->rpz_recursive_only = ISC_FALSE;
+
+ obj = cfg_tuple_get(rpz_obj, "max-policy-ttl");
+ if (cfg_obj_isuint32(obj)) {
+ new->max_policy_ttl = cfg_obj_asuint32(obj);
+ } else {
+ new->max_policy_ttl = ttl_def;
+ }
+
+ str = cfg_obj_asstring(cfg_tuple_get(rpz_obj, "zone name"));
+ result = dns_name_fromstring(&new->origin, str, DNS_NAME_DOWNCASE,
+ view->mctx);
if (result != ISC_R_SUCCESS) {
cfg_obj_log(rpz_obj, ns_g_lctx, DNS_RPZ_ERROR_LEVEL,
"invalid zone '%s'", str);
@@ -1473,31 +1489,28 @@ configure_rpz(dns_view_t *view, const cfg_listelt_t *element) {
}
result = dns_name_fromstring2(&new->nsdname, DNS_RPZ_NSDNAME_ZONE,
- origin, DNS_NAME_DOWNCASE, view->mctx);
+ &new->origin, DNS_NAME_DOWNCASE,
+ view->mctx);
if (result != ISC_R_SUCCESS) {
cfg_obj_log(rpz_obj, ns_g_lctx, DNS_RPZ_ERROR_LEVEL,
"invalid zone '%s'", str);
goto cleanup;
}
- /*
- * The origin is part of 'nsdname' so we don't need to keep it
- * seperately.
- */
- l1 = dns_name_countlabels(&new->nsdname);
- l2 = dns_name_countlabels(origin);
- dns_name_getlabelsequence(&new->nsdname, l1 - l2, l2, &new->origin);
+ result = dns_name_fromstring(&new->passthru, DNS_RPZ_PASSTHRU_ZONE,
+ DNS_NAME_DOWNCASE, view->mctx);
+ if (result != ISC_R_SUCCESS) {
+ cfg_obj_log(rpz_obj, ns_g_lctx, DNS_RPZ_ERROR_LEVEL,
+ "invalid zone '%s'", str);
+ goto cleanup;
+ }
- /*
- * Are we configured to with the reponse policy zone?
- */
result = dns_view_findzone(view, &new->origin, &zone);
if (result != ISC_R_SUCCESS) {
cfg_obj_log(rpz_obj, ns_g_lctx, DNS_RPZ_ERROR_LEVEL,
"unknown zone '%s'", str);
goto cleanup;
}
-
if (dns_zone_gettype(zone) != dns_zone_master &&
dns_zone_gettype(zone) != dns_zone_slave) {
cfg_obj_log(rpz_obj, ns_g_lctx, DNS_RPZ_ERROR_LEVEL,
@@ -1521,8 +1534,9 @@ configure_rpz(dns_view_t *view, const cfg_listelt_t *element) {
}
if (new->policy == DNS_RPZ_POLICY_CNAME) {
- str = cfg_obj_asstring(cfg_tuple_get(rpz_obj, "cname"));
- result = dns_name_fromstring(&new->cname, str, 0, view->mctx);
+ str = cfg_obj_asstring(cfg_tuple_get(policy_obj, "cname"));
+ result = dns_name_fromstring(&new->cname, str,
+ DNS_NAME_DOWNCASE, view->mctx);
if (result != ISC_R_SUCCESS) {
cfg_obj_log(rpz_obj, ns_g_lctx, DNS_RPZ_ERROR_LEVEL,
"invalid cname '%s'", str);
@@ -2876,19 +2890,39 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
* Make the list of response policy zone names for views that
* are used for real lookups and so care about hints.
*/
- zonelist = NULL;
- if (view->rdclass == dns_rdataclass_in && need_hints) {
- obj = NULL;
- result = ns_config_get(maps, "response-policy", &obj);
- if (result == ISC_R_SUCCESS)
- cfg_map_get(obj, "zone", &zonelist);
- }
+ obj = NULL;
+ if (view->rdclass == dns_rdataclass_in && need_hints &&
+ ns_config_get(maps, "response-policy", &obj) == ISC_R_SUCCESS) {
+ const cfg_obj_t *recursive_only_obj;
+ const cfg_obj_t *break_dnssec_obj, *ttl_obj;
+ isc_boolean_t recursive_only_def;
+ dns_ttl_t ttl_def;
+
+ recursive_only_obj = cfg_tuple_get(obj, "recursive-only");
+ if (!cfg_obj_isvoid(recursive_only_obj) &&
+ !cfg_obj_asboolean(recursive_only_obj))
+ recursive_only_def = ISC_FALSE;
+ else
+ recursive_only_def = ISC_TRUE;
- if (zonelist != NULL) {
- for (element = cfg_list_first(zonelist);
+ break_dnssec_obj = cfg_tuple_get(obj, "break-dnssec");
+ if (!cfg_obj_isvoid(break_dnssec_obj) &&
+ cfg_obj_asboolean(break_dnssec_obj))
+ view->rpz_break_dnssec = ISC_TRUE;
+ else
+ view->rpz_break_dnssec = ISC_FALSE;
+
+ ttl_obj = cfg_tuple_get(obj, "max-policy-ttl");
+ if (cfg_obj_isuint32(ttl_obj))
+ ttl_def = cfg_obj_asuint32(ttl_obj);
+ else
+ ttl_def = DNS_RPZ_MAX_TTL_DEFAULT;
+
+ for (element = cfg_list_first(cfg_tuple_get(obj, "zone list"));
element != NULL;
element = cfg_list_next(element)) {
- result = configure_rpz(view, element);
+ result = configure_rpz(view, element,
+ recursive_only_def, ttl_def);
if (result != ISC_R_SUCCESS)
goto cleanup;
dns_rpz_set_need(ISC_TRUE);
@@ -5434,11 +5468,13 @@ ns_server_create(isc_mem_t *mctx, ns_server_t **serverp) {
/*
* Setup the server task, which is responsible for coordinating
- * startup and shutdown of the server.
+ * startup and shutdown of the server, as well as all exclusive
+ * tasks.
*/
CHECKFATAL(isc_task_create(ns_g_taskmgr, 0, &server->task),
"creating server task");
isc_task_setname(server->task, "server", server);
+ isc_taskmgr_setexcltask(ns_g_taskmgr, server->task);
CHECKFATAL(isc_task_onshutdown(server->task, shutdown_server, server),
"isc_task_onshutdown");
CHECKFATAL(isc_app_onrun(ns_g_mctx, server->task, run_server, server),
diff --git a/contrib/bind9/bin/named/statschannel.c b/contrib/bind9/bin/named/statschannel.c
index d0518c9..6ea0be5 100644
--- a/contrib/bind9/bin/named/statschannel.c
+++ b/contrib/bind9/bin/named/statschannel.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2011 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2008-2012 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -85,16 +85,19 @@ static const char *nsstats_desc[dns_nsstatscounter_max];
static const char *resstats_desc[dns_resstatscounter_max];
static const char *zonestats_desc[dns_zonestatscounter_max];
static const char *sockstats_desc[isc_sockstatscounter_max];
+static const char *dnssecstats_desc[dns_dnssecstats_max];
#ifdef HAVE_LIBXML2
static const char *nsstats_xmldesc[dns_nsstatscounter_max];
static const char *resstats_xmldesc[dns_resstatscounter_max];
static const char *zonestats_xmldesc[dns_zonestatscounter_max];
static const char *sockstats_xmldesc[isc_sockstatscounter_max];
+static const char *dnssecstats_xmldesc[dns_dnssecstats_max];
#else
#define nsstats_xmldesc NULL
#define resstats_xmldesc NULL
#define zonestats_xmldesc NULL
#define sockstats_xmldesc NULL
+#define dnssecstats_xmldesc NULL
#endif /* HAVE_LIBXML2 */
#define TRY0(a) do { xmlrc = (a); if (xmlrc < 0) goto error; } while(0)
@@ -108,6 +111,7 @@ static int nsstats_index[dns_nsstatscounter_max];
static int resstats_index[dns_resstatscounter_max];
static int zonestats_index[dns_zonestatscounter_max];
static int sockstats_index[isc_sockstatscounter_max];
+static int dnssecstats_index[dns_dnssecstats_max];
static inline void
set_desc(int counter, int maxcounter, const char *fdesc, const char **fdescs,
@@ -409,6 +413,33 @@ init_desc(void) {
"FDwatchRecvErr");
INSIST(i == isc_sockstatscounter_max);
+ /* Initialize DNSSEC statistics */
+ for (i = 0; i < dns_dnssecstats_max; i++)
+ dnssecstats_desc[i] = NULL;
+#ifdef HAVE_LIBXML2
+ for (i = 0; i < dns_dnssecstats_max; i++)
+ dnssecstats_xmldesc[i] = NULL;
+#endif
+
+#define SET_DNSSECSTATDESC(counterid, desc, xmldesc) \
+ do { \
+ set_desc(dns_dnssecstats_ ## counterid, \
+ dns_dnssecstats_max, \
+ desc, dnssecstats_desc,\
+ xmldesc, dnssecstats_xmldesc); \
+ dnssecstats_index[i++] = dns_dnssecstats_ ## counterid; \
+ } while (0)
+
+ i = 0;
+ SET_DNSSECSTATDESC(asis, "dnssec validation success with signer "
+ "\"as is\"", "DNSSECasis");
+ SET_DNSSECSTATDESC(downcase, "dnssec validation success with signer "
+ "lower cased", "DNSSECdowncase");
+ SET_DNSSECSTATDESC(wildcard, "dnssec validation of wildcard signature",
+ "DNSSECwild");
+ SET_DNSSECSTATDESC(fail, "dnssec validation failures", "DNSSECfail");
+ INSIST(i == dns_dnssecstats_max);
+
/* Sanity check */
for (i = 0; i < dns_nsstatscounter_max; i++)
INSIST(nsstats_desc[i] != NULL);
@@ -418,6 +449,8 @@ init_desc(void) {
INSIST(zonestats_desc[i] != NULL);
for (i = 0; i < isc_sockstatscounter_max; i++)
INSIST(sockstats_desc[i] != NULL);
+ for (i = 0; i < dns_dnssecstats_max; i++)
+ INSIST(dnssecstats_desc[i] != NULL);
#ifdef HAVE_LIBXML2
for (i = 0; i < dns_nsstatscounter_max; i++)
INSIST(nsstats_xmldesc[i] != NULL);
@@ -427,6 +460,8 @@ init_desc(void) {
INSIST(zonestats_xmldesc[i] != NULL);
for (i = 0; i < isc_sockstatscounter_max; i++)
INSIST(sockstats_xmldesc[i] != NULL);
+ for (i = 0; i < dns_dnssecstats_max; i++)
+ INSIST(dnssecstats_xmldesc[i] != NULL);
#endif
}
diff --git a/contrib/bind9/bin/named/unix/Makefile.in b/contrib/bind9/bin/named/unix/Makefile.in
index 135c634..ff2ecce 100644
--- a/contrib/bind9/bin/named/unix/Makefile.in
+++ b/contrib/bind9/bin/named/unix/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007, 2009, 2011 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1999-2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/bin/nsupdate/Makefile.in b/contrib/bind9/bin/nsupdate/Makefile.in
index e86731b..f62ee34 100644
--- a/contrib/bind9/bin/nsupdate/Makefile.in
+++ b/contrib/bind9/bin/nsupdate/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2006-2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2006-2009, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000-2002 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/bin/nsupdate/nsupdate.c b/contrib/bind9/bin/nsupdate/nsupdate.c
index 743f321..1f5e3e9 100644
--- a/contrib/bind9/bin/nsupdate/nsupdate.c
+++ b/contrib/bind9/bin/nsupdate/nsupdate.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -1122,7 +1122,7 @@ parse_name(char **cmdlinep, dns_message_t *msg, dns_name_t **namep) {
isc_buffer_t source;
word = nsu_strsep(cmdlinep, " \t\r\n");
- if (*word == 0) {
+ if (word == NULL || *word == 0) {
fprintf(stderr, "could not read owner name\n");
return (STATUS_SYNTAX);
}
@@ -1154,6 +1154,11 @@ parse_rdata(char **cmdlinep, dns_rdataclass_t rdataclass,
dns_rdatacallbacks_t callbacks;
isc_result_t result;
+ if (cmdline == NULL) {
+ rdata->flags = DNS_RDATA_UPDATE;
+ return (STATUS_MORE);
+ }
+
while (*cmdline != 0 && isspace((unsigned char)*cmdline))
cmdline++;
@@ -1220,7 +1225,7 @@ make_prereq(char *cmdline, isc_boolean_t ispositive, isc_boolean_t isrrset) {
*/
if (isrrset) {
word = nsu_strsep(&cmdline, " \t\r\n");
- if (*word == 0) {
+ if (word == NULL || *word == 0) {
fprintf(stderr, "could not read class or type\n");
goto failure;
}
@@ -1236,7 +1241,7 @@ make_prereq(char *cmdline, isc_boolean_t ispositive, isc_boolean_t isrrset) {
* Now read the type.
*/
word = nsu_strsep(&cmdline, " \t\r\n");
- if (*word == 0) {
+ if (word == NULL || *word == 0) {
fprintf(stderr, "could not read type\n");
goto failure;
}
@@ -1310,7 +1315,7 @@ evaluate_prereq(char *cmdline) {
ddebug("evaluate_prereq()");
word = nsu_strsep(&cmdline, " \t\r\n");
- if (*word == 0) {
+ if (word == NULL || *word == 0) {
fprintf(stderr, "could not read operation code\n");
return (STATUS_SYNTAX);
}
@@ -1344,14 +1349,14 @@ evaluate_server(char *cmdline) {
}
word = nsu_strsep(&cmdline, " \t\r\n");
- if (*word == 0) {
+ if (word == NULL || *word == 0) {
fprintf(stderr, "could not read server name\n");
return (STATUS_SYNTAX);
}
server = word;
word = nsu_strsep(&cmdline, " \t\r\n");
- if (*word == 0)
+ if (word == NULL || *word == 0)
port = dnsport;
else {
char *endp;
@@ -1385,14 +1390,14 @@ evaluate_local(char *cmdline) {
struct in6_addr in6;
word = nsu_strsep(&cmdline, " \t\r\n");
- if (*word == 0) {
+ if (word == NULL || *word == 0) {
fprintf(stderr, "could not read server name\n");
return (STATUS_SYNTAX);
}
local = word;
word = nsu_strsep(&cmdline, " \t\r\n");
- if (*word == 0)
+ if (word == NULL || *word == 0)
port = 0;
else {
char *endp;
@@ -1441,7 +1446,7 @@ evaluate_key(char *cmdline) {
char *n;
namestr = nsu_strsep(&cmdline, " \t\r\n");
- if (*namestr == 0) {
+ if (namestr == NULL || *namestr == 0) {
fprintf(stderr, "could not read key name\n");
return (STATUS_SYNTAX);
}
@@ -1465,7 +1470,7 @@ evaluate_key(char *cmdline) {
}
secretstr = nsu_strsep(&cmdline, "\r\n");
- if (*secretstr == 0) {
+ if (secretstr == NULL || *secretstr == 0) {
fprintf(stderr, "could not read key secret\n");
return (STATUS_SYNTAX);
}
@@ -1506,7 +1511,7 @@ evaluate_zone(char *cmdline) {
isc_result_t result;
word = nsu_strsep(&cmdline, " \t\r\n");
- if (*word == 0) {
+ if (word == NULL || *word == 0) {
fprintf(stderr, "could not read zone name\n");
return (STATUS_SYNTAX);
}
@@ -1532,7 +1537,7 @@ evaluate_realm(char *cmdline) {
char buf[1024];
word = nsu_strsep(&cmdline, " \t\r\n");
- if (*word == 0) {
+ if (word == NULL || *word == 0) {
if (realm != NULL)
isc_mem_free(mctx, realm);
realm = NULL;
@@ -1557,7 +1562,7 @@ evaluate_ttl(char *cmdline) {
isc_uint32_t ttl;
word = nsu_strsep(&cmdline, " \t\r\n");
- if (*word == 0) {
+ if (word == NULL || *word == 0) {
fprintf(stderr, "could not ttl\n");
return (STATUS_SYNTAX);
}
@@ -1591,7 +1596,7 @@ evaluate_class(char *cmdline) {
dns_rdataclass_t rdclass;
word = nsu_strsep(&cmdline, " \t\r\n");
- if (*word == 0) {
+ if (word == NULL || *word == 0) {
fprintf(stderr, "could not read class name\n");
return (STATUS_SYNTAX);
}
@@ -1649,7 +1654,7 @@ update_addordelete(char *cmdline, isc_boolean_t isdelete) {
* If it's a delete, ignore a TTL if present (for compatibility).
*/
word = nsu_strsep(&cmdline, " \t\r\n");
- if (*word == 0) {
+ if (word == NULL || *word == 0) {
if (!isdelete) {
fprintf(stderr, "could not read owner ttl\n");
goto failure;
@@ -1690,7 +1695,7 @@ update_addordelete(char *cmdline, isc_boolean_t isdelete) {
*/
word = nsu_strsep(&cmdline, " \t\r\n");
parseclass:
- if (*word == 0) {
+ if (word == NULL || *word == 0) {
if (isdelete) {
rdataclass = dns_rdataclass_any;
rdatatype = dns_rdatatype_any;
@@ -1714,7 +1719,7 @@ update_addordelete(char *cmdline, isc_boolean_t isdelete) {
* Now read the type.
*/
word = nsu_strsep(&cmdline, " \t\r\n");
- if (*word == 0) {
+ if (word == NULL || *word == 0) {
if (isdelete) {
rdataclass = dns_rdataclass_any;
rdatatype = dns_rdatatype_any;
@@ -1794,7 +1799,7 @@ evaluate_update(char *cmdline) {
ddebug("evaluate_update()");
word = nsu_strsep(&cmdline, " \t\r\n");
- if (*word == 0) {
+ if (word == NULL || *word == 0) {
fprintf(stderr, "could not read operation code\n");
return (STATUS_SYNTAX);
}
@@ -1884,6 +1889,7 @@ get_next_command(void) {
char cmdlinebuf[MAXCMD];
char *cmdline;
char *word;
+ char *tmp;
ddebug("get_next_command()");
if (interactive) {
@@ -1895,11 +1901,18 @@ get_next_command(void) {
isc_app_unblock();
if (cmdline == NULL)
return (STATUS_QUIT);
+
+ /*
+ * Normalize input by removing any eol.
+ */
+ tmp = cmdline;
+ (void)nsu_strsep(&tmp, "\r\n");
+
word = nsu_strsep(&cmdline, " \t\r\n");
if (feof(input))
return (STATUS_QUIT);
- if (*word == 0)
+ if (word == NULL || *word == 0)
return (STATUS_SEND);
if (word[0] == ';')
return (STATUS_MORE);
diff --git a/contrib/bind9/bin/rndc/Makefile.in b/contrib/bind9/bin/rndc/Makefile.in
index e67bad7..f6100df 100644
--- a/contrib/bind9/bin/rndc/Makefile.in
+++ b/contrib/bind9/bin/rndc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000-2002 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/bin/tools/Makefile.in b/contrib/bind9/bin/tools/Makefile.in
index a77376b..a396005 100644
--- a/contrib/bind9/bin/tools/Makefile.in
+++ b/contrib/bind9/bin/tools/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2010 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2010, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/config.h.in b/contrib/bind9/config.h.in
index bafcadd..e2f5999 100644
--- a/contrib/bind9/config.h.in
+++ b/contrib/bind9/config.h.in
@@ -1,6 +1,6 @@
/* config.h.in. Generated from configure.in by autoheader. */
/*
- * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2008, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -16,7 +16,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id$ */
+/* $Id: acconfig.h,v 1.53 2008/12/01 23:47:44 tbox Exp $ */
/*! \file */
@@ -138,6 +138,9 @@ int sigwait(const unsigned int *set, int *sig);
/* Define if OpenSSL includes DSA support */
#undef HAVE_OPENSSL_DSA
+/* Define if OpenSSL includes ECDSA support */
+#undef HAVE_OPENSSL_ECDSA
+
/* Define to the length type used by the socket API (socklen_t, size_t, int). */
#undef ISC_SOCKADDR_LEN_T
@@ -202,6 +205,9 @@ int sigwait(const unsigned int *set, int *sig);
/* Define to 1 if you have the `EVP_sha256' function. */
#undef HAVE_EVP_SHA256
+/* Define to 1 if you have the `EVP_sha384' function. */
+#undef HAVE_EVP_SHA384
+
/* Define to 1 if you have the `EVP_sha512' function. */
#undef HAVE_EVP_SHA512
diff --git a/contrib/bind9/configure.in b/contrib/bind9/configure.in
index 2d7132c..a0ec700 100644
--- a/contrib/bind9/configure.in
+++ b/contrib/bind9/configure.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2003 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
@@ -543,6 +543,7 @@ then
fi
done
fi
+OPENSSL_ECDSA=""
OPENSSL_GOST=""
case "$use_openssl" in
no)
@@ -698,7 +699,40 @@ esac
else
AC_MSG_RESULT(no)
fi
- AC_CHECK_FUNCS(EVP_sha256 EVP_sha512)
+
+ AC_CHECK_FUNCS(EVP_sha256 EVP_sha384 EVP_sha512)
+
+ AC_MSG_CHECKING(for OpenSSL ECDSA support)
+ have_ecdsa=""
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <openssl/ecdsa.h>
+#include <openssl/objects.h>
+int main() {
+ EC_KEY *ec256, *ec384;
+
+#if !defined(HAVE_EVP_SHA256) || !defined(HAVE_EVP_SHA384)
+ return (1);
+#endif
+ ec256 = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
+ ec384 = EC_KEY_new_by_curve_name(NID_secp384r1);
+ if (ec256 == NULL || ec384 == NULL)
+ return (2);
+ return (0);
+}
+],
+ [AC_MSG_RESULT(yes)
+ have_ecdsa="yes"],
+ [AC_MSG_RESULT(no)
+ have_ecdsa="no"])
+ case $have_ecdsa in
+ yes)
+ OPENSSL_ECDSA="yes"
+ AC_DEFINE(HAVE_OPENSSL_ECDSA)
+ ;;
+ *)
+ ;;
+ esac
AC_MSG_CHECKING(for OpenSSL GOST support)
have_gost=""
@@ -772,7 +806,9 @@ AC_SUBST(USE_OPENSSL)
AC_SUBST(DST_OPENSSL_INC)
AC_SUBST(OPENSSLLINKOBJS)
AC_SUBST(OPENSSLLINKSRCS)
+AC_SUBST(OPENSSL_ECDSA)
AC_SUBST(OPENSSL_GOST)
+
DNS_CRYPTO_LIBS="$DNS_CRYPTO_LIBS $DNS_OPENSSL_LIBS"
#
@@ -1222,7 +1258,7 @@ case "$use_libxml2" in
;;
auto|yes)
case X`(xml2-config --version) 2>/dev/null` in
- X2.[[67]].*)
+ X2.[[678]].*)
libxml2_libs=`xml2-config --libs`
libxml2_cflags=`xml2-config --cflags`
;;
@@ -3462,6 +3498,7 @@ AC_CONFIG_FILES([
bin/tests/system/dlz/prereq.sh
bin/tests/system/dlzexternal/Makefile
bin/tests/system/dlzexternal/ns1/named.conf
+ bin/tests/system/ecdsa/prereq.sh
bin/tests/system/filter-aaaa/Makefile
bin/tests/system/gost/prereq.sh
bin/tests/system/lwresd/Makefile
diff --git a/contrib/bind9/doc/Makefile.in b/contrib/bind9/doc/Makefile.in
index 14d35bc..29074b5 100644
--- a/contrib/bind9/doc/Makefile.in
+++ b/contrib/bind9/doc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004-2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000, 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/doc/arm/Bv9ARM-book.xml b/contrib/bind9/doc/arm/Bv9ARM-book.xml
index 6137359..f3f862a 100644
--- a/contrib/bind9/doc/arm/Bv9ARM-book.xml
+++ b/contrib/bind9/doc/arm/Bv9ARM-book.xml
@@ -5212,7 +5212,11 @@ badresp:1,adberr:0,findfail:0,valfail:0]
<optional> resolver-query-timeout <replaceable>number</replaceable> ; </optional>
<optional> deny-answer-addresses { <replaceable>address_match_list</replaceable> } <optional> except-from { <replaceable>namelist</replaceable> } </optional>;</optional>
<optional> deny-answer-aliases { <replaceable>namelist</replaceable> } <optional> except-from { <replaceable>namelist</replaceable> } </optional>;</optional>
- <optional> response-policy { <replaceable>zone_name</replaceable> <optional> policy given | disabled | passthru | nxdomain | nodata | cname <replaceable>domain</replaceable> </optional> ; } ; </optional>
+ <optional> response-policy { <replaceable>zone_name</replaceable>
+ <optional> policy given | disabled | passthru | nxdomain | nodata | cname <replaceable>domain</replaceable> </optional>
+ <optional> recursive-only <replaceable>yes_or_no</replaceable> </optional> <optional> max-policy-ttl <replaceable>number</replaceable> </optional> ;
+ } <optional> recursive-only <replaceable>yes_or_no</replaceable> </optional> <optional> max-policy-ttl <replaceable>number</replaceable> </optional>
+ <optional> break-dnssec <replaceable>yes_or_no</replaceable> </optional> ; </optional>
};
</programlisting>
@@ -7280,8 +7284,8 @@ options {
<listitem>
<para>
The amount of time the resolver will spend attempting
- to resolve a recursive query before failing. The
- default is <literal>10</literal> and the maximum is
+ to resolve a recursive query before failing. The default
+ and minimum is <literal>10</literal> and the maximum is
<literal>30</literal>. Setting it to <literal>0</literal>
will result in the default being used.
</para>
@@ -9266,17 +9270,15 @@ deny-answer-aliases { "example.net"; };
<sect3>
<title>Response Policy Zone (RPZ) Rewriting</title>
<para>
- <acronym>BIND</acronym> 9 includes an intentionally limited
- mechanism to modify DNS responses for recursive requests
- somewhat similar to email anti-spam DNS blacklists.
+ <acronym>BIND</acronym> 9 includes a limited
+ mechanism to modify DNS responses for requests
+ analogous to email anti-spam DNS blacklists.
Responses can be changed to deny the existence of domains(NXDOMAIN),
deny the existence of IP addresses for domains (NODATA),
or contain other IP addresses or data.
</para>
<para>
- The actions encoded in a response policy zone (RPZ) are applied
- only to queries that ask for recursion (RD=1).
Response policy zones are named in the
<command>response-policy</command> option for the view or among the
global options if there is no response-policy option for the view.
@@ -9287,22 +9289,21 @@ deny-answer-aliases { "example.net"; };
</para>
<para>
- There are four kinds of RPZ records, QNAME, IP, NSIP,
+ Four policy triggers are encoded in RPZ records, QNAME, IP, NSIP,
and NSDNAME.
- QNAME records are applied to query names of requests and targets
+ QNAME RPZ records triggered by query names of requests and targets
of CNAME records resolved to generate the response.
The owner name of a QNAME RPZ record is the query name relativized
to the RPZ.
</para>
<para>
- The second kind of RPZ record, an IP policy record,
- is triggered by addresses in A and AAAA records
- for the ANSWER sections of responses.
- IP policy records have owner names that are
- subdomains of <userinput>rpz-ip</userinput> relativized to the
- RPZ origin name and encode an IP address or address block.
- IPv4 addresses are encoded as
+ The second kind of RPZ trigger is an IP address in an A and AAAA
+ record in the ANSWER section of a response.
+ IP address triggers are encoded in records that have owner names
+ that are subdomains of <userinput>rpz-ip</userinput> relativized
+ to the RPZ origin name and encode an IP address or address block.
+ IPv4 trigger addresses are represented as
<userinput>prefixlength.B4.B3.B2.B1.rpz-ip</userinput>.
The prefix length must be between 1 and 32.
All four bytes, B4, B3, B2, and B1, must be present.
@@ -9321,43 +9322,45 @@ deny-answer-aliases { "example.net"; };
</para>
<para>
- NSDNAME policy records match names of authoritative servers
- for the query name, a parent of the query name, a CNAME,
- or a parent of a CNAME.
+ NSDNAME triggers match names of authoritative servers
+ for the query name, a parent of the query name, a CNAME for
+ query name, or a parent of a CNAME.
They are encoded as subdomains of
<userinput>rpz-nsdomain</userinput> relativized
to the RPZ origin name.
</para>
<para>
- NSIP policy records match IP addresses in A and AAAA RRsets
- for domains that can be checked against NSDNAME policy records.
- The are encoded like IP policies except as subdomains of
+ NSIP triggers match IP addresses in A and
+ AAAA RRsets for domains that can be checked against NSDNAME
+ policy records.
+ NSIP triggers are encoded like IP triggers except as subdomains of
<userinput>rpz-nsip</userinput>.
</para>
<para>
The query response is checked against all RPZs, so
- two or more policy records can apply to a single response.
- Because DNS responses can be rewritten according by at most a
- single policy record, a single policy (other than
- <command>DISABLED</command> policies) must be chosen.
- Policies are chosen in the following order:
+ two or more policy records can be triggered by a response.
+ Because DNS responses can be rewritten according to at most one
+ policy record, a single record encoding an action (other than
+ <command>DISABLED</command> actions) must be chosen.
+ Triggers or the records that encode them are chosen in
+ the following order:
<itemizedlist>
- <listitem>Among applicable zones, use the RPZ that appears first
- in the response-policy option.
+ <listitem>Choose the triggered record in the zone that appears
+ first in the response-policy option.
</listitem>
- <listitem>Prefer QNAME to IP to NSDNAME to NSIP policy records
- in a single RPZ
+ <listitem>Prefer QNAME to IP to NSDNAME to NSIP triggers
+ in a single zone.
</listitem>
- <listitem>Among applicable NSDNAME policy records, prefer the
- policy record that matches the lexically smallest name
+ <listitem>Among NSDNAME triggers, prefer the
+ trigger that matches the smallest name under the DNSSEC ordering.
</listitem>
- <listitem>Among IP or NSIP policy records, prefer the record
+ <listitem>Among IP or NSIP triggers, prefer the trigger
with the longest prefix.
</listitem>
- <listitem>Among records with the same prefex length,
- prefer the IP or NSIP policy record that matches
+ <listitem>Among triggers with the same prefex length,
+ prefer the IP or NSIP trigger that matches
the smallest IP address.
</listitem>
</itemizedlist>
@@ -9365,8 +9368,8 @@ deny-answer-aliases { "example.net"; };
<para>
When the processing of a response is restarted to resolve
- DNAME or CNAME records and an applicable policy record set has
- not been found,
+ DNAME or CNAME records and a policy record set has
+ not been triggered,
all RPZs are again consulted for the DNAME or CNAME names
and addresses.
</para>
@@ -9383,55 +9386,56 @@ deny-answer-aliases { "example.net"; };
</para>
<para>
- RPZ record sets are special CNAME records or one or more
- of any types of DNS record except DNAME or DNSSEC.
- Except when a policy record is a CNAME, there can be more
- more than one record and more than one type
- in a set of policy records.
- Except for three kinds of CNAME records that are illegal except
- in policy zones, the records in a set are used in the response as if
- their owner name were the query name. They are copied to the
- response as dictated by their types.
+ RPZ record sets are sets of any types of DNS record except
+ DNAME or DNSSEC that encode actions or responses to queries.
<itemizedlist>
- <listitem>A CNAME whose target is the root domain (.)
- specifies the <command>NXDOMAIN</command> policy,
- which generates an NXDOMAIN response.
+ <listitem>The <command>NXDOMAIN</command> response is encoded
+ by a CNAME whose target is the root domain (.)
</listitem>
<listitem>A CNAME whose target is the wildcard top-level
- domain (*.) specifies the <command>NODATA</command> policy,
+ domain (*.) specifies the <command>NODATA</command> action,
which rewrites the response to NODATA or ANCOUNT=1.
</listitem>
- <listitem>A CNAME whose target is a wildcard hostname such
- as *.example.com is used normally after the astrisk (*)
+ <listitem>The <command>Local Data</command> action is
+ represented by a set ordinary DNS records that are used
+ to answer queries. Queries for record types not the
+ set are answered with NODATA.
+
+ A special form of local data is a CNAME whose target is a
+ wildcard such as *.example.com.
+ It is used as if were an ordinary CNAME after the astrisk (*)
has been replaced with the query name.
- These records are usually resolved with ordinary CNAMEs
- outside the policy zones. They can be useful for logging.
+ The purpose for this special form is query logging in the
+ walled garden's authority DNS server.
</listitem>
<listitem>The <command>PASSTHRU</command> policy is specified
- by a CNAME whose target is the variable part of its own
- owner name. It causes the response to not be rewritten
+ by a CNAME whose target is <command>rpz_passthru.</command>
+ It causes the response to not be rewritten
and is most often used to "poke holes" in policies for
CIDR blocks.
+ (A CNAME whose target is the variable part of its owner name
+ is an obsolete specification of the PASSTHRU policy.)
</listitem>
</itemizedlist>
</para>
<para>
- The policies specified in individual records
- in an RPZ can be overridden with a <command>policy</command> clause
- in the <command>response-policy</command> option.
+ The actions specified in an RPZ can be overridden with a
+ <command>policy</command> clause in the
+ <command>response-policy</command> option.
An organization using an RPZ provided by another organization might
use this mechanism to redirect domains to its own walled garden.
<itemizedlist>
- <listitem><command>GIVEN</command> says "do not override."
+ <listitem><command>GIVEN</command> says "do not override but
+ perform the action specified in the zone."
</listitem>
<listitem><command>DISABLED</command> causes policy records to do
nothing but log what they might have done.
The response to the DNS query will be written according to
- any matching policy records that are not disabled.
- Policy zones overridden with <command>DISABLED</command> should
- appear first, because they will often not be logged
- if a higher precedence policy is found first.
+ any triggered policy records that are not disabled.
+ Disabled policy zones should appear first,
+ because they will often not be logged
+ if a higher precedence trigger is found first.
</listitem>
<listitem><command>PASSTHRU</command> causes all policy records
to act as if they were CNAME records with targets the variable
@@ -9451,6 +9455,37 @@ deny-answer-aliases { "example.net"; };
</para>
<para>
+ By default, the actions encoded in an RPZ are applied
+ only to queries that ask for recursion (RD=1).
+ That default can be changed for a single RPZ or all RPZs in a view
+ with a <command>recursive-only no</command> clause.
+ This feature is useful for serving the same zone files
+ both inside and outside an RFC 1918 cloud and using RPZ to
+ delete answers that would otherwise contain RFC 1918 values
+ on the externally visible name server or view.
+ </para>
+
+ <para>
+ Also by default, RPZ actions are applied only to DNS requests that
+ either do not request DNSSEC metadata (DO=0) or when no DNSSEC
+ records are available for request name in the original zone (not
+ the response policy zone).
+ This default can be changed for all RPZs in a view with a
+ <command>break-dnssec yes</command> clause.
+ In that case, RPZ actions are applied regardless of DNSSEC.
+ The name of the clause option reflects the fact that results
+ rewritten by RPZ actions cannot verify.
+ </para>
+
+ <para>
+ The TTL of a record modified by RPZ policies is set from the
+ TTL of the relevant record in policy zone. It is then limited
+ to a maximum value.
+ The <command>max-policy-ttl</command> clause changes that
+ maximum from its default of 5.
+ </para>
+
+ <para>
For example, you might use this option statement
</para>
<programlisting> response-policy { zone "badlist"; };</programlisting>
@@ -9472,7 +9507,7 @@ bad.domain.com A 10.0.0.1 ; redirect to a walled garden
AAAA 2001:2::1
; do not rewrite (PASSTHRU) OK.DOMAIN.COM
-ok.domain.com CNAME ok.domain.com.
+ok.domain.com CNAME rpz-passthru.
bzone.domain.com CNAME garden.example.com.
@@ -9482,7 +9517,7 @@ bzone.domain.com CNAME garden.example.com.
; IP policy records that rewrite all answers for 127/8 except 127.0.0.1
8.0.0.0.127.rpz-ip CNAME .
-32.1.0.0.127.rpz-ip CNAME 32.1.0.0.127. ; PASSTHRU for 127.0.0.1
+32.1.0.0.127.rpz-ip CNAME rpz-passthru.
; NSDNAME and NSIP policy records
ns.domain.com.rpz-nsdname CNAME .
@@ -11527,7 +11562,7 @@ example.com. NS ns2.example.net.
(machine$@REALM) for machine in REALM and
and converts it machine.realm allowing the machine
to update machine.realm. The REALM to be matched
- is specified in the <replacable>identity</replacable>
+ is specified in the <replaceable>identity</replaceable>
field.
</para>
</entry>
@@ -11544,7 +11579,7 @@ example.com. NS ns2.example.net.
converts it to machine.realm allowing the machine
to update subdomains of machine.realm. The REALM
to be matched is specified in the
- <replacable>identity</replacable> field.
+ <replaceable>identity</replaceable> field.
</para>
</entry>
</row>
@@ -11559,7 +11594,7 @@ example.com. NS ns2.example.net.
(host/machine@REALM) for machine in REALM and
and converts it machine.realm allowing the machine
to update machine.realm. The REALM to be matched
- is specified in the <replacable>identity</replacable>
+ is specified in the <replaceable>identity</replaceable>
field.
</para>
</entry>
@@ -11576,7 +11611,7 @@ example.com. NS ns2.example.net.
converts it to machine.realm allowing the machine
to update subdomains of machine.realm. The REALM
to be matched is specified in the
- <replacable>identity</replacable> field.
+ <replaceable>identity</replaceable> field.
</para>
</entry>
</row>
diff --git a/contrib/bind9/doc/arm/Bv9ARM.ch04.html b/contrib/bind9/doc/arm/Bv9ARM.ch04.html
index 202439f..8e77a6b 100644
--- a/contrib/bind9/doc/arm/Bv9ARM.ch04.html
+++ b/contrib/bind9/doc/arm/Bv9ARM.ch04.html
@@ -70,33 +70,33 @@
</dl></dd>
<dt><span class="sect1"><a href="Bv9ARM.ch04.html#dnssec.dynamic.zones">DNSSEC, Dynamic Zones, and Automatic Signing</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571421">Converting from insecure to secure</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571459">Dynamic DNS update method</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563508">Fully automatic zone signing</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563590">Private-type records</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563696">DNSKEY rollovers</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563708">Dynamic DNS update method</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563741">Automatic key rollovers</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563836">NSEC3PARAM rollovers via UPDATE</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563846">Converting from NSEC to NSEC3</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563856">Converting from NSEC3 to NSEC</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563868">Converting from secure to insecure</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563906">Periodic re-signing</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563915">NSEC3 and OPTOUT</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571475">Converting from insecure to secure</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571512">Dynamic DNS update method</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563493">Fully automatic zone signing</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563575">Private-type records</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563612">DNSKEY rollovers</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563762">Dynamic DNS update method</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563795">Automatic key rollovers</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563821">NSEC3PARAM rollovers via UPDATE</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563899">Converting from NSEC to NSEC3</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563909">Converting from NSEC3 to NSEC</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563922">Converting from secure to insecure</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571605">Periodic re-signing</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571614">NSEC3 and OPTOUT</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="Bv9ARM.ch04.html#rfc5011.support">Dynamic Trust Anchor Management</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571685">Validating Resolver</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571707">Authoritative Server</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2607510">Validating Resolver</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571692">Authoritative Server</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="Bv9ARM.ch04.html#pkcs11">PKCS #11 (Cryptoki) support</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2609970">Prerequisites</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2608219">Building BIND 9 with PKCS#11</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2610529">PKCS #11 Tools</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2610560">Using the HSM</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2635129">Specifying the engine on the command line</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2635243">Running named with automatic zone re-signing</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2610637">Prerequisites</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2608477">Building BIND 9 with PKCS#11</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2608602">PKCS #11 Tools</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2634916">Using the HSM</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2635114">Specifying the engine on the command line</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2635160">Running named with automatic zone re-signing</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2572669">IPv6 Support in <acronym class="acronym">BIND</acronym> 9</a></span></dt>
<dd><dl>
@@ -1067,7 +1067,7 @@ options {
from insecure to signed and back again. A secure zone can use
either NSEC or NSEC3 chains.</p>
<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
-<a name="id2571421"></a>Converting from insecure to secure</h3></div></div></div></div>
+<a name="id2571475"></a>Converting from insecure to secure</h3></div></div></div></div>
<p>Changing a zone from insecure to secure can be done in two
ways: using a dynamic DNS update, or the
<span><strong class="command">auto-dnssec</strong></span> zone option.</p>
@@ -1093,7 +1093,7 @@ options {
well. An NSEC chain will be generated as part of the initial
signing process.</p>
<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
-<a name="id2571459"></a>Dynamic DNS update method</h3></div></div></div></div>
+<a name="id2571512"></a>Dynamic DNS update method</h3></div></div></div></div>
<p>To insert the keys via dynamic update:</p>
<pre class="screen">
% nsupdate
@@ -1129,7 +1129,7 @@ options {
<p>While the initial signing and NSEC/NSEC3 chain generation
is happening, other updates are possible as well.</p>
<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
-<a name="id2563508"></a>Fully automatic zone signing</h3></div></div></div></div>
+<a name="id2563493"></a>Fully automatic zone signing</h3></div></div></div></div>
<p>To enable automatic signing, add the
<span><strong class="command">auto-dnssec</strong></span> option to the zone statement in
<code class="filename">named.conf</code>.
@@ -1164,7 +1164,7 @@ options {
configuration. If this has not been done, the configuration will
fail.</p>
<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
-<a name="id2563590"></a>Private-type records</h3></div></div></div></div>
+<a name="id2563575"></a>Private-type records</h3></div></div></div></div>
<p>The state of the signing process is signaled by
private-type records (with a default type value of 65534). When
signing is complete, these records will have a nonzero value for
@@ -1205,12 +1205,12 @@ options {
<p>
</p>
<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
-<a name="id2563696"></a>DNSKEY rollovers</h3></div></div></div></div>
+<a name="id2563612"></a>DNSKEY rollovers</h3></div></div></div></div>
<p>As with insecure-to-secure conversions, rolling DNSSEC
keys can be done in two ways: using a dynamic DNS update, or the
<span><strong class="command">auto-dnssec</strong></span> zone option.</p>
<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
-<a name="id2563708"></a>Dynamic DNS update method</h3></div></div></div></div>
+<a name="id2563762"></a>Dynamic DNS update method</h3></div></div></div></div>
<p> To perform key rollovers via dynamic update, you need to add
the <code class="filename">K*</code> files for the new keys so that
<span><strong class="command">named</strong></span> can find them. You can then add the new
@@ -1232,7 +1232,7 @@ options {
<span><strong class="command">named</strong></span> will clean out any signatures generated
by the old key after the update completes.</p>
<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
-<a name="id2563741"></a>Automatic key rollovers</h3></div></div></div></div>
+<a name="id2563795"></a>Automatic key rollovers</h3></div></div></div></div>
<p>When a new key reaches its activation date (as set by
<span><strong class="command">dnssec-keygen</strong></span> or <span><strong class="command">dnssec-settime</strong></span>),
if the <span><strong class="command">auto-dnssec</strong></span> zone option is set to
@@ -1247,27 +1247,27 @@ options {
completes in 30 days, after which it will be safe to remove the
old key from the DNSKEY RRset.</p>
<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
-<a name="id2563836"></a>NSEC3PARAM rollovers via UPDATE</h3></div></div></div></div>
+<a name="id2563821"></a>NSEC3PARAM rollovers via UPDATE</h3></div></div></div></div>
<p>Add the new NSEC3PARAM record via dynamic update. When the
new NSEC3 chain has been generated, the NSEC3PARAM flag field
will be zero. At this point you can remove the old NSEC3PARAM
record. The old chain will be removed after the update request
completes.</p>
<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
-<a name="id2563846"></a>Converting from NSEC to NSEC3</h3></div></div></div></div>
+<a name="id2563899"></a>Converting from NSEC to NSEC3</h3></div></div></div></div>
<p>To do this, you just need to add an NSEC3PARAM record. When
the conversion is complete, the NSEC chain will have been removed
and the NSEC3PARAM record will have a zero flag field. The NSEC3
chain will be generated before the NSEC chain is
destroyed.</p>
<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
-<a name="id2563856"></a>Converting from NSEC3 to NSEC</h3></div></div></div></div>
+<a name="id2563909"></a>Converting from NSEC3 to NSEC</h3></div></div></div></div>
<p>To do this, use <span><strong class="command">nsupdate</strong></span> to
remove all NSEC3PARAM records with a zero flag
field. The NSEC chain will be generated before the NSEC3 chain is
removed.</p>
<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
-<a name="id2563868"></a>Converting from secure to insecure</h3></div></div></div></div>
+<a name="id2563922"></a>Converting from secure to insecure</h3></div></div></div></div>
<p>To convert a signed zone to unsigned using dynamic DNS,
delete all the DNSKEY records from the zone apex using
<span><strong class="command">nsupdate</strong></span>. All signatures, NSEC or NSEC3 chains,
@@ -1282,14 +1282,14 @@ options {
<span><strong class="command">allow</strong></span> instead (or it will re-sign).
</p>
<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
-<a name="id2563906"></a>Periodic re-signing</h3></div></div></div></div>
+<a name="id2571605"></a>Periodic re-signing</h3></div></div></div></div>
<p>In any secure zone which supports dynamic updates, named
will periodically re-sign RRsets which have not been re-signed as
a result of some update action. The signature lifetimes will be
adjusted so as to spread the re-sign load over time rather than
all at once.</p>
<div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title">
-<a name="id2563915"></a>NSEC3 and OPTOUT</h3></div></div></div></div>
+<a name="id2571614"></a>NSEC3 and OPTOUT</h3></div></div></div></div>
<p>
<span><strong class="command">named</strong></span> only supports creating new NSEC3 chains
where all the NSEC3 records in the zone have the same OPTOUT
@@ -1311,7 +1311,7 @@ options {
configuration files.</p>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2571685"></a>Validating Resolver</h3></div></div></div>
+<a name="id2607510"></a>Validating Resolver</h3></div></div></div>
<p>To configure a validating resolver to use RFC 5011 to
maintain a trust anchor, configure the trust anchor using a
<span><strong class="command">managed-keys</strong></span> statement. Information about
@@ -1322,7 +1322,7 @@ options {
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2571707"></a>Authoritative Server</h3></div></div></div>
+<a name="id2571692"></a>Authoritative Server</h3></div></div></div>
<p>To set up an authoritative zone for RFC 5011 trust anchor
maintenance, generate two (or more) key signing keys (KSKs) for
the zone. Sign the zone with one of them; this is the "active"
@@ -1396,7 +1396,7 @@ $ <strong class="userinput"><code>dnssec-signzone -S -K keys example.net</code><
Debian Linux, Solaris x86 and Windows Server 2003.</p>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2609970"></a>Prerequisites</h3></div></div></div>
+<a name="id2610637"></a>Prerequisites</h3></div></div></div>
<p>See the HSM vendor documentation for information about
installing, initializing, testing and troubleshooting the
HSM.</p>
@@ -1473,7 +1473,7 @@ $ <strong class="userinput"><code>patch -p1 -d openssl-0.9.8s \
when we configure BIND 9.</p>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2607881"></a>Building OpenSSL for the AEP Keyper on Linux</h4></div></div></div>
+<a name="id2608071"></a>Building OpenSSL for the AEP Keyper on Linux</h4></div></div></div>
<p>The AEP Keyper is a highly secure key storage device,
but does not provide hardware cryptographic acceleration. It
can carry out cryptographic operations, but it is probably
@@ -1505,7 +1505,7 @@ $ <strong class="userinput"><code>./Configure linux-generic32 -m32 -pthread \
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2608019"></a>Building OpenSSL for the SCA 6000 on Solaris</h4></div></div></div>
+<a name="id2608140"></a>Building OpenSSL for the SCA 6000 on Solaris</h4></div></div></div>
<p>The SCA-6000 PKCS #11 provider is installed as a system
library, libpkcs11. It is a true crypto accelerator, up to 4
times faster than any CPU, so the flavor shall be
@@ -1527,7 +1527,7 @@ $ <strong class="userinput"><code>./Configure solaris64-x86_64-cc \
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2608068"></a>Building OpenSSL for SoftHSM</h4></div></div></div>
+<a name="id2608189"></a>Building OpenSSL for SoftHSM</h4></div></div></div>
<p>SoftHSM is a software library provided by the OpenDNSSEC
project (http://www.opendnssec.org) which provides a PKCS#11
interface to a virtual HSM, implemented in the form of encrypted
@@ -1587,12 +1587,12 @@ $ <strong class="userinput"><code>./Configure linux-x86_64 -pthread \
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2608219"></a>Building BIND 9 with PKCS#11</h3></div></div></div>
+<a name="id2608477"></a>Building BIND 9 with PKCS#11</h3></div></div></div>
<p>When building BIND 9, the location of the custom-built
OpenSSL library must be specified via configure.</p>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2608228"></a>Configuring BIND 9 for Linux with the AEP Keyper</h4></div></div></div>
+<a name="id2608486"></a>Configuring BIND 9 for Linux with the AEP Keyper</h4></div></div></div>
<p>To link with the PKCS #11 provider, threads must be
enabled in the BIND 9 build.</p>
<p>The PKCS #11 library for the AEP Keyper is currently
@@ -1608,7 +1608,7 @@ $ <strong class="userinput"><code>./configure CC="gcc -m32" --enable-threads \
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2608260"></a>Configuring BIND 9 for Solaris with the SCA 6000</h4></div></div></div>
+<a name="id2608518"></a>Configuring BIND 9 for Solaris with the SCA 6000</h4></div></div></div>
<p>To link with the PKCS #11 provider, threads must be
enabled in the BIND 9 build.</p>
<pre class="screen">
@@ -1626,7 +1626,7 @@ $ <strong class="userinput"><code>./configure CC="cc -xarch=amd64" --enable-thre
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2610481"></a>Configuring BIND 9 for SoftHSM</h4></div></div></div>
+<a name="id2608554"></a>Configuring BIND 9 for SoftHSM</h4></div></div></div>
<pre class="screen">
$ <strong class="userinput"><code>cd ../bind9</code></strong>
$ <strong class="userinput"><code>./configure --enable-threads \
@@ -1643,7 +1643,7 @@ $ <strong class="userinput"><code>./configure --enable-threads \
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2610529"></a>PKCS #11 Tools</h3></div></div></div>
+<a name="id2608602"></a>PKCS #11 Tools</h3></div></div></div>
<p>BIND 9 includes a minimal set of tools to operate the
HSM, including
<span><strong class="command">pkcs11-keygen</strong></span> to generate a new key pair
@@ -1661,7 +1661,7 @@ $ <strong class="userinput"><code>./configure --enable-threads \
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2610560"></a>Using the HSM</h3></div></div></div>
+<a name="id2634916"></a>Using the HSM</h3></div></div></div>
<p>First, we must set up the runtime environment so the
OpenSSL and PKCS #11 libraries can be loaded:</p>
<pre class="screen">
@@ -1749,7 +1749,7 @@ example.net.signed
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2635129"></a>Specifying the engine on the command line</h3></div></div></div>
+<a name="id2635114"></a>Specifying the engine on the command line</h3></div></div></div>
<p>The OpenSSL engine can be specified in
<span><strong class="command">named</strong></span> and all of the BIND
<span><strong class="command">dnssec-*</strong></span> tools by using the "-E
@@ -1770,7 +1770,7 @@ $ <strong class="userinput"><code>dnssec-signzone -E '' -S example.net</code></s
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2635243"></a>Running named with automatic zone re-signing</h3></div></div></div>
+<a name="id2635160"></a>Running named with automatic zone re-signing</h3></div></div></div>
<p>If you want
<span><strong class="command">named</strong></span> to dynamically re-sign zones using HSM
keys, and/or to to sign new records inserted via nsupdate, then
diff --git a/contrib/bind9/doc/arm/Bv9ARM.ch06.html b/contrib/bind9/doc/arm/Bv9ARM.ch06.html
index 8e7bac3..bda489d 100644
--- a/contrib/bind9/doc/arm/Bv9ARM.ch06.html
+++ b/contrib/bind9/doc/arm/Bv9ARM.ch06.html
@@ -78,28 +78,28 @@
<dt><span class="sect2"><a href="Bv9ARM.ch06.html#server_statement_definition_and_usage"><span><strong class="command">server</strong></span> Statement Definition and
Usage</a></span></dt>
<dt><span class="sect2"><a href="Bv9ARM.ch06.html#statschannels"><span><strong class="command">statistics-channels</strong></span> Statement Grammar</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589481"><span><strong class="command">statistics-channels</strong></span> Statement Definition and
+<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589534"><span><strong class="command">statistics-channels</strong></span> Statement Definition and
Usage</a></span></dt>
<dt><span class="sect2"><a href="Bv9ARM.ch06.html#trusted-keys"><span><strong class="command">trusted-keys</strong></span> Statement Grammar</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589689"><span><strong class="command">trusted-keys</strong></span> Statement Definition
+<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589742"><span><strong class="command">trusted-keys</strong></span> Statement Definition
and Usage</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589736"><span><strong class="command">managed-keys</strong></span> Statement Grammar</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589858"><span><strong class="command">managed-keys</strong></span> Statement Grammar</a></span></dt>
<dt><span class="sect2"><a href="Bv9ARM.ch06.html#managed-keys"><span><strong class="command">managed-keys</strong></span> Statement Definition
and Usage</a></span></dt>
<dt><span class="sect2"><a href="Bv9ARM.ch06.html#view_statement_grammar"><span><strong class="command">view</strong></span> Statement Grammar</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2590162"><span><strong class="command">view</strong></span> Statement Definition and Usage</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2590352"><span><strong class="command">view</strong></span> Statement Definition and Usage</a></span></dt>
<dt><span class="sect2"><a href="Bv9ARM.ch06.html#zone_statement_grammar"><span><strong class="command">zone</strong></span>
Statement Grammar</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2591713"><span><strong class="command">zone</strong></span> Statement Definition and Usage</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2591902"><span><strong class="command">zone</strong></span> Statement Definition and Usage</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="Bv9ARM.ch06.html#id2595116">Zone File</a></span></dt>
+<dt><span class="sect1"><a href="Bv9ARM.ch06.html#id2595170">Zone File</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="Bv9ARM.ch06.html#types_of_resource_records_and_when_to_use_them">Types of Resource Records and When to Use Them</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2597415">Discussion of MX Records</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2597537">Discussion of MX Records</a></span></dt>
<dt><span class="sect2"><a href="Bv9ARM.ch06.html#Setting_TTLs">Setting TTLs</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2597962">Inverse Mapping in IPv4</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2598157">Other Zone File Directives</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2598430"><acronym class="acronym">BIND</acronym> Master File Extension: the <span><strong class="command">$GENERATE</strong></span> Directive</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2598084">Inverse Mapping in IPv4</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2598211">Other Zone File Directives</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2598552"><acronym class="acronym">BIND</acronym> Master File Extension: the <span><strong class="command">$GENERATE</strong></span> Directive</a></span></dt>
<dt><span class="sect2"><a href="Bv9ARM.ch06.html#zonefile_format">Additional File Formats</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="Bv9ARM.ch06.html#statistics">BIND9 Statistics</a></span></dt>
@@ -2277,7 +2277,11 @@ badresp:1,adberr:0,findfail:0,valfail:0]
[<span class="optional"> resolver-query-timeout <em class="replaceable"><code>number</code></em> ; </span>]
[<span class="optional"> deny-answer-addresses { <em class="replaceable"><code>address_match_list</code></em> } [<span class="optional"> except-from { <em class="replaceable"><code>namelist</code></em> } </span>];</span>]
[<span class="optional"> deny-answer-aliases { <em class="replaceable"><code>namelist</code></em> } [<span class="optional"> except-from { <em class="replaceable"><code>namelist</code></em> } </span>];</span>]
- [<span class="optional"> response-policy { <em class="replaceable"><code>zone_name</code></em> [<span class="optional"> policy given | disabled | passthru | nxdomain | nodata | cname <em class="replaceable"><code>domain</code></em> </span>] ; } ; </span>]
+ [<span class="optional"> response-policy { <em class="replaceable"><code>zone_name</code></em>
+ [<span class="optional"> policy given | disabled | passthru | nxdomain | nodata | cname <em class="replaceable"><code>domain</code></em> </span>]
+ [<span class="optional"> recursive-only <em class="replaceable"><code>yes_or_no</code></em> </span>] [<span class="optional"> max-policy-ttl <em class="replaceable"><code>number</code></em> </span>] ;
+ } [<span class="optional"> recursive-only <em class="replaceable"><code>yes_or_no</code></em> </span>] [<span class="optional"> max-policy-ttl <em class="replaceable"><code>number</code></em> </span>]
+ [<span class="optional"> break-dnssec <em class="replaceable"><code>yes_or_no</code></em> </span>] ; </span>]
};
</pre>
</div>
@@ -3665,7 +3669,7 @@ options {
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2583643"></a>Forwarding</h4></div></div></div>
+<a name="id2583675"></a>Forwarding</h4></div></div></div>
<p>
The forwarding facility can be used to create a large site-wide
cache on a few servers, reducing traffic over links to external
@@ -3709,7 +3713,7 @@ options {
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2583702"></a>Dual-stack Servers</h4></div></div></div>
+<a name="id2583734"></a>Dual-stack Servers</h4></div></div></div>
<p>
Dual-stack servers are used as servers of last resort to work
around
@@ -3911,8 +3915,8 @@ options {
<dt><span class="term"><span><strong class="command">resolver-query-timeout</strong></span></span></dt>
<dd><p>
The amount of time the resolver will spend attempting
- to resolve a recursive query before failing. The
- default is <code class="literal">10</code> and the maximum is
+ to resolve a recursive query before failing. The default
+ and minimum is <code class="literal">10</code> and the maximum is
<code class="literal">30</code>. Setting it to <code class="literal">0</code>
will result in the default being used.
</p></dd>
@@ -3920,7 +3924,7 @@ options {
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2584322"></a>Interfaces</h4></div></div></div>
+<a name="id2584422"></a>Interfaces</h4></div></div></div>
<p>
The interfaces and ports that the server will answer queries
from may be specified using the <span><strong class="command">listen-on</strong></span> option. <span><strong class="command">listen-on</strong></span> takes
@@ -4379,7 +4383,7 @@ avoid-v6-udp-ports {};
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2585531"></a>UDP Port Lists</h4></div></div></div>
+<a name="id2585495"></a>UDP Port Lists</h4></div></div></div>
<p>
<span><strong class="command">use-v4-udp-ports</strong></span>,
<span><strong class="command">avoid-v4-udp-ports</strong></span>,
@@ -4421,7 +4425,7 @@ avoid-v6-udp-ports { 40000; range 50000 60000; };
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2585591"></a>Operating System Resource Limits</h4></div></div></div>
+<a name="id2585555"></a>Operating System Resource Limits</h4></div></div></div>
<p>
The server's usage of many system resources can be limited.
Scaled values are allowed when specifying resource limits. For
@@ -4583,7 +4587,7 @@ avoid-v6-udp-ports { 40000; range 50000 60000; };
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2586082"></a>Periodic Task Intervals</h4></div></div></div>
+<a name="id2586114"></a>Periodic Task Intervals</h4></div></div></div>
<div class="variablelist"><dl>
<dt><span class="term"><span><strong class="command">cleaning-interval</strong></span></span></dt>
<dd><p>
@@ -5423,7 +5427,7 @@ avoid-v6-udp-ports { 40000; range 50000 60000; };
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2588188"></a>Content Filtering</h4></div></div></div>
+<a name="id2588152"></a>Content Filtering</h4></div></div></div>
<p>
<acronym class="acronym">BIND</acronym> 9 provides the ability to filter
out DNS responses from external DNS servers containing
@@ -5546,18 +5550,16 @@ deny-answer-aliases { "example.net"; };
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2588379"></a>Response Policy Zone (RPZ) Rewriting</h4></div></div></div>
+<a name="id2588343"></a>Response Policy Zone (RPZ) Rewriting</h4></div></div></div>
<p>
- <acronym class="acronym">BIND</acronym> 9 includes an intentionally limited
- mechanism to modify DNS responses for recursive requests
- somewhat similar to email anti-spam DNS blacklists.
+ <acronym class="acronym">BIND</acronym> 9 includes a limited
+ mechanism to modify DNS responses for requests
+ analogous to email anti-spam DNS blacklists.
Responses can be changed to deny the existence of domains(NXDOMAIN),
deny the existence of IP addresses for domains (NODATA),
or contain other IP addresses or data.
</p>
<p>
- The actions encoded in a response policy zone (RPZ) are applied
- only to queries that ask for recursion (RD=1).
Response policy zones are named in the
<span><strong class="command">response-policy</strong></span> option for the view or among the
global options if there is no response-policy option for the view.
@@ -5567,21 +5569,20 @@ deny-answer-aliases { "example.net"; };
<span><strong class="command">allow-query { localhost; };</strong></span>.
</p>
<p>
- There are four kinds of RPZ records, QNAME, IP, NSIP,
+ Four policy triggers are encoded in RPZ records, QNAME, IP, NSIP,
and NSDNAME.
- QNAME records are applied to query names of requests and targets
+ QNAME RPZ records triggered by query names of requests and targets
of CNAME records resolved to generate the response.
The owner name of a QNAME RPZ record is the query name relativized
to the RPZ.
</p>
<p>
- The second kind of RPZ record, an IP policy record,
- is triggered by addresses in A and AAAA records
- for the ANSWER sections of responses.
- IP policy records have owner names that are
- subdomains of <strong class="userinput"><code>rpz-ip</code></strong> relativized to the
- RPZ origin name and encode an IP address or address block.
- IPv4 addresses are encoded as
+ The second kind of RPZ trigger is an IP address in an A and AAAA
+ record in the ANSWER section of a response.
+ IP address triggers are encoded in records that have owner names
+ that are subdomains of <strong class="userinput"><code>rpz-ip</code></strong> relativized
+ to the RPZ origin name and encode an IP address or address block.
+ IPv4 trigger addresses are represented as
<strong class="userinput"><code>prefixlength.B4.B3.B2.B1.rpz-ip</code></strong>.
The prefix length must be between 1 and 32.
All four bytes, B4, B3, B2, and B1, must be present.
@@ -5599,42 +5600,44 @@ deny-answer-aliases { "example.net"; };
The prefix length must be between 1 and 128.
</p>
<p>
- NSDNAME policy records match names of authoritative servers
- for the query name, a parent of the query name, a CNAME,
- or a parent of a CNAME.
+ NSDNAME triggers match names of authoritative servers
+ for the query name, a parent of the query name, a CNAME for
+ query name, or a parent of a CNAME.
They are encoded as subdomains of
<strong class="userinput"><code>rpz-nsdomain</code></strong> relativized
to the RPZ origin name.
</p>
<p>
- NSIP policy records match IP addresses in A and AAAA RRsets
- for domains that can be checked against NSDNAME policy records.
- The are encoded like IP policies except as subdomains of
+ NSIP triggers match IP addresses in A and
+ AAAA RRsets for domains that can be checked against NSDNAME
+ policy records.
+ NSIP triggers are encoded like IP triggers except as subdomains of
<strong class="userinput"><code>rpz-nsip</code></strong>.
</p>
<p>
The query response is checked against all RPZs, so
- two or more policy records can apply to a single response.
- Because DNS responses can be rewritten according by at most a
- single policy record, a single policy (other than
- <span><strong class="command">DISABLED</strong></span> policies) must be chosen.
- Policies are chosen in the following order:
+ two or more policy records can be triggered by a response.
+ Because DNS responses can be rewritten according to at most one
+ policy record, a single record encoding an action (other than
+ <span><strong class="command">DISABLED</strong></span> actions) must be chosen.
+ Triggers or the records that encode them are chosen in
+ the following order:
</p>
<div class="itemizedlist"><ul type="disc">
-<li>Among applicable zones, use the RPZ that appears first
- in the response-policy option.
+<li>Choose the triggered record in the zone that appears
+ first in the response-policy option.
</li>
-<li>Prefer QNAME to IP to NSDNAME to NSIP policy records
- in a single RPZ
+<li>Prefer QNAME to IP to NSDNAME to NSIP triggers
+ in a single zone.
</li>
-<li>Among applicable NSDNAME policy records, prefer the
- policy record that matches the lexically smallest name
+<li>Among NSDNAME triggers, prefer the
+ trigger that matches the smallest name under the DNSSEC ordering.
</li>
-<li>Among IP or NSIP policy records, prefer the record
+<li>Among IP or NSIP triggers, prefer the trigger
with the longest prefix.
</li>
-<li>Among records with the same prefex length,
- prefer the IP or NSIP policy record that matches
+<li>Among triggers with the same prefex length,
+ prefer the IP or NSIP trigger that matches
the smallest IP address.
</li>
</ul></div>
@@ -5642,8 +5645,8 @@ deny-answer-aliases { "example.net"; };
</p>
<p>
When the processing of a response is restarted to resolve
- DNAME or CNAME records and an applicable policy record set has
- not been found,
+ DNAME or CNAME records and a policy record set has
+ not been triggered,
all RPZs are again consulted for the DNAME or CNAME names
and addresses.
</p>
@@ -5658,59 +5661,60 @@ deny-answer-aliases { "example.net"; };
on the "configure" command line.
</p>
<p>
- RPZ record sets are special CNAME records or one or more
- of any types of DNS record except DNAME or DNSSEC.
- Except when a policy record is a CNAME, there can be more
- more than one record and more than one type
- in a set of policy records.
- Except for three kinds of CNAME records that are illegal except
- in policy zones, the records in a set are used in the response as if
- their owner name were the query name. They are copied to the
- response as dictated by their types.
+ RPZ record sets are sets of any types of DNS record except
+ DNAME or DNSSEC that encode actions or responses to queries.
</p>
<div class="itemizedlist"><ul type="disc">
-<li>A CNAME whose target is the root domain (.)
- specifies the <span><strong class="command">NXDOMAIN</strong></span> policy,
- which generates an NXDOMAIN response.
+<li>The <span><strong class="command">NXDOMAIN</strong></span> response is encoded
+ by a CNAME whose target is the root domain (.)
</li>
<li>A CNAME whose target is the wildcard top-level
- domain (*.) specifies the <span><strong class="command">NODATA</strong></span> policy,
+ domain (*.) specifies the <span><strong class="command">NODATA</strong></span> action,
which rewrites the response to NODATA or ANCOUNT=1.
</li>
-<li>A CNAME whose target is a wildcard hostname such
- as *.example.com is used normally after the astrisk (*)
+<li>The <span><strong class="command">Local Data</strong></span> action is
+ represented by a set ordinary DNS records that are used
+ to answer queries. Queries for record types not the
+ set are answered with NODATA.
+
+ A special form of local data is a CNAME whose target is a
+ wildcard such as *.example.com.
+ It is used as if were an ordinary CNAME after the astrisk (*)
has been replaced with the query name.
- These records are usually resolved with ordinary CNAMEs
- outside the policy zones. They can be useful for logging.
+ The purpose for this special form is query logging in the
+ walled garden's authority DNS server.
</li>
<li>The <span><strong class="command">PASSTHRU</strong></span> policy is specified
- by a CNAME whose target is the variable part of its own
- owner name. It causes the response to not be rewritten
+ by a CNAME whose target is <span><strong class="command">rpz_passthru.</strong></span>
+ It causes the response to not be rewritten
and is most often used to "poke holes" in policies for
CIDR blocks.
+ (A CNAME whose target is the variable part of its owner name
+ is an obsolete specification of the PASSTHRU policy.)
</li>
</ul></div>
<p>
</p>
<p>
- The policies specified in individual records
- in an RPZ can be overridden with a <span><strong class="command">policy</strong></span> clause
- in the <span><strong class="command">response-policy</strong></span> option.
+ The actions specified in an RPZ can be overridden with a
+ <span><strong class="command">policy</strong></span> clause in the
+ <span><strong class="command">response-policy</strong></span> option.
An organization using an RPZ provided by another organization might
use this mechanism to redirect domains to its own walled garden.
</p>
<div class="itemizedlist"><ul type="disc">
<li>
-<span><strong class="command">GIVEN</strong></span> says "do not override."
+<span><strong class="command">GIVEN</strong></span> says "do not override but
+ perform the action specified in the zone."
</li>
<li>
<span><strong class="command">DISABLED</strong></span> causes policy records to do
nothing but log what they might have done.
The response to the DNS query will be written according to
- any matching policy records that are not disabled.
- Policy zones overridden with <span><strong class="command">DISABLED</strong></span> should
- appear first, because they will often not be logged
- if a higher precedence policy is found first.
+ any triggered policy records that are not disabled.
+ Disabled policy zones should appear first,
+ because they will often not be logged
+ if a higher precedence trigger is found first.
</li>
<li>
<span><strong class="command">PASSTHRU</strong></span> causes all policy records
@@ -5734,6 +5738,34 @@ deny-answer-aliases { "example.net"; };
<p>
</p>
<p>
+ By default, the actions encoded in an RPZ are applied
+ only to queries that ask for recursion (RD=1).
+ That default can be changed for a single RPZ or all RPZs in a view
+ with a <span><strong class="command">recursive-only no</strong></span> clause.
+ This feature is useful for serving the same zone files
+ both inside and outside an RFC 1918 cloud and using RPZ to
+ delete answers that would otherwise contain RFC 1918 values
+ on the externally visible name server or view.
+ </p>
+<p>
+ Also by default, RPZ actions are applied only to DNS requests that
+ either do not request DNSSEC metadata (DO=0) or when no DNSSEC
+ records are available for request name in the original zone (not
+ the response policy zone).
+ This default can be changed for all RPZs in a view with a
+ <span><strong class="command">break-dnssec yes</strong></span> clause.
+ In that case, RPZ actions are applied regardless of DNSSEC.
+ The name of the clause option reflects the fact that results
+ rewritten by RPZ actions cannot verify.
+ </p>
+<p>
+ The TTL of a record modified by RPZ policies is set from the
+ TTL of the relevant record in policy zone. It is then limited
+ to a maximum value.
+ The <span><strong class="command">max-policy-ttl</strong></span> clause changes that
+ maximum from its default of 5.
+ </p>
+<p>
For example, you might use this option statement
</p>
<pre class="programlisting"> response-policy { zone "badlist"; };</pre>
@@ -5755,7 +5787,7 @@ bad.domain.com A 10.0.0.1 ; redirect to a walled garden
AAAA 2001:2::1
; do not rewrite (PASSTHRU) OK.DOMAIN.COM
-ok.domain.com CNAME ok.domain.com.
+ok.domain.com CNAME rpz-passthru.
bzone.domain.com CNAME garden.example.com.
@@ -5765,7 +5797,7 @@ bzone.domain.com CNAME garden.example.com.
; IP policy records that rewrite all answers for 127/8 except 127.0.0.1
8.0.0.0.127.rpz-ip CNAME .
-32.1.0.0.127.rpz-ip CNAME 32.1.0.0.127. ; PASSTHRU for 127.0.0.1
+32.1.0.0.127.rpz-ip CNAME rpz-passthru.
; NSDNAME and NSIP policy records
ns.domain.com.rpz-nsdname CNAME .
@@ -5981,7 +6013,7 @@ ns.domain.com.rpz-nsdname CNAME .
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2589481"></a><span><strong class="command">statistics-channels</strong></span> Statement Definition and
+<a name="id2589534"></a><span><strong class="command">statistics-channels</strong></span> Statement Definition and
Usage</h3></div></div></div>
<p>
The <span><strong class="command">statistics-channels</strong></span> statement
@@ -6041,7 +6073,7 @@ ns.domain.com.rpz-nsdname CNAME .
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2589689"></a><span><strong class="command">trusted-keys</strong></span> Statement Definition
+<a name="id2589742"></a><span><strong class="command">trusted-keys</strong></span> Statement Definition
and Usage</h3></div></div></div>
<p>
The <span><strong class="command">trusted-keys</strong></span> statement defines
@@ -6081,7 +6113,7 @@ ns.domain.com.rpz-nsdname CNAME .
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2589736"></a><span><strong class="command">managed-keys</strong></span> Statement Grammar</h3></div></div></div>
+<a name="id2589858"></a><span><strong class="command">managed-keys</strong></span> Statement Grammar</h3></div></div></div>
<pre class="programlisting"><span><strong class="command">managed-keys</strong></span> {
<em class="replaceable"><code>string</code></em> initial-key <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>string</code></em> ;
[<span class="optional"> <em class="replaceable"><code>string</code></em> initial-key <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>string</code></em> ; [<span class="optional">...</span>]</span>]
@@ -6216,7 +6248,7 @@ ns.domain.com.rpz-nsdname CNAME .
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2590162"></a><span><strong class="command">view</strong></span> Statement Definition and Usage</h3></div></div></div>
+<a name="id2590352"></a><span><strong class="command">view</strong></span> Statement Definition and Usage</h3></div></div></div>
<p>
The <span><strong class="command">view</strong></span> statement is a powerful
feature
@@ -6505,10 +6537,10 @@ zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2591713"></a><span><strong class="command">zone</strong></span> Statement Definition and Usage</h3></div></div></div>
+<a name="id2591902"></a><span><strong class="command">zone</strong></span> Statement Definition and Usage</h3></div></div></div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2591720"></a>Zone Types</h4></div></div></div>
+<a name="id2591910"></a>Zone Types</h4></div></div></div>
<div class="informaltable"><table border="1">
<colgroup>
<col>
@@ -6768,7 +6800,7 @@ zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2592402"></a>Class</h4></div></div></div>
+<a name="id2592455"></a>Class</h4></div></div></div>
<p>
The zone's name may optionally be followed by a class. If
a class is not specified, class <code class="literal">IN</code> (for <code class="varname">Internet</code>),
@@ -6790,7 +6822,7 @@ zone <em class="replaceable"><code>zone_name</code></em> [<span class="optional"
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2592503"></a>Zone Options</h4></div></div></div>
+<a name="id2592488"></a>Zone Options</h4></div></div></div>
<div class="variablelist"><dl>
<dt><span class="term"><span><strong class="command">allow-notify</strong></span></span></dt>
<dd><p>
@@ -7506,7 +7538,7 @@ example.com. NS ns2.example.net.
(machine$@REALM) for machine in REALM and
and converts it machine.realm allowing the machine
to update machine.realm. The REALM to be matched
- is specified in the <font color="red">&lt;replacable&gt;identity&lt;/replacable&gt;</font>
+ is specified in the <em class="replaceable"><code>identity</code></em>
field.
</p>
</td>
@@ -7524,7 +7556,7 @@ example.com. NS ns2.example.net.
converts it to machine.realm allowing the machine
to update subdomains of machine.realm. The REALM
to be matched is specified in the
- <font color="red">&lt;replacable&gt;identity&lt;/replacable&gt;</font> field.
+ <em class="replaceable"><code>identity</code></em> field.
</p>
</td>
</tr>
@@ -7540,7 +7572,7 @@ example.com. NS ns2.example.net.
(host/machine@REALM) for machine in REALM and
and converts it machine.realm allowing the machine
to update machine.realm. The REALM to be matched
- is specified in the <font color="red">&lt;replacable&gt;identity&lt;/replacable&gt;</font>
+ is specified in the <em class="replaceable"><code>identity</code></em>
field.
</p>
</td>
@@ -7558,7 +7590,7 @@ example.com. NS ns2.example.net.
converts it to machine.realm allowing the machine
to update subdomains of machine.realm. The REALM
to be matched is specified in the
- <font color="red">&lt;replacable&gt;identity&lt;/replacable&gt;</font> field.
+ <em class="replaceable"><code>identity</code></em> field.
</p>
</td>
</tr>
@@ -7667,7 +7699,7 @@ example.com. NS ns2.example.net.
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2595116"></a>Zone File</h2></div></div></div>
+<a name="id2595170"></a>Zone File</h2></div></div></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="types_of_resource_records_and_when_to_use_them"></a>Types of Resource Records and When to Use Them</h3></div></div></div>
@@ -7680,7 +7712,7 @@ example.com. NS ns2.example.net.
</p>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2595134"></a>Resource Records</h4></div></div></div>
+<a name="id2595188"></a>Resource Records</h4></div></div></div>
<p>
A domain name identifies a node. Each node has a set of
resource information, which may be empty. The set of resource
@@ -8417,7 +8449,7 @@ example.com. NS ns2.example.net.
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2596826"></a>Textual expression of RRs</h4></div></div></div>
+<a name="id2596880"></a>Textual expression of RRs</h4></div></div></div>
<p>
RRs are represented in binary form in the packets of the DNS
protocol, and are usually represented in highly encoded form
@@ -8620,7 +8652,7 @@ example.com. NS ns2.example.net.
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2597415"></a>Discussion of MX Records</h3></div></div></div>
+<a name="id2597537"></a>Discussion of MX Records</h3></div></div></div>
<p>
As described above, domain servers store information as a
series of resource records, each of which contains a particular
@@ -8876,7 +8908,7 @@ example.com. NS ns2.example.net.
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2597962"></a>Inverse Mapping in IPv4</h3></div></div></div>
+<a name="id2598084"></a>Inverse Mapping in IPv4</h3></div></div></div>
<p>
Reverse name resolution (that is, translation from IP address
to name) is achieved by means of the <span class="emphasis"><em>in-addr.arpa</em></span> domain
@@ -8937,7 +8969,7 @@ example.com. NS ns2.example.net.
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2598157"></a>Other Zone File Directives</h3></div></div></div>
+<a name="id2598211"></a>Other Zone File Directives</h3></div></div></div>
<p>
The Master File Format was initially defined in RFC 1035 and
has subsequently been extended. While the Master File Format
@@ -8952,7 +8984,7 @@ example.com. NS ns2.example.net.
</p>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2598180"></a>The <span><strong class="command">@</strong></span> (at-sign)</h4></div></div></div>
+<a name="id2598233"></a>The <span><strong class="command">@</strong></span> (at-sign)</h4></div></div></div>
<p>
When used in the label (or name) field, the asperand or
at-sign (@) symbol represents the current origin.
@@ -8963,7 +8995,7 @@ example.com. NS ns2.example.net.
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2598196"></a>The <span><strong class="command">$ORIGIN</strong></span> Directive</h4></div></div></div>
+<a name="id2598249"></a>The <span><strong class="command">$ORIGIN</strong></span> Directive</h4></div></div></div>
<p>
Syntax: <span><strong class="command">$ORIGIN</strong></span>
<em class="replaceable"><code>domain-name</code></em>
@@ -8992,7 +9024,7 @@ WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMPLE.COM.
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2598325"></a>The <span><strong class="command">$INCLUDE</strong></span> Directive</h4></div></div></div>
+<a name="id2598446"></a>The <span><strong class="command">$INCLUDE</strong></span> Directive</h4></div></div></div>
<p>
Syntax: <span><strong class="command">$INCLUDE</strong></span>
<em class="replaceable"><code>filename</code></em>
@@ -9028,7 +9060,7 @@ WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMPLE.COM.
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2598394"></a>The <span><strong class="command">$TTL</strong></span> Directive</h4></div></div></div>
+<a name="id2598516"></a>The <span><strong class="command">$TTL</strong></span> Directive</h4></div></div></div>
<p>
Syntax: <span><strong class="command">$TTL</strong></span>
<em class="replaceable"><code>default-ttl</code></em>
@@ -9047,7 +9079,7 @@ WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMPLE.COM.
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2598430"></a><acronym class="acronym">BIND</acronym> Master File Extension: the <span><strong class="command">$GENERATE</strong></span> Directive</h3></div></div></div>
+<a name="id2598552"></a><acronym class="acronym">BIND</acronym> Master File Extension: the <span><strong class="command">$GENERATE</strong></span> Directive</h3></div></div></div>
<p>
Syntax: <span><strong class="command">$GENERATE</strong></span>
<em class="replaceable"><code>range</code></em>
@@ -9471,7 +9503,7 @@ HOST-127.EXAMPLE. MX 0 .
</p>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2599384"></a>Name Server Statistics Counters</h4></div></div></div>
+<a name="id2599437"></a>Name Server Statistics Counters</h4></div></div></div>
<div class="informaltable"><table border="1">
<colgroup>
<col>
@@ -10028,7 +10060,7 @@ HOST-127.EXAMPLE. MX 0 .
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2600857"></a>Zone Maintenance Statistics Counters</h4></div></div></div>
+<a name="id2601047"></a>Zone Maintenance Statistics Counters</h4></div></div></div>
<div class="informaltable"><table border="1">
<colgroup>
<col>
@@ -10182,7 +10214,7 @@ HOST-127.EXAMPLE. MX 0 .
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2601308"></a>Resolver Statistics Counters</h4></div></div></div>
+<a name="id2601498"></a>Resolver Statistics Counters</h4></div></div></div>
<div class="informaltable"><table border="1">
<colgroup>
<col>
@@ -10565,7 +10597,7 @@ HOST-127.EXAMPLE. MX 0 .
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2602398"></a>Socket I/O Statistics Counters</h4></div></div></div>
+<a name="id2602588"></a>Socket I/O Statistics Counters</h4></div></div></div>
<p>
Socket I/O statistics counters are defined per socket
types, which are
@@ -10720,7 +10752,7 @@ HOST-127.EXAMPLE. MX 0 .
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2602840"></a>Compatibility with <span class="emphasis"><em>BIND</em></span> 8 Counters</h4></div></div></div>
+<a name="id2602962"></a>Compatibility with <span class="emphasis"><em>BIND</em></span> 8 Counters</h4></div></div></div>
<p>
Most statistics counters that were available
in <span><strong class="command">BIND</strong></span> 8 are also supported in
diff --git a/contrib/bind9/doc/arm/Bv9ARM.ch07.html b/contrib/bind9/doc/arm/Bv9ARM.ch07.html
index 3900f70..3e0dc22 100644
--- a/contrib/bind9/doc/arm/Bv9ARM.ch07.html
+++ b/contrib/bind9/doc/arm/Bv9ARM.ch07.html
@@ -46,10 +46,10 @@
<p><b>Table of Contents</b></p>
<dl>
<dt><span class="sect1"><a href="Bv9ARM.ch07.html#Access_Control_Lists">Access Control Lists</a></span></dt>
-<dt><span class="sect1"><a href="Bv9ARM.ch07.html#id2603082"><span><strong class="command">Chroot</strong></span> and <span><strong class="command">Setuid</strong></span></a></span></dt>
+<dt><span class="sect1"><a href="Bv9ARM.ch07.html#id2603136"><span><strong class="command">Chroot</strong></span> and <span><strong class="command">Setuid</strong></span></a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="Bv9ARM.ch07.html#id2603232">The <span><strong class="command">chroot</strong></span> Environment</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch07.html#id2603291">Using the <span><strong class="command">setuid</strong></span> Function</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch07.html#id2603285">The <span><strong class="command">chroot</strong></span> Environment</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch07.html#id2603345">Using the <span><strong class="command">setuid</strong></span> Function</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="Bv9ARM.ch07.html#dynamic_update_security">Dynamic Update Security</a></span></dt>
</dl>
@@ -121,7 +121,7 @@ zone "example.com" {
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2603082"></a><span><strong class="command">Chroot</strong></span> and <span><strong class="command">Setuid</strong></span>
+<a name="id2603136"></a><span><strong class="command">Chroot</strong></span> and <span><strong class="command">Setuid</strong></span>
</h2></div></div></div>
<p>
On UNIX servers, it is possible to run <acronym class="acronym">BIND</acronym>
@@ -147,7 +147,7 @@ zone "example.com" {
</p>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2603232"></a>The <span><strong class="command">chroot</strong></span> Environment</h3></div></div></div>
+<a name="id2603285"></a>The <span><strong class="command">chroot</strong></span> Environment</h3></div></div></div>
<p>
In order for a <span><strong class="command">chroot</strong></span> environment
to
@@ -175,7 +175,7 @@ zone "example.com" {
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2603291"></a>Using the <span><strong class="command">setuid</strong></span> Function</h3></div></div></div>
+<a name="id2603345"></a>Using the <span><strong class="command">setuid</strong></span> Function</h3></div></div></div>
<p>
Prior to running the <span><strong class="command">named</strong></span> daemon,
use
diff --git a/contrib/bind9/doc/arm/Bv9ARM.ch08.html b/contrib/bind9/doc/arm/Bv9ARM.ch08.html
index 8a59dc6..7205d5b 100644
--- a/contrib/bind9/doc/arm/Bv9ARM.ch08.html
+++ b/contrib/bind9/doc/arm/Bv9ARM.ch08.html
@@ -45,18 +45,18 @@
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="Bv9ARM.ch08.html#id2603371">Common Problems</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch08.html#id2603377">It's not working; how can I figure out what's wrong?</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="Bv9ARM.ch08.html#id2603388">Incrementing and Changing the Serial Number</a></span></dt>
-<dt><span class="sect1"><a href="Bv9ARM.ch08.html#id2603405">Where Can I Get Help?</a></span></dt>
+<dt><span class="sect1"><a href="Bv9ARM.ch08.html#id2603561">Common Problems</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch08.html#id2603566">It's not working; how can I figure out what's wrong?</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="Bv9ARM.ch08.html#id2603578">Incrementing and Changing the Serial Number</a></span></dt>
+<dt><span class="sect1"><a href="Bv9ARM.ch08.html#id2603595">Where Can I Get Help?</a></span></dt>
</dl>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2603371"></a>Common Problems</h2></div></div></div>
+<a name="id2603561"></a>Common Problems</h2></div></div></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2603377"></a>It's not working; how can I figure out what's wrong?</h3></div></div></div>
+<a name="id2603566"></a>It's not working; how can I figure out what's wrong?</h3></div></div></div>
<p>
The best solution to solving installation and
configuration issues is to take preventative measures by setting
@@ -68,7 +68,7 @@
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2603388"></a>Incrementing and Changing the Serial Number</h2></div></div></div>
+<a name="id2603578"></a>Incrementing and Changing the Serial Number</h2></div></div></div>
<p>
Zone serial numbers are just numbers &#8212; they aren't
date related. A lot of people set them to a number that
@@ -95,7 +95,7 @@
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2603405"></a>Where Can I Get Help?</h2></div></div></div>
+<a name="id2603595"></a>Where Can I Get Help?</h2></div></div></div>
<p>
The Internet Systems Consortium
(<acronym class="acronym">ISC</acronym>) offers a wide range
diff --git a/contrib/bind9/doc/arm/Bv9ARM.ch09.html b/contrib/bind9/doc/arm/Bv9ARM.ch09.html
index d627284..3a4245f 100644
--- a/contrib/bind9/doc/arm/Bv9ARM.ch09.html
+++ b/contrib/bind9/doc/arm/Bv9ARM.ch09.html
@@ -45,31 +45,31 @@
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="sect1"><a href="Bv9ARM.ch09.html#id2603536">Acknowledgments</a></span></dt>
+<dt><span class="sect1"><a href="Bv9ARM.ch09.html#id2603657">Acknowledgments</a></span></dt>
<dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch09.html#historical_dns_information">A Brief History of the <acronym class="acronym">DNS</acronym> and <acronym class="acronym">BIND</acronym></a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="Bv9ARM.ch09.html#id2603707">General <acronym class="acronym">DNS</acronym> Reference Information</a></span></dt>
+<dt><span class="sect1"><a href="Bv9ARM.ch09.html#id2603761">General <acronym class="acronym">DNS</acronym> Reference Information</a></span></dt>
<dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch09.html#ipv6addresses">IPv6 addresses (AAAA)</a></span></dt></dl></dd>
<dt><span class="sect1"><a href="Bv9ARM.ch09.html#bibliography">Bibliography (and Suggested Reading)</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="Bv9ARM.ch09.html#rfcs">Request for Comments (RFCs)</a></span></dt>
<dt><span class="sect2"><a href="Bv9ARM.ch09.html#internet_drafts">Internet Drafts</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2607124">Other Documents About <acronym class="acronym">BIND</acronym></a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2607177">Other Documents About <acronym class="acronym">BIND</acronym></a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="Bv9ARM.ch09.html#bind9.library">BIND 9 DNS Library Support</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608280">Prerequisite</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608290">Compilation</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608314">Installation</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608345">Known Defects/Restrictions</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608422">The dns.conf File</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608449">Sample Applications</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2609490">Library References</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608265">Prerequisite</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608275">Compilation</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608299">Installation</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608330">Known Defects/Restrictions</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608680">The dns.conf File</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608707">Sample Applications</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2609611">Library References</a></span></dt>
</dl></dd>
</dl>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2603536"></a>Acknowledgments</h2></div></div></div>
+<a name="id2603657"></a>Acknowledgments</h2></div></div></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="historical_dns_information"></a>A Brief History of the <acronym class="acronym">DNS</acronym> and <acronym class="acronym">BIND</acronym>
@@ -172,7 +172,7 @@
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2603707"></a>General <acronym class="acronym">DNS</acronym> Reference Information</h2></div></div></div>
+<a name="id2603761"></a>General <acronym class="acronym">DNS</acronym> Reference Information</h2></div></div></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="ipv6addresses"></a>IPv6 addresses (AAAA)</h3></div></div></div>
@@ -260,17 +260,17 @@
</p>
<div class="bibliography">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2603895"></a>Bibliography</h4></div></div></div>
+<a name="id2604017"></a>Bibliography</h4></div></div></div>
<div class="bibliodiv">
<h3 class="title">Standards</h3>
<div class="biblioentry">
-<a name="id2603906"></a><p>[<abbr class="abbrev">RFC974</abbr>] <span class="author"><span class="firstname">C.</span> <span class="surname">Partridge</span>. </span><span class="title"><i>Mail Routing and the Domain System</i>. </span><span class="pubdate">January 1986. </span></p>
+<a name="id2604027"></a><p>[<abbr class="abbrev">RFC974</abbr>] <span class="author"><span class="firstname">C.</span> <span class="surname">Partridge</span>. </span><span class="title"><i>Mail Routing and the Domain System</i>. </span><span class="pubdate">January 1986. </span></p>
</div>
<div class="biblioentry">
-<a name="id2603929"></a><p>[<abbr class="abbrev">RFC1034</abbr>] <span class="author"><span class="firstname">P.V.</span> <span class="surname">Mockapetris</span>. </span><span class="title"><i>Domain Names &#8212; Concepts and Facilities</i>. </span><span class="pubdate">November 1987. </span></p>
+<a name="id2604051"></a><p>[<abbr class="abbrev">RFC1034</abbr>] <span class="author"><span class="firstname">P.V.</span> <span class="surname">Mockapetris</span>. </span><span class="title"><i>Domain Names &#8212; Concepts and Facilities</i>. </span><span class="pubdate">November 1987. </span></p>
</div>
<div class="biblioentry">
-<a name="id2603953"></a><p>[<abbr class="abbrev">RFC1035</abbr>] <span class="author"><span class="firstname">P. V.</span> <span class="surname">Mockapetris</span>. </span><span class="title"><i>Domain Names &#8212; Implementation and
+<a name="id2604074"></a><p>[<abbr class="abbrev">RFC1035</abbr>] <span class="author"><span class="firstname">P. V.</span> <span class="surname">Mockapetris</span>. </span><span class="title"><i>Domain Names &#8212; Implementation and
Specification</i>. </span><span class="pubdate">November 1987. </span></p>
</div>
</div>
@@ -278,42 +278,42 @@
<h3 class="title">
<a name="proposed_standards"></a>Proposed Standards</h3>
<div class="biblioentry">
-<a name="id2603989"></a><p>[<abbr class="abbrev">RFC2181</abbr>] <span class="author"><span class="firstname">R., R. Bush</span> <span class="surname">Elz</span>. </span><span class="title"><i>Clarifications to the <acronym class="acronym">DNS</acronym>
+<a name="id2604110"></a><p>[<abbr class="abbrev">RFC2181</abbr>] <span class="author"><span class="firstname">R., R. Bush</span> <span class="surname">Elz</span>. </span><span class="title"><i>Clarifications to the <acronym class="acronym">DNS</acronym>
Specification</i>. </span><span class="pubdate">July 1997. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604016"></a><p>[<abbr class="abbrev">RFC2308</abbr>] <span class="author"><span class="firstname">M.</span> <span class="surname">Andrews</span>. </span><span class="title"><i>Negative Caching of <acronym class="acronym">DNS</acronym>
+<a name="id2604137"></a><p>[<abbr class="abbrev">RFC2308</abbr>] <span class="author"><span class="firstname">M.</span> <span class="surname">Andrews</span>. </span><span class="title"><i>Negative Caching of <acronym class="acronym">DNS</acronym>
Queries</i>. </span><span class="pubdate">March 1998. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604041"></a><p>[<abbr class="abbrev">RFC1995</abbr>] <span class="author"><span class="firstname">M.</span> <span class="surname">Ohta</span>. </span><span class="title"><i>Incremental Zone Transfer in <acronym class="acronym">DNS</acronym></i>. </span><span class="pubdate">August 1996. </span></p>
+<a name="id2604163"></a><p>[<abbr class="abbrev">RFC1995</abbr>] <span class="author"><span class="firstname">M.</span> <span class="surname">Ohta</span>. </span><span class="title"><i>Incremental Zone Transfer in <acronym class="acronym">DNS</acronym></i>. </span><span class="pubdate">August 1996. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604066"></a><p>[<abbr class="abbrev">RFC1996</abbr>] <span class="author"><span class="firstname">P.</span> <span class="surname">Vixie</span>. </span><span class="title"><i>A Mechanism for Prompt Notification of Zone Changes</i>. </span><span class="pubdate">August 1996. </span></p>
+<a name="id2604187"></a><p>[<abbr class="abbrev">RFC1996</abbr>] <span class="author"><span class="firstname">P.</span> <span class="surname">Vixie</span>. </span><span class="title"><i>A Mechanism for Prompt Notification of Zone Changes</i>. </span><span class="pubdate">August 1996. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604089"></a><p>[<abbr class="abbrev">RFC2136</abbr>] <span class="authorgroup"><span class="firstname">P.</span> <span class="surname">Vixie</span>, <span class="firstname">S.</span> <span class="surname">Thomson</span>, <span class="firstname">Y.</span> <span class="surname">Rekhter</span>, and <span class="firstname">J.</span> <span class="surname">Bound</span>. </span><span class="title"><i>Dynamic Updates in the Domain Name System</i>. </span><span class="pubdate">April 1997. </span></p>
+<a name="id2604211"></a><p>[<abbr class="abbrev">RFC2136</abbr>] <span class="authorgroup"><span class="firstname">P.</span> <span class="surname">Vixie</span>, <span class="firstname">S.</span> <span class="surname">Thomson</span>, <span class="firstname">Y.</span> <span class="surname">Rekhter</span>, and <span class="firstname">J.</span> <span class="surname">Bound</span>. </span><span class="title"><i>Dynamic Updates in the Domain Name System</i>. </span><span class="pubdate">April 1997. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604145"></a><p>[<abbr class="abbrev">RFC2671</abbr>] <span class="authorgroup"><span class="firstname">P.</span> <span class="surname">Vixie</span>. </span><span class="title"><i>Extension Mechanisms for DNS (EDNS0)</i>. </span><span class="pubdate">August 1997. </span></p>
+<a name="id2604266"></a><p>[<abbr class="abbrev">RFC2671</abbr>] <span class="authorgroup"><span class="firstname">P.</span> <span class="surname">Vixie</span>. </span><span class="title"><i>Extension Mechanisms for DNS (EDNS0)</i>. </span><span class="pubdate">August 1997. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604171"></a><p>[<abbr class="abbrev">RFC2672</abbr>] <span class="authorgroup"><span class="firstname">M.</span> <span class="surname">Crawford</span>. </span><span class="title"><i>Non-Terminal DNS Name Redirection</i>. </span><span class="pubdate">August 1999. </span></p>
+<a name="id2604293"></a><p>[<abbr class="abbrev">RFC2672</abbr>] <span class="authorgroup"><span class="firstname">M.</span> <span class="surname">Crawford</span>. </span><span class="title"><i>Non-Terminal DNS Name Redirection</i>. </span><span class="pubdate">August 1999. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604198"></a><p>[<abbr class="abbrev">RFC2845</abbr>] <span class="authorgroup"><span class="firstname">P.</span> <span class="surname">Vixie</span>, <span class="firstname">O.</span> <span class="surname">Gudmundsson</span>, <span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>, and <span class="firstname">B.</span> <span class="surname">Wellington</span>. </span><span class="title"><i>Secret Key Transaction Authentication for <acronym class="acronym">DNS</acronym> (TSIG)</i>. </span><span class="pubdate">May 2000. </span></p>
+<a name="id2604320"></a><p>[<abbr class="abbrev">RFC2845</abbr>] <span class="authorgroup"><span class="firstname">P.</span> <span class="surname">Vixie</span>, <span class="firstname">O.</span> <span class="surname">Gudmundsson</span>, <span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>, and <span class="firstname">B.</span> <span class="surname">Wellington</span>. </span><span class="title"><i>Secret Key Transaction Authentication for <acronym class="acronym">DNS</acronym> (TSIG)</i>. </span><span class="pubdate">May 2000. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604260"></a><p>[<abbr class="abbrev">RFC2930</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>. </span><span class="title"><i>Secret Key Establishment for DNS (TKEY RR)</i>. </span><span class="pubdate">September 2000. </span></p>
+<a name="id2604381"></a><p>[<abbr class="abbrev">RFC2930</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>. </span><span class="title"><i>Secret Key Establishment for DNS (TKEY RR)</i>. </span><span class="pubdate">September 2000. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604290"></a><p>[<abbr class="abbrev">RFC2931</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>. </span><span class="title"><i>DNS Request and Transaction Signatures (SIG(0)s)</i>. </span><span class="pubdate">September 2000. </span></p>
+<a name="id2604411"></a><p>[<abbr class="abbrev">RFC2931</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>. </span><span class="title"><i>DNS Request and Transaction Signatures (SIG(0)s)</i>. </span><span class="pubdate">September 2000. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604320"></a><p>[<abbr class="abbrev">RFC3007</abbr>] <span class="authorgroup"><span class="firstname">B.</span> <span class="surname">Wellington</span>. </span><span class="title"><i>Secure Domain Name System (DNS) Dynamic Update</i>. </span><span class="pubdate">November 2000. </span></p>
+<a name="id2604441"></a><p>[<abbr class="abbrev">RFC3007</abbr>] <span class="authorgroup"><span class="firstname">B.</span> <span class="surname">Wellington</span>. </span><span class="title"><i>Secure Domain Name System (DNS) Dynamic Update</i>. </span><span class="pubdate">November 2000. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604346"></a><p>[<abbr class="abbrev">RFC3645</abbr>] <span class="authorgroup"><span class="firstname">S.</span> <span class="surname">Kwan</span>, <span class="firstname">P.</span> <span class="surname">Garg</span>, <span class="firstname">J.</span> <span class="surname">Gilroy</span>, <span class="firstname">L.</span> <span class="surname">Esibov</span>, <span class="firstname">J.</span> <span class="surname">Westhead</span>, and <span class="firstname">R.</span> <span class="surname">Hall</span>. </span><span class="title"><i>Generic Security Service Algorithm for Secret
+<a name="id2604468"></a><p>[<abbr class="abbrev">RFC3645</abbr>] <span class="authorgroup"><span class="firstname">S.</span> <span class="surname">Kwan</span>, <span class="firstname">P.</span> <span class="surname">Garg</span>, <span class="firstname">J.</span> <span class="surname">Gilroy</span>, <span class="firstname">L.</span> <span class="surname">Esibov</span>, <span class="firstname">J.</span> <span class="surname">Westhead</span>, and <span class="firstname">R.</span> <span class="surname">Hall</span>. </span><span class="title"><i>Generic Security Service Algorithm for Secret
Key Transaction Authentication for DNS
(GSS-TSIG)</i>. </span><span class="pubdate">October 2003. </span></p>
</div>
@@ -322,19 +322,19 @@
<h3 class="title">
<acronym class="acronym">DNS</acronym> Security Proposed Standards</h3>
<div class="biblioentry">
-<a name="id2604428"></a><p>[<abbr class="abbrev">RFC3225</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Conrad</span>. </span><span class="title"><i>Indicating Resolver Support of DNSSEC</i>. </span><span class="pubdate">December 2001. </span></p>
+<a name="id2604618"></a><p>[<abbr class="abbrev">RFC3225</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Conrad</span>. </span><span class="title"><i>Indicating Resolver Support of DNSSEC</i>. </span><span class="pubdate">December 2001. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604455"></a><p>[<abbr class="abbrev">RFC3833</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Atkins</span> and <span class="firstname">R.</span> <span class="surname">Austein</span>. </span><span class="title"><i>Threat Analysis of the Domain Name System (DNS)</i>. </span><span class="pubdate">August 2004. </span></p>
+<a name="id2604645"></a><p>[<abbr class="abbrev">RFC3833</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Atkins</span> and <span class="firstname">R.</span> <span class="surname">Austein</span>. </span><span class="title"><i>Threat Analysis of the Domain Name System (DNS)</i>. </span><span class="pubdate">August 2004. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604491"></a><p>[<abbr class="abbrev">RFC4033</abbr>] <span class="authorgroup"><span class="firstname">R.</span> <span class="surname">Arends</span>, <span class="firstname">R.</span> <span class="surname">Austein</span>, <span class="firstname">M.</span> <span class="surname">Larson</span>, <span class="firstname">D.</span> <span class="surname">Massey</span>, and <span class="firstname">S.</span> <span class="surname">Rose</span>. </span><span class="title"><i>DNS Security Introduction and Requirements</i>. </span><span class="pubdate">March 2005. </span></p>
+<a name="id2604681"></a><p>[<abbr class="abbrev">RFC4033</abbr>] <span class="authorgroup"><span class="firstname">R.</span> <span class="surname">Arends</span>, <span class="firstname">R.</span> <span class="surname">Austein</span>, <span class="firstname">M.</span> <span class="surname">Larson</span>, <span class="firstname">D.</span> <span class="surname">Massey</span>, and <span class="firstname">S.</span> <span class="surname">Rose</span>. </span><span class="title"><i>DNS Security Introduction and Requirements</i>. </span><span class="pubdate">March 2005. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604625"></a><p>[<abbr class="abbrev">RFC4034</abbr>] <span class="authorgroup"><span class="firstname">R.</span> <span class="surname">Arends</span>, <span class="firstname">R.</span> <span class="surname">Austein</span>, <span class="firstname">M.</span> <span class="surname">Larson</span>, <span class="firstname">D.</span> <span class="surname">Massey</span>, and <span class="firstname">S.</span> <span class="surname">Rose</span>. </span><span class="title"><i>Resource Records for the DNS Security Extensions</i>. </span><span class="pubdate">March 2005. </span></p>
+<a name="id2604746"></a><p>[<abbr class="abbrev">RFC4034</abbr>] <span class="authorgroup"><span class="firstname">R.</span> <span class="surname">Arends</span>, <span class="firstname">R.</span> <span class="surname">Austein</span>, <span class="firstname">M.</span> <span class="surname">Larson</span>, <span class="firstname">D.</span> <span class="surname">Massey</span>, and <span class="firstname">S.</span> <span class="surname">Rose</span>. </span><span class="title"><i>Resource Records for the DNS Security Extensions</i>. </span><span class="pubdate">March 2005. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604690"></a><p>[<abbr class="abbrev">RFC4035</abbr>] <span class="authorgroup"><span class="firstname">R.</span> <span class="surname">Arends</span>, <span class="firstname">R.</span> <span class="surname">Austein</span>, <span class="firstname">M.</span> <span class="surname">Larson</span>, <span class="firstname">D.</span> <span class="surname">Massey</span>, and <span class="firstname">S.</span> <span class="surname">Rose</span>. </span><span class="title"><i>Protocol Modifications for the DNS
+<a name="id2604811"></a><p>[<abbr class="abbrev">RFC4035</abbr>] <span class="authorgroup"><span class="firstname">R.</span> <span class="surname">Arends</span>, <span class="firstname">R.</span> <span class="surname">Austein</span>, <span class="firstname">M.</span> <span class="surname">Larson</span>, <span class="firstname">D.</span> <span class="surname">Massey</span>, and <span class="firstname">S.</span> <span class="surname">Rose</span>. </span><span class="title"><i>Protocol Modifications for the DNS
Security Extensions</i>. </span><span class="pubdate">March 2005. </span></p>
</div>
</div>
@@ -342,146 +342,146 @@
<h3 class="title">Other Important RFCs About <acronym class="acronym">DNS</acronym>
Implementation</h3>
<div class="biblioentry">
-<a name="id2604763"></a><p>[<abbr class="abbrev">RFC1535</abbr>] <span class="author"><span class="firstname">E.</span> <span class="surname">Gavron</span>. </span><span class="title"><i>A Security Problem and Proposed Correction With Widely
+<a name="id2604885"></a><p>[<abbr class="abbrev">RFC1535</abbr>] <span class="author"><span class="firstname">E.</span> <span class="surname">Gavron</span>. </span><span class="title"><i>A Security Problem and Proposed Correction With Widely
Deployed <acronym class="acronym">DNS</acronym> Software.</i>. </span><span class="pubdate">October 1993. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604789"></a><p>[<abbr class="abbrev">RFC1536</abbr>] <span class="authorgroup"><span class="firstname">A.</span> <span class="surname">Kumar</span>, <span class="firstname">J.</span> <span class="surname">Postel</span>, <span class="firstname">C.</span> <span class="surname">Neuman</span>, <span class="firstname">P.</span> <span class="surname">Danzig</span>, and <span class="firstname">S.</span> <span class="surname">Miller</span>. </span><span class="title"><i>Common <acronym class="acronym">DNS</acronym> Implementation
+<a name="id2604910"></a><p>[<abbr class="abbrev">RFC1536</abbr>] <span class="authorgroup"><span class="firstname">A.</span> <span class="surname">Kumar</span>, <span class="firstname">J.</span> <span class="surname">Postel</span>, <span class="firstname">C.</span> <span class="surname">Neuman</span>, <span class="firstname">P.</span> <span class="surname">Danzig</span>, and <span class="firstname">S.</span> <span class="surname">Miller</span>. </span><span class="title"><i>Common <acronym class="acronym">DNS</acronym> Implementation
Errors and Suggested Fixes</i>. </span><span class="pubdate">October 1993. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604857"></a><p>[<abbr class="abbrev">RFC1982</abbr>] <span class="authorgroup"><span class="firstname">R.</span> <span class="surname">Elz</span> and <span class="firstname">R.</span> <span class="surname">Bush</span>. </span><span class="title"><i>Serial Number Arithmetic</i>. </span><span class="pubdate">August 1996. </span></p>
+<a name="id2605047"></a><p>[<abbr class="abbrev">RFC1982</abbr>] <span class="authorgroup"><span class="firstname">R.</span> <span class="surname">Elz</span> and <span class="firstname">R.</span> <span class="surname">Bush</span>. </span><span class="title"><i>Serial Number Arithmetic</i>. </span><span class="pubdate">August 1996. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604892"></a><p>[<abbr class="abbrev">RFC4074</abbr>] <span class="authorgroup"><span class="firstname">Y.</span> <span class="surname">Morishita</span> and <span class="firstname">T.</span> <span class="surname">Jinmei</span>. </span><span class="title"><i>Common Misbehaviour Against <acronym class="acronym">DNS</acronym>
+<a name="id2605082"></a><p>[<abbr class="abbrev">RFC4074</abbr>] <span class="authorgroup"><span class="firstname">Y.</span> <span class="surname">Morishita</span> and <span class="firstname">T.</span> <span class="surname">Jinmei</span>. </span><span class="title"><i>Common Misbehaviour Against <acronym class="acronym">DNS</acronym>
Queries for IPv6 Addresses</i>. </span><span class="pubdate">May 2005. </span></p>
</div>
</div>
<div class="bibliodiv">
<h3 class="title">Resource Record Types</h3>
<div class="biblioentry">
-<a name="id2604938"></a><p>[<abbr class="abbrev">RFC1183</abbr>] <span class="authorgroup"><span class="firstname">C.F.</span> <span class="surname">Everhart</span>, <span class="firstname">L. A.</span> <span class="surname">Mamakos</span>, <span class="firstname">R.</span> <span class="surname">Ullmann</span>, and <span class="firstname">P.</span> <span class="surname">Mockapetris</span>. </span><span class="title"><i>New <acronym class="acronym">DNS</acronym> RR Definitions</i>. </span><span class="pubdate">October 1990. </span></p>
+<a name="id2605128"></a><p>[<abbr class="abbrev">RFC1183</abbr>] <span class="authorgroup"><span class="firstname">C.F.</span> <span class="surname">Everhart</span>, <span class="firstname">L. A.</span> <span class="surname">Mamakos</span>, <span class="firstname">R.</span> <span class="surname">Ullmann</span>, and <span class="firstname">P.</span> <span class="surname">Mockapetris</span>. </span><span class="title"><i>New <acronym class="acronym">DNS</acronym> RR Definitions</i>. </span><span class="pubdate">October 1990. </span></p>
</div>
<div class="biblioentry">
-<a name="id2604996"></a><p>[<abbr class="abbrev">RFC1706</abbr>] <span class="authorgroup"><span class="firstname">B.</span> <span class="surname">Manning</span> and <span class="firstname">R.</span> <span class="surname">Colella</span>. </span><span class="title"><i><acronym class="acronym">DNS</acronym> NSAP Resource Records</i>. </span><span class="pubdate">October 1994. </span></p>
+<a name="id2605186"></a><p>[<abbr class="abbrev">RFC1706</abbr>] <span class="authorgroup"><span class="firstname">B.</span> <span class="surname">Manning</span> and <span class="firstname">R.</span> <span class="surname">Colella</span>. </span><span class="title"><i><acronym class="acronym">DNS</acronym> NSAP Resource Records</i>. </span><span class="pubdate">October 1994. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605033"></a><p>[<abbr class="abbrev">RFC2168</abbr>] <span class="authorgroup"><span class="firstname">R.</span> <span class="surname">Daniel</span> and <span class="firstname">M.</span> <span class="surname">Mealling</span>. </span><span class="title"><i>Resolution of Uniform Resource Identifiers using
+<a name="id2605223"></a><p>[<abbr class="abbrev">RFC2168</abbr>] <span class="authorgroup"><span class="firstname">R.</span> <span class="surname">Daniel</span> and <span class="firstname">M.</span> <span class="surname">Mealling</span>. </span><span class="title"><i>Resolution of Uniform Resource Identifiers using
the Domain Name System</i>. </span><span class="pubdate">June 1997. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605137"></a><p>[<abbr class="abbrev">RFC1876</abbr>] <span class="authorgroup"><span class="firstname">C.</span> <span class="surname">Davis</span>, <span class="firstname">P.</span> <span class="surname">Vixie</span>, <span class="firstname">T.</span>, and <span class="firstname">I.</span> <span class="surname">Dickinson</span>. </span><span class="title"><i>A Means for Expressing Location Information in the
+<a name="id2605258"></a><p>[<abbr class="abbrev">RFC1876</abbr>] <span class="authorgroup"><span class="firstname">C.</span> <span class="surname">Davis</span>, <span class="firstname">P.</span> <span class="surname">Vixie</span>, <span class="firstname">T.</span>, and <span class="firstname">I.</span> <span class="surname">Dickinson</span>. </span><span class="title"><i>A Means for Expressing Location Information in the
Domain
Name System</i>. </span><span class="pubdate">January 1996. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605191"></a><p>[<abbr class="abbrev">RFC2052</abbr>] <span class="authorgroup"><span class="firstname">A.</span> <span class="surname">Gulbrandsen</span> and <span class="firstname">P.</span> <span class="surname">Vixie</span>. </span><span class="title"><i>A <acronym class="acronym">DNS</acronym> RR for Specifying the
+<a name="id2605313"></a><p>[<abbr class="abbrev">RFC2052</abbr>] <span class="authorgroup"><span class="firstname">A.</span> <span class="surname">Gulbrandsen</span> and <span class="firstname">P.</span> <span class="surname">Vixie</span>. </span><span class="title"><i>A <acronym class="acronym">DNS</acronym> RR for Specifying the
Location of
Services.</i>. </span><span class="pubdate">October 1996. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605229"></a><p>[<abbr class="abbrev">RFC2163</abbr>] <span class="author"><span class="firstname">A.</span> <span class="surname">Allocchio</span>. </span><span class="title"><i>Using the Internet <acronym class="acronym">DNS</acronym> to
+<a name="id2605351"></a><p>[<abbr class="abbrev">RFC2163</abbr>] <span class="author"><span class="firstname">A.</span> <span class="surname">Allocchio</span>. </span><span class="title"><i>Using the Internet <acronym class="acronym">DNS</acronym> to
Distribute MIXER
Conformant Global Address Mapping</i>. </span><span class="pubdate">January 1998. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605255"></a><p>[<abbr class="abbrev">RFC2230</abbr>] <span class="author"><span class="firstname">R.</span> <span class="surname">Atkinson</span>. </span><span class="title"><i>Key Exchange Delegation Record for the <acronym class="acronym">DNS</acronym></i>. </span><span class="pubdate">October 1997. </span></p>
+<a name="id2605377"></a><p>[<abbr class="abbrev">RFC2230</abbr>] <span class="author"><span class="firstname">R.</span> <span class="surname">Atkinson</span>. </span><span class="title"><i>Key Exchange Delegation Record for the <acronym class="acronym">DNS</acronym></i>. </span><span class="pubdate">October 1997. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605281"></a><p>[<abbr class="abbrev">RFC2536</abbr>] <span class="author"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>. </span><span class="title"><i>DSA KEYs and SIGs in the Domain Name System (DNS)</i>. </span><span class="pubdate">March 1999. </span></p>
+<a name="id2605402"></a><p>[<abbr class="abbrev">RFC2536</abbr>] <span class="author"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>. </span><span class="title"><i>DSA KEYs and SIGs in the Domain Name System (DNS)</i>. </span><span class="pubdate">March 1999. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605307"></a><p>[<abbr class="abbrev">RFC2537</abbr>] <span class="author"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>. </span><span class="title"><i>RSA/MD5 KEYs and SIGs in the Domain Name System (DNS)</i>. </span><span class="pubdate">March 1999. </span></p>
+<a name="id2605429"></a><p>[<abbr class="abbrev">RFC2537</abbr>] <span class="author"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>. </span><span class="title"><i>RSA/MD5 KEYs and SIGs in the Domain Name System (DNS)</i>. </span><span class="pubdate">March 1999. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605334"></a><p>[<abbr class="abbrev">RFC2538</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span> and <span class="firstname">O.</span> <span class="surname">Gudmundsson</span>. </span><span class="title"><i>Storing Certificates in the Domain Name System (DNS)</i>. </span><span class="pubdate">March 1999. </span></p>
+<a name="id2605456"></a><p>[<abbr class="abbrev">RFC2538</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span> and <span class="firstname">O.</span> <span class="surname">Gudmundsson</span>. </span><span class="title"><i>Storing Certificates in the Domain Name System (DNS)</i>. </span><span class="pubdate">March 1999. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605373"></a><p>[<abbr class="abbrev">RFC2539</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>. </span><span class="title"><i>Storage of Diffie-Hellman Keys in the Domain Name System (DNS)</i>. </span><span class="pubdate">March 1999. </span></p>
+<a name="id2605495"></a><p>[<abbr class="abbrev">RFC2539</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>. </span><span class="title"><i>Storage of Diffie-Hellman Keys in the Domain Name System (DNS)</i>. </span><span class="pubdate">March 1999. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605403"></a><p>[<abbr class="abbrev">RFC2540</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>. </span><span class="title"><i>Detached Domain Name System (DNS) Information</i>. </span><span class="pubdate">March 1999. </span></p>
+<a name="id2605525"></a><p>[<abbr class="abbrev">RFC2540</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>. </span><span class="title"><i>Detached Domain Name System (DNS) Information</i>. </span><span class="pubdate">March 1999. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605433"></a><p>[<abbr class="abbrev">RFC2782</abbr>] <span class="author"><span class="firstname">A.</span> <span class="surname">Gulbrandsen</span>. </span><span class="author"><span class="firstname">P.</span> <span class="surname">Vixie</span>. </span><span class="author"><span class="firstname">L.</span> <span class="surname">Esibov</span>. </span><span class="title"><i>A DNS RR for specifying the location of services (DNS SRV)</i>. </span><span class="pubdate">February 2000. </span></p>
+<a name="id2605555"></a><p>[<abbr class="abbrev">RFC2782</abbr>] <span class="author"><span class="firstname">A.</span> <span class="surname">Gulbrandsen</span>. </span><span class="author"><span class="firstname">P.</span> <span class="surname">Vixie</span>. </span><span class="author"><span class="firstname">L.</span> <span class="surname">Esibov</span>. </span><span class="title"><i>A DNS RR for specifying the location of services (DNS SRV)</i>. </span><span class="pubdate">February 2000. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605476"></a><p>[<abbr class="abbrev">RFC2915</abbr>] <span class="author"><span class="firstname">M.</span> <span class="surname">Mealling</span>. </span><span class="author"><span class="firstname">R.</span> <span class="surname">Daniel</span>. </span><span class="title"><i>The Naming Authority Pointer (NAPTR) DNS Resource Record</i>. </span><span class="pubdate">September 2000. </span></p>
+<a name="id2605597"></a><p>[<abbr class="abbrev">RFC2915</abbr>] <span class="author"><span class="firstname">M.</span> <span class="surname">Mealling</span>. </span><span class="author"><span class="firstname">R.</span> <span class="surname">Daniel</span>. </span><span class="title"><i>The Naming Authority Pointer (NAPTR) DNS Resource Record</i>. </span><span class="pubdate">September 2000. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605509"></a><p>[<abbr class="abbrev">RFC3110</abbr>] <span class="author"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>. </span><span class="title"><i>RSA/SHA-1 SIGs and RSA KEYs in the Domain Name System (DNS)</i>. </span><span class="pubdate">May 2001. </span></p>
+<a name="id2605630"></a><p>[<abbr class="abbrev">RFC3110</abbr>] <span class="author"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>. </span><span class="title"><i>RSA/SHA-1 SIGs and RSA KEYs in the Domain Name System (DNS)</i>. </span><span class="pubdate">May 2001. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605536"></a><p>[<abbr class="abbrev">RFC3123</abbr>] <span class="author"><span class="firstname">P.</span> <span class="surname">Koch</span>. </span><span class="title"><i>A DNS RR Type for Lists of Address Prefixes (APL RR)</i>. </span><span class="pubdate">June 2001. </span></p>
+<a name="id2605657"></a><p>[<abbr class="abbrev">RFC3123</abbr>] <span class="author"><span class="firstname">P.</span> <span class="surname">Koch</span>. </span><span class="title"><i>A DNS RR Type for Lists of Address Prefixes (APL RR)</i>. </span><span class="pubdate">June 2001. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605559"></a><p>[<abbr class="abbrev">RFC3596</abbr>] <span class="authorgroup"><span class="firstname">S.</span> <span class="surname">Thomson</span>, <span class="firstname">C.</span> <span class="surname">Huitema</span>, <span class="firstname">V.</span> <span class="surname">Ksinant</span>, and <span class="firstname">M.</span> <span class="surname">Souissi</span>. </span><span class="title"><i><acronym class="acronym">DNS</acronym> Extensions to support IP
+<a name="id2605681"></a><p>[<abbr class="abbrev">RFC3596</abbr>] <span class="authorgroup"><span class="firstname">S.</span> <span class="surname">Thomson</span>, <span class="firstname">C.</span> <span class="surname">Huitema</span>, <span class="firstname">V.</span> <span class="surname">Ksinant</span>, and <span class="firstname">M.</span> <span class="surname">Souissi</span>. </span><span class="title"><i><acronym class="acronym">DNS</acronym> Extensions to support IP
version 6</i>. </span><span class="pubdate">October 2003. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605617"></a><p>[<abbr class="abbrev">RFC3597</abbr>] <span class="author"><span class="firstname">A.</span> <span class="surname">Gustafsson</span>. </span><span class="title"><i>Handling of Unknown DNS Resource Record (RR) Types</i>. </span><span class="pubdate">September 2003. </span></p>
+<a name="id2605738"></a><p>[<abbr class="abbrev">RFC3597</abbr>] <span class="author"><span class="firstname">A.</span> <span class="surname">Gustafsson</span>. </span><span class="title"><i>Handling of Unknown DNS Resource Record (RR) Types</i>. </span><span class="pubdate">September 2003. </span></p>
</div>
</div>
<div class="bibliodiv">
<h3 class="title">
<acronym class="acronym">DNS</acronym> and the Internet</h3>
<div class="biblioentry">
-<a name="id2605649"></a><p>[<abbr class="abbrev">RFC1101</abbr>] <span class="author"><span class="firstname">P. V.</span> <span class="surname">Mockapetris</span>. </span><span class="title"><i><acronym class="acronym">DNS</acronym> Encoding of Network Names
+<a name="id2605770"></a><p>[<abbr class="abbrev">RFC1101</abbr>] <span class="author"><span class="firstname">P. V.</span> <span class="surname">Mockapetris</span>. </span><span class="title"><i><acronym class="acronym">DNS</acronym> Encoding of Network Names
and Other Types</i>. </span><span class="pubdate">April 1989. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605674"></a><p>[<abbr class="abbrev">RFC1123</abbr>] <span class="author"><span class="surname">Braden</span>. </span><span class="title"><i>Requirements for Internet Hosts - Application and
+<a name="id2605796"></a><p>[<abbr class="abbrev">RFC1123</abbr>] <span class="author"><span class="surname">Braden</span>. </span><span class="title"><i>Requirements for Internet Hosts - Application and
Support</i>. </span><span class="pubdate">October 1989. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605697"></a><p>[<abbr class="abbrev">RFC1591</abbr>] <span class="author"><span class="firstname">J.</span> <span class="surname">Postel</span>. </span><span class="title"><i>Domain Name System Structure and Delegation</i>. </span><span class="pubdate">March 1994. </span></p>
+<a name="id2605818"></a><p>[<abbr class="abbrev">RFC1591</abbr>] <span class="author"><span class="firstname">J.</span> <span class="surname">Postel</span>. </span><span class="title"><i>Domain Name System Structure and Delegation</i>. </span><span class="pubdate">March 1994. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605720"></a><p>[<abbr class="abbrev">RFC2317</abbr>] <span class="authorgroup"><span class="firstname">H.</span> <span class="surname">Eidnes</span>, <span class="firstname">G.</span> <span class="surname">de Groot</span>, and <span class="firstname">P.</span> <span class="surname">Vixie</span>. </span><span class="title"><i>Classless IN-ADDR.ARPA Delegation</i>. </span><span class="pubdate">March 1998. </span></p>
+<a name="id2605842"></a><p>[<abbr class="abbrev">RFC2317</abbr>] <span class="authorgroup"><span class="firstname">H.</span> <span class="surname">Eidnes</span>, <span class="firstname">G.</span> <span class="surname">de Groot</span>, and <span class="firstname">P.</span> <span class="surname">Vixie</span>. </span><span class="title"><i>Classless IN-ADDR.ARPA Delegation</i>. </span><span class="pubdate">March 1998. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605766"></a><p>[<abbr class="abbrev">RFC2826</abbr>] <span class="authorgroup"><span class="surname">Internet Architecture Board</span>. </span><span class="title"><i>IAB Technical Comment on the Unique DNS Root</i>. </span><span class="pubdate">May 2000. </span></p>
+<a name="id2605888"></a><p>[<abbr class="abbrev">RFC2826</abbr>] <span class="authorgroup"><span class="surname">Internet Architecture Board</span>. </span><span class="title"><i>IAB Technical Comment on the Unique DNS Root</i>. </span><span class="pubdate">May 2000. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605789"></a><p>[<abbr class="abbrev">RFC2929</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>, <span class="firstname">E.</span> <span class="surname">Brunner-Williams</span>, and <span class="firstname">B.</span> <span class="surname">Manning</span>. </span><span class="title"><i>Domain Name System (DNS) IANA Considerations</i>. </span><span class="pubdate">September 2000. </span></p>
+<a name="id2605911"></a><p>[<abbr class="abbrev">RFC2929</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>, <span class="firstname">E.</span> <span class="surname">Brunner-Williams</span>, and <span class="firstname">B.</span> <span class="surname">Manning</span>. </span><span class="title"><i>Domain Name System (DNS) IANA Considerations</i>. </span><span class="pubdate">September 2000. </span></p>
</div>
</div>
<div class="bibliodiv">
<h3 class="title">
<acronym class="acronym">DNS</acronym> Operations</h3>
<div class="biblioentry">
-<a name="id2605847"></a><p>[<abbr class="abbrev">RFC1033</abbr>] <span class="author"><span class="firstname">M.</span> <span class="surname">Lottor</span>. </span><span class="title"><i>Domain administrators operations guide.</i>. </span><span class="pubdate">November 1987. </span></p>
+<a name="id2605969"></a><p>[<abbr class="abbrev">RFC1033</abbr>] <span class="author"><span class="firstname">M.</span> <span class="surname">Lottor</span>. </span><span class="title"><i>Domain administrators operations guide.</i>. </span><span class="pubdate">November 1987. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605870"></a><p>[<abbr class="abbrev">RFC1537</abbr>] <span class="author"><span class="firstname">P.</span> <span class="surname">Beertema</span>. </span><span class="title"><i>Common <acronym class="acronym">DNS</acronym> Data File
+<a name="id2605992"></a><p>[<abbr class="abbrev">RFC1537</abbr>] <span class="author"><span class="firstname">P.</span> <span class="surname">Beertema</span>. </span><span class="title"><i>Common <acronym class="acronym">DNS</acronym> Data File
Configuration Errors</i>. </span><span class="pubdate">October 1993. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605897"></a><p>[<abbr class="abbrev">RFC1912</abbr>] <span class="author"><span class="firstname">D.</span> <span class="surname">Barr</span>. </span><span class="title"><i>Common <acronym class="acronym">DNS</acronym> Operational and
+<a name="id2606019"></a><p>[<abbr class="abbrev">RFC1912</abbr>] <span class="author"><span class="firstname">D.</span> <span class="surname">Barr</span>. </span><span class="title"><i>Common <acronym class="acronym">DNS</acronym> Operational and
Configuration Errors</i>. </span><span class="pubdate">February 1996. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605924"></a><p>[<abbr class="abbrev">RFC2010</abbr>] <span class="authorgroup"><span class="firstname">B.</span> <span class="surname">Manning</span> and <span class="firstname">P.</span> <span class="surname">Vixie</span>. </span><span class="title"><i>Operational Criteria for Root Name Servers.</i>. </span><span class="pubdate">October 1996. </span></p>
+<a name="id2606045"></a><p>[<abbr class="abbrev">RFC2010</abbr>] <span class="authorgroup"><span class="firstname">B.</span> <span class="surname">Manning</span> and <span class="firstname">P.</span> <span class="surname">Vixie</span>. </span><span class="title"><i>Operational Criteria for Root Name Servers.</i>. </span><span class="pubdate">October 1996. </span></p>
</div>
<div class="biblioentry">
-<a name="id2605960"></a><p>[<abbr class="abbrev">RFC2219</abbr>] <span class="authorgroup"><span class="firstname">M.</span> <span class="surname">Hamilton</span> and <span class="firstname">R.</span> <span class="surname">Wright</span>. </span><span class="title"><i>Use of <acronym class="acronym">DNS</acronym> Aliases for
+<a name="id2606082"></a><p>[<abbr class="abbrev">RFC2219</abbr>] <span class="authorgroup"><span class="firstname">M.</span> <span class="surname">Hamilton</span> and <span class="firstname">R.</span> <span class="surname">Wright</span>. </span><span class="title"><i>Use of <acronym class="acronym">DNS</acronym> Aliases for
Network Services.</i>. </span><span class="pubdate">October 1997. </span></p>
</div>
</div>
<div class="bibliodiv">
<h3 class="title">Internationalized Domain Names</h3>
<div class="biblioentry">
-<a name="id2606006"></a><p>[<abbr class="abbrev">RFC2825</abbr>] <span class="authorgroup"><span class="surname">IAB</span> and <span class="firstname">R.</span> <span class="surname">Daigle</span>. </span><span class="title"><i>A Tangled Web: Issues of I18N, Domain Names,
+<a name="id2606128"></a><p>[<abbr class="abbrev">RFC2825</abbr>] <span class="authorgroup"><span class="surname">IAB</span> and <span class="firstname">R.</span> <span class="surname">Daigle</span>. </span><span class="title"><i>A Tangled Web: Issues of I18N, Domain Names,
and the Other Internet protocols</i>. </span><span class="pubdate">May 2000. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606038"></a><p>[<abbr class="abbrev">RFC3490</abbr>] <span class="authorgroup"><span class="firstname">P.</span> <span class="surname">Faltstrom</span>, <span class="firstname">P.</span> <span class="surname">Hoffman</span>, and <span class="firstname">A.</span> <span class="surname">Costello</span>. </span><span class="title"><i>Internationalizing Domain Names in Applications (IDNA)</i>. </span><span class="pubdate">March 2003. </span></p>
+<a name="id2606160"></a><p>[<abbr class="abbrev">RFC3490</abbr>] <span class="authorgroup"><span class="firstname">P.</span> <span class="surname">Faltstrom</span>, <span class="firstname">P.</span> <span class="surname">Hoffman</span>, and <span class="firstname">A.</span> <span class="surname">Costello</span>. </span><span class="title"><i>Internationalizing Domain Names in Applications (IDNA)</i>. </span><span class="pubdate">March 2003. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606084"></a><p>[<abbr class="abbrev">RFC3491</abbr>] <span class="authorgroup"><span class="firstname">P.</span> <span class="surname">Hoffman</span> and <span class="firstname">M.</span> <span class="surname">Blanchet</span>. </span><span class="title"><i>Nameprep: A Stringprep Profile for Internationalized Domain Names</i>. </span><span class="pubdate">March 2003. </span></p>
+<a name="id2606205"></a><p>[<abbr class="abbrev">RFC3491</abbr>] <span class="authorgroup"><span class="firstname">P.</span> <span class="surname">Hoffman</span> and <span class="firstname">M.</span> <span class="surname">Blanchet</span>. </span><span class="title"><i>Nameprep: A Stringprep Profile for Internationalized Domain Names</i>. </span><span class="pubdate">March 2003. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606119"></a><p>[<abbr class="abbrev">RFC3492</abbr>] <span class="authorgroup"><span class="firstname">A.</span> <span class="surname">Costello</span>. </span><span class="title"><i>Punycode: A Bootstring encoding of Unicode
+<a name="id2606241"></a><p>[<abbr class="abbrev">RFC3492</abbr>] <span class="authorgroup"><span class="firstname">A.</span> <span class="surname">Costello</span>. </span><span class="title"><i>Punycode: A Bootstring encoding of Unicode
for Internationalized Domain Names in
Applications (IDNA)</i>. </span><span class="pubdate">March 2003. </span></p>
</div>
@@ -497,47 +497,47 @@
</p>
</div>
<div class="biblioentry">
-<a name="id2606164"></a><p>[<abbr class="abbrev">RFC1464</abbr>] <span class="author"><span class="firstname">R.</span> <span class="surname">Rosenbaum</span>. </span><span class="title"><i>Using the Domain Name System To Store Arbitrary String
+<a name="id2606354"></a><p>[<abbr class="abbrev">RFC1464</abbr>] <span class="author"><span class="firstname">R.</span> <span class="surname">Rosenbaum</span>. </span><span class="title"><i>Using the Domain Name System To Store Arbitrary String
Attributes</i>. </span><span class="pubdate">May 1993. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606186"></a><p>[<abbr class="abbrev">RFC1713</abbr>] <span class="author"><span class="firstname">A.</span> <span class="surname">Romao</span>. </span><span class="title"><i>Tools for <acronym class="acronym">DNS</acronym> Debugging</i>. </span><span class="pubdate">November 1994. </span></p>
+<a name="id2606376"></a><p>[<abbr class="abbrev">RFC1713</abbr>] <span class="author"><span class="firstname">A.</span> <span class="surname">Romao</span>. </span><span class="title"><i>Tools for <acronym class="acronym">DNS</acronym> Debugging</i>. </span><span class="pubdate">November 1994. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606212"></a><p>[<abbr class="abbrev">RFC1794</abbr>] <span class="author"><span class="firstname">T.</span> <span class="surname">Brisco</span>. </span><span class="title"><i><acronym class="acronym">DNS</acronym> Support for Load
+<a name="id2606402"></a><p>[<abbr class="abbrev">RFC1794</abbr>] <span class="author"><span class="firstname">T.</span> <span class="surname">Brisco</span>. </span><span class="title"><i><acronym class="acronym">DNS</acronym> Support for Load
Balancing</i>. </span><span class="pubdate">April 1995. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606306"></a><p>[<abbr class="abbrev">RFC2240</abbr>] <span class="author"><span class="firstname">O.</span> <span class="surname">Vaughan</span>. </span><span class="title"><i>A Legal Basis for Domain Name Allocation</i>. </span><span class="pubdate">November 1997. </span></p>
+<a name="id2606427"></a><p>[<abbr class="abbrev">RFC2240</abbr>] <span class="author"><span class="firstname">O.</span> <span class="surname">Vaughan</span>. </span><span class="title"><i>A Legal Basis for Domain Name Allocation</i>. </span><span class="pubdate">November 1997. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606329"></a><p>[<abbr class="abbrev">RFC2345</abbr>] <span class="authorgroup"><span class="firstname">J.</span> <span class="surname">Klensin</span>, <span class="firstname">T.</span> <span class="surname">Wolf</span>, and <span class="firstname">G.</span> <span class="surname">Oglesby</span>. </span><span class="title"><i>Domain Names and Company Name Retrieval</i>. </span><span class="pubdate">May 1998. </span></p>
+<a name="id2606451"></a><p>[<abbr class="abbrev">RFC2345</abbr>] <span class="authorgroup"><span class="firstname">J.</span> <span class="surname">Klensin</span>, <span class="firstname">T.</span> <span class="surname">Wolf</span>, and <span class="firstname">G.</span> <span class="surname">Oglesby</span>. </span><span class="title"><i>Domain Names and Company Name Retrieval</i>. </span><span class="pubdate">May 1998. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606375"></a><p>[<abbr class="abbrev">RFC2352</abbr>] <span class="author"><span class="firstname">O.</span> <span class="surname">Vaughan</span>. </span><span class="title"><i>A Convention For Using Legal Names as Domain Names</i>. </span><span class="pubdate">May 1998. </span></p>
+<a name="id2606497"></a><p>[<abbr class="abbrev">RFC2352</abbr>] <span class="author"><span class="firstname">O.</span> <span class="surname">Vaughan</span>. </span><span class="title"><i>A Convention For Using Legal Names as Domain Names</i>. </span><span class="pubdate">May 1998. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606398"></a><p>[<abbr class="abbrev">RFC3071</abbr>] <span class="authorgroup"><span class="firstname">J.</span> <span class="surname">Klensin</span>. </span><span class="title"><i>Reflections on the DNS, RFC 1591, and Categories of Domains</i>. </span><span class="pubdate">February 2001. </span></p>
+<a name="id2606520"></a><p>[<abbr class="abbrev">RFC3071</abbr>] <span class="authorgroup"><span class="firstname">J.</span> <span class="surname">Klensin</span>. </span><span class="title"><i>Reflections on the DNS, RFC 1591, and Categories of Domains</i>. </span><span class="pubdate">February 2001. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606425"></a><p>[<abbr class="abbrev">RFC3258</abbr>] <span class="authorgroup"><span class="firstname">T.</span> <span class="surname">Hardie</span>. </span><span class="title"><i>Distributing Authoritative Name Servers via
+<a name="id2606547"></a><p>[<abbr class="abbrev">RFC3258</abbr>] <span class="authorgroup"><span class="firstname">T.</span> <span class="surname">Hardie</span>. </span><span class="title"><i>Distributing Authoritative Name Servers via
Shared Unicast Addresses</i>. </span><span class="pubdate">April 2002. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606451"></a><p>[<abbr class="abbrev">RFC3901</abbr>] <span class="authorgroup"><span class="firstname">A.</span> <span class="surname">Durand</span> and <span class="firstname">J.</span> <span class="surname">Ihren</span>. </span><span class="title"><i>DNS IPv6 Transport Operational Guidelines</i>. </span><span class="pubdate">September 2004. </span></p>
+<a name="id2606572"></a><p>[<abbr class="abbrev">RFC3901</abbr>] <span class="authorgroup"><span class="firstname">A.</span> <span class="surname">Durand</span> and <span class="firstname">J.</span> <span class="surname">Ihren</span>. </span><span class="title"><i>DNS IPv6 Transport Operational Guidelines</i>. </span><span class="pubdate">September 2004. </span></p>
</div>
</div>
<div class="bibliodiv">
<h3 class="title">Obsolete and Unimplemented Experimental RFC</h3>
<div class="biblioentry">
-<a name="id2606494"></a><p>[<abbr class="abbrev">RFC1712</abbr>] <span class="authorgroup"><span class="firstname">C.</span> <span class="surname">Farrell</span>, <span class="firstname">M.</span> <span class="surname">Schulze</span>, <span class="firstname">S.</span> <span class="surname">Pleitner</span>, and <span class="firstname">D.</span> <span class="surname">Baldoni</span>. </span><span class="title"><i><acronym class="acronym">DNS</acronym> Encoding of Geographical
+<a name="id2606616"></a><p>[<abbr class="abbrev">RFC1712</abbr>] <span class="authorgroup"><span class="firstname">C.</span> <span class="surname">Farrell</span>, <span class="firstname">M.</span> <span class="surname">Schulze</span>, <span class="firstname">S.</span> <span class="surname">Pleitner</span>, and <span class="firstname">D.</span> <span class="surname">Baldoni</span>. </span><span class="title"><i><acronym class="acronym">DNS</acronym> Encoding of Geographical
Location</i>. </span><span class="pubdate">November 1994. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606552"></a><p>[<abbr class="abbrev">RFC2673</abbr>] <span class="authorgroup"><span class="firstname">M.</span> <span class="surname">Crawford</span>. </span><span class="title"><i>Binary Labels in the Domain Name System</i>. </span><span class="pubdate">August 1999. </span></p>
+<a name="id2606674"></a><p>[<abbr class="abbrev">RFC2673</abbr>] <span class="authorgroup"><span class="firstname">M.</span> <span class="surname">Crawford</span>. </span><span class="title"><i>Binary Labels in the Domain Name System</i>. </span><span class="pubdate">August 1999. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606579"></a><p>[<abbr class="abbrev">RFC2874</abbr>] <span class="authorgroup"><span class="firstname">M.</span> <span class="surname">Crawford</span> and <span class="firstname">C.</span> <span class="surname">Huitema</span>. </span><span class="title"><i>DNS Extensions to Support IPv6 Address Aggregation
+<a name="id2606700"></a><p>[<abbr class="abbrev">RFC2874</abbr>] <span class="authorgroup"><span class="firstname">M.</span> <span class="surname">Crawford</span> and <span class="firstname">C.</span> <span class="surname">Huitema</span>. </span><span class="title"><i>DNS Extensions to Support IPv6 Address Aggregation
and Renumbering</i>. </span><span class="pubdate">July 2000. </span></p>
</div>
</div>
@@ -551,39 +551,39 @@
</p>
</div>
<div class="biblioentry">
-<a name="id2606695"></a><p>[<abbr class="abbrev">RFC2065</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span> and <span class="firstname">C.</span> <span class="surname">Kaufman</span>. </span><span class="title"><i>Domain Name System Security Extensions</i>. </span><span class="pubdate">January 1997. </span></p>
+<a name="id2606748"></a><p>[<abbr class="abbrev">RFC2065</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span> and <span class="firstname">C.</span> <span class="surname">Kaufman</span>. </span><span class="title"><i>Domain Name System Security Extensions</i>. </span><span class="pubdate">January 1997. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606734"></a><p>[<abbr class="abbrev">RFC2137</abbr>] <span class="author"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>. </span><span class="title"><i>Secure Domain Name System Dynamic Update</i>. </span><span class="pubdate">April 1997. </span></p>
+<a name="id2606788"></a><p>[<abbr class="abbrev">RFC2137</abbr>] <span class="author"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>. </span><span class="title"><i>Secure Domain Name System Dynamic Update</i>. </span><span class="pubdate">April 1997. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606761"></a><p>[<abbr class="abbrev">RFC2535</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>. </span><span class="title"><i>Domain Name System Security Extensions</i>. </span><span class="pubdate">March 1999. </span></p>
+<a name="id2606814"></a><p>[<abbr class="abbrev">RFC2535</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Eastlake</span>, <span class="lineage">3rd</span>. </span><span class="title"><i>Domain Name System Security Extensions</i>. </span><span class="pubdate">March 1999. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606791"></a><p>[<abbr class="abbrev">RFC3008</abbr>] <span class="authorgroup"><span class="firstname">B.</span> <span class="surname">Wellington</span>. </span><span class="title"><i>Domain Name System Security (DNSSEC)
+<a name="id2606844"></a><p>[<abbr class="abbrev">RFC3008</abbr>] <span class="authorgroup"><span class="firstname">B.</span> <span class="surname">Wellington</span>. </span><span class="title"><i>Domain Name System Security (DNSSEC)
Signing Authority</i>. </span><span class="pubdate">November 2000. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606817"></a><p>[<abbr class="abbrev">RFC3090</abbr>] <span class="authorgroup"><span class="firstname">E.</span> <span class="surname">Lewis</span>. </span><span class="title"><i>DNS Security Extension Clarification on Zone Status</i>. </span><span class="pubdate">March 2001. </span></p>
+<a name="id2606870"></a><p>[<abbr class="abbrev">RFC3090</abbr>] <span class="authorgroup"><span class="firstname">E.</span> <span class="surname">Lewis</span>. </span><span class="title"><i>DNS Security Extension Clarification on Zone Status</i>. </span><span class="pubdate">March 2001. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606843"></a><p>[<abbr class="abbrev">RFC3445</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Massey</span> and <span class="firstname">S.</span> <span class="surname">Rose</span>. </span><span class="title"><i>Limiting the Scope of the KEY Resource Record (RR)</i>. </span><span class="pubdate">December 2002. </span></p>
+<a name="id2606897"></a><p>[<abbr class="abbrev">RFC3445</abbr>] <span class="authorgroup"><span class="firstname">D.</span> <span class="surname">Massey</span> and <span class="firstname">S.</span> <span class="surname">Rose</span>. </span><span class="title"><i>Limiting the Scope of the KEY Resource Record (RR)</i>. </span><span class="pubdate">December 2002. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606880"></a><p>[<abbr class="abbrev">RFC3655</abbr>] <span class="authorgroup"><span class="firstname">B.</span> <span class="surname">Wellington</span> and <span class="firstname">O.</span> <span class="surname">Gudmundsson</span>. </span><span class="title"><i>Redefinition of DNS Authenticated Data (AD) bit</i>. </span><span class="pubdate">November 2003. </span></p>
+<a name="id2606933"></a><p>[<abbr class="abbrev">RFC3655</abbr>] <span class="authorgroup"><span class="firstname">B.</span> <span class="surname">Wellington</span> and <span class="firstname">O.</span> <span class="surname">Gudmundsson</span>. </span><span class="title"><i>Redefinition of DNS Authenticated Data (AD) bit</i>. </span><span class="pubdate">November 2003. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606916"></a><p>[<abbr class="abbrev">RFC3658</abbr>] <span class="authorgroup"><span class="firstname">O.</span> <span class="surname">Gudmundsson</span>. </span><span class="title"><i>Delegation Signer (DS) Resource Record (RR)</i>. </span><span class="pubdate">December 2003. </span></p>
+<a name="id2607037"></a><p>[<abbr class="abbrev">RFC3658</abbr>] <span class="authorgroup"><span class="firstname">O.</span> <span class="surname">Gudmundsson</span>. </span><span class="title"><i>Delegation Signer (DS) Resource Record (RR)</i>. </span><span class="pubdate">December 2003. </span></p>
</div>
<div class="biblioentry">
-<a name="id2606942"></a><p>[<abbr class="abbrev">RFC3755</abbr>] <span class="authorgroup"><span class="firstname">S.</span> <span class="surname">Weiler</span>. </span><span class="title"><i>Legacy Resolver Compatibility for Delegation Signer (DS)</i>. </span><span class="pubdate">May 2004. </span></p>
+<a name="id2607064"></a><p>[<abbr class="abbrev">RFC3755</abbr>] <span class="authorgroup"><span class="firstname">S.</span> <span class="surname">Weiler</span>. </span><span class="title"><i>Legacy Resolver Compatibility for Delegation Signer (DS)</i>. </span><span class="pubdate">May 2004. </span></p>
</div>
<div class="biblioentry">
-<a name="id2607037"></a><p>[<abbr class="abbrev">RFC3757</abbr>] <span class="authorgroup"><span class="firstname">O.</span> <span class="surname">Kolkman</span>, <span class="firstname">J.</span> <span class="surname">Schlyter</span>, and <span class="firstname">E.</span> <span class="surname">Lewis</span>. </span><span class="title"><i>Domain Name System KEY (DNSKEY) Resource Record
+<a name="id2607091"></a><p>[<abbr class="abbrev">RFC3757</abbr>] <span class="authorgroup"><span class="firstname">O.</span> <span class="surname">Kolkman</span>, <span class="firstname">J.</span> <span class="surname">Schlyter</span>, and <span class="firstname">E.</span> <span class="surname">Lewis</span>. </span><span class="title"><i>Domain Name System KEY (DNSKEY) Resource Record
(RR) Secure Entry Point (SEP) Flag</i>. </span><span class="pubdate">April 2004. </span></p>
</div>
<div class="biblioentry">
-<a name="id2607082"></a><p>[<abbr class="abbrev">RFC3845</abbr>] <span class="authorgroup"><span class="firstname">J.</span> <span class="surname">Schlyter</span>. </span><span class="title"><i>DNS Security (DNSSEC) NextSECure (NSEC) RDATA Format</i>. </span><span class="pubdate">August 2004. </span></p>
+<a name="id2607136"></a><p>[<abbr class="abbrev">RFC3845</abbr>] <span class="authorgroup"><span class="firstname">J.</span> <span class="surname">Schlyter</span>. </span><span class="title"><i>DNS Security (DNSSEC) NextSECure (NSEC) RDATA Format</i>. </span><span class="pubdate">August 2004. </span></p>
</div>
</div>
</div>
@@ -604,14 +604,14 @@
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2607124"></a>Other Documents About <acronym class="acronym">BIND</acronym>
+<a name="id2607177"></a>Other Documents About <acronym class="acronym">BIND</acronym>
</h3></div></div></div>
<p></p>
<div class="bibliography">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2607133"></a>Bibliography</h4></div></div></div>
+<a name="id2607187"></a>Bibliography</h4></div></div></div>
<div class="biblioentry">
-<a name="id2607136"></a><p><span class="authorgroup"><span class="firstname">Paul</span> <span class="surname">Albitz</span> and <span class="firstname">Cricket</span> <span class="surname">Liu</span>. </span><span class="title"><i><acronym class="acronym">DNS</acronym> and <acronym class="acronym">BIND</acronym></i>. </span><span class="copyright">Copyright © 1998 Sebastopol, CA: O'Reilly and Associates. </span></p>
+<a name="id2607189"></a><p><span class="authorgroup"><span class="firstname">Paul</span> <span class="surname">Albitz</span> and <span class="firstname">Cricket</span> <span class="surname">Liu</span>. </span><span class="title"><i><acronym class="acronym">DNS</acronym> and <acronym class="acronym">BIND</acronym></i>. </span><span class="copyright">Copyright © 1998 Sebastopol, CA: O'Reilly and Associates. </span></p>
</div>
</div>
</div>
@@ -648,7 +648,7 @@
</ul></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2608280"></a>Prerequisite</h3></div></div></div>
+<a name="id2608265"></a>Prerequisite</h3></div></div></div>
<p>GNU make is required to build the export libraries (other
part of BIND 9 can still be built with other types of make). In
the reminder of this document, "make" means GNU make. Note that
@@ -657,7 +657,7 @@
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2608290"></a>Compilation</h3></div></div></div>
+<a name="id2608275"></a>Compilation</h3></div></div></div>
<pre class="screen">
$ <strong class="userinput"><code>./configure --enable-exportlib <em class="replaceable"><code>[other flags]</code></em></code></strong>
$ <strong class="userinput"><code>make</code></strong>
@@ -672,7 +672,7 @@ $ <strong class="userinput"><code>make</code></strong>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2608314"></a>Installation</h3></div></div></div>
+<a name="id2608299"></a>Installation</h3></div></div></div>
<pre class="screen">
$ <strong class="userinput"><code>cd lib/export</code></strong>
$ <strong class="userinput"><code>make install</code></strong>
@@ -694,7 +694,7 @@ $ <strong class="userinput"><code>make install</code></strong>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2608345"></a>Known Defects/Restrictions</h3></div></div></div>
+<a name="id2608330"></a>Known Defects/Restrictions</h3></div></div></div>
<div class="itemizedlist"><ul type="disc">
<li><p>Currently, win32 is not supported for the export
library. (Normal BIND 9 application can be built as
@@ -734,7 +734,7 @@ $ <strong class="userinput"><code>make</code></strong>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2608422"></a>The dns.conf File</h3></div></div></div>
+<a name="id2608680"></a>The dns.conf File</h3></div></div></div>
<p>The IRS library supports an "advanced" configuration file
related to the DNS library for configuration parameters that
would be beyond the capability of the
@@ -752,14 +752,14 @@ $ <strong class="userinput"><code>make</code></strong>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2608449"></a>Sample Applications</h3></div></div></div>
+<a name="id2608707"></a>Sample Applications</h3></div></div></div>
<p>Some sample application programs using this API are
provided for reference. The following is a brief description of
these applications.
</p>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2608457"></a>sample: a simple stub resolver utility</h4></div></div></div>
+<a name="id2608715"></a>sample: a simple stub resolver utility</h4></div></div></div>
<p>
It sends a query of a given name (of a given optional RR type) to a
specified recursive server, and prints the result as a list of
@@ -823,7 +823,7 @@ $ <strong class="userinput"><code>make</code></strong>
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2608548"></a>sample-async: a simple stub resolver, working asynchronously</h4></div></div></div>
+<a name="id2608806"></a>sample-async: a simple stub resolver, working asynchronously</h4></div></div></div>
<p>
Similar to "sample", but accepts a list
of (query) domain names as a separate file and resolves the names
@@ -864,7 +864,7 @@ $ <strong class="userinput"><code>make</code></strong>
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2608601"></a>sample-request: a simple DNS transaction client</h4></div></div></div>
+<a name="id2608859"></a>sample-request: a simple DNS transaction client</h4></div></div></div>
<p>
It sends a query to a specified server, and
prints the response with minimal processing. It doesn't act as a
@@ -905,7 +905,7 @@ $ <strong class="userinput"><code>make</code></strong>
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2608733"></a>sample-gai: getaddrinfo() and getnameinfo() test code</h4></div></div></div>
+<a name="id2608992"></a>sample-gai: getaddrinfo() and getnameinfo() test code</h4></div></div></div>
<p>
This is a test program
to check getaddrinfo() and getnameinfo() behavior. It takes a
@@ -922,7 +922,7 @@ $ <strong class="userinput"><code>make</code></strong>
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2608748"></a>sample-update: a simple dynamic update client program</h4></div></div></div>
+<a name="id2609006"></a>sample-update: a simple dynamic update client program</h4></div></div></div>
<p>
It accepts a single update command as a
command-line argument, sends an update request message to the
@@ -1017,7 +1017,7 @@ $ <strong class="userinput"><code>sample-update -a sample-update -k Kxxx.+nnn+mm
</div>
<div class="sect3" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="id2609426"></a>nsprobe: domain/name server checker in terms of RFC 4074</h4></div></div></div>
+<a name="id2609138"></a>nsprobe: domain/name server checker in terms of RFC 4074</h4></div></div></div>
<p>
It checks a set
of domains to see the name servers of the domains behave
@@ -1074,7 +1074,7 @@ $ <strong class="userinput"><code>sample-update -a sample-update -k Kxxx.+nnn+mm
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id2609490"></a>Library References</h3></div></div></div>
+<a name="id2609611"></a>Library References</h3></div></div></div>
<p>As of this writing, there is no formal "manual" of the
libraries, except this document, header files (some of them
provide pretty detailed explanations), and sample application
diff --git a/contrib/bind9/doc/arm/Bv9ARM.html b/contrib/bind9/doc/arm/Bv9ARM.html
index b3703f6..b66cccc 100644
--- a/contrib/bind9/doc/arm/Bv9ARM.html
+++ b/contrib/bind9/doc/arm/Bv9ARM.html
@@ -113,33 +113,33 @@
</dl></dd>
<dt><span class="sect1"><a href="Bv9ARM.ch04.html#dnssec.dynamic.zones">DNSSEC, Dynamic Zones, and Automatic Signing</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571421">Converting from insecure to secure</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571459">Dynamic DNS update method</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563508">Fully automatic zone signing</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563590">Private-type records</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563696">DNSKEY rollovers</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563708">Dynamic DNS update method</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563741">Automatic key rollovers</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563836">NSEC3PARAM rollovers via UPDATE</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563846">Converting from NSEC to NSEC3</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563856">Converting from NSEC3 to NSEC</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563868">Converting from secure to insecure</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563906">Periodic re-signing</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563915">NSEC3 and OPTOUT</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571475">Converting from insecure to secure</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571512">Dynamic DNS update method</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563493">Fully automatic zone signing</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563575">Private-type records</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563612">DNSKEY rollovers</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563762">Dynamic DNS update method</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563795">Automatic key rollovers</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563821">NSEC3PARAM rollovers via UPDATE</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563899">Converting from NSEC to NSEC3</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563909">Converting from NSEC3 to NSEC</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2563922">Converting from secure to insecure</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571605">Periodic re-signing</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571614">NSEC3 and OPTOUT</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="Bv9ARM.ch04.html#rfc5011.support">Dynamic Trust Anchor Management</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571685">Validating Resolver</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571707">Authoritative Server</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2607510">Validating Resolver</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2571692">Authoritative Server</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="Bv9ARM.ch04.html#pkcs11">PKCS #11 (Cryptoki) support</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2609970">Prerequisites</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2608219">Building BIND 9 with PKCS#11</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2610529">PKCS #11 Tools</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2610560">Using the HSM</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2635129">Specifying the engine on the command line</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2635243">Running named with automatic zone re-signing</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2610637">Prerequisites</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2608477">Building BIND 9 with PKCS#11</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2608602">PKCS #11 Tools</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2634916">Using the HSM</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2635114">Specifying the engine on the command line</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch04.html#id2635160">Running named with automatic zone re-signing</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="Bv9ARM.ch04.html#id2572669">IPv6 Support in <acronym class="acronym">BIND</acronym> 9</a></span></dt>
<dd><dl>
@@ -187,28 +187,28 @@
<dt><span class="sect2"><a href="Bv9ARM.ch06.html#server_statement_definition_and_usage"><span><strong class="command">server</strong></span> Statement Definition and
Usage</a></span></dt>
<dt><span class="sect2"><a href="Bv9ARM.ch06.html#statschannels"><span><strong class="command">statistics-channels</strong></span> Statement Grammar</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589481"><span><strong class="command">statistics-channels</strong></span> Statement Definition and
+<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589534"><span><strong class="command">statistics-channels</strong></span> Statement Definition and
Usage</a></span></dt>
<dt><span class="sect2"><a href="Bv9ARM.ch06.html#trusted-keys"><span><strong class="command">trusted-keys</strong></span> Statement Grammar</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589689"><span><strong class="command">trusted-keys</strong></span> Statement Definition
+<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589742"><span><strong class="command">trusted-keys</strong></span> Statement Definition
and Usage</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589736"><span><strong class="command">managed-keys</strong></span> Statement Grammar</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2589858"><span><strong class="command">managed-keys</strong></span> Statement Grammar</a></span></dt>
<dt><span class="sect2"><a href="Bv9ARM.ch06.html#managed-keys"><span><strong class="command">managed-keys</strong></span> Statement Definition
and Usage</a></span></dt>
<dt><span class="sect2"><a href="Bv9ARM.ch06.html#view_statement_grammar"><span><strong class="command">view</strong></span> Statement Grammar</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2590162"><span><strong class="command">view</strong></span> Statement Definition and Usage</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2590352"><span><strong class="command">view</strong></span> Statement Definition and Usage</a></span></dt>
<dt><span class="sect2"><a href="Bv9ARM.ch06.html#zone_statement_grammar"><span><strong class="command">zone</strong></span>
Statement Grammar</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2591713"><span><strong class="command">zone</strong></span> Statement Definition and Usage</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2591902"><span><strong class="command">zone</strong></span> Statement Definition and Usage</a></span></dt>
</dl></dd>
-<dt><span class="sect1"><a href="Bv9ARM.ch06.html#id2595116">Zone File</a></span></dt>
+<dt><span class="sect1"><a href="Bv9ARM.ch06.html#id2595170">Zone File</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="Bv9ARM.ch06.html#types_of_resource_records_and_when_to_use_them">Types of Resource Records and When to Use Them</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2597415">Discussion of MX Records</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2597537">Discussion of MX Records</a></span></dt>
<dt><span class="sect2"><a href="Bv9ARM.ch06.html#Setting_TTLs">Setting TTLs</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2597962">Inverse Mapping in IPv4</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2598157">Other Zone File Directives</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2598430"><acronym class="acronym">BIND</acronym> Master File Extension: the <span><strong class="command">$GENERATE</strong></span> Directive</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2598084">Inverse Mapping in IPv4</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2598211">Other Zone File Directives</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch06.html#id2598552"><acronym class="acronym">BIND</acronym> Master File Extension: the <span><strong class="command">$GENERATE</strong></span> Directive</a></span></dt>
<dt><span class="sect2"><a href="Bv9ARM.ch06.html#zonefile_format">Additional File Formats</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="Bv9ARM.ch06.html#statistics">BIND9 Statistics</a></span></dt>
@@ -217,41 +217,41 @@
<dt><span class="chapter"><a href="Bv9ARM.ch07.html">7. <acronym class="acronym">BIND</acronym> 9 Security Considerations</a></span></dt>
<dd><dl>
<dt><span class="sect1"><a href="Bv9ARM.ch07.html#Access_Control_Lists">Access Control Lists</a></span></dt>
-<dt><span class="sect1"><a href="Bv9ARM.ch07.html#id2603082"><span><strong class="command">Chroot</strong></span> and <span><strong class="command">Setuid</strong></span></a></span></dt>
+<dt><span class="sect1"><a href="Bv9ARM.ch07.html#id2603136"><span><strong class="command">Chroot</strong></span> and <span><strong class="command">Setuid</strong></span></a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="Bv9ARM.ch07.html#id2603232">The <span><strong class="command">chroot</strong></span> Environment</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch07.html#id2603291">Using the <span><strong class="command">setuid</strong></span> Function</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch07.html#id2603285">The <span><strong class="command">chroot</strong></span> Environment</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch07.html#id2603345">Using the <span><strong class="command">setuid</strong></span> Function</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="Bv9ARM.ch07.html#dynamic_update_security">Dynamic Update Security</a></span></dt>
</dl></dd>
<dt><span class="chapter"><a href="Bv9ARM.ch08.html">8. Troubleshooting</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="Bv9ARM.ch08.html#id2603371">Common Problems</a></span></dt>
-<dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch08.html#id2603377">It's not working; how can I figure out what's wrong?</a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="Bv9ARM.ch08.html#id2603388">Incrementing and Changing the Serial Number</a></span></dt>
-<dt><span class="sect1"><a href="Bv9ARM.ch08.html#id2603405">Where Can I Get Help?</a></span></dt>
+<dt><span class="sect1"><a href="Bv9ARM.ch08.html#id2603561">Common Problems</a></span></dt>
+<dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch08.html#id2603566">It's not working; how can I figure out what's wrong?</a></span></dt></dl></dd>
+<dt><span class="sect1"><a href="Bv9ARM.ch08.html#id2603578">Incrementing and Changing the Serial Number</a></span></dt>
+<dt><span class="sect1"><a href="Bv9ARM.ch08.html#id2603595">Where Can I Get Help?</a></span></dt>
</dl></dd>
<dt><span class="appendix"><a href="Bv9ARM.ch09.html">A. Appendices</a></span></dt>
<dd><dl>
-<dt><span class="sect1"><a href="Bv9ARM.ch09.html#id2603536">Acknowledgments</a></span></dt>
+<dt><span class="sect1"><a href="Bv9ARM.ch09.html#id2603657">Acknowledgments</a></span></dt>
<dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch09.html#historical_dns_information">A Brief History of the <acronym class="acronym">DNS</acronym> and <acronym class="acronym">BIND</acronym></a></span></dt></dl></dd>
-<dt><span class="sect1"><a href="Bv9ARM.ch09.html#id2603707">General <acronym class="acronym">DNS</acronym> Reference Information</a></span></dt>
+<dt><span class="sect1"><a href="Bv9ARM.ch09.html#id2603761">General <acronym class="acronym">DNS</acronym> Reference Information</a></span></dt>
<dd><dl><dt><span class="sect2"><a href="Bv9ARM.ch09.html#ipv6addresses">IPv6 addresses (AAAA)</a></span></dt></dl></dd>
<dt><span class="sect1"><a href="Bv9ARM.ch09.html#bibliography">Bibliography (and Suggested Reading)</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="Bv9ARM.ch09.html#rfcs">Request for Comments (RFCs)</a></span></dt>
<dt><span class="sect2"><a href="Bv9ARM.ch09.html#internet_drafts">Internet Drafts</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2607124">Other Documents About <acronym class="acronym">BIND</acronym></a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2607177">Other Documents About <acronym class="acronym">BIND</acronym></a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="Bv9ARM.ch09.html#bind9.library">BIND 9 DNS Library Support</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608280">Prerequisite</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608290">Compilation</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608314">Installation</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608345">Known Defects/Restrictions</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608422">The dns.conf File</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608449">Sample Applications</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2609490">Library References</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608265">Prerequisite</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608275">Compilation</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608299">Installation</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608330">Known Defects/Restrictions</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608680">The dns.conf File</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2608707">Sample Applications</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch09.html#id2609611">Library References</a></span></dt>
</dl></dd>
</dl></dd>
<dt><span class="reference"><a href="Bv9ARM.ch10.html">I. Manual pages</a></span></dt>
diff --git a/contrib/bind9/doc/arm/Bv9ARM.pdf b/contrib/bind9/doc/arm/Bv9ARM.pdf
index 3333bcc..98d816b 100644
--- a/contrib/bind9/doc/arm/Bv9ARM.pdf
+++ b/contrib/bind9/doc/arm/Bv9ARM.pdf
@@ -3323,20 +3323,23 @@ endobj
/ProcSet [ /PDF /Text ]
>> endobj
1086 0 obj <<
-/Length 3428
+/Length 3426
/Filter /FlateDecode
>>
stream
-xÚíKs7Çïú<ä ˆÅû±§µ-Ù¥T";²\»å$5–X¡H…¤üȧ_ g
-3*êwüsç×ßéàÔûÿq‡á¬|ñ¡„9Ç;R ¢¤á'Ó÷;¿Ä7ÿº6Í}%,Q–›Ì'á|Æ9±Îøè”#Zp±þ(špjýAüå \.±–Jl:?;›ÌÎÚëàÛ
-C„vº½îýj´ª.ªÙjoÈÝݯ~£”Ï&«É|Öüd4;m^|XŽÎª½¡cf—ì ¥÷ó‡tî±»&´â–hNYÊå egƒæÅ1Ô*Ø ¡áM­n¾\©oÄ´ÏÅ‘‚zgJcŒiˆÖLRÛó¿:t÷ä¼Ê@£)¡Lš†ñùh6«¦9h,‘J…ëÞ/FKÏ‚è^Y¸NÊà é-†bð@ù0x2q`ð Þ<Bí¨‚ððx|!9›/¾eè‘”h{Iíƒç^*OHo1<ÀƒÊ'm?<™80xPï .ˆa~XðˆÛÃóçUµø6¬‹ùb™HYâ¤íůi^"þh©éå$d²˜`ˆq•R´Ÿ“L'¨÷4—aŒé‹Aä„mžË|YT9*¸ŸÉXÃò3™7‹ÑÅÅhQÿE?ì:ó]°^šB¾‹i†MPOÅúiÊÄÑ„z4içšòiâwCÓæy±dn{ƪ˜×Rj !BMG7„š\5¸÷D5ÄRP‚ÄFh.FËU•šêå”ì[NÅ"dzúÞ
-Í<ò®à¹ÍZÜ=Vz! ¹,¦b˜@­0N2q`  Þ)Z«O¤¨¤Ì/k±³¤h'3ÊŒeìi•™ãb‚€!FÔ#(Fê=¤<N‚¾Ÿ¾+‚nQkŒ|Ôµ&䲘`ˆ‘µRªŸ”L)¨÷¸úÖÂÿ Ð÷Ó¡ï÷r>ŸV£VÔ·-ÞƒÛÊeÐ-aé*†b0täè_bçâÀ`@½'üJÆ)®! mïõ|ñÅÌîžÖ›CIùX—±²WÌ0ÄØ訃ŠL¨÷ÄSÄYf m›nÿj4.W£ñM­x_->׳֡_?É"RU 0Ä@èHÑßìÏÅ€zO PI(£‚ ^ŒÇÕrÙ@ðj>[­ëÅ|ZO¨LôbWŒ0Ä°èƒ`‘‰Ãõ±PŽ×;âb¡,g~ûiäÙØóïÆŸqÿÃGL`)ÐÁ£+éÅ#‚î=áa)¡ºC‡nèø¥ÞÀijÆ‹ÓÓuÉXaÌsÍi+f"ÙaH@Qú÷ý2A`@`®Úê,ƒ@˜ˆóYÕðp²çèîb4[~ZO'”aÏDÄÄ# 1&:¸~(2q`T ÞÊ/?¹á Û`ñaÿ]CÅ»ù¢í=ü4Y®j.äs¥H™+æb\@eLC+Æê=q!%aJÆq o/«Åhµ^”®ß–«ê¢y}\-çWëe\b.&52VªÇµP,/0Ää… ÆäÍÄÉ‹zOò
-¯¨UªÓ…¢~W“›5LoÉïy/!GÅ
-øîhÙöÖk‹Ï£iý;-ܶ×ø¤b€!†
-4—ÌƱíT.Ó, ž ½ñÎ n¶y}ÐËQÈt1GÀã*i‘FB&Œ#Ô{äHXo $hAÙ;âhóÁj붡ñ3ZÊ 4Dxé(fûMæâ@xÁ½'^Œ&Jƒ ¥ÛŒ‹ç`²\MÆËaûX…Ü¡|«ˆTÖm¨A’›-¸±9$±˜d‡$²ým…L˜ëD‡–D9Ðâô>ðØ\Z”ûièÅ d«˜`ˆ
-ëe#¤°`ˆÑ%ÂðÈÄñzO€Hék…äöa¯¦£õ¬ääð`Lh1.ÀÃ
-æú7sq`¸ Þ.‚Ç„€¸ˆëõ$>eGðç2u ™+æb\@e\ÿa.Œ Ô{â‚Sâ$W‹öqûßf£‹pÛÓ‡ËS?Ï
-7Ò¾ûì/æV</Eb‹!†$P%’L $¨û W„%#$ª…äíê<Ü.{}õ»ÞN™4“’ñjò¹^®Éžò(²X 0Ä *1Ú6 ê>MW™Ÿ›P©$qùr›Ç{ü+³Wç_ .¨ïЭ†ËÉÙ¬¹KK)ö<<ŬC 1¨ ª(T™@0¨P÷ *ê=Bh
+xÚíKSIÇï|
+æ
+Ñʼn‘„óé·ZÝU• Õ)j×0 GØw*Sùÿ©YUÝl@ý6°ŠPáäÀ8Iej0¾Ø¡ƒ3ÿovX{Í0\4„W½<ÙùÇkaŽ8Íõàäx/K¨µlprúëî«·G'G'ï÷~?ùqçà$¾)t̨¨ßñÏ_§ƒSïÿÇJ„³jðÅÿ@ sŽ.v¤DI!Âo¦;ïw~‰oþwmšû JX¢,7™OÂ9ø$ŒsbñÑ)G´àbýQ4á>Ôúƒø˸\0b-•ÞG}Ùt~v6™µ×Á·†ít{ÝûÕhU]T³ÕÞ+º»_ýF)ŸMV“ù¬ùÍhvÚ¼ø°U{CÇÌ.Ù*JïçéÜÿbwMhÅ-Ñœ²”ËÊ,ÎÍ‹c¨U°BÛZÝ|ÿ:¹R߈#hŸ‹#õΔ$Æ70Ò­™¤¶ç¿:t÷ä¼Ê@£)¡Lš†ñùh6«¦9h,‘J…ëÞ/FKÏ‚è^Y¸NÊà é-†bð@ù0x2q`ð Þ<Bí¨‚ððx|Cr6_|ËÐ#)Ñö:<’ÚϽ´<!½Åð
+¤y‰ø£¥¦—“ÉbN€!Æ TJÑ~N2q`œ ÞÓX†1b¤o "'lóXæË¢ÊQÁýHÆ–ɼYŒ..F‹úý°Û™ïÒõÒò]L0Äh‚z*ÖOS&Œ&Ô{¤I;×4?‘&~74mK涧¯Šy-¥"ÔttC¨ÉÅPƒ{OÔXC,MØÍÅh¹ª²]S=’}Ó©Ø™‡Þ}o€Úó“ì0|€€Š÷Ós3 ÌubÇ(b…f yWðÜf.î+½„\S 1L V'™80PPï‰-ˆÕŠ'RÔFRæ—µØYR´‡“™ ÍŒeìi53!ÇÅCŒ ¨!FP&Œ Ô{"Hy8œu?}WÝ¢­1òQ·5!—Ť
+cúg ¹80*Pï 姟Üpˆ…m°ø°ÿ®¡âÝ|ÑÖ~š,W5ò¹¥H™+æb\@eLA+Æê=q!%aJÂq o/«Åhµž”®'ß–«ê¢y}\-çWëe\b.&52VªÇµP,/0Ää… ÆäÍÄÉ‹zOò
+¯¨UªS…¢~ g“›5LoÉ÷¼—€£b€!F
+gâÀ$F½'¥%ºN™œÆ—«¶dý±QT?„Ô½t!IÅ
++ÓÉt
+ 4D éȆ@“‹÷ž ±”N ñÍEÛz‰= 5nÓ]0”µOxy'¦»&`ˆÁåtýGKrq`0¡ÞL~<bÁÙvnï„¥Í Ql{z­Õbd’F ÐÌõ/e‚ÀxÁ\ÇÕ@®4±JÒœ 7Ƹv@íÛeµ>„$žê¦°^6B
+‹á
+úyD?>™@0~P÷ a“ñÞ<¢ž¾®:œÕ·mG?./#Má Ýá»ÏþbnÅóT$f±`ˆAUB!É‚A‚ºOpE˜Q2B¢ZHÞ®ÎÃqÙë³ßõrʤ”ŒW“ÏõtEHö”{¡ÅbH€! T‰ÑþÓø¹@0HP÷i¸ÊüØ„J• ‰Ó—ÛÜÞã_™µ:ÿJðpA}Bk´.'g³æ”–Rì¹{ŠY/†
+bPAUQ¨2`P¡îTÔOz„Ð
+™,åØ!˜@0J2Q  ¾Ó3+ áŽ9Àˆ,aÄO¦rÛJ4±Òõða”zRÃááRv€ÂÔÑþmù™(°Gb¾Á³yˆà,¢£ÛqðËãý0Sªúu} |ðuUÍêRÍ?ý ˜ÑÝU4f´'T…Í‘?¼98:8~Q—úNrM’„R!óÈé{*øô!Ð&ª”€d†
endobj
1085 0 obj <<
/Type /Page
@@ -3482,7 +3485,7 @@ endobj
1107 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [527.6238 531.1295 539.579 539.9861]
+/Rect [527.6238 531.0298 539.579 539.9861]
/Subtype /Link
/A << /S /GoTo /D (subsubsection.6.2.16.10) >>
>> endobj
@@ -3503,7 +3506,7 @@ endobj
1110 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [527.6238 495.2168 539.579 504.2229]
+/Rect [527.6238 495.1172 539.579 504.0735]
/Subtype /Link
/A << /S /GoTo /D (subsubsection.6.2.16.13) >>
>> endobj
@@ -3517,7 +3520,7 @@ endobj
1112 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [527.6238 471.1754 539.579 480.1317]
+/Rect [527.6238 471.2751 539.579 480.1317]
/Subtype /Link
/A << /S /GoTo /D (subsubsection.6.2.16.15) >>
>> endobj
@@ -3538,7 +3541,7 @@ endobj
1115 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [527.6238 435.2628 539.579 444.219]
+/Rect [527.6238 435.2628 539.579 444.3685]
/Subtype /Link
/A << /S /GoTo /D (subsubsection.6.2.16.18) >>
>> endobj
@@ -3559,7 +3562,7 @@ endobj
1118 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [527.6238 399.3501 539.579 408.4558]
+/Rect [527.6238 399.3501 539.579 408.3064]
/Subtype /Link
/A << /S /GoTo /D (subsection.6.2.17) >>
>> endobj
@@ -6942,19 +6945,18 @@ endobj
/ProcSet [ /PDF /Text ]
>> endobj
1658 0 obj <<
-/Length 1741
+/Length 1536
/Filter /FlateDecode
>>
stream
-xÚ­XÝsÓ8Ï_‘Çtæd,{x*reŽÂ•ðLF±•Äƒcþ÷Û•dÇvÝÚmÖ«Õ~駕èØ„:\ôCg쇎ášÔG›‘9^Á·×#ªeH-DÚR/f£gW¶?г¼ñlÙÒfÐñ,þ4yù÷åûÙôö‚X®9ñŒ âzæäÅõÍ+Å ÕðòÝÍÕõë·—¾3™]¿»QìÛéÕôvzórzAhàR˜oi L¸ºþgª¨×·—oß^Þ^|™½Mg/m©i£#ßFŸ¾˜ãÜ~32 ; Üñ~˜ Ck¼9®m¸Žmלtôaôo£°õUNŠŸk†Xþ@
- 5#tB컡áÙ–-#øé‚x¦9Ù°;RrQˆH6\ñ²ífÁKE?WÃô–%”¡ëZmE^
-E%Åœ1‡Åq"’<c)Y–ù†°­X«/^Íóržå§Ö§§tE,ZóG(ëV²,1ß%‘VR0±žg¬ŽÎJ0¨Ò
-R%ßõ4¤æUÁ£³ýÚ0­É† 8YòªâUϱ3¬Y&©à%aðGòŒìÅþlºæ`”~¨aQrö•Ä,53èãÖSŒÿš<¡ sé×<M*]5?ψ˜ái»¯ßï<R”|™ÜÕêqže!n½!‹¢4ᙨ~Çš^~1'Ì9~¥Û˜ÿ1óªí² ŽŒ–VvNùóh[VÉŽC¥¤‡³j­ãÊý¢žMÓÕ8÷ü„‰²HÅË]QǽùË"Qž ‰_LìâÔ/KØ„«tËû›ç²³i.á¯Ã¸yw3}Ôîá`'ÙÆE :Ÿ…w˜ÚM|ž @½”¯bi+ý'Šã×*Íz•saòÛ–—‡4_=øã¤b‹”–®ò2ëÞá
-Ú‡¬sê’Œ;Ì‚U•X—Û3»kƒwÍÌc&X‡-hOèž=?J¡ßxкñ€Ï®,:n±Äà8ò~ …ðšH=¸3š -/ð˜¬Ô­ðƒ`‚o
-SˆÔâ F¼qŠœ­=­·à†ialšY©×‘í…¢"®2ãºh6íV$fÖö¼ ÃÁŸ
-{n}"¶À0-†ç™ŽÆ’þ¶éÕº¶é:€‚eÃPÁ«-¯-U®X
-
-~û]÷øèEXÃÐf#Þ[¡_…æ»nßòæø¾éÿÝ!'endstream
+xÚµ]s›8ðÝ¿‚GgæDßLŸÜÖé¥sMz©ûÔv<2Ȇ)
+²÷zÿýv`°‰CÜ^ò õ²»Úo­D þ©âZªfx¦âx¦jiÔRüõHSVðííˆV4¤&"mªW³Ñ‹kÃQ<Õ³u[™-[²\Us]ªÌ‚Ïã×N>̦÷WD·´±­^ËÖƯnnßHŒ'—×w·×7o?ÝO®s<»¹»•èûéõô~zûzzE¨kQà×+ 0\ßü5•ÐÛûÉû÷“û«¯³w£é¬±¥m/Õ 4äûèóWM Àìw#M5<×RvðCS©çéÊzdZ†j™†QcâÑÇÑßÀÖ×’µÏ–᪖«;=4iËTsUÏôű<Õ6t£ôàç+bkÚxÍHÎE¾'"Zs‰K6ëÏ%üR._ÑbØ–Pªz–¥·Edi.$esü1€‡A$¢4a1Yæéš°å—=/æi>OÒsûÓs²|æ‡üÂ:Šå, @FÀ·‘_ ɘç «½3@:µÔ‚ÑŠ ¡y‘q°]k&ü¬Y–ñ€€‘9/
+^6@›e ž$MÈÖ”è/š¥õzé§\9gßHÀ¦~ÃAŸ·ŸDüÓÄ M˜—vÍ㨨²æß¾
+þ ~æl‡7X_gbÿH[ÒÃKöGºËàí¤ /žŸ6z_U$J<BógÙôƒç)IRR¤Œ_ªÐ‘˜_œÏx‘ÆÛ:sÊ¡5݈‹r1àÉž°¤Øá°Ò¯ž:„;#ÏD9{èŽ/ÏÆ®­R±c…zEþ~5Àè,M
+N²4Žü}GÜ!z¦.Ú½˜W0R$ƒ±JÓ ƒÌXQˆ0ßtÉC»¡×È4`‚uPþ!¹Û ;îßê_Ò®CE´Ó®9üÎ 9ÿƒOÅåÌŒöø NLGuuÍ>Øàã‹k* z‰¾¶4Õu4«$Âë5µá®­´4Ãñ¢·é‚ ¾†Ã@þ|ÿhšž”—9‰Ë˜>lÅ«½ôÖݶÒmÕ¦ºÔgòF¡Öî¿žg1ÒÔœ
+3@’aX]ÑRÎ0ÆÇ B›L®«8]àiŒðÁ,ø!R\Íñ‚W ¦9B‹½\ñ¥B•à,Œ*¶£ ׬"ÆËË«}Ê$‘/KXªM»‘Áì7l{ÌpqÆp0¡oW›œIïâ7ÄÄô°-o|³”HB&QwÌ%#*‡hÈÇÚ®êz}Ú³€šsìÙ?@¶gA”å^qÃEœúß$¸‹ðq
+Ÿøzâ©5íô—_ϬÐÁ ×Õû3ÃÀJÑ=§V
+lYÇš7OŽ§ªÿò¯¿Žendstream
endobj
1657 0 obj <<
/Type /Page
@@ -6967,30 +6969,36 @@ endobj
/D [1657 0 R /XYZ 85.0394 794.5015 null]
>> endobj
470 0 obj <<
-/D [1657 0 R /XYZ 85.0394 230.156 null]
+/D [1657 0 R /XYZ 85.0394 179.8868 null]
>> endobj
1326 0 obj <<
-/D [1657 0 R /XYZ 85.0394 199.9052 null]
+/D [1657 0 R /XYZ 85.0394 148.102 null]
>> endobj
1656 0 obj <<
/Font << /F37 1026 0 R /F41 1218 0 R /F21 938 0 R /F22 961 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1662 0 obj <<
-/Length 3249
+/Length 3141
/Filter /FlateDecode
>>
stream
-xÚ½]sã¸í=¿Âs/«Ì¬¹$%êãî)ÙËnsííµÙ´}¸»™Ê¶œhÖ–|–œl®Óÿ^€
-•ez¶½ˆL(L†²¹øxñ7O°7j§NêOI¡ÃXO(PëžS%L–™Yb2‡:´
-¼,Pˆ7ïLØCU©
-¿—0ˆúA°U8ôݾ
-Ÿ!94Æãxè8Ûü3†yÛNi †:K†ÑºK¾Î@rÕYz1Ôm2þ#ôˆ\Sþ>uÐÅ%™¨ãÓ¬Õa ‰^˜º¥/öõ¼ªçMŸb6ÁhGÚågPgRÓ³ukS‹Èùð8‰Ø¥¾`€Kè
-)ÅSw¿]6¸+pÐÞ¶µUª‚|µ-+°(&Z¯x„OˆÚÑ¢Ü`Ðo_hˆr>X¬j]Š+Ê̯°·eÁÅTÉ5Ò„êG5õŠËeÔ…ÖKhv³¿LƒÃtÆ¢¿z×ÒƒK7%¥âY¨á|ɲðÄ%!ÍûXtG¦&.=ib| Åàhå,-Mϯì&Vî3%á$ !p –¦œA¨ì÷ŸÈ0¡³â¤
-¬î†róãk°46‘Êi0û?AŠ–ÄøzMØÃàDœP©Úé a¢‡t:J8$ÊO«ü¡XÍQqg¢Ôioæd°`œc±"íàchŸ
-Â29òi )¡}¬ÂAz”H‚Çš^5R6H
-ÃV»Ïeã˜c—K¡1sèã㟮´‰)%‡Pòxæq­»>æÚ+ƒCãrz›ôO¸T‹(T.gÛ~¦"4±b´â3”Ñ/(òÕªX<†U¨„Š¿è_=¬3æ°|*8ÿŒ±ìUB˜‚óõìÚëxñ0„H¼2ˆƒÕé . Ó.ä‡üì„0LZŠ¶Ó·^:ñ×oh¶8ƒÒ¨Ð{€lu
-(v©àƒFƒU[‹QêvM#Ì+uø—ÿÄ%âßØ€ @¾…A0^ ˆRa€lóÖ¾h8' dÐÕ²Üy¶xÍöø7CþvÅüMÓÄ&Kÿ¤ø?ÿtªû]:nšêisÑI*¢ˆ0S¨t8ÜŽ„cuÌú¦Cä”endstream
+xÚ½ZÝÛ6ß¿ÂèK´@ÄðC”¨öi7Ý´)Úä.Ù»{h œl˱[r%y7ÛÃýï7Ã!õá¥7
+ü j8‡3?ÎP ?±Ð)Ks™/²<aš ½Xí/øâôýp!Oì™â)×õíÅ‹W*[ä,Oeº¸ÝLdÆ‹Ûõ¯QÊ$» <zùöÍ«×?üãÝÕe–D·¯ß¾¹Œ¥æÑ«×?ßPë‡wW¿ürõî2F‹èåW»½yG]©“qýúÍ÷DÉéqFè»›W7ïnÞ¼¼¹üýö§‹›Ûa-Óõ
+®p!\üú;_¬aÙ?]p¦r£÷ð™Ès¹Ø_$Z1(å)»‹÷NzíРýgR¥2`@)'4‚é<׋Lç,URYõÖÄÓhU¬¶Uýá9¼‰4ê·MWRÇ]UÞwž§ÆFuÛ¢½&r,…£ÂøÝ¥ jf%:†¾qÅ£ìË}Ó>¸á¤Cš®«–;G®ö;IsçÒ”]³;öUS£íÁ
+e7r7¤5DZº÷!\× 75‹þµ-ëqxÀ¹
+‰]55*ùáèb–ôñP äsäI¹‰ùÜ‘F|Ñ ÿñ
+§LA‡¯““Ëo=¹/0:JÑ.«¾-Z§)ú®ÃPˆD8àüŸnåUÝ€òà#Jç0ÚJ¦0O9l%t¢ylí ï~[¤ÍÒ—]ÙSýÕvÙ‚ß±‰„鎡@êõN
+ˆD‘óÍ0~P^‹éK¿¥7÷ê Í«çô¼vO›ì`ãå)¡©1d혓žë0rP¨HÐ|
+…†ò1£G(Ìï©ÔqÆM“ ζ¯HmDš¤§© H·.;jáÀÐØeáã7®¹ÅOๆñ¬£â`ËÁ#ªÝР1á)‰öv¡’Àù±ÇÆÑý¿¥U$³5;ƒ(0-9æRq
+ÙÎ7WßPã?vB?Íl^¼ J)±5ŽßŽTõ®a=/å|ÌHN÷•1§'³Ñêþû]hÌDã뿦q‹&wT´7>¯žugu}Å[î»à2ä—-ãåSËÿWÃO5> ‚8è?ÿ¼Ô:r rЯè©5:x-è1
+ˆœ½—±iðÜ°±ôGê ñ
+UO¿F‰ëª?C]j”ð£~.ËZ‡Š\Èó”ñSÿY¶M\7q×çT…MÐÒ‹öéYúq9ËÎÞ4½Í,§éHâ"èKGðùf80âFaB|ìÜ@¯Í±£8JpPùð(ó«ž„£íÆâ(—ëÊAÍ: 2øA-ÌÖ§9|B9¼¦~žÀÇI&]ÞÄ1oS0Ø*nÅ
+Ì'[—ˆ7µë8£¤±ŽÝ汜q-ïIé5Ù9ç~A¹ ZI.)=¶î=4qŽþÕÝ;1‚ªM’WRÃÐúã¥!eM}c99c'in¦tb!ãíÓ¾øhÓH˜¥¬;פ| OŸsò¨¼³wÆÕGÝv¿9îpWàœ}ÝÕ–SFDÅz_Õà'PK ´LEÏ\; èGËj‡˜ß?P¥|0YÝÇ —?*2¿ÀßV¥+¥*W!LRP¯]­Œ–r%¡ݵ—&:†‹0W÷.§…ôìÒX°Lˆt!ÓÎ.Î\òS<å¢;^¸$¸È-œïxÝz2sžÁyfÌÓ3{¦ÀÌS,R¸5›šR©¡®o?’cÂËÚåtÀñÞ>•JEíK<í/”
+{Ñ@“Ü° ÏK‹eU¯]b?ôÌöÏ
+|ôQ,ü¤*JÎV1m½^1Üñ
+`hŒñš›3ñª¥ó4lHÄáu¼w†ÁuCDŸB{}2ߘu¸¡Ì$ø„ɆÊ|Üe†qðFÀûáÃÖ¼÷Uç•s—eLbþ2™÷?^IRb€²}âûÚx‡ì*ˆÎÿ¡Àgö6õVž²D Ÿ9°ý™hW†)
+ÇV~‚bºÊŠb½.×gcˆG%?S3Œ<çÌñ ©`ü ±ÿ4¤8@˜€óõ‰YžÓiU>ƒHºr
endobj
1661 0 obj <<
/Type /Page
@@ -7003,28 +7011,30 @@ endobj
/D [1661 0 R /XYZ 56.6929 794.5015 null]
>> endobj
1660 0 obj <<
-/Font << /F37 1026 0 R /F22 961 0 R /F53 1313 0 R /F21 938 0 R /F41 1218 0 R /F39 1161 0 R >>
+/Font << /F37 1026 0 R /F22 961 0 R /F21 938 0 R /F53 1313 0 R /F41 1218 0 R /F39 1161 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1666 0 obj <<
-/Length 3851
+/Length 3769
/Filter /FlateDecode
>>
stream
-xÚ½[ÝsÛ6÷_á·ÊsŒO’xL'uïšöbÝÜÜ´} EÚæD"‘Jêÿþv±
-5›‹»‹¿÷F­®ë”üŒÊ˜Éd:!@)#
-e\¦Æ²DIåØîÊuõç²,heŸÊç.¿g'+ãŒz*¡s’ééôD˘ŠS;¨‘&^>¶m¾«–ë}Y”uWå›1°O,Õ/°ˆ&ØÈÃr–JÀÕS ê`ù¢-ׇ}Õ=Ó×z%²EÏ–«ûZuO¾ôT­}±;öß)÷¾üÔ6•óÀ(ë¼ó”°ò–J4ÉçCÙv°°v'Ó4M¬J0kŒtLÞWRXšLBŸ÷wwËÕÝí{ªÞ¹qš®Y7ÐhiíâÍaOƒ×ÝÆwnj*e‹¿–ûû’ú´Ôfè'âµjj"®<Iþ%¯6ùýÆs×Å€';®†‡eõº¡@çrøÑvÌ4ìöU½®v(p$ðbÆšꂘ±r×~ÀõçCEÓU÷DãÇý‹ò!?l:ªmŸAð[j€]¡J´ŽMùŠ>êf¿Í7 8XÎõ;«5îÑuÙ­¯?íï #“¢ ´†%Zhè‰`§ðBNU¢›&ˆ¿ü ®LQÙ­Y%jqï+Ǿ*@ìô}h«ú‘Š]:6¶#w—ËÀÐ`!͹
-Ö¿½ŽÝ¶'mƒ®v£AÈc9ý?Ñ€Y—Ÿ(`\féy—SÍ»üžªßQF?¯æ…¹ÑÄÜ?¯3&”MNff²°I®œïvW|dÑ+ºÆÿê:ß–-Q·•IaÓ6TÑ>åÞåÑ7ùu,=–u¹Ï;jHiN•KI :ăZ¬þzó¯ Ý‘)2µG§üó© K }T꼶CS^o*ðÆk’8Ö¸èc¨ëˆ§T0mxöK–ñ4 Då맼~t“'‹ÊÏ·ÍŸ©Ðìiº¾Âé)œR?<S³¤ xè¶êåêèaˆæÆJŽÄèµ… öÄâöª)"–-¬þ HpÎŒL“¡€hŸmêçÀ’Ûføí›Ûl3
-Øðµrš
-EõXÒNHˆk([sVB`ö¿“Iìâ¶&æ· :m\Ù:oËöY6.ÿÔˆ–Js¦…VšØÉpbrÉ
-ç$úñSÿ%8XR¢³o
-ò@~#oå²(•«:Î *7ûO½ò€¬»fßã Vvë»Q4 ”¢Á`0`ŒB¥3¸àË#˜ßSŽ}9T=õcã³V§3MIÅY«‹©æ­®§r@%_?•KŸsŽí6=ô˜4¼@51ýÀò@mÉÓáü«§Ð„_ûœØ
-ƒù£1é
-SÍ+LO…3îªbNM¢6žŸ»§š˜|˜s+&E2œ|\dìVýJôèV³)·šöZ‚˜ÑÒ „]ÖÓcÅí[O‡°&•N°Áy27æ`çUÂÓõ;“;¯9æÄý¹Äµ?Д˜áY1T1HM®÷‡úÚéýŸÁVL¥â
-8RLüY àIè§`#OÔ…–òÐôùýÔÙ{Y¯7MnWCšQ4Jy üù
-z}31*À%C¾ä#t—W›ÖEbí#±‘XžDâp² MQ$3^\÷×Mgs4|w„:ÍÜ6¿ôfÞÞðu7æ{‹¨ÎØ[ ¢×:ë}Ót³ö¦,“ Оe §šà`§5“:Ɇ,¬Âë¯ÈÞ4%ðôZÌWôWöÐ_yèéªÃ{Al »j:ßèÌÕ½`s)”ÎNP#Îà‰jÄC§™ÓQ¥™â<›; rž¾¼ÔY¢þßç£ì Kßx P€ Ä]çµ2¢:£•Š´Òy¼ÛœÑK#™A<ËBO5ÁÃ0¤øüD ™
-˜¨˜Ó½Å’_1}Ðó (ÄO•às:@ãý^ÍÅ| Ã<U%|+!é “sh´ï¬WŸö°+Ü=vXn¦tZ2aM|Þ$¢Fy,zâ…,†§]‘ƤÓp•G„Tízx æEÊü õÉž¦E*‡,þÆ Ç(9V·ðZ;e2MÄ Ø/P/#ò3/À=Ñ
-…`Ò1çý_:œ²þo6õk|endstream
+xÚ½[ÝsÛ6÷_á·“ç"Ÿ$1÷”&nêöšölÝÜÜ´} DÚæD"‘Jâÿþv±
+|Ú_ñ|Ñ>싼»”jqÓà+æA‹ù¼‚ß”/š–ž»ê©Ø}…okðx •%Rj” goŠ]U.¿ÞW{ÇË£AX£c¡UêŽ~›ª*«òo(‚XÔ½£ÞšM_·M±­ûçx€Y¬õ¶w¤¦w2÷VÜË¥`<1ÔÆáWkä¤íªýg¶=9Ù\–0 v—ñ,ɸÓÆ옖1íŸ2fÏ…Rô«çåC×Oõš}±‹À3žÈT¿ Càšb`YšH•Ž¤X¦–’§‹n¿ÑÔrÂØö¯Œ‰­ã@åâ„lqßî‰òþîn¹º»yïúŸJ0—‹å‹›{7úw [ín%µ=­«zš³hJÇê¡MLÓD1¦†›è4·±†6Óôu±…]U‚LCI°àž 0_ôh×Jƒ ðP5Ôãd¥‡/õÖÍ°®ˆRl·í—ª$â—†¹y&ÈH”]ÑoëæÈŸöu³©Ÿ‚XnMoœÌ¿·î©ÚÔ¨o»'íìa¦©LriÎÛeÄ4o–žil•›}ÐëØ2ah¦ÎËàyNeX¥aI& <ÅBX£„ظÍao]ŸÆ{4ÚÛz¬7®ÙÇ[ÿ¦öc{Ø–Ô.À³l0®Y
+¼vG-ZäÓ¡êzØ k€ Î,KåÐ
+¡œóH'–†ˆ¥RÞ}¸{=¡k!ƒ°‡˜È’²ÝèNõœAÒayê¸qaû6ébueÄ¢%ÉljÁ†÷¥W¨ÃˆDKágŠò„b:±Ð2¶ïY$`mü4»Cçì¯Øv-µÖ%¸®úþè+H÷{lÇÚy[íG“¸4‚öb³Á^g*aÆÈóÑ>æš÷+¨ï¨£AW2áú…µ=ÓÄÚƒ0¯ò Çhqr3ÀkN
+ Ô "™„e©gª¾n‹æÁFL0Ë­·+ž©Ñîi¹@°vŠ kÔ÷ÏÔíi
+º«ƒ^-¿ÅÐœ¢ ‘3FmÎù¦=n ’)#V¼ý+Rg,Ñ"K‡
+¢}6™[[v›á7t ¶Ùä”(°ƒ0¶ÖÕDÌâ©N¸2¾bñ{‘2çÍ÷5ΈPôôjæ g•ëÌMð׉5 ed‡§ÙÒdZFÉ'ƒäó¼åþKÝUNK2ƒr0çf×HÒï„”NK2=v ´ ¤%èpZ‚ÖŒ–`EBìpE»#µ<V_©QÖXžMhˆ)h}VCàæiH§Æ­(ü®Å o¶)ºª{Ežíðõȉ–R±Dq9J¬´°ÕáÄâ"4àßÄH‘J ¹‹IHðJÉ¿tDòA ùpW„Ñ]dq°µ~»é±i›eõµ „†‰ŒÝa}œÊ,¶õGWÜzñ/äSú ’s ~†¡œ«D
+ÐÁï8ª‰Éó|ú bf\ÆSNÄ}ž'š¬l~Ë]„˜€°M¹ðÖqv´\®ó!¦àûr3‹çö€82v
+6òÄ\èUîÛPßO½WÍfÛvþ^Õ—e{ ’ÚŸ­½²ž ¡¸FÉô|¹æChà²8
+/8±vœ ¤J'cÒó® ñ@Ø‘#(Ýj§[í¬~û+¾ðÁfµ÷­£Ë?í!ê ÿÓó÷u:ŠžZÇCxØŒ.GµvfêD$‹lÝeÌ|h#´k³oë7ÛáÍ6º…™ª²¡€V©OÁG˜6júŒRgñåÿ éæhpN¦UN¡g /é™P/vÌ5oØËâ ‘$žð0ظ³"® †çE`Ñyª‡BP¦c*Æðd1s&Š„ÿ˜:F
+ !¤‚c‡HÅ}w)}D*©œ±DÐ4g|h‰sÒ
+\/Èq:ÛùÐ!K³N˜c®3¡ÃsÙkê¦ÄSÄó)Ñœ pMH0‘ÅPʉ™ŒsbF©=+’Í3ðë¾üpz?ýJqi‘2ÛàÐQ’Ê”?3Åõc®Kß·~žº¥æÞÇÇãýdñE$¦%¨^ïªH4:¦6" ÝRèݺÎY Ÿ>“ÖxÕÉ|â+›®«6ËmÛ~,:TÁDVÂû^æ/Ôº§`Œá³7éçb[—ô%ÎĬ
+qák'w0ÉÁ¡û¢Þv6+—¹ÏÇâ$ûSnèŠò1Ÿ‰‚hà*\=­×ð$´éÄnóK_Æ̈š%"Kù ß¡™Î|†ê˜è³Í¾mûYg“&)àîs«¦Óå‡9Z%™óÁú+ÿ XäiŠÊxúfÌ‚¯ÅÄ
+ŽÉ¢FœÑš9#•*‘Œî6ŽàÑ+yú
+Så©üŸ’&gDzéXÉé?UŸ0øëÌÿOüïø©y>wB$Yšä^Ñ …‚ël,yøtþTôÿ
+Oendstream
endobj
1665 0 obj <<
/Type /Page
@@ -7032,22 +7042,15 @@ endobj
/Resources 1664 0 R
/MediaBox [0 0 595.2756 841.8898]
/Parent 1655 0 R
-/Annots [ 1668 0 R 1669 0 R ]
+/Annots [ 1668 0 R ]
>> endobj
1668 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [250.9056 225.788 314.5963 235.1976]
+/Rect [250.9056 159.9586 314.5963 169.3682]
/Subtype /Link
/A << /S /GoTo /D (statsfile) >>
>> endobj
-1669 0 obj <<
-/Type /Annot
-/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [108.9497 73.4705 178.334 85.5301]
-/Subtype /Link
-/A << /S /GoTo /D (dynamic_update_policies) >>
->> endobj
1667 0 obj <<
/D [1665 0 R /XYZ 85.0394 794.5015 null]
>> endobj
@@ -7055,61 +7058,70 @@ endobj
/Font << /F37 1026 0 R /F22 961 0 R /F21 938 0 R /F41 1218 0 R /F48 1238 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
-1673 0 obj <<
-/Length 3282
+1672 0 obj <<
+/Length 3345
/Filter /FlateDecode
>>
stream
-xÚ¥]sܶñ]¿B“'j&G ÁÉ“b]§–œJrÚL’‰ÓqÌË‘'Yíô¿w»À‘'žÜNí±¹X,Å~/xâ<€¿â\Å~œÉì<É"_BÍYpþ
-3Ø7H…8çTˆè‘
-Ó ð~¹È$,^•Dú˜×{Ýó–» ‘z¼Ú¦É‹E¿Éè5RŠÆ¤´(ñp£©Ò€T†F¦îe©bƒI&Li”€—·%‚fšRaБdt8oŒçŒV72@gtHF‡üSFG¼6°(ò£8¾a`#ªW ÌRáæÛn7oš(d ^ßÔÍl:6ª4ð£,Œ¦››
-ƒÔû|õó›û·?ÓÀ°Pâµûf¥w„,m¯w Fש±:D‘©ºz¬ÚB‘þÌ«mé°W7wôêÖ¼Ò ]ÑÕ¼×._#UY`„I#Ã+* "[™Ø!¢¨„"ŠJ=éhÞ$TâuÛL[\“Wmý̸v
-ÀJÓ3_Õ ™ð Ï¢kš}[ùÀO˜d臺[å¼$ˆþ¤…« ÒiÈ×-|LuÚžhfÐ5‹R?VÅËDA=‰ñúöŽjfÿi…DF3eÀX»È¯ïöÆä
-wkzêv SÜ>å‹Ï‚¹—Œ±nM2(v|Lh·<^ ŸÛ]Õ仪ft«uiW5‡
-L<×0‚ÆkeC£§Me‹9®#E¼¤ÑX‘œá :¦|a¶¯˜ûÌ- ¸­IÁHÄã-þÜW;
-aGûLŽ,Æ>œ€b󊡧F¿O{& hW‚7¨=œ]]O[Rýu“ïûA—Ñ:RShH‚£Ä'eW£Øt&©H9ðÍ»hì¸!dð«åÀà èç ù-O¼,Nýjç€Õk´G+”ŸEÑQñ†¢ƒýAf¤WeV
-æãÎÑ1’ÀW*bb—!`·!ÿ‚‹ 6éh­‹Æ垌ÀqbBÇòÃʵɱ«¶*x‹®E-=ìɲYwyÉ‘#ý!Ÿ
-¸1z€ìžÇÐo!²G÷ˆ*WRÓrˆ­7ØY×ÖFó–—fi©ÀHëæÓÍÅsÚÌh( ¿ef#ªWÌÌRŸïº<¾ÖÆÏ–xÇƦ_BÔ G5ÃÆÄØ”ò¥ñ”û ¬v ’0% SçÛ[6†B7Æ3ornŠJ˜2n/rÿñª'rñÐm ]ëG]óëÖ´=gÏÔöOð%«n {J ÇÝšÉñÇEdnmj;67ýµ¨÷%ë}ÆwI2C,³àÕµÿh€u Ñ¡¡Äþ
-®8P‘Aý,>W<Û䥞Îpñr êæI»Øgfžéy$Yœ
-ìÛMÂI²'“m¹È0Ç@òp»Ãò3¥ÉÍ?®>]_~¸yú±‹wUió ’·7—×Ëñ¡¬ú¢{Ô“4dsškDF‘/¢fÆTj±Ù3ŒÅTq`ÕSIJkK±-«ûn„íG‹AÞTuIt‡·«Ÿ=ÍЕ¾T?åϼÀ¶-˜æ GÆ sƒÞ5U«gÛ¸æ0*2
-tU]A¡2<OëÉ5hÛ±ÖÄ¥GW/`37—9-'ì56jSÈJ³ËqÈ.gÓÂ]ÕTu¾3Á?Š,+ÇÂ…GÜ ¦Àh‹@¾«,ÕHi0ÒÍÖ˜w„Ÿ-JûVUmGð ?6ë ô$#‹ès
-[€®ÚÉô¤™‡Ì‰P¸+>‘45ö‹ü{yó+ßwL„Gn:c'®aˆŠI#: iA
-–¾èDÂk èJ^¤;¬ÁÆ)Ò6>þ,Æ߃B[Þx¦8 ¹K³^¡ðb}K
-^XéæÆ»PnbT|e¦xx‹®+žú¢2üLŒgßÅ*Mou?ÌhN…~9ú/4—¤~ âŒ_0·è6p$ÁaǶÛ5æ`zèfõI™æø"/fÖ¡ÜôC ˜Ûã÷üd8ð½}t¸M¡ðƒX‰i"²ô‹¼-6$S鼚/Q´Û­ûÉö¢¬ñ@ (÷K%í}²$­H÷œÉÌo*=”®Ýr¿µfDcîg$÷3Ò4ÜH€eÚ‰Ÿ…ÊÇßï̸=ückø¿&tø $¡0MO|Q”`Q
-‹0S¨ •¾ šxYËÖÿ%Ù£endstream
+xÚ¥ZÝsÛ6÷_¡¹—£g*š ~LŸÜXÉ¥W;=Ûé\§é%B§üPIÊŽïæþ÷ÛÅ.(’¢œ¹¹d‹°Üýa?@‰…ÅB…n˜øÉ"J¤«<¡›òÂ[<Á؇ Á<KË´rýðxqõ>ˆ‰›„~¸xÜÖŠ]/ŽÅâ1ûÍ ]ß½„<çݧ»÷?|¾¿¾Œ¤óøñÓÝåÒWžóþãO+j}¸¿¾½½¾¿\ŠX çÝß®~\ÝÓPÈküðñî†( =Î,z¿z¿º_ݽ[]þþøãÅê±—áû
+/Àùóâ·ß½E¯ýã…çI¬/Ðñ\‘$þ¢¼*p• K)..þÑ/85Sçô'Uì*_† ÉÀ ‘ÌkY¸‘ÀIáŠ0 {-ûbNË– µÜê¶Íëjù‡~ýây~¡§ï-|‰Ò‹áâ'"ô\32ø„Ÿ¸"ö±;}¹ „ïìÓnW¥%÷ê-=;;Ìšv^u5µ^vùfÇœ–Ôäó¥ôx|øøZüÆÔצƓ®t“v:£îúõ0Q` <× }xcå̘køŠË ‰ÜP¨á&Jù†}[7°´òC«©1»‡L\?Œ#»G{ØgiÇ–ÅÌvÊÅ+É
+§¥]äP,!•ë!þh›«ç´¹jÕ•Q«ÔEmžJ(”r¥ˆü±ˆ_<å=è¸ÅÂUI¢‘ˆ\_%æœÑXó´ Æý
+‚ '­|>B›dÚ§M—oEÚLYÞnÅ> #Ã)¤D”¸Qä[ý¢–ûºÈ7sæ
+AqÈÌm¼¥®º¿ZTÄCìÀ*-öŠz“Î!4\/ñ,tê½Q:°áIIÜ؇rzRЗб£©—W0P¦d2$¤ëúÐQ³Ûå-µ¶:í4͈‰7ξ2Œ¤Çp˜ßt¨C®óµçš8Tãɦx
+$¬Äo ÐsÍH0ÂS
+”™Â,Î'Ðá8Å5Ÿ€.°q xŽq ørã¾À*,(¥˜ÙÎLE€Ë3éY¯ÓyxY&Üy_7ÝtÇHíaæ[;ZžÓGáÎseÈÑŽ”cy±óùæç«Çw?SÇÈ­È©åZ7Dí,o«›gK¸µÄJ© $?çÕ‘Èrfj•õÔ›»šº7Sê®ÞÔïÕ¤[¤¡7è[bidEsAŠè…p}‰ŠÈ—¨Ø@„Ö‡4Ad㌶´2Í«â•iUb¾‡#s¢þ‘¥Óm¯ð=ôB‰ä”áК7D2’>q¬%òšÝ.­¬œs0|É‹‚¢9Sh¬µq·Œã†ç¦.ËC•oLVˆ„ð 6
+2驨×)/ ª?mðO±
+ão€{Àõº-¾Q0¨Ëe¦ŸóÍlE…‘x{ûžkfÿiEhÆ´‹ÄsÚš² ÷1UÂ'¤4Åý+P¿ø\3#À=cŠåè×$@Ýèb(óœÕt1>÷M^¦M^0¹Ò:³«Äa ô°zÇîΫŒ“1âë=V&
+ÑMÌÑcÁ 1çEºi‰UÜÕ{"úY<½Æœ¶åèÛÊ fP°ª;ÂS§BLë4ã§Idj1µÂM݇ŒígÆíƒ D†ÐÌ‚7Tø#
+G‘nY=ªdñ¹æÑ2Íôx„“—# d7/º÷}fä•žGMRŸÕ ­>—‰çs§£3ù 9Ü(Ÿ–Hýë`§ã\„>ŽZ.ÍcÔ›¶aùkzžX‰\m°b7'JŽ’Œ¶å\ ÁÁ£ß–ŸIMîþyóéöúãÝ©Gh‡G¼~Î3OØ‘¼»»¾]ñxY?ëQJ»I!2ðDx5 “©…fÏ c3†ž5cH))µú²˲¢­Ôv°Äà]^dÄwœwüli„.pRñ’¾òû¬`Š/ì8á:Ý”y¥gSÀf7(€y¼š6”nFåÐ<&¹Ø#}AcøòØgp@‹Ä7´f2‰_Òr™|I9Ÿ®‰†¥·„ % @Áå 'o•µ<¯G^
+Öñ×Ñèeª¶Lhu³ÎŽIöÀ˜µf½ó @ô{ß÷ghl)%•sm–k-¯Ù˜AÉOŽ§š§›w¦57Œkb¿]l•ì'ãeù’2zi^þóÒ\Ý@?··>©É?©$i™¶ÙéÍmO}<arÛõwMìãÉÑå~ùë^Çùä¬ÎåXeüÒsŸ/`17w®¬$|j¬×†µæ#Ç.;› y™icœ¿”Vl‚ÄàÂ…CÒ eƒÞi“[®Ñ §Ë½·Ä™‡YUUSûä›õ:zÈ$}Hád Èy5å 3Àe—9R
+WÅg‚æ1Ç>‰¿×w¿ò}ÇŒòîjƒ N£.¹Eɤ/‡È´ 4F±ú,-´PMÚ}bâ瘛Õºá7ÃÐü ?%üÒcCüü€ÿóžTá÷íç‡Õç[lQÉÀ>42ù%µ,¥â<v‚6¾+ ¸3Àxøå9”û°`èyοÍr2rcß‹Æ‹ÎÖfRŸÓ
+æñ—Lÿå{nÏ}óÐöÍòÐêCi»ÿù¾ÿprº5 ÎUOQäúQøâiÀôƯ?˜ÉÜ¥ç-^0/ûLíéçoPå©7è™N%üŽ\)E<á†DÀ+vûÁ0}K¤¾$5ƒi͘IB®a­‹úå[+R>º ”pn¡
+¶…w¨ÜXúÁøàî‹Ùïê¡+db?«Ïërúa&v!\ûÓë|¶Ó¡Ç_¿Ð- DÂO½ëèÝDY·ö
+ɾÛÆsÖÇ÷Ÿöû"gG;÷£¦@¹øK¤ãÂ?èÿýƒ§ã¯Á
+e“+cX„…BM©øô``­ú3¢ÿ•MÇÚendstream
endobj
-1672 0 obj <<
+1671 0 obj <<
/Type /Page
-/Contents 1673 0 R
-/Resources 1671 0 R
+/Contents 1672 0 R
+/Resources 1670 0 R
/MediaBox [0 0 595.2756 841.8898]
/Parent 1655 0 R
+/Annots [ 1674 0 R ]
>> endobj
1674 0 obj <<
-/D [1672 0 R /XYZ 56.6929 794.5015 null]
+/Type /Annot
+/Border[0 0 0]/H/I/C[1 0 0]
+/Rect [80.6033 713.4536 149.9876 725.5132]
+/Subtype /Link
+/A << /S /GoTo /D (dynamic_update_policies) >>
>> endobj
-1671 0 obj <<
-/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F41 1218 0 R >>
+1673 0 obj <<
+/D [1671 0 R /XYZ 56.6929 794.5015 null]
+>> endobj
+1670 0 obj <<
+/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F41 1218 0 R /F48 1238 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1677 0 obj <<
-/Length 3780
+/Length 3944
/Filter /FlateDecode
>>
stream
-xÚ¥Zësܶÿ®¿Bý”ÓLŽ"ˆ'åNgdYN•Ä²+«é¤ù@Ýñ,ÖwäåÈ“¢tú¿w»àKÔ#©<ãXìó· ŠÃþ‰C§£X¦êЦ*ұЇ‹ÍA|øƾ;<g&Íû³Þ^¿—ö0R“˜ÃëUo-ÅΉÃëåO³³¿ž~º>¿:š':ž™èh®M<{{qùŽzRú9ûxùþ⻿_Y5»¾øxIÝWçïϯÎ/ÏÎæÂiï'¼Â/¼¿øñœZß]~øpzuôóõ÷ç×íYúç±ÄƒürðÓÏñáŽýýAÉÔéÃ{xˆ#‘¦Éáæ@ii%eèY|>ø[»`oÔ¿:Å?-]¤]b'˜$=ŠÚÊZFF&Ò3ð.[ˬÉæ2¶³æÖ7Ììkþp$„˜?”³‹uó¸½ûñ(Mfÿ ‡Ý‘p³|Qùß%Í ëÖ4%ã×.?ÿpþOjÿ+Öq]lŠu¶[?ðòÕ€ ;»Ïx$¼ÿù©ílYå5¬)P&À˜¹QªuâOéD¹¼ø¯ê¼¡fQÓï2Ï7ù’ÚH þÞð«ÍîÈÍöu“/£v ¥.µ~ `ôËÅ€å‘2¹8eYÖu¾˜¯«êkVËœ_èËÈy¢%¿€dÉTÏ<2õ òï(×{G¦‘3iØ$Û‡Iƒ…¥"V<é[«L-%íp³/Öͼà§e¾Êöë†@’{/FØ÷$!htŠ€ïU›ŒÖ
-é™
-Ï+OWµa=
-¥g†ztÛ4ÛúäøøþþOõ""«ür\Wë=ú¼úx¹¾#rÄ@kˆl,=CšÄïS£Ò‘s6! BÃ_Cë‡Ç¸¤}sÞÕã’w@Bþ2Á:Yål«¹¤Öpx2×È DBζ$Ý;R1¡¸£ºY盚¦Sr1€ÍXê×ÈÕDi"ú®WõÎ7\Uû£XgTÐ9Ô|˜N #áýl]W<·Úl ²5¤¶¤ÞÖÄO”$öEGi*ÍŸ*1‘P#»Ê×…¼Ö̪’~›[¬¦X
-Þ.™ÝV÷ bjîÉøÅbðÞ/û`ŒSg3.J”H^öõV‰Àå`}(úô1GñŒ'¬›þ4`ûdt1°Â%fèZ€qßÆáf¶!³Dz^& Õžâ^~¼>?™86œGýŠC]•ˆ«ë|€«©¹ÈwÇhøPoóEŽ}AÏ^³}«ïuÆ&a ·IRù»Ãö :4T›ªÎyÍ AŒƒ2NxÆÁÃoUÉÝ>d„7¼LHµÀé> ó©AÇ
-ç[ræó¡v{o±¾žô OxÍDEÚ&¯pšNµ`d¿ÝV»†K~¾&ÃQ<NÔäM$m€ÔaÙÔÓøYè¶Ðyzöc0fd4î±Ì›|·)Êœ÷æT‡ÂªDS`)Žd+|XADnâæF|=„4ÂIÀNø­¥ÅyÁ]¬F‚jý6;΢í÷ùú™{a
-å‹8öŒ
-ƒ²àíaàmþëb½ŸLœ$09Õ?%8ÏeäÝê8+ö[¯x"ý¬‹šKÍaÀ£:¨2@J§§9Æš¯e0­ÚkXÉRÍŠ/eïªOK*3hÏkH6è­#Ûñ„’ûè±M¥5A‘oxSÎ  5Ž÷:€FÙ`&oB¼m²éK£ÊØÀÀòéÂÀj;rã
- …ˆíkÔAªÔµ)ÅÈÒyË2gc•Ò^
-¡n-»;ŠÀð¼ÇÕUÒ5–¯V4Bw£þCŠm7Ÿúìã¯8F7œIdÒ6‰šÖ
-…7å§xéÁŽ£ýv¯9üÁ¥Âл}:\ ÃÎmN›Xi7†µ‹jÓ‚W´„
-J;]qðqBzuõùâ»z˜…¶×ÇìE—¦N¡þgO}µ|8ÖdÒŸhâSÙÈ%øE‚Eª”
-®Ó1åí7¶IÿÜ÷WWendstream
+xÚ¥Z[së¶~÷¯ð[噈 .$“Ngœs|R·‰“ú¸ítÒ>Ðŭ"‘²âüúîbàÅ”í¤öƒ@\‹½|»€<ð/ÏS •éó$Ó‘Òœ¯¶gâü3´}s&¹ÏÒwZ{}}wöî£Jγ(³±=¿Û æJ#‘¦òünýãâýŸ/¸»º½XÆF,lt±4V,¾¾¾ù@5ý¼ÿþæãõ7¿½¼Hôâîúûª¾½úxu{uóþêb)S#a|Ì3œðñúÛ+*}s{ùÝw—·ÿ¹ûËÙÕ]ØËp¿R(ÜÈÏg?þGœ¯aÛ9‘ÊRs~„É,‹Ï·gÚ¨Èh¥|MuöéìoaÂA«:Ç?mÒÈÄÚž/Ž”QzžË"¸¶L4¬¤¡ä¹Ë9.û^ÈåuݶÅjY5ÍOy[®‹é¶¥U0¹UçùŸQzÍHX%vLÃ?Šx¯ãE[t_ ʵ‰2‰“$OÖŽè8ñvû ™.šGèÛÒ:ÝCA…Ǽ*×y×ìéóXvTÊ™¢¼êŠ}w®¿\l‹î¡Yó$M?lj
+÷‡²ê–%­‹M~¨:ú€“<¸c„õ7¨ XI'…^p[ìêäÜue¾±¶)t £óé•Lyï9hIk¡˜WMýÙ÷s–+¹{Ø~±ê ¢ ½åxûf‘´Æþ&·dDbç‡+9›??Àú£©çNOŽÄ‚yѱ[Ï  uÝt=#oô’H„CÜ95A]òƒîõ
+Zˆ­Pp³ÃoÛ‘:µÞŽÿ^‡c§ç"®˜Wz¤‰Š”ÔÞÜ—õ:‚éÛ™ýƒ“äèYôÕ€ˆ,
+¤c*|oÚnYŽ¤ÆÓ³c'þÐu»öËwïŽÇ#î.*ÛUDZùù]ÛT´yí»uõHäÈ‘ÔZ%Bzzþ8 âxŸYtëHd™¢ð€š:÷¥¿>ÂÈåp¨ F<_ ùÓtŒ&ArI6’„b¯‘%Cpq‡¼@D!Å#‰˜Ô>b¸¯ŠmK]ʹs•ЪPæ-çj£,–CÓ³:ã‹ nšC^¬W*¨K>t'‰„?>¯Ú†û6Û]Iº†ÔÖTT|ÄQ°D1€Ü×졈€ÛvÌO[ˆÛìX×n‹ê©tŽ7± ‡¼4–Î$†|Ô§‚ÇgÛ­CÇè°ÒxñÐáö–sMÎËѸŸ^çö&Äiñë¶>ÑÒsÀa9˜ß!Š!}ÌQÜã‰ÄM·Ð}R:¬Hã OÀ8?ÜÃÌÔÈÀÊD#¤:Ü›ï﮾œÙ6ìÇXó†M[í7ÝÔ• RçàZ*®Š}GQ |„(pEßN²]ihu¦*au$ã€7ßDƒ†bÓ´¯â ˆqP@ÆIÇ8øÀ˜JÒw&qj"0º§a>h
+†:Pçý–Á°4Ÿã€ žp¼íi6@Ⱦ_²ž¥š8Ÿ£-xìØÆ/'}†½N'}B¯øØb{_,¡|Ø?Ïü¤I”é8y™ŒÐk†ŽFÍb0€:>¡„mP ãdñPûܱnÅ–*åêŠH-•óá×1[rž‚ŽgÐÃíÌŸFì£Êϵ;4ø&É‚HרylëR 8IǾԇ#ˆ
+jc/ÇOÅœ¬Kà€™DO‚è36 ™1é´9•c´š
+¯ÖPÊW«bç,'à•º=û–\ìŸ:{ä»%Ù€gÞ 1¿çX(0´±|=.‘3›v«†N*úNJ‘Ø…\xl,œA™„„!Çè4ßí*mÀ#VÍ‘œ‘æˆ €E‡¢€K´åT{
+pÍG’³ó(*m~oì˼XÒ|Õ•Åi[(`||êš!ØÂA¯l¡ïŤ[ýÌöûL–%//zͬ;Öö@Ñ48!vû«¤x@µ=¹ÜȪkgsG2j©^³¨<‰
+ðaݵó(Zšî¼|ÿ­Wfd4®±.ºb¿-ë‚×怛ü¬D“g)¶äüØ€G÷fâþ‰Z\V„¯Š (ÇÚ°€Cîà®7“ƒ
+v› gê]^¾}á6AZ€"‰Šƒ¾=}õêuO¥eŽÖ%©ßpÆ
+eb^;ã4²·?;d—Yw7鋇GIl“€q‚™9ã Ÿ¨áÓ%ïSüªXùu}Ä õ„ƒ1c„½‰”l‰à¸¾{Zè S@>ãƒ.§I¡#Õ—ƒÛÈWåá7‹Cl Diú;ÄÁåeS— T.¦«èzø Nª,Q›ú1jC¥Ð )5]ãb*¬"3Œ%VIhoŽhÞ°Ž5Ví©br/øÅU›)Žü
+³øî’¿-æüì³·ˆg
+¥iÈýáÕŽð‚/;ܳ oR¡éÃ÷C:ROG²ð†˜6N’hš·*ëU³ à5!@ÁQj§O>Hoo?]ÓŽ£ÐàpÏ^õaê>~ŠÍèùXpÈ$?Ñ©÷Þh•šËÿŠ`¾ÿï·àýCy Ž=MO\¢)a£0‚'
+9n²)åì¢Iãd†ôÿÎxendstream
endobj
1676 0 obj <<
/Type /Page
@@ -7122,34 +7134,33 @@ endobj
1679 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[0 1 1]
-/Rect [278.4002 642.0816 280.3928 654.1412]
+/Rect [278.4002 570.2936 280.3928 582.3532]
/Subtype/Link/A<</Type/Action/S/URI/URI()>>
>> endobj
1678 0 obj <<
/D [1676 0 R /XYZ 85.0394 794.5015 null]
>> endobj
1675 0 obj <<
-/Font << /F37 1026 0 R /F22 961 0 R /F21 938 0 R /F48 1238 0 R /F41 1218 0 R /F11 1451 0 R >>
+/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F48 1238 0 R /F41 1218 0 R /F11 1451 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1682 0 obj <<
-/Length 3196
+/Length 3076
/Filter /FlateDecode
>>
stream
-xÚÍZKsã6¾ûWè¹jÈàE<’““ØY§6žãÔn*É–(‹;鈒=ÞªýïÛø(y&›­Ò Øh4ýøŸ0øñI¦Sí„›§ÒŒñl2[Ÿ±É|ûöŒš$%}ª¯îÎ>¿’fâR§…žÜ-z¼lʬ哻ù/SŠô8°é×oo®®¿ýéöâܨéÝõÛ›óDdlzuý×Kj}{{ñý÷·ç ·Ÿ~ý—‹¿Ý]ÞÒ'x|u}ó õ8zaz{yuy{yóõåùowß]Þµk鯗3‰ ùýì—ßØdËþÒÙlò /,åΉÉúLe2Í””±guöãÙ-ÃÞW?tTœ¥Bj1¢@Å{
-äƤB1.s©–Bz 6»Å¢|žhƦ_|ñ%®h’(“ZÁÌ$á<uY&<å¿ýÇϯDŸibDj„‘0&K™‘²Ý®SÊfÀ÷«º^yEÊ{û¸-ëª9PO çz¢u–`td©D”ô©üJBÅmh©P¦|µªŸ“ªxNþUWÅÁü\–iîN ÐRH úº–.å¸o®¤Aeû¤°{wØ“¼dûìLê¤0æÍy"-Ÿn—¨TfzJ ‚f6å5î zæóy1Í-=7çvº«¶åº áOe>²³Ü±”)©Â¤›j>k9â„#bjØw§âˆzCôóbUl£ ãsÁ@.5ïOEvÈ,¨[ê¡!Ã#È,uF¹À¼Zr6½[dyób‘ïV[z)›‘½Ð~º,Œ¯ê±­‚Ä)Ž™±©ÕJ¼bÆ=ªf©¼ï¶Ë¤z?¯×yY±Ð©œŸž¾¥™hÄ<UL¨¡
-©×ô%$GhY/¨FKðï/õ.ð ÒË®)«bjz ú eÀ«‡ú©WsrÊon~¤FS/¶ÏÝê¢Y ±Î_¨QE·­Ã°"z÷¶ý0¢5L“ÖÊ0×£~žˆ’:s§ý¼OuÜÏ[*
-r˜°fù¶Hê*)ÞÊ2–I¤üÓ2´T#B Ö«Dª4ìÌ@Š;²ÐdíÓ6µŸsßÉaã”áS¡,‘ u×Ô,ªü~bñlYÌÞ‘ÀÛs…ßÛb]o^ˆ û8yàŽjðQÓDÞ¦4ƒàÄÅФ€+ª:¸u0ˆ˜ úëÉ«°Š,°ýXl@¬õþ8/xsÜ„M…
-‘8|ß?AÄ’ Ìh ࣇ²ŸÇ!MJüŸŸ°T 1
-<¶!¤.ü´Ìb6/={P‚WVåS*lÒ`aE ™áFH®@SÑYIèB¼OÒ®ïyy -Ãúëjsl …NãÅo!1)u4u¤õå´ÊðôeþøXT':>Ζ×B1ª|é}_LqšÍS¾zC¯µŸ[EDgûõÆ2Ññ²È7Û{0Ï$r‹¼P'd*úFSbº¬‹ÅŽp/¼Îw›ùEŒk(PhÌ`>ÇÀ ²ç«&@ˆf÷øòySDÌí K<‚èocS¯c¦_ì…P€kß·ƒxXÙÛ O߷Ư%…–©1ö#kÉI"LÅ”D< (±b´F‡„ncÝÕÉý²X¤V¹XÖ¶ÈÇÙ€¥1Š¡ë¾ ç^†¶”bBô%³€ÛÚù©,žG$YÊ™Íz2º(+[t~¤Ò
-Ú/è~Êut]<ÓÅRüU$¦¶p‰°1Ÿ…óƒAŒj«áiË›~i¼¿œ~Œ>À§˜4º 2Üw²„©W«ˆ^GA=¨%M 8«z‹jñ–r­_23±>À –å§\*2eö¢­ƒY”µÑßLëoBÇì°-Ðòš€'ž—hÞî+ôøžÍvwßÂ|«³à€žÑ±Mèö2ÜÞ
-î½)}ìƒÊåШ+ŸÆ¡
-dz!Cë9¬ÔI‚‹TÁËGá
-•2-¡xÿXv5=ÌS†ùòù¼ ¾³×ôĈ†þ¶[ã ‰óá~yæCUù^S=Û¸‚š £‹p}“òBÃC^‰Ž¹,`ÍCï =éhlä`
-ohðœõ5ÏÀË…¶ÀÓæ` WÝP³ ÜÐ^ƒUåxº96;K¥Uz0{Ȫ"ãöâó¦¸3ækY*dÆ÷$T¬•KñN.ÅZ¹è AhÅöážÿHñ[u0;‰¨5b"<¶Vå^›‚70‡.ä`弿"îeľ(¶DÃÎlf0&”jáÊs$Ü:&¾<‡ª’q7©lšÙü}»%í aeÔ9Þ›îàìP¹Y–Zë"*=a$*•Rš¡‘ Ûîšeæeƒg†Í!p?ÐŒ?³¨õà˜ÂIØt­<B<ÑtúÚý¬4
-Í8bÈ*‰kJ JŽ‰ãÇŽ"xeªsƒÞ—?õÜ#6•V³d\’%hFG¨¸‘怪‹gýMQFà¥Ý¤/ÿ§T¾âFýO´,€0³|üìªÕ²€ÚO)sò óhú{HoW
-Je¥N£…¡²F¬ê„²úr|ÂÚ|(¬ö´¶¬I­qâ•Œÿªmw¾Ÿ®rÒnöŠ¶L–:¡ø+9üˆ¶> bõÅø„MK#(¯„,®%ôY×Î\g§ü±'Ο¥´î¯eÿ,Ä<ôñŸ>½+œƒ«,ÖŠã¶ø›Ivä+À½ôÊ!Ô‘Q¾©·íqJ‡H:¤Ó/÷áyÿ„þÌà·½(8yÜ! ‚z÷ÕCAZê΋^±a‰h4?}ÃÖ#:~Á‰|ùŸ¿+’ ‹|Æ&
+xÚÍZÝsÛ¸÷_¡><"ø"
+™1-¹œXm™±–,˜ÏVç‰á|ºYÌD&Ýü›.‚¿t¯™I&Œ{)L°8ðRÈpÿŸ×h P)‘Še¸{?¯£‰ÁèWWWÙ›W¯^f&®‚3@'¹$B°,M¥Ÿ7[•EµmÚäÕÓÁZý9ëüþ¾˜¦ü!ìêõsÈÅÇÙj7/"új‡É¯^-àï‡?ÿ_÷d\±f·X”ã\bIF·Mó_^ÉþÁ%`i+­‚9)ãV©úÂ0€¦oêzUäôýý¶¬«æ
+´\#È>žUÆúÆ@…· ² v}Vð^äYžH³}q–eJÚÀóâ<QNL·ËLªR3¥ ™NgyEÄmA×|>GÜyrK×͹›îªm¹.húC™œ¬È8ãZé°è¦šÏZ‰¸àˆšÎ=ÓqF½!þy±*¶Q‡ñµ`¢PFô—"ræVfDxD•²Ìê,ÈÈ©ŸÞ, BÞ¼Xä»Õ–nÊfä,Œ_. ó«zì(‚"q‰c0Ö3­{ÅÓ &áÝv™Tçõ:/«K1 vjí–épñ!~Ó\êÁê£ð͘U­ÅO¡×õÐ+[ôr‡Ô$ œHm#$..Æä:–YnK„7·x²þš¯ó§@7Å–«+¸þûwïß]¼½¦»Í¹pÓ¢¹‡¸T4AÁ⡼傮¨¨Ò›‡bÓ®æ¡*´`Òº½˜YÕ7—A*Ûî =…;8Çz
+ pÊò¡
+o˜ªfù¶Hê*)>ÂŽr•e
+ªÓ:´\#J ö«%ÓNf Å á,Yû„Môcîœq<2<ê
+TG,ˆîšÈ¢ÊoW!
+Ï–ÅìWÜ-0Kø³-Öõæ‰Ø¡Xø5.¤£|<´Ç”áÌ!‡.Êãò®ªƒ[@Ä4ÐßO^…]Ä`ô}±µÖûó¼âÍq<hÀ–2ö<ô¸Nà!rùÒ±X7[Ͷœ–-βÓË·\#ë 
+%ÁÔ÷tð_VöNÂó÷Ñøù]¤4ŠYë>³‹œ$Ò¦ÐL)¬gB¡B¬íÎ!¡»ØwuAr¿!–Ìé,6´m哹PKc8 ÃÐmA×½ í(Å„è5¢Jê ~l»æ‡²xÑD¦Lp—ö
+¬y}¢+½y1e-“F?ïøY¡mpcÉ ‚épÂ]7D¶è5 *¿Ã·›c«s¦œ6ƒÕCnTÐEÙlÿü}Þ4wÆ|-eR¥bOCÍ[½´èôÒ¼Õ‹žP ­ù~¹çRüÖ]‡ƒÄÔ‚˜€Çö
+s ÝkSð¦â´Ãì\ôw$²Cq,ª†ôj8’Í æ„V-¼…òÉFG'·Ž‰7¡«äGÜMiÇRןänI;iØuŽ÷¢{qvhÜ4eÎe±*=Í”RvûÏ]²Ì¼lðasX¸XÆ¿³˜õà5E¦àЙƒH—Ÿôõ[Y(GEš ¿~ÿ¾YQ^ì=ªÍã +qÆPT÷”@ƒ~Íù™e”ÝD*ÊzxßþÔs_±éô´™Ì&%£#\Â*{ÀÕųþ¡h+ñsݤ¯ÿÿf4¾Vw.û­¬ ”ørüÕUkdÍO9ùžPˆˆü½B?®@áŒo–Ç¡ý vDAÔ¨ñ:µ¾¬í¾(B±iÆ=c<éð—)úÄë5üˆÔUr­y:‹=~Ùo-ÕSâ+6I©æSá¯+´“§«…¡µF`uÊZ==¾bkqÎ 7úkqpºL=“ðŸÅÖ '$5Ò¯ÛXÎ1“
+uÚV™„úÍfÏ$ð#¶ú„xÕSâëµ”Å/Fœ¶”ãLºÐ6†’ù÷ì„'ö”ùRë~±÷ÿ(‚ð³‚3ʘB~½á“gõS¨ØýŠS[¨þœ/”¤…2Ä)‰¿"Òñ‡lüðƒWøEcàê©þ_ì¶Aendstream
endobj
1681 0 obj <<
/Type /Page
@@ -7162,42 +7173,41 @@ endobj
/D [1681 0 R /XYZ 56.6929 794.5015 null]
>> endobj
474 0 obj <<
-/D [1681 0 R /XYZ 56.6929 720.5366 null]
+/D [1681 0 R /XYZ 56.6929 636.8504 null]
>> endobj
1370 0 obj <<
-/D [1681 0 R /XYZ 56.6929 693.0249 null]
+/D [1681 0 R /XYZ 56.6929 609.3387 null]
>> endobj
1684 0 obj <<
-/D [1681 0 R /XYZ 56.6929 256.4221 null]
+/D [1681 0 R /XYZ 56.6929 172.736 null]
>> endobj
1685 0 obj <<
-/D [1681 0 R /XYZ 56.6929 244.467 null]
+/D [1681 0 R /XYZ 56.6929 160.7808 null]
>> endobj
1680 0 obj <<
/Font << /F37 1026 0 R /F41 1218 0 R /F21 938 0 R /F22 961 0 R /F48 1238 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1689 0 obj <<
-/Length 3769
+/Length 3726
/Filter /FlateDecode
>>
stream
-xÚ­]sÛ¸ñÝ¿Bo'ÏD<|’àô)—sRß4Nk»Óiïî¦(‹ŠTD*Šû뻋 ’¢äË\Çã¸X`À~|ÆàÏŒŽ˜LÕ,IU¤׳|sÅfÏÐ÷áŠ;œ…GZô±~z¼úñ½Lfi”Æ"ž=®zs™ˆÃgË_çïþúöï7÷× ¡Ù<Ž®:fóŸnï~&HJ?ï>ݽ¿ýðÏû·×‰š?Þ~º#ðýÍû›û›»w7× n4‡ñÂÍpfÀûÛ¿ÝPëÃýÛßÞ_ÿþøËÕÍcXK½œI\È—«_g³%,û—+ÉÔèÙ>XÄÓTÌ6WJËH+)=¤ºz¸úG˜°×k‡NíŸÒ&ÒBų KÉÓé]fÓ°k‹DñˆÇivYð©]öX¸Ë«¢Ë׋çj_ŒÌ%ƒ¡±™õg=¡°&ˆ‹q.u”*`r@ýq]¶°ë±™7Û®ljl'ó
-89ËùmM`'Ð2oéß+Ó§¤u¤ŒŒ¿Ñ1có—¢¥AöLIgaÇäÙ¾-–D£[ÄU[ì¾;lè7ëºb³íÁ-E¤1Cpdd
-ÛÄ£Tkag'^Djæ»knæEÛìm#@óÆþ.[–ý.Ëeýƒk¯³¯nÈa]ÔÔÊ›ºív×f¾Ï»²~& ­ÙrYâ>g•›-ë2jµEî
-ÓÇ:¯0 ×úcrß®ÿmê¢]4õ¢]ï»es¨ÇœÆ#¡Dz™•€5ÁK_@ˆCfþeÏ]JIG,¥˜×Ù¦ð¢ŠÅ·²k©k¹/æ$¬(¿ZÁ¾‡Û`l?¾!·HêjÜLËÆQhº!–õøKŒŠzV¿ÐIm‹zIâ¸uÔ:ìÊ®hQ¿9)rÐe±ÊöU$ŠÔµ2<I"Á¥rúzñLÆæ›(NwCëfÂø%ÊyS*R±yMÆzXdÌc!Åu«¨–‹¼*‹ºkO,³þ’Ä\f `Mp0X¬Žaµ)²@*-“8Xfl2,¯ù¼å$©«^|³­Š 0ºnn$)4¶Àh/KH×-ŠŸó¹n‚@ÀyOAZbcæ×)ˆ&ÉžJ"Æ%É^¾. 4<e¤Ø(µz‰ð«X!½,€¾ÁðM›0‘RqâÄaâpF"0úÜ ç´ÃáI”Jáç„-LÌÛm‘—«—ËÝ¡¡F[l³]Ö90ˤv(Aåå7ÛwëEýmÙl²rJ#À¹òˆ¥#Õf[°H‰ wx„äSð¥‰÷¥»U.$3‹îe[ð©Í‘ {5­ –J§¥ÿVd˳J©Sˆ¶—•²u^)–=÷¦ím—ueÛ•ù©R*P#«Ë ¬ †J G'ÉA4{ôŽ¨Léœæó¢Îž*ï ?ÅÖ™]N^~{k°H«f熂Óx¡&.–z»uÖyÎ>£‹qSù˜Ú¨Y»,'
-Õ¡ìÖÎÚß5ÞÀ÷M†Ô'1ÀùÓÕOâäµÓîa]8m…œ¢®tð¿(¿­¬QZ<eíiŒ ªžÆê2é” ˆ ûAB„¬G|øÐJ#dhL†y*¢…Ì!aiða )øü¶£ñÖŽcÃŹ8¥›Úﺚ¢aÃZø\ݦ$×­0äØÑGF?Ý.«[°ÛÕªy&àZ Gr$–ÅATm -’GhÜÖ9ù”²ð?<(†€Í‘â
-Ø€d×~Å-
-ñ4‰í©µÕ7¿üðׂ•ÊHÉWÒÒy½óHVíʺÜdÕbçÒS3›
-ö9¸]Ml[
-Ѧ‰ÿ€C7=‡®4™V ´ÏРõ Ò^ÜIA<È®ZBq–V÷ì+ÌPVhêê…`ÏQã4g<ÁÞtÙ~á‚u?ÕC!îÖ „ã83ù”‰I>L1‰ ”QrŸ2¶w ”ÖOøIˆ-Sû˾<æ‚€òÓ¬ˆž­v¡©ŠçÌΊ;(5(~Û<°{Cy4¥Çtt“½'cÇ6_½ryg¶-v`p6Y{]0Ü!8 ój¢2ª ™Vÿ‡l4✙W4®‡uAå<–Õ9XB >x‘ÛÜñÔÇñH¦B_f `Mp0XlG2‘fÈ‚;±T½´É7¤±÷R
-À$Q
-9q0.hå°*c©ÓùݧÇÛ÷ÿ&4ÐØ6{ÆÁž`q±«…°‚Zdœ-(ÊÀуžP4Š©Œg±÷äÈ[m
-Ò7[$ŒÒ­.`âÑþàf·Ã䉵¢€’ùTÉ‘a³ù[n£q)•/,ª`°},0*¬ÞÖ]‰vÁ²$)• }øô–­ ²M; ZzñÆè¤vãíâá×VäZú‹Q: GUê¬j›ÅÑFŒb‰DGMn(rÀu0F*É¥8Ñ$‰iÃ6Z;¥ë(Ñ¡’b뮩µ`vcp­¢/¼Q؇`''ÂåJ
-§@[Åë.¡ÎX&¼Ã2Ì/¾m«2/» .!5‚%ßÁ¥çM~9(Ù4ž
-¯°œoO»²#éØí 4üÞHºÌBäu¹„ gê&<¤J‰½ŠGsú¼ßeÞ
-%îÚ »íd‰ñvè"Û‡0ª'È›€2{Ž‰—¡d°=
-ï|Úf2ýÀ‹t¡N_ùM¤|Wq/ïÙ$g¾+J ‹¸üÌòˆtá•¥Cš|1Œu$1í»D; >`‘TCâ^-ðú’rÛj¦c@Ê3ýZÔœšÔo<Y8œÐ&,žJAbêDDÐþR‚-ªN%§µtšUg_ &N\E‰Å£±¾°G\%éPÝ3Ö¿R²5l´äí÷_ípBÚžþ©‡d¾Š­#|<qð,Lñ§ßc+ðÆœyy›‘&ž)d<>Z- Ä0"™`ýü%endstream
+xÚ­ZÝsã¶÷_á·È3' LŸ.ßÕž¯ñ9ÓI“<ÐeqŽ"‘:û×w @¤DÉÉ´ãñÀûõÛ%Å5‡?qm4ãÊ&×™M˜æB_ë+~ý c®„§™¢ùêûÇ«¿¼WÙµe6•éõãr°–aÜqý¸øeöîooÿùxûp3—šÏRv3×)Ÿ}wÿõXúy÷éþý݇ŸÞÞdÉìñîÓ=u?ܾ¿}¸½w{3F ˜/ý
+g&¼¿ûÇ-µ><¼ýøñíÃÍo¿º}ŒgžWp…ùýê—ßøõŽý÷+Δ5úzœ kåõú*ÑŠéD©ÐS_}¾ú1.8uS§îO
+ˤµÙõ\%̤°Æ€ê„Z!µQpÛÚ²TIo[ÊÁm í$½ÎTIânû¾íK:¿Ê{j5ív×Ô¾ÿôx÷þgjo¶7ÂÌڢ캪y¦¾ª süä|‰D˲èËõ<½à3bÀŒL4KlšÁ E•×»§2--3Yf<;‘g\ƒâdÎdD2­žh>¤¢ûSÚ¨pÇeþ¥œW¿ïÊíËñÞB&RÒÅÍ#ÕÄî#é$Š -Æ»ß5p…Fõ7É̼_›€´ÜÍÃX»é«¶¡Ñ²ÉŸjwï0ÐUë]÷$*xîW%QµO][—NîÐýÃýgjÐ!Eÿ²ñ£w?þ¶¨²ÙÏ7BÀˆ æ·*¨˜äN+˜ÕZ:æ›òk¹%X´¥×“Ázî90Ù6ge›¦–e™’—e;¤:/ÛHåd[öÅjþ\ïÊSÑr˜ššË{Gª‰ÍG¢U oxÜý‘$˜šƒÓlû¼ŒàÂUªH Û_<´@œµ$f¸“«2*õæ28à<å|öR851“2¥Ñ¹9E¾ëœÁ¤1ÀUWnI–ØÙÒoÞ÷åzÓAèt;’J@73ÊŽu‚x‘ÖÌœ/)»vçŨ·hÝΪ§ßEµh¾óíUþÕOٯʆZEÛtýöÆÌv…×zÎ
+Æ­ûôi¶%g‰Œv‡"œØÞB,ÍB,Ý. ©¸™#œS—%™‰w5m \¿¶ž¤‚øVæ‹óF ,Þ|) ©.e rro»~Þõ€Óº¾*N232ir™H5ÁÁØ(Ai–Yp2ºCttPz<†Á_ ¿”åÆ»]AQ~gpDËvë§~%ð M<ì8%E`,†ã—
+˜ÚhYÛ¼ ‹
+NÎ7D½?[÷†žw]9U8€
+œH¨l¶íWÀФ°§VV2Iú:௞D&L¥ /ÛÛ€ê‚Å*gsUS­óz¾õYÆ©wÍ€CÄ—YˆT<ŒƒoÊ bÀwˉ˳€3MúB¹„r¡³tÆ Cn­gбm(Fèt”WuDâ}¬xVX¡ªkšÑ6õ õA&GÓlèHË廹‡é€ñ¬=ªRô«€8® ðžr0%ÆÉ"¦”,*’ÅŽúý•‹ab‹º©ýû®:d@ò+×¼dÏÎÆÐÓÔ峫8ÕWÌ
+Ÿ]† Ô£»‚©‚MÙä!]ç/1¼PÉîk¬ñ•!'Ù.±Ê×ÁR—G^Þϼš¢ŒG‚=(®“ÿCž¡2Î4W¯„¹!Õy³‹TÎìàDßyá²ÆÓ'˜²R_f RMp0:lš2•)3fÁKÌjxЦaÓ« «òCÞÕCˉÓuxÌëÚ°I?ñ:*Y 7Їꉎ×@”ïîß~¼%cÌ(‘˜A uìÔà¤"}­ZªäQ·Ó(è&‚*4B€°f‘û5œ DX£àuüÍ>m”×ûü¥ kl+J½p¤l–­¯#uG»ŽtT¸q…¢ˆŸÚ~5†`ëÀ¶/»@’-#i,Ô,^àf«ÂG« øÌçÏ)²HYª¬}E‘T9P‘uõ˜7ë¯,Z]Þ7RMl<6ÖŒ¥6MÇ;O ÁÄ
+]4¸}¾¦ÆÃP.~>œ0!—“u‘¯Ï¡ž‰¼%LœTç‡Ùš7§Õ¹@õ
+§«y
+ÃÕ‰·"XI¥MÔ‘csù[á0¹RI()&Ñ `ûPZL°nÛôúÇ’¢„b4õó§·Ôøè\kº õ"¨7¢“ÆÏw‡‡_W7<l×ÑC<üÑN§
+CÌ
+G°»½žHŸ1aW”tº(¾ì•ÉÏ„op ›—ß6uUTý—IÆŒäÙŸà2ð&#¿J¾'tŒå¥‹Á#ðR{à¤Mi‚æ‰RØ]¦3êQåœ@TÕI6ÈŽÑMßRb” czÞzÄÁñš\´ŒhX“oöê…EýLÈ ^Ö#¢É”³TêdgΨq1Òe8(Àˆ±—D­§’~]Ù1š±ÇZ80m\XBÄô›¸€2ß4ÓJN°æäR^,þ*wدªbEÍ«,®…ïºð ûv N¦»Ä $ìŠñ$㸪£siìùëJ3ô1‹è¶eJu˜¼owõ‚š>ý2Æ][¹Ä/rzgl [Âp¿Û6~
+U˜ý°am/¬Í¬ò£•ß0¾}„±®”ÚÅÅÖÓ#C*¶y·: »D†…(þJItHuvEªƒÎûvÞµùiA_æssyûH5±ÿ¸l˜@2b`Òz \—Á:ú6|¯%¹ñŸo@£X•ÅlZ¡q0¾Vë¨ÃAdnÙÃïÃCWö4;ÆTDèb"6\Ld~¶ûÞ„â¾K‡ø,_¦ª_£ ï'DA•‡ýtŽ,0pzyȤç>.cãìÿôp÷áîc4=ç~ñªoÖí6›–Ô×oi¿¢m° HÙ—TÁtã²OÊTJ‰’J=ƒ*›aJ¶vï:°ÛǸPðÓ³Ïíº‚’Šv¶j÷¥OÕ}ON3QÓ± K×øòÊÇxt';lú»F¸E¯±xU-
+Ó!mŒÔÎ&ð“4´‰óþ‰
endobj
1688 0 obj <<
/Type /Page
@@ -7210,7 +7220,7 @@ endobj
1691 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [182.6146 369.0217 231.8861 381.0814]
+/Rect [182.6146 300.8791 231.8861 312.9387]
/Subtype /Link
/A << /S /GoTo /D (notify) >>
>> endobj
@@ -7218,33 +7228,29 @@ endobj
/D [1688 0 R /XYZ 85.0394 794.5015 null]
>> endobj
1687 0 obj <<
-/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F48 1238 0 R /F39 1161 0 R >>
+/Font << /F37 1026 0 R /F22 961 0 R /F21 938 0 R /F48 1238 0 R /F39 1161 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1694 0 obj <<
-/Length 3788
+/Length 3742
/Filter /FlateDecode
>>
stream
-xÚ­]sã6î=¿ÂÎÌš?DQé~ôrs»{—Mç:ÓöA±åD³²äZr²¹_
-„A_@ÉYr–Zas•Ï²Üˆ4‘él¹¹Hf÷0÷Ó…dœE@Z ±~¼½øáƒÎf¹È­²³Ûõ€–‰srv»úun…—@!™¿ýüéÃõO?ß\]ff~{ýùÓåB¥ÉüÃõ¿ÞÓ觛«¯n.Ò¥rþöWÿ¾}CS–iüxýéArz¼@ôæý‡÷7ï?½}ùûí?/Þßƽ ÷+ùãâ×ß“Ù
-¶ýÏ‹DèÜ¥³'xI„Ìs5Û\˜T‹Ôh õÅ—‹ÿD‚ƒYÿÓ)ùå„Õ6ƒ‘JïXV;/E7½lÊÂ&6}™ý.Z< ¿“Z8)Ò<Og ›a³ÔEõ*5“RäiªP¿.*s@Fk‘ Ôû ìs‘Z#O&"ÕÊ
-9£Q‰=Õ‡X/‡õˆOÚopÊ-œC†—Btvá€tºðè˜Í-dwZŽ¦cVgy<fqa/³¹ZY›gx>@ž“ÌŸÛ=hJoÔ0òÖÏUÕwÞêáåú—7ãé‚Ûb¦¼¯‹ç—s:%ðµÝ8£‘Þ˜,;& ù¦‰»JÕ¬Ûݦ8˜ZxN;œK!ã}nwícµ:èêØÁ`9gBL%.͉![°pÈÙR®`)y;ãY}1ÄŸ0ècª~¥„tÇÜhˆþÝÒ;'–±^áâ”Ú÷mTeÉw‹%â¿ÆÑ ÝÁ@}RÈT@ñŠT"Ö+<œR;lÀf!6½’ձΛ€5eÄ£€ˆÆ_Ÿ]=bM,?>áÁ-Tž£õ£PƒUÙ-wÕÀ]Úõ„#æ™H”ùS®héѱûÁ ‡a:Úè9ÿ ø¯lù”î÷z …̆ºšôÀ€õ
-§ÔÎÚšqPÈ<=okC¬—m-bù¼ª„rªë§m-úUB½wvõˆ5±üØÖŒÈлFëÿ=¶v¼‹c[ƒhl¾lk™'G=gkÿ•-ŸÒý^[Ó™p*}Eïë6N©·µ4&·¯ÙÚ
-î}q¢LB­(€p{FŽ˜ásS|-âí×$‡j~¯°kz]»]UÜó/hË[zÇbø7¥ 0TŽÃó¿$ Åd3áP¥‚˜p-\–
-¸ŽÌ×C±+– ÊÉ´³"ÉÜ8%ë!‹Ã^\è
-dÙ¼+6%ž°Âà LôJúõCLq¦/î@KYl/C~¨œ&¡ÂܺXVu…õ-½×m±Â"ÑS€hàTÑãˆÊ)^Ú+Y¡ÇÏŸ®avŸ¡€Ûø-&ãÚµ ýÀF¨[PÒÛ}Ù”»‚Ú’†û
-Ç;Záß´îKhÇúQ)Ñ”OuÕ„ÎaÕ{Üa\.Ë-hú ¿z™ ¥©guß´Dpõb,ÕN€³±tˆõr,X¸±bµª¥¢^¬wífQìû‡ÀýÑÔìñ$̪Ž¦L»óF¬ ÇU¾óšB¹aùuô²l
-Œ-6drÍ—[DÅcå«GüÑšžèqþ {lwªÇP@:%’³¾Q¯…C0TÑ󧇲Á‘28¸$8mä
--ƒ°|Ÿ‡ÀAÉ?ˆ‚¤ìib)kµwú!õd¾nëº}ŠÔß~ºúø>¬»‡bòa Æ VM'"–ÚBF¬ÿú´T.päå"}/‘šnr _€G3Ç—ïY<v;ÕÌñJoXI‘è<8=RÜ S¡ÍH‰_¹Yñ€ØâV=B*fî®ô2"ì.D\þÙ¡ïç÷|$É›•ÇQû`
-³òÐqq"ù”@· ÷û¸ ÎW?t¢«›Ð³À=½9šÚƒÏTiEÿ›å(_õÀ<hÅ­ohœ[è0qWN†?Ïjjy甂äŽû¤zënxíp0jÓ»#Wñ³±íî8¾lø{þùÜG 8¿LšÒù°®ÝðlWõû‚Í~æ#bžs§ùx?ûRúj‡]%³ çÝMåŠ2ˆ
-¾áVv˜TX;¿ª»­r§â±­8;²A…-’¢€4¼¯ÛÝ”nXwNÛÉ`d0Ãö
-°nëÛ…Üoé³]‡Aó%6 $ÙÓ“˜„mÛu•o."¸ü¶-›Ž§¼ªNØP1JOñÞÝ«këGö·'JèpÔîk>ʽs<U]]îÉ°S±ŠÀñÙìöììGá:ó<}@«’à
-å·ïµQI 8Æ¡Ã"NrXÄaÑ}íh´¦Ÿ:Ü!àã/ôd»nƒ9 Î:¬óÐv=ÇõÑ…’Ö"sy¸ÞY·­`ŽÄ²ÝLÝVåÂZ=¸D¶½Ùâ*^¸î)/Èø>àq
-e›é0Þñ¹âÐþ’ùü£ÓßاŽE¯àH…¼ŽÙm€¥]–æê8UÚKzaWäË4|Ù/@|HÅû®²®Q ù!èkÓ>5 +}Äõ÷]íþÄôñô™ÉÄ( /ÿrƒ¯¾T¸#ÃÁЪ<
-,:ãMüS…ÏÔý-xö#
-¡Ao¤ˆ½’n_ž)lýICGOCýDiLJÎÿý Ô,˜+t½ÇÒï(Aä³ô ЂÅ4uhòáÖñzáL»+¡pÇó´-¿ÑÈo)6Ïî&+zŒÞþ»ç÷VÉ Á·ÌñãP
-~Že€¡,iGÉ“ƒÞÕ1\©(€6eÌ¡†Á1%‰6’¾[
+xÚ­]sã¶ñÝ¿Bo¥gŽñA|tîìÔž¯µi:IhŠ²9G‘ŠHYq}w±
+o¿Ü]†"Ž‚›Û^Sí‡û«ÏŸ¯î/Cnb|üûÕ¿¯ïiH»9¾¿½ûD=)'&½¿¾¹¾¿¾ûx}ùëã?.®ûµ ×Ë#‰ ùíâç_£Å–ý‹ˆÉÔÄ‹=4"ÆÓT,Ö*–,VRúžêâáâßý„ƒQûé,ÿxÄ„Ôb†B h8‹Ó4^$qÊ´Ò20«aI2ŠÕ%7ÁªÈ;lë YQ^•Eíú~Û—<Ø–E ü’‘>fùKY?ä:{£JÛ•UåfÉóÝ–z³Ö•5 ÆA÷RÐ@[l_ ø8þ7÷MYwŶÎ*j5›b›ueSÀv´»ü7¸rÎÒ8´´–vëîËãíÍ©ž-—[Ä[´n°jš¯»]‚‡¢ppUÛàœÀB>`!ך¥F(@…VE—¿„Ïð…`‡ìV†)n¸Ížš×‚Mä…³„s½H8Ì+sb (BÑöò9ýðPˆv»Ê…ŒLؽm
+~Œó„E\Ëóè{¨üÃõr¼O=&à¡è:+"2J`ËÖÕw•Ì Kt;Ž½í WEú Ø[Ià ól×KAâé%É!´e[ÔKªÝ=PIò7¶\¶ôiV5žè}Ù½Œ&N‚‡/W6þÖ
+aÈ…f\%éXWÍ–$«.žAx_½œÕí¾Øzñ{|qÝËb•íªŽe;Ã+JœðÔ‹WÝÌðÊã'‰ðy{ ÁŒ0ú[¬•4Öøšyk¡Œ0éøô\ô]s¹ªÿb<Uè© uÄ™ ê©ë9 V-a kb¡!1è¦]ëÝ€±VÜr#b±ìU÷Ëe¨yðÿE01ãléBó˜)­¢^ü¶à,Ri* hP·k=ðÀv|w»‹O ¬h1\”›8Îl¥Çª$ÁB+¹ÐB€AÆÙE5(‰ Þ.E®Q®7U±],]GM¥sfPK'[¯tÊ„IÍbÈÜ?·_6B§àóƒ«úsÒŠ”ƒŠ$À0$<9oãD³(æéyëØC!GÁd„å2Ü4M5±‘aI”Ä‹á´SÛ衦Øe:ÒDØP\èý£5‡¨âÍýY¯îÔ÷Ô6UÑ͹`›ŠµéÛIð’Uûì­õõªÉ³®pMðäÛ7ªÞ~r}+kÄšµû€
+dÍI¯«˜ÉHèwöe
+ö/eþBß¹  Xîà<°ÞP6dM
+–äI¶{IŸÎ
+n·6„8Äûý"¶„nÞéÀª¤Œ ä$¸Ùˆ7”‡G)S2±‘·Ïέß­‹‡‡ÌX—ɼ烯0œM¢s¡$ÈØ›!‚‰•ë¡Þ¡c:ÛlLè­¶J 8¬÷$C¨Ó¦½‡ê]îïàkŽ§îÅÜœG즈GÞ6ÕéI>FLÎV&iïl±Þ÷v¶©`’­NôñDÁ[³£ êÂ
+5Ô¬ôC¹,ÛìÉJ=4nº¹gTl²-ˆò®Ê¶4akØtl&žŒ<G ʨ8‡–›Ö)"Ç‘“²†cÇ:;ˆš/çÎĹun¶Ík¹<ìÕ±‚:£¼M…/õDáЬbA§ãLnøŒfyðp?#ÐdzÎè•`ÜS#Áúƒu‹GäL$­‡z‡Šélßjp¤6,VÑ7³¥‡¢É¼Æ(&'8@ñWz¨wh˜ÎvÞØÈõR¾clPgŒ‡šâqò ³½>‹½‡šA?öð NŸ#ü½
+oAŒ$¦ÂØ*Ë˪Ä3-µ«&[Ò Ì`ou “NñX£#”Cm7I¡âǻ۟¹oph[/YèѽÐþÀB(CPP빨ñ–†dÁå. ;såÝ#•viP~úò@•µ½R*ì“ n¸!¤¨|j0+5G%ÔNí?O(Ùùû_Ïì?ìªéS[ÎÒ¯ç;·„øIÌàØ•þA)¯d(…Ñ:\.B2påGLJºØWeís†Y¿½Ç¹Å</6°Óü•ÆòÈÍe7ËçšnMŠåi[
+‡£Óô[:€:cK=”½Œ[.K$)«ÂÕ¶Y‡Ù®{ùÐ_Ž†rlj™1¸¥DšóöP3$ŽO2–ù|L£O¥Êñ¯¥FÞÔdL¤ÒeYRL ½d¯¥=1âG+*Qãl kl¶hðò‰F°(ÆHo¸ëÞ+YŸ¢ÆwUÖà
+\Ó‡£‘¡<Ø•0ÚoòQ¤j;{ãA76‰ ý.mOÅœ`XVQš;¥$5.7j»|>Ý /< „RóæHUìhŸj7ξAßð{ã“üi`-ø/Çä¿ ¯mÖn´-»]æÄ>³1M]vùøî†`¾Üb&ÉÞ&Hzî
+q#g´
+¼›Ý^k³ÿ€ªIŸhÌwÛ–>˜d)œœØø±â°{å‡(iÛÅàQÅ€‡ÓeϧH˜´Ž“£pø >ÃókÕ<ÞÂì³mM±4Ö`ÿ²çbV˜ÎqCf¸ö'‚ùã&DºâÔK‚„qÝÛÇ,‡h’xÀ•U^ ¡B,SÂÅÖƒ‘¶ÎÕ~:RLå™tóÄ“g3…—®3'á¨
+ï<Uö­¸˜&ÜËéâÿ ëpendstream
endobj
1693 0 obj <<
/Type /Page
@@ -7257,35 +7263,35 @@ endobj
1696 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [180.4479 582.568 244.1386 591.9975]
+/Rect [180.4479 508.2615 244.1386 517.691]
/Subtype /Link
/A << /S /GoTo /D (statsfile) >>
>> endobj
1697 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [265.4578 537.6597 326.6578 549.7193]
+/Rect [265.4578 462.9269 326.6578 474.9865]
/Subtype /Link
/A << /S /GoTo /D (server_statement_definition_and_usage) >>
>> endobj
1698 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [367.5441 537.6597 416.2908 549.7193]
+/Rect [367.5441 462.9269 416.2908 474.9865]
/Subtype /Link
/A << /S /GoTo /D (incremental_zone_transfers) >>
>> endobj
1699 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [280.9692 507.3368 342.1692 519.3964]
+/Rect [280.9692 432.1776 342.1692 444.2372]
/Subtype /Link
/A << /S /GoTo /D (server_statement_definition_and_usage) >>
>> endobj
1700 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [277.6219 477.0138 338.8219 489.0734]
+/Rect [277.6219 401.4283 338.8219 413.4879]
/Subtype /Link
/A << /S /GoTo /D (server_statement_definition_and_usage) >>
>> endobj
@@ -7293,22 +7299,34 @@ endobj
/D [1693 0 R /XYZ 56.6929 794.5015 null]
>> endobj
1692 0 obj <<
-/Font << /F37 1026 0 R /F22 961 0 R /F62 1361 0 R /F21 938 0 R /F39 1161 0 R /F48 1238 0 R /F14 964 0 R /F41 1218 0 R >>
+/Font << /F37 1026 0 R /F22 961 0 R /F21 938 0 R /F48 1238 0 R /F62 1361 0 R /F39 1161 0 R /F14 964 0 R /F41 1218 0 R >>
/XObject << /Im2 1350 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1704 0 obj <<
-/Length 3756
+/Length 3806
/Filter /FlateDecode
>>
stream
-xÚ¥Mwã6îž_‘Û:ïÕ¬ø¡¯ãtšiÓ·ÎÎdÞÚd‹Žµ#K®%ÇMý¨/Ëžæ59ˆA
-¢Å
-O(ˆ9Ò
-z‚¡Ñzk×_&å¾ye™=èOT)‘ݽ ¨çÔËá½ Ï´ä œë[éã|
-'ø› f8ãûð¦mNö0®žÚÆÛM/Êë¦Ç@ òÈgŒûbò¯M$ÂT_ÏýH—S„ŒR ³ÜêÝ2o
-ëOz:$«}:íÑ(ڱϘ 19‰O°ÜZ®%d{ 'hãj›Ð'q¤‹^‡Ý’¨ÇxÄ!çÜó(¼fyqß@•Ž²†0M×òUÆ×RLèÄø¯†€ÿ«X¤Ž?ló ’éîš~7àî|²¼9*cèî0|8»¢m=ΙÂ7¯OUCåq›íxT‰†&fÍü#“OÇ'*@R ws TböNøÎUåBºo(V€Þùª¢©¢5Ü­é»âaª3ã_2Æ6*pþQy±&4\Ïåv¨W\< ÅC° –Ì^6-çq*òÖU®5%Ëð%儆ýso)+ ©
-Í×ÄŠXkÑ9>®Na¾ýlÇ/k“¤´&ñ0×/>våô‹Q´ŒµL_£‡X—ãèË v-–½èFq³Ñ"J’äúîÖÌö£ÈÙ$"Š9Þÿ±+Nu?3‰)Â,—¢ø Z/õ‘pøùËZÈþô=ÇKCH¤@è×èÃn¯st‘ê+aÓ—®8¶qî/RÝKÖûñÇãºÕÄ9!å1†ßë-8kWJå…*e½îÇ3ÞGhé¯<"ƒÇa—”p1&ö¯^1fOÔ`‘ÇÞŸÄ®^Vd~Âq·rrv=Fìsl»óÅ…éÌ¡e'à1ƒ0ž¼É0ºœy2à»—Ž+ šÄx×ǃ?m³fúæÝ=f±žŸfC$H¯yͺdÊàÚ%RxÝ”XWLÙc9te~ð=·åT(@½¾}‡5³ÿˆÕÐà/äâ1÷-É & í渇X ¥Îü; œ­ Rõµ³ à6×Qÿ^h‚hñÙ¿¯&>:K¼¥N1‚ësölfq’~] “@ùǾ•Ýr,ŸPIÐ bÃ_&™Þ°…¶H~F)¡'•þ^˜ «$eAר³y']òwDqùs±
+xÚ¥Ërã6òî¯ðm媈K
+Bã…1R]}¹úÏ°àd”¦®ñ/4‰&:^a Ö*ÚAt‡©mˆEÖe7[g®šæ©?¶Ð ÓÍCß14«Ú†[ç½­y1Ëú‘Áý‘ÝÞÊŒº=Û2˜™ts¿/[*eõ¾í³ªzaà0±°myºQÉÆB„ÝgÏes’ɵ[¹Gß*å¥a¨éYßí›SÙe]ùl·M«ãEµöô ÔPNÀës—6ÆFÞœžwµm[6»%V–ï‘2l3×°U
+:P%ý¶·Þ@aâÜ Rø ñO«`ƒS•ÙÔÙÁ2`  ´ Àê¦Þ
+Uý©…Cщ
+›3Þ#`Á{2KSƒ';Ä?úÑÜ"”mÉÔä šªÇ›™‘”ƒ¡ô.ÜŸïù!xf°úž¯ýxÝÝ ÒvŠÅÞJ­¸û sȺ|¿=dÇ£-¶ 1' .aA†ö}/J‚ôm:¬B¦‚¦ýЋ¢ÈÌ)¹Û±LÉ”f/ ý@ú… [:áØKN%P“b’kHØÀ÷îÓs çD@Š€HPàØ|/-Dn‰ØãzaØú©*ÛŽäo«´†ÈÁ„sekç„ÜwZn…UJZCÑ‚ñ"‰#«îqÔ•æè¤ Î– °RHðŠ>gM­<7§'FgqoúZ02þ<ÙSm+§¸%c§d~I9rš´µ½Q›|
+¼ î&fX¢¼º‘¢8G)…®Q>pÊYæÖ.ƒH·Ô(ÜcìX”mÞô§ìÔ+&5 ´gT¾mR§X¯›Ô ŽŽ±ê80ÞfðÁó®fA‡
+QWMô6!Ö
+%3+/ÀöÎH`ôÈ%h3 ‡cz€dÏ )œ`—lIâ­”ç¸õ j:–Ù œÀîÚh4-̸ŽS/H#gÈ·[[ãnÛ]‰ŒÚ²Å4F{iš…ÁߊØéÈK “‡Ó¥ÁÆ}ÙBC^0x-=«GÁ8ç8ddÜ S•5†™DHwƒè¼øù¬ +ˆd'á»·Õq±›r$gŒ)±'Ö; q :µ;ÈÒä¡oò£ÍÞK¤€Çò™M)´Z<73<H4Â÷»_'¯Jp?2Ú×û/èÀˆì­l ¢e”‰‘<Y‘Ï:ÛÿŽÔ×vÞš {êûr`ºà/A¸‹@G¶³
+–(W£™ã¤ì4˜‰HEl&p´°»¬¯ºa³KI4*
+¤h¬Ïº‡¦¼Î«¾°b†B ÅÓxn‡€_nßÃe'ñÃŽ¬ŠçÓiäâlÎ(d†Æ;øã–Sî1¥B¼!‚Na+Kv&–z,dÃ*|4ÎZ;·ƒŽwlqùã±*—q$k—f¦tLÆhå¡èT,2»±ð5+ˆ­¬°„¿"ŸqªŒ\æÃÉfOÛ¢˯i„òâ!Ë×\T?e„ßغà7~cgà7¤úþd )D"“AíRV`_™~&›wmûÇGÛvõnå…Z/|79¯HÉ]J‡j à`ô=Ùv†¨LSéB`LQ¹có/K=XÎûç{ ² @ 7»&o*)QÈŽc8s
+àNÞ­%!Ä9t…o¦ZÑæ`ó}V—-…µ!ø5Ã-'s“4}ËmÙ€(52„µ5ì°Ð†NÉÿ[n‰¢Áॢ 3IEKYY¬dK_k¸Ì5=™ÔHI«ô¤œ
+m‰õ õи–x³é!Ò„’Oê`TèÀe€Ð @Ð!¾áz¢t@´Ó;€
+=+ÄKR6Of—âƒ+Ì–¹´«TN¶°uéü«ã´¿Æi_‰±d'¥s ÎL““ ‰È·…@EÓ Ñ íXIt`¶sÅ´˜¨–Šð\ɲuµ©æ@¬ˆ_ÌQËCâ ¤‹ïxÎà±VI'Y¹…I˜Ë× -Ž¤$C, v2Ђ¡¡ãÈÙé4.u€tOðE}P[®)]Sšáô- ]¼Ž¢Í$®fp#Á“Ð(ßÛüiQî[–UËñ…+%jð›€zI½šúMø¸C+ Ê¥¾Å1Îp)hUoWWÇÂjš¾6ݽy,öMNp%¶NÊÒKÛ¹bû†G­YõÔ¶NoFV¾­z´å³»—™r¿šüƒÛðT¬ÞÎý'H¯§þ ZþÉ1 ×Û °ÐÙÙ“­óËšª‚},~¾EË€tIÌ,šj_ψùex$˜§â)ÖøÍ›Á±V­…s˜JHfÂd|í
+é2„€s£(ÐòKUÃL4•Œ–G2`ò ?’P"Ï!U¨( Æ‘éâÐ L°Ð~BÍ[aÚDoJ0.'W{ä*›‹‡äÈDTLqúµ¸rXŸ8ÒÓ)éRí3éˆÆÑŽ}.AÝxHÈI\Ê€åÖ*ï+ÈöÎЖj›Ðgv¤›Q†ù­.§"f‡’s¯£ÈšCäÉÄ­¾2W „‘¨ºAÀ¶*pµ” $6þ£eà›ëƒÜqw‚myA
+_3®
+ö\Ρì:GSø͹n¹<n³ƒìƒ"ÑòĬ]dréøB$È"Ažc"«>á[ªÊ…ìo8V€Þ媃 é‰ µÒmøû Ã\gÆ)®dŒmàâ¢ò2g4\r;”+)†“â!h†pf?€4m×.õ\ô0íN–}ydžýóh9+õùeÃÙ2)‡›ÍûO?Ë
+µ@öÐЃ0´!Œlûƒµ²Oà ÿh"ˆÀà &hZW¢ì: >¬Ü½ªxšªNgn Š‡®Ek~Ñà K5ä")&\ìǫ́*7dÅJã:œ¤¿®¹2Ó¶ôéíH’YWJD £³"»î½f7{çiË¿,¿ò°’ñä©HhHᡬÝK’›8®(ˆpÄʽ%¹G%ao:°p°pò <`»¿BIWÎ$›]k=›Sv*‡(T,'+ÈyKØtÊ^Èæî^ÝcÃ’×î‡2\] eÿÛ˜aá›ÓÄ3c%HŠƒi,Xíʆa©yèJž¢— ã™4Š&N¥rÁƒJŠì$WkóÚ7‹ãWÐU"¡%ÞAl`ZîTOUÒ>ïK²îi<y \¶ÈxzóÛÿjÆÆ^»Rn·(¹J dœfÕZñ3I½X 7ô:¿µ—êÈmØœÖØ­¼$
+ƒ¿cwèÅƸˆŽ,ø¼:…ù6ýÚiò²v·HJfœúÅåÀTN5Š†“j£ÌÛQôéõ(Ú!Ç`Ër;òm4Æ‹’$ysëérïYÐ$^ûj¶ùýP–~`i„Y)BÉ ´^šžqäá Zx€cåzt–‘XtТñG Þ`âܯš²xÓÊb;2|‘Þ°Ò¯ƒÅ ìÒ,!å1ÞùÌ4U€RõJ}2»‹¾îg+vÇ3*2ó| ª‡C:"e˜Ø½wŘ_<rCX;KS¥¬ÌÜ„þð@|v3G³ lÓýâÂüþEhò È­[é‡ñâ5îŒqåÊãO
+!D!á‘YR>ü<÷’ôÿÚßÌtendstream
endobj
1703 0 obj <<
/Type /Page
@@ -7325,23 +7343,20 @@ endobj
/ProcSet [ /PDF /Text ]
>> endobj
1708 0 obj <<
-/Length 3516
+/Length 3567
/Filter /FlateDecode
>>
stream
-xÚÍZKsã6¾ûWè(W¼Au*ã™ØÞÝT%9p$ÊVD:"eóë· P¤DI™JkU™`£ 4Ð_¿@Š‡Ÿˬ—~ä¼f† 3š®Îøèú~8‘g’˜&]®ïξ»Vnä™·ÒŽæ±2ƳLŒf¿Ž-“ìFàãË·×7?üûîâÜéñÃÍÇÛó‰4||}óÓµ~¸»øðáâî|"2#Æ—ÿºøôpuG]6ŽñýÍí{¢xºôîêúêîêöòêü÷‡Ï®Úµt×+¸Â…üqöëï|4ƒeÿxÆ™ò™½Â gÂ{9Zi£˜ÑJ%ÊòìþìçvÀNoxtpÿgRY9°Rv60ÌxoFÎxf•TaõùDy?.Êü󲘽;ŸheÇy9Cr6ΩwVÌóͲ¡›f}ž7u3ÉËéSµ&Æ95 ÷© ÆûÛ{êZŸ‹l\Uñé?«22ÐÔ8T18ãÆ7s"ÕEš«Â-þîZg…(«™´^Ãòq oEML½Õ
-Ǽ’.òÄuL÷W—È=š¨L2É%l Ì#ãK¾\ÌòfQ• €Õ$$\·û£¼Þ4DÎé’¶$Ó¾@{ÕR?‘’—›|¹|£»iUþƹ|Ü„]*fDÝÔ‹ò1Í@kÝ
-oÓâš5LRÌ&_Š·¡°œqkTdÁöœháaKe/@ÒüñȸSF¥që&oŠUQ6 J%øøq€ÆÒboõ€>L*PAŸYäa{–'˜ÂŽ×Ì íX
-1Mº\d(bÈÓ$.œqVÖu1äÓiñÜLŠ¯Ï‹5hkG
-J—eÇÅh¹äè-Ù¾X.ú‚\ `“•1Zà(>®eÞD0ÕÄôúT”ÔûR¬ó7‚tDkíþƒèÁIbïÖþáfP‡à{˜µÜ&‘{.«!MFˆ%M¸ÜMC”4OhvتžÉuÈxhjåŽBGr¦¥JîbYä/-[WíÒ3gÀÊ|EêÝK)¦3 ú²Y–Å=C+b¸Ò6>/ó7ºÏ›&Ÿ~©¢ÖZÉ„tEm—ë0j[.ðM±~[V»{ǬÉüñ‰ÓÀÄ=}rɬæ²?óýs1°Áú5GB\
-wýPEÃ@CÀÎÀ¶òþžìx÷ÝÊD2
-à.×ᄪåÚšÜló<Y£ŠfûixOç!¼¡å¡ü´aÎ/î q‰B édÛÚ1”a“¢œßö °Õú¾@ŽéA
-æû ÖŽ… 'ÓÖL¸ÌöQ«¼l
-î.×+I\[+Y}Ý+¸=/žŸ81 LÜ/¸5¤ KoæhÒ¨N¹mTÊ](`áµoDg^äë:>Quçí@‘œÓåæS¼Íböb…ðéèOu³%«U5ŒP(G˜ç^~+Ba6B(å’ÞA¿[Étp >´Å­áGp›Aê­3}¶,êS°U¦Åÿß…­Ê³ÖÛã°ír†m˵…íëb9›æëýcMi™æâøô‰i`úÞ¦):’ª??•ËRé퉟¢Ãw¼R¹,UÄ P¦ìФ<eUNè $øQ Äõl®#8iÐ8ãüØóñèF{Á(ë'.íØè#Â%æ|«ª~²¾åkþ‘¡Ž·‰….Ñp¢W$JêÖw›6ù‘qùpÝ”­× %p2Ù84º+&Ê*o¦Ot²D{¬Ö‹æiE`ƒ©÷@æ"¸Ò”hL´ÉÒyÇ#YXN<Ò€Û<ÈiƒKó~—¡3Äåv„‚¶^n”lR9ˆXòøG¿¾_¬¥÷J<Æzßbš”p¾«kèêa%•c’Yav’rÚôPþÕ›èTrº Û‚­>l¾(²‡e7ß×óM\[ó]”MñÚ}Û·_Ã7ÇçOLó÷í—3™YÕàS±†½ ¨âèpž¡:¨òÑ赶¶R– zM]Áîáš „ý B¨µè%€cû”HI>PC„ƒk´ Ñ6dÂe6ëks?KT¢ø”’T¬¹鈀འ&ˆ‰P(ñÉÁÑ©‚TIpl=.7=±7ÇàÅ×E%H+¬ßñ  ¡³ï]kn v‡Îa2KÛ•¹¸]@ØÖ@Ý/Æ€£*Cº
-Ý‹ru
-äî¹Øú,è ª
-þzpÇæiþjÓLªy;Œë 3P%nêÁÓ1.„îžýOÂŒaÔ}§AÇsi:NÓj¯ã®p1Æ#MÉt‡qýЖ ÄÏŲz%jS=GÆ9ââ µÝ.:›=ÛMÁ;›`ë3æ…òûueJb’?"…óûª¬ E9Ç+­¹@ûÐ>jyŠù{yúÅoÿÀU0‰¿àäO¾ö•Ê2e½9îY»\‡=kËÕÍç'ÓPÊï:V%™ö°„£ó·\ô]«cÚyÝ—`ðå”gFò”.xÿ‘q£ë½¢û odfÒ;' aÆñŽ "äàd§Ñ^CöÚZ¶‰þÃ{Šè•3Ó+#²xNäËÛ‹W÷ñäSÀŠ3“©>ÊB©÷>¸)Åœ•êÛꈠ^1Ë>ª.×aPµ\[…Õë—£¨:>b˜
-ŠÝL›i`—ë®WWPìb¿÷Ö3c‚ƒ¼G§o¹æï¿õTŒg/zü—´®íø™B*<´ëe}:&õ;ê‹gÊÐJ©ºnýÓz99 ‡ˆ2ÃT\
+xÚÅZÝsÛ6÷_áGy&BñMðÑMœž;'g»wiûÀH”­‰Dº"Çýëo ðC‚¤xz3Ï„àb],~ûˆâœÃŸ87–Ù\æçY®™áÂœÏÖgüüú~:g™¦C®ïÏ~x¯²óœåVÚóûÅ`.Ǹsâü~þÛÄ2É.`>yûñæýõO¿Ü^^dzrýñæb* Ÿ¼¿þçµ~º½üðáòöb*œ“·ÿ¸ütuK]6ÌñãõÍ;¢äô80éíÕû«Û«›·WÜÿ|vuß­e¸^Á.äϳßþàçsXöÏgœ©Ü™ógxáLä¹<_Ÿi£˜ÑJEÊêìîì_Ý„ƒ^?4e?m3R[°¤b™i# – <™æ,s¼72 H9r¡‘çUÓ”³iYŸWåî’…äÌeb0$%¾ãJÈ—ùB挒c®HòT:9ywswwõ–ÚÍöé©Þ´ô²¬Pµõ©™æ`Vî'ªŠu9lC±Š³<´ As;ù¥Z•M$•AJ[ÓpííaÆä* )›„‘±\É(âMBWÃT–ŸRT1Ç¥\ŸËÇâkT,Âs¹Ï ñ¼ŽUÝâ”çS%%LM…`¹1ÒÏÕÛ
+êíB
+¡2sî¸WBÑ’-ØÅr1VäÒk€QUL¼rŸ4ˇªhšbz~,+êýZn–‹Âtô Hì ĤÕ²ßCìíý^’{U<³âóAßM\îʶõŠ!JÚG@¡U?… ŠÔT,È¡©»œt0sh©b’[•¾xÚ÷™³ÌºÓ•˜v:BõëvU•›P¥’ŠþIf|Z/ô^´m1ûÒD­É
+þ¹-7/«úaWpž1k\~\pdJí'—Ìjˆ¤#ÉwOå Àë×!yaƒI*'ˆš=Ю½y¬·«9uø¼Ž´¶Ø´å¼›%UI ELÎÅéSŽë>\mÚÆçe‹i'eÓÖF˜ ¹31ˆW¦+l=rAY¬ºi `ˆiH9à$Fíæœ%f
+’ÒLÊ?·>ŒKK c$1ê¤t
+‘Ç«?5¬–T8­ª4Bá8+é~°ûn„‚4B(Õ’ygüÝ“Ì
+ªõ¦¥NF‡ÆpÅDYíì‘nv¼jõfÙ>®I
+ðràÈ&UKÿE@ãÕo>>¬Åß•x¸ŒÍó+Фâ€óݽ†®VâqL2+L>ÎÜdtük¶!¨ôÀ°¦>ì¾àæ:ß;î¾®#î¹z÷]Vmù
+|*7`[*Ž×ãNu1'ý쇭^KÏâUo¨‹~>å„°?Bw-D àèG‰XäÕg8x¿ÝÁ†\Š g]ò¢aP%*1L|JÉð£¶f:" x/©I7b Š829; UT[«mI#öd$§(¿-›0” ­ðüŽ-Ý}ï±:GëÐ=Œ³d.—s¡?uÿ0uåËU‡_(LÞyxï€v1 úüVùø =h±E”_oÛi½è¦ÉÓ$Ò¶I˜ãBèáÝÿÔKô³î ç¿Ê0ƒ eu®ƒU¸˜à•¦ä‰½Ãΰ~èŽËâçrU?µ­Ÿã‚aqÐêÂÅÀ(ÐÓŒâa›C'T¾®ŒELŒG"_W
+æ õ…{dhÅò\w1ˆq%ž}ÝCÕ`<P
endobj
1707 0 obj <<
/Type /Page
@@ -7354,26 +7369,27 @@ endobj
/D [1707 0 R /XYZ 56.6929 794.5015 null]
>> endobj
1706 0 obj <<
-/Font << /F37 1026 0 R /F22 961 0 R /F48 1238 0 R /F21 938 0 R >>
+/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F48 1238 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1712 0 obj <<
-/Length 3461
+/Length 3339
/Filter /FlateDecode
>>
stream
-xÚ¥ZÝsÛ6÷_¡·“g"–~\ŸÜÔI}½º9Û›~=Ð"$qB‘*IYQÿúÛÅ. ’¢ìv.™„K`,ûñÃRÁ̇¿Á,Qž/Óp§¡§ü@Í–Û+¶†¾Wó,,Ó¢ÏõÍÓÕWd<K½4ÑìiÕ›+ñü$ fOù¯ó÷ßÝ|zº}¸^åÏ#ïz¡"þÍÝý·Ô’Òãý÷î>þôps‡ó§»ï©ùáöÃíÃíýûÛëE¨
-fý¹Ï$p\"ˆžAì{qdøïFW× )Ãy«;$Ô¼«©¡Ûh"r½Êö%÷¾dåžÛëJüÕ‡°¿Ó L¼XE(ÎÔ-1dñR)bæyÓ)57z`ìÒß?~OÄsÁë,®Î–¢>ëãPð\wºÙ•Æ•g !b8l_€ª/UŠ6¾©dsf-$Ì<H´›z_æD?sç¾ÕÜr0Cj­+Ýd]Q­Ùðï>¶D¯ê†ˆŒçÔË}s$sžïϺҞ‘Ï }OÀ#׆+/ª¬)ÊãuF?qj†,Úb]™¥’(qKÔo¾ò»MÖÑ[Ñš!IáPt°+î'õAê‚Ô XÌÐKf%ÆÒ€^3/È2šPW]Áƒxo}ã@2¦ Å¢ÔD‚§mqCKnëô†{ ŠÎ ³$ÌpÀ·|©«òH&NTóñëë`^õ-z¿½üþög¢ÐA›¢ËÌÂnT`vIMÙNÐ'ýxþ]}Ð/ºÁÀg4
-–b±}«ÊÀªÒg@–uU“"ó¯Ivà從†a+ôA-ï»^*Fñ2& ÈE8RËA»é ýZÚ³*§¦ÓrÐÊÇ”9Fè&‹4-ž¤g‘¦ƒÎDÍŸHó(IkÇo‹2k†“âT¤Ö¾êe(=q—õšW-¸¸±c>˜añçÄy,ÜÈo,ëí–¶ XÇ ²‰ÉHÁ¡[)6!©BgBØJmŠ;tNšP
-¥“êN[8FI*‘
-¤¹Jò.˜?½ÿDBaìûé[nøc¯›B·ô²ÊŠ )ñRÀÕ“PØÿ.£ÏEYt½{£Ã¯XÑ€„•ým“´Qôz¢½4”‰³ùK:ý· âÄôŠ=0S?`à [/ºzQTDÅ~€N¿*‡c:¤¿cáGžð‡‚Ü”%dâ­_
-(Ç*ÛKjc èÖ‰Ý]“UmÁˆÚÉvê-õöKn<y{¶81ÑžöðÀùd€¯°1a¶HA\• s×¾"N¾ð'ñüM:IÀ*JMu lÍ0!Q¯¨›QtÜCÑ1›ÿ’ÂBÞ"ì‚b+M‰†—ìŽÞ'mM‚ò“$ù{ñ—!tó]E¬§L9ñ’ÈᬿbʠѦgÀOWV|:Ÿ’1 ÀžfÉ«\žÒ À‚ó©``
-6/ÊȪ©e›"’\#ê©8c&ã<ðÌܨºá\±««œ¼-¢Ã”ý9ú.qQì®#’%œë/;p-½¤ oò­Œ$"W#׋·ÅóËŸ.ÍU¦¬Cy¢Ô6WûnPÛ$oÐÚ3±eÂ@îk<2¬Â°¤~DÎ-½r¼„† Ú6=kSò€¦e]ýæûb½w—Rì77ˆ „é ,CÙ˜‘í!IPÖ É(wðo*øß}(ø¶B Kîšâ%³{áJ4Ÿ¸Ež€Ý”Œìj‰]<c).OT¦°€[R)”.{Ô.ꦗÞCöœÁ(Öœ)™kã³ÄÜüpÂìçvùt!l‘‰Jéx…b;…àGÞ9O纔€$’PŽák—5ÃÈѼp÷dêd áâÈŒÃÏIüw½€³ñ²&ç;èhE4:˜ÂÃÐÇÓY™A\h_ÓÙ­²%A'ñÌØОy—¿}þÌ€,®ÚIïu—4ñš[áÀôâPäl!Ëli…¨«¹¯ôGèæE7¦„؃Ï÷K4BÔ°ÂF´ÿåT´ª_L*4× Ï-‘ôq$…HÑé¦2A Zñ¨ˆâUñK]œÎM|VR–²MFê™`È æyovÃFÈ‚ÅAGZWáAäù@å<ÜÜ8‘Ød/“_rŽVKä1;Ñ„ª,:†»
-·jJ]‚»¹×"á0èÜ ‰çe]&j¿#£¦Â€mhE5ñ*Yu<d䀨«P°öŒ ¸ê% 4Aœ´®¦Ž«ÛÔ-GN§³ËÅ>m/}9åÉòøø+qÕXM“½çµ³e§\zpÓÛ»_Ç _ùA’z¡zësiŸë2Ìw\¨'rÚüìº'OÅAúúÂŽkbåA¼‘§””Ã¥©¾!M¸{JßhL0´lu†… Õ¾¤“ÑR{ „†^à!7€¶²0•æÞ„äР·»ÎÙZ,Õü†ÚíGX\|ê#¬Œp·)GÚUÑ´ÝDtX­s\êömè'ž‡bò¾ˆ¨ P†>h‘ý„3͈îÆøDÃ>ŽøƺÀ6Œi(,½À5Œ(²ÞˆîÉ4IÆLhÏÕ?:ËÇfÛ_ÖnñÐÞMâJÔIê$´(Q–E!{É/uë–Å‚~×êrÇ¡+ûœ}´‹…Ó»­T'òâ0ÔzPÊ^¨$º¸zÞÅ pµ(PÄëæx’>Ñ…Â ãPyx6—}¼
-ì$zÃ×{\¯øºåêù:ÚÅØÝeè% å«K[¦‰¥Î.Á$:{íG§cS¹µ–¾v÷‰²<gäÞ:žšX¨L¸2mÀæ’#Ð"C®=ÂÀS!†Á`e
-¦ÂRx¨xÝ]ø³yöèL{‹#*÷ìù{©*¢ã”&„"(€_È„âëäÇÖÚòÓcGß½ymP1Mµô@2tp«‘Ö„u2 Öeýœ•®÷L>ŠÌ-ª'+Û&"Hš"ÏoGôuÛ3z¼d„º£êæxÛËŽŽÿŒ×ÊzOí¤–ˆ?ƒ-;À³ÅrOÕox§ ·ÄEÑ”ñ¹·0`nÅ_Í%,
-GhÂ- Ɔ:/¡#¾O9Q
-‰½Xù6¼ØÔJõ^_Ù@<Q„^„Ÿô}V)ƒ8‰Ø€ã›¾èí…Ñ…û`X¾³pæ¬Z'££%f‘ò¤0?j¢®f=#â¡çñŽ{qb?wøñœÆÝLºú6^. éŒD¼ˆÚŠ{¢œÿ\Ìò¼*Àx¦ér)GD©<üÚÄj¾«Ùÿß?…;ýNLB&‰¸ 9?ò‘ÆV(sScÉ•ý&"žý£COûendstream
+xÚ­]sã¶ñÝ¿Bo•g"–
+oùO»mu³h›bÑuÕøÔBÇQ–‹lÖ_új‚Ùã@heF‰! ÿ~´5\½óí¹Èæ¶Ûmëò\Ìë»î±Ù–]Ñ•ÏQñ¼¶áÍOkŸšºµ-¡º†o?^âÝ–4Ï[Û1Ù#/xw÷aš5!xD¸àRPQ. žVD¹ÖÄ;m½lÜsE
+t<…eLYÓ“Àé@¯­]veã‰z‚dp¡ôV!‡~îÊ®‹]ÕñÊ-27´4I$Q!bÇãÁz¢,’(OTÆ4Ñ ugJó4Jóܼ®x}ªÓŠ¨&o±,–p±ú™ŒMg¯³¨&ø9KÀ½1d„ÔOäÉY(QëD®æ᎚†o}M#2”Ž0¹Ó7Ä£¾ç´ '~tÚæ0<»'k™ ’5⽬‚TE"‚’—œT€<JEmÝLI_D
+wÜ=­ŠÎ.@äËO‹Oí§‚OÁSˆô Õ ƒÓš82¹ñ@‚WŠ%¤”vò@„“ÁØpô¹¨vŒ7á.5“Ê"£Ó7ìÎD¹’†i¾‚å´ž»{`üÖßß~OÀ}Éû—Ì®=%è“= _ÙÎn7emIe¤4cb9tZÍ~äÜ:Î=6»Š½Ö=îZïÇöä©z°µÝ‚a8ñöæöêCKð¼!y¹àÝvd8ìØšÚ:ƒ;
+ G:Õú/øë¬ç¯3§9GÿÌ7»¶£ ï-= Þ·²…êö -)¡Àqï¥4yMÐV4ZT˜%>nh„¶|Z‚A„’bÙDBÚ‚èËÊŠ™i
+¸ÁÇwÃù” çˆ9Æw7Ãé)ŽóŽ †²A7b‚IŽ«†¸0Åu7^t£ÝÙ“D‘|Â@$e2÷IB½ì%ïe`øB[äœ!@Ì{MrÄqžÀäªËM öWeP”õ
+ý¢\Mߧ¡dl"K»ßu#wRäpq.ÛNC]#i¯šŸŽ¤Ô,Ε8Iaæâó”€zšÜG®¿@1êG±‘é0~AW!•‘Îý%U¥» «õÄb"‰L’¤_dö=Nì«^.-ºpÍ/í\A†(Sùv†({f~201ÃÁig/$°go8ûÕ+ÎÞS!‡Ýö°è–O‹­]omû8Õ®S
+üñ« ª Æí:%ôƒ»ó­KP—C>ü®9ùxäAªŒ|U \)Éœ˜ß½û‰
+)…4â=eH‚›À8'#èÿ£÷e…-µP7†üÕ5ïTšý×Û*Ùj"ÒôÿÑGSie(ÎW5¢OuZ#Ußg`‘m]³(k‚ÇœÈXDª’×Y T¼ô-ã4’ñˆ—‹ªÂÖ‚9ÖþJ‚[9ÔŦ\Žõ@Pí‰Ãݶ¨Û’óvÀ“5í7Â,xò ýPb¸)#¡Ø¹ré¯ôža¶ÈSì‰5`W%—ý™™ß£bgèFe©»Ø#Íš†9—6½\ÚŒzÁ-&¿R’‡¥%QÝ Ôîè}Rã\–e_æeqʱ W<Èb3¥Ð ¬4d[E¡áFXžÓ~*\ñ,KÈ_Ülˆ–R…4@—fHÉQU*Ÿfà¤9G O'»B§,3’-w{õ縘Àõíå;Zy$æTBr*!C–Ð<[^á¨yøæO7ÑÄá|ŸƒÁÞVÕd…zåZ©ï1¤¡5âò´–pȶrm Úéœz)÷ «Ú†0µ]Ú¶-¶^›ÑtQƒý4­ýÓy.ç7?Ò —€½ó¾àrªé|ªà££Jýµ"´,vØGL#í]qÁDÎxàY„YÍöØP_‘µ¥$LÕ_£oR)·Æ®:¢ ^’¹ýü¦e—Tö¦ ×fÄ™ÚøL'kÆ—% ­ §«]sgðA‡;œë]7èpŒu´œo(ˆÛüºA‰a+†S²-ÀôÊî¨nˆº·®ï¨eSÿÇòa*SweÄDšKìEy—Qì LPÜ Å0[îàoÊÄqdâØ»ò±oSÖOÛò¹ðgáv i¸O?!ÓñèóY±D….ï±
+õ*|Ö­¨J
+võ¢ä“"ÒFä¯o¨&v¸{™FZ+5Üšz
+r‰ÐdÏé;Ñ€³±6ƒÖ»ŠF\@Ë}%ˆžã!3
+í«iãCªL¹ÎŸÿdÚ'¥
endobj
1711 0 obj <<
/Type /Page
@@ -7381,122 +7397,119 @@ endobj
/Resources 1710 0 R
/MediaBox [0 0 595.2756 841.8898]
/Parent 1686 0 R
-/Annots [ 1715 0 R ]
->> endobj
-1715 0 obj <<
-/Type /Annot
-/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [367.5469 61.6747 428.747 73.5749]
-/Subtype /Link
-/A << /S /GoTo /D (zone_statement_grammar) >>
>> endobj
1713 0 obj <<
/D [1711 0 R /XYZ 85.0394 794.5015 null]
>> endobj
478 0 obj <<
-/D [1711 0 R /XYZ 85.0394 305.8415 null]
+/D [1711 0 R /XYZ 85.0394 227.0652 null]
>> endobj
1714 0 obj <<
-/D [1711 0 R /XYZ 85.0394 275.0663 null]
+/D [1711 0 R /XYZ 85.0394 197.3345 null]
>> endobj
1710 0 obj <<
/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F41 1218 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
-1719 0 obj <<
-/Length 2636
+1717 0 obj <<
+/Length 2753
/Filter /FlateDecode
>>
stream
-xÚÕZ_sÛ6÷§ÐÛÑ3ŠÁéSš89w®Nj»Omh‰²9¡HG”âú>ýíb
-¤(9sIgî’c¹
-Ø…sž¼Ýõ¼Û‹O4Ó›ró¥Üt8O&#i|6—È•QNÜQ)“t®ã¹H:ú.€¶II»®\"•&E7ïˆÙ®ˆYÝ–8Ô¹k7[ªÙ¶Äj7Ÿbùí®YÒ÷# ¬,i¸«Ëµ¨j¨$‰Å⡸«êjûLò–;¯áö¡Ä9ã,…`yšÒ,ëÞ0¨#–ÝîñÑ©…«vCDY
-¡Ñ„
-± ;þ u¸y,՜˗M§Þ.J›¤)Ö‰öIJX.½ƒtTeÈ… Ê[Ñwx‚e¡úb±€ÖÄuμ»–jS¿dN´ó'¨tk†17’¥BÛà„CÛMÑtè@‰É¡=*Ù¤À"wú£æĬ:ââ>xu>×B`ß8®~½s³î]Iœ\™8Nkà„­Q ¾mÇ©`4÷ôÕ6õ3QG¼¼Ÿ x¢•Iåˇ'§yæ&‡r[ ¼™}ûŽJt$¤Tâ¼ÉMUæÎÙ›}B–Ø+ÁûY®¬µŽûãÈlÊd*B—‡â‹×¥i©,Wh¦U¹ðsÙ55®¿[PØïLØ\<ÄmÏ–ÊÂFöÁ=[øfweé÷ó²êp¥–Gvù¢]¯gáGM†êžò’ݳ)›XÀìŒ?A\Zß}®'Ì¡aÿ[ÌrŔй
-–êÌ…VªÜÜψ¸ŽP¯o?;ÂÞ¡\{àŸU˜!8%‡èïc},þDFpZ‹€ÿiYFî3‚>ˆ-ËmQÕÝЇÚ§ážèªWÏ!²ù2X çäBã‘X–‚¿Z“å§cYÜêx,ë[¹M\×íÓ¼i·¨á8Š Å ÙéÑûVÃ☰L
-Å­Ž£Pßjïöx6 ®©t~zð¾ÕÄèCÊF ‡¢ÐÞ‡!§èQ·YBÀߣ¥TÓ1»OÄh]ÓeÕ›gªz{uCU^Áq'³˜Ò4Ógv#»Œƒ“eR£ h@»N 9bèv.€e`2ÔA9V‚,¿
-[k§¯P 3Í3ÚœEý8Èòdè15ÚáÙ.ãmØÛœ tÏÀÍ5×°­3óU´\©ÑÂ-4g©‚8KËõàU$·ðW&7KÖ`Õ3•æÌ’YfŸgâZž+jÑn¢{8Æ—k9{ÛÂtfñŒ¼Üy$ØÍP$òH© ·TÆ@+«ûý{.àXíü Éó|Q,ÎŽm§´/³ÂöwþÖ†„Ð] IÀÅrŸ`âq:œ+¢ää ëÀ«´óÍí,Z·oóklr{i3÷m~
-gc0-`6ì–Ƨã9ä+ÆœŽC}«ÞÎ)Õ„"‰®
-“íS$)'Àk³|ºDÊ"Ùƒ ~àù ˪Áü¯Ü4E=_ wõürŒÐþn·%¯ö2Á××Cå_[’6u“F d©ì<žã=X»ó0Þ”¸¥ŠMr©OMûÔ÷ê¡ß)Øuè´Å»×] l*ò£^9¦·êˆ'ŽÜraˆ
-<U¨ÿÕ
+xÚÍZKsã6¾ûWè¶rÕC<’ÇÉŒ'ëÔffÖã=l%9Ðm³†"Q²×ûë÷k4@ñ%;µIªR®2ÁF£Ñht÷×
+ÏjDYì“L…ŽmæX?TÅ *^®óšyÕ6Ür‹¥®¦&{ÝØ*¦6Ÿk¸i¶yé»nò¶lß ­#ˆ­š§n6¶l4îªæ&¯ºÞ‰~ÍþlêÖjÜꢡœ¾V/›Çb·+7›‚Ô°féÔ=çÇc¾+ gnô5·L|ÊŸ[ì™F8þûoLg³€±-öLyÈwûr}¨ò¿ó‚[ær~"üÃ÷–·´Ž[¶NQ·B„™ÈÚ¥³ :ïóÇb¸>ÎN9§‹©HðŽâÎ$"Aˆ@B/àxxSWÏoi?wmÙšT k2éGÞP¦„bHXoüø?ëfÏÞZ˜ûl¹ÓÅ8Ôµ¡ EÁÅÂDYF1Ì»»7®zAßñ¯ú¦A?•ë‚¾X“û„ü¬„J&
+eø(4É=×kjL¤‘bf«°2E¹T»„k£¤¤´B`¢(Z~8äÕªÝçëo¼†¯ÅîÑ'ÐÑÌp‹Øãäôjm±x.—ëÞyç
+~á´¦5¢ºí±3oì‚…ˆUN9Š(>O6»=÷ÿý©Ù}ëËoõ†ßhnGº©Š­Ÿ…"”ž,._ßç7eURŒ’°ÍÁ«GÉb&î«Î*.šÉßN'ïŸÜ(JðíË/fèÏ Ø!üäÜ„Æ}ÓzY[èVÖ…˜ µ‡Cii^ÆÌ>×iÌì¸h›nWíqëØ©3!í/ª˜fT §AÁCÈ©Mìí¢]Öù6Éžô¡(q9ÿA—·¢ð„máþ|½7S'vÓpoì·Ì‰v΄N·g笱4éÐ1ö»¼nÉ(µÛ ü¤@’R&ÕIæô'Í™H¨LT
+ä-#=@SÛœû··jPo
+¦äpe¦8­A qQ=†Ž{Ïæ£yJÄá½QZæÖ /ïOLÕ²ôÏûœg¢Ä-Ž(ì¶hx3{þ–ŸäHÔÒKçMn©*sÎ^ÇOÓ¼_d:UæýqŒ%±P± C¬¹\Uƒgálí×r¨+Ú·¡ˆw!ÓÌŒ Ð{ˆ ÏÆÃŒíÙ‡b6÷l7EQàli§6'¢|Ýl·Î³è¥báEeX!îæR·JQW&‘õ ¤­õÃWfÆñŸê`Ž®H›à€¶
+ Ê`úáPÉåÓ}¹¾§¦rˆà©]aDt§2Ÿ|üaO¿Ç°¿/ý8G¾`V àÔòŸ'¹(
+ñùIц•Îõ8#âÔ«”¡Nð I­-ª4ä幓¥"K2ŸˆÆÛ1²¡„–:%¶ù3Kçc"µnü|mg× \Uçu›ê µBia‚`§÷tv¤/›Ä3ppä!|†Â ~©¹FVòöBºL2™ V:ìVá芼îųj&(Îm´ìN¡4æÃÁÈÒÚ‰êTŠ$¨f¼¥ð°]ä5Ráí¡¢wÃàæã‡s$n’Ñ‚¼[&ѱÌ-_&Ø”nú
+Úa+$*g«úqØy!¼)*Ÿk•¡÷×ÁŸz†BYº­ŽPwiyÃ>#ÁÊå5þ«åäŠ>µ„¤Gº¥î&zñëBÚ²L3S¯íÖz´#¼½ÜªÅ‡+Zôå¯ú’Ý¢Iz^©´°ØD±6VIÃçGkç“tdX>¯ÖùúàÜvpRËè»@H·ph­Y¿ø+oÈ¥ç±È¤#u8[ôØCå5š5ñ,c3T•.ú{÷ûÜAcŸm! Ž_9~Ÿ³ú ÷Ì]§km^)‰•ÞhýÊ'‘Žk”tW\ï ðH‘3@»¾ä)®x¤6’C †x¤x„fլݥN&ßFtê‹š]àaÏíÂ`=0ÂÏ.¯¹tÖT±~ BK/ç¡iýG8¢S±âJ[â@ÿ†*ãë$Cu'rl½t¾IÊB&¤f— é…Qô,k*‹]W«Û|íN£ž^ì@ü7‡=7è>á(ξ
+,þ³gis×9a®˜ŠÖ'uº k>—×ÅT¾+CAõ­ßPúùß)XçU´§Û×Pb 6lþ£á·¡©'ŽÜ±‘É 
endobj
-1718 0 obj <<
+1716 0 obj <<
/Type /Page
-/Contents 1719 0 R
-/Resources 1717 0 R
+/Contents 1717 0 R
+/Resources 1715 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1724 0 R
-/Annots [ 1723 0 R ]
+/Parent 1723 0 R
+/Annots [ 1719 0 R 1722 0 R ]
>> endobj
-1723 0 obj <<
+1719 0 obj <<
+/Type /Annot
+/Border[0 0 0]/H/I/C[1 0 0]
+/Rect [339.2005 701.7636 400.4005 713.6638]
+/Subtype /Link
+/A << /S /GoTo /D (zone_statement_grammar) >>
+>> endobj
+1722 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [455.0966 581.7418 511.2325 593.8015]
+/Rect [455.0966 503.2689 511.2325 515.3285]
/Subtype /Link
/A << /S /GoTo /D (address_match_lists) >>
>> endobj
-1720 0 obj <<
-/D [1718 0 R /XYZ 56.6929 794.5015 null]
+1718 0 obj <<
+/D [1716 0 R /XYZ 56.6929 794.5015 null]
>> endobj
482 0 obj <<
-/D [1718 0 R /XYZ 56.6929 769.5949 null]
+/D [1716 0 R /XYZ 56.6929 686.5799 null]
>> endobj
-1721 0 obj <<
-/D [1718 0 R /XYZ 56.6929 751.5831 null]
+1720 0 obj <<
+/D [1716 0 R /XYZ 56.6929 663.4862 null]
>> endobj
486 0 obj <<
-/D [1718 0 R /XYZ 56.6929 630.1466 null]
+/D [1716 0 R /XYZ 56.6929 548.1865 null]
>> endobj
-1722 0 obj <<
-/D [1718 0 R /XYZ 56.6929 605.1375 null]
+1721 0 obj <<
+/D [1716 0 R /XYZ 56.6929 525.2522 null]
>> endobj
-1717 0 obj <<
+1715 0 obj <<
/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F63 1364 0 R /F62 1361 0 R >>
/XObject << /Im2 1350 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1727 0 obj <<
-/Length 3417
+/Length 3497
/Filter /FlateDecode
>>
stream
-xÚ­ZKsã6¾ûWhO+W¼•Ó$™I&µ™$ï)É’(‹‰tDÊŽwkÿûv£¤(yR»öA`£ 4_?Р˜qø³"c\Y=Ë­fÙlµ¿á³èûöFxžE`Z¤\_Ýß|ñ^å3ˬ‘fv¿IÆ*/
-1»_ÿ2ÿú»·?Ý¿»»]ÈŒÏ »]d†Ï¿úðñ¢XúùúÇï?|ûÏ»··¹žßøñ#‘ïÞ½w÷îã×ïn¢È¼/ý^xÿáï¨õíÝÛ~x{wûÛý÷7ïîãZÒõ
-®p!ÜüòŸ­aÙßßp¦l‘Ížá3a­œíot¦X¦•
-”Ýͧ›Ÿã€I¯{uJ:+X&µ™-”f…1&µÌÏ@k‹<³Ì(©¢–¥˜ÒràB-—»]û¼øãX^«rµ­m3^º(@ReÕ,ÿLŠÈ5!†LÄ®‰›¡Ÿ«Uý+ç²ê`x>ÞÖ«-6Í|×®ÊQËõúp+ŠyÕuÄh櫲¡¾‡ú©"RÙtÏÕÁ´q/´{êê·‘ÝbÒšù‡ u6mO]”fýµk¡sÜ!˜Í2鄦Á
-ÝÞ\1ÃÐÜEdt†‚݃h‘œ¢Ã“W”À‰,ós£ÉH’ËQe·;‹*(í%8HÎŒ-Ì+pH¸®À!pàp|\—}uA ’öúì‘kbú2Hª”–ÃùG9FqÊ1ò໑}·{¾™Ü
-TÁyÊ KžˆÛ{s׋(…¥-H72·¬2š~X>9 Á¸vÎI¤$ <Vi ËBq;¿¿µrÞOÕ”Ëç‹Së<U,Œü†˜]ÜݼLéÉÂù)“jN‚Öx›ìU ¶ Ù//ªVÅãÒÔ@øݼ8 (ÅçOåîè2åóGj‚®› Ñ…²à¤dþ׶8ǺJ¶ib\Ɍѣa“åM
-Š,;IšQîcw}¾Ðê=6€æG
-GëãʃC ÐŒ:;OCƒ#«›î­ –ð1ã±mºzYïêþ…È;CD1esáÚ+pßpL!!vDë¶íq·¦¶¸§Qžë~;š9n|1ž¹¼¨t òìÑÎù rÙ®«
-'p
-–Ò¥p𳫻žZíÆwŒk–áˆF­Š1ß“Ò·°åË“2)nÊäâN¶ìæô#]–(ép‹/A»{ª‚¸tp‚µY£‡–Kx!ÄÜCêç´b™ÄT‚R(¤ïýœß‰h\Via
-ë%úÖÏw ŸçG"Üóp&j.›<^¿r%&-  OKWšr]jä¢b?—»žâô¢„¿)ÀšB×Eˆ\2Œ!kŒC!†5Ü0iá ë’€ÍÅ &OnqÂÙÁ
-/Fμh›Å“žºÀ´ZÛôV%x|ÜQµþ/âApË2™ñ.uê&I€Uñx~Ô¨ìkpH¸®À!p¹CY"i‡îÛúz_µÇþ –c±(¿.Käšf°n«™µF ¥qÚÅ"N¹ÇJ
->šŒ
-).)DZû0ɾü³Þ÷W&[Œå59ƒ_å©«øTõ^‡0IÝûYÛ‰ñd°„€ü© ,Vjƒ~ÓD¸-뼊ŒKpñLAæšg¹f(c\V1—÷˜ã+n6–úP&Wt0Æ~ðNõv!8‡ä+Q›rUM}&‡ I¨Ÿžœ‚ÅŒ-¾ã
-At`‚ŽÇöà
-ÍV„¢¨•¡^$bÄŶSîeü,…¨§‹:xHž+6½yé«OÃLÕâ½4)ÄM>•ji_ï³Ñ Wáúu´ðEäXe”“Éz™§Î>ch­
-–2Ÿý¿É}bendstream
+xÚ­ZMsã6½ûWø¶rUÄà‹
+¥¯— ¬µ•ùUf+aÕ–F±¢’BÄU<·ÊA
+W¹Þnûçå‡fÿ²\Õ«M3Ÿ7× ‚-“×r*D©Œ"ј´ÑfªÄ§ÇfÕþʘh†›¥”|ñ¼iW*núaôµõþ†W‹Æ? âÍØbì©ò¡}k7<7{ÿÞ½{¯ßÑÓ¸ñ=¸é"*J¹xóž-˜dºJ—0ÅùR¡ôõRj6FÀüyaË’f—q6wQŠ©Ê÷Ö¢r¥XtýH…¡ñP°Ëh£ Z(³oV‡ýÐö]f8£Šª²v6Üapk¥ö>Žû” ¬Œ¼n‡&3:ç
+Q‰†QñâÄz?£Z‚ŸsùÁ¥RçQ”Ê:£%!{â*ð 0ËZD©ŒT¡ƒezªÇÄ fF@›jëõš<Ò0 uÔöÐ>5T]V]69`upEÂjtE®Ñ9l¢6€%·g”6Ò-£Î €EDá"ÑCâ¯[b*’ŸrE\ò¶ñ¢hUN´{ñ…ã<¿È SH^pŪ9:3`T¢¨L´¥º[çÀnÑÑL°ŽØÎõÆ
+«t0ðópýÀsòWàšH]€k:ãƒ'H-u¡Ä+ã¡ÌøœjÁCÈ©Ó¸©«èË â&qbÜ„7áwWÿî›IÔÍèÉWEp¸76„àÃÃ&T´¾ihöOÍi Yë2T—%̤Ôr
+ÞÏ
+g¬R&q°Âpo$Ƈ¬9=ÑËñL$?­+ Œ¥å³ñ(†á€ð†Â§0ærø*Á%Ÿ>™*/MôœWÅŸ.¥W ùrœ È:ˆs!‡k`§\eB¾u1ä8µ´˜„œÔ] .À–¯—Tê¼µF© Är¡ÅðBj`huˆR%¦T×±G>Õbj²"†)bhÁÚYhÁVZ\ÛjÕ<ŽT97WhöæŠÄV1MPh¦˜EÇ@FÂ?¸ pE'púÜh2Óä|TÙnO¢
+j{Ž[¢|Åy§Rऎp8<®ëñôÌ£JˆAÂ^=Je†Ÿ
+¹=€Êáp·kG*ûÒÕ»vEß~øDµ4ÉÀ@ú=Õîêal|ù_ÀjÏ?n ¼‚‡çà
+öÏm÷@õÇ¡é®&gˆ¼ºó:l|´`€½aÄ©B8ú›ëýOnblzŽ8œ‚¼íijkónohN°"€?3£ÊëNHð`Ô¸¸¦ÂÇ5Q~™¾pŠšÓ~jšÕØS2…<ÑFÃYETf¢Í r£Ôk:hYHŽ–“ê@rqd¬ÛíyÛUÆB¨·¯¸òTê¼íF©¹í.Açz¿F Ìƒ1 ¦ºº¬H”Êh2Y V‚õ¦Ó:5c-£C1˜1fŒÑŒálGÍÊG3ÆgÆPHl*ym[?y{µ _%fîÛY6n—NÝw =Ó¡^k§ ¦z/ºñ2ÞI§“Ü8ïàZ’¸“_¾ƒ¨˜,˜Ðã*0ù)dÌ ]ñ?9î# c«À¾ îÚ¢B œ§¼²ä) ²ój{oîZ¥05Ÿ©°gøÞi!LŸœŒ‚`Ü:ç¤*Z$¨ylöÐÓ ËR2»¸½±bÑ“LÓÕw[/‡V&]Xèù vq÷þ%·NÎO¥n˜7Ì#ÈN6Ù/-ØÂÊ~uvie<.-a¿÷/n0“öTo”…óüÑ'Ø6u—QÌó׶Ø`’7èÛ”éWZ«Y·Éôr½ÂÂ
+«å`­iç§wAê”Â|¶”S"9Øõé’¿F$œy¹‘â2UH¥ÎS…(uô¦Oz9¼t
+’w~.Ú릃n¹©üÜDHM‰'¿ný霒ϑ²yr4°ú¸P¦ p‡Ò¡@Mûr¤ÆìøÛ…CoûÐy˜{·áÝ5zƒ~ׄQö]ôJ;ð*õÃ…/8ñ¢dF¿b ‰ÔKRGKpÀ¹oö§G^[Q]>e†ŸxU!˜•Óñ'LY‰2°:,z¦¬„>2e¬Loøë÷§qy¬@ŽëEüì|_G«p/•&*3·~eYh¼ªNé˜'
+àv+—ú™`+YÒ¹Ÿ6H¹B¾Û…7!m€”Í„ß$+Cx;…¿ã&›NÎ,2Ðd·
+¯A¿}j‚ºtd‚©Y­¦6K©wÎùƒéç4W™DSQH¡ÏoüœÇ؈8¼kÒ”(Ö!>Œ½ïö2OCÌ@f’è3Ǝߥ¼r&ÜE%¼¤R@¤(ÍÏÄv¤½¬á/‡V]ñê²
+Q*£Ã±ZK>UbšÁ óײ.üߟÝÉ`ìä3nNó¢ñJädÂ˾[>©ÜÕj•~‰á4x|ÜRžþ/â3[”ÂTñ5w‡ÄÁuÊx0? ¤«Òhu©Ôy8D)úBÃY"­Ý´í®éã .,Ã4‘¹¬K”Ê(3™·U…µšOµq«‹é›z‡9
+] œŽbÁ7•ñã™ÄO?&§ðFùS3Žñ õ×ã _ô™AJ[#âscTà1b†Èm¨ÿ†ÃY•Ë' GSì.QŠ»&2üx»9¿ø†@d™Öȃ
endobj
1726 0 obj <<
/Type /Page
/Contents 1727 0 R
/Resources 1725 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1724 0 R
+/Parent 1723 0 R
/Annots [ 1729 0 R 1730 0 R ]
>> endobj
1729 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [213.0783 594.2578 261.825 605.0422]
+/Rect [213.0783 507.6843 261.825 518.4687]
/Subtype /Link
/A << /S /GoTo /D (dynamic_update_security) >>
>> endobj
1730 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [398.1622 472.4648 446.9089 484.5244]
+/Rect [398.1622 385.1227 446.9089 397.1824]
/Subtype /Link
/A << /S /GoTo /D (dynamic_update_security) >>
>> endobj
@@ -7504,198 +7517,200 @@ endobj
/D [1726 0 R /XYZ 85.0394 794.5015 null]
>> endobj
490 0 obj <<
-/D [1726 0 R /XYZ 85.0394 221.6017 null]
+/D [1726 0 R /XYZ 85.0394 131.4374 null]
>> endobj
1731 0 obj <<
-/D [1726 0 R /XYZ 85.0394 198.5809 null]
+/D [1726 0 R /XYZ 85.0394 107.8521 null]
>> endobj
1725 0 obj <<
/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F48 1238 0 R /F41 1218 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1735 0 obj <<
-/Length 2993
+/Length 2819
/Filter /FlateDecode
>>
stream
-xÚ­Ër#·ñ®¯`N¦R&Œç
-z5>¢ìŒžn!î—cì눉N”
- Ž÷GlŠ-áÍÔÁÚuA®·¦ˆ8é˜/àäB¢ÑÂv½C([.`ür ¹- “Ë¢ÂA±ijĺõÇ|ؤ†3³‚¥àúÆã²xȸŽ,6qo<2˜¶Jx3åϘçPdŸãt„ˆþd”ŸàÏ{Ò¢ lH9(Kz\{àx”̬|SâJ"ŒŠaxŸ ¡‚¤ùÛ§ãt(*Þä}Ø´%(Ý„ÛÔà6ÁQ½ÚmZÑ!£Û$îâuF¾|
-ñ~lD@þÜÉñ·"èþ—Áu‘[¦´rãè>â'†÷ÓxÿvÊ.Dã
-#!•û“ä\¼Yݺ7o¾Ròíô§)D餎ûa¦¤¸¯YÜn‚BrMš À*š_
-Ш–
-¿£˜ÂÌûú §F7ƒ þ°aIgËqOEûD!(šoÅlÈÖµ±LÙÑÍy.ç5êò¶øä_(H0Ox¦‰·š’ßçüÐçÓßg ¤ª+ÿ;ô7†1-ž-á,7¯÷™”èÈôII§e*>D/A÷ÅÊ@,»2F,u'K-Žr%˜:TJÕ“F¡™ã)\LÛ,7zX–Fq &{š%ˆ5c¥zìj˜±@-Ë$ÑH38‡ÕÄÎJ3iŒ쌡ð¡þ]+ÔôáÞNÉgZÛüÅC f2ž‘7%cº8Å>Ô}VX÷*ö3Â" »¤K D0ò€
-lâÁ4ÓÊÚ®$@{ÁUp0›¡t%3½èk½S3‚*ÅHe2#•\‚¸eDÌЫ/ZœøTÕG¸EÕ<".ÖûaM?¡Œn¨FQÖÄ´Vu]B̆%5fJa§ã£™’‚ÊA]dgÞ‘Ò¢©û¥Ÿ8ð¢C§Mê„KɨŒR™c˜Á@ºtÀÁ>G€aàƒAsˆ‰LR >3s‰€Ðu"vì,ìÅ 0JäqÊÄIZܧƒ§2Ô¥¡l¦½_j‰ ½Ã+˜4U­wê´¥plK–i'Nè”ÿÚÂøókŒk“8 A´
-
-‚«4n¬?}—rœ%R®§:uÇ™v) ¤2ü˜#Álèо *ÒxÞ¥ñÓº¢r›z)Q+ ´ŽZ%o¯±´ÃÉ=˜u½E„]¬D[üQ¶·ž(ÜEõHh´’’¾Å²®‚¹?ôe Ý{?ÞWB’·BØaG´*ˆtKmˆ
-¹2Ùø&¨³š§nInS‘ t¦¦«ŠÍ^ä•Že‘¯ØÞ óé´©˜ȸ\ (UBñ“yaÊeÉ0€ÉŃ^V»öoO/Êqˆ_Z ¬ú.]W¨ßo6
-h"S0Œ[£†ûe ›äÌåGÍ«—X9s©Í1+JŠèŠ‘%eªƒþ¨jÂåæ°Š¨0‰qÖD7<JLö{BŒ¹Kœu¹úœóÐ=ìä8-,Ïr;&Û‰ Œ*ïò;äF&¤Ó£B8v[>øMRF܉Ö+“¾Ó£žÃ´œÀÏY#Äë~…»$r¦ŒÕôž –¦ó£n†ÿfªQ
-NE#œø]~ ”tA&´E2)º2…|Ïëib‹rÇjTONø¸lèSŸ­V”oÝ[E ¿\ûå§0Ì°iíLj»šQæ»Î/LaP«É9€l™qÇÎá¡\E§LÌDUêÔ÷ûb‹Oha.”;Pé- @bq
+xÚµ]sÛ¸ñÝ¿B}:¹!ø$€äÉ—8©o_Îu§Ó¹»Z¢-Ž%R'Jöe:ýïÝÅIÑŽÓkG‹Åb±ß¢˜pø‰‰ÉX楟X¯™áÂLæë>¹ƒ¹'"âÌÒ¬‹õýõÉëÊN<ó™Ì&×·ZŽqçÄäzñó4c’>}÷ã凋¿:;µzz}ñãåéL>ýpñ×s}¼:ûôéìêt&œÓw9û|}~ESY¤ñýÅå{‚xz<AôêüÃùÕùå»óÓ_¯89¿nÏÒ=¯à
+òÛÉÏ¿òÉŽýà gÊ;3y„΄÷r²>ÑF1£•JÕÉßN~j vfÃÒQù ΤÊäˆ
+NšSTùÍ
+`Õt·,XåëjŠíC±%(ò…0â !F䶎(-…‹Ï4“/$⦉KH¯ðÍOójñm:3Âê[‚äÕ4i1í>"Öu>_–U¼ä²¢gUìh
+£p]™<-»øü “xvÅö6Ÿ v–f-zÀŽ†_/ÇlRxÆ3}tØÙC6r^4x¡r½Ù•)…¯ütß ‚ìj‚iÜ~‰À Ý嘰H¥Z € 
+”>…é.¿àîsJ‡cA´s a?O¯%$ZQ°®ÂJBÅ£s„DjÑI°0‘ =QƳ,!-C…„!íž7Å2@_–¹>?±¡\@y3v°CØ¿MjϨ[>ÃÔP’ÑÂH„Ô! ü»r¾_
+’æo¾ s¡ xý“ÿe ñ¤×´¢E&¯™ ·Ø*R|ÿ¶Â[¦´r}MëñÓÍü;Ñþù¢]ø\!9o7îÍ›×J¾ßá%•„⦭$u
+%t+eMHjUÛðˆÈ,.©)·@hŒ:-͘”u‘­yJ³¦ÞoçÅÈg-z?ijU/%‹E”ÊLßq†â â¥õ8FqÍ>¤y0Û ð™±”J BÛUØ¡«€Ø5‰`1qV_RƒqÊÄIZ|H5¤{Ê®lƽ_j‡t½£+5U­w긡0´%Ë´'tL JmLÄøókŒk“8ÚƒnËæ>;¨Uð ^.ƒø¾.w;òÒ$.œì§ˆšœÙ°!
+?®(ÊÛÔF *UuP ¨v*ª:šÜ‚M×kBØ„"tG/Õ~}SD
+·A7Z\¾”ÿè=îö‡
+€î]ÑßSB‚· Ø~iUE  ›Øà•4`bKÕ§F‰·©¾yR‡»ÕF…./ñe‰¯ÐÙˆ¶Ó2hS ~¥ˆ(UB)F“Ô˒U
+–@„Túàö&I¹;mgSzÈê¬Y…-i›uQb&¬bÏŽÙÓŠiücøÿËÝ0‹‚¡“ö¨
+‹;F8ñM^ T´?F”E2)Ú
+%zž—Ó¤Þ&¤U¯”ñpY×£>Y¨(¨ÜÚ?b òóe1¿ÇaFÝjgR¿Õôºç0߶|aŠBZ]™7T‹‡rÜ›2! U©óQßmó5ýs†sXé@8 $Ôð$Ùm±å[<¤Éev`fý]Ü$z†¸œ+.£7òÓ0(6Ëby2Ô\ ·¾»ÐTÙ
+¿‡ù‚·Zý‡?»8|“‚>Ñ99þE…´Rg ™
+…ž;â<}ŸqÌú
endobj
1734 0 obj <<
/Type /Page
/Contents 1735 0 R
/Resources 1733 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1724 0 R
+/Parent 1723 0 R
>> endobj
1736 0 obj <<
/D [1734 0 R /XYZ 56.6929 794.5015 null]
>> endobj
494 0 obj <<
-/D [1734 0 R /XYZ 56.6929 386.3456 null]
+/D [1734 0 R /XYZ 56.6929 291.4983 null]
>> endobj
1737 0 obj <<
-/D [1734 0 R /XYZ 56.6929 358.3341 null]
+/D [1734 0 R /XYZ 56.6929 263.1273 null]
>> endobj
1733 0 obj <<
/Font << /F37 1026 0 R /F22 961 0 R /F21 938 0 R /F41 1218 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1740 0 obj <<
-/Length 2557
+/Length 2567
/Filter /FlateDecode
>>
stream
-xÚÍYÝoÛÈ÷_¡·Ò@ÅÛo’—§\â¤>ôœÔ§
-ærvvvv8ó›™•œ ø“³ÔÆBgf–d&¶BÚÙrs&f·0÷öLžyÇ4rý°8ûîNfYœ9åf‹Õ@V‹4•³EñKôê//ß/.®ÏçÊŠÈÅçsëDôÃåÕk¦düxõîêÍåÛ×/Ï-.ß]1ùúâÍÅõÅÕ«‹ó¹L­„õ*H8±àÍå_/xôöúåO?½¼>ÿuñãÙÅ¢?Ëð¼Rh<Èdz_~³Žý㙈u–ÚÙ¼ˆXf™šmΌձ5Zw”õÙÏgëfié”ý¬Nc›ªd€JMÐf±ÓJ“Û;'’.j>5­ßü©Á·$*ü*߯[žÚåÕ­gúo|Á£Mþ‰'o‚¨¶®™Ðlòõši«zÇ´ö®l˜´Ýï¶uãÿ oJGyUt yØ·×m @ØÌEþž5¡má3€-æRÆ™µŠ¶¼ÃE$Ó€Ú嚸À$r`çbm4Z—Tù0×ÐpZÇR¹,p±ú&ڧѾªÊêöž W×D•,Þ6z(Ù&Ê÷m½ÉÛr ¶ùĤ›°0ßn×åAg8à—*«DÄFØ?ª³L#¿®óÂ1Ymn„Ž…Pcã]ÂÐJÒ:|újYïw9ÙßÛšŸËºú',¾Ý³à u¥±*QAðšù½™ï‹í|[ïÚfBóTÄÎ%6,@·˜0‚ˆ…³f(Ô}…PøßÀÎ˲Eûã1špv=yÐ' VȧœÍµÔ±VIÒŽñ¨Ù¯²,}E; ^¬y-y¼²³ã ˆ¤çM]å7ݲ*üÖÿªeŠ¸ê ¿±ÏáÚ 'ŽChÂè&H©ovD[‚ÿÕU÷“ÆÒ¤ŒWuë¿ÞÔ²t@¥¨Þú-É×L8|x"3ñ79婃-”}ÊmUœ%i`âkX8>¶l€»ò¦l™ÂFtð ïŠŸM½ r @w•éè býoùf»¢/ªd1#ì8>\]þã[„lø%Ä3ŒªºåÄsý0ut…Ö5úéˆUÂ%£³#ºtûµwõ¾Û‰lˆnûí®¼”#<mÏeTóÌB,4\û&ŒÀé+I¡ ˜H ]®Â™÷Ë;¶Žt2Öàå#ãZÙƒ'keÀk—ë}Áhaá©!¨lÔlý²Dÿañb~œ,|ë—­/€&y¶ñ-OágEÂǽß}bi
-i êpÖò2ÅjjÕë e2Håi’Ìö¨Y•f¿ELÌ™Fˆ@ÎOB*šƒTXP~j
-ô¿ød G¨µpú£ *I¸ƒÂF­ªÂä D:@OßøeÎð
-Sü•÷ ƒ¶è*B`kòMàé †eØ"p¹îP¢+©aŽ“ PnÏd;øe€
-“
-´3ÙuǾ[~î`4FÕ~sãw\²ZNˆ Ý°…zÔ$ÚM·Øi>äâQNtˆ=×é(ª h!4ØñQz® %†Ö• ô÷PµXptRf щfîh!(OZp5Ö‰[gÈuÚ:=Wï-½e¹adØ I3ý¸=ׄ#û€I"ÜXçÚÇ$B‡ô„}\ا㚰Ï~[ä­‡Œâw÷ùŽ¤Þ_Xý¸:=ׄ>CC)•Å& )ôG ÕNÉ8q©ùª« ÝL†mêÔÕ
-äx`&O¡j@%©kìºydÞÒ††˜Î·N ÏÕ¥,d¯™Bº áxl>¡K^? cŽ‡ü6À”7UÁÂlB½ÝŽPý–` ¼ 2¹·-˜ÜŸà‹85Y;Pk6Œ„熱Í\6›.aŸú
-j¨ç¾‰¬ÄÅ.Qîwœ´[q
-F”¶ÿé0¢²zû-QDY§ÿ ~C MÄ©p))üsMEªä.@§"Gˆ%é
->ð@ í˜RÔ>ðSùŽîaº¨#ŠoÃUBn°ˆÊõ,ïÐA¾ô@/r1ÔÔKŒ÷á?߆=ÃOü<¯ùÿèœ4¿ç¤aÅ©ø:³+ýD|ÈÌÅ•ô· iU¬L¦¿}„ %?"Òf±3pˆxψœ¯›z"… Ô]¯ÔB{Ó¬â=¥ÏÇó(´YÚô-\M3NѸ»3…hƒfó‰ä ¾"twCq:<†_øyNóíÃcì‡
-¹Ç r)@m$ðGNéâ+!¢ÔUhAt)I_úÌék#ˆJeùªH;Ýå 6t+›Mx§ Rxn×9ašs|méð~tYžKÀÌ6o=“>“&ÄÔ+A¯Œ´0àÛL¬ËMÙ†Ù:lŠì›z_FºöÄu^ð.tÏ9u/rØ“únV™Z‚ã‹Nþ
+xÚµY_sÛF÷§ÐÛÑ3§íþ'Ù<¥‰“s§ur®2s3m(‘²9•HE$íúnî»°
+•¦z²>³Îgé)«³_Îþ¹8˜ KÇüçL"\¢ãj=æ@—
+o´ ,«¶Ø.³Eû‚½– ~]”Ýeå*›¯Š¿ãAJp±· %Tٺșk¨Îë¤çº/W+RÑ5éhoYé¢ÞnÏUͦ®ò²º¡ùæ¡i‹5±äÅ2ëV-Ml³ê¦xã$Žj²½/0~˨dž}eÛ ™“©Ò©0Ò&0R"uN ëûŠÎ–u5ßÓ¦ìpër2ÕZèD§a ÈžÞÙi—o¦›z ò§^Êè?ô fÒPImiä3î ÿû&Ø#í2ýëdh0Vh“Wu[|>µÚGëìfd5þJèhpô54ž3­é–Èú›”zQU»z ú* "nXâ²Þ2±è¶eûp®”Š Álb£·4•My®@ D3—ÿ.ú¹MQ嬻®è{—m˺câ&›Ž9p  AÝ`DXÍ; “F÷ ¬Šm¶B³‘Lû^Ôë5¨#Ž’W,êªÍÊŠ~d-M®Š¬áyåMbiÈG… ¿IÈA&ÏK¢¦Q½¤YpXÐXo€Q ÜŠgÂjVMM£öTì0òFyN¿¡R¦8N~[TD„ÈÊi´Îhr΢ں&B³ÎBâ
+ïcÇ 0,Fœ …ôÎ…úõ¼ øü¼( l` o‡BF v˜ãl¿KÀ@e„Ñq|˜Ncp†e`
+kRÓ‚,\W`¸*AÐW4Â& ”].yÏÝâ–û¯„(?p 4Úí#ÙhèüªÅªË - WªˆÊIÍئX”?ÄaC• &s¨·‹¶È± ÑlS´4…ÇŠ„¯]±} R°
+Ôø„7kèÐÈpQì/ðȼ
+¡ôšš««P¦½&J° Ç:ðvèÍ Hòê3Üä+À27Ö´âKz¸>…‘гÅxëÝ°LºÎæDÞíàQžÚ4Ìš SáuÙ…iìRŸN¦û?•¼:õš<îý[ÈŠ½ð1ÄÞËwÚ¯8…#)^C ðŸ†åbaµÖßF”‚~<Iô·‡‘¡ä'`Di‡ºƒþR‡ÖTQïoA(EÃðn‡ƒ‚y ‹¶DÉë‚ùCÓŽº¹ôy(EËï1?[*u±¤¡/ü±ƒ
+üI7òZÑÔ Ìø?ð¿¢å,=•!ƒC~]Øü_Äá;YbÇê¿Üã«ÿ
+ºy 3ŒŽÃç8éE¢Óš-²Ð×>=öìîÏ¥Ì50ý9”©
+endstream
endobj
1739 0 obj <<
/Type /Page
/Contents 1740 0 R
/Resources 1738 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1724 0 R
+/Parent 1723 0 R
>> endobj
1741 0 obj <<
/D [1739 0 R /XYZ 85.0394 794.5015 null]
>> endobj
-498 0 obj <<
-/D [1739 0 R /XYZ 85.0394 116.8816 null]
->> endobj
-1371 0 obj <<
-/D [1739 0 R /XYZ 85.0394 95.2452 null]
->> endobj
1738 0 obj <<
/Font << /F37 1026 0 R /F22 961 0 R /F21 938 0 R /F41 1218 0 R /F62 1361 0 R /F63 1364 0 R >>
/XObject << /Im2 1350 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1744 0 obj <<
-/Length 3662
+/Length 3435
/Filter /FlateDecode
>>
stream
-xÚÝZK“㶾ϯ˜[4U‚' ×ö®3®x×Ù”+±} $Έe‰‹ÒŽ'¿>Ý襙­RåÒ Ð¯Ÿº–ðS×.YÐá:V8©Üõr{%¯`ì»+Å4óD4R}}wõ×w&¿"d:»¾»Ìå…ô^]ß­~žeB‹˜AξùðþÝíwÿüøæ&·³»ÛïoæÚÉÙ»Û¿¿¥ÖwßüðÛ7såš}ó·7?Þ½ýHCÏñõíûo©'Ðã̤ß¾{ûñíûoÞÞüz÷ýÕÛ»n/Ãý*ip#¿_ýü«¼^Á¶¿¿’ÂﮟàE
-‚¾Þ^Yg„³Æ¤žÍÕ§«tFã§Sò³Î §m’ÔÂç~ZÈJäJMn•È´é…¬Õ”
-¹Ø´Í¼nöÕýóñ†•t"Ø<¿N{²xG5±º¬®”'«[þ"¥®Ëöfn´ŸøÈg›fQl¨kSµ{j5÷4zû#¯V»ågeÛÒ÷9“øY]lKjµåîs¹ãáýºà¹
-ú’_@DЖ5¼ÿpwûî_ÔÞÂ
-Ŭò¹žë Œ6®DpŽ ú´.ë‚
-lB¹ÐJæ¼R1ˆP·j Ž5›’H
-8d®Û’û
-iÄÝMÐ3 8üMµi¬â2 öu\@;rBš‘haXqÒZ¥b)ЄÁ”íÑœV4;/÷´ÆlqÉ¢„bá'’¤Ú¾´”Êê”ù 5©ØDñ&²+õ™$[gÂ…”­M¢þ®9då™%å¸k¥fÑ%ÂBU½/ÑSÂIðHÔyɵ6$éƒL¸"ŠÄl¿w©8?ÄîÇDז˦^EØ(Êï¤Þ¹#w:iÖ´ìqà…”>çбžj…øFJã±”¶'‹½ÙPh`Rµ|žÐúôá wÅCT2±³ß›”Rq¤jÛC,•!û©Ó
-Nx¯ò/;¯LËaAæì%U uÇvZš‰ãÝA«`QZ#T¡™òöh·ûzwûs2$´H$ »‡E³_'¯Áv ?ö ?c-wTzmϺ鄳>\vCªóî £:tEE•‘/
-m­©4- V¸¡
-[|(ñ£§†+,Ãûo¨#¥µ_Mù1“ lŠ;€90ðL”-²K¤¨1Sz!¼ ©@ÙÏ7©àC]§`˜*”=ªßMÃ.€½ì:s–ǸSÂeþÄÆ:ÏIÃGêI#¬C~àó.Ì =We,)ÔLÞù圀â'^‡‘ =Ú—Qx(~p&,éên,›³çéŒV]ÀA±½‰ÛŠ×ùìÛ÷Ÿ¨‡#ê¡ö²lè6tY{Ó*}’DOc«©=iÐ?àß¾AXÕ]€=Ëߘ÷¢¥cNÁR¦ÁÉÚ£Rà)ïZåÇ·ÁÔYðó±iÛj±aRˆ§ËHLâPc0øZÔC”«LºÕªxõmÓç9Dªø¯7*¾ÓÓf¶ˆé¡Ê»š:fœÐjxZ®Ø@ëƒSG>ý™J´Ò¦Øƒ;Ž—ÓS´'ä/6)_Åû-m9cÄþx2…AØ"MçÊaÌ‹?˜˜êÇr0fEŽ:›ú©èïæ!Î:£ê&°ÖEÌçO#aJ)¦Äo‚¾ƒV§—˜.µôäÐ\šTã
-[°±`ÊÑ…#Œ’þ7 ¦F÷E£Efò3%#S¥%6“ÚØ£¿QxcØ•œ¾És'}˜ÛÜBDNú\s:‹4Ù‘’¤s<›@£Â $z&ŽÛÇ2&RÐ<<â“ã|ìþS¨^rg< ü ´äÿ¡éÊè¢(öœÖ‡wdGdã3|Ö¬ªßnÙ+]¨7Åj¬´ƒ¡eºŠoŸ!,ÚžW £„rò…û¬!ÕJTcÁO]8
-HÖÚ}›
-±kÁ”'¨}¿cs%êõqP6¨5rÿðH‰ 5Û&9àþþŠ-væ`›ãEFà-‡!œB§pNÚ‚¶g*n=e­EÈólàŒ|•?
-çUï-tÎÞoöDÇVŠ=”ÒG~a°¤b¿€Dñ/¬Cn†‡ˆüf¥G‡xæ?éÆ ü#ù„‚ÈNÏÿçÿ«÷æ·¹€ÐÓª¦sÐHoLb
-eŸËSó"1´Ò¬ÿíNBvendstream
+xÚÝZÝsÛ6÷_¡·£f*Ÿ$ø˜6NÏ«ÓK|Ó¹kû@K´Å‰D*"×ýëo» H‰rÒëÃÍt<c€À»Xüö€ÔLŸš¹T¤¹ÎgYn…“ÊÍ–Û+9{„¾ï®Ó,"ÑbHõÍÝÕ×oL6ËEžêtv÷0˜Ë 齚ݭ~NR¡ÅfÉ·ooßÜ|÷¯w¯æ™MînÞÞÎÚÉäÍÍ?®©öÝ»W?üðêÝ|¡¼SÉ·õãÝõ;êJyŽonn_SKNÅ…Iß]¿¹~w}ûíõü׻ﯮïúµ ׫¤Á…|¼úùW9[Á²¿¿’ÂäÞÍžàC
+•çz¶½²Îg‰-›«÷Wÿì'ô†¡Súëi@6a¤S_ÄVi‘çÎN³•°J¤©²—ç¢qæâj1žê¸½iž gŽ»«õL)‘;§q{S-L¦ÒYælyJÛ{‹
+”¹p©UH¨$Ì¢Að@ñv¾HUrÿur¶0§Ìt’)áFγ3%¤ÍsC4ƒzXéQ¡áë›­ž½n`=³Á’⼋ÁÄaI©
+DÈ*>Mƒ¼ïË0”ù¤Ø´ ­.5ƒAVÁê
+€9bþÏ¡y AeÒÕ„‡© âÓÞèTdà7¤”Éšº$'p7WJ%aƒÊ};
+S$ú² å
+p ÂÒƒ|Î%ër³ãjʲn½Z±´ 5XyU2uX{èe2”…ûžªÍ†jÕòÚ ¯Qµ0ó# *€–Xlº5ÐòÅ”i¿ ¦Xl`Jtq Wm6Ù5ûŽjÛâ™*÷%•í®\VQT%6<UÈke±\³‹™–
+OIRG|Ž W§Eêòl¬¸d0˜rUVS#³/ŠÃ&’>P#$g q™'7ÔÃΡR/´vé—*"ÓR1-Ù<Î\µÄò±úT²lUMMÅOˆ¿ØcdVuÎKƒÿqýµ}¶`÷_Ñ´s&,bK¨ÚW«’ôi”CéØ\Pa*È„V2¦&}80V Ô!pJ#9$NI‰i½×ÉOkT‡±rR >6“ùP éeõ§ yÆŒFaf©)úB¥k¦ØZC¦OÄ&ø€Ê ñŽÞ-5ì `ÒàØ­<qì¤u KÒ:£8ø5g€
+ŽsÑ\I’Õ_†ELÛõ‹89{'¨ÁPªÜ¾:Æ héãÔv‰_Í>J[01î l¨Í=åØÖ[~TíqAà¼à< éïHåv×qnÁ¦µ_`GkÎ4b@Å:®=Ú² PG½º˜~Xi¨»pZëÓ!Õåô£§BÑ·Åo‹˜ýàž/ºj[.ªú,qpFò/ËÁ4bŒ0§1—NGrÜÔ÷2b¼ô6Z Ô†i¨7}r¨ëáa÷¦©CÐGÒà=©öÍc<©Ÿi䶪]ÉÍŒ$Oq& )÷ÛjA{œU8ìLrušo½³£ÌK¥%Uz– šªk8µ´Ûãé`/ªíaKŸŠÍ¡Ϭ=³-ž³ZiN8¾Œ$“a|ôŸAÒ€ê$EªI$U«Í$’l&<$­/KÒSMˆ2F“Y®üX–#šT&5F“Bt| $)ŒçTî‚ìÍã1ÀVrt=²T,åPéà \ªO¢ƒK€KÁqVð?‚+½„-uÄÖÿ Z&w¸êeh ©.C«§ºì¤šCwî¥R¡T®^¥§še„-8´Ã Ý…y{è\²w>Câ1`pz…Ï¡«Âï €„½U ¦\/Ô*B˜
+µ~{áƒ3!¨ÝGVC@å ×økz+¹n*3ûH ¨^€T¤ºì­&!ed?Ÿ¥§še쮼0º…9BÊÈ)#åÈ_IuôWR‘¿‚rÂ_ÁÀà¯dÄ þJ¶æˆ!îa% ^a«„–Š ¼Ø`0É_ÄgÁª¬6Ùg
+eÓ—£Á€èr0ˆD'Z®èFe
+ùÑþCËÑdñ… š,t“ÕÁ8–‡=mwØæ0 ‡Ã9‰‚cÔYìó°ˆÞ<ŒïOBá"zÂU9”!ÓâVÛJ(­BêŽ:([2ýÅ'öᡯÿ2Þ ?§bÕ?ÏwS@ÎA °]3¿¸jì‡UO„‘‘Dä©Ygþ<€§uÃþá&.C=lmîÌØZ%u:ÚZ75^üS¬Òtc;
+Qñžd9 Q–žîÆm§á,¿à0ŽË½ìŠ6fžôÅhûWÀKWÃ^8PÉóƒ™Íü‰B.8e2!Ýgž D—I$¾†ôü¡Ùo‹óóŠv0‚ÑKôDç"ŒK)Ò̦#è¹Zånx<ÁÏ%†o¬Üs?íÖx; §†*+¼z÷ ¯¦'¥Uµ_MÅ.Âç6æ Çx‚ &.‘-l¯S§?\8±áe/¥ñ„ÄóMšÄM×›…~LMƒ§á÷np9xÊ^  yŠ8%\êϼ«óœ„d!e¤–ØÃÖã0ëSÛ@ÐP¹*Ã5BÍä},Îx ˜—øFaód]Fá¦øÁž°j¤G”»±n.îa´ê“ ÊçMXVxrÌ’×·ï©…³j 鶲lè4üÔ¡o¯¨4$ªžúVSkÒ`{ ¿ýBdäªþÑkW,?°ìá7À1œ½)AŸùà;ÈÄ[ïPv­²Ó`j,¸Ü5m[Ýo˜òå†û©`‰IjL
+ë‡*æý§ž|Ê(¦Ôor!}­Þ.ñˆÔRÉé¸4­†Ô– £þ
+•ö‡åÁ+ô…_‰'ðg›1_ö¿ŒüÓ¿ =þøÍfÂx!{ÐbY“°P¸‚Lž'LR€6ô„èÿ=?}endstream
endobj
1743 0 obj <<
/Type /Page
/Contents 1744 0 R
/Resources 1742 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1724 0 R
+/Parent 1723 0 R
>> endobj
1745 0 obj <<
/D [1743 0 R /XYZ 56.6929 794.5015 null]
>> endobj
+498 0 obj <<
+/D [1743 0 R /XYZ 56.6929 676.1712 null]
+>> endobj
+1371 0 obj <<
+/D [1743 0 R /XYZ 56.6929 654.351 null]
+>> endobj
1742 0 obj <<
-/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F41 1218 0 R >>
+/Font << /F37 1026 0 R /F22 961 0 R /F62 1361 0 R /F63 1364 0 R /F21 938 0 R >>
+/XObject << /Im2 1350 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1748 0 obj <<
-/Length 2725
+/Length 3130
/Filter /FlateDecode
>>
stream
-xÚÝ]oÛ8ò=¿Âo§
-,O”–…VR¦‘ÅÉo'ÿÞmØ› KÇø§¥+´v„‚÷ÈÀÊL¬ö…‘Bv›rÕΫM›¯«Í)wY¾jñV°VôÖZ]h caѲ|8Í¥ÙM…­Ìš»j³©g³jEãMlKšN[·ÕãÒ²­Û>Ú¶­WŸi¨»­"ýå -Œdìh!XÉÂ(Ÿ0×·›²­"ms:müˆ\WX¥'9ç…×Z„õ‘ðÃc$¼š1:ÓveW-«UW+˜™µÜ†s;®)ïc¾ãNÈVŸÄçf»™Vû4p-
-/Ô3Dì°ž¡‚k[x¦_Fƾ4׬s‘k³ª«6ËzU8ɲûÛzzK࢙– yVÎfaתMhõbAJah›íjFØ]CCîAׯ?0mV«jÚÕ :>´+8HÆðÉ·m…{iG{A;¯º@€5D-ÎÆqqI½J´hÄ;`ÞVDiÓæFJ•]t4Q.ÚxÖ€'ƒµÀS<iûñ‚pLA¯ÂÅXº™Ê’è1Y³ÆË—‹ÅõãÞ6ûø欛M÷ŠÆl6o6|“Ñqóxê- ~ÙV›šÈ6gÂâû2 ÎÒ~³‡U¹¬§4¿]Ï@uZ䇀KÍ eÕtÛ$m ÔbŒ6—ÛE×R/<˜Ö›ö¡­$¿ d4‹E ÆîÊŶ"0‰‚$^
-:¹ðÜ‹¡È“¥}f®bç¦
-nBH±¯|(ÒdõœZ7mi ]WÓúc¢B¦I¦"ÓÂ\²Ý´d,NŒû ÉDa„ÞóDÏš=Á¸ˆkHŸà€’ì˜ «ò*2ÄŠÂ ³g”n¶øŽ\gÓ9È y`x`ìÇù’ºÉßÕÕ}DØBšù+p g’gFðêÕt±‘w†árT( ö_Ë^0aÔ¾ûL2A‡r~È‚ûº»EÉÅ(lüi”-¬f‰ÍáƇ' ÏgµÍfd8Õˆ ü݇Yo"Ò 8¬?‰¶>
-ŽÇ„ãhJÔC:òt‰¢’.IR„wá8FDÂ9$bølà±%Ø>g膭EjªÍª ‘•5Ï&û1=ö1~Á–tÐÉ5ÃÈ¢†Pv±Vc2 3Ö}­62-™—õ¢Dƒáq¯øx•Œ5ä9²:ºl¯
-çå^öüâèHÚ»­£€ñ{Ò;*1’¶ßÅ;:,¨¯°qaôO:G)}ÁÖ9*X ½–ßÕ;J£!pàò¸ÇþÖGü£t
-Ð$] :ÉXö€§ÙRgÖ`Ë£ëc˜Ñc‰I>
-2ÎÞTÑ;£$héǾ4HCÛ¶¢’Í.ß__¼ý.Žòs(’#S½&†õ^Ĥz/N¥z¯qTï5)­Àcå]ã—9«²ñ’¯·-Äã@0÷£ßÝð[¤b¯h†Oi3,ðNå6|—“Š
-’Ð2±,:æF€ ˆ=Í òL¢0B‹öø½¤StVøÀËóà¸^Ý7tCÝ¡ñâ"W?û]Éòb&ÓõK¾¸w(ù"K¾¹Ô*wapZÆhØ€Á´Ü+Çh¬_ò }¬‘ÇØŽšam7àl†3TìŪoˆ¨íU}iÓ·nÁFje^ÎæÙÁçRÚWÙ©ïØÇY‰©µæC†¼¨4û‚ï‹JÅß»ÄË•…¼Wª¿i‰\½eÌ=—Är r ¾oëÁ?1ÿ2ØÇ䯜‚œÿëúnï‰ÿ~å]Uxf0ÇQ ©~4’`“äR¾ùç6¿EB­tNŒGÂ’È&¼H Q›$_fù>‡w?ÌIh=âÿÝSÿàendstream
+xÚÅZßsÛ6~÷_¡·“f"
+¾Þ·'¤ãHj‘^Þ¾£Ùh@i$† 8 Ò2;Xu‚i%Ü¥Ñô&D=6!jõLˆÈÙ„h™5î<eß„ˆôŒ ±å€YkÔðæÿë6uwè7å/ñû¾hÚ&(?‹?EãÇè Ãû/7Ð4×|*×^îŠþš«}S,#ROÁ¢¢©Î‚©ã-Øm:fÁ1\¯È¤ú>§…¸iÇò-ìQ]ÐÂ@5ÔÂ-Ûì¼jN”11‘M3s™‹Žj„Á‰Œ¬Ù–°e¤NPF%2¾C)îœ:¬‹Ôêé¢ë:]¤÷œ.ÒЧ<ѽÁû;ï4œpÀJgC¾rïÕÄ_&¦9?îËÇ¢â&/»©Û‚ûU¾ñ­¦Ø‘[„‡&G­2䬯TÙA©²3J¥´Ž¬‘Ԙώ2kMbñY¨
+›À.û›*Ž>ÒxZ?’R.—¤a4^ûgÎÓaiÏ¿ŠKn|ó™Éö ‡/j9D9âš%±‰`„aØ­ÑY Ü>ìX¸ÄÛŠwßb›±h2´(Ïøé61‚_c¿MÓæ€iìY™d
+©z©ûTç}dGÕ—˹ÞïÅ©‹TQ¦ô LtT/p!e"ù<6Žµ R³iꥶ,Úb·)a4°L¸§‡rñÀÍÅrš/—¬òM cLŒ½Ó¤§÷¹ nkºùø¨¹uûö#7`ÆU±hËš.`Í82ÿ¦pYÊká¹*ZÇšÎÄýlðÉŽ9ÿÊÁÿ'™SoGÉ
+ú~m;ýéÛ<²­wí+ b°ÓU½Лƒø]xaήd¶ÍaO¼ü”;ÂeXoù —U.x~¿]Ât’‡Â¡VLRÕíð$Áw tñ‘Rî¹ SÎûЃƒgnãò[FÇõÚ1‚±€fhÕ£&«Zûfï…¥Øã¹=|c¨—Šý‹Rð/39e¢ú€ë\å ÿÎ/Jéźnæc÷„(‘¤€j¢£¶ßŽnEEñ_YÜ>8
+šKD´Ù‡5óí¶Èw<ZV~Ÿ¿Öpí˜ÖþG3â#ci¢Dš€ÃNý4ï,ÿÔÜ´PÁ³úñ¤S‚ã(C.uNN~q {ƒ0+ß¹+L(d²GÆGZ›i¹bBŽ»@V6<
+‘Ý!Ã`Í÷áDâói10@`êûùœ»ËâÉì˜ Ìø¢f2S󙉢¬÷KFg ç£JP_* eô1|@Сӣ°ì©lÊ^ª|ʉ¶‘MD³;ñéÎ
+Q¡²Ûz7²vMM˜sò]GØ,²w
+O³.]Œ‘e]xz‚:×höÛ-Ù¦†êø‘¢mÙôÐagM£lS¼>;{tV39Þ¯A Ç@–¢ˆÅL‰éoô˜:ÑAY$N¶û·üuŠƒ4,2™ˆ'óCUøëÔ©\D“sØaŠSž«±»FòO9ÁŨº£:ãÅææD' ^1X­¿Ãi`¨FhÄmu|ÄIWÝi8YG+ÃæÄDReò‹¼0ð9M»*î«Cijë‹Hž¶|ÍŠC:?$¦m
+_ÏôÙ5¤š³)
+Å&¯¬òrÝx¦«åÆ"úÉtðØHæ$mÛl1‹“ñBË!Rl;Ì-½šÁž…HåÌEÈ¿"SªÄÙxºðÆ9ˆ”´%N÷D*ú&²ôoÅH…˜ âü_€dé (‰ød–íàÆ}_Óg‚zÏ%•Ã„ô
+Ÿf[ѵÇI¤‘”]|^ Gܧ:ÒR«!89ÆÇÁ ®Ò
+Û'6 §œ*«¿×ž ŽÙ€ó]Mù8…°E*4Œx¡ÜÛ§º EêÔ]Žoèê ]ý%f:ªnŠ„äÈèÔ ÙùÉ}×Nƒ“H³J¥i_¥Ò¬§R O×~~Í}xJ¸ˆJß¿dlb¼WÊáÙ–+9iÚ/Òx=Vå‡ÕX¡ÌPªzì㧆Ê]ªq¾
+ÚƲ4݉¹ÕÓñŠ¯ÉèLJïpô£ŸÝbúEW¬Žjfc¿4£’P<š)‹.@þê_¡~¢§mØWãN !!€ÙšgŠx·ò˜ó„üaý/´5ݲendstream
endobj
1747 0 obj <<
/Type /Page
/Contents 1748 0 R
/Resources 1746 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1724 0 R
+/Parent 1723 0 R
>> endobj
1749 0 obj <<
/D [1747 0 R /XYZ 85.0394 794.5015 null]
>> endobj
1746 0 obj <<
-/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F62 1361 0 R /F63 1364 0 R >>
+/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F41 1218 0 R /F62 1361 0 R /F63 1364 0 R >>
/XObject << /Im2 1350 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1752 0 obj <<
-/Length 3066
+/Length 3275
/Filter /FlateDecode
>>
stream
-xÚ¥ZÝsÛF÷_¡·Ê3ûÉåå)M\:©“³Ý§^(‰¶9‘HU¤¬¨ûßX`)’¢ìäÒL‡Ë%vÅÇÀÊbÃ?116²©L'Iª# 3Y¬/âÉ|{w!˜fˆf]ªŸî.þñV%“4J­´“»ûÎ^.Š“»åïSÉèvˆ§o>^¿}ÿî·›×—‰žÞ½ÿx}9“&ž¾}ÿáŠFïn^ÿúëë›Ë™pFLßüëõ§»«údyŸÞ_ÿL3)=ÎlzsõöêæêúÍÕåw¿\\ݵgéžWÄ
-òçÅïÄ“%û—‹8R©3“=¼Ä‘HS9Y_h£"£•
-3«‹Û‹·v¾ú¥cúÓÆEFj šÔ‘R挖E”D‰NÖ¶J–bLÉL„:.«¦¸?Ìêj·]ä³';<´Pq䌞t6>áhN¹Ëw¡Lä”Q=öŠÏ9²H*á<èñ©ŒLÝÝÙ‚þ¤
-Ô?’细Ùf³*òš^šŠž´%×y]g¢Î˦Oûþ¨…¶Z.·—ÂMaA^G#rÏ„‘4
-,¡\$u’´Ž,läÀ=ã8žþöó'ÚïSµe^Šº©qC8ÄL&à-šb`WƒUôl·ÜÌ6@]?I"m]ÚÿT,9ë$dOU±|iO{j¡¿vO/¥ý&)gR¥Ó¬\ŽY_è¼ÏïîÒ(IcËKêM¾ ó*;Íè± ãÈL«{š»j¯ò™²&JÓ<Xˆ(5Fcn&¥  S¶L‘~Ø<f öÅjEtóœf@/¼Gµ¥'8‘?e¼ú7z×"'Šû°¼ 8-€›ŠÕô6χ‘«µŠ’ÂÂZ%6–ôqû0¡ÁMiý¬»à4ŽO÷EeÝ拦¨JŽýýLŒˆ#мì‰4fLõ‚ άø*%£Í«øÕžù1çø}ÊŠU6_ñkP0~¡¸¦—eÞäÛuQæKÔ®€<ãÕ_ò/Ùz³ÊböEó8àp_­VÕ¾(èuQ•ÿ‰cù°Ûf^;Þqu××!Ü•ˆ´„X ¤™Àø›Û¬|Èi¨db ­1ʼ¢ñ_ é9òiu·Õ€Iñ«§™E‡‚X L18…÷R%[ +)|ÔáÎqç wqþÞÛ¢Z ƒHÀµ\p©ÌÖùrD ÚYÅT–ÈÃ9%½WeÞÎÛÑËp´#Î{µÔÿ¼„t,‚î‘ S~W)ü÷#‰÷Õ‰Iú6@%‹~^Ñ´ˆüÏc!Uè¼Ç² š9T…“~=°Ãí‚jÆñW¸È%Pž}þv¶]d± Œe
-¸'´ú©i
-Y´Mgͬ"ЖaªÖm<ŸÅcUÕ‡ÀÍC,Ì>Þa º$Ï…ò%–ik0´kBcaBÑ®3Á
-÷¼QºTçÒRyɲ&;c”“ͳŒÑãQ îÙcLÊLEÇ(ðBé–ÆÞ,iìEdÒ|]aS…ã&¬oAÀïÅ_ÁñôRòÈçh4x5š‚
-,IóÍFF
-ùðj7WMe”8+7kHd cl«ÿôXÀÐã><çÒƒª“‘'ô­ïïiŽ•Ñ]¥K8³¹UÕLUñÀlh xIwï‚yç_GYž–GQŽ›·8 rØÀ‚’XjÃ57Œî¡¼òÔŠ•AgÙp–%€F|·åÑ*÷½µŸ Ûið¸ZC‚Šž€÷7ÖôòóõíqU± ús˜îð2£ž *,UÓ©1sn£q˜Ûr÷àûmë ðûb·Uþþç2zì3¦ñùÂrš Ì·!{ 9G@—4˜ˆY,‰ÁL{ á™k V4YüÛ ýÀ…EeC¿gPÓÜ,§!_)V'Po³¢æ¾—ÓM'§Û¯0bˆí–¸¶-q-¥#,z«Šé×tµ…òè¡Oéý}ÄÕoè c+jô'p-º2L[¾8åæZŒ‰¹Ó„¹6âö˜Kû
- ÒIF
-äTG‰JR
-¥À+‹U^ù&P÷ÇR=Ï7ðÜgi§lŸ/WµI·!L¦ån=§"3៓VBÿÒ„eÇr4a@ƒn“nýâïÍ`´¨J°AGÙ
+xÚ¥Z_sÛ8ϧðÛ935—ÿE]ŸºmÚëÎnÚK³O{û ÛJ¢©my-9ÞìÍ}÷P–m9ÍNÛ™ˆ"A
+m¼0 Ö=%\ž»Qærá6Ñ€³E±mÊˉ1v\oèY­ðiÆÅ
+×\T‹Ï…õʃhœ^,õn²ªÛêû"AR–ÇÄ$+ÚZoª†Ä5mÑ–ËrÕòkÙò@ûP( ¬2÷‰)Éž4õv3+TðFxSߥ5‚âÔø«^•Í+h;;žnY‡-}„fyv4QJäÎéÈe
+ÓY×åfSÍçåŠßã3ôº.7—*Œ'(‚ 6‡#U¹£)Ó¢A{ààô‰žÕj¶ØΫÕ=½¶Ðœ3gýËm!s™¨{vGþ»ª}¨xÖkdB[0Â5âòN…i+d–'a°ò­T"xg™$c×YÚî颞}%/ŒÊ•Y½ú”ú~»)ÚªæQìYÀ¡;òÔΤüæ%®jBDž0ìªüÜ?­Ïò¢yxq3Í8d5IÚMÀBKúÝÙ\ö# z临ͣ…®{6tÞªhh)œÑÉП.'è€ðWO ,x‘£=¼u”ŒþËÙ<7DÓkÇ•î-;~ø¸Ô£w5¬gÔ_óôÇùþf+ îj¬y— dˆ
+©xŽrãˆ>ká„¢f±šS£dšEUn¨g^—LžAf»^£Z87ÜS¶mt2|‰g)ö’‘„ù|S6ÌéîÒH>͸å}G¸}û™\©©g—ZŽ¿âD3Pêä
+f„çO׬$ŠžŒ»4½S ZHèŒ4ã/ey‚qÖ`þy±†(«lLˆipsÏã¦çÇý¤?áÔ‘OùÆ(QÎ8ìƒr|ÞOð¤K–ûžI©ŸW$AÒ—ó¦Mëäøõî(G)‹jQLüš Œ#ä×ô2/Ûr³¬Vå­« Ž‰æ‡‘òÏb¹^” 1˜´I¸«1'§´q )Š×öÏ:¸»QàkYv$DÕñé±)V÷%5Î| ¦wθ×Ôþßë¡Ð8àA}¶0I¾>á°›Eô(HÄÑV­"žR£; ­¢×a9öìqû w±ÿ.îE½ÊY!øBÜN¸´*–å|@‰yð†©È-Qº%Jˆ5¼ÇÒ ¯e ¨Ã~±?š¥ù'd.P½²í‘ CŽ›þ½"0Ñpmæ²Ã=@#«Ã¸bi¿ˆ5ŽL}D7x(Úà6CA˜ãÛ‹&ØL3Œ¿*@VåÿßÃß[¬à&Z*ÂA©ØI²ö¬Éáq×O5È!=s]°8»ÍPQI™Š“îØD9³‡ºnÈAZ„Xè­¢¿ClèœNVRHmØ[Bcja@±¡×Á
+¦ÅìëŽ8ÌSØ_®Á§Õ¢jŸŽ
+ìUð ˜s@œÔÂì¯û”„èmUÐvèVN&oŠl»Š _ŠÞªi©1?Bé+Ö/¦Om9Xi…·RzÐvÅ›8 ”ÍDZ³R´
+oéý7ƒƒ… b»{èó›b2!Ý7nó{DÏl EµŠ¶8³#Fšç¤&šS©Gû‘Y§¤’sÕÛx¡@Kí¸!¹Œú1i¹¬±œÂv›æwîyñ(}°¶Fïåì· ^· ¿gyæþöv Ã_Æ÷Ì5s-²à¾»Æµ8¨»¼?ßhFćç~]¶·pG2Ê„Šõãõ±1ú“ iiaÖ—`ª†©j
+“é³_‘NUÿ?Õ!¿$endstream
endobj
1751 0 obj <<
/Type /Page
/Contents 1752 0 R
/Resources 1750 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1759 0 R
+/Parent 1758 0 R
/Annots [ 1755 0 R 1757 0 R ]
>> endobj
1755 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [442.7768 658.9634 511.2325 671.023]
+/Rect [442.7768 519.0086 511.2325 531.0682]
/Subtype /Link
/A << /S /GoTo /D (query_address) >>
>> endobj
1757 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [361.118 379.7056 409.8647 391.7652]
+/Rect [361.118 239.5449 409.8647 251.6045]
/Subtype /Link
/A << /S /GoTo /D (configuration_file_elements) >>
>> endobj
@@ -7703,204 +7718,192 @@ endobj
/D [1751 0 R /XYZ 56.6929 794.5015 null]
>> endobj
502 0 obj <<
-/D [1751 0 R /XYZ 56.6929 718.5752 null]
+/D [1751 0 R /XYZ 56.6929 578.6855 null]
>> endobj
1754 0 obj <<
-/D [1751 0 R /XYZ 56.6929 694.0112 null]
+/D [1751 0 R /XYZ 56.6929 554.0828 null]
>> endobj
506 0 obj <<
-/D [1751 0 R /XYZ 56.6929 463.2277 null]
+/D [1751 0 R /XYZ 56.6929 323.1321 null]
>> endobj
1756 0 obj <<
-/D [1751 0 R /XYZ 56.6929 436.1931 null]
->> endobj
-510 0 obj <<
-/D [1751 0 R /XYZ 56.6929 121.1271 null]
->> endobj
-1758 0 obj <<
-/D [1751 0 R /XYZ 56.6929 96.5632 null]
+/D [1751 0 R /XYZ 56.6929 296.0587 null]
>> endobj
1750 0 obj <<
-/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F41 1218 0 R >>
+/Font << /F37 1026 0 R /F22 961 0 R /F21 938 0 R /F62 1361 0 R /F41 1218 0 R >>
+/XObject << /Im2 1350 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
-1762 0 obj <<
-/Length 3462
+1761 0 obj <<
+/Length 3222
/Filter /FlateDecode
>>
stream
-xÚ¥]“Û¶ñý~ŽU7±ø" NŸl×I/“8îùÒ<¤y $èÄš"‘òYùõÝÅ. RGéšéxÎ\,–Àb±ß”¼ðOÞÚ4º0·ya’TÈôv¹½·O0÷Ýdšy š©Þ>Þüõ[ßI‘©ìöq=XË&ÂZyû¸úuöîo>>¾¸›«T̲änžfbööþÃß SÐãÝO¾½ÿîç‡7w¹™=ÞÿôÐï¿}ÿðþû÷wsiS ï+^á ßÞÿðž ïÞüø㛇»ß¿¿yÿÏ2<¯òûͯ¿‰Ûûû‘覷Ï0‰,
-u»½1©NR£uÀÔ7ŸnþÌúW§ägR›¤Êd·s Îmf¦¥,‘‚Ôæ¹I.S¥¬ä””Jy[~W_×û;igóº}šwÕîüì2“°»(n‡¼`#RMð¡|È,Kò P#F7Uw7×…žµ»¾j„Õ,â][»Þýínn23«úñt¹\º]ïV<jV<ýÔ´þdaf C!%IJÝîʾZTuÕ樂3З\[àË‹n K¬ÌœS&Eš*Ï5ó
-gÂÖ2ÑB¡l‚”ÿÓöMYGŸI%·‰MÁ*è…Û¯ÛŽT²¤GWm«ºÜÓ`}h–$'UüØGòBƒYM²"O¬Í³ëº4¤º¬K‘êÒ)ÏÕÈe®s©&X8W#mµóðÉõ¨Æ ÀTµ=lià¹òi
-·<ì»ê‹›/ë
-˜ë^ÜgZ$¹‚œç* ‘j‚‡q 0I.ŠbÌD´ÃÓ%A/ bÃ*ØiÙ¸öÐY5‚ˆê¶ý|ر¹‘
-Ì_£'X;{ë–å¡s´8ED„rhž†ÜÑ4¼ÑTÒ京ö„XTýðTr¶'¹§ÄÊ;q#3X!í86PLÁàà™X¡”µ$‡h%hü¹ªÛűw¬ªuÞËg_Êú–Xªß¸‰LMZ ^Xd,‘Iå=ÏÕ "¦*ø혯JKŽ÷Ú”_xw4nÄ,x¼rK’kÙù´Å¢PÒ¨L§cQ é‚ŽõÖG¤â'á^´öTC¹¡‹W²¾!ÕekTþ¦–»‹v®¬«òë›Gª‰ÝGv®sØþlw²"˜9 ¢™ì5žgf˜¨Ë
-9T¼q#éÆrx„!+\î«]ßî;B Ò è5_àê‚T:*výªjNó™ë—à2­È8ùò[;·bmŸ GK.ª'öþi¢õ¹sM{xB{6†R
-c¡V,äYC‚¹S™âNÍVe_ä5 ž\þ)Ú–@Î踑I ò
-S>SÃœ7KO¯Æ `Î ü‚”„Ç—œýòRT'ª™ûº«ˆ€Æ;¶‚2èôt³bA§½$%53oŽ0þáág"¸·/{÷t¤ ê+˜¥á0
-fïÊöèP¡P(½>É—"Cdä¤ ÈéŠxò©7 ¨óÝn‰š•L†«E°mê#AϬFž®ÚÓ?ðV§[ñ2={RØøÂfù@ôÒgw|f>ÙÅÚAðj_(O²¢!ÅÔQ[›NRÈù6EfˆÒj¾íôCÓUO 5Ë¥O1žÜžD-¾’¯»þ:qL—T«|wÕóq¤…šÐѼt”ë&ºŠ
-zø"ÌbÅ¿ÜTpÕëÂR%¿Ñv»vσm•ƒˆø}­è rá¼°¬8¹*\jÙ~$nú8¥›»¶«úŠ
-AMÂÇ¥áˆtÒ›!Ôo xFþÑ-à€*Gsö9Cê˜Ãö¼TKhX%!Ì}C˜’†Áë ŠJIÄbYTíêÀeåž©˜Ñ[ž+Ú»ÀnM –o5îJt57#ûvÔ.Ñaš/Ül
-é.åÈsH+nª©%sQ\ç RM°pÞÔ’)¤P#8¨œ¬LÜ̵—Õ®ßø gO´Q€>
-+Ùì#éÌ—ª=tulžúFÇS"‰ðs{¨WžÊ"Þ0æ&«|Á«dgAñ¤¥iéJ1‘Wr7¥ÁO
-
-‘ÃnÂÐ A·IžÚ³f >ŽÜLnCx΋¡süÉÇxÛ,¸·…S§áíLÐx`Ïð΃+»¶)5¿³f€Oż vZzJB¯ÊÉ`‡å‹4«Ì< [r»É§ô‹€tÐ ËOÍ°<¥ÌPÊÒöa .m„VÖÎ|6…„ô)>§61"„ÿ¦ÈÜ
+xÚ¥]sÛ6òÝ¿BoGÏT,¾‚sOIÎ鹓¦=ǽ>ôú@QÍ Eª"Çýõ·‹ R¦ävn2ÀXì÷.Å þñ…ÉR& µÈ •fŒg‹j{Å°öÝ÷8Ë€´c½½¿úö½ÌEZh¡÷›Ñ^&eÆðÅýú×äÝ?ßütsw½Ktz½Ì4KÞÞ~üÍôx÷ãÇ÷·ßý|÷æ:WÉýíiúîæýÍÝÍÇw7×Kn2ï ¿Ã™Þß~¸!è»»7?üðæîú·ûï¯nîã]Æ÷åLâE~¿úõ7¶Xõ¿¿b©,L¶x‚KyQˆÅöJe2Í””a¦¹útõ¯¸áhÕ½:Ç?•™4J/–€Ì„”ó\f)Ë€kË\ñTåFD. >Ç倅\þc¢±ýémᆩQ&_Œ·|qpÄš9YŒNæ̤FN¾´Ào™'Ûòk½=liж+»'¸ÛÐ3èCx­·û/s[>#`’Çò‹_îv¶%¨êÚê°ß_s“Øvhž¯9ç (ƒdÙ‘ˆµÝ”‡f ]êkž8Ž|û^(s™*- \oph›z[vM¨“ƒ¸@™…ÇL_(“—XÎy*µ)^ëë‚XžØeõ¹¯ÿ°/+²´È3}ùèˆ5söD°’¥E¦‹éáÄU0¥£haPn»C;ìD OG¦ÇµÛnÿLð6ˆBv›ùÕCoQ|œ:Šõ¬ì€Rìô /¼”è¨Q’%wÂð¥â`•Zƒ[“ ÿ™Q] ×àÀå0Æ’O#Úïlßö•§öªM?s6[Àz*´ÎŽ|”¢H6]ÓtOuû€Cº=Ô]ÛÓZoÚ•0ZšÂ‘àóþæ_$‹è;Pöƒƒ+ ӶKéÏ(é%:Ķ›Î¿¸¦åºì¾-027^=ã%ñZ E–‘åÏJw_Âô>ˆ¿lOÌ0Ü›Ïý`·gÍJsð¸y¡/›Õë¼YE,$zYݸ[/›îa9kbš§¹aÅe2"Ö Ó:Í5LM¹¬QŒ…ôÊ€°Hâܪï;Ø¿_/•VI=L—˪²»Á GíÚ/?´$Ï°‚âu
+^\foÄz…Š—»Qr•qL; K~y´žòÉg8èlG
+žj•Sã)w;gˆÀeCyȆ
+$îûš6uìhrå÷ý Á e¬eò±È„4¡ó«_½Ý5v {9#ù‹q@åÄÁ_‰c¬óXÎ(,”'}ýÅ.«¦â^ÖbY‘æ*Ä‹$D¬¦@¥9+Š)s);?
+iœ²Ãr3”­í=a‘UûKRÓuŸ»~’ÄñI¾ç½™oB¡ì
+vû3'6¶ïÑ®FgŸáÆX]/?ùÂ÷e ,…ÈJ¯=°ò´J/š¨Ûãí|fÁ@sò“ªss¨;hÓXÑA…›)>êCQ‡îØ_y,ûw‡¡ñnÜnp› D‹i…õËu,l×ÝÓùr
+Òþ´
+˜
+«éùþ ~r)d~ñðˆôòô‰Fg&eyÆ'ÇS{W™qÓ¥ˆmr\p©"øÞ8®» æ\Š€ïÍ„f/Ìœ6{aÊ]“¾\:ÉãœKA‹4XWhOG}P fQœ8’ØÄ×—m"Y—CIÓ)xú’Oбú,Î÷.4$§:°ä²3Ìsuv|5f
+í²A¾e`ð¶lÑUÏt]|û^ñ—,ÃÉcO_Ÿâ×€—nÃu»»-a{%ãA´v­køôäÕÈáÕ{Úàþþƒ?ê(דÉà‚kû㪿½ôÙ>?y:½s5Ó%c±]ìå©.ŠLM=µ²é&™̆B¨ b §¤X®B ýÐöõCK rî’‹»÷¢kf_ÉË]þÝ7&J"ŽÕ®£êèx¦ÚÐÅ´O ª•Lè$З[,ŽÑã“ÑÃ^«üê¿r¶¶[•þþ°Ûu{?ØvQ9Lø.ƒô\Ñ'Cí÷FpU¸Õò.ü0ÀHz¶#¸ëúz¨©ø“Ä|Ü+ ‚"Ž;3Äøá-OH?ºPµ¨N>ap³×ÁoÕÑ4ì’ÒÌmK3% ƒ×Á)*qK¡z×*kûD4‹ÞòD!£½3lÛ6”Z¹öâ®D—Ñ„ÝÉw®à0G ß`
+Š¶9³2†ø·¦¹º³ãp{Á9™=Oeí?Ú€ŠD 
+ò8­çÀýO
endobj
-1761 0 obj <<
+1760 0 obj <<
/Type /Page
-/Contents 1762 0 R
-/Resources 1760 0 R
+/Contents 1761 0 R
+/Resources 1759 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1759 0 R
+/Parent 1758 0 R
/Annots [ 1764 0 R ]
>> endobj
1764 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [375.4723 694.0819 432.5882 706.1416]
+/Rect [375.4723 564.3095 432.5882 576.3691]
/Subtype /Link
/A << /S /GoTo /D (journal) >>
>> endobj
+1762 0 obj <<
+/D [1760 0 R /XYZ 85.0394 794.5015 null]
+>> endobj
+510 0 obj <<
+/D [1760 0 R /XYZ 85.0394 692.8552 null]
+>> endobj
1763 0 obj <<
-/D [1761 0 R /XYZ 85.0394 794.5015 null]
+/D [1760 0 R /XYZ 85.0394 670.2188 null]
>> endobj
514 0 obj <<
-/D [1761 0 R /XYZ 85.0394 225.0247 null]
+/D [1760 0 R /XYZ 85.0394 102.3833 null]
>> endobj
1765 0 obj <<
-/D [1761 0 R /XYZ 85.0394 198.6174 null]
+/D [1760 0 R /XYZ 85.0394 77.0969 null]
>> endobj
-1760 0 obj <<
+1759 0 obj <<
/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F41 1218 0 R /F48 1238 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1768 0 obj <<
-/Length 2558
+/Length 2691
/Filter /FlateDecode
>>
stream
-xÚ­]sÛ8î=¿B÷¦ÌT*¿%MŸ²mÚëÎmz—æžv÷A±iGSYJ%¹ifçþû)K¶’n§N*A
-e³& ÜB÷C{Oí䬆Cw–šÍôÆñpWÝ•_,AÛ¶ñPùP>žsÎãô$ÊúPfŒH³ü‰p3Æ»)ÕÓo¤BµûÔí‡jÕ?òTjòâBŒT RÌ‚ž,R“±#1®Ê:ËGçuð(Ž3
-M¸cgðÀ
-æB·üo¡:D}H =¡o­Kˆ¶Ÿ÷e 7RAqNÅ[¢ ‘«»¶í­gQÒ§q±g”Ü]uÄaº~$Ô†ín²ZøŠÐ º!Œã·P
-÷«‹‚Ǭ’àù”½íf!InœqéŒ0¥'® ™±ZAJ¤©UŠ aÞÓ½­7ÍŒKÉãLÏÀkŒ¿’ÃÓÇ£TÊd—CÐw.ï÷ƒú®üd½te³°8§ÂžÖ—kª–é‹ëLÍ+Àugû~!V²¢‹‚Ø_0ý·Z$‘Ïz·c˜L9žzwšg‡]]þ*‡ÕÝI^ç"•P³ÿ<GŽßsÈÈà™Î3O’gi&Ѹz0£
-Ë;ãÐ{ÜæðkÐåqØßÛUUÖ48”Z‰Îx|Y‚aÜøRRC QÓZº'8aëà9ÈÚoUö}µm¬ÆoðP6+›’¯d&•(ç·êªm’ÆnK|A¯ÀùBŒÞbFtIãÀ’·e–¹J\¸ª¿êußöµ8áŒ
-í0­>7ûŽò˜ï^šÐ =†JrâÆ¡"È;ôq÷|ë)†Sfž…/k߶~™ýZbéò‚¢„âól %©–RÌCb •ÿ唆
-©À—ª™êœ½Ì_-ÙäêùR¨WK.ÿ1š—ܼ¢DNú­Iw¤ÉÓb‚Ä—³>I·4öI‚ºM@^€`À}ýs€ˆw­»qø°iCKØRã÷žå–`©g‹MÌîÊþ-Z§øØŠ,Y‹|@© [%c‰B) Êw4M"`¿®ì½J "ˆ‚*zˆÀ© Gå•ÎÅ ¦5t÷¸»÷}XSyÞ›‡·Œÿ¨m¾õm7éH:9ͱ埿¨7 .êïÝ©Süç×vŸº…Ò
-Íój2ýû™G.½ß
-ØDæBü­\ÈïP^«g;9Á¿·7ÀG•ÄøPÎñqÃ@=³ÜÊ8ðŒ›H@%¤ùÏhå€'ËDqcRƳü§µrq2å|ÚÊ9t¥ìŸI ÏFrJ9{ÙH‹ñb^ ›£Z8—<¶áfe”UñÛ´?¥7œžÖ9
-ÿ°ÛðÙ¬ŠÝî†9W‘ÀB÷ö¿¶P‚æpœ„õz8 ù õ¹ÝôÛAo-Ë/Õ p®uD]r$m繌f©€žê´‡u¿Q4Ç×Pp­1¾Îa{ÅѽiªÛúÐt=y°©“ùésí1Oä£]ùb„›¡N¤É5ôv°äÀþäÑx¤y^†#NÞäôkŽñž¢¬êj´NpÒš<gÛµ§ƒvc_¯§teוÍvrn@z"kJ*)•bQpþIô²ðÍ-ÏÅöÉòTåÀ$H…ÊÔéo àN÷–„ÿ?™äŠÀendstream
+xÚ­]sÛ6òÝ¿‚÷tôLÄà‹$8yrS'çÎÕé¹¾§¶´IœP¤"Rv|ûï·‹(P¢”Îä&ãX,»‹ý„xÄàÒ,É
+QDy¡’”ñ4šo®X´‚µWÜáÌ<Ò,Äúáñêí™GERd"‹—-0­yô¸ø-Α\¿ÿtÿáîã¿n®s?Þ}º¿ž‰”ÅîþyK£7?ÿ|óp=ã:åñûÜüòxû@K™£ñÃÝý)ès†èÃí‡Û‡Ûû÷·×<þtuû8ÈÊË™DA¾\ýö‹ öOW,‘…N£˜°„…ˆ6W*•Iª¤ôúê׫ ƒU»uJ*ÕI*TͤJ4œ?­ežäœRžI&…´,ø”–=jy^›²©šÕ¬jz³{.ëc¹9œÌ3®£ø Ö"àË"áJò1못žI-â š9¨Y^s/ͼ¯žMýJÀö©kkÓ_óØÀç,‹Ù!šy®Ú}XœóøÍõLñ4î׆6u@ÝìhüÒîë iã¦}vhæë¶"Øõ*Îñ®@Åœ'Eš
+Ë6atíÞæ¸7-tÞÚï¢#àÒÎÚ ÍˆÌ˹àë;º5ž§‰Pª
+¸šÂHºk Î;çŠÎpH–fv>ßäëìLº>xb€uÁ=òhcYÎÍO„Låée¬ &ÆžÈ ¯h=æ‚÷D‘ôÐyÙШ÷ˆé_ÚÝg„ µÂ>Îe7!$Ö"wž6­„ÓôÆS}’ݤԖ}›´dB¥ùØ ·âEf ¿èVø=… =X°·o^äÞ¾Ãíhßø%ûÆQ`ß]gßHíW¬}ã
+Ó̦•²·LÉcqðe9Þ4©¨
+9w4'uݾxJO£';ÎZ£/¥Î&€ÀíTÊð¸#Á®­å …$[£T×·[ÑICõâëPn
+{eïK–gÿV<ñ„—’Šå³A/…ìžkþò#Ä:ô,»ëA\, »‹ýG¦‹o01`MpqÜd9;bã¾ÜैÌáÜ$¸òä°ëvµ²Âôùú½H¡¿>^‘x¢‚Ïdzã”–®J`‡*( y>Ž ¾˜ÍHÎ||gAÞ†‰ÏÛh:n‡ÍÛðuy;e£¼ÆyhÛ¼m‹\gl½+‹Ù›q™*vlÙOŽ Rì‰=‚ZÒ¢H#Uð$Ë@ƿЄ£¿1 yn² ‡ø“-–¥çiÑ>´ÜÐï“šyî ZBm›B‘˜ààìp¹y"r-"•ëDI¥É+H3Å­é@n”B9+ø៼Nè,)òBE@/h¬ñèèK„`QHB
+ÆVÖƒ,àíÝFD?¶ Q
+åÏBÊV¨läWBB;¯d¤O¤¢bâ¾µœŽ_¯4GnRm¶µÙ˜Æ6ƒÐÐ×=ÑÀ¨8¹y• ¤…ºý¾ë‚2"ƒ–åð
+ƒÁ}‹á˜ ~ChxW£·æpǘ1pX¯9ŒÃN^ªÖpnyEÅ)O €åbáÞ®¶–œ!Ñc° iB¸—u…z Ïå~GÌ5.oƒ^}˜±ïÜó+ôqãämëÁ˜#á*ÚþÝÈ|-±jyCQBñq<ÑÆ)a–AÿÓ
+ µQ?l—³·úÝ”NþÆ¡o…š\ý“Î[ž½£‰DJvôßwîÍ~êDZ<-#Bö}Ã΃DKs—ŽéÎ6š
+È*KdJ¥ l¿¦ebæëÜø‡ÀÄ ‚`Ϩ¢7\
+(*˨¤á˜M@ôlZV}c§;Û‡=•£}ÐyøãÓ‘Lµ)½Á·®ã‚²føu#¼Í¡Û^¾¨-ó&êüîÔ¨û¹dÚöS·PT¡zÞs¿YäÔ©2Mð×ωnž ÝÒwÿÈzøZåTkO> lÅ4qL¡¸¹:}a‰€:q‚õÿ)æÈ÷endstream
endobj
1767 0 obj <<
/Type /Page
/Contents 1768 0 R
/Resources 1766 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1759 0 R
-/Annots [ 1772 0 R ]
->> endobj
-1772 0 obj <<
-/Type /Annot
-/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [213.6732 61.5153 286.8984 73.5749]
-/Subtype /Link
-/A << /S /GoTo /D (rrset_ordering) >>
+/Parent 1758 0 R
>> endobj
1769 0 obj <<
/D [1767 0 R /XYZ 56.6929 794.5015 null]
>> endobj
518 0 obj <<
-/D [1767 0 R /XYZ 56.6929 525.3716 null]
+/D [1767 0 R /XYZ 56.6929 390.3986 null]
>> endobj
1770 0 obj <<
-/D [1767 0 R /XYZ 56.6929 500.6989 null]
->> endobj
-522 0 obj <<
-/D [1767 0 R /XYZ 56.6929 129.7873 null]
->> endobj
-1771 0 obj <<
-/D [1767 0 R /XYZ 56.6929 107.5853 null]
+/D [1767 0 R /XYZ 56.6929 360.9106 null]
>> endobj
1766 0 obj <<
-/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F62 1361 0 R /F41 1218 0 R /F63 1364 0 R >>
+/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F62 1361 0 R /F41 1218 0 R >>
/XObject << /Im2 1350 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
-1775 0 obj <<
-/Length 2731
+1773 0 obj <<
+/Length 2947
/Filter /FlateDecode
>>
stream
-xÚÅ]sÛ6òÝ¿BoGÏD ñE‚“§4g'î´NëºÓ‡¶´D[œH¤#Òq2™ûï·‹]P EÉž&77Àb±X,ö‹³þÄÌš8Q¹že¹ŽM"Ìl±9Ifw0÷öD0ÎÜ#ÍC¬®O^ž«l–Çy*ÓÙõm@ËƉµbv½ü3zóîõ/×gW§si’(Oç&M¢..ÿM#95oÞ_ž_¼ýýêõi¦£ë‹÷—4|uv~vuvùæìt.¬°^2… Î/~:#èíÕëŸ~}uú÷õ'g×ýYÂóŠDáA>žüùw2[±<Ib•[3{„N‹<—³Í‰6*6Z)?²>ùíäמ`0ë–NÉÏ(+³ J9%@“Ç©’Ê °há@™ˆŠûûí©°Qs¿­Š®|£iÔ­ŠŽæ«Ö eÑC[Õw¼¦þÂÀré—m[2½¦¦¶[•¬›E±&°.=QF¢­ËÛ’ÚzÁkº†‰•íÄVp[
-.è]óX~
-§raže8„ê-Ìæ¡õô»¶\ß’Êè¨%Ú M:Zr•I4Њ¨ü|¿®U7ÁNªc ¨Çmˆ°:ÎDi–ÇY¯í[ŸgOq’ÜžÂfq.A,=ÚA"QK¬É¿“=Å'˜”à D†Z2yȆ@TŠÆ“þXu+º«¦.é²0ŠÀî±! \;åB ÖÔ¹#‡ˆÖc‹J ù“<®ª“Þ_¸á•¤2ºø…´HK¡‡JøjðŸ
-"
-yŠ\‹ïà1˜â<$9å14ØÑÄìv>ìÖ2«Õê;2é)>Ådfb™«0yH%u ø9 œwc·Ô–Îú!ä¬lýXŠÈ©!t0˜Ãv±*èzéDÇiÊP¿îŠªn»Q Ö6/¸h! SƒÊíê®âÈ® †®Å¸mêåd ÷Þ% D¥åDp2
-W0;ˆ¼*é¦tA
-Ž·wA3.Eû1ݳ]À %Çðàì¢bÑ=`Ö fUÕ¦êªO%uw–D$œØá0sNžÎ@>BŒä#) >´ýÚ†Zpbàçý6××Sq=]¾Ì}‚vßÔ-¸\ÚMói4Ò/º)諸¦,B’šæC¢.7SÑÅ'ôù’ôÛ‚÷ІÄ™ oÍ1'Q Ö;ÒØ–pãNt6¼Ë’µQGì 8ó„¤l/@…ÇI¬3¨',n’Ç´vfrX
-qÏ·3Oq’œJ$ÀèIGv$‘HbmóïÈ#|ŠE®u–Ù!‹‡Ó£¥eqc¸èîhÊ‚uR=+¶7Œc{,S ¾:Ýpv#Cæ‚pÈçô¤áÀ“m'„žEÛVwµKöS²±Ð,á”Õbp°^îÂ_˜p¤VSËbüŠaŠâ¢Ò¦ª«ÍÃfjÏŠ ã›÷»7S©w¡ ˜r*C0á+.ðÖ¬åÇÀm³†ìÝQT6ƒ»Øܯ±>¦¥¢
-b¡w¨\Vß×9eå¸vD¨¶¶¡^¿Ê9™p³Q! ‰íá¬ç”â„ÁÁÖ>º+»)ӞŚ› ìÆ¥—\ï•ò
-jXÃUqu§|@a Í -ë«Læu à`®Ï]Ç*oèqŠƒ“ ɺ@ÃxhÆ÷áˆ:ÏjÆBù‰—ÏÄEì¤eò±´Ìàï–ÆÕ50cy¿»æÝ}²4bÆ Ò´¡õá.=caæ,̉ӌß2ĺ7ˆÕ–Àe5¨ccÑ4xÁX^ %öò\‡Žld=ûªÇ<M’è«cJª8Ço!Ö^¾$”‹sj<àª7‚N°:æ×^¿;»$è¶Úú=o+ð¤Ê!Çn%½ ¡} ø@^>DˆŠäBT=ä9|7¯Žlªò«áÚ ýg¿¥ª‘«yfÇEí³Xè¸|3ÜIŒåûв cñ‚‰ly@ŽújêÆF‡Û á˜Xaëÿ½àÄ?œ<,89œ8.¸#‡{®àä!Á¹”ÿ“ƩÂSO N>CpêàÄs°õ3ôó~“àb=:«Ëé~K~€,]Ñõ¶íÈ3ñ¯÷ù7þ'ÄëO1©†49Jd&¾½A<Ÿ†V»^S‡œBw®Š'ÅmS7ï¦\Ÿ*ƒ9Š t~ÿ%@rÖq>CC-ôm"»DÙ¹ÄÃAû-mtáj_)¦²¨­6ÕºØÒ +ZÏœ0=JX‚éQ,u.–èºt FüÏÒHÇyü™¹¸
-b}\F9_ÀAŸ² ­>²9”\A2é删ûEAtT|rá R†£¸Ô¨ò¡hq$ˆ6°ƯYgéŽbCí.ó‚NÎçñ¿&°ª¿{+ù ·rÉ/4#
-ƒ3GnƒÁí$}–#TÐ ¨b²” ï&ǹ¯‡K¦•õ˜§ðûøM_ŒÝvåòÆs©‰3£ôSQÓ84:bM¾Ež6‘™úí21þ`fâ«!üó®ßü»œÝ–𳟵òÀ÷Ç$3Ÿgž)ä<3cÎûðì³þ_@÷endstream
+xÚÅ]sÛ6òÝ¿BoGÏD4>Ipò”&NêNë´Žoî¡í-Q6'©TO§ÿýv±
+àÜb|<'<º†ÿEt>ÖÐTܲÆc#ž<û2ã1SY& '€íU÷"°g1{WÃ…fÁ<Ýy@Ø^)År‘Æ,Ux¼‰MÆ¥eøú® K%2ÄPjw§®ÞÖëúöÁá…4•‚ó¸G¬·]YW`’©‰Ê–ƪîÜÄf».6EÕK7á0Ýû
+OÔ!ÑÑŪ ±Z¸=Ö™ 1 ÒL²“¯üXß(!
+´‚.Q`)[¿ÕÊÇx3ý²+®£ÔK$žbýé¤7FV­IBä"ý@ú ó!ŽØlãžHO=å%I¢|²Õ‡ÈC'!w‡,úÐÁIˆ±èU­3Å›b]ß»¸”òòÏxw\É«)$&OYâ(£lA®‡þ ’àÔ¤3­8¦ és² È1Œ1GrŒžâ<$y˜dHð—:Iõþdds“w‹»&){ß‘IOñ)&UÁøÉ#ªäi  ÷¯–¤2ÉÆù¦Îi¬ìH‰àp*šÙÔÞ-àW»-%ÚóÂÆyò¼z%ð­ø¨~$Ø¢@r:™!¸Ç'¸˜ˆ´@{YÛwµšäAÔ•”
+ŒƒƒRÉSa×ãÏà q÷€î0ð&¼¼âаYl¸°4w é >hQ,):ÏÁfIõ–€5hvM‰²|T] Nf}¡ò¸ãà²÷0›]ëéwm±^‘É(Ô˜ÒC·‡ž\¦Â¦{‚añm».e7ÁN¢b¨ûnaPHkxÂdêÅϳ§8I>OnÒ8 –í¨h%FgßÉžâL
+Œ)ZqÈä1b ô5þ¹bâNºª«‚”…YNt÷5«1Á›Rˆˆè=4Š
+ݾ×”ܘªí­&lýîð
+n­‚
+.f¿]CÁ±ÉkÒ!.¹$E§C²6ÑÐ>ê±>,QYõX!TŸxùL˜Ó^Z:KKžñ¾àqÒ¼º¢ÇXÖŸ®Üé¾Xš@ÑciÙ‹ÐøŒp_ž9afN˜Ê¿etˆUïˆÀe9èccÓ4xÁØ^ %vö^ñáCï¹ÿ‹bÂXô—eJÈ8ß X;;#”‹÷4Zy àºÞZÁN(Éï½þñü’ UÙø3W¥ð¦Ê#ÇÏ
+[zBû+à9x}ü!*’ QÕçðݼ~äØД_§ä~êïѺF¶ç™>.j/˜Å:ÇÀàÛáI|,ß]ëdóWŽHã&Äè[Nilt¹½ë1lõ¿ÿ/'Ž NŒÇÜ#—{®àÄ1Á=¢”ÿ“ÅÉã‚“O N<Cpò˜àøs°Õ3ìó˜¾Hp±ÝUå´m(§Ë»Þ·=ò Gü«Cþõ€ÿ#?ù’:Æß`MtçYÿ+§ÿlÿÃl¯#ŽôùYâÌRÏÞ6ÕcÎ5ÔpÚˆt‚õˆ^§—endstream
endobj
-1774 0 obj <<
+1772 0 obj <<
/Type /Page
-/Contents 1775 0 R
-/Resources 1773 0 R
+/Contents 1773 0 R
+/Resources 1771 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1759 0 R
-/Annots [ 1777 0 R ]
+/Parent 1758 0 R
+/Annots [ 1776 0 R 1777 0 R ]
+>> endobj
+1776 0 obj <<
+/Type /Annot
+/Border[0 0 0]/H/I/C[1 0 0]
+/Rect [242.0197 604.364 315.2448 616.4237]
+/Subtype /Link
+/A << /S /GoTo /D (rrset_ordering) >>
>> endobj
1777 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [238.0484 687.9287 311.8142 699.9884]
+/Rect [238.0484 525.4389 311.8142 537.4985]
/Subtype /Link
/A << /S /GoTo /D (topology) >>
>> endobj
-1776 0 obj <<
-/D [1774 0 R /XYZ 85.0394 794.5015 null]
+1774 0 obj <<
+/D [1772 0 R /XYZ 85.0394 794.5015 null]
>> endobj
-1773 0 obj <<
-/Font << /F37 1026 0 R /F22 961 0 R /F21 938 0 R /F41 1218 0 R >>
+522 0 obj <<
+/D [1772 0 R /XYZ 85.0394 674.157 null]
+>> endobj
+1775 0 obj <<
+/D [1772 0 R /XYZ 85.0394 651.0501 null]
+>> endobj
+1771 0 obj <<
+/Font << /F37 1026 0 R /F22 961 0 R /F62 1361 0 R /F63 1364 0 R /F21 938 0 R /F41 1218 0 R >>
+/XObject << /Im2 1350 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1780 0 obj <<
-/Length 3032
+/Length 2656
/Filter /FlateDecode
>>
stream
-xÚÅZÝsÛ6÷_¡É“|S!ø$ˆæÉMìœ;­sçèææ&Í-Ñ6§©ŠT÷æþ÷[`);izs“‰ác±»Øýaw!6£ðÍTBÃÍLIej¶ÚœÐÙŒ½=a~Î"LZij~Xž¼¼zfˆIx2[ÞF´RBӔ͖ëó„pr
-èüõ»«‹Ë·ÿ¸>;Õr¾¼|wuºàŠÎ/.:ÇÖÛ볟>»>]°T±ùë¿žýmy~C‰§ñÃåÕì1øq„èõùÅùõùÕëóÓËOΗ,±¼Œ
-+Èo'>ÒÙÄþñ„aR5{€/”0cøls"• J
-zÊ“÷'ïF£né¤þ%\$|BœM)P’.:²„0 z¡D»nò¥|·[绢º³B)‘¢³—ÄH&‘Þç¬IÔ|³/Ûb[æö[2ß²tž¯j÷¹npJ†½ñŒv¿«ò5ŽdžbV5ùε8¶É±ãÆ“Ù7ùí¾Ä¾¶Æ¾Õ)›×Õ/”ò»}¼e{ŸãDÏOæõ­_„{Pƒœ1b”âNðm™­ãR
-Ͷ®šLLÐt¾„1Ôg|4L0ÂU’}Kv·ƒCXÔVÿÊW”( çˆs›6kóM^µ¸å6ßmŠ¶AFVüY[ÔÎprÂgÇe§{ÖnÝhÊ”*ÀI¹ÑA%è‘îüÀz2üˆ ¾ éÄ}½’¿Ïýü¬ljlµÓzK5¸‡TAõ®-‹¦Pš„BÇξ;t`Á"88š§Ò)u®„ƒ»»6®#ßëæ/âè{ƒíGt-ïó•?Bè‰bÄ“ÑĤF x¡@7ë9NFÔ,'TH°C“H8R˜%¸vƒgÕ”êB–×hg«1ã°S’¦z¨CR©Ó/CÌ¥é4.ÁELq t
-ôÊÂm>¬Ê¬ip#%âw óu³b…1&ˆVcЕG}«Æ:Š‹˜¤SÙ€9Ç©¹UY˜f™¬²M>¥2S¨ô’|DÕ|h·ù„Ø€l,áÁN¤ÔôHÓäO”:P|NjcÀܵü©ûÉC©4eÀóëz“Õȱ)# êϼ£øŒà‚J’PF‚¿˜’Üð:3”¼¿='¤ç„[?°a:Ž°hOÜAÅ.t ×Pf^Õö3õ¾âº
-¸Ô}Óúsa½4_=©¿Ùí‚u~›Á½ã—4“è•‚7êp@gWÿš††ÄÈ ArÈ\ê™3`ÑÀÒ6ïörƒGy31oéÞ´ ’w—ÚS¼%OóæŒ3Úô ¦HY2 c†ì†ëÖ¡g×~ èø çrŠqš‚¡@Ø‹Lýe‚m ’‰àCŽ ¤ŠfM fÒü
-mæ¯#‹^‚
-=¼Ž–·2¿ËJl~ÊÊ}Þôn‚¹4
-J<o“pjÓ…W>Zý~ZÔf‰U¤`_ë ™MõA¬ÿÇVFl(îé pZ¾Vâfj¡@]”³#÷+SDÚ[ŠBr’øS±æóî˱B…–†
-½ä’Fù€d‡ù
-÷µ@æ½aÛBY¶oòPt{Œk_X”qu;íÂ*, 9mëìh™/éêx^I¶i•d)µ÷™/äÝgŸ<©>¤‡ ^h¶CNˆiIl]rbZÑ<~4û[Ë­ šÙ¡‘áŠg\uš•Ù£Gß›g÷‰KÎU¸ÎJ¸Ö
-KÐ’O9íkÆ”$šu‰uT]·û­ëÜ3æÌÕ6šývk‘Ñ&Øãb‹+§?äë€l¶,´aÆ$²3ûôa’ÄÌo,{؆ÜÒ±I¸ÅÈe.
-O'L¬_áã‰ñï#fnÃ-K³ ‹€MGÁ—¶Øäc\0sûè“åQ¾t¸Ã"’}Øiˆ6+üD_††êƒÇ¼Ÿ Œm
-BÈ©z"Tæ@*F}”PTû6opkwÙVëƒy“}.6ûMTŠ{Š­ 7"°ÃÒi~"»ÇËŽ³­”M#(Ä8?[ušþŸD[L|Kwfá½×NÚ@ZÜÆ/ 2@"´Þ\½þÛ b±îžTÕü6+JŸúú—ר%Ñ×ýp<V„H ¤+S8Û©·öÁ[ÐGoô]ŽÇ?Þd¾#¸‚͇@ E(˜·£«S^Tõí~ƒW4aeVM²EŽ‚e„¥‰z¤¢YO€T˜å•}^TNÒ)¨b\
-úƒr`¥z®²zLÕ¦Ž•¤a=”‰rŒâ¬WÎ IÒî‰Ñi4„ôÂÜ.Åê]^#6bó¾Þïz`<|ÿ€ÅÖZþçPúüLÏóÏ«!Fϵחόµ³_eûû
+xÚÅ]sÛ¸ñÝ¿‚“'ºsBðIÉ“/g§¾¹sZÅN'—Z¢mÎQ¢"Rqt™þ÷.°
+Ñ9{–&Á‡S@8Ÿ7…“Ä»íD¾gÒ_q0'ÉÉ?ï ëT¼ÚUmÙ¹(§!µ}.Éq6„hwÛµUø\®½ràëæÁžùæ¼Ó*ßãÄC³kŠÛ]…sÖ‚Sí©×¿QÊïvá–Îñ©Ø‘U8‡h‹Y„ú‰SÙTùÂ.nw–Òa€)§ØV?ãu5®ýðP˜`¼Oø ÚíaVùO_Q¢RˆÛ´y[¬ÐÁ–›b»*­É!‹Žÿ¼-­U„åž•0ÎÀº)Q@Ìg$ã:Šý.µnBÀÛO8× ‰Ñø}áàóª©qÔNË-K!”KåeáMñPhB
+#™ý0N6O¶Š,à‚7„}ü¸½‹p0ò„~.°yÂpû¼†Ž÷à.ñ\l„–(hÒàm2-4d,Ôc”`3”<R!Au"‡îl=%ú„PÀå$ÚéjH8ì”dY)€åIš>%uã@\–M'n3pbD¤QÈÊÒTõÛCß‹ ÅàœHª¼5•.0, c8蔌ºiÌÇšWÎé™jª†Âú°¨ò¦Á”7JäÃÌmÔA…cLT
+"yÔ¾E[òmÚ¬r¼!`ŠŒ%Ø=$ׇ[ç¹æÅ{Çß8—S„Ó Jt$ê/dKàLx²h!U4oZP“æw3ŽŒ÷T¤SÕ1¬ªŠ»Ü¥ïŸójWtNz;A\–%×I©îÒ+—­¾:pZT" ¦.ãO±]!3’Bê=´Þÿn•'„ö}†£à:
+¸ÜWˆ¿é™šIP åÕ‘
+rä|›¯—ØàøŽóS¡Ø»l¾;?E»‚ ©W7…‘TÆÇ¥²ó<õR—)”/ô{PúÇ¥®+IÔ·….4¤D,ŦÀb¿¨ÊÅÿLè®
+s»ôÀõn½œáèÆÃÅØ6.]]èzj¦èµ6̃JÓ’âJ⇲½U’ÆçÃoRØåÌ9™­x]<0%éÆ׫<ÎÛ)RõjSÚ²R€Q›´`U˜Ø%lù½vóvWqy]¶¥‚Žë]ŽM¸¼ï‚ˆ®E“«¼]ÜOu—º`i\
+êzP‡çÑþÑÁ>æpzžšöšß7¾ÿ‹%šˆ’Ï$–ðLÃzö ®åiV#¸©µû<›®ký5 fXÖ^Ô®ëç:篎´ó oap{/AGÏ' C%ÄÄÔ@]^áÓ8vt†ÌÁÌè…iúG ~óÁ^è_O¶0{(´f×ù›$ìØ%ƒ $M4Æëþþ`‘ïšÂwÝöaó«o­&ipu`y4£³£}¾¤kä9!™¡’ÁÔbW×\/äþê¢Ï)§Ã5ea>o‹p‚M­H"Ù(Ç4¬9"r|4»[C­u@Æq¤Ì÷Ž!IÎe|ÔØÊ«‡|ß ›ÄÇï7bœmqùÆsК>ãÓ}èá8ò@É­#»s‡ù²„˜ÖW°v$¡Õ¸»æ9ØlŠÜÒÒû æº<œ+%Ï!œ`:rž QíÈãÂ&UY4äØí!S’)ŸÔƒ’ Šl­äÑ„; bB‡Kö+F.¹¿¦ätàÚ:݃\ÀÚ@1i2‰¾í*8Q‚{Ýî‚Å×ð—Çת€2¿4Ò&…Çâ!ú1B¥Öa‚±å´—€xy¹âÑO5ð,y¼³
endobj
1779 0 obj <<
/Type /Page
/Contents 1780 0 R
/Resources 1778 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1759 0 R
+/Parent 1758 0 R
/Annots [ 1782 0 R ]
>> endobj
1782 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [325.3322 706.9749 398.9856 719.0345]
+/Rect [325.3322 530.3947 398.9856 542.4544]
/Subtype /Link
/A << /S /GoTo /D (the_sortlist_statement) >>
>> endobj
@@ -7908,616 +7911,618 @@ endobj
/D [1779 0 R /XYZ 56.6929 794.5015 null]
>> endobj
526 0 obj <<
-/D [1779 0 R /XYZ 56.6929 769.5949 null]
+/D [1779 0 R /XYZ 56.6929 600.9849 null]
>> endobj
1304 0 obj <<
-/D [1779 0 R /XYZ 56.6929 749.9737 null]
+/D [1779 0 R /XYZ 56.6929 573.3935 null]
>> endobj
1783 0 obj <<
-/D [1779 0 R /XYZ 56.6929 624.285 null]
+/D [1779 0 R /XYZ 56.6929 447.7048 null]
>> endobj
1784 0 obj <<
-/D [1779 0 R /XYZ 56.6929 612.3298 null]
->> endobj
-530 0 obj <<
-/D [1779 0 R /XYZ 56.6929 226.7842 null]
->> endobj
-1785 0 obj <<
-/D [1779 0 R /XYZ 56.6929 202.1811 null]
+/D [1779 0 R /XYZ 56.6929 435.7497 null]
>> endobj
1778 0 obj <<
-/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F53 1313 0 R /F41 1218 0 R /F62 1361 0 R /F63 1364 0 R >>
+/Font << /F37 1026 0 R /F41 1218 0 R /F22 961 0 R /F21 938 0 R /F53 1313 0 R /F62 1361 0 R /F63 1364 0 R >>
/XObject << /Im2 1350 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
-1788 0 obj <<
-/Length 3344
+1787 0 obj <<
+/Length 3112
/Filter /FlateDecode
>>
stream
-xÚ½]sã6î=¿Âo§ÌTZ~Jâcº›í¥×f{IÚ™›¶²Í$ºµ%¯%%M}‚”%YöÞLgn3³A
-'&|¼ùáš ïî®~üñêîò÷‡ï/®ú½ ÷Ë™Ä|¹øõw¶Xö¿¿`‰4¹^¼B‡%ܱØ^(-­¤ ˜ÍÅýÅ¿û£nêœþ”Î-Tºˆ˜gi>¯e–0 Z‹3Å)TÖkYð9-*Ôò¶ø#^«g·ífºg®t"•ÈÃ…Ø÷T3üÅ€?× GùX€{Û6¨ø4jŸ- S¹í¶ØÑQ[n=ú±Þðú\®žGstÔØý‹ ãåfCÛ0™çѺ¬Šýa~cšíê¦lËK½Xèr(ªæÕî0)òèV
-™æ:zµö3¡YFàºxk¬¯¸Œ®ûRl:ë§?Òì?­“¹&ì¶x#`Ut§,ÜFôKg÷¥õì[?ÃͶm·¯¨· TõËG4ý«›¾¡¹KK+â&Ùxw(‰”y´©›!CmK£&*«Öî·v]­¥‘»»Æ+¸ó¦ÃCÚÂcoï©-ª5 <¹í#ê
-þ½»"˜¶°ò‡×ÐO"p€¢lêM×–u5Þ 9”ise8ÚéíöW(Í4ÜÕT¿gCªÓ÷¬§r÷¬¬â}]ƒR¦wL˜Dr¸=gY÷T3¼GwLªDÅÇÌèä(E¸Y&ªºí’® %¶¤¢º%
-ºT µÏEK3sTþ¥+ XÓ¨¿¦p´c*Û´y͈k>áZÉÒ_B¡À×L/a±ZÙ]k×xc9 ÛeƒË Ò©þÝG•õÅÒ$×™-ãB‚HF*ՉɲÔg@ :•<ѹÌþ—¸ sæòù¸
-ü=ŠÁ]à ^pñâŒ;ÃÔµÉÌyoÖS¡
-›ò)†€U®Ëö-vîzGç.(Ës±28öljFŽÑY‚¸YjôXû]•¿1&\ìËBBeïHçÝ
-™1ò‚ö½)·%EèÛº«|öK >‹V›zõ™Àæ³}½4":©#²•¡9q“-¹·•“YÀÄÂŒÄr?¤Ð ¨d³Y=Ö )‹
-_qllÑ´×X(œaÁÀnC éZ3¬WL(!òèþÓa>Ÿú$Tøa¥PQNAqÞ=˲ñõòu
-óf_4pâË/-ܲE{€XÚª}ßiCòRì˺k<ÎÕ/éÊ^‚Û'£…˜~²4•™HrÆÓó¥éêt2×S…côW:®êµ=.QÓ4‘¹LÏ‹ÐSÍÈ0ò7ËT™±.‘{DEð“ñ¡‹àƒŒ`wþ@@òÒ¤šPK8k?Ýþ)Så®8‡ëNÒ½æKWTmXÞç{@€Êð¹\ÊÅs3‰’Î÷á)Ró'Ýv€^Ëöy4TÙW ‡ü×õ.9çQB˜¯T©ÃcP¥.½ãlÖg‰‘";U¨öf$Y_¨ž1£Õ3
-TS3
-ŽuÆ–ò4·ž—£§šd´gu]>–ã`IB»cð}îò\;רޚ
-ãaÛÛú…ñ)4§£€fTÁÃ0¾"R|æø&¿²¡R÷~‘¦…ØL¨ç‚'xÚÜE–䊉¯˜û€êŒ¹ªþÁØ>‚ }Ž1qø†Ž¿×Ì¡u»;¦ È£¢< 4xϳ[è©fö0*Ê ”R‰ñ&À$±‚ çkë†:B·ä47„pð.Ð?|º/rXÚ½ ³³¥}.^J—¢I¹S†–ö1x{º1€/¨ñŽTÒ÷˜/¦
-û7O¥|Æt”M°‚zïÉúïŽÑ~Ȩí'Cb^”g˜
-
-ñô¬¸õ@?VSë”áh¨ß8q8÷*ØžbgbzÒÞ^.ä´¤·¥óN±
-…j<{? ·eSlwsÇÞ×C¾LcÇÚUEm…Â)ÔPõ¤Â¿«¸’ ütá=Ø$šCIoqýkKCƒÅn׫p¦–:Q9O*S7=2!
-hP^ÿÈ =oyè<ÁøXL\þ é[_Ř°!W*µN25ÍBÑ*Ÿ_ZûÙy»9±Tšdæ‡;F—‰P©I”ʃ¢4óO3ý¾û#?æ”'uÐñQ›pÊðKLȹ`&p£nTL6z2²Cà’Ëó}@t:®"wÁ×Uw뤲§°
-(y®Îò™¿})ü2”¸û[°ðú@±Û–”‹Bÿú~šGèç?°ìñ>>:ÇÄÀ3 ènÄ%`Hñæ¿Fø'+hǾ|Èñ0¾m€§+VŸÁáò¨¡¾Ïomù‚oØôã …/O“7¿_Ðz×%¡M±{ƒÍN8U`!„A“èçA¿îÚ¦\["ó©)þº
+xÚ½ZKsã6¾ûWèHW…<€<:3žYgOÖönÕV’-Á6k$R#Rö8¿~è_¢ä¤¦jíA n4>ô‹â ÿ|‘©„É<]˜<Mãj±Üœ±Å#Œ}:ãD¢xHõãÝÙ»Ò,ò$×B/îke Ë2¾¸[ý½ÿÇůw—7ç±P,ÒÉy¬4‹~¼ºþ€=9>Þ¾þxõéß7ç&î®>_c÷ÍåÇË›Ëë÷—ç1χù‚V82áãÕÏ—ØútsñË/7çÜýtvy×íe¸_ΤÛÈ׳ßþ`‹lû§3–È<S‹xa Ïs±Øœ¥J&*•2ô¬ÏnÏþÕ-8õSçô§d–¨L˜
+>§@•'Z
+éèöÌuÂè€1Ýs‘Gûª¬6Ǧ@ï†Ã| ÙÃ$¢xHuB–@ådY·ízʘ –¤©–§9wT3¬Å€5*I…ÑcÞ·¶màhSµOÖ5dTí7÷v‡õ>»¬«UƒmËb‰sDTàˆÛI˜°{‹”Õª\mYW
+œt–6ICªã&©£
+š>n‘Rpú©ÈN³ï¨fø-¢"åc(xR:˜x=ô×*Ü5èÆ»—§rù4š303nœŽQ÷^EGhyVeUì^±ÇAs[7e[ÂÕ{¶!‚н!Š¥ðN1“‚ø&›@¦o2r˜ð¬+Ç4SÑ‹µ_°Ë13Øt Ák§\FØâ’Œ<Ìþ½q½›âËbßeá7
+¤_÷–|&ô¶4ƒ,×~Wáû-$; ªÿ|t™ÉÅÕÏ?àÜ{‹+Ž<;š'‰”Y´®›ÖµrÔhƒ½8šƒoìª4ãÈÍMãÕµÝΛ½;0G[Pïõ->½Sq~û®ëþÞ]`;D˜xxå!O$ð
++ÇÃ¥ý¾ôØáÀ3pP˜ÄøÚãÌ
+âB©L­A/¥
+Ìaôž¨&Ì‘Ìoù»3Â,_;p$Á~øò¹Açí¹¢þ}»×´›ÐA§f¢*gþpëæd&TÕ Bø¡`Äð&Œ“4o^<V`Èà£_¼†Uw/e·`;^j$,rħϊ]à‘ø]0F}जÙØ@æ<›ÏÞS“n2r×r.wçi’  Ú¬÷X>»:¾o;Û”:áØÁ¡ á­< Nàï¾»e•¤=B_ŸåÁ‹Ï~ˆs_Ÿ„_æ…¥^m±k¨8".s3†®¯3hÍú<¼/Á²P}FÃBŒq]eå"I*ôˆ®Ð#¨x$\ö¨,ÑPx“Þ×”%€Ðp§‹­á…÷¤AŠå~‡ýU;e–N΂„‚ÓÌÍ¥ªÂºÜ”]m¢«*³Ëu½üB•‰/öÅUêè°HÃóD(ª.G£€ ÂréÒþA7 ’õ*õ.Õ,*(áXÛ¢i©¯±x`ÁÀnC¹Åï]ºªŒÐqûù{z›ï($øa¥P N= 8„‡Ê˜ ¢(MaQ¨u‰߯ç·lÜž/µìW“bõs±+ë}(Dùî&ß(‚ÙGЂO?š™r<Á뽑™©ŽsU8FºÒqU¯ìa†ª5ÙRŸ¡£š‘ado
+†. ṧb2>4|ÑAÛŸ? ¼8©Æ®{8kšn¿AÈTùë
+†uK™NÀ¬›ÓrtT3‚Œö 9˜ÈÆrôHrŸècÆÅ.Oõš¾ath‚¶G“+ÃOƒ{?ÕÛ&"ßgw€+_ìò?úºB£gìFPÊ
+&ôØ™½T‚©ÓÁKC®#Ó¹ïÞ®°Ð•Ëèk G²T#ˆ+ÇŒSMœ+çé MDcœ†kå[b[ìŠÅX›‡z74¼ÂxØö¦~ÆE(„æxðeð0슈蟹+É/m`h‡TȽ[¤iÁ7cJ\Ü &Ç~¬#Uâ~a35Öݘïþ!Oÿ+'ˆç¥+–Ì'Æ®– ±rÊ‚1SÉ»_üŠþ?¿õ5Dendstream
endobj
-1787 0 obj <<
+1786 0 obj <<
/Type /Page
-/Contents 1788 0 R
-/Resources 1786 0 R
+/Contents 1787 0 R
+/Resources 1785 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1759 0 R
+/Parent 1758 0 R
/Annots [ 1790 0 R ]
>> endobj
1790 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [315.1789 519.5601 363.5077 531.6197]
+/Rect [315.1789 349.0138 363.5077 361.0735]
/Subtype /Link
/A << /S /GoTo /D (dynamic_update) >>
>> endobj
+1788 0 obj <<
+/D [1786 0 R /XYZ 85.0394 794.5015 null]
+>> endobj
+530 0 obj <<
+/D [1786 0 R /XYZ 85.0394 769.5949 null]
+>> endobj
1789 0 obj <<
-/D [1787 0 R /XYZ 85.0394 794.5015 null]
+/D [1786 0 R /XYZ 85.0394 748.9943 null]
>> endobj
-1786 0 obj <<
-/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F48 1238 0 R /F62 1361 0 R /F41 1218 0 R >>
+1785 0 obj <<
+/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F41 1218 0 R /F48 1238 0 R /F62 1361 0 R >>
/XObject << /Im2 1350 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1793 0 obj <<
-/Length 3990
+/Length 3955
/Filter /FlateDecode
>>
stream
-xÚ¥:k“Û¸‘ßçWÌGM•ÅŃ Àº««òzíSïž=¹ºT’”ˆ1¦H­(y<ûë¯Ý€H‰šI*å) F£Ñè7(oü“·¦ÈŠR•·¶Ì3#¤¹]ooÄí#Ìý|#f–c¨ïo~ø ím™•…*nïF¸\&œ“·÷õ_E¦²;À ï~ùôáãÏþüöÎæ‹û¿|º[*#>þ÷{jýüùíŸþôöóÝR:#ïþðö×û÷Ÿiª`?~üô”ôséç÷Þ~ÿéÝû»¿ßÿñæý}:Ëø¼Rh<Èo7ý»¸­áؼ™.¹}‚ŽÈdYªÛíMntfr­ãH{óåæÂÑlX:Ë?)2¥ 5Ã@¥F t23ein­)³B+xèï–Z‹Å®j6û;éýñqC+êõõÿ&„
-Cþ©jÛ´ª:0xÛ¯¿Róa_=n}wðuÜdýÕxEÕÕ?ôû‹5þé×à€˜ '^J™•Æ¨@~E„е<R§:ø= ÀªŽZF*j¬ž~ÈpGŽ¸ƒˆ]–Û¢ ˆ»j Tؘ‰ZgVÛÀê©i[ÀkÍâX±ªðÊ«8zšî‘†ˆ ÐXó@CÍ~ý&*ê~ßDØžaÍÖ÷ÇÇ Ï;À%MÕRÿ[Õ=H·v‰‚âDì<®.ã±&ÌízDoÊÅÊÓ1  d
-¹øß»R-ª¶© >(
-Üš©$¢‹œtD†ì" ä¢,¨õ7ac }P¡©=ƒoÞWÝ##cª¡µb°¡iÁ¶Ï4ZÕÿ8`³ê £÷^[û‡*ˆ1v¶ԤmL +›³ˆ„A¢í9¢À&ÛÅ¡ï¨ÿì®Ds8 j_^“T6sÖY¾€sy<»­üŽÆŠ“Oìýt}·<âq¤¡ãH“– ˆ ’)DÒ O~¼U¸SYÂç7fÂć)¡'>L‰üÒ‡!ù°
-T7“¾;p°¤¤‹y9õFQ±•Õ×îÆäYY
-ûÊÕ
-nÜžÅÁëX´[÷\‰ÓXÜÛBÐ[u¾?4²'L¬£>©54ªî™°º£&154O©«œèˆ´±2Š×ΠÍlžê¿¡)|óŽðÿºåòÃRö¶HAʽ†“9¨ËhÄuÉ7€ T3¨eHhÉ(AN–C\|_¬×~¼
-¶HCAC›P±¨-Ar¡…âJu~iÀšmQ0tðK¢.éU
-u䨒X6“¢n:—LÿKAH©ä™ÔAì9 Ç­»U|Ù ¤ašj_µ¬2Å_‚|.H™U_–ÅÔ`a!“9¶ë»h­ŠÅÉÝ“ÄÀ“CQi|¢|:]}ˆ“
-b­æƒµiºzî w;>ÐkLž©:L2ö7sw‹{@¸Ì”æB@XÛ V w‹c~
-
-?ö
-¿¥9ÎCÊ‘-…—¿"‰°ê‰J€¹,’áùøi.N
-z鸂XA/-³² qÍÀÍ = T9„x!k€±çþHªÄ¥‹Kí¢£ ‡x§ºªU;Áœž0¤¶g©O¬™êÂÑgR:Ïãc`~b’Æ’ªÇGùR-8•@q|CËŒ×%•ž¹•ã͸×L ¾I¤ÒÄüL›Ö˜|«.D
-8^uôë¿ïÚf² èÅu†lŒ\Ë¥*ÀŸ¸ò,Ü{ÁJYFÓzòêà5Ö›äÈ££Wbæ"A‹†ºxåÓ‚Ðõ80¦yTûî|ÓŸ3^Þ“A.·<{Á̵Փ-9ÐriïÐ9ÄѤØŽÕhó£r¿?ðꦢÿÄ´Ç:ŽG8C¥äÒCb¢otÊ5˜žìŠ§´øymzâáªîò¼óW-uíÓýÿÝÏÙ0hjóâc¼<¹Ñ9EÉÑÅ«×l¹Í
-•\2Æ»¥âp§  žúK~ŠÂŸÔR/]vRdí :a]Ä0þ\fiuA<<Ïq¦ØΞ]ïÃo s^£€Íæ'â6êè¿ýö)>Èm¦SWJí¼–$LĺK}æ¶/Iÿ Íìendstream
+xÚ¥:Ûnãȱïþ
+¿EVܾò˜ìÎl&Hf73Þ¼$y Ä¶Í3©){¼_Ÿª®êIQr XÕÍbWuuÝ›òVÀŸ¼µi’ª¸Í
+“X!íívw#náÙO7’qÖi=ÆúÓýÍ÷tv[$EªÒÛû‡ÑZy"ò\ÞÞWÿ\¥‰Jî`±úáçO>þôëçww™YÝüùÓÝZY±úðñ¯ï úéó»¿ýíÝ绵̭\ýðçw¿Ü¿ÿLR^ãO?ýH3ý\Xôóûï?¿ÿôÃû»ßÿåæý}ÜËx¿RhÜÈo7ÿü·¸­`Û¹‰.r{û‘È¢P·»cubÖa¦¹ùró÷¸àè©uI~Ææ‰U&½]k“ä@YÊ2ɤ¤ÌIª•ŽRVrIÊ ¥¼«ÛõÁ=\ÿ´êûŽÄ°+¿-N{ìáðzŽ&çrÓ©LR‘šÛ1sg[ˆX {P£=è4MlžeÓMÜ?¹ÞÁébÕ퇺k{l»v8ÜÉ|Õ541<1ZïÏîp·†³ÿC,ß®Un’•o-eRX«üÒ÷T>× *­W]K¿~QÿéŸêö‘æKúù½kBfõ/aÅ\ývt‡WÆ2«‡°Ü—Ÿß°}*ÛG׶dB‡1¡!¾¬WeݸŠàáP¶ýƒ;ô äZØÕ¯ýˆ•MóJ„p»¸71Ý‘-ŠÕsÙ]O01Uä$#œá]
+µòÓ–”ѨÕcÓm¼rI8#¯ry.‚ƒÓÑÃ
+5#CT[›dF›©Î¡ 4$»ç¾z'·Ä–I“L3Ùù8¨Ì˜J‹Ä˜<Ê"Cþ¼Â¾ã‰ŸSÊ€lb"€+”2GœfŒ.•(Ò5àFÕl£ÉYÁ±:•yRhùF@c]èË›xÕöëcµ_÷õïgÁ˜OòL×ÉG¬úcÁHe“Üj5eà‹CUWB±PVàg‡º÷6ã÷?~úBЯ?þBÀæø€Fùན
+žt.=¯°‚!Ñ
+0wìeC í³ì}îcòà
+]¼­‰lÛ—·±:Ú€]tS(éŠ&)k(V®ÝvG8rGþ&:# To<2Îb®PȯÎV_v¥—. °ÃˆTÛ/þ{XœO ÎwÈX`ì}'ÑZʛܷ­ëûú™ÕçØ3àe ¿÷?ür'U±ºÅL‘%JÛëAl„t9†¤‘/F05RBÝwtD:§=_:…N'Ä)|éœs@ ^ópÐ)JÅaL§(d«
+áà5AóaÊŸ)dá‰Ñ©šžé$xaÞ3^J˜óà…H¼<:"ÇÁ ßeP:¯É;&äszŠ|Zþ®
+UÈ ›ì…o ø<nü7vu¾.)Ûƒ8JHƒÎøÉ¡ÔZ_—mÄz‹‹³ÕN6Zb‚ÏGq
+΃Æ.ÞÃÂŽRCþ•p`ÓØå7PÀÑì‡qï?€hŽ­ Y*ïóSŸ‡{ê"|ÒR‘H<¸i¥Kþ ÇG¼Õâ& ÏžîPâ6·ÆRÌnÊ¥Ó«nîQp\“iäÀþ RÆŠ`Z|‘†‚¦ž|ÇB¢µxÍÕ•:üÒ‚7ÛñBÞÑÁ/©º¤û
+÷¤10ÅìÀT0@šŸŸŽGŸÐ7^´šO Þ}¤ôHÓÑëx^H=P| k.x83uxÈ«·Ô'F.3§FHkkÿUOø( ç\zù6×mN†4ž¯Á/¶„±ágM÷rº&¾ä‡JÐâÉÑßá$Þ…y$æî ó\Ïœ_bWÖ-§·3U=¶ä&ª¥oR@® ¥O¢„
+™åÅ°|žJ\<)“á
+§6Ýåƒ 7 èý²%Ôz·ï|—Ü#¿.åÆRZˆGj! ›^Ê ÁÍ‹à¿.fªY–¨ ’¼ëŸ¼ž®|ñÊH|©[?¼®+×”¯ç—‹*±˜Æ5Òéœöä,eyÓcâŽ3ðž<~††’sž¥ãï—rìº /ÎÅG-—HYêG€¨Ÿ“òÆhŽ¯#ùêœÂ(L—ôƒ^Û7ÓŠ1C!?€Aì,ؤÈ̬)ˆõE¸.ÁÓr6wú*¹ôí4~ܦ?
endobj
1792 0 obj <<
/Type /Page
/Contents 1793 0 R
/Resources 1791 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1798 0 R
-/Annots [ 1795 0 R 1797 0 R ]
+/Parent 1796 0 R
+/Annots [ 1795 0 R ]
>> endobj
1795 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [324.9335 574.3224 381.8296 586.382]
+/Rect [324.9335 395.6435 381.8296 407.7032]
/Subtype /Link
/A << /S /GoTo /D (zonefile_format) >>
>> endobj
-1797 0 obj <<
-/Type /Annot
-/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [55.6967 139.768 116.59 151.8277]
-/Subtype /Link
-/A << /S /GoTo /D (view_statement_grammar) >>
->> endobj
1794 0 obj <<
/D [1792 0 R /XYZ 56.6929 794.5015 null]
>> endobj
-534 0 obj <<
-/D [1792 0 R /XYZ 56.6929 208.8923 null]
->> endobj
-1796 0 obj <<
-/D [1792 0 R /XYZ 56.6929 185.7817 null]
->> endobj
1791 0 obj <<
-/Font << /F37 1026 0 R /F22 961 0 R /F21 938 0 R /F41 1218 0 R /F11 1451 0 R >>
+/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F41 1218 0 R /F11 1451 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
-1803 0 obj <<
-/Length 2494
+1800 0 obj <<
+/Length 3069
/Filter /FlateDecode
>>
stream
-xÚ­Z]sÛ¸}÷¯Ð[噟ühŸ¼±j§QRÙíìtwh‰Ž9‘I­HÅu}/p¤!Òšv2‚—÷à
-ß>^0ë³pN ßë§û‹oE<KIñhvÿèÅJM6»ßþ:ÿð׫/÷7ëËWt‘Ë…Šèü§åê-)>>|^Ý.?þc}uËùýòó
-Íë›Û›õÍêÃÍå‚%ŠAn#œèp»üÛ ¶>®¯>}ºZ_þ~ÿóÅÍ}ËÅç˨ÐDþ¸øõw:ÛíŸ/(i¢f/ðB KS>{¾J%…p–ÝÅÝÅßÛ€ÞWÓ54J$D%<L çÞ2
-mÍb•’Hpa&p[ÔÙÃ.¯‘ÖþpÉ’yµÉëº(¿¢­zÄgó”cãc~(òš¼!O U°.1‡øJ°ðb[§…ï…ce¡Åv^z¬OUÝ”Ùs>fà$˜vNàÞ$ Ix*È÷†{uC0o3×ùá{~°í§ê¸Ûêv<7Ó™ï«Cƒß¾6ìCOå+6Í4û1Óo¥?3<aDÆQ
-¬ü9!E¹E÷˜oYß—¢y² ¯{»7ë ‘D¶Ìc$Uʲÿå>™AS(ú‡Kè«æ›]V×À‚’”Ã~ nÓ~¾ D1‰x[/‚!Z·¢ù6ÌŽ»¦F{SÙ§ž/ý¹[mÖÓé}VóçlóT”ž¯Iðž‹ëÝ­§¶f†dnBd"ÝÌp3ÆÇêX꥖ñüA¯£LìúákÞ¸!ýF…¿ =å¦)ªR¤©Í-è°?Ï™Iýr<ì«:Ç&7ÀX7Oh±{Í…}ê)Ñ‹m^6Å£ôòT¸^GS¡}:a_qï÷øj0ᙕ¯›¬nðçEÃÑaµÇ¦9f»Ý«ó¯_`lF=àõµ:°ÕÊÆ‚§ÑünŸo`ˆÚ/.[<áj㧬Êü/쉉µ²Ð¾®™µ© TÒ¨Ÿ×ÿµ‹#°cĸÚù^§Õ®õÒ£³9#\Û·’§Ñ‡o½ø}Ñ£„‹Tõ€‰™Äóå5>ghåN·Ü%¹Ktêå¥ÿe“ßq¦Á”ác… ­;/êÒ¤ðo”rgÑ{hu·¼¶û,(žŒ1­><çÕÁE6‹Î”V¨Þš[Åe)3KÍR»ÔÚpBqµ„*æ’qyMînÖÿ¼YRP)¥‘êÉ­|Bn%œíiìôî}*«ÃRYë$ŸÊFÊê÷8´!mmEHÁébV„´Å‰Îv§L£¾¶í¦Õž4é7+Mºiôž><1ê}ub¤_Z12í³#ôoÅH¿¢éV'F2š£Zö·%(K|Z‘$ì~úF‘LŸ¡öh›a™Ú}¦Ý(cÅÇGÉ$S{véD44Ðò–§mÚîvØe“ëe‚ PF°þÖÒÑC%TT)“.‡M&¤r®Ck]vl¥€ƒ9«ÑjXmÒG¬6Ù"|ÄšNÝKŠÙ­í¶„9’©@ƒiX|œ$Ô÷"u›¨íÆ…äŒ(Ö æN–@@ÎA:dÒîÊP<ظ”A"‘\`8}gaP´Å°%)…»Ï±Ø5‹¢ÄÃëæyß¼bó_€[€!½á” ±’&ÞÊ,âB(12K ä¼®Ì¢€é¡®ßrŒ®]þc¢«^‰»ÏWhÏJlu‡O{Tæ¹µ
-6¸Š „úèÓqSd°Y¹^i&d;f°o*<T…Ùi¦¢„¦Þ2õ>Ûä¶ÎCs<”ø}õËõçOW˾á×z_•5vHKH?f§V‚J ‰ûìЛEˆÆqË ls|w¡ þvƒvÕ¹¶á 4Ç¿ô8€Ãce»dÛ­qÝ~ÃY~F‡õí4Ãy–XôÖ&Y*¬ s
-bCí>Û¾¢!ÿwQëK¦n›¥Ð±ì;TÅwÛQO<æ©“ŽG”
-kù‚¶]h‘ Í­çÓÞB¶9Ôx‡La¶Þõ§ÔδPw ±±$šÜùâ3ï
-ú^ææ' W¹@3^,=êß(‡Ã …*$’ñ8jëõ6øSZ–Q²\-®®¯×äjýå2åó«SÔE’Âe•OP÷½NSo½&©¢vÔßÀ©÷`MÂßO?f$† þ}Ïk„¾óš¦?†êцéû°,>¾$¦rŠ¾ç5BßyMÓCõèaÃô}XŒ³è ¸n$TLÐ÷¼Fè;¯iúc¨ý!l˜¾ Wô³èC¶D*š¢ïyÐw^ÓôÇP=úCØ0}–Ó³èóÔü냧ï{¦ßzMÒEíè¿ ÒïÁÂ%ï,ú ƒ[\2Eßó¡ï¼¦é¡zô‡°aú>,Ü[Ï¢éŸ)äÄ?ú^#ô×4ý1Tþ6L߇åâ<úRÑ)úž×}ç5M Õ£?„ Ó÷a¹<>‰Q4Aßó¡ï¼¦é¡zô‡°aú>,WçчŠñ)úž×}ç5M Õ£?„ Ó÷aùyU\¶‰L’ ú¾×iú­×$ýQÔŽþØ ý,?¯êc± RcÓ÷¼Fè;¯iúc¨ý!l˜¾ËÏ«ú˜RDÂ}i‚¾ç5BßyMÓCõèaÃô}X~^ÕÇDL$‹’ úž×}ç5M Õ£?„ Ó÷aÅyUƒ"Y¤|Š¾ç5BßyMÓCõèaÃô}Xq^ÕÇ(#"JÒ úž×}ç5M Õ£?„ Ó÷a! KßÏ?DH9Aßs:ÍÞ9M’ƒì¸1ƒÔ}Ì÷ÿÆ)"¦~áé|N3¶>“„Gð:¾À ]Á÷þ_5ˆ ÿ?økïüŸÿ?œ÷»`LDrêWA#’ð4vƒÒ\ât8òö?νú²Mj¿endstream
+xÚ­Zmsã¶þî_¡o•gN,^ùÒ|rξT™žîj«´I>Ð"mqB“ŠHÙq}w±
+š{»r" „tã |¹P± ‰c§µ)Ó¦Á
+*ìxg¹q]DJX•ï:ôñû …ó´z%…Dz¾OKa ©Ý$\¤qGrÄ4 àÙáÒ6Tif
+’hžŽùÌbÇÖ!àßú…¨rÄy°,Y§›Õd¡ª[*¤»]ùJ¶h*AÖRô`ÑDTóåÉ^ëò¼ìzÐUnXEÖRV4é}ÙÙL áD”QØ'cfR†ñü`BX)ËHPè&I*=¿Ïöe"æFÂxOò-ì _Ò#ë/®L|ŽjxÀŽgIG~%£Yþ c¢*ªG’§}ó?ve±)Zª¹~š8$§¶åB„:ˆâD÷§g‚ 9Oµu856Ûîwçô¦,ào‚7TÆ
+BÑÎÀ!263‚BG×XA¢ÇoëZiÚÓ’jÝ’a¥Kr l¢Èôs#Øu„´ F2œßíòMñðŠ9r>1 D4X
+k˜h2¤12ìS¹e9i6ÕÛ@mÁ$à.㶙4n"?…Zc~«’é(ôµNGa§…¾n!·t{³†tIÈÏ& ;¥ý=ù¶HÔÀ2a]0µÖ‰»(IJ‹B ö^BE!ìÇE!Í4ûcžŠÂ˜9„‰]zçЩ0„ù–a?ÑÈxB~ ÑkÙß#ßÐWŸÎ§ áL¾;ð`È5…HºÈkHŽÇ´ùÒ•Å_Ó5¢kÖp¢l¶Eåéґ竸ޡwýÑ6“ ùV¬úDóPÃm¦TEæ@ʱ(óÖ¹„¸M>AãáP™t²Äî-è°ÛO©ÙX9ìwµIf”ehÚôJÅ.I\دÉ\ òˆªî ©ËKiœ‘{îEðãÑÞÍvT56á iá&mZªÐ¼ 9“YÔØ´8¢_~ó¾ö€*ä\{*u´ Õ9zƒ½%b¡{œÆA~ûnìÀÓ™…õyÒØDL±÷ý_ØNEQÀáhœf;_ë4ÛuZ^’ .Šì-å!;ÅbÚ|§5b¿Oz n­³õ Góå5}['èèËŽîâÝŸõòÊoÙäÅ3Í4ˆRú¬ha¡tçº4[SS'ÁZÝ-¯m„È“sŽìƒ9|½w#›E
+ª·æ–qyB/ <±K‚Œ‹ª¹ÛŒËëàîæöŸ7·cW¸l&a?çÁOå<2ÐIwˆËâp'Ó›7ù·±lxdYrMsÀŽ$„ÒŽ„°…¦‹[B‰#!šíN• 21ÃÝL[Ã÷HMX³Ô„EÃ×ðMéã‘Q¯Õ‘V:22Ûï‘ŒH¿##¬aéHF*<CF¶ì‡%0Ktš‘D?{ÃH¦Ï{PFYaä²ÉÈó2ÒbÚKÁa3ÅÞ+äÐIG¢cŽ&°oEÒmÛ²¤.›ôÐœHd
+²oç´ËÍQFN ÆœZz@~ÕÁ|=ˬÇM×v|y…ÛOI §Yl­w2Åie´@fõ\GpxÂÚð×æul·¥eSS÷¢Ú”‡,ïÐQ¡Ú(ä˯Ï!•ÌÆ´.±‘
+kùB–-äÆö‹§ÓÝA²2¼½ùÝÌf»þ”Úy€ñ¾‹ZîÇÑÔÎn~<
+ß°&{÷µÌÅ@/qb,½±èg8‡÷%IH¨¢i«Ö[³£¿X÷Ìr,W‹«ëëÛàêö+¾ï_„Ž?ÌHœîiM@wZç¡OYõ ÍŽC÷ÍšD|3| Ø ŠÕ4zOé4x§tû”É#ô¡ÍQä¾M½x¤%!«›FîiM@wZç±OYõÀÍŽ£÷ÍW¼ ¾† jÌäøžÖ|§uþ”UþÐì8|ß,ÜÍßÿRDœÝ÷žÖ|§uþ”UþÐì8|߬`ïƒú2
+Ã3ð=­ øNë<ü)«ü¡Ùqø¾Y¸Ý½ >êÌqçkMÀwZçáOYõàÍŽÃ÷Í
+ñ.ø± BØ9Óè=¥ÓàÒYìS&Ї6G‘û6…|ðPgÿ¨s¶Õ9‹zÂÞôÀà(fÏ Pï‚,ñˆå[øßÞ+þç¿@<ΞŠÇ'ž¶% ƒX$‘s
+áDÉÐóîOߺþ_,ÉF–endstream
endobj
-1802 0 obj <<
+1799 0 obj <<
/Type /Page
-/Contents 1803 0 R
-/Resources 1801 0 R
+/Contents 1800 0 R
+/Resources 1798 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1798 0 R
+/Parent 1796 0 R
+/Annots [ 1803 0 R ]
>> endobj
-1804 0 obj <<
-/D [1802 0 R /XYZ 85.0394 794.5015 null]
+1803 0 obj <<
+/Type /Annot
+/Border[0 0 0]/H/I/C[1 0 0]
+/Rect [84.0431 671.8392 144.9365 683.8988]
+/Subtype /Link
+/A << /S /GoTo /D (view_statement_grammar) >>
+>> endobj
+1801 0 obj <<
+/D [1799 0 R /XYZ 85.0394 794.5015 null]
+>> endobj
+534 0 obj <<
+/D [1799 0 R /XYZ 85.0394 740.6547 null]
+>> endobj
+1802 0 obj <<
+/D [1799 0 R /XYZ 85.0394 717.7278 null]
>> endobj
538 0 obj <<
-/D [1802 0 R /XYZ 85.0394 576.499 null]
+/D [1799 0 R /XYZ 85.0394 401.004 null]
>> endobj
-1805 0 obj <<
-/D [1802 0 R /XYZ 85.0394 548.9529 null]
+1804 0 obj <<
+/D [1799 0 R /XYZ 85.0394 372.9762 null]
>> endobj
-1801 0 obj <<
+1798 0 obj <<
/Font << /F37 1026 0 R /F22 961 0 R /F21 938 0 R /F41 1218 0 R /F14 964 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1808 0 obj <<
-/Length 2487
+/Length 2192
/Filter /FlateDecode
>>
stream
-xÚ½ZßsÛ¸~÷_Á¹—R3‚ ¶ONl§¾é9©ãN.÷ÀPT̉TDÊ®ï¯ï  D‘N3Óñ$v¿‹Ý%PøcŒIœò4HÒˆHÊdo/hð Æ>\0+³tBK_êÝÃÅÛ‘)Icko-E¨R,xXýÆ„“¬@Ã÷ïnn?üëþr‘DáÃíǻŒKÞÜþã[î/ûíò~±dJ²ðýß/?=\ßãPl×xw{w…=)~œYôþúæúþúîýõâ‡_/®:,>^F…òýâ÷?h°Ø¿^P"R%ƒgx „¥)¶‘DFB¸žÍÅç‹v z£fêÌRDDþ–eJbÁEÇ2‹<–ƒ1 pRšå/”%ÇPX)øË(uB§J9÷”*FdšÊ¡R.Ã8%·wËË««{ryÿi‘òðò,ç#§s>æIM wR³è§”öè•Ž£÷•r¢ý¿=„S•Ì ÷¤&Ð;©YôSJ{ôÇJÇÑûJ¥D2 @½ž
-I¥ä¢5AÈ°¬‹}Ùš•D®Íœz‹ƒõ®-ëªÁ¡r€²£º{^`¬ª±sÕ›½Î<pæAo³+òò ¥Üé64¢ì°4
-K#@T†zÿ¬žú©ØïËÕFŒu¸ \Þ{ð°)›Öv¯ñÓ³žŒo°ýR°‘gÕ@:ÈYÝö+`+k- m†dÕ¬ë=6ŠÿdÛݦø«Fóö&bÃã”8òvŒ~mmYv—¨5¦4ü…üò7\ap6–#KÜj
-ÒØMýÍ„‡Ã‚…MY}Ã'¡eV+”2N û¬úVØv®wÄŒ®°Ã9˽yI¯©y¬+“mP&[i/Ieø˜=Ye8
-”ñÚjOéx{»åÁU €“[wé-l Å~pKÔ¸ h‡‹N’H,øÌF'*Üè™i¸ËöEÕb/챎IáÓ‚CŠBwUáz]xnÒþ¨ðÏ…ÉÜ…ëÂH™@¼à:¨ã`¶Ù`Ã%>róqàP­Š=6ÏœñÎR%ý¹
-ƒ({Á§!
--¨Oq…7åR*4,º… ëd Ñ©I%6j!÷‰Ø.mÄ¡Ü´KTŸæ=‹4hß® <—]ÕG°zk[µÛI}Nሆ•ë0UÀ‚Á‘ß4CùUQìÑeÕŽ}Qtöù¾Å)á*UŽ~îhê õ»¾eÿ^ÿçÇJWÅ„©a™J£ñbr>ƒ“¾ä±€ã'½ûù¦¥“Ò;„uFÂc†`MÅPûëžhï¤FÔû§—qF¢êöþϺ>\ëœ)ÒðÙäݲ™¶ÎkvÜ8‘naªÆ¶Þrý‰‰ãÁ‡*XtÏç—þP^›O;h¨nX×ÖMS€è¯Àƒ ~2בBhJÓ¡‡W]XÚÚÓ«xßt¹¨:ÊJzý¿Ø ˆO·ì!–ËP¼¬Nó“ÝoÎ)I¹à3NáIM8…“ê"¯«V—Ç^’J±dZ}'5¢è’¨X õwN¡C:…Ž7Î ÓmYƒnËšŠ:¯Ðm¯lPŒŽ¼B¯è‡z¯Ðƒëê¥ýQÌ‹:LjàBæ#Šøtô3Žñ…Ã×ÿýOŽÀEelÚ|©óŽÐIõŽ`0/uÜÞ'Þ)"e’NÛÐI1ðý§€(8°âºê¯cî5¸£eŽ-·Q³$dŒw/®Ú\g‡MÛ³oû3¿*DœdØí9²=© ²Ô™«Þ Ù1$À¦mè¤FŒ’͈J ó ¬¸êˆúJ°*ŸÊÕÁ”ðÜÝñYÏ/_èóø5¯ *»Œ÷ö€u7q3W¸Ap}ƒ‡#—x|Äë8LøŠ¥Ó2¡„'ò(þß/ÀömÁ€r×ÝÞËmþÑô/…DD¨´ß3èß@:cj±dnÙ—«U©_+dÖ¿>y‹ê_dù£¾ÖÞ¡
-‚°&$óJTI}Mí–QYÎ.§sXÎ\ c][65ŠäàÛ
+xÚ½š]oÛ8†ïó+„¹Y¨Y~ˆ¹{•6N׃´›z¯fæBµåF€-¹–læ×ï¡HJ´,“1
+,‚ÀùŠ/ŸÃOK&†?ñ¥’Ê(“ â˜ðh¹½ÁÑw(ûtCŒfjESWõaqóþže‘D2¥i´X;u „… Ñbõ{œ"Š&PŽ?~~¸ŸúÏãí$KâÅüóÃdJ9ŽïçÿšéÔ§ÇÛß~»}œL‰à$þøÏÛ/‹Ù£.JMæw:Gê •>Îîg³‡³ÉŸ‹_of‹ŽÅå%˜)7¿ÿ‰£`ÿzƒ“‚G/p‘’FÛ›„3ÄÆlÎææëÍ¿»
+ÒöÖ±øuš)K
+S °*å?0Ɇ¨ÔGÜêÎL­èÜ”RÇTĥ䧦”#’Q4˜ÞÞÝ=¢ÛÇ/IãÛ‹!O¢‚‡à•Þª‚ð>Ó~h:ïšÒô:xJ‘d"ï¨<ðV„÷™öðCÓqx×”f×ÁcX6$ Á;*¼Uá}¦=üÐtÞ5¥â*øTÀ˜$xWu¾S…སü™é(ü‰)•×Á§2#xGå·ª ¼Ï´‡šŽÃ»¦ _ŸHÄa» À;*¼Uá}¦=üÐtÞ5eä:xÐSÌBðŽÊoUAxŸi?4‡wMI
+“^^AO(< À÷"»Ñ=Ž=ùÀqÜqÄo&æíÑPú‰Ñeb+
+û;â¡ã(±ëH`o{33Ø4°²;"³™=Ž=óÀqœÙq¤é|;7‡E1ô]Áy¸(Èíq칎ãÜŽ#EøªYÍ™DIš…¹£ò[UÝgÚ³MÇá]S‚1Ⱘ÷µ7€‚žg¹£òÀª‚ð™öšŽÀ5%„Á
+‰HPBÓ@\Õå(tªP¼¦]ÎLG£pbŠÑÏýÍ¿¤áˆ¥)™ˆ9*OĬ*1Ÿi±¡éxÄ\SòÿˆX’¡ŒÑPÄ•'bVŒ˜Ï´ØÐt<b®©@ÐÚlZ~ú¶ÀW-&x(ŽÊ«
+FÀgÚG`h:×ôÝ+Ú·‘ˆY€ÜQyÈ­*Hî3íɇ¦ã䮩@³+ØGRIì®ê2{§
+±{M;ö3ÓQöSy{– ó&Àî¨<ìVd÷™öìCÓqv×ôö:vØ¥ÌBìŽÊÃnUAvŸiÏ>4gwM?\d¦4A§i4%‚ež¬Ì¶»ÃëdJ ÿª«¢QÉ$Î÷"âBç7ÅáÛ˜«ü %‡'“ñ\/:µ)ž‹© Z鼺ژêóÝN'áÞº¿µ1ºµ.ZnòÆdÍNÜ•ò_iE1ÒbÞµX‘b@$HróÀØ4ñ¸¬žŠ}yhkbi¼nï©·º°ÞʺjtQ¹Ö™@Ù…²û¸@YUëÌUß<ȵ̓Û<ÈmvŲücj½Û0jaÂÈLa/TÿŸú¹ØïËÕ€Qw£®†c‡.6es0Ùkýé´®Ú¾Óé×ú¨˼:Ñê‹Î@Ǭ>ô5èT~ j†26ëz¯ÅóínSü]Ѽ¿OÈétÊL†ÃTw¢iÌ´ ïTۦǿ _þ¡«8™Ó±:æ*25¨ÒíN¸8NHÜ”Õw}¥1”fµÒªvXBÆ>¯¾&½T}Ò–®t†.ïT÷e½SóT7F“o´&_©q"yü”?3]
+)"w&ýÜäTË
+ÇW#]ca–^xÅÛ>¹>Í2D³ÔyÓDÆ~/cDªôÁB¯„Ãø@(IÕ«í¾Ö3ëNtîíÎ\B JõjÛ1ÿªŽ‡kµa2¿´›J™Ö´iµ©™òvü¨”Þ§uZõ¶úÔ»2$ôçR»ŠÊùúùÖ-ZÖí§)lwO•0£Z%ÛÓ‡ú 8<µß"˜DÖµÓÉ[uÇÀÒ=ï»n#ª[’ªÿoæͧRf~@ÊnŽprY¡Ë_àú…ÏH—ànøé9O?2ÄÄ¥ßlÀ,C‰€JL£ÚÇø¬å°ÑÀžŽ4ýU„oendstream
endobj
1807 0 obj <<
/Type /Page
/Contents 1808 0 R
/Resources 1806 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1798 0 R
+/Parent 1796 0 R
>> endobj
1809 0 obj <<
/D [1807 0 R /XYZ 56.6929 794.5015 null]
>> endobj
-542 0 obj <<
-/D [1807 0 R /XYZ 56.6929 118.0298 null]
->> endobj
-1281 0 obj <<
-/D [1807 0 R /XYZ 56.6929 92.838 null]
->> endobj
1806 0 obj <<
/Font << /F37 1026 0 R /F14 964 0 R /F22 961 0 R /F41 1218 0 R /F62 1361 0 R /F21 938 0 R >>
/XObject << /Im2 1350 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1812 0 obj <<
-/Length 3902
+/Length 3381
/Filter /FlateDecode
>>
stream
-xÚ­ZIwã6¾ûWè6ò{- v’/'§ãN<¯»“q;“C’%A6'”¨ˆ”må×O
-à"Qvgºíƒ°£P¨å«ńÿ˜¤†q•éI’if¸0“Åú‚Oî¡ïû ÆÌâ YÔ·wÿ|§’IÆ2+íänÕ[+e<MÅänùëôíW?Ý]ß^ΤáSË.gÆòé·7¿£–Œ~ÞþøñÝÍ÷?ß^]&zzwóãGj¾½~w}{ýñíõåL¤FÀ|V83áÝÍûk*}{õáÃÕíåïwÿº¸¾kÏÒ?¯à
-òçů¿óÉŽý¯ ÎT–šÉT8Y&'ë m3Z©ØR^|ºøw»`¯×OãŸQ)3©LF(åMƬ’Ê3°©à@2™6Ž
-ùrY4EµÉK¬§ÓÚ-°J‹jÓ¸MC•Uµ£‚Ë48ßÔO.´ÞÞ2*|¬7Éd&z„ÉÄ0 ÊÀq¤|ë¹0®
-Oâ‰IõôéÁ!©‰rm5ä d6äuhÙ„ú¾y¨vE“ÇuL'!ÐMŠ†ã¨ï¯jvó
-åÛò°6ö@MKWºû™ºžŠæºü ‘Kº/÷Aná®GòÆËžî(÷¾yÞäEäIz.Öû5UW‚ ½û\“ B㊚œ| †d.’ÁDE
-º†îÆÏÛÏж̛|T8ôz¡,ˆácQíkª,‹:_>‚²ç÷±{ŒIBq–i©>à IÅeß Á’A¡T„_º«?÷E0KÔºÞ{_‰%R!Gvní ~ Òw¿h ¸çÛ æ)[†Ãµ¼˜ «˜HºË!žÜ=ìë7h™ÁC¢…¶¹Êœøèj§mÝŠ‰nšàÖ¯÷6¸Fìôc#8”z¿Þ¡´ä7ý x¿F{x?l_±ÈË7c6©ioap[–™LÈϸ,kDÕÁ€™LÒàQÀsÍ5  ÌKÏY¨ÍÔ{Þœˆ„³TgC"fnƒ‹ŒÐb-Ó\«­ˆ`Úró¢ JqF
-êÐì¥hÎ˺¢–mU×Òãkžà™¶nQ¬¡18lpÉ#íÞo·ª”ź8RòVnÍѽ{®Âļ§½ó0z_sUÁŒR6^Zþ< œ­‹¿Æøš(Àµ&i9Bg‘
- 9’Ó¢FÇÝÌ]Ýtk:À;5U½Ý‚1QÀ )hZo$r6Z[ʳ>G!£8'B™©i¯5Ñœ!š,Ã*ó0æ2`ÉK7®¿_,œ["V‹Óú>§SÛ}N{”®®Ã¦«=ºµÅ±÷ˆG¹ÛÁ”YµCI<•YB@Ù"2ŒýA4îHŽì@Á•H(À蕽8C
-‡æ͇á­JˆXø¥ Ã¯×.ŒDQþœáBKw ¡_ñ§‡`È$ã^GpñXµ"€DíÀø2@’Q,y—\U%„¤íz1P»_¯óè
-í¨
-—Ñ67öˆ\õr^PÉ×ÕÞ'm LUu3”ÉÓTržŠjð»¯Ã‚'«ˆ“U« Àë„Ytz¸mm³é/TÆ)þîÀ¢
-ÁõQ,P‡ð‘<˜öi*›°Ô½X.‚9¬··%+¾!,ÚÎíòÞ-~„’—/*ö’"¸Õý}€‹5Ä å!,RŽò¦£m$.jÃUÌ·Œ@L1Áí–ÁkŸÖÄæœ~::eÌšBëÔ¬ØzÛµÇÂ=yscÂEË|»- â .¸Íw
-IÒ=¢%¶ŸH³é'LÛÐÓE^.P
-SKb"1Z
-KC¨‚Ÿ¨ /D?¾âkqt½E æÏíµ,êE@>q3„|”úÊÜà Þñ[ªã}ÃãÞ§ë[üîâ?ï0Ÿ}uó><|©Îz¤SWwòYð¢,à\ìÜ÷ãÊ0üè{$?Í'‘ú/þ¶¼ûðbl•¦r<Ñ­¸Ä 9…\KÅ1åíG觤ÿâa=_endstream
+xÚ­ZKsÛF¾ëWð¶TUˆ'€9*Žœ(•ØYY©’
+4ãz•î¯Øê ú¾¿ânÌÆÚŒG}ûpõÏ÷2Z™À„"\=lGkÅ‹c¾zÈ~_¿ûáæ—‡ÛûëÐlײõ·w¾#Š¡Ç»Þß}ÿëýÍu¤Öw?ùþöýíýí‡w·×kó…[áÌ„÷w?ÝRëûû›Ÿ¾¹¿þóáÇ«Û‡þ,ãór&ñ ]ýþ'[epì¯X M¬W/ðÂnŒXí¯”–VRzJyõéê_ý‚£^;uI~JÇ*\m`°dB-K™LƒÔ6‘â¸ï¥,ø’”ý(”r¾?´§MZWm’¶ó3se!`åñ¯¶ïG-ì/Fûs­Áæ |:äi±=ìcµ~Ù%-¶ôÚsdÉU²Ï‰üR”%Ñ’Ã!OŽÔ.*êmw9Ž×<^çmw¬òŒº>}¼w¥µ}ºÎmí²Ò æ—ºÊ°ÅÕún‹’uÀB æÌy`´ö
+"RÀÕ0ð0à1äÆØú&ËŠ8Jœ}}ÊÓ–Ä“¤»¢zr‹%Ë`y„QH"}Àø#•^'£å¤RëÆ/‡),—ƒèdƒA75 IÁ¶áh¯ÀcH8"†<a÷Hìô^„ â(2n˜[Enªh—¢jó£cËqBmM¤b°:¬ŸÝQZ?‚TÛêªq]‡ü¸¥8º!Å ®ÆB1ÕÜ>©RÔRdÖõƒkŸÆbÐ:L¼þ"$ô¡ìÀ<zm
+¹´÷X˜Ü ‡=U6òŠmyºæœ¯mL×ë;·Evˆɱ-Ò®LŽ0náLùwÜâIžsùr‡ÞœÍð_ãÀ^ã(•{ïZðÑ¢Mü:z°èîñ\B}_(AÅŠÊÒv‰[{"R–—ùS‚Bv]/E»£.;hr 2·§²sv ºž$ùÎÚžôO¯6Þ"ù±M
+7ÄÙ ²ô¹Øw{z™¨ #}îɸ%’›3É?‘&ÛE’#hï`2ŠaoÛùOóÛø´Ã²›í±ÞoÎÅÎT*ésœu!­‰ äÆǦª^ZFZÇãð%îüŸÙx¯
+U C&ô Ëô † ® ¤É „4cRTÖ
+ ñóñÓѲ¤M£åGn!˜ásQw ½ pËžÁÙ“'ß½$$.Y`”_‘…Ô®ã,K:O„Vឤ«¿ºÂ…%¢î;›+±UèS¼Ÿ¨‡üÝ.êå6x³œeîp½,6<”æÊyØu ¢'
+ª‹àÍÂ<SKD—°!š@ǃ‘Su‡ƒ‡*e±/fNÞÛ­žéÝú´¯z“‘÷>žüÍÀ²T…æ–2ôJK>oœd›âË’\# E©Žz‰ÐY NÒ¡‘Óìu³ B(Û zœ¥Ï¬’²/¼ï‹ŠüSò?uÑJ="Ñ„˜ˆ6Le¸}{ü2…HÚsçÀÉo×B~»Û,%îºk 4ˆ"]©÷¥Öë…
+LИ$|6†½ØéVzÉËrJ¡ùœõuˆí´!
+eú5]‡—7XIOÃâ&½ëê—Ñ@[„³Ü66$=6$èA¤ùÙFí †Ì¬A÷ÀÑêx˜ylÚaÍÜU‡Ú!Gã Lû[¿ñ&Èäf1¤zÎ͇£‘Q©ãQ‡0rÝÐe¥yeÁFù"Ô(
+¡ðü­°e­×ïÒ4Ïm ì§ÓNã6&ÚݸdeÞ4nÓí„Õ‡cßû&Ê;aʦ>¢%¾¶YCMÙƒ2¼TÓ ‹N\òˆjŽ‰Ùš3P
+-s¿‹«þÆ‹¿ì
+@ –Œ{Íãܵ<†™îÃÐÍ[º[„“~Ém]BUگ篇k»ý>ñ9ÐçÅúà ¯3× ‰Â5ã2úïÂõÙû^÷ŽZðË÷½ãQçï{ûQ‹8gú% ÌÅíûQ ûOK&‰ø-ž2p·äõ&à¡ö á
+_€N
+
+MѾè/ê pžåyu•&¨œœ}øöW§ig³ÝY›å`p ³‹6;uÞfûQgª…‰©ê8`‘~ƒ~Ôå@ÁÍt8cÀ“£k/xIöugïm M U53´)ÓUžZJž’îÔàÙ5nA‡“¥Çɲ÷õ?Ü,:=~é û á§XÝADåœÍ>úzî>RSöfZE5–jTÎy0‡ï=Æ-\Ë–‹ßíçWß=~„–µ/jŽîEp«§'¨Ê“[¤ö{%íÀÛB]ÔW¬Ü…oá1
+q
+ÔñW:¾~.òN`Œ; o™eArÁÉ
endobj
1811 0 obj <<
/Type /Page
/Contents 1812 0 R
/Resources 1810 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1798 0 R
+/Parent 1796 0 R
>> endobj
1813 0 obj <<
/D [1811 0 R /XYZ 85.0394 794.5015 null]
>> endobj
+542 0 obj <<
+/D [1811 0 R /XYZ 85.0394 637.344 null]
+>> endobj
+1281 0 obj <<
+/D [1811 0 R /XYZ 85.0394 611.827 null]
+>> endobj
546 0 obj <<
-/D [1811 0 R /XYZ 85.0394 316.8843 null]
+/D [1811 0 R /XYZ 85.0394 133.1815 null]
>> endobj
1814 0 obj <<
-/D [1811 0 R /XYZ 85.0394 288.1782 null]
+/D [1811 0 R /XYZ 85.0394 105.0145 null]
>> endobj
1810 0 obj <<
-/Font << /F37 1026 0 R /F22 961 0 R /F21 938 0 R /F41 1218 0 R >>
+/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F41 1218 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1817 0 obj <<
-/Length 3438
+/Length 3447
/Filter /FlateDecode
>>
stream
-xÚ¥ksÛ¸ñ»…ç¾=Ñ|?.½v|‰óµqrŽ;íÜãEAÇ©”_§ÿ½ûJtï¦M&°X,‹Å¾(ÿ܃¿þyœ¸Iäçi¹±çÇçåæÌ;_ÁÜ»3_pfifc}÷pvy¦ç¹›'Arþ°´he®—eþùÃâg'q÷(xΛw7·ïþ~u‘FÎÃ퇻‹Y{ÎÍíß®¹÷îþêýû«û‹™ŸÅ¾óæû«×÷<•ïnïÞ2$çæ¢÷×7×÷×wo®/~}øáìúa8‹}^ß ñ ŸÏ~þÕ;_À±8óÜ0Ïâó= <×Ïóà|sÅ¡Gah õÙ§³‚Ö,-”Ÿï¹A˜ ‚)ƹ›„AH|XWúb&¾ó‹çu¯ºªY1€'§jzÕ,Ô‚¡}Ëí¶»ð3G=©¦—õA½½ûÄkxr^5‹\Ñ÷Eù¨_!žlÐp»_Wåš×¬:”û+
-3ý®k4¯.„ÞíG/°æ‰}Õ¯yÓÌynw÷Ú½áCõû¶{¨á·™:YQW…F…Œ„û Žòeò%òâ#»È|ä\™ÅÕ“Y­æ ›ó9÷Zu h…’.»jÛ3¬lwõ‚Á 4ÙVj†»¢áñ®Tit~ʬPí—ç ß÷ñÒ–Öu»'
-¼ˆ¯&ðâƒzÐïÛ•ê¯(K’·=ILÀ²Ð5EÍЦ]ÉvÉó"4€Ôm9 ™[!ŠëBö!4_÷ Ÿ %õvÀ³Ì¦n ¶®AýÜ6ñaᨅÓuûJ+¸
-šÃ~m‘‡vÇÆÎ`_ê‚»h…’
-Æv‘–5‹¢ìhimh ÄÞi¥\È·Ÿ„’i4í_¦”ÑϤçz—AôŠåÀ§@ùU«µIoUY-Ÿ$¶l†ÝEæìj¥¿á+ŠŽuÉäB5ϳ¢Ñ{ÕÍÐ@â+€3$žçü‹›±× ú77êK©¶ýlÙµ›ÑŠ¯,Q~e–¼ž:ôhw´¡G{¿LéHñ€n~9eûu»”·ØpKf€®Œ_¨±X8ªU¯Î ^ìŒ /*!Ǻ@‹Ù.awP†·ÒÛmǬ°BÄvGdu„kÔ>ÛéºFe»Á¹WS’<z<È2,ýZ^¤>èäUîÏð,ß)Dl°ñï©«Get¯ú#úeرáòE^õËŸ¾V›9ë4‘¸
-T³ÌùT5¥:¦ã,Š¾à!Ê›ç)¼2ªdkµ`Ø/^ì øöhg¸+ÇÜ Ä&Z¢s©³)úr­ôÑîôrñù+¡ü?XfuújöU]so.jÕˆá]¸Ã–8?àm©ètÈïa7qÖ`ùpÓPŒª6ŽH
-£š=FU€k5f0IƒyúnÛ†ßvÆ,C»Võ–{敦ll0±Ea
-ÐÙdLb:´;-„ŒÁlå­A_˜ömO¥ïPtó?H!Ì‚¿—ùê-‡žŒ)E‘u•0hçOU»Ó3œ:P*?€÷¥RF„î·Ì£W¡}o°RKúkèñVfÄÑGD7T%öˆ,ƒÁíN<]Ýr 2ª‘¹È67ï)6OnŸÅ&ÎMuxÉ€ šÜ¤‘ùQ¢¤ˆ5Yˆ†eæòòqDAL€'ä‰K /sQÏIÍ6¬OèèQ€Šå€BÉhø2áÃäl„ß÷£làc ¤¤ òSÛÓ¾û?qRGÔ¾¯‡›ŒÙ!"NDúœ3@ŒŒ9w!4¯w J®~bË^tPD¬«ME=ÎoT IX¥7<¤(p6í‚ê?ã :vŽ£+ìÃ\¹ë4Õ– Ï;¥{=)hП=;´Ò¦B?5 2Q#,©@(X3žo5ÓÛbÃ3¬$X?©ÁBÕìjA´àçùÒsñc@ÏË8—T €X"Ù>*ç
- U‚3ˆ¢bŸXˆXìPdJù¥?¼åïTøß•µ/¯ˆÍ[‘­ÈèOÜí{§vÎsŒÝÆrƤ•¦ )È°oŒO‚«,[v»YDåÂ๣D9ÀRžôã§x㧑ٖ2ƒgv
-¾qb¸¿ÏØdL
-º•a
-%ž'œ›²þðrùÛendstream
+xÚ­ksã¶ñ»…&_BÏœx$Àg®q.öÕiâ¤wn¿$ù@IÅš"‘²ìvúß»/P DÝ]›ŒÇ`,vûNø 'qâ'¹Ê'iùqÆ“ùú"˜<ÀÜ»‹PÖLí¢©»êëû‹×7:ä~ž¨dr¿tpe~eáä~ñ“—øÊ¿ ÷ö‡»›Ûwu™FÞýíw—SÞÍíw×Ü{÷þêûï¯Þ_NÃ,½·¹úñþú=O%‚ãëÛ»o’sséûë›ë÷×wo¯/¹ÿöâú¾çÅå7 42òëÅO¿“°ýíEàë<‹'{~˜çj²¾ˆbíÇ‘ÖR]|¸ø[Й¥­£ò _éDP©1ƹŸh¥I€Í¦+›ø‚À»í€¿,ðæEÐ+ª¶aÐö2Ì<óO3—%o﮾¿æn³åö›ˆWÏj-Ë%·ÝÊpçg¥¢¢*‹; ª‹µá£â ôÿ
+‡éa“s0íuiiÜ f†~ÇŠ¸lw³¶+»]g°nú×Ù¾pWŽLBo±3 ên‰# $äáºèæ+ÓÊš•ìz(ŸL‡¾¾‰BGÜ*‰ý,ÈS IÀcª²íxåðb?
+u( ›åá
+
+Qz~Ʋù’Fu=„HIÚç ’¨#tõ2¢1$;ijÝH¹9­¡ óþÝdÛ#ü¸pu6
+ÓÃÉt‹1õüä)\œ:ʶ¬ I«Äë–5§-Ös‚à?N¢äȃb2‡57‡ÐM9@Ö`ŽÅƒ (ë—aÝE)X&U
+v°JÑRóPÇa¸(0Ö¨OŠ`
+è-ûLþÜY‹²KÚcÃ|¯Ùu<˜™3IƼ€<lñÊj†„¥‚›PeDZ÷¬¡¯n¿c¨áÜ¥9NÃUe±­¼ 3¯Jàk®ˆžû±” DÂ
+ÄFÁ!ÔƒF¤íÐ>˜Ž×azFµˆ3IDÀ’°Å
+ u³”” ½Ð
+Ò[-ÍSveôÏy Ãýß 7åÙûƒÔ¤mùÁ]§©óÀçž>|”Ày‡ Î9&uübNsÑ“ÿèf~À»Vö#t(ìa7ñVàøðP->Õ]6LH`1*{Ës¨íØÜTæ¡ìJˆlu|'ìãÀ½RB|¿ß_æê ÷—Œ¨É%«ôÜW“_x,©¡ ?š«Ÿ|ZJÏkýÉûÐ>®îêÓf%:}Hmån•æ»…ÖyüU
+J;Òvœ[ÒùX¤Ú¦¤Ðû„pµó±Hp>Ðhû*íŸÍ>ñlžøQœ$èX*ëƒîÔ~%ýTÑð6
+GJ¦»¦ë½e‚Qî ¿LçòœÛß8g}8aŸÙGq¿©-ãºN€l¬ß¤¼P‡</æÞ²˜w½‰7×qHXõ*¹g¢!î¶iÒð%”-…®f4w¥" \<•\)ç¼8^› û˜Xæl&=Äg­PÊ?XG%ÌK¤”k \Ð×giÿ) Kfd-„¬„.=a~Ó”T’"¢%·O¥aõC?á·Ûæl¾“@Ñ6ïvraIÎêP)PžÊ¿Ÿgöuž
+J<îØm7 ÙHµ×î°Ê%ü-o“ýøˆ0Û=<È7‘$ö®ZAÈ÷…'D¾¥f$ñÒΖíG**K0bQã…»Œ(ßFè{uj˜ o•æì`Hjó¬Ù
endobj
1816 0 obj <<
/Type /Page
/Contents 1817 0 R
/Resources 1815 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1798 0 R
+/Parent 1796 0 R
/Annots [ 1819 0 R ]
>> endobj
1819 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[0 1 1]
-/Rect [63.4454 698.4707 65.4379 708.1104]
+/Rect [63.4454 494.9289 65.4379 504.5687]
/Subtype/Link/A<</Type/Action/S/URI/URI()>>
>> endobj
1818 0 obj <<
/D [1816 0 R /XYZ 56.6929 794.5015 null]
>> endobj
-550 0 obj <<
-/D [1816 0 R /XYZ 56.6929 281.3776 null]
->> endobj
-1820 0 obj <<
-/D [1816 0 R /XYZ 56.6929 255.886 null]
->> endobj
1815 0 obj <<
-/Font << /F37 1026 0 R /F22 961 0 R /F11 1451 0 R /F41 1218 0 R /F21 938 0 R /F14 964 0 R >>
+/Font << /F37 1026 0 R /F22 961 0 R /F41 1218 0 R /F21 938 0 R /F11 1451 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
-1823 0 obj <<
-/Length 3824
+1822 0 obj <<
+/Length 3643
/Filter /FlateDecode
>>
stream
-xÚ¥ZYsã6~÷¯ð£œ!$Á3Uû 3ñVÆãØÎzk3y $Jb E*"åë×o7ºA‚$ÕÖÚel4®Æ‡¾@÷Ü_÷<„#ÿ<J|8np>[Ÿ9çK¨ûræ2ÏX3M®Ë§³Ÿ?Ëè<Iè…çO £¯X8qìž?Íÿ]ý:¹ºy¸{3
-ÅÅ8ÑåíÝ5Qz\}»û|ûå‡ÉEäžn¿ÝùáæóÍÃÍÝÕÍÅØÚ{Üßo»¡Ò—‡Éׯ“‡‹¿žþyvóÔ®Å\¯ëH\ÈßgþåœÏaÙÿ<s„Lâàü^á&‰w¾>ó)_JM)ÎÏ~o;4jUS›ü‹ ö"‹
-9šÕìl˜ô#hýâï±e5®ë|¬—2v]‘§V”ngÀšÓKZ“8z #¹°=$ŽÍ6[äoEV.›•¸ôÅ¥—ž¸tÅAqÀ„t—;Ài{ÁèiÅØÐl¾;Ž÷†”pDSízW7TšfúÙ¼fYI/.Ï»äH€±Z¸èq<_öW>)
-à“îhQí¶Tš¾7Yý ËÁèÒש hà¿t™Â3“Í ªx%uV6¸HLJ©&¯éIpÂ<›åë”'󒻌ºªÆ"KiwTçË2G1ÍÒ²é&ß6Äu;z½¤#¨›  ”úXB?hƒxt{7ž\_?\¸#1y¸¿H¼ÑDpÍýK¸×I¦»é@™ Ò=Õv6T®óu^¤[zQg
-Ÿ4éxT7 uêwÞ_í&Ï' GMö†=&ŸVc'àÜVå' ¬]èÊ‹ýȆëçX<Gâ9ÏxöųÏžx>‚q˜7h˜ÐÀ¸Gó&­h‚j_azÏñ'!ħg—g é9q]ˆ<")=ª2£
-Ÿ Ø…_|™ƒºi¨¸ÊÞÒXH(wëiÆ|{‚ÉË%Õ¸!=§y£öÕlÕ€+™$­ædÂGø‰»Üksx÷›´gar`ϨN ž¼×aÜÇžE°SÓ]¯«—l[“¦NÞð$Ü»‡m¨&Í
-˜<Ñ¿;óË/ðß%Tç¼¼½-IEŽ²g=¸àL0 ¤T`²FÕé:Ú>8{öÁ1ìƒÓÚ‡íƒcڇ샣í¼{±h· ΞŒÕ„î¯ï&_ÁÁ‘à mª"Ÿ½S™Æžuû‚DP_x®±ˆž©êÐÀ3Ý5+pĸËHª³-B’^hÕ±@'
-ï²­ÏQý¦e¤Ô¥š £
-0C[SC¼Ydú|©œ×¡ %D29±sבÓ\§wîبÆÎ ‡µïœ9¬¡±4æ«íÿp
->õ"œEg¿2;ÑTÔ×gƒÀlÙÊß —ê.ßD„'ö¡c:² ÌtzŽ ilÂ`Lûcê-hcÿY?pgqEZ\@ª9+›t‚£w
-,9§ÐÛ³=¥kÎÎ&z«#c«÷fC4>f˜Oh÷|ò\i8a…Nu‚ðœ0ì9¸ÏœrÐÙ4(Ðzª4$'h*ÊjJ¯})*qÙÕ4鶡è‚Óu@e¢ÜªPi xÕZ ‡ØÒóª#Y"¨ˆCtUà9uºÐ"œN£YŽI ›œ5T¹RÁʪ¡ª)et¹v¥r8“„\y$¢+O¥ÎwƒVÊï':fqv j(HK4B  —3H€¤—Ÿ8œ3°¸´m–¢:Ú"Ó çTÖ ½d[N SâL‚Ó×õŽR,[ŘnsÅS3SÉ ýþæi“!*(P~—Tù\@^7œ“hƒ È9ŽˆÎ†eûhFR™iÄDRZÑ ˆG_T¦œZùˆX-T¤‚Åy¾ÀuŒñ}AÇ`oÞ^²æpÇjÉè±¢Ú“ ¶…µ1îãKšdÍUê¦,8ÍCA,Ñ…ÖªhƒŠ]^4̦”— Z1Lõ¹¡
-¨ÌðJª
-5L¾]OðêöIÝßÚï¼Ðñí`q ¡#rD˜Ä¶«$Ìwë,îEÓ¦½pVøÉþ›ô““»«oÜ=ýÃ=*7ñÆpG1e0†”f:‰¨cCv€ŽiÅ“9æ­ª«á$CGà ©&œð]y¡J
-¹¬ßàU•à‚r,‰¤þý<Ö±÷.ÝmÜ^7-^©O¡êÌì¥ÍĆÙŽ]½ã…´Ž¤
-¼çT­?
-°xŽt[“j“«vH;滦Îçüº™¹RÎÇž…ži=ªoB@â‹]¡/4¶:?µ\æåò0øýDÄnt
-ý×øk®Óø?6ªq
-_ªn÷rûãE‘¯Š¾² œ.Ö¬ú–i™èüPw”Å¢¾h'qùú“Ô
-äM!R@‡K±ò=3òÛ;^çËU£ÇÈøŒð,g挡u6ƒ7¯×}—‚öxžó^s"¸÷Å„fUÇRiòWÖȯ˜<æ°gÉ65;|› ½>mÇsXÿ2ÏIí{d¼N÷ì!Fk^cÀ/·ÿº±2±Ó~Ï]§ïu—}š³
+xÚ­]Sã8ò_Á£©t–eËöìSø˜9¶v˜YàŠ«ÝÙ“˜Ä5Žøõ×­nÙ²ãÀUÝAõÑê–Z­þ’䱿ò8‰„¯Òð8NCù2:ž¯üã%ô}>’ sjN]¨³»£|Rñq*Rèã»GW"ü$‘Çw‹?½óξÝ]Þœœ‘ïiqriß;»º¾ –”>ç_¯?]}þ×Íì$½»«¯×Ô|sùéòæòúüòäT&‘„ñc80àÓÕo—Tú|3ûòevsò×ݯG—wÝZÜõJ_áBþ>úó/ÿxËþõÈ*M¢ãg¨øB¦ip¼>
+#%¢P)ÛRÝýÞ!tzÍÐ)þE*QÄ ä£Th(Ã@\³„>ðÀ÷'y³©«&§e~«ËbþBå?êŠ[¿û‘óíøHfdþ¼-Ú¢Z"?€jàPõO-"å=ÚåǸ7ø)ªy¹[ä Õ2ú”źhóVoÏWYU4kêkkú®ëEñøBå‹ë[*lOdâñåc½uûþÞåMk©UYY/ë]ãb˜uVœH¯¤ZVµÅ). —"¥H£(0Ki6Ù×ù
+½‡2›ÿ(
+$RÚ2¥S&²/ëqöc†¯7mQ3B¢d¦ôTäÏÔd»²u 'hµ,뇬d¸ ‰!ðC‹X‡r(ŽH ™¦àLá.ªÄ3¦…›fî®júº‡Å.ÊŒ³3G Ún(È@ÁÌ< <q_{  oÖKpUPYU¶}¡n:%PàÁ"Kª3êæ¦ÉátNJlÖLêó!J%"h€#½-Ì!‚JUo×YY¾PÍp@¡¥~Î0åPIïŠ1†Àw×ììÄÚp·9ðe>µÛbn{VµQ‘
+u ÖÑDá×1Q È
+|½Î€øIÖ@”çñÝ÷ƒŸÔBÈ©¼Þ‘± ј›µƒD‡j¸ø‡¼}Îsä¸L=IÚ((¶•YYRË#™(=¼´¹±àlœ…¦ ½3e[népI9}Ž2½³zŒ²€/Éù¼Xg<™§¬Üq»Ñ9Hû–yfˆªÈkŠeU ÓÀÛá&\
+• Yù:)
+ÇÂᦛ/I5€^ŸÎ..nÄìæ:q3ÑaÐ<`(^¦©³ÎPé­³ƒ5£Ï#i‰Épimô
+’ÙŒ½Ì‘½€–Î^@Ùî„Ï;á÷–+œ2ÚÜÔƒdäRŠ]t³R7¨)sd¡h½ö7bÞAè·-PbÁÃ~Ê©µÉ·O
+õCk  `F‰2‡æÄCˆwÝhyK©ÝyÆB˸jt“.>À"…íI…`Ñ`{y ; ¬÷²ï¼°Z*aöŠ1ö •Þ{LŒ¯a¾ŽŸg1ï‹p`FR9ž ¤m.»!„BùBIyÐõ;=ØL¹~6a+`qŽäÇx}‰ëMcÍ
+ ¨/`bC­F;ÔŒ>ä~`¢(q&Ä”I¤`XÇJCÚxÖX2,WVùü‡Ñˆ8ƒ%Ži§D¨?“; ÔØéG'ˆí²¡ßY6Œìýèêýè1yÓL#ƒÁHÕ©Mƒ…Û\‘Áöÿ‡ÈLZì@‰³ôƒ†mì÷5kö(«psQKÁîRÏ}tȘûT1*0iflxz55µÏ\ ¸!òÖuïv…ýà_qn <bœšÀ®ë®ÌotA¤N|ï,Ÿg;³<PX”dÕ^’šˆxÌÄ;¼hsîÊæó.)¸$(ãåÀ×2€¬kÃ)h!G(vÖ¥øú¤G®¤eþ~Þ† ³5?lxÙ\gsÎ{Bš·.Eù’¬šJëDH?°ÑÓÅÕíìì·Ë‹)ÝA˜Úè•(5ö
+eßÅ€ýÄc%èLÜ`² Ü1ÿßMlà0̇ž‹Ñ$× Ø±ŽåС³-«Ä5ÛÏÞñyœ¶©FÚó±Æ”%3Ò·Iß|ûñÐ͘’J€‹¡Þ¾ t¡ÌEÖ {™B1Q.\Éw_Æc¢Òa¸FoRí öÉ]Ê¡’=_Õu“¸2:y“`cn¾vWlœ5Á½ØlòlÛù\~°µÐÞðé|>n‹Éç‹C{á·ðu¾½'.Ôá=é ÞÝ“7©ö{²GvrOd¿#m¶ÒIJZóooœl½3„ÃÆÌ9z=ã9çÉš§ÛÁÃ|Ž¡&ú>;PoðÙB½Ïç·¨:|“æ³KvFVÔÿdÔq }MÐ]w;¤½Ô”ºO¸R«‘xÉN”Él! ƒ™Ä[ºš‘Ú戡}W-…º½<ŸÌ›Z{vxŸB¦ø½ãн±K ôþ&½AÒÙ£Íé-rhÚr$Þ^¨î ÷‡A
+âã7Íysؘ3Ì»¦ü z½!œ4ãÁ»é·`©º»|¶/í&Scþ(M9H÷I¥}ùÐgKñ¾ "Šó>y^õáe÷,äÀ
+R5uë>ÏësõÂ$…å‘ÀW¦Œ„?–ÿù1k/a,T’Ó{¢|-’ í¤‰ϼ{õº?õÿ
endobj
-1822 0 obj <<
+1821 0 obj <<
/Type /Page
-/Contents 1823 0 R
-/Resources 1821 0 R
+/Contents 1822 0 R
+/Resources 1820 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1798 0 R
+/Parent 1796 0 R
+>> endobj
+1823 0 obj <<
+/D [1821 0 R /XYZ 85.0394 794.5015 null]
+>> endobj
+550 0 obj <<
+/D [1821 0 R /XYZ 85.0394 769.5949 null]
>> endobj
1824 0 obj <<
-/D [1822 0 R /XYZ 85.0394 794.5015 null]
+/D [1821 0 R /XYZ 85.0394 749.4664 null]
>> endobj
-1821 0 obj <<
-/Font << /F37 1026 0 R /F48 1238 0 R /F22 961 0 R /F21 938 0 R /F14 964 0 R >>
+1820 0 obj <<
+/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F14 964 0 R /F48 1238 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1827 0 obj <<
-/Length 1980
+/Length 3566
/Filter /FlateDecode
>>
stream
-xÚ¥X[sÛ¶~ׯÐtú@uJ
-áPƒ{ŸS±ìî:#œ†rÝW'q7T»´V-ð¢!åm
-\ÇÛ~KP"ð»Æ<xº†pGLú>Ø$
-õ9@õ G|O_9D0â„ìì ,I Ñs \Õ1Äò±…¼aŠ0ó¸HÔF+aúð’€ûÖÈ[úö-9Ϙ$×ç_iø7"ÛàNµÖ;Œ~EòhÐÅè¶í¼ó?š(ø{'ÝX¯cz÷ÈSºy¦áž‰‡™}­šZa~F‡Lø×Ñ¡¹:r.þ08ͪC{Žß$i
-ýJY}—–dÿw |¯½IÖv™¾ê[z³zÔÐ~…õUüü}
-ª2~Vgüùݤm· 9¶Ò……_)ªuȘ- Š|ÿ[;½ØB³»y´Ñ‡chPôøÏÛ-_K¸Nïþ¥}÷©yä„!Ý}x™ý+ Bä†ÕN‰²çxmu|Úâú¿:J3¦endstream
+xÚ¥ko7ò»…Qpr±KîESl'q‘؉­múa-­¬EV»ÊîÊŠ{è¿Îp%õîÄä‡äp^œJž;ðOžûbŸ‡±'|Gúç³Õ™sþcoÏ$㌠ҸõzzöÃ7<E¨à|ºè­ 'ŠäùtþÛ(J\À
+ÎèòîöÍÍÛ_î'¡7šÞÜÝ^Œ•ïŒÞܼ¿¦ÞÛûɇ“û‹±Œ|9º|7ù8½¾§¡€×x}s{E˜š‹Þ_¿¹¾¿¾½¼¾ø}úóÙõ´=Kÿ¼Òqñ _Ï~ûÝ9ŸÃ±>s„Gþù>!ãX¯Î<߾纒Ÿ=œ}jìê©6þµ8c×ì‚Ë~,W¹-—¥×ãr(a0€,äògG†»G a=©óþr{›¤ýM•êmIáDZ?Üt¼v@·“(AGŽ¶Ë²N Ú$Õ…ŒFOiCCYÍð%#l³|>#¤9¡4åzœ§ÏiNór•d }v|ç{%|Çî¨^§³ì³ã¨´·,œÈ–=²]¥D¤BgE‚oï®&±MñÏ„ñûÇôB¡œÀgôdÖdeñ
+6@î2›-q
+1t„ã‚ꥱï+­O’n«¬Ñ4ùæ¨Ð¡¡z]5Cš’ZMj.þ™¬¬¨Ü^Þýr;ýIŠƒJ¬@1r\zXGÔÉ`T§c›vê´»©]ú›N­"” :‹ä}9K@=$Èï*i›cúžˆ& bKÒX³PÒ¢Iç4ðøBmBMª‹’”4+’Š1®núk̓7h– Ï$õNécS›Púz¸¨·iEý¯›´ÊÒZŠ‘p=/jØ'B¹» ð Tì I Xó²6xEÙ0 µ;ú\*Ž;êÊ´ €ÙfÍ’zC-œðjh‰(&jE½rAmNÃî¦{ <¥cŽG7z¡q'Øew‚ݾ;q½H á<ièLRofKF©iÊ÷"ý–¬Öy*få
+€_¹i'c’Q7 F¼CÚr G ¨ÆàL$2ãC`ð¢AYc—Âê¦Êê/ô¡}»8ø\"ØyLÓ‚z¬¹y2C*B2¬‰ŠôBÝ"Y¥(-èNiXŽÖ›j]^ÈQÍßZhŒ74"µœ‡ŒÞ)c'g¶óQÖOOYñÄãÅŽÜ&y®É†þ‹*-þÎË$›fY‚ï䥴a§N«g`èÝA/®ˆ¢88îûX‡½`‹uÊ Ý´õ‚{›Z½à`S»TŽð#ãÔ>j3|x˜¾»ÿÅâáŠv‚@2òºÌ³pÕeˆmw{Î ðÈ 5ÆãöFGèÀi5 ¡Ê^{¼{µþc—ƒž#…
+£`ÀÂS1˜qEölÜ®háwŸ6Ïñ„
+BoÈðuR×ͲÚûeAḃ¹áƒÏpÌJŽ;0(" e8ôiÛßubíû±e¿ƒySÛÅ Ú;‚’bN-8hWeͳÊE‹Å>«·ögºü /Ë<­Ÿ’ ÁZ1ø:‰Íu.o®î™0ðÝ_øBÚqèª0Z ýÎÃùmôÚ9ˆþ`ˆ\‹o¼”?zNª,yÌùkT MÄ{COhxF¹-ÈmúÚõ—ó´ÖH5²áÑV½g ÝþeÑQ`9ÑG²MiÏÆ#¥Qà©Å ê ÑJ9•t½ÖfáFUn q`:+ÃQíõµOíýÇ_ sf ¼N >¯Êæó”áìæ5±ÙœŠP)hñûÚìJ!]ǘæ,G5îS&DÑ>„`ž2Þ§buÜ'„$ÇkP¹Fžp\ËåI5´’‰–‘ ´ž’"û£•œý¦K%dΈ8
+ÌœôVÔ,Aœ)ïÈÉ÷,[ÝgZÌL„y9H9å¦`ãeÒúL/„{Òiö±›j‹uÊTnÚšêÞ¦VSlz*ðÇ0 wÍÕ‡t•dõ4#´h¡ÏÚ죢7<•HšQ«ýŒá&<´0‡0¸Bš=Éó†:(³óYŠÁ#úy
+}*4°ûΪö‚5*c2`©3`N.9hhÒYs²P· \¾QÓ6¿Åàà‰­ÑªyA€>èD©·uDó ÖIÍ;¶i§y»›Ú5¯¿éí¿®î>Lnl×6äR1de{Zç­s8\ó›ft’¾™,£vÃ.7Õ1+·½²Fàvë· ÖInÛ´ãöî¦vn÷7ý+uêÐq ÏM,Äü4–ÖÓk[™¹ ß­ uá9ÇghëC ÖI†Û´cèî¦v†ö7mSûª`ÉZ ×÷Tô—ô¸s£'t:1.&á¬sW<¿ïF)Øq¢ÛRKÉ»e3Ϊ¤ã ǃ³²Ò×/T«œ§‹d“ãõËÀ^Ð媈7n97¥O]!@Œ‚¾õ±uÕ³+Aä™™R9ï¦k0üµ-V{&¶¡²ê§‚ƒ×Þ›ªÖ1:‚°¼põ“Ä´ÛZ˜r¸™ÃáGÈy4@u8-;i¥J'@j0­ÌñÂ3-\Z4-vüøkMKdÅ`…ç,ÝÒ
+{OL¨!_…=~×ÓC_»"ŒZ§óX¥É—ñ¼¨ëtÆ…nƒ0éKZ[˜Ä(¾}¼íXŒn4§c“öBo–Ô)æ ‘oê{=…ÖpãN¡UhjSCÿÄ3¨è³ÞB槰¸{‡Çbºâ(ê&ß´| ËË?xF2ŠÝ·ÿEÒeI3H3@ÈuÐU|²ôAÌѱ³¤hKaàK0lÖ…ê¡÷p{Õiáäô=v$W)ºÆäÞ 2­ÊyW%MŽ25k
+øîr;æ¤^©€=~üó¿?i?óÛ?*…n–sîèÂß´‘âÖòÍœþq1–nÃwÂ{w9yÿîîa*èë|¼zªú¿¸ !¼7%¯¾äÖç1×™SG-Û7é¹ï¼é_ߨáÆäž 6±‡ÎÃ|üD9 vûšV¡‡ÁLŠV#¯X\‰é`ô¡§£-1Ò0á¤idúuG`~hƒ®CŽÔÖÊmñr<Áæ”ët¿«“Èj /FŸ¥«ŽôŽcUQbœ5XÚë~²§ùK¡"=ˆÐs}=í{=ä‹8 ƒó¨ˆ¼wW“éd†±ŒC¡­œ=Z@ë„ýˆH$ÿ€™^ÔmPá;›®Ò«jVSc^Ï°7?¾•¨e¸¾À_ZŠ
+ðŸ)ü¿Ú+Š„Â"eÿÍÂÛ™‰BÎDû/MFPä}Òÿ#Îë.endstream
endobj
1826 0 obj <<
/Type /Page
/Contents 1827 0 R
/Resources 1825 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1830 0 R
+/Parent 1829 0 R
>> endobj
1828 0 obj <<
/D [1826 0 R /XYZ 56.6929 794.5015 null]
>> endobj
-554 0 obj <<
-/D [1826 0 R /XYZ 56.6929 205.9349 null]
->> endobj
-1829 0 obj <<
-/D [1826 0 R /XYZ 56.6929 178.7228 null]
->> endobj
1825 0 obj <<
-/Font << /F37 1026 0 R /F14 964 0 R /F21 938 0 R /F22 961 0 R /F41 1218 0 R >>
+/Font << /F37 1026 0 R /F14 964 0 R /F22 961 0 R /F21 938 0 R /F41 1218 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
-1833 0 obj <<
-/Length 3434
+1832 0 obj <<
+/Length 1742
/Filter /FlateDecode
>>
stream
-xÚµ]sÛ6òÝ¿ÂòM„’ø éSÚ8½t®I/uoî&Ídh‘²x‘HU¤ì¸wýï·‹]ðËTì´s£ `±»ØO@ñy¿øÜ)§ÏS§…‰bs¾ÚEç70öÝYÌs–aÒr8뛫³¯^ªôÜ —Èäüj=ÀeEdm|~•¿[|û×ç?^]¾½XJ-q±4I´øæÕëqôùöÍë—¯¾ûùíó‹T/®^½yMà·—//ß^¾þöòb[ÃzÉN,xùêo—Ôúîíó~xþöâýÕ÷g—W/C~ãH!#¿ž½{çÀö÷g‘PΚó;èD"vNžïδQÂh¥d{öÓÙß;„ƒQ¿tN~FYa¬Lg¨ã
-§]zž'%•—໋eE‹Å}C­ÿЧieuCí¯éóîôˆâý{jÿ>y":—q,œ1r¸g{Ȫf]–M}<¬
-þ™¨ÜëYžò_"NP25€I¤Zè/~È—¦Éù
-¹’~˜¡ï¦ f½æUž¦†¦T«éDZr TEzñ¦ÚÞÓ ¥Æ®nÚÉÎ+BÓi¢Úf` ÔÎöûmYð„ÿ&óß|ë]
-.Âf”œv©i~P¶²¢3åFf¹4q|æ(ÿ\¬êj=£<Ap S{ð©‘㉈é3jè0—Ó©¡Â”/gÔ0U‹UVQ£^­Žjf<FŒƒÊ´õž Ûâ¶Øòüõh`ª+<‡›ã!c{ B¶<¡fôeÕ”9cÎfØR±1ä¢LðmYÜÍ—ÖØ\¡Î¤Ž´ûþ¥²NØ(8žÓû¤¤¸¥gRä¹Í€ìÙE]öœ`G3{v:65O9<©ãÛ7hfÆÁ–Þ6`¯vS7¼=êz€Öb¶Ä%Í"Wh¡qÏ“êý’N˜#l<I¼jï±TZ¼y-oªº·ZFþü4šp[‚7Á­±Ó‹ gTõœ|Òœ'*Ë'qVÎÉGÅ)ñ†›Œx›îkÈÜ´ü£{ÍÈüNÎà†¤©À3€y±ÎŽÛ¶ãX½¡6‹ûúH¼lÈ=ú^»ACU:ñ2ÀÐûc?øBl£{ÅïMyëk.l×G^å¼AÖf(¹Ä-vÙác7³lé›1–ëúæÈÍ»r»¥‡[oˆv}<€Þæ|*f äŽÁ‘’’‚CõÖGÞÝy‹‡:Kƒ'^Ïš–¯QÊçC4Ξbœ$aVÙÌ`‚¸wþ§SO9R-5ñÝ&X_Y>ê»e$´îÔ{¨oÁ'.ËOë9Å3ÀXbÂn!¬¡ŸË‹£åbW’]ènSx©ûŽ·{•ÚŶ^a*†°>€£Ö nÈ;è¤aП0ÌßeM;˜‡s†)tÌͶ­Ñ‡øM}&âT$ ¨²#âÈÇ–ÕŠ•”ÄÓ%‹ß¼ßÄV¨±g‘Šáž
-!(xhÖ<½Ï®R#LÜåg™(„+£‚=×{N
-<™›¤1;ÕläAgãËɬR[¢ÜÌå$ÛF¸^'º„ÛJòLì–¤{·„ƒ,‹8¸%„ XºÞ-á<Ï•¥bç²QKë‚òX94oZ5kup¬:rf¬Oäƒ@2c=6‹5YÛŽI›MpD+¶™ðÁ4üޣ¢eÚ„-3amõ+ÛgCùÀXÐV­×= 3ž PË.h=~l61´°—ì¾!焜ȩ¥PH##Îu£^‡Öé0t‚c€geG^KŸ®­¯þù¯ç•ž¸q0ò602¨(5çG8œó0Iç÷t]ƒ£=bV%€eǶÞAÚIŧ^¬ÉÕAë:ó ö}(5¯6\¾®9!ö±7ÿ¾˜¦CTü:ô»ðµ‹ªðí€éXu ´@4/©þÅh_®6Ô0o‡ºŽCÇI?ŒÖQJ­<l_·_CK÷ CÝñ*;ÈÊpõ\*¦ñ%Á9óÙ@¹ìfX³©[¤’Ðl{—ás¶ïêÃG´œ$áü`ûãaOeOâÈ@wÊ[)´RæÉî\§2$‰(µYGitgD[\êÜÈO2_%ýIûÄû£gÈú¬Ûsɽ›GÙ”É`3“À%BFSm8=ht^™B^§óÐ*È‘YÅùκ®ý½ÀØiù6é4¼÷¥™ÀI¹ãÍjí4:%Åßx±®Kñ)Ûaêh,™"rÀVu$ò1NM¥×òC¹>ÞÜÜOnøV‡¬Ù„#x©U}8\ØÅqßò
-Ì•‰'÷I˜ìLiyÌ÷˦ümî^Hr ¢IÄT©Ï1}ÍÊ”´“-€~~ñ#ÏB´¾Åe;ÆÚ† Y¢jKº2€þõý¹p*1vx³8WÝ¢Vu -àôWô\åu98‘š8‘Qm»ña
-“JÓ_ éØßg4´KG”''Øtö|“ ^‰8çBþm
+xÚ¥X[WÛ8~ϯÈcسºX–Ô>Q
+-ݺ>QNk+Á§ŽíÚ·Ýþ÷Yrb§„¬Œæúi4‰Œ1ü“±ä3å…òÇ„£Åç0÷nD×2y]®7ÓÑþ1c…T@ƒñtÖÑ%–’Œ§ñÕäðýÁÇéÑÅžG9žhÏãž¼99{k)Ê~ÏÏŽOÞ}º8Øþdzr~fÉGÇGGg‡G{‘œ€<u¶Ÿü}dGï.NO.ö®§FGÓU,Ýx f&k<Ž!ì#Œ˜’||?0"JÑñbäs†¸ÏXKIG—£V
+;³è~œIÄ%
+ºÎ}}Ì3ÝÓáË ó°Œu†ô}¸(Rm˜64±n˜¥Ž“RG.Æ{ôÔ€¡×ù¶yôÔÜ*p†%ƒÆÚ ‘#%D0&HøÌÆ3`­A12·ˆ o-¶Uݶà=¢¢Äî1ŽdÀy„“ö[äi=´ÀDyW.þ›p( Â4uƒ¬ºÓ¥cžå¥*ö¥êûHõŠŒ0ü“¡ ‘ÍL“Ɇ¤è!b—õ%i#É("OEñîÖË‹³Ë·Vʆ·ÔŸA5àTVusÅϪ8 Ú¹ólT¾DPµÌÎuò&.Ÿ ïS2^IÏŒ.N‘¤T5ºLõ# (•.ouikÝeÖz¡³Ú•¾2\,ÂÒj샕€’¡D£°Õa@HŠ/a—WûE©gÉ}ª³k;ñoV q/¸+Ëñ5Ÿ/]î<èêK^~ÉÜ~s‹q=”)N¸(óÛ$Ö^r?+_ £ç@©¿/uUÿ–g¿ƒ‘õ–qáUÉ£ÛZÙrñµ…vë‹ðþ÷Ô%ìáÙj?/M†¤=Øû‹¶T˜3ÂŽ Äy¶DØßÿµNg^¯t¬’ÖèÏ|þ¦ª6ÇšOU—I6ï)¸Ú>ƒºv9úãÅ8yU¾,£Îi˜~³Ú›Ú-bJô–ÚÍ»µ{ûU‘—õjW™×þy“á'+býônƒ®«ÁSWWçCãßrÌð_s•b†(jRè0’ÙÃn€1Aý×*‚Ÿõñy0_rf¿ÜMEmºÁu‡BVö±tÆG]U›[Ó•í®÷”8&p0
+-2ƒ¹Ðºç+ä3 ⸎°çšì
+×=WKÇÖñ “Il}Ó•ýÝ„edIU'‘#š Žù~Õö r% &¶¿ï’úÆÍØO¹GäD/òº ÛÓšç$\«áªM›œÌz’…5>Ý[ÙTï‘I6 ÍjAË˸ýÕJŒ£ ´:JŒ¬Žÿ4wm g´1
+»Ž†#IÔÆ[QS±†,q±5{4™gùz×ú7+аY†Ûª‰1m~¬a3p%ÀG(ž’ï€O $‡ac3Fz±mÚ">´n>ýU[x@݉Ù¾@xŒ›6V‘~ÒÅz.ÓºBÛ^4Gæràý¯Èß~í\?ûÐÉKIW™ñpÃàœj^†ø¦ç«gѧ®ÿQÀœendstream
endobj
-1832 0 obj <<
+1831 0 obj <<
/Type /Page
-/Contents 1833 0 R
-/Resources 1831 0 R
+/Contents 1832 0 R
+/Resources 1830 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1830 0 R
+/Parent 1829 0 R
+>> endobj
+1833 0 obj <<
+/D [1831 0 R /XYZ 85.0394 794.5015 null]
+>> endobj
+554 0 obj <<
+/D [1831 0 R /XYZ 85.0394 525.2179 null]
>> endobj
1834 0 obj <<
-/D [1832 0 R /XYZ 85.0394 794.5015 null]
+/D [1831 0 R /XYZ 85.0394 495.5406 null]
>> endobj
558 0 obj <<
-/D [1832 0 R /XYZ 85.0394 585.8777 null]
+/D [1831 0 R /XYZ 85.0394 193.8668 null]
>> endobj
1701 0 obj <<
-/D [1832 0 R /XYZ 85.0394 553.7893 null]
+/D [1831 0 R /XYZ 85.0394 161.2246 null]
>> endobj
-1831 0 obj <<
+1830 0 obj <<
/Font << /F37 1026 0 R /F41 1218 0 R /F21 938 0 R /F22 961 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1837 0 obj <<
-/Length 3590
+/Length 3988
/Filter /FlateDecode
>>
stream
-xÚÅ]“Û¶ñý~…ÞªëX,> ~rÛ¹Lã¸öeúd2<‰wDZD*"eçÚæ¿w P EÝG™Ž„ÏÅîb¿A>cðã3g¹nfœÊ4ãz¶Üœ±Ù ̽9ãaÍ".Z¤«¾¾<ûÛkif.s¹Èg—× ,›1kùìrõÓ<ÏDvØüåo__¼ùñý‹s£æ—?¼=_Íæ¯/þþŠZoÞ¿øþûïÏÜj>ùí‹w—¯ÞÓT`|}ñöqôwèûW¯_½õöå«ó_.¿;{uÙÓ’ÒË™DB~;ûé6[Ùß±L:«gŸ¡Ã2mΔ–™VRÆ‘õÙ‡³ô
-›°YŒ->ïYW›ª£&îõ~sÌôëšk[6õr¿óöäàXU_5ûzE5u@÷hù‰k¿©ÙŒð·µåîœ
-Ê'aIÜlI°ªn&øÃef„U#©8Á)YdÏr]
-Àäùád¯,« .p‘ÙÃ5­J¤ºö¦CÓÿÓ7œÛÌJ=bÀ˜É mÓ‘Ù@h¤— N`<©1¶ÀØ…£QpŠ%
- ´%èkuêxG‚"‚·=УŸ™f—.Þ<ߊµYþ°—™eÎû šÛÝ̨ñ>q4qù"]ìgŽ "ʈ·5s¶1*\æp;¹àräêúU p -ðŸoKJ>ïŠõG¯Å8ìï
-`ƒlá¦éJZ=°_F°ù? j‘ìøm_¶ xïç·ÖÝý§À=†ƒLrÐ3ºY kd>¼X<S»Ñ™0ÐV7uÑíi‡,¹%?é þo漆 ®¨»o‰ ÚÄ`Ê18R¸-ÀÁ$Ôa¸ØnËzuHÑ
-“9•›¾.s0‡“þíï„ÃR)ÌPR¢UBlaÅ%ŒmõŠà;ÿ!\fÚ(,gdFIªMü5LÐd‚Š¸;œ‚YSûÐù%¨¤ƒZ89‰ O#5°”‘–‚†þº)ºåí¯ë
-sn?ñG
-U£É°úÖ·——ï¨Õ3ÚUøOª#˜ÍÎ/|И«Vauw[tÔ
-/˜Ðrôçÿ@õ¶ZÓ;Œ™?¶ÖÕÕ
-/;–Ø$ð%Çw/_¾£~Û,?zí‡6z‚²¦Š+¬)Â0qÒŠðD  òL÷¡mµ=Jº•ËcÄ]x÷ÅÏA=ÄE
-òø9ŸÎœ3üp2bèmÅDiŸÙ¢Õ÷Æâñ,€ôŸÙ><fÒ*ƒäÑþy,è!>À¥MÆsw,ðQÊ4 dÔT_Ô’óÏ·Õò6F¨.ZÙ©JØo}¬›Ç~HPaħ4’S+É°ž(ô mÈzHzO2ƒT+ DãVîâOxjŒ)ȉ§Fá2˹>œ|c1ÖQ‘³±”6ˆL¥9„ÀÇqâ8Ò
-=t4aÅzªÞ±¯u2Ý(ÞГÓGÐTjËè)ìej#ý±Íáøþ¹üõ(§çl ïœÏ×Ô/â =v¶ånSuD¡ƒô© ér–ÂgN}¹ÄXfDï¦BµàÈå:ürFÂ3I»ûòX¦‡¸HAN¸\Á1¶ûeˆ¦/fÅœÂ#‘«?ÉâHB$AX †HúZË„J(|
-s½J@X'ÉÂ%M~'AUÿ*~Rm¦¸uã¯á\
-ËÁØ¡zûI_Ó˜HèE-À;8œñ‚·ÕÍmü¾ÅbCø"&­£¤VgT0<J%•Ó’ïW
-T= @RH¹Í0Ÿ£þ_²ç—endstream
+xÚÅËrã¸ñî¯ðQ®1Ä‹
+7òŸ«þœ^¯`Û?^¥‰Ê¹~„4y.¯wWÚ¨Äh¥d{õåêÏa¯×OäŸH©29Á@)§hò$SRyÞ®oæJ›ÙSs¤Æªj—ÍCy ¯î¾è°•Í
+n„›•»¦+é»-qpÕÒï¦z¨ê µ›#Ï_+^ èŠwÐÌòÙ®8|#«Ž~ Ʋh6Gn>VÛ-µö´þCY3ÚõñÐÝpÀ¹InŒô[ûϱ<TeKGÖ5ô[upÖJ¤³»û’ «r]·}<Û#Û5"Š…v‰q©…µp ¢‘†õY­à0³,ŒªÚ LpB9Q7H`/ÐR<$ñ[œƒŒ$¹³æz.e"´ ­âfΗi¢5 !Øš‡jUΫoëÃÄj6–™°Úr[[<b›ƒ:`°˜íª¹‰ ÇûÒsÝt÷~ ›m›e±%‹h µvËŽN:ý Ãø]Ñv½A"œ3 ¡cn÷°lS¯xѪ»g51ÃæIŠL{U/YHAH<=i6ûoS—ÔêEÝ®=í©ÁÔ ¿ç ½6vøìJ‰Ü+·ÅC‰ ™ò½¶k©×‹œ¶–tÍ£éxÍfâÔ”Kks>ˆ§rJ¾„Nr­Â^y¼qÏ"•›ÄJ´®Ä#2›'&H«˜íÒÊÙ¢$©™——F•aƾiÛj±-:HÜ‚ýÆÏäƤ²`Rýz™‡Øܬ òT$»åφ½*òýó"zãM*Þ¤ê91Iê<ôõ9AÂC”‚öê,ÌF:s!+͆‡w“*¬IŒ0ù+UÔ& ¡AŸ›}W55a¯êÓ*DAU>2úÝl›jƒ‡ù©-},@m¿2ꯘ3J%Ëõ3Õb`A“`„_¶L"O´S’wr u¹¸m“ä'™–I:I–‰Í’tâd–°“y!‚YBØ@e~2K8Îï
+<–•Zº<“}õ¦Y“ZǪÓÜ •Žl´ÙPŽÍlMÚ¶ãN’f †‚mFû`šaÜÉ¢¢fºŒ53ciõ3»w}þ@_VèmÖ'&, –Ñi½|l.3gÒ
+Ø+6ßZ¨¸«†ÂÕÇÌ2Œ®ø@¿Q†e>‚ £ƒg—a’Ò×Këíß?bH¨ôÈŒƒµâ}Ka÷Š»‰Ó8î¸ß7î=!fQXqìš]ÑU Û'ê\“©ƒÖ¢ðê­ûP$Ô¼C!GúÖ ýâ‘*¯þô=yƨí.üºY]z„VÀp¬>ZÀ›W^ÄzûjyOÍÞæ]‡yÜ!zçõ÷æ5¤£ÐZ…å›î·ÐÒÁ|CW<^è>Ee8{*Ó
+"–<7Ï:Êy5PÅö¾9n‘JB‹ícñÔRû±9|EÍÉ2Ž¶?ÀÝñ‡W,¿dÎL X7¯6çÚÊ$"×& ¥ÑQ‰^Ö8›ç;Éûªøן´¼¿ú 9uû]²Gã(z&9FH
+êÂéA#ZeryQæ¡U’!sŠã-µh0šC-ß&Ù†·¾4vRíx±†{£äÁGEþWÌÖ c)¿; SDëñªr’òžAY7›'¶$5›–å¡hïCŠ¬Ô²9nÜì¸ï¸3jñö¡Å̬·¹P§E°Å媞©«£<Æ ^¸ëTÂö"zè¤X !¢XLô Íq: (º®Üí;žÖÐ//bg¾ÿô…gPœ °e³Ûk0zÞñ’€¬Õ5TQŠö}êÂÀ Â÷É >›ÓM¦_"³I*…~C˜20Tb¦ôÊ LF•ÄCšWûy[ý·œXHÊE#©¬1}ÎÒy  ¿|ÿB´¾Åi;úÚ– Å
+XÕUÞ)â÷âiŠ\8 •™˜•»r5•Ý¢TÅ€ŒpbÂýÄY^Œ!ÀˆdhèÔȈ r+‘Ó
+8x£Ñ‘hÁÄ‘téX $ vGúÉé‡fÀyü;‚­ƒEôöx[¾ÁS¼2°„l,ÿ•¦’º),®î%›P…‡f} ŽQ"…ûðµ%)Ú í·UÙ¾Í
+[“+²+¾=«ß\éwšýi(C ‹þVíŽ;ú†4eeÇþ²m‹ î-8̸qƾ¬Ï©ZÏr頻W˜õ:7TÆ4(#©·#çä8EŒ+%©¨„äÙûo
+ëÆ–CÂá¤&ZŽú‰75ˆd.Ñ1«€Ì°¥¥}f Ëáì>1Ï“8šÜü±œA9‚ð2‹¸‰?S[˜‹\ù3C.½¼È0N•qŸ5ZBZ‹(Ë
+´݆†Œop0M‚<£özÔÄš€žzÍE>ø>Ö+ £kšßÎW=
+¹jóØRÛlìŽÛ®ÚoyâÄdK9 Ë἞î“ìF™è ¥z-êeþb»âª‚Ètb…™½°bË\äìó­µs‰ýTDˆ©Órªx9¨’¹{é¶F‰XÀÀ;È&PCD-2kÏ.nðyUH
+¤7Ã
+´Zò©ŽhÌà‰©z¥G/gÌø匋|Ðœ?”Û ÿs .ìcïs|jØh¿âÕçx}R8•ëp&.{Ó‘Ï㬡¾.Ä „ßžUóU&9ûQ߶8ôÊ¡*\OÉlFóm839ºß—£‡F8÷¶¤ ÄHóf‰SIn3^±ŸDº=%ê?*I
+PÓ†~à¡,°@Yy-ü+‰—b 8|Þ€œaÄ@ôvÌD)czðâ;³Ò§ç,Šƒž§â W¿Pˆ×aø(äµvW¨ø
+„Sè5 TöÒª˜Ë¡JæÏ]½úTM6tå¸Ø¢ õ0£S7*VÿH¢ýµæõfà\³×ªÏÔÿb(ƒo²¦Ü_z„åWÿŸÆéŸX´M”srÚ‘Jëðá«
+Dá¦\vFyø‡ŽsÒÿj¤Q©endstream
endobj
1836 0 obj <<
/Type /Page
/Contents 1837 0 R
/Resources 1835 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1830 0 R
+/Parent 1829 0 R
/Annots [ 1839 0 R 1840 0 R ]
>> endobj
1839 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [87.6538 680.0038 137.7628 692.0635]
+/Rect [87.6538 269.6318 137.7628 281.6914]
/Subtype /Link
/A << /S /GoTo /D (tsig) >>
>> endobj
1840 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [370.941 568.3155 439.613 580.3752]
+/Rect [370.941 153.6184 439.613 165.678]
/Subtype /Link
/A << /S /GoTo /D (zone_transfers) >>
>> endobj
1838 0 obj <<
/D [1836 0 R /XYZ 56.6929 794.5015 null]
>> endobj
-562 0 obj <<
-/D [1836 0 R /XYZ 56.6929 461.551 null]
->> endobj
-1841 0 obj <<
-/D [1836 0 R /XYZ 56.6929 434.206 null]
->> endobj
-566 0 obj <<
-/D [1836 0 R /XYZ 56.6929 334.6837 null]
->> endobj
-1842 0 obj <<
-/D [1836 0 R /XYZ 56.6929 301.5645 null]
->> endobj
1835 0 obj <<
-/Font << /F37 1026 0 R /F22 961 0 R /F21 938 0 R /F41 1218 0 R >>
+/Font << /F37 1026 0 R /F22 961 0 R /F21 938 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
-1845 0 obj <<
-/Length 2868
+1843 0 obj <<
+/Length 3264
/Filter /FlateDecode
>>
stream
-xÚµZÝsÜ6÷_±o'ÏdU‰%êòä$vϽ6¹³Ý›¹IóÀ]Ñ»šèc»ÒÚunî?€
-2ËvÊ)ÞÿÁE ùjfÙË“Ûn_ÔšVª•Ùÿ>=žÿÚ² C2‹§ó¾¯m>ú¾ÿé“Ýc9+û_“2¦ªydàË4)Y¼TÉïÌ/A ê¢+ššFtñs«7†7Ïkÿnkz©†IaæÇIª`òÉ r,.à$T—“„¦¥î»÷··—o‰nÍú°/º'êíÏCå5MׂcÅA8™Y´ŽY»Þ+“óp}ìUq"À7bµHDà‹Pì›>î7 "nFÑÏ_ŽCŒxÊzkÖ¬x&öÕ±42
-`UxNŸK²¾Xľ²djé½²£°W6õ¬z¡uw…êïqkjúБXbwX•Åšh°"î›=ššº©—úÐmØOwůýÒÔ†»ý>×Ícý
-ié­,ÌZ×µlÅK­¥ È¦|š:1yV³êtaåŽÂ¤¥ã6[
-,HYP£Ñ¶)ð-Þu€6»Žá±  yï{„,Ë~20KUðœö°Ê›
-lŠù6÷¼–?È%änPù™
-”=Ë…Ý-J=Æp ~ d@0 u³çCíš:·1‡ÑNZ˜R·,èÆ&Ô;lé§Yš¼±LÎRžÌ&JÜsàÍ;u µæ7ØžHšº¡%yiZ>“U´[Í3G–O!QBÆ‘¥G1Ñžĉ×j²D¼ó ón‹ª(õ¾|¢¯2@ÐõÁ
-ª×ÐóÚI!êÅÊQJe<¹©
-@:fLY |¦ÜÃq¶”ᆥ¡:§5s@@§h>ãJÄoËÎz0òÐ
-AJ×OD”M½1ûר{AE5 ºÍÝ‹ è—§£í2jn/oÎ¥ôþu…Vxqýãx––-o¸nr¬ª¥ŒÁ£<´Ï\6 ùzQ\ý
+xÚµ]sÛ6òÝ¿Bo•o,”ø $Oiê´î]Óœí>Ü$™EÑ'©”]ß]ÿû-° ~HTìNz£.¾»‹Å~A|ÀÏtÈiÔ,6Š…géö,˜­aì‡3Ns~Òb8ë»Û³oßÈxf˜‰D4»½àÒ,КÏnWïç¯|õîöòú|!Â`±óEóï®Þ~=?¯yûæê‡_¯_Çj~{õË[ì¾¾|sy}ùöõåù‚ëÃzAN,xsõK„~¸~õóϯ®Ï?ÞþtvyÛñ2ä—Ò2òùìýÇ`¶¶: ˜4:œ=@#`Ü1Ûž©P²PIé{Š³›³v£né”üB©Y¨E<!@Ágœ3†b$ÁаH
+é$h™æ 'Á¼i“6oÚ<mé&)ˬhßȶYÙûu²Ý&µeÿÛ7ŠN)˜-„bFqå°O"Œ`§ÿص33#-å•°æ=ÎÈˬEèCÔ·û-Y­jlüQpP 4,8‹•ÄmÿFCˆt0
+¾Àõ./¬ÆØÖCÞn*òåïÛBÀ­Z;nµ_ñ
+“ï£ÇL†JÏBÉ™2`žwàPëé¨cÑa\ Qú¢§Lj@­À”wÓ,…ÎV Up˜ÈÎZ<_1,ÖàUNÉ@ižZÉ¿NÆ'd  ¬
+¹äc¸0eZÒ_U{W¤œ?lòtCªãa â±ÙKʃAqæG›¹o_½»WØ·À÷D9œUkÀê)ž¸p/byR°"  °—"ÅøjÁvC”Ç‚¡f<ŒM¿ó—+™ ”¿±à8CSi$AbØŠ‡¡xö ž fÙ
+»Ž;ü:²,€QÎ7 ÎC"žž¤Ì*P¤!:7b^á8Z4\…» ¢=¯}°ÍšuÄ:;¬®‘a:ŽO›BAôÉ!`W&d‘ˆÕWkk‡q1Dy¬­<Ï&ªßùËÚÂ?¡­BÅ~Ê‹S^ŠT§0Ÿ²Àe1RŽãÁ+Š$K
+=)œ³A'Ÿó{q8Gã¹,[èÎ
+ÀøRpЄÇnÏ6ÉiC`±ÉÛüÞ-Ùëí]UãdJåò8ùOÚäëËðFbm¹!+WÞ–ûJÊÐê”Lš
+
+i6®©Œ„Ö¡ø¼,´{²£JÆ®Î!§.0Á,· ÜëÄ`ÑÔŸ«v‚‡r5㲜—Îúe‹»Tã”zIp·Zù蟲qÇmfǽäÆ%Ÿ‘ÏŸ(E‚ñU,Œ´½áŠÅÞƒ¹’$§’d[ï!<X->e_YqcêKÍ6A°%ùÑ5²c½œVî·Ë¬þ2<œÿrJßÏûóx±>ÍûHußIÚŸ_÷Ïòÿ±à«¢Ø«óˆŒ‰ÈÎ
+‘}Q”"†ÂRðG8X¯g\^bºù‹át`£ŠÝ^ËêMgŽ€Åôq
+’QfDÌñcMz‚‚#\Þ9‚š¼òòôIŒ sQ/lÉ;ac CAÞ•‹ƒùÃÆYé½
+{Ë5]Òv»ÉxN6 WœrfiUS»ª\Q;=i¨r%c,ÞЊ|²*hBpÔqôL‹­a²ñ¥Š>Oì«,Ûú0‹çÙïî]Ô‚8uM¢Ÿ ÓÐlFB3š.1„˜ÂÄ>Ññ T4o¯AVhæ7ù6/’ÚE“0ŠF
endobj
-1844 0 obj <<
+1842 0 obj <<
/Type /Page
-/Contents 1845 0 R
-/Resources 1843 0 R
+/Contents 1843 0 R
+/Resources 1841 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1830 0 R
+/Parent 1829 0 R
/Annots [ 1849 0 R ]
>> endobj
1849 0 obj <<
/Type /Annot
/Border[0 0 0]/H/I/C[1 0 0]
-/Rect [461.1985 616.4281 510.2452 628.4877]
+/Rect [461.1985 234.8652 510.2452 246.9249]
/Subtype /Link
/A << /S /GoTo /D (DNSSEC) >>
>> endobj
+1844 0 obj <<
+/D [1842 0 R /XYZ 85.0394 794.5015 null]
+>> endobj
+562 0 obj <<
+/D [1842 0 R /XYZ 85.0394 769.5949 null]
+>> endobj
+1845 0 obj <<
+/D [1842 0 R /XYZ 85.0394 752.4085 null]
+>> endobj
+566 0 obj <<
+/D [1842 0 R /XYZ 85.0394 660.0457 null]
+>> endobj
1846 0 obj <<
-/D [1844 0 R /XYZ 85.0394 794.5015 null]
+/D [1842 0 R /XYZ 85.0394 629.9318 null]
>> endobj
570 0 obj <<
-/D [1844 0 R /XYZ 85.0394 769.5949 null]
+/D [1842 0 R /XYZ 85.0394 388.2848 null]
>> endobj
1847 0 obj <<
-/D [1844 0 R /XYZ 85.0394 748.9522 null]
+/D [1842 0 R /XYZ 85.0394 360.9804 null]
>> endobj
574 0 obj <<
-/D [1844 0 R /XYZ 85.0394 667.6879 null]
+/D [1842 0 R /XYZ 85.0394 283.5376 null]
>> endobj
1848 0 obj <<
-/D [1844 0 R /XYZ 85.0394 636.0345 null]
->> endobj
-578 0 obj <<
-/D [1844 0 R /XYZ 85.0394 425.9376 null]
->> endobj
-1850 0 obj <<
-/D [1844 0 R /XYZ 85.0394 394.4436 null]
->> endobj
-582 0 obj <<
-/D [1844 0 R /XYZ 85.0394 313.1793 null]
->> endobj
-1477 0 obj <<
-/D [1844 0 R /XYZ 85.0394 281.526 null]
+/D [1842 0 R /XYZ 85.0394 253.4237 null]
>> endobj
-1843 0 obj <<
+1841 0 obj <<
/Font << /F37 1026 0 R /F21 938 0 R /F41 1218 0 R /F22 961 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
-1853 0 obj <<
-/Length 3670
+1852 0 obj <<
+/Length 3794
/Filter /FlateDecode
>>
stream
-xÚ­Z_sܶקÐ[O3>”
-Æ'áÃ$Ÿuå¢m–Ôùï$Qe½Äi•šA_T ͹ÿÄ΀÷ûÖÏ·¤%¤“»\(›Z^è«¢ÆÇž‰<Ó)…N­ž]‡‰ö ÷‹Ã¥ùþªcïoùUÑ,ËË×wÕ
-œd¢Œ‰¶j*¦r*¾}N¤5ùY»ç„ÝçÁ(¿ªÙ•Duoü³Rgvæ©Qÿ×<ôdEÑêèÚëöŽ>‘³•ïiבMPÊ •¥kŠu¹ÀÏ*Îtžgv¤r LÌ"áÝ«~õZ€=¼ _&63i%¹6–68Gr…ߘ\ÓLdYš>Ó,­HÓÔ=6K?KG¿mS£ÔÀ!’hÏä,l<ød7ÞS`Ød¹az-›ÌÁ¤–çTô2³轟£àYëÖ WÉ=óÕ_Jîò{ÕmÁ¢ñzŠ ^9= ²U):P—MõtYôÅMÑ•ä΋fI Ƕ§&“_ñšàX%µ¾x¥‚ÆŒº/›Â›vïhe× ?ó:0eý¼Þ%ì=ú‡m×ÓC_­ËÈÆ‚:eÆè±æE„«•p‰ ÂõûÕtD÷¾êo©UÐÏ "Éêç ÍÈÎ癿•‹x¤\
-k²¯³•¤~K‘úªì·%óÙ©¼y÷þoçÿ¢öÕUWöl
-¢©Å›îaEü.zÒV»·bÿD;_Û†[ŦüÉ5ï9ôÝM‚:xƒG¯sý Ùé˜í;4ºM¹¨¼‹g"Þ>yèãÔ
-ƒanŸm¢™ù`¢àѵIg—+– Äcäÿ´6HÒk°—¤o’…'´èšµ¸«>7%†*Öû†Ç|³ëJ6“¢;°0¥0ŠÌÑOSÞ[Ì3ᘂ­`‰Qs¹6T+œ®è©µi«†›mƒ~V[ `MyA,ÀÉ4{Ê’@Ëì€oØ’˜zÅÓueÙnb[k¡À!>#%™R‡;ÍS‚},¾„ÉZú]ƒ'dFØZYd*´ÌÌT¼ëÒ©f×¥S6z울.ì¸õ†5%½)Q%ðÕÃpñ•ßmlZ€!ÓÀ7˧Â5CVç)­èm×ò/`ì¨Ö›úaP†Q<Äp,J ›ŽøÆ9Æ7ÐCë‚Æt~èðøNê#û%MˆY??z:›_[17MÛSƒ,ÄOÖÒop.ôT4Ý}¹í^âJÉb/ ^rÆEì6„ÆæÄÀ¤6î.LÌéæáÀ ‡¬qop]ß~Þ›wsðí×ê5¹È Ìý—žZG‚šA±O5Ê£ †t‹U_n¹ÉsjyQ*ð’^”¸¢¤{¸2† ·TãØ’Q¦4iòlã·˜ª™ˆñ+P ¬dÑn‰ÍyÀŠ¼Ô#]Ø@æA+´î«º¦Ö ÷L¡oîÆ ËC¬ƒÆ^ r´
-ð´’{%Ž¦ p"l×
-÷Nœ3z8î/­®çÀ
-ôäC%ü.n °k_ÉMø*áìÊÙnƒasɽâÏ)¡Ñ>e{ mK˜˜œ¦  7ÕRú‰^PŒ%V:ê'?‰­›’{¶UßûåÁ¸€–ZýüÔî¶MÁŸÐ_ÄjY.”ÌbÀßKZüÔÔ1i+Hé•S£ZŽñµœf"Ô2t"m×!4X%òô Ó]ã2–\âj'¥.ôÉwÕñÕ·PškÛ†F†žMÛuÕÍ0cñ=±³DGgr®§¹}=mAZ
-ÊÐ,v=„¨5):Z;âž\pÛ•¡Ê– íyåÝ·biÏ:
-© _iB½›•¿
-†i}òé%JKgXû<ˆ¯uÑuiü¢u‹¢_ÜÎuœtaœÿ)–Ë-lù'?âSíý2öÿ÷eÌ'eÙõUã‘æï'¶-!VvÕ]9'øŽãÊîS»ý„‰>¾Œ-éÃH<ä™^Râcl:þ
-˜ø?Ô ¹ l¯æ) xS¢ò¡y¶ÍAåÿÇüOD)Tã:^DrB)‰Ÿ>âkSÈ/¬¼0þÏçÃϦ½/·«OòÙª§~`8Á‚>„R82œX:±6ƒ‡2\õSª\'Éð¤r{GÙµá¢Ôdà›wï©ù*…_sp€GŒ¹›*¥¸!ÊM9ªKdpËø¥âªBÑ!ððBÏ.ûéËM±…²«‹m >—„“‡c$î±
-yºnSWL‹V„}e¿Ût¡8Hk×Çôõ¶¸#2YÂ~=á*×Èvu_mê!ÓEqÆO|΋Åm ¤€ë²'4&*•‘³:-ˆÖë2UD)/^R}ly¬-%cm©H؃jÐmŠ÷sU]ªIN‚ §ãŠ¤òÆÑ<ÝîÆ£ñLìá|e6›½b Á«æ %£‘ˆsrDÂÚÜë@â;Ðv²axÀJ1¾«zÔµd >xÂóåü18@:¹ï²‘PÙ£Mª!î³=¼Õ¡3ð/Y.}LKœ±Ï¹×¡„óæ»Õ1(ÎÇ$ý• :ÃÃg³ŸxðÝx´@€4 âS<:H;„â “>
-âÿýºÆçc’1]ƒ¬φa¿¡l¾x­þ@&ŧ˜tR¤nÊâ1UË1I“#U {ãGU p(ÀVó U£x7AdѤtC “ô ¯›žÇŒQëp€¤'‡WXüÈÒÙ ¤ÎÑM‰hBN˜<®ó&Ò¸€ý‹¡Ä7QOØ›M)>±4‡Ÿ jY®Š]Í+ñ¥&­‰NHòç`w"Å+d[-|¾ˆ÷>öVUvœƒ]6û·…\ËÑiîøHpH'¶Tˆ¾¹òÞ'¥§Eª‡kgqéáå&£ÿ‡ô,~¢GT„…Ö]»¿ö™Êý'h^)+×ìÜߺ¿­·t‘€sÎ;¬>à©’¿¨„/Ö%–F«nMtÄkÂ/IqøƶßgxÙ•u¹}aà¾Ä>7™Hà‡2FABaJZ³öwLorŒ‹Cb9«‹$\¹MD{!ÛñAn‚|T.A …?rÌeÀÔùpÊ}\Ÿ¢)Æ]€™»ž?Ÿ­É½-xRCBˆ¯Â9M{ä‚)¤Jx+4r4Ò¤ß}ùt37Íñ¤Šß+,-R D˜)”§µ8·T³þ?'›k€endstream
+xÚ­Z[wܶ~ׯÐ[Wçx\HhžGJ•&N++íéqü@íR#.¹Yr-+=ýïÁ xYQöÆíÙb‡¸ sùf@u*á§NS+¬×þ4ó‰H¥JOW›yúÞ}w¢¸Ï2vZŽ{}s}òÕ…ÉN½ðVÛÓëÛÑ\NHçÔéõúíÂ
+-Î`¹xõÓë‹Ëï~¾zy–%‹ëËŸ^Ÿ-u*—?œS뻫—?þøòêl©\ª¯þòòo×çWôÊòß\¾þ–(žÏLzu~q~uþúÕùÙ»ëïOίû½Œ÷«¤Áüvòö<]ö¿?‘Âx—ž>À)”÷úts’¤F¤‰1‘R¼9ù{?áèm:+?%…6VÏP«S¥„OS=‘`ê…5ÚôÔ¤"¥\lò:_¬—÷ÅcK[}Óå]±)ꎅ¸Ë7›|‡ûþê"Q£ã‘§KŸ¨$L;ÉÂÜÿÆA§Ú¯drºìù‚Îm·+ë÷Ô­¬Ë®Ì+H„z¿¹)vŸn'ø:¬#ã
+¤'oŸöû?,o…ïÞ…E—³»ûÏ×$®éa
+=’&²§k9ÀÀ«U‘·<Õ¾¥èC9\‘§ÍÈùaä|5ÎÓ‚‘¶<ëÐë¦ü§±‘Ë `Æñß¡+¤•&å ÐÞ…ß’
+™^IyoÆ@Š›±âÓóп5u@j2"Üî3PË <ãT„°€&ê`ãÙ˜u|»)
+N ô‡µ”Ö†8T‚ëãx"4ú²/´NC>šK£‘^¶ÌâÿÊÛƒm±§#M‚%Öiœž:¤€»¼ž?>Þ˜£³$3ø¥Qb
+<9`al¢=S‹xð_]?ÁJØ4‹È±a“9Xüó:vú3™RŒÝ¼*ú°K¦”ÌW—ßL"` È¢ÉY4ìÅ}Ü9ýàs‚5YŸNe H-¿ oRŽyìa×ÕÅ+j¤R©еɱSçT•´UѶbÎÛ{T^ ÿ h˜9XP§ÔZó9ìù¤´Q¸á¼0 㼘T°ÇðèE¤XýB´ÙyÏá_ƒÊÍx¤L gÓ/³-“p¤8ûmÑ­î
+泋Rùöõ›¿žÿ‹ÚWWmÁÎèD(eüÁrx[V²n\C³1-„§…ãNññÁ.:s EàÞÒß sÖEÔ?™ˆÎí¶X•ÁÅó$Á>ísÀÇh †™;ÚDScž”jŠ@Nt! Äk•ž…4²—dÐà Iª;r…:lºb-Æ_ÀÛ¬÷\‘,Æìû¤#olL)öº¥˜ü 22O¹jåÑgÍå¢?P£eŸ}™5eÍͦF? é3fÔ¡t2À©¾˜ñ¬%–¹ß°%ñì%/×E¹™Å¸F@šš‘dªõLQ—ûXÝÇÅznòP
+EF"%mP –êíT‚ëÂZ"¹.,„ö͉ë¢*hK]òŠÀú1V"CÂœè)fÅWTVJ§zjøfÝàR¸'ókœé–Þ¶ ¿)¹
+hËŽ3ɆkdQaF…øÆ{Æ7*j¡1]_qåV™gÎKY)Riþ@Râdôµ%sS75ÈBÂb =GUebU
+ÿ3`EÖ¤Šãð(\п*±J}—×\ÛÍbÈ|CÙwTñþŽzÉùR¶GêHÕ²p„=“Ó4áô¦\¡QÒUè Š±ÄJKtò“Ø
+Uh¤ìÊ® Ûƒ?àjåôøµÙïÂU þ!¡¿˜«¤™Ð*þAÒâ׺š“¶†”^{=ªåØPËyd&b-ÃÈp-CƒÓ"K2Ý ncÍ%®fRêòQŸ1ªN¨¾ÅÒ\
+ìÚ÷”mÓ¶åMßcñ±³FGg3®§ù¡ž¶â›.QKmƒëÔ>^©LbŒIÜL•“ô–c›Ã\m¾¶šØ(5{«‡¶‘ô¤"~f’ètñá§öÙ§²mœÆWhÎ&j ‰3
+ÊÐì? ¡¿ñÀ n¸i‹XeK…ñòàò¿{h(ÄÒ™ñ—0ô¹Jêý¢øX¸‹1œn6ZÒeg­™‚þC³»ïQÄ_7»¡î-UÃé„O'Ìˇ ³‘o¨ ¯‚‘¶ŒºøiO\mLצpr7ÜpÅ“Wyħ‘††Ëו„Œg@¿Ë„tV}îH¥ðÞÄH7TЗZ9!3ï¦À2sˆ"깯 ð¢¯Ò­ëqY5Í=¤Îë¹¢™ƒÐ§úëéfË7F°@8<)ÀÒ ä{Ü_Z!mtب|ó±Üã—Ï£†D8í“Ïë>têïÈÉ.ñc‘É·PÄ{ŸArz AÒ¨xÁaÞ RŠÒ©JÍT[Bø˜ñ¾Ð×öwßëêƒ(Û•hvï©ž#f»Ž¥EN§|7]_+ ”K“øf¼Åq’gq‡eC?.N+±7
endobj
-1852 0 obj <<
+1851 0 obj <<
/Type /Page
-/Contents 1853 0 R
-/Resources 1851 0 R
+/Contents 1852 0 R
+/Resources 1850 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1830 0 R
+/Parent 1829 0 R
>> endobj
-1854 0 obj <<
-/D [1852 0 R /XYZ 56.6929 794.5015 null]
+1853 0 obj <<
+/D [1851 0 R /XYZ 56.6929 794.5015 null]
>> endobj
-586 0 obj <<
-/D [1852 0 R /XYZ 56.6929 385.917 null]
+578 0 obj <<
+/D [1851 0 R /XYZ 56.6929 769.5949 null]
>> endobj
-1800 0 obj <<
-/D [1852 0 R /XYZ 56.6929 359.8019 null]
+1854 0 obj <<
+/D [1851 0 R /XYZ 56.6929 749.4437 null]
>> endobj
-590 0 obj <<
-/D [1852 0 R /XYZ 56.6929 227.5779 null]
+582 0 obj <<
+/D [1851 0 R /XYZ 56.6929 672.0805 null]
>> endobj
-1855 0 obj <<
-/D [1852 0 R /XYZ 56.6929 195.848 null]
+1477 0 obj <<
+/D [1851 0 R /XYZ 56.6929 641.9666 null]
>> endobj
-1851 0 obj <<
-/Font << /F37 1026 0 R /F22 961 0 R /F21 938 0 R /F41 1218 0 R /F39 1161 0 R /F48 1238 0 R >>
+1850 0 obj <<
+/Font << /F37 1026 0 R /F21 938 0 R /F41 1218 0 R /F22 961 0 R /F39 1161 0 R /F48 1238 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
-1858 0 obj <<
-/Length 2085
+1857 0 obj <<
+/Length 2928
/Filter /FlateDecode
>>
stream
-xÚ­ksÛ¸ñ»~…&Ÿä™ÀwýÉÉ99ß4º«ã¶3Íe24Ùœ£HHÉQ;÷ß»‹]ð!ѱ}íè pß/Pj*᧦q ¤—øÓ(ñE U0ÍÖ9½ƒ½ÅgæîмêíÍäÍ{/š&" u8½YõhÅBƱšÞ,?ÏÞýxñËÍåõÙ\rŠ³yÊÙÛ«Å„IèñîçÅû«¿¾8‹üÙÍÕÏ B__¾¿¼¾\¼»<›«8Pð¾f
-¼ðþꯗ}¸¾øøñâúìËÍO“Ë›V—¾¾Jz¨Èï“Ï_ät jÿ4‘ÂKâ`ú
-zÁ¬Úž©x¶4[^®èÙÀ>è ”U2x$†]§%I‡úìµ/ü(â3u“6fmʦ&º9?ëü®Ì•RgiÙêW­#„üYJˆ¬ÈÛ´Ršßw¦fÄC^Ýšþ‘º*öfÉÌÊNK8«ÊÆ|kZUAøé\iOxR
-ƒpe(ц}>j¶L›”ˆ@Üê–ùÜå{Ã(´£==FN:óZžÉlŒªJ§"Ló-]ƒŒ¯9ˆµösˆým™6-—Ý6äÅÑvçFŒ×’ß¡G½)\ÿ°øÄ8Óì6¢¦ÁÓýxT_àÉéˆM“WeM ¶‚yÙ l?*ð]î9"§Á9{€9m m}€@ZÔA·,Ö®¶9ôr ω@ÐÆ‘~º ±:–úÇwŽ°Ú–¸a(|Oîfc“0I\:ôpoPW1,
-Jæ6·åO‚.Å.+×k ~ÍþÙ+«îÀ¼Þ˜Œê5#ÓbgÌ™¸u¥â<:>Wã´«³#F Eä·9þ÷FB®Äg±|çI€RƤôXšU
-™Œzûzv!ðšz#¥+é‚-
-h8¾½¼õ*Ö¦oÜ™…ËÆ,èj0×6‡ fûC.ÓE*(‹á1zWó½ãø^÷f˜­þœž¡³þ XàV/dì©MÅ.„È{å†ýW´þ5–Àí28ºè¾yCGnlò!TßW»bI0ß٬С8Ú´*MóPm뵎^ÎÛ×çíE‚D±%…ý½‰Ï ñǹ#
-C¥adç& >+ô=oqh
-xaLǃ&TR3+vK;í[~Ëå®ä¦Òz f¹¦Uµ£ûª'É÷bˆKûac\¼ÔÀê|Œø*/ŽˆÏ\byûêœóy,FÿßTýÍ£Àéå‚»Ù>­‡³ïÇ.êí<w,eÕôòÃp²Ü:w~Ç{›­ÙçÕ®î¢aÔçô“G’fŠ×fµ«_3ÎP…Ÿ“eõ─0m¶yÖ8Ûý?“‚'ë6+hN¶¦ßÝBv«þ÷«ÇC=71t"â8JŽn·21œ'z‰qD_}/1úYc{Q‹^!snÍ!ÆoáøÝUÉÖ„ØÊ>õ¿”ÈÙ‡mº^§Û‘V„.„ÔQtd(„¾ÒÇ3\~¶£ð—Å8T^n±ÏmnVsüÂqæUÁ¯6ƒ¾yÝ´ÙbŸ_Æ\|JsîÂû%dÇþ%
-¸×‹c=þç€'áâ­aÌd¡Põ89–¼ý«áTôÿ-ºÈªendstream
+xÚ­ZYsÛF~ׯ`ùe¡*Ìcý¤$r¢ÔZÉ:ÊnÕ:.D-”I€!@)Ú­ýïÛ=݃ƒšÚ$Åôèéîù¦“™€_2ËM,T¡gY¡c#3[lÎÄìŒ}{–𜹟4ÏúêæìÕ•ÍŠ¸He:»Yxå±Èódv³|}ýÝÅ7—ïÎçÒˆ(Ïç&ÑWW×ßPOA¯¸~sõíÏï.Î3Ý\ýpMÝï.ß\¾»¼þúò|žä&÷%s8ò›«¿]õí»‹·o/Þ¸ùþìò¦×e¬o"*òëÙûb¶µ¿?±*r3{€†ˆ“¢³Í™6*6Z)ß³>ûéìï=ÃѨ{5d?£òØä2 P&³$‰ cäÄ‚¦ˆS%•³ *- X@ÝWöü©+;»±uÇúîÊͦܡ¾¯Þèd´-bbcò̱#)óúX—‹/Í”‰óÔ˜Ù¼—&¿_¬Ë¶ý@óÿãæ‰éŒMÙ-îæ‹u’´~ž{”ËåζíG7ããºj;êÿïë)ŸdÄgiÛ®ªË®jêßÇl,ÔÎ.ö»¶º·ó¦^?ÒüGÛ~lv놚Á·ßÌÓlQ–×ÔÇñ‡ìü¿›Ú~lý¶¾3˜ä?Äð×y¬3
+¦ž²^ñs[~²¼<›;ÛK3LJŠXÊÁÜÃç)'©ã4ÏsžÔŽ%K£ª¥gImó`w«ý[Y´²ewžDûÝy’G–úšÍô~"%?‘FÝ]É<׶›ru@vo·vwow<X·=Mo®"â×½Ý=¹¬V¸üÊ:)æ´aZÅE’Ó½¥K2Ë£¥ÝÚzYÕŸ¨é¬χ»†§6<Ëö3LÇ¥
+]uÓÁm¹ëªÅ~]î<Û}kÉ8@¯šOßl×΢ýrív]1/Òûl·ß2㇪»kö]àwå=±ht =wç°2ãf³_w¬G-2g÷œòXrM—åâ.€
+•H°¬ƒ²m±™àÆa/!)Ät
+•ÎŒ”q¢À<#&ʸp§=ç=Çù˜¥ wù` 6…ÔÃʽï>RèD)ÅŸ&dÏñ„Z&±Ha“'Bº
+H8¬!1
+¶Ô`sSÇ`ÃŽlØ8647ýÊGÁ¦b•)93 lKùã`cŽó1ËØÒX¥£…¿€µ4Îu–ýy2öOÈþ0Îq÷&BÃZøíÃ2ù©Ü{Äü8ÖR‘X?k“”ì©
+ñ7Ë¡¸y¦õT¬•_´
+ÅþVb…û’1 !¬èïêrôÁuvÁ±8¶áê¯@¸†åb¯I¨üT,‡ªÚ·eí®ßC(¸ cËWSØ` YÕÃÄ
+ª<Á<CO¼È?ÎÁ‹WLTö÷›3…²åþAc X5á€ôtnÅO]™èñðÕõt ì7vÉ|¯›ŽW÷!.åÒÄ-VÏýë÷ƒÐ›½K_P
+ÈDÊð™` n‡=,"’y[ ÛC€÷ÂW×Þs“È¥dbÑl¶ÕÚ.ç~ôòbÁIg=ƒv¸PNFÖ‡1°l ,V°Ãâ~Që"”+_’Ô»è
+ êÊâé'^bâspù¦¦g=G4[YÛ{»¦> È£IIoâýŽï±p”,Mt¿ó<»­–ŒŒ¥O§³835»K sAžxKO]ê!ˆáó10³!>½¤[Z
+•ù1ÿ“düOñ¬È!Š"ôyxsÎ ”¸¹è5àËG/æ9€‹ÚãH*dQ3ûäL‹ª Ö¥Šû¢È%Û³#
endobj
-1857 0 obj <<
+1856 0 obj <<
/Type /Page
-/Contents 1858 0 R
-/Resources 1856 0 R
+/Contents 1857 0 R
+/Resources 1855 0 R
/MediaBox [0 0 595.2756 841.8898]
-/Parent 1830 0 R
+/Parent 1829 0 R
>> endobj
-1859 0 obj <<
-/D [1857 0 R /XYZ 85.0394 794.5015 null]
+1858 0 obj <<
+/D [1856 0 R /XYZ 85.0394 794.5015 null]
>> endobj
-594 0 obj <<
-/D [1857 0 R /XYZ 85.0394 146.1982 null]
+586 0 obj <<
+/D [1856 0 R /XYZ 85.0394 769.5949 null]
>> endobj
-1716 0 obj <<
-/D [1857 0 R /XYZ 85.0394 118.9629 null]
+1805 0 obj <<
+/D [1856 0 R /XYZ 85.0394 752.2115 null]
>> endobj
-1856 0 obj <<
-/Font << /F37 1026 0 R /F22 961 0 R /F21 938 0 R /F41 1218 0 R >>
+590 0 obj <<
+/D [1856 0 R /XYZ 85.0394 622.2614 null]
+>> endobj
+1859 0 obj <<
+/D [1856 0 R /XYZ 85.0394 591.5303 null]
+>> endobj
+1855 0 obj <<
+/Font << /F37 1026 0 R /F21 938 0 R /F41 1218 0 R /F22 961 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1862 0 obj <<
-/Length 1168
+/Length 1239
/Filter /FlateDecode
>>
stream
-xÚµX[sâ6~çWø:#Õ²ñmò”MIšnvKéSÊ0Š-5¶å•D)ûß+[6˜à$†°Ãx,tùt¾ãs“aª2º^0„Ž‰#L{¦1WcW=TÍõ$ÐœõiÒûõÒöŒ
-ôMèš
-ÊsèÚ–]*ðv
-©ûœé÷´P‚’ DZöay„%9¨†9Kh¸Ò] q¢›ë}ôÜ™ž;㋤ãB8}sK´ËC01IãÕ<Íg“
-3g\nú‹?Õg%²oC×wQ+¥®8åK‰^KÜB
-D$ÁÕ"AB–Eâ@ad@0|x´Ìwdµ¯¦×Úï›[?¡"HH¶!€æÆ»®K
+xÚµX[sÛ(~÷¯Ðä)Ùˆ.Ömú”vn:›´ëzŸ²"¡”­$TÀvܺÿ}A€-Ùj"§Ýñx>¾s87äX¶ø9–À vc+ŒÇзßJË‘m=ˆwoGŽžÌ$Оõz6:¿ôB+†qàÖ,oaEÐŽ"Çše·§tá™@°Oß¼¿¹¼zû÷ôâ,ŸÎ®Þߜ׷O/¯þœ¨ÖÛéÅõõÅô 8‘ùãâÃl2U¯ñúêæw5«Ç@§“ËÉtrófrv7{7šÌ¶²´åulO
+òet{g[™ûÝȆ^ùÖJtlèık•£±ïAìyf¤}ýµl½m–öêϱ¡ënÇNŸýžë5
+üþJÊ €€ëÁرÇÍè£Õlûô=rD«¤8QýoÍtχQàûpû¾:‹ós5å:áé'ÕLŠB5Ò£Š3Õ©WRÎD™êܯՓB†’Bw;è5EKLJ…}ÓhÐÙö›æT­_©Ö¾ì^g£)Ê ©6Eé‚2¼Ô]†è§ºÃ‰zEuîå¦ÑHeÔñ$”,q¦7K Æ)N¹ÑÝî¼H¾Ó¢¦•”u`JʧÔú•TzAJ*žà
+W±*ôÉÔ‹û§¦—¤)b ßzÝ'ÂäU†±Ã>i±é”Ã(
+ã.7¾®‘1&”ûªO€{àÀœÌîOÔ°‡ï´mìY³Ûzy~é:Öv8—›Các¡· ?n(BŠ½U¡ŒyÂQ)Î_Gš”eB^Ç%å‘ûÐñ|oOQ²5¯’RwoÓ"a쮣1m*‰iìvë›d¾,]wý#Ë„y±yãAó3¾õ–æy7 ó~¬sËiR±Ñ_ÌvQgâ´~¨‚5®¢[Ô„…Mg5w®æÎéÂXò-„ðîõ0DPÅy÷$q=—’hÌšP¾—½ƒ²‘ȃA$sHHCqš‡ n÷
+d¨HÖ¦ìµaÆŽ$ 8Œ$ÇGKQn~FëC5ý¨ý¼¹õÉÇD1¥¼ ¸·ÜuÓ
endobj
1861 0 obj <<
/Type /Page
@@ -8529,17 +8534,26 @@ endobj
1863 0 obj <<
/D [1861 0 R /XYZ 56.6929 794.5015 null]
>> endobj
+594 0 obj <<
+/D [1861 0 R /XYZ 56.6929 540.8995 null]
+>> endobj
+1724 0 obj <<
+/D [1861 0 R /XYZ 56.6929 513.5566 null]
+>> endobj
1860 0 obj <<
-/Font << /F37 1026 0 R /F41 1218 0 R /F22 961 0 R >>
+/Font << /F37 1026 0 R /F41 1218 0 R /F21 938 0 R /F22 961 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1867 0 obj <<
-/Length 1132
+/Length 1226
/Filter /FlateDecode
>>
stream
-xÚÍXßsâ6~ç¯ðcèŒK²,kî)—’47=®¥ô)Í0Ž-'îÛ'‰&ä¸ÿ½òÀC ÜM; #Yö~Úý´»Z Y¶ù!Ë£Ð&ܱw µµ‚i϶̻몿Ë@ó«÷ãÞùa‡ÜÅ®5ŽX´=Yãðöìò—‹ßƃQ`jŸ¹°¨kŸ½¿þ\ðª¹ü4¼º¹þstÑgÎÙøæÓ° ®£ÁðrÐÈ£ÈÈãa‡ÀÕͯƒªw=ºøøñbÔ¿è Æ+[šö"›†|éÝÞÙVhÌþг!ᵞ̃ çØšöJ uYŽ$½?z¿¯
-ƒÍ¬
+xÚµX]s£6}÷¯à1îŒT$ñ¥ÉS6uÒìt³[×}r="¡ÁˆEò&Îzÿ{;¸';ÆB £s¯î¹W¦ú!ó¡I¨e¸Ô‚¶‰l#X Lã^=» êP¿šo}˜ ~½"®A!u°cL¢–MÏCÆ$œž]þ~ñe2¶Í3í˜gnnÓ=Tÿ]~¾½º¹þ{|1t­³ÉÍç[Ý=]Æ£ÛËÑ ÏFj<® ¸ºùc¤[×ã‹OŸ.ÆÃÙäã`4ÙØÒ´™¤0äë`:3P™ýq`BB=ÛxR7&D”bc1°lm‹º'ü5øsØxZmóŸM<h{Ømq …D¦©E]õ)t&¥§Cà˜æ™ˆïºÒ8½r•1Ý›.w,×ísý7+lV„ µmÜ }éßù¢,d®Ð:^Ä)ÈY”3ñ
+²:5ö÷¢ŸÞ¦ž8›Ë[É6ã¹Üô7³šaìèxnµ¸+Nù!¬·Ø›gÇHE¦Û0PA›®#?NÖj½yΊÅî^ób?YfÍöœg2®¥Ûaµ£89±búB²¼^HOÉkk’dÏrûO½Lù—/óÔOºryUx«ñjñR¤Zs‘± ÃìUöØÚPhgŹ½¬¨pX.v"õý­Ýñs”ƒ“7Aåè(ç Uú#•¨YÔ‘ÚG®%Œ\d Olí­§NŠ`Ïžþ¹GG©8âñﯳr9¬Q/Ö»+ẌlZÈÝ×zË$m–ª½ÙjͶy~Dz©Šö4s`î­JÏ%ü¾¡‡v‘uÉq¨t^W©¶Å»@|)ßN©ØÛö t¨¥ãšei/<«aÏYñné
+Ý´ž
+„,ñ«Aª.ó4}d¹¥î¿3È–w›¨mºéP»gúÙ,ˆP©<hì”âÌjä͵ŸK!Á®­ k»ú¥|dC꺎Ñèß
+ëXҭ奾¥‰Ô…'øæ4©:¯©Rb§ü|((Y¨Z§QÅ&˜¸ôÀ~^‚^nm ý·b“B¬R×]Þ+®G]‹1‚È5îtK® ]ÓsŽ'î¶Ð°(´uÚ¿}Þ§†VJí¤Ç…ÄÅÖ!ØoS‚K ±(=Îò¸¶¢ú :@A\Dµ¬Kñ‰„ô¥ªçq NÝMt;bj;“#ª\Òv‚¦®j¢7Ÿ×m3-ž‡7Gq7Žâˆé@S·&UHÑ>óÍÁÞkêÿqA”½endstream
endobj
1866 0 obj <<
/Type /Page
@@ -8556,16 +8570,12 @@ endobj
/ProcSet [ /PDF /Text ]
>> endobj
1871 0 obj <<
-/Length 1134
+/Length 1013
/Filter /FlateDecode
>>
stream
-xÚÍXKsÛ6¾ëWð(u†Äk|rÙu¦qE¹Tñh( ²9¥H… ìªMþ{
-¼ñbÒg
-'ŸAØ_…:W™vÉ:Ír'Fë©m\»Ö?îóRØZ6#].ø^¯ ‹Ìòã!JA€¸±! )ÅNq‡;îMûSmÝ,#\×ú‘“NJƒ
-Ü°»ú¬·w~Ÿ&aeád‡Z×w^ñ]°ùv]ûØÄÌÜ„Îfvr€Ž0ŽÓ{ÿÛFeÛÖ…jóKi=]…ùü¶q™þx?Zew&äK¥[À“ömÜäË\™øKuY¦:õØõ‡Ñ«ï?òó2ÍîÃlqr€£rÊî
-z
- w¯ŠòBpDãÆt
+xÚÍX]sÚ8}çWøvFŠ>,Ûš<¥Y’Òii˲O,Ã8 OM%Ñ”–ü÷•± 6˜‚¡;ÙÉd,®¬sÏ=ºâ^„-dþ°ÅèpÂ-—Û!̬ñ¬¬G3wßÀÙ;  ßzÓo\ÝQ×â;ıúÓ–‘ça«?4H`Ë  æíÇî]çþïÞM˵›ýÎÇn †šw÷íttß»ùðá¦×Øc¸yûöæS¿ÝK§œ ãM§ûgjáéã
+õt0©5ZÌ„LÇ×éc˜„lüŒ!gŒ”@üï¿dÍDËe-¼Ï£.D™Å"Ô˜ùJç‹–Bb9Šâ“1~ƒ(*öÖáq@(äÙå ^®sùtbýGYdÉhùy ƒqè+5L?ü\/­„ÕËy¶â)ˆôuUÓ Ì^QZÑcNùpÈŠG_qâ(\ÖP®´ã'1þ’˜Tjø1ôìËh5õƒp<F±Ɔw׫«ôÙu:èÌ桘‰H‹ ¬Ô™TêL/Õ™ìè¬ôâáWâùa?ƒ¯ !—9jjŸLÌ‘R£™¯ÇO£0PY\/'(YÀ4;r ,ùô‹Ì üp1/ŽGñ<I¤““æüÜ+9”ô'|û%_Ér0¥Qu«ŒßõJúÏÇ)Åc@Œ¢“-JÕjH¥k)›á©JÛŸÍóQ’™mK½±'†%7ÂÒQ{9YuÄÁÏm˜¥e…¼\• '1cÐÆ.ÙѯÂI¿/"K3nü—…˜+ƒ»¾÷*¡–~¤¦B‚`bR"ˆÎ.e ¤šÕ
endobj
1870 0 obj <<
/Type /Page
@@ -8577,52 +8587,55 @@ endobj
1872 0 obj <<
/D [1870 0 R /XYZ 56.6929 794.5015 null]
>> endobj
-598 0 obj <<
-/D [1870 0 R /XYZ 56.6929 254.285 null]
->> endobj
-1873 0 obj <<
-/D [1870 0 R /XYZ 56.6929 224.1711 null]
->> endobj
-602 0 obj <<
-/D [1870 0 R /XYZ 56.6929 224.1711 null]
->> endobj
-1874 0 obj <<
-/D [1870 0 R /XYZ 56.6929 199.7598 null]
->> endobj
-1875 0 obj <<
-/D [1870 0 R /XYZ 56.6929 199.7598 null]
->> endobj
-1876 0 obj <<
-/D [1870 0 R /XYZ 56.6929 187.8046 null]
->> endobj
1869 0 obj <<
-/Font << /F37 1026 0 R /F41 1218 0 R /F21 938 0 R /F22 961 0 R >>
+/Font << /F37 1026 0 R /F41 1218 0 R /F22 961 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
-1879 0 obj <<
-/Length 2617
+1875 0 obj <<
+/Length 2961
/Filter /FlateDecode
>>
stream
-xÚ¥]sÛ6òÝ¿BôLÄ€
-< c›Å(°0QíïJéo¤_)–÷ŒØ¶|þºÿ…g‹å’Ñ]çW®d»uåþ™¥‰~Sô’Cœ0·hfR3׋ÞmÐâhƒa·,zYVñ¤…õ»ã˜ëNñ"6F_EzD 2Š².·eã·*FuמóÄ^ümSlñöâ¡4©{3¯)ÂãY0
->·,WÅP÷Xûý¾hº•_P8±2˜e9%œµ[`7‚]»Çû¤:H cÚ†G
-
-Éœ»‚ªf%éO¹8
-ˆž~ð¨#ãF»ûMWeÑc¼¯­“rl]2?9=
+xÚ¥]sÛ¸ñÝ¿BôLÄ€ ’“§\ÎN}Óø®Žï¥i&KÅEª"E×éï~¢lú¦×LÆÃÅb±X,öJ2Sð/™•y¬t•ÍŠ*‹s•ä³ÅæBÍaîýE"4sO4SýpñúZ³*®Ljf÷«¯2Ve™Ìî—Ÿ¢wyûËýÕÝå<ÍUdâËynTôÃÍ팩øóîçÛë›÷¿Þ½½,²èþæç[Fß]]_Ý]ݾ»ºœ'ežÀúT8¼°àúæ¯W ½¿{ûáÃÛ»ËÏ÷?]\݇³ŒÏ›(ù×ŧÏj¶„cÿt¡b]•ùì
+þ•=+Û2Ú6}7åpà†s ªÅ„Ó3ˆ›ÒvÝ!X†›"<îÕƒpCÑGÆ-ÝÊî›áßþ°\…Ö«]“Á,'=Å~¾q‹$âôi”kÆPZ/«
+„óâ'OâZ)Ü7Ú#³œ¨&L‰%rê«Žúq=ð.ÛÆ.œÏNêŠTÅYž>é®Ä“!.Cr8¿â¨n)0
+Å ¬Ãº&3ÑGÑãSÛ–ð™0Î)Dü¶“Äjy ɳ]2…$έ¥¢YIöS>ŒâÇÛoêȸ÷Àtåì°ãCiµ˜Ôcçs©¸ÉéY³Æx†U“ñÔjÒ
+„–ú&B¯Àb€)( ê±Ù ¾éìÉMO]
+½UXùÇ
+ʱ)×Mœóð#ñ Š?Ae)‡VþiÁ™¢B¢Dˆ˜S1¾Ég¶O•Î•|žû(j8µ<ß(™°Æ× *=é
+¥)̼ôJÆ™eü,}ª?Cîë%þª`ˆˆä3å*œ)WÏÎôGÙQ•!;ªR²#
+¥^ì©ìÃ1å0\€¢Ýùã>ÓÐeNêèšó¼ñ à+~+“Š
endobj
-1878 0 obj <<
+1874 0 obj <<
/Type /Page
-/Contents 1879 0 R
-/Resources 1877 0 R
+/Contents 1875 0 R
+/Resources 1873 0 R
/MediaBox [0 0 595.2756 841.8898]
/Parent 1864 0 R
>> endobj
-1880 0 obj <<
-/D [1878 0 R /XYZ 85.0394 794.5015 null]
+1876 0 obj <<
+/D [1874 0 R /XYZ 85.0394 794.5015 null]
+>> endobj
+598 0 obj <<
+/D [1874 0 R /XYZ 85.0394 648.8056 null]
>> endobj
1877 0 obj <<
-/Font << /F37 1026 0 R /F41 1218 0 R /F22 961 0 R /F21 938 0 R >>
+/D [1874 0 R /XYZ 85.0394 618.6917 null]
+>> endobj
+602 0 obj <<
+/D [1874 0 R /XYZ 85.0394 618.6917 null]
+>> endobj
+1878 0 obj <<
+/D [1874 0 R /XYZ 85.0394 594.2803 null]
+>> endobj
+1879 0 obj <<
+/D [1874 0 R /XYZ 85.0394 594.2803 null]
+>> endobj
+1880 0 obj <<
+/D [1874 0 R /XYZ 85.0394 582.3251 null]
+>> endobj
+1873 0 obj <<
+/Font << /F37 1026 0 R /F41 1218 0 R /F21 938 0 R /F22 961 0 R >>
/ProcSet [ /PDF /Text ]
>> endobj
1883 0 obj <<
@@ -9160,19 +9173,23 @@ endobj
/ProcSet [ /PDF /Text ]
>> endobj
1958 0 obj <<
-/Length 2356
+/Length 2360
/Filter /FlateDecode
>>
stream
-xÚÕZKsã6¾ûWð°i+‚ñ&x[elÏ:Éx¼ŠS9ÌÎ’èk$Réqüï· R”LùQÖ¤²å*h4Þß×Ý
-Šÿå\fË9"KIXm_×:†ÍÓM ¿´ÇÝʘ •ìöJóÍÃüó/E¹
-7Èæ?øÕÂÒ5sØóΪ§w54°fP-Ê;ß ä§¦´xªô;Œ¹´¢´_„æÌ€ÕK6Fãö7ƽݘXi@›EÀÓHj¾°Í*E»õÃ× í‘–ƒUYÕ$¹«²Û»%I `(M—ËòÞŠtBVÊ"ôô5{ É:ÛôaŠ©le‰©
-°üa8ÒÂc™Î(è,B†ºí…ßînU8 ¨ÛöÝU:8 ©ì ŠAIÙiÝ­Aæ™›¯¸=€J!$Xî^p°`DlÃŒ{”Æ cVël–û#÷uTÏ;±Ìq‹Éb­´ïGv†­ÑB- R†§Ùæ´ª³M^}™ Ijjoq07K«ŒíÛnm€`3¢®Å{›UÚ1¾
-æ­X"¸~E—ÔB=a˜-gškõ´a¶±a‰¶¢%Ru7}¡m–à[Û ?h„U¾Ê—醄
-+Ý^¬k<{zƧu 3¾'{:°<.{Žêsp¾ÂZó {¸c&VìÝLÍk¼ÜS;щ/òø|ÒŸ³Í”nheSÕâÌ—¶ ê0òiWÌÓЦK'Ñ3[RâÅ<fÖPÔ"̯C,(‘ËyŒfèzE5]¯ã¯ãº^‡ðéݺ×&4ÔŠûIcƒËA…†46Ô ¤±—ƒºL캜žÝ^ÞþÒtÑø7&JbhÍŸy’Ó0…8‰“i^ét¾3sä÷gŽh^ûa$(!a¤”„NÙ«auÇ÷È«Éî,º]ßÓ³º»ˆŒÃS£í¥‘Ñ<Dn ÐzÔ¹IzÆÁrC£žášŽ=OÄÿZuñy, •0É}EŸ¡‰9L$ðÑ ¿<M$åÆ¥$,Õ³õËœÏñƒÐMhâ_¤]¸±¢x‘~Ë(7ÍèBØ’}ËSÊܼ»¦Œw
-·DÛ•åE^çiݪ]^SšÎ焈ª"A^x
-lÛ‚îU¯ŸMØxr=Lä`\Š
-l¼¢àEpþè—5ø½WÈ‚Zgîÿ†X¶Dendstream
+xÚÕZKsã6¾ûWð°i+‚ñ&x[elÏ:Éx¼Š·öÍ’èk$Réqüï· R”DùQÖTeËUÐh¼¿¯»JDþDd,³‰L¢8ÑÌpa¢ÙêŒG_ îã™:£FiÔÕúñîìüJÅQÂ+mtwßéË1îæ¿ ,“l=ðÁ‡Ï7W×ÿ=c=¸»þ|3IÃW׿\RîãdüéÓx2 gÄàÃ?Ç·w—ª²¡¯o.H’Pr¤ÓÉåÕåäòæÃåð÷»ŸÎ.ïÚµt×+¸Â…üqöÛï<šÃ²:ãL%ÎDPàL$‰ŒVgÚ(f´RdyöëÙ¿Ú;µ¾ißþi.˜FE#! gÝñqi ㆬSÌ:»?ìHð„Aop(Öi¦„ŽÛCÑ¢s(B¦]Å&aVIå¥Ê–÷¸3çWRvtcΩptTº[äœE6C7xXfX°ƒUZÏY¨y\dåêE¨/ÒUF¢i–_Hø°ž§u6'ùNØfcÂæ°Ä韕E5()©å=¥Aùü
+ör;m›0)D¦Ï¡]^?õ¬ÏÆu¢‚â9—ÙrŽÈRVÛ×µŽaótÓÂ/í°[3¡’Ý^i¾y˜þ¥(7CáÙü¿ZXºf{ÞYõô¡†Ö ªEùà;ü4ÔO•~‡1—V”öï‹Ðœ°zÍÆhœÃþÆX£·³+ èãq³è#xIÀ¶Y¥h·±~Zã´ =Òr°*«š$Uvÿ°$) ¥érY>z@‘NÈÊAY„ž¾fO$Yg›>L2•ƒ­,1U–? GZx,ÓEÈP· ½ðÛÝ­
+'uÛ¾»JG'!•ÔC1(); ¢‡5È<S`ó·GP)„ËÝ+Œˆm˜ñH˜òÂ8aÌjÍrä¾Îƒêð¼Ë·x,ÖJûþþÞ{ä`g¸Ñ-Ñ’ exZmN«:ÛäÕW ’䡦ös³´ÊؾíÖØ6#êZ¼÷YQ¥Sà«`ÞŠ%‚ë7tI-Ô3†Ùr¦¹VÏf–h+Z"UÓWÚf ±µÍ°ñƒFXå«|™nH`ï9OT9ù<¥e:±ýÈþœe뚨iM½Ãlçå*Í‹0tyß3š·ÿ­æ"¸‚8˪¤œç ¤Á­<ƒ”μïX÷‘¢NŠ…;­_
+sÆè‘’ÀR÷âûôHÁ\Y,ŸÂ Ìøš>ÌŒ„Ô,‰Íž‹|ª\„ñ[ļ'Û8LÀƱyK¤×´8
+[ `íó8‘£M²Ñ«jô†`ÏÅj Ãé¥_³ O)ùÏÐ0Øóò±"•U:[äEFµëM^Ìòuº¤"šýU:ê ð°Ñßþ1¹ÿò‰<$ÜC˜µí 9x«‚²^ŸtÓbN²6AãÞXdU¿eI
+ˆÄŒ¢íŸ‘ÇO—+ªî D~Äíl°ü6f WÎñun‡Áh3Þ¯”rÍz”Š)(Q1Å{ª “çTð|…tÇ[cè;}ëÞHao2ÏG
+JˆƒØøaºP|¼÷“œ”1 “–/¸`ca
+àéZÆ4öéÿ6J
+¢’¼Tzh@Ú` ²ž*¨TiXš5¥ä
+^ZRÚóëß³@¼êIãň8ÜÓ¼BXfý(&æÞm™ƒB
+)Ý^œk<szÆ?r•²ˆQûª€ûM4êàó´4:©ãÁù
+kÍ 4⎙XQÄÿu35oq=pYí„(¾XäóiHÎ6Sº¦•MU 8_ÚR©ÉH¬Ü3ÏC›.œTÄ#ÌlÙ‰·wr?˜  C¤R~ˆa0¿àD~çÖÐõŠjº®Ç5®Çu]Ó‡u¯qh8÷³Ç¿ƒ
+ {l8Øc;~ t£Øõ;=»½Áõ±GÆÝ{ÄéØÓ…å_˜=*‰¡5áNÃâ$N:ìy£úÎ’ߟB¢yû Ì‘ „Ì‘RLeoä†Õo$Cä&»³èv¼QÏêvn&2¶—OFóÇBëcC'éQË Ÿz†kž;ö|O1"Eé“ó© ÔSñI¨„Inìú MÌqFûfø‘àyF)—0.%ªž­_çŽÆ$|›n¢ÿPíÂEÅ‹ô[F¹iFÏß]Àì[žRæîÃ-e¼K@%Ï ”<.òÙ‚²Gž «Z¥nþY‘¼^¾¡pOü]Q‰ÐÁQ^äužÖ­Úõ-¥é|NÈ­*ä…ç¶-èÞôú”ñÅÅ„'·ÃDÆá¦(½¾µÝ*ø×Íjβ
endobj
1957 0 obj <<
/Type /Page
@@ -9602,7 +9619,7 @@ endobj
670 0 obj <<
/D [2022 0 R /XYZ 56.6929 306.3415 null]
>> endobj
-1799 0 obj <<
+1797 0 obj <<
/D [2022 0 R /XYZ 56.6929 275.1221 null]
>> endobj
2021 0 obj <<
@@ -9662,7 +9679,7 @@ endobj
678 0 obj <<
/D [2027 0 R /XYZ 85.0394 255.5751 null]
>> endobj
-1670 0 obj <<
+1669 0 obj <<
/D [2027 0 R /XYZ 85.0394 232.5802 null]
>> endobj
2026 0 obj <<
@@ -11513,7 +11530,7 @@ endobj
/ProcSet [ /PDF /Text ]
>> endobj
2424 0 obj <<
-/Length 2027
+/Length 2037
/Filter /FlateDecode
>>
stream
@@ -11528,7 +11545,7 @@ xÚµËrÛ8ò®¯Ðm¥ª!‚A‚G%–³šÉØ^SÙÚ­L´I¬¡H I9ãýúm<H‘,';µ¥ƒ€F³»Ñï™bø‘)PÑhF>â˜ð
9ôx¹«/WBçÁ_[Š¤[Ñn•8¸¨xó»¾&Éw®Ä&`„ÀÁ˜Eî 7ì£liº¤8D³AÛ,—¯Z ÙÀØÁb=W,Öb½n1~PÏ3˜È:;ý¢y[Ñt¶ê”/‰rZyNþßÖûâÕÝjã ­&,„9ó‡¹}“'uýýn½}SêÖ…Æô`ÒTã÷ˆÞâëµ 8
9ãÿK‚ßçô8¬$TMç„Œ*ÉÍ2þð¸zX¯îïÕlœíéy”†G&$ô0~jŽ'ÝVRnÛ#Ìnd.wmn…ƒ8Ûº±ƒµª7±mº·Oz±‘Ë@7¦ÕLÏ_>>¶u>M,߶‹²xºi…ãÇÛÀ.ÌÊNNSÏ^bа|(>Ç‘-uº‰LŽ»ìYÚ’úQ2Õ£*øjí¸×F¸|ɱi„0¸"ºžkúXæáÅ•k:,=D“1Ë
='ùIœrë¬É!
-ê¼áø55D$¤m¥=œZÞO–UYœé
+ê¼áø55D$¤m¥=œZÞO–UYœé
endobj
2423 0 obj <<
/Type /Page
@@ -11611,18 +11628,21 @@ endobj
/ProcSet [ /PDF /Text ]
>> endobj
2445 0 obj <<
-/Length 2546
+/Length 2556
/Filter /FlateDecode
>>
stream
-xÚµßs›ÌñÝ…fúPy&û \Þ[Iü%±]K™6Mò€²#P²ëþõÝ»½C€”Nç=°ÜííîíïEtDàGG2ðÅÔ(T—„ÊÑbuFF°÷ñŒZÏ!ym¬÷ó³·x8R¾
-X0š/[´"ŸDÍ“ã÷¾ðÏ_^ÏfÓ ïóôû‡»›¯_&ï§_Î=*£(Ono§×—Wÿ8÷˜$p2þ:¹þ6ù‚k·çŠ'§³ó_ó?ΦóF¸ö(áZ²ýøEF Üã3âsÉÑ ¼Ÿ*ÅF«3!¹/çn%?›ý­!ØÚ5GB‰ÏxÀ4Âèˆ
-Ÿ Øl«D*ŸE!s*‹¸aRTUºðžÒ×å¦\åñ}šëûK_­W8p¯R½ÔYK߀Ŕ/‰šn;§ÑØ4úûÉXˆšaÀEà!-ÒM\geïuYæ–#܇úJJfYòÀ”Š ËÙkQ®«¬ê…S?Œ>
-4 AÚ%R¸“ æöCJƒ‘×&a,è€Ë5X}E4J@Ýž½pÝ‘ <ôE$ðÕ‡#ô8=¢@J‹õÃã¿æ/
->QÀ-vœ?”›¬~\ ÐL%ÂÀb6D'D»"$q¾-—Ë*­ÈôÁEŸìb€,¸ZèGâÕk, gy\U”Áå¢(ê¾üsäž$›Y‘ž4XCqy’â2†î-|F¬Oïc] Pî^ëSNWRçRѵÍï©aûù¤û%Ù&]ÔåæuÈý„0Iû·*Nj©€œT¿®‡4/À û4oÿYŸ$»Þ”u¹(óßõn0LBHT„Îô·eÞsÂú¤ÌTË [è*×£÷|’^ž>¦µáh~µP±+<2à1ø4R•eÎ_NgwW·ó«›ëæT·\:XHféý­Dgô‡´®Î!_Q]¹,ô‰¡ú1Eà!{N 2›Îͪ«Šøãc±y]×%±ÁH^ði‰ÅE‚Àý6Ë“{~Âò´BfËrƒQë¤îm»ðþ$’ÌÒÅÖ1²…–é|‹+|&©fQ¤ ¾f¶@ß}°” „J{¢Hz{‚ph¾lCA#hB¬óÇ!ç‚ŠL¹ˆZ>`ø<p8å‰5ÏD`
-XÉ*|Vët‘é˜
-žÓëùÕü;îîdPXõÛtãª*™uox·=©¢ˆÉÆ¥¹éN„ïvïÛlz§/ËÚ7G®³\ƒ× áP‡ …zÓ㇎âÍüS›ÓN->.â°hÀf<ÔŒ›ñ^ìxû×ÖÌ8²aè³0 Ç#¶…t8`’‰×‹½Îv Gù9œ}~m?™O#uø]tg]fWe’¾Ãßµ¶ˆm.óÄ«ê×ÜÖv×;j—$hÑr[»#ŽjZÇ0|Ķڿ·Ëͼÿ•´È]€þÞgTý­Ògj÷?^ÓN¦¦¿b‘o“_lù2ŸóþZáÚýÄþG¨WÓ8ãáÞ9w+\®`¶2‡|·_lw$Ô®ìÙ’ ÚŠãÜ}€¤óŠFIŒöü¬ÿ:僟¯Hóîÿþ›x÷§¸}ElعX=„Ø
-¥µNÛû‡ò¾ìÿƒ"¿Ãendstream
+xÚµÛrÛºñÝ_¡™>Tž \I"oŽ­$>Il×r¦M“<Ð"esL‘ªHÙu¿¾ ,À›()ÎϘ `±»Xì¢t"?PLMB%|I¨œ,V'dò
+®âUªç:ëè°˜òE QÓ]b§4š:‚F? Âk@pxH‹t×YYà¸.ËÜr„óP_IÉ,Kø‘R‘a9-Êu•UÃKáÔ£€O HvD‰Â$¨y†ýÒ`âuI :br ÖPP·gÏ\[”‡¾ˆ„
+•vG‘ ÖáP|Ù‚‚FP*„˜!ïÇŒ 22å"ê8øÈ…°ÀçÃ)—ÀH„¨y&[PÀLVá·Z§‹LŸÀ
+dt4VÛª¶P\/³Ùoä4JÓYúOYXHߌY{yÌ€‚¹$!¡rcQÿ’po·4ÊìEܧYñЫ–ÒÄÿéÚøÃnÝj žÄ—@ Š+0wëDÑìšrDvo–@=¦äX9Ò•‰2
+U*„ÃýB5(C©º6BÁHÀ­Tó4‡¤5ɘÕ1
+¨±T³ðç[ –˱@FC(ÛÅž’«'(P—ò¬qÙ{G¾hù˜ïíüìë…|c2øð
+ûf(óOgÆw ›^ÌÏ
+ôê![òè°h Öˆl½8J$
+¤m¸`É5\¸m¼á¢¡d£ïý~‹øBqÞo¸€l
+‘ e´…>pýçõÕ gtÄà ±+9CÍŠõKÎ&+æZ~eŸhô”&ôyöý- ÁGGL÷ÌXŸtoeÐ +øήî.ï¾ãj+ƒÂ¬ß¥WU¹È¬yÃØÖ¤Š"&›>–椭-ï‘rïÛ|v«˺'G®³\ƒ× áP‡ ‰z3à‡ Žâõݧ.§V->Nºö0`m{¨7í! l{iGë×NÏ8æ²aè³0 ‡=¶ƒ´ßa’ñ×óÊV ù9œ]~];™O#õø÷{fWe’¾Ãß•¶ˆm‚.óÄ«ê×ÜævW;ÚŽ_ßh¹­ÝG5­ch>b›íßÛé¦ Þ}oå-rç ¿÷Þª5}¦Úð˜¶3¥Ðý‹|›¤8°é˼ûýµÂ¹Ú‰ý1QÏ$¦pÆ̓}îT8]Aoe6'8¶O»í ¹+{¶ä‚®â8w/µ€Tb\Ñ(‰ÑþžßŒõo¬|ô‹4zÿ÷ïÉí¯ç"ôy±qãb!Ô
+`+”Ö:l×{ì/Ï»²ÿ#ÉRendstream
endobj
2444 0 obj <<
/Type /Page
@@ -11743,26 +11763,21 @@ endobj
/ProcSet [ /PDF /Text ]
>> endobj
2469 0 obj <<
-/Length 3022
+/Length 3070
/Filter /FlateDecode
>>
stream
-xÚ¥Évã6òî¯ð-ô{ƒ•KæäØN·ÓwOKyo²( ¶ù"KŠIµã|ýÔŠ”iõaì
-@U(Ô
-JŸ*øק…O•-Ýi^ºÔ+íO'êôæÞhÁ™D¤IëûÙÉ·?Øü´LËÌd§³»Þ^EªŠBŸÎ–¿%Ÿ>]ß^Ýü÷lb¼J¾OÏ&^©ä§‹ÛŸ/þÍcŸÎJ“\¼»žžMtYø<¢e*¹ºN¯/'®yw}{öÇìÇ“ëYÇVŸu­,òô×Éo¨Ó%œàÇ•ZØíô:*ÕeiNOœ·©wÖÆ‘ÕÉôä?݆½YZ:&
-o‹Ô&‘…ѧZ§¥÷f _¦™5–„qu=½ü|óivó‘NCköòS§S¤ÚiGÈËuÓ„ÅäÏðrÖ‚nzè¹J}îa"JxªÚÐœMlfX$ÐÝ扖%ÿ+¯¦a±{:ÓEºyÖçÜ«dù2ü®”Y‡%wë5·ŸŒ·^V¬—sNY™¹2¹iñ
-X_T¸iî“jÕlŠ§áž&wrÚ52÷\· ͦ7ïÂÓÍÎJ•<Uë¦Z´õFLëûuÕžéDÞà…vÃmÿ¼Ð­e%Ÿ
-‰æA0<îšV ª]<ìOg!&¥r>ÍK=T*F¹ý³Y DʃÀóCM»Ø¡ñYQðróP¯ïŒÚ¸L;£í:\‡3à0r¾ŽdÝÓWÎJ¥ÊƒKô¥M•Qù¸Ÿ¤I+ú–×~¶ÃBº“Š™ó¾¯*%ˆ>¢ZÝožÀ^™Ó|”É¿Â]‡5Â^_«´wi¦Àø›†UX´(ÜÂŠØ —,ž^¶íæþ©ÚÂð\Ç%èÓJôp;½)l§79d/›|©V;Ù–5ãÀ$¬¹å™“ÆÁ|'ÕÑzHYÓT–ÚL8°9ú" T×X²$ø<½øé
-Ý…5%v¦ï/È¿ZˆlÓ‹sF¾…CÙá$ í1xÒøL¦¹–;æuØÝ—Éõåå»ÓÙxM4À\‰Sè)¿%¯>$9çA#¢‰qŒ ¡¹L^½ç>ú¶«ú½(û}V+°ýFJùéârÂ2pö©;äšE(‡7eÎ8x^ãGH¦Ìº[DV’gÀ7Ñ$UÈXt‘ iFΧk·’ð7ÂÏ¢jBtÄMX7u[ £î÷½f^$ë ¶eO­h˜Ü “ëÎHZKdºÈPækF“ûgÜçzµâa;¶î–<7á‘e¸«v«V6Ú­W¡ix¦Œ7Wº•žØ­×.ÍAF1l%bœ‚ïîÛ¥ÎîM¥Qwçã§8\Y°õõ>Ær<7BóÐ…ù%G~¸†6TKL'
-Žð7c6짹×GOéÓ¬TNPêfHÉKC@LKº¥” (›:ÌÕŠ³‘tÉbªVB}O50 ñ5S¬ávñÆ   WP·U[ÏëUݾĥ­0’bJéĈrÞnÚÀ7§¿‹fNÜÀï
-™„³Áø[ÿ^%Påy^ç­Ãanè,s©‡ÜM; kX7Xœ
-†ðè²÷0T㤄ê·(ZöIÔöÈiS0Hn$ùpªÌÐÆuG\·Ø½ŽdrÉ ^ˆm$>à‰ïЉVÆí7fH& 9jC•Åà#ÄÆÜ÷¨²ÄÌKlÎ<D<yæ°çœ÷B'okqÖ̱Wrî7Ê´‰1…T
-‹cÀÉ¡gûÚ)p¾Nœ†„¿Ð±PšÄÂ2”¶K+ò´´&æWx¬MÂÔæ9|·–pÎÆCf5ë­æV"´áïíª^Ô-Æì/ÖK`Õ9Ÿñ6µªìr¾jŒm9£ƒ’—òÆñ)FÖ(Ùµª§:6–ЀEªƒ… J³T—y>TšÎrÞHW!IË|,Àb@:ÌVóƒm`¯ìZ߈¦ÐP Bòv4vö±ÞŽ±ºþjìÄŒöeû:x:È¿½wÇ™ë°F¸Š~›åCöÁÓdE|V\æyèrDdŽï°zÓf^|,‰µ7¯QE0½OÌû"8,½UêJë†×
-Û†št‘à¹Pýõãí5 ÙsB›¡÷“=OAAÌÐz»W„ÒÄ·¡2>uÁùë_¾4hÐŒ¥šE¬÷XP‘‚öúvv3û…g÷<ÀDu°oÕ4›EÍŽûb»€RñÀÆNºgaO{Äçþ<½þ̯i½“3ÕÌć»ªYG5ÓŒä逞<ëÉŽgïû”öbIy0–Ö
-±ËIþÌu´–2Õp%8YTÛj¾ŠSýÊU“ ³ÿºNš€ƒÝç|g¶ð‰ƒÖ?pµlº·å1ÝUÐ&VКÂ
-݃p|ÍD§ŠŽn³kãÚÊŽÐV˪­ðzU™|/ĺ·´×Ÿä@‹SUÆÈýµ/rA¿ó •DÞµ4~NZ¬vËÀ)3äý›†Ç¬
-•˜Œ,ÙPµ|‹ê¯‹Çáá¦Ýðâ%÷åËØ~O¶OõÙ.ëKÌZÓoŸl8Î"Ê’Ä>VU”êI$†–íÓæıà¯[Ð>²=Ë‘z»›ƒuË!q áÍ90†E‹LŽM…v!‘Ǫ ¿¢Éæò¦Ô;ùòpÝt{T õ©_a½èâ*¾´Â ;Î7À ˜/%Iømûæöê_Ç’Z£<æ1·aSÍj‹Ã7XسÙm·òÙ² MGçñMQ”)dãö¸‹è!½í!"q½ÿα|Z¬ ïx•ÝŸj_GÙê^ó5’…ÂÚ)=`ìf½D"Ñ8•ÂÅMŽ¾p#`º‡Gj—<¹Ø¬Ûªæ’r°Š“)
-3~iV9ÈvJ™ÂCjçYï~`ñš÷ÿºc˜endstream
+xÚ¥ËrãFîî¯Ð-t•Åô“ìɱ=cgv<³#¥jó:PTÛfE–‘ÇùúhŠ¤hÍaËU&º‰n ÑxSr"àON2 ›Iš›Ø
+i'åó™˜<»÷g’q¦iÚÅúq~öý;Nò8OT2™?töÊb‘er2_þ]~þ|s}÷ßó©²"ú1>ŸZ!¢—÷?_þ›æ>Ÿç*º|3;ŸÊ<³9 YDKDt}?›Ý\M?ÜüòþæþüùOg7ó–­.ëRhä鯳ßþ“%œà§3kØmòË<W“ç3culÖafu6;ûO»aç­_:&
+«³Øf*‘…’)ãÜZÕ†ÍãD+í…q}3»úr÷y~÷ɟƯ9ÈOL¦*E¢2¼\×µ+§º×G·ftÕAOElS «PÜ®h\}>Õ‰Ž`C›$K‚VÌ\¹ßË,rí{˜–4*xùÒý.„Z»% «5=¿¼ã”Õ–W¬—ƒwFh™˜<ºkð
+
+X/ Ü4µQ±ª7…ÓЈ“> Lík~÷R5OÍgwï ÂÓÍÏsíŠu]”Mµa³êq]4ç2âƒ×x`¦]Ó³{^V¼’΀ʌ‘D—9¨§?èŸk” Tøî•ã
+3”†"wဴàõèEÕ=÷5L
+¹+F3„¸yq_I1.È0ý…iI6¡û9‡æ( O÷÷vU•Uƒ± Çý‹‡õœahñF>©¬ŽµÈÛ|²c›F(Ì ç¼´q›rkÙ²æi-:ª£CX^u°VñB„Ê0–yšö•¦µÊ7RaH
+¥kŠeѨ"~dbmïøK"Ø@,òô¿õ!"*XGš©¾Šq¯MâW°rµ_:pñš ïßÕ4W’*lœ0³$3—ü ­».‡¦ëfC‹—4æz‡6Ú¼]Ò•˜Ö2¤í6ÚP”F”¥ûXÅVø‘ã8<ɺuÚO43ú(Ïç-WSœßîàø8‰„ðæ $ÑeƒLŽ½rMÉqK‹?þñæÜgê­|iºªÛ=
+‚ºŒœ Ö³.®Ü°û
+ç8hAPƒÝ|Š…Ÿäïî¯ÿu*VÂb
+2#2µÑl8ö…aÏz¿Ýò×Ö:ôÑÎó›>"ËcÈâõiÑAzÛC$Ïu9þy BÙU® k9JŒ•¥‹?ÅV‹tÌWOHZÄÒÙcìn½Dò¢1:(… ßÈŒÿ0€j›¡þ¹¤—åfÝ•¢½U”ŠPƒGY1öSñÕõðÔ ¬ÃQ 1Å2ÿåæ¨/€›!6·÷þˆÂÈáçN_›$êÁ»û~v¼<⋃ò †1"jÑ~yý¿íqøU‹IcejüÒ´0+å20…‡”ÆYorÌûÿ
endobj
2468 0 obj <<
/Type /Page
@@ -11775,10 +11790,10 @@ endobj
/D [2468 0 R /XYZ 85.0394 794.5015 null]
>> endobj
2471 0 obj <<
-/D [2468 0 R /XYZ 85.0394 751.3869 null]
+/D [2468 0 R /XYZ 85.0394 751.7313 null]
>> endobj
2472 0 obj <<
-/D [2468 0 R /XYZ 85.0394 624.8718 null]
+/D [2468 0 R /XYZ 85.0394 629.4849 null]
>> endobj
2467 0 obj <<
/Font << /F37 1026 0 R /F21 938 0 R /F22 961 0 R /F41 1218 0 R /F55 1321 0 R >>
@@ -13193,7 +13208,7 @@ endobj
stream
xÚíte\Ôí¶6Ò ˆtÃÐÝÝÝÝ¡Ä0 00Ì ÝÝÝÝ’‚R"‚´t ÒÈ‹>ïÞûüž³?³?½¿w¾Ìÿ^×Z׺î7¶‡Œ5Ü
¬‡¹rðpr‹ t´P(ÐWç…C­fL9g0ЇÉ]Á¢
-Äü{fXE
+Äü{fXE
0Üú÷äè¹aÖÃöOÃoäæìüØã?ûÿxýœÿŒ=ì a.ÌÁAb¡ö™9Y® Ä£ò/z{xÂœ*Þè—ÖÁ»2#×Dj,ïêÃ8›ÇEµyÍî;Ýoª²n öA™ºÓÁß‹(üèX>ã.3v±ms™W`gÅúϨ¯"›
rn­êèš—ß¡RŽwð9£_²Ò¹Ð_8=óe4%v>oFÀk(Ù?`LÙ½¼`êú4ð±ûåÃ&9[~ƒ˜;26cLà«|r)Sƒj…×Íl(ßÛ
b¬Å7ÎßÊçÏVð™h9Žù,¢I‚°RÊ• e®äß·RÆ%=²ìÙ êt›œ(†Ì%³LÇî)®Ž>1Ù¥‘„µ…^Ñ2¼éˆO£Ý %õ‰>•pjÕr{2–ÂwÍ<–g¬™-j—!3cäáakIè,AŒ$ÁLˆÇÆ‹J¯³nöùU»Ïm›Þ‰D3
@@ -13216,7 +13231,7 @@ $OíœàÅ€DÈ
t‡Í=žÝbóÆÃwî6ß"£“˵?”JËOP2RÐ oQo+†â1)©w†¦ÜèådîI½ÈZ¿VÍ­(e÷åû È"QÔüFØs(úF$'‘qL ®/¶!õÔ ¤HvkÖ‰Œh¼È‰¬ê؉á¶o?Ùa:Šÿ±qêcŒ° gã!_QÇ~ÏWê¡1üaœ¯UÝGmã§Yñmn%ìRãr9÷¬ß0qˆ5†/‚E…(êÚ“†,W‚˜$Ù½ï¶åçLxËÎÔ|ú奕£w†Z|ÂV€ãž÷,éOd
ÞyŠGÝ ŽÎ¨Ý3lÍ4©¿Î\×T2Zª½Ag—.7Ù#ÏPæï™v¼eŦQLÞ»±Oþ¼Ô\’ ¬ÿĵJÅñ¾(š3Ç].Å*,MÎ>ÛBx(ÃSÃó|D³uû‚Þ¡ï†{:Ò‘Á¨2G9¡Cê{É•<|?ÒK áéá@F)Ø,êw÷ó?È ¸¢Ëa„Çh%Ù±o^Œñ{‹6™Ý @¥-«ä%Å~jÉwXjz1îi´·î¬%uÕ3^¿±g¸`d+ÎK[ŽDe—„]âò†YèÖýÇ?Ï>£³HjË,èkѸÍhÔ8Š” ™v_Å [ªJÖ®²9m=·âú?\‹k>¼à¬‡¤*³Ñ³ž,Y ê<‹ý¹uÓ Z/ZV$S·é#ƒmNOš¨5M@¿§rãÝ0Hõ7¬&7[àçŽAØñêOõƧÈêÚ5±pE6~d»Ž^.x¨T1¬µ¤$£Í7¿ÿ4òÆêüj§‹G1¬èípoóÌ3³QýÐZ:œNÍÆéç,0½‹Š‡Zg‹ðâ£à)‹Q©¯³‹X""œÛÆ0ÏÁ¾äBvFA‚)Y9(ÎYÖý…ì¬S…|¸Ôü¾“qbæÇN.LÔX§…_ï‚¿œ%%½¥åŒìé|°D>W²7}C–Í#—ZR¸­$º`bÛGο…a¿9gÝS%\”Á/œîñhC|?s§ Ø…šg¯ÎÙÈ)ª¬m}ÐvÖËk†Ÿ.bÉ&O
üõí+uqfº`Îa‡„°£â,I§ã¯½/‘˜÷ÇÝ›Á¤'P6ߢH‚Ú?÷›½šÙ¹˜Žà9¦ŠmHr7:pMRYŸ#£ 'æW¥¿ðKCß|-¡mWÝ躖nᲶË0–«ÞÐ3äÛÙ=j’¸Ë-,n–³e±€¢üb½iÙ;‘˜Hâ°l<)žL.ßÐYÖÿ°Ú·)wL=(‚Œ£± L|)=å'ÀÆ-Å@²öò¾µ<ÃNrä³6îµEôʃ3±d¶kÓ»¬ÿ‹%ôµøü·(kD~ô(¬_yñ‡Í; ¯åä²fùOî{&*‰äyÒ¯9ÛB±T¨d>è.<Sâ¢éX3p7«Á~ª"럽Ÿ“lË´ÍÔDQÿfŒ°Ì
-*s"}Y ;Ò‰¢ú{YÌÝÇí]p¶Òݯ€Ž¶Xo³êÙ}
+*s"}Y ;Ò‰¢ú{YÌÝÇí]p¶Òݯ€Ž¶Xo³êÙ}
endobj
2086 0 obj <<
/Type /Font
@@ -13225,14 +13240,14 @@ endobj
/FirstChar 67
/LastChar 85
/Widths 2730 0 R
-/BaseFont /GWWTTH+URWPalladioL-Bold-Slant_167
+/BaseFont /ZZAPBD+URWPalladioL-Bold-Slant_167
/FontDescriptor 2084 0 R
>> endobj
2084 0 obj <<
/Ascent 708
/CapHeight 672
/Descent -266
-/FontName /GWWTTH+URWPalladioL-Bold-Slant_167
+/FontName /ZZAPBD+URWPalladioL-Bold-Slant_167
/ItalicAngle -9
/StemV 123
/XHeight 471
@@ -13252,35 +13267,34 @@ endobj
/Filter /FlateDecode
>>
stream
-xÚíVuTÔí¶VA!¤†”ºQº¤»{€!f€J¤SJº !¤‘RBpé–NI%‰‹~÷;ßYß=ÝsþºëÎZ3ë÷îgïg?;~ïFZu-Ik¸%DCrpsr‰€t4õÔ--¬¡pe)¸£µ"ÒÂtñ¥]!H(&c„ˆ€ô Ö ˆˆ‡Ä-,, `Iý\¡¶vHó  û_–_. K¯?‘›HÔbºyp‡8 0ä Åÿ:P !í ¨#$­¦n ¨*b–WÕÉC`×›"ÔÝ,¡V e¨†€°€là® Ç? +8Ìú«4ç —$dB8C¬ 7aO+ˆó/ˆä qu‚"7Ï (dëjCÞô
-ý-à …Ùþ¥€ä
-±µpµv„ 747Ü¿ºóW ªÞÂÙÙÑëw4ü·×?4@‘ˆ£ '€›ç&§ò&·-
-âàæâú¦mµr€ýj?ÿfýwí7ƒú­,¥)©ýLší_ß®¿}Õo¶
-—™_T†pÖŠ\5yo;_®*±®õv9>nO†ìåQùг¼Ï'šgz'ȶ6-ÆOûªå½?¦¼€i(À¥»¶Ô¯¡iZtq8øŽ×{ÿ”ÅŸÞ=ߟ”áÄ™À×*åí«-„µ·ˆ«
-¶¿2%lžž<îêûØÓÝ~x÷ý*%[ö+FQwL|¦H—lʧ†:¥²åoUoÇå!±:±àáWòž/¯åÞb°Î4Ћ¥lb<Ô‰<1 ËÄOƒ®¼Ûòרfß©J±¹–†ìÂSj–ìcÓ÷%:YÙ(h}õß]ôsùƒD“Â{Yûñà.™u
-ñîÉØè®­ŠÌ!s]%Öu…h&¾EÓu`ÑÀšHô^9zˆUæó~nØ@L~¢È© µíŒxzò”³÷‡ÇGe{îOtÏÉ ‰ƒ>¿•ûÎî«pOÄJl.{¸j =þ:mŸ
-)£ žŒ³,†‡í™œ¾ŒËoo£L>p˜Ö DzAªÓ×Ñ#âÞF]uãŽ$ULeçÁKEúÅÚš‘ÀíöPT›ù[×Mîª
-˜]M/„ª¡Q°˜
-‰ÆpJðÉ@{žÞ~~ÜiЋ“”¼—.Dteà¿ûÞ-k¤þ¬µî*a¶o¬lêÞ÷}L˔Ϩä|¤}¦GU,°~Ù(6®¨Ñçº3š!íÿètoSè”ÁˆD>
-v×Vâ#– ´W>£’ pHOê@ÙPZ¬v–BT rדôɪ®éœ9Jl¢–x–4!©a9êì¸w_>µúÉÑrd7S½êê@¯RUÜfÙúŽÎòb
-hÿTÍÎV^‘3/®ïN~®þÓTëxìKÜÎÈë:ç Ü‹·[^œÂKËé:ñå#”½{‰•Á²]ĹóZ^"8Ð%âô#!gìLrªqÀãiµª‘w×øÒ)j#ÉЇx>ÎPoD;j¦K77ZþvÖNhÍWu†¸6×Qõ³ãû<K+ûSh~„t‘¢bZ]£µªòB^(i;‡\àöƒsc|P=•‚þ»×ÃÍ %¸2öfÈÖT‚p‰Ïj$å9ƒb=ÖK³Ïî‚*Yž¹îgÔ¨&Dï‹“U39ù¥ŠóîïŒFVQ²ÃeµÂ)³>¼Ùy¹|˜’‘Ƀ º>—Ólèqû*ÉЋšI Þ
- óó83S€“ÔdäÒ@¡©Ã¦Þ‡N·Š<ìMm(qG.:µcºq)øûëä÷h%µaŽ^ hè$ &BÞ™*¬í ²stÕ|V‰È;K!¯­¢Á7ÙÐÀdÎ!3aFnÕ;´zh:ÛKÎkoÐJŠ²H´øYíb"S“{ÂÃ=1áwžÇÆ/ïu’Ô­Ãak<%)í¯3.ò<Ž«j‰d|†³û  ìÖ
-d4} d䣮6ó胦˜ Ö¢(Bŵê}®¿€ ´í¤páÈœM¢t¥ÁÝ;_‹LÅñøŠLòO‚ä$*`"–ÑÑD$ÏŸí²û{Ÿw§Ï-Ô ¾­HadÓ$¤„óžÕ¾™ÓM4‘$rGQ„+œyh2¬2bZ¦pÀ¾f ˆº—õ‹o„ÖÅ°äP‡éRÔ§Õ±uay+;=jÞiãßÅQSr’¶ÎĘLORˆ”Ç5 ïUÒ©&Õ?c‹Ô%VÆ“ê¿Ä¥N!.Wo}Ü(Þ¾EÓC˜zyRgjDIdš’º+æ2éÉëDQÅÄqö­Ž™5‰¨FÉmE¢@©Œ’-
-‡æëðsÉƺ“Jµ$Í€‚*vylµ™s$a`F éúÀ Õ (X×Ñ | |
-=<G¥]Ü<V,~Uaÿs2˜Ñ³ßÇi†¿ÎŽ¦mõçV|:Ës7v1YsX’áT{ÑC®oßÑꌤӪdŒÅ[8‚l˜vÒ²ZE¶*bWÐèg
-¥ºŸ0ÞÓLs=šA.ÉSŸ‘<Ýkîå);”ˆú“7g_á軽çiŽ‡ñ•üè$+ùN7crȵq=œb'Rpû|@0k\l7jKý'x6ìQë×.4c®-böB*‹eÕgƒZø›’Ç„·@®!J¸ö_|m`{sÞ°¡žvÌÒìbûz+†9•FPŽrÔ|d4HâüT£¯Êß…ÎC·kŸb…&J3? ãõ‡MÊ&í(g ['’½M2yR ;ß‘ñÄú1N\xŸ¹*˜¿f?c»O`üÁÁë!TÇÖÔ« ÊHÇÜÊ <ƒ­æ'á¸A”{í}ˆ¡zÆ, Üg¦kXiažµ‹È”!"‘P"SYà“éÉy’jcÿ|wÕwt/¥iˆB¸y½¼°¤6_|kÞÄþÉX×K—t‡÷ñ«1½›Ž`†L„±ÕÆ=w©5Vjæq7'a=È€]f 5ˆôeûºØ†õ³eÍ'!¾xdíZô‘¼9¿â(°Uâ;ò<„aÉ¿g§IQ•jy{oqäû!nÉÍ_6¹MªòÜF[µ.
-`¹¿œ€JfL„/&kË¢E§ÝŠÞš'§Û$ý°ì–(qqZÓgZÉÖûáfõ/xa”U9ïQÜñox ö­6Ȭß6à *¼Å[Æc]gŠQn=0oÏò›T_‡y5,©ïQæâJF•UIL™cÙìÂg4¾ÙɃ«¢q¶†‰ªž¦o~ÓÏ{ Ê««:Ç¢¢´PÇ>¼[QNç mh a ¸˜¨¸;Œ3ܼ nq%‡ÓÅÅ;7£Ѹú†Öëí
-Ù{¼&¼+¢Bo`Ïs%2º6\ŒÐC8,kn!+86¹ÕV°g;n„É©]1A`ï|œÜÂ)ÈJX¾z/ òa_ÈÊÆC5âg!Äd*¿‡‰9_ Üép;Å—ƒD\`Úª=Ô¶wîIЧG¦'»¢v2¤[íø#MûŸD…÷N‘cœvH¾xèÞó@!Ç]&óîÀpÁ:·€“K{E#íÅ‘ïðô…[:ÎçòX÷?f…FyCÎnà|ª1ü€
-Oéž8L.Ï ­2PnÚëâ*6»RMˆ{j¼YGÓ­µØå<Ÿ¨_Ó?ÜêžSN G rQD¿-‹Èõ~vÃÀ²öȉ¬Ü8ý1ÁüÓn¥"íƒÇ¸Œ/ß%Ü7NKˆ”:½>GÑ0­ ûQµMo]”ôWóé
-Œ¼åÇ°üg<ž¢BÉžmaNYî)ËLêò³}!ÞŸˆ³–xõê?þ"r¯èYÒrÈ&*aÜÎí–Ü ТD–*£|µð`šPÅ¥Iñ¢?¤ê )7I”ZiÏï¤`W*¶mªª}_®S›(…\9b±ŒÏ‹µWOT›ºˆ$6 »”£Ý»ˆ%ZêÆ
-ˆ`ž70'Š%â‹ ß”°ž®ÒìÙw¯]ÎÉ¿šÀ§ÎˆÈº¼Û¥,û‚ êïÇm…)‘·HW» +¸ü"¿ µ¼ûª;¥Ö¹À{ÆŒÚÞEÍ>:i¤Ý0A]_„3—·¾ÙžE9¹Ú¦»–w@b …¬ö¸b ,oiËkk!_•/4>œT’D^ÞÛ~“„³äRÈA.×=~|ún6óÅ=Á³µ0ÍãÁÖ–\^-Už&(
-–ËÓ»\IFÙØS­˜õOW_ºhýÐj-®
-X{$¬½‰¼û£@†rlZ‰âéžËŠ1O(­$¶ˆmèö¡àé»÷ÝõäIŒ]Œ_-ô‹ 8ßû ò%zŸT¶n76Gت”·& øì‰Ç†‹5ÎÔ‰Šd¾<B‡›&ª½úøמ¶ɇÆc˧ œ?µÆ(_¹à™q3áNZ¬/ˆ]c24íŒË —'{.ö%¥×î§Çz̓¯ÛKÃ{u`‡:s±¹ Á<º'—0— HMq±tåRnC@x«Ôs̈W6ß>uä3¾õˆ;)EO4,Ÿj&l‰#õŽ¾„˜¬Ù¶³
-¾höânF] Ÿx'´ÅfÊ`\ñè{Ý?¬¹¶=ê3‹ XTÑW©(¬§ _Ee¶){‘@ù‡„{:ƒ!¡X¾BK ”G½èßj²¾F!Ææ!ÆØœÍ*ªÞAO^ÕîÊ…¼
-3Îôä¬I'4tùÀþÝ-CœýöMÇ[9èHïr}Üo_¿¿¨æ}>ç_`—Ôy[8¶.χãZð-ôü’Òg]}ÖŽŽl¹'4ã!DI½º+ju¹õ8å™òT°CHÖ‘_e‘‰ÿð:û5r€ë3.ñ4v—W”Ò]ª[)ïó–äXÁ—â݈HÞ÷ó§qWru?̦hÌ‘ê¼7ôòÀ…U^ÎK8%į v›AŸ7°ë1ÌÇÛtOn4
-ºØËc‹í—R°£36‚FÅ
-ݹÎ%:¢‰»•¯·0Î&SwªR V‹­C%#ìN^©Û™KuÓšˆ<~f‚â¢Ï8”‹qyœ_U æ=¢¦#fœÞ*¨4í¶²(‚柘\oi›–•`ûljYÛWʈ¹ºœ2Ž(IwŒpyˆ ¥6Í]š†}„¯j¾Ÿ“&cðÓ½ö¢õníio=|_{ÅŠ{²¬>l¦Hðãä:XàÊ£ånMçxºýu+ÙVDɲéõýV“¥bððÁÁÈ·©e—¶Ê]œjwÆ«(öe"æ}Õ„§8$‰,
-ùHaÒDÚ]|¾"`N„¨L=s÷ ,¢Á’Ú•¦QÀ˜¯|[Ö ¦§†IP˜þîqÖ*oûƒÆÆnåÉf,ÅÛp™|Ä€(SÖ~ž²GøÝTfÞˆ‘†g“¡Á‡ÚõÉ&®v^ó3 X]î)˜C ãû&5ÀI©[hû5¼z¥pOŠÌå£Cïêt}æyjöi!–†o\38˜·œá¦ÑU“!4+£+»×øúÖ¢ÏÇP~nd*[Çw;r¤Ûqôß5=ò–WÛÜFa›®¢ÙíÏdî2§Î#ȧ$†üsƒBLe-)ÖTùf°ÁÔ1‰ÇÞ£W¦¹t%g\ÿæðÿÿ'¬!®H¸“…«à¿
+xÚíVuTÔí¶VA!¤†n†n”.IéΆ˜f(‘N)én$†FJ Á!¤[:%•$.úÝï|g}÷üuÏùë®;kͬ߻Ÿ½Ÿýìø½ki5´8¥¬á–y8 ÉÉÃÅ-
+Òy¦§aáèha …«pJí•Ž H
+±@Bá0Y $D¤±ÉB¬@¼¼ 
+µµC‚XnxXÙÙ9þ²ürYzý‰ÜD" ¶0Ó̓;Äîì!o(þ×ZiÙ@! u %5‹‚šHƒ¸Þ¡áf鵩@­ 0„dw9þq
+³rt³þ%àÆnÿ-ÈÙ~ãátƒÝiÀH„•+Ô ºÉª!+ÿ‡N¤òWnôÁmn<­áVn¿JúÝÐÜ H ( BB<‘¿rYB@ÖP„³£…×Mî2gWèon(Ìö/ Wˆ­…«µ#¸¡¹áþÕ¿êýSõÎÎŽ^¿£á¿½þ¡ŠD@m¸
+šÚ²2ìÿúvýí«q³Hm/gè¿é©Â­ÿqøÅ$- ÷ysòqƒ8ùnäðp ñDø|þEÖßD<U-®PO777èæ÷Ïï_'“¿ÑÈÁ¬àÖ¿öF i³¾Yµ~ÁVn®®7þýößþçù÷ÒC ž+ÀôÜJ,Ø>5# YEžÓÓ/kô¡ƒ£'ŸFûu¾¼Ý/5|Q¤Ìü¢2„«vPôªÉk|ÛùrU™m­·ƒÌ‘¹=²—GåCÏú>ŸhžéûZ Ø´?í«^”÷þ˜Ê¦¡ ·îÚR¿æ3Ó¢‹{ÀÁw|®Øû§¬þôîùþ¤ 'ξV)o_=h!¬½E\U°ý•)aóô„¹«ïcOwûáÝ÷«”ìÙ¯pÅÜ1ñ™"ý]²)Ÿê”Ê•¿U»—w„ÄêÄ‚‡_)x¾¼–‹ À:7ÒD/–²‹óP'òÆ€,? N¸vðIn+\£š}§Z(Åç^XrˆL©GXrŒMß—ìdc§ õÕwÑÏíK
+ïeë[ă»4fÖ)Æ»'c£»¶*2‡Ìu•ÙÖ£™øM×E;
+at
+½’•sJÜkŒ "êC 3ó®cUÉÙ4eHÎH~0+¾÷ì
+£Šà> ä>-e™÷CL\¸³Äù¯“7ôwÂI:HÁ®óÚÊüÄRö*gTréïI(J‹ÕÏÀÒˆª1!øRb’>¹`ÕÕâ13W@‰MÔïÒ335,Gƒ÷î Ã'V? 9ZŽfjW]èUªŠÛ¬[ßÑY@ÞCLAíŸjÙÙ*+òæÅõÁÉÏ5~šj}‰Ûy]ç¼cñvË‹ Bxi9]'±|¤“²w/±2X®‹‚8w^+ÐKºDœ~$ìl‚Ý‚I®J5`žV¯ipw/¢6’
+}ˆçã õF´£ögºts£ng]á„Ö|Õ`ˆksÕ8;¾Ï»´²?…&@È™!*¦54[«*/„“¶sÈo?87Æ…ÑS)ê¿{=ܼP‚+»Ñho†lMe$—ü¬NRž3(Þc½4ûô.¨’õ©ë~FZBô¾Y5““_ªßþÎhd%\N+œ2‹ÐèÛ—ˇ)™¼¢{ás9͆·ß¡’ ½¨™”qá 'N_Φíc%}#0~?3¸¦fSwß2œ]aµo1ŸJ(Ïá®óc¨ƒ~ P ʽ]HϨ}æKU«Ù0¼Q[»SÊvåg à¶"hÉþÄêYá­ÿ/¤g¹iŠWœeM¬”…¨AˇêžÒGªrÌ,ÒÔ‡Øn¹äV¥õ†¡¯ø]mÔÅbüÒ&‹’j´¥‚LsNù£97œ{xØ4()Ûó’:ÍÕJ QɉÓ4âQxŸ6êw´êú|©:T™$·Ü½Ê·ƒ
+Õý‘–”øц1öã9ã^Ìæ‰ÍDqf
+pR°‚šL\(<uØÔûÐéV‘‡ᣩ ež¨ÓE§vìA7nEŸbü­¤6ÌÑ  ä¡ÁDÈ;Cŵ½AŽcήšÏêYcg)äµU4ø&š˜,9D
+V1-S¸`_3ÄÝËú%6BëbØ r¨Ãt©a*Óغ0ɼ•uï´ñï¨Î)y©@[gbL¦Ç)Ä?ÊDâÐ÷*éԒꟲGê«àI÷_â‚R§—«·>noߢiŒ!L½<©35¢$2MIÝw™ôäs¢¨bâ< ûVÇ–DT£ì¶"Y \FÉ…Cóuø9TcÝI¥zÒ³€‚*lõ™s$a`F éúÀ µ (X×Ñ | |
+5ÌÄ÷ o榯‰‹ûȯg¥Ï.š%~2Œþ  Í“ 60×Ò3îeÐiÁeø¬O3KG·l¯„šÊé:ÐgyÐóud6pD‰+v°Ìb¦N f‹Mh¯Ëaˆ>.`È.kŠI¡iøòØ"ÌSˆå0ÙÒ—ûbûj¹D䧠Éj§×òáøg”ŸV0½Ð
+½c–$îSÓ5¬´0ÏÚEdÊŒ0ƒh(‘©ðñôä‚Iµ±¾»Ú» :—2´Ä!<|^Þ‚X2›/¾5obÿd¬ë¥KºÃwƒø‰Õ˜ÞMG0C&ÊØjãž;áÔ+=ÃÜãÍEXr#à]Cg "}Yá¾.¶aýìY³ÆIˆ/^Y»}$oί8 lU†ø„=O'aFX²Åï9hRÔ¤[ÞÞ[ù~ˆ[ró—M~“j…<·ÑVG½‹Xî//¨šá‹ÉVà²hÑi·¢·æÉå6I?,·%F\œÖô™–@êõ~ø†Yý E>eUλGwü^‚}« 2ë$¶Íð‚
+ïcñ•ñZ×™b”[DÌÛ³>Â&Õ—ÂaY Kê{@”¹¸’QeUSæX6»ð¯CvòàªÇ£hœ½a¢ª§é›ßôóƒòêªÎ1‡(‡(-Ô±ßV”ÓyCC..&
+®Æã
+7/ƒ[\ÉcçtFqóÍÍhF4®¾¡õz»Bö¯ ÐØóÜE™Œ® #ôÃëÅš[È
+ŽM®Aµì)ÅŽ¡ArjgWLØ;'·p
+²R
+Øêa³!ß™ŠxW_FÅyë"3Lêû¸Ž>ê‚*8VŠí_ŠÀÊëó<"•{•îÛá[w õ(FïVqQß¼óq–Qõ vÕ’Tw͇\÷Yd›fÜÞ>ÄO¯Þû9÷aZjümµ=!À›œÝ>ÜüïQ3Ù¹åÔ«^ ü9â@"ñF/h•>þl`|ò\ÕIh=n‚ÜL'¿õkµf9VÒjt‹ƒS~÷Ò¤&ÀŒTú'§$à3ã!Ê5vÿÃJ
+ƃ>³ÖÕ;À'uãá`:?Ó+Ôx`ïq–΢vIÀr=
+ȘóiÀù ÿK1â Ýc‡É…ã9áU¦
+ÐíC¡Ówï»ëÉ“º¿Zèp½÷äOô>/¨lÝ4nlŽ°U-oMôÙ“ˆ o:œ©Í|y„7MT{õ ¯=i3RÇVHA9jQ¾rÁ3ãaÂ3œ´X_¿ÆdhÚ—E/Oö\ìKɬÝOõš_·— &†÷ê$ÀuæbsAƒytN.`.šâb™Ê¥܆€ð6é瘯l¾}êÈg|ëwRŠžhXŠs×L84ØGê} 1Y³mgzÑìÅÓŒ$»9ñNh‹Í”ŸâÕ÷ºXsm{Ôg"'H±¨ª®RU\O¹<Š>ÊlSñ"
+ ‰ôt.CB±|…—(z?п)|Æö…›‡8csa4«ªy=~U»+jð*Ì8Ó“«&ÐÐåÇw?´,IpöÛ7oå¡#½Ëõqw¾}eüJü¢šïUølœ]Rçm‘LغÂ=Îk¡·ÐóKJ;œuY8:B.²åžðŒC\„0&õê®X¨ÕåsÊ;2•©`‡¬#¿Ê"ÿÿátökä
+¹Ø+`‹ï—Rp 36‚FŊݹÎ%:b‰»•¯·0Î&SwjÒ V‹­C%#N^©Û™KuÓÏy,ÅEŸq&¨ãò8¿ªÊ{D LGÌ8½UTmÚ5leUÍ?6¹6ÞÒ6!-+ÁöŽ·¶¯T(wu9eQ–éáö:Jmš»4 û_}ö~N†ŒÁOkôÚ‹Ö»µ§½Mìð}íîɲư™qÀ“ë`Á+–»5ãéö×­d[%˦×÷[M–ŠÁÃ#ߦT\Ú*wqªÝ¯¢Øg”‰˜÷Õžà$²dß]Í|®yó9¾è?)ì#IiwñùŠ€%z :õÔÝ3°ˆKzW†Fc¾òm={‚ú³8uL‚ÂôwÌY«|í»U&›±”n{ÀeóbL=Xûy*áwSYø"FžN†j×'›<ºÚyÍ7Ì4`u¹§h‚Žï›Ô
+M0 V”µ@¦ØRšÁSÇ8${^™æÒu”œqÿ›ÀÿüŸ °r„X¸"áN®€ÿjRy—endstream
endobj
2067 0 obj <<
/Type /Font
@@ -13289,14 +13303,14 @@ endobj
/FirstChar 66
/LastChar 78
/Widths 2731 0 R
-/BaseFont /BRATKC+URWPalladioL-BoldItal
+/BaseFont /KGQTDC+URWPalladioL-BoldItal
/FontDescriptor 2065 0 R
>> endobj
2065 0 obj <<
/Ascent 728
/CapHeight 669
/Descent -256
-/FontName /BRATKC+URWPalladioL-BoldItal
+/FontName /KGQTDC+URWPalladioL-BoldItal
/ItalicAngle -9.9
/StemV 114
/XHeight 469
@@ -13316,13 +13330,10 @@ endobj
/Filter /FlateDecode
>>
stream
-xÚíRkTSW‘ª¡¬òRIÕzX%2yj  @ÄX0<å!1÷†Ü’ÜK/74€ˆ*©Ê²ˆ.yŠŠRaU¨”Zb¦€/Ò*Â
-ŒÃ
-ÁÐ G ð«uÀ]Ø|!o…ǧÐ@0–nÀ‘T5¼‚é“$>iaQ*P SjXKÖP*4@Ž)˜00H£ë&od€upŒg“Âá
--¢1üÎÀ´é:Æ ƒ`N…ߊ“Á¢ÓNÏJ …QŠÐT œ•LöÊ·8’!Aô0J5P)4ð£Ðt%¤S:XÒЩ$Òû÷¯JF(”ˆ2¤Ã€ý{*æü“&áˆ$°™l6‡$’ûÝ)iZ31ªÄ M\žPà¸Â@!‡ˆŒxÀÈ
-Áz
-!=…a=¬¤XobJ¿­Ÿî;½½&W\ÕyÌžž±Ð|dkûùm§Ì~Ìá^?—ëxãOQðG¿9osþ9îT2þ Rñú¨§EÙ£œµ­ÇÙâèF¯Ø/ŸõP9œ˜<ãrY[ëÚƒ;îY¦7z?üÙóÙÝÌóöukîsø•Ô‘™5·n¾z’›¶©£Ïêð5ä9TBI*;³f/óÏ»EW'„bU˜µúòüÄýÏ\_[©­wºÓn;š¦2™Ý ³ÿË9lº^ÕßAáH[l+¬– g/ô¹Sn6ú{˜ãš›Âe¿Îè¢ <ÌïwKósJÂb¥Ñ£ ŽU¸(khüC«©¶p}ëúm
- ëuXejÓþ=°?»yLâ7òÜnýÂÓʥ܎k÷•ÿM¶ÞûÛ&ËžD±ÞF ý¸¿òÑ¿.µ˜p“%Á ½)g£ny_®m¸PâZ[03ÉÒ$‘T-išõ Í÷p]è7×I”8Ô»¬»õEÔç²]xã‹Ž }v¿ôú©$ÚÒ8rÄgQ®ýЖi»˜¢–}µ;^›bèô­=iùqÞ²}PT6#r_ÚñšðšíZÃcÁœ½Çõ8våÙ瞊š~P•áE Î+|Ó³åô6Ú†+µ §¢ˆ•)L<>ðlK+Š£ƒ'ƙܳŸlàù%¦¾î8²îPµq÷¦‡o­\´cEèÐß3  ¦‹?/É}³u´'Tçà,njO°¢÷Ž™ïü؇¶œ;ä¬óôûfi@ µîÂ?ÆVE2¸Îª(#[ï]hÛ?Aƒš+µµn4Èmðr"ÕËên‘¹~/}êŽZšÓMÛ%íð«“U%1¬ÜÁžU§|<ˆ5c•BT¾TzZ³ÜfÆ™cOJÜŸá›^ ã7”ï‚oWD¬­˜ð¿Û5¡Ës½2RØñË™2•ìM‚|oÊ|U–Aß9/«©«tS¹>˜áµõÌ'Æ/¹_65n¶™‡¯•F@ßÙªÛ·_w½ã¨ål‰è¹ÏÆuäÛ½ŸS¸šJý 5-­Óï¯ +ì;ºóRVô‡–»^1î¥â’׶ñ1uCí¶e‰‡¹B—Fec½iÏÅÊbÇc4ÁxiT¾²ívò–Õòº†»vp©³‹»æ4ÏZ¸sóÏn—eÊ+¾^pžŸŸsNÂë œó½çâ"5%çœ*WL½'î Ë~øÃÐ{ö!£KžÄž5¼T÷žñ-/–_éÝjÝC«íÒ4U—ì‘Í­qÙð^¨Óáö+ÂkNþ»Û‹ÛyŸµS—/_'œZîö­!¥ˆÒmzÚ²& B´`!Žk{]Ú™yy¢Ò ®»FÔÉ ×Ëò~A£å Ô‰¶ªýs8Ñy¬€¶Yøbݬû]ÿü»”jþÀØqKÒµž/G#wò_Z“Xô¤"†‚XÕÍ›gÝø4+âp~µ¶Ÿý.Êÿ üOPj`N`ZžFù7hKŒendstream
+xÚíRiTSבª¡¬2©¤j=,Œy5„„  £ soÈ-ɽôrID¨¤*Ë"6ºd¥Âª"P”Zb^'Ò*Â#,ŸEªVEÀ©¬««ôgûë­wΟ³¿ý½¿óMs‹”1D¶ÆP‚Áar„ P*•pØ€<³Ù-‡å‚¡ArŽ@à´jÀ]Ø|!o…ǧÐ@ –®Ç‘T<é“$>i`QÈQ •*XCÖPÈÕ@†)˜Ð3H­k'od€µpŒg“Âá
+ BÐTÀåy9ŽËõrˆÈˆ²9
+#°zß×Íç×Ò.ýeö`7]0èf|·GR[+‰]p´ÒIQ»@íRCµ†ÚÖµjüÐ …–†5Ni ]\ßNzÓÚÚ”ñ—´_—ì˜ù$éùó¾g¯ ÔÖŠl7+×ã3b=½÷ûgzxÓ;ØTÛ«Ÿ™Üâåª/î"ÿÐ>»U†vÍ¿ýrZƤ Np=ßåÆ‘ÏÜÍ\Ê=á¸foÅ¿¤ë<¿n6íNë¬ñѪþ|±Õ°Ÿ›˜Ð—r&ê¦ç¥ºÆóÕAÎu…3“LÍÁÁÕKšgc½ƒóÝüœúÌu%Z¢€j§ùB®ø¾êlŽob|Ñ1¡×ž>C?”F›šF{-ʳÚ¼ m'ó~Ôòlï_l΅ץ軼ëN˜¾Ÿ·l/•ÃX³7íXmxí6þ‘`Ξ£‚†‡›Šœ³ODÍß)ËñbPï¾ñérz;mýåºG„Cqäóª&例 ÅQËññìLî™Öó|S_õø^{°&{×Æn®\´}=Eh7Ð;( ¦‹?-Í{½e´7Dkç(nîH0£woß7Ÿ=è¨u÷ûj©_+µþüÆV­ap•QÙlu¼g‘õÀ j©ÒԹРË¥
+©Rú:A¶'e¾2K¯ëš—ÕÜ]¶À¡BÈðØrú£ìϹ_œ24m²š‡¯–DBßX«:¶]s¾c¯álŽè¸ÏŽÄuؼ›[F¥~‚–ÖéöÕ‡–Yú츘ý~¡éŽGŒk™¸ô•u|LýP‡uyâ!®Ð©IÑÔ`Ø}¡ªÄþÃu ^U h¿•¼9lXZßx|—ÝvÎAUNI÷Ü–Y wlúÑåѲLYå—ëüÎñ 2cÎóúýç|뾸XE@ɹ'†ŠÅ5RïŠ{Csžù÷ôŽmÐè’DZgŒE…Ï-ª¾ÓÞ%’áË]¢›m»iuÝêæš²ÂÝÒ¹µNëß q8ÔqYxÕÁwWGIï“öqê2âÅ«„“Ë]¾Ö§s‚z CZ#² ôp+d¿º¯É©ÝŸ™Ÿ/* è¾¾sD•ÜØy­<ÿ'4ZÖHh¯Þ7‡ÏòkŸ…/Ø̺÷Á•øO¿I©áŽ·&]íý|tÍþ s‹žTÌ«zxóÌždE*¨¦Ö °ÿæ¢ü¿ÀÿD…–㦑ãi”ß
endobj
1451 0 obj <<
/Type /Font
@@ -13331,14 +13342,14 @@ endobj
/FirstChar 60
/LastChar 62
/Widths 2733 0 R
-/BaseFont /IGPIFQ+CMMI10
+/BaseFont /LJYLGY+CMMI10
/FontDescriptor 1449 0 R
>> endobj
1449 0 obj <<
/Ascent 694
/CapHeight 683
/Descent -194
-/FontName /IGPIFQ+CMMI10
+/FontName /LJYLGY+CMMI10
/ItalicAngle -14.04
/StemV 72
/XHeight 431
@@ -13358,20 +13369,23 @@ endobj
/Length1 1199
/Length2 2269
/Length3 544
-/Length 3059
+/Length 3058
/Filter /FlateDecode
>>
stream
-xÚíWi<”k2e$[–ƒxÈ2Â,vSÙ :a4v*cæ™1Œf±/E'[YJ$KŽlEh±$ZL)"4”¥¢ Y¢Sï£NõžÞ¾½ßÞßû<žû¾þ×õ¿®ë_÷‡G]Oе$3ýA“ÁÑÅ ÑXÀ‰ìÏeˆŒíº;@*×C¤`H„««»Ò8tð—.h͉“aCä@>®\À‘ÈôÐ
-°f†D²hÔ
-¡AȆdS ƒÒ‚Šµe­™ÁËlø²~64H‚‹DýJà 3œýKˆBc¿´G憠Ü´P.è`ów
-b€l6t(_ Aþ)©-ƒÄ$ÓT€ÀF”È"7,Ã$.‹éô夠Øo{
- *#@œ?È$mÞX¿¯eጥB¸î³ÛúFnsŸ¹Êð4ºÀR°ÃI.蔂Añ¬IN¡ þf€Y­ÏJÇ•É™
-¶iÆáA¦V­ÈÕ’RI’‚ö)ò¯g·8a×¾[ƒèBwÊg”Ë+ziyÍþ­JÕœ—º™õ-IB2S:~Â÷ó¡Î0¥ªÒaçƒZ¦2‹ oœíéq.XØ]^› :0ažÈ¶KMw>hnóiz5/UÓ*é70xÅJÔ0þn²œSÿÎ_Áë”1¶íÖ%½Å€ÊfÊâ^H©á6ý!#:=g=ioÚ¬´®?Ã}þJ.Ñso•jGYleÙ›öŠÅ·µÔ1Ï4”î-µïo•ä·¶ ICjòùƒú
-O9‡Îä«XÃ-–‹VyH=BÞ链'åŽ)½Ï+‚…*Yªvãº2ºÔØçÝãìÎÈKoä˜_Ñ)è{<é¹Áq­ú¬ð%/Âú U
-™›^­5:”“o&3²VfwñrÙ²V ¢_Sè•‹j%µ „“‹¯t(ãEŒ­äžÅL–¸›ðßíXq ezSˆ:ØÊjk öñ{½+aÆìxŸÍF8*·Ô¼Ãg¦vÄ;U4=Éz¾wöAHÆËF~A‡_d¦öÔÄ>ßk¯xìáž|÷°Â‹-ÝÊ16gë$dõ¶|òó4ð|i~.·Ìâ)ZîJÏ ÜÔõ‚«dÆpÕ·6••'Jæ,™üQ'ìýFΟDäó÷=ŠKÕœ6èVŸ,M¿W$w{e›‘í¼w³HÉàý¸@¹` á–³U†Ÿì‘O¹fg¹Îí”®#Ž£ƒë#õfä¥sZtÍdÂuÖõ,õ®.V•ŸX:È׺ìU§2Ϋüëñþ£–†}…ûs 6H*¢Õä7Ç+°S iØ짞šÞïã¨pϘy„ѽv ªr­â¥ù̆z‰©pøËçXÜE†äû“©¾e’Šƒþ©â8lg‚a/¾jaZ\k²ŸÑšÙãpݾ¿žýIþnüjd  |3+¬Ìzó>1:Á{ÝŠuç$Tá´"“7ã­‰:VõDåï©ÀÈðøR¹¿=]}Z¿@Þ.œ`LÅÑýÑ7½3’svÁëC ~GöXí¾sóU b3B¼/UidIÅó€?æ©ëzFø^>eSÙVü¸Î_F9ùñ²ÁÔ=ñ©«(§;M–åáƒÝ×åÊ d:äÙ­ª»†ªÂýBS-D£Ûná®Êœ.åØ«uË®*>gXŠ(»à´ç±)*Îeñ™åLéRºyvil—¯x‰¶·?%Z>±¶ˆ!e
-ן67z¸{h ÌË7÷Øšr?èl柭ÕðŠÏíß5šJ?¹ˆlgš‹p½VïN-<ˆikHW"‡}þcüdÓ‹‡œæ±9ÌyQ‡sÌÔ·æ ªE½lëÕÏ—­ƒÖ\ãßî Zm>êy}+:hè<#Ï¥ëcW÷E‰þ·|m÷ÎJçÛhM©é^3öGÕ…ôÓf‰ÝÇÉïáx±UÞš·ß–# ‡;†‹W´±M‡q¯‹?}°}’^t¹è×ÿV` l–âß–[ëÐ&•é˜A%ªoèI=,88kÖ;ØlJÁÅ”¯óèâ¥"?ËJmí?vM,€ +† wª·P×ÄÛ{ß;Ù¦&B²Û²kÓ5¥´S¶GhÊá6«3whTo+Ç.©4EG_G4¯Bä)òöfðìîåÆ·Ð Wj”q™RpýøD¿B÷xæÑ,9äèfù‡æz™ÝeǛǤU^§k<ª#œøŒröš÷u3,!仃yì¸Ì9`Ñ¿û¡àWš<†2U·ûRW¶i@pÔ|ÆÞ>—÷qûZâN7;ýÄJ²ÏïYtâúN*e ¹¼Œt¹zâN oõByZŠJÒn5ó ç=»Ç´Îï©žà#n"öÀœŒÆIUó¦›Â}tÞú*–øÚ–żè1œ5ú½ ¶¹Þª±õÙiž£:w§UyÑœ’û=^Æ«g`IFu©»«ÔÛ®û0på •ócÂ-IáÎ"^vÁFaOábòOý÷jlß`yþRF“oöeÑò@n‘(my¡——Ÿ[?ƒž•eJï•@¹;jmÝœ–¼3Œž¡>w[L:T‘â6.èuU cجÒû¨bL+¦ÏÚRZÛ·×Íÿƒ«XÂú·þÃÃ;yý¬Ìôõ•Qév9©ÊaTýˆê
-àn
+xÚíWWXSÙ”(AŠô„R‚@
+¨ÔÐ`è ’“ ¤P¤
+‚ÂHSŠ"ˆ¤)Ø¥ˆ`!Š‚Tv,)‚£÷€£ÞñúvßîwÏy8{¯­­õ﵎†*ž gEf€vLGƒDcgZH
+¥AȆdS ƒÒ†Šµem˜!Klø’~8 $AE¡~¥a0ƒÁˆþ%D¡1ÈË푹¡(w-Œ :âþ€Lð6*ÈŒÐúh3´)
+â™lÚÒ‡BŒ0?an4R0d³¡CY†@ù§¤¶ “LcPQ"‹üÝ°“¸,¤ÓòIA±ßöT"F‚$8€IÚ´7¨aoÓüi+Žw ÚÝg¿pU áét¤`›³|ðIEÃ’ÓÜ"þv yïJ§•)YŠ¶é&ÁfÖÍÈÕ’RÉ’‚©
+og6;c×N¬AtO¢Û²È翶‰ºáð^µzÖ[ÃÜæŽ$!…)¿~Þçå«0˜¢ruY­°Ë«m3Ù…Äw.ô8W,¬×‚C%îËÙzåü½Z[}Dο™“ªm–ôï¸f-jß—bç4L(zŸ4Á¶Ü¹¢¿XÕHY8Í -3Új°#tX·ëŒ'"ý}b‹µÎéÓÜ—o䓼öT«µ•ÇV•¿k­|Xr眶æ…¦òýÅÖ}­¢’üæV!è@M¿|ÔXá%ïØž2o‹3Úlµ`Ô'äŸ:áwBþ¨ò‡übX˜²ejQ§]Gf‡:û¢GœýyñÂ~‹kº…=OǽÖ;­Õ˜¾âMS0—ó`“q掘~øR˜¢XrÅíÑ/|-7¢½Õ8gèÌ>Xª(YívÃÙ#­»§ä›÷~‘H÷F׊Vû‰¸Ï&y´%¿½ï»þY1KÀs㛵Æs3ãÍe‡×êÁì/_-CÖ­CŠÔyç¡šI-ýáÄ”’km*xkù1㥦ü‰íb‘GQf·…¨ͬÖð¦pa_ÿ·;§Íõàþ0¶Ó¬vOË?xzÒqǼsåùgÙ/÷Ì< Í|}Ž_Øæ•¥39¶×ïÆ{¨k?ß#¼èrS§J îLý:9ýÍŸý½ ½^[\È+·|Ž–¿ÖõÊnòfá­U²£gíjî¬*¯H<˜ÂY4ý£^Ø1ú
+œ?Ž(àï},—¦5e,Щ1^–q¿XþîÊcÛ9ŸF‘Ò[ûìŽå_µ„;.Ö™þŠ°'¾ÁZíºw·Sö» ;=ŽRÒŸVÉmÒ3—ÐëZìZ]¢¦0¶x€'¡}Õ»^u6‚Wõ×Ó}G¬Œz8ŠfÏâTD³éoN×`'çÓ±9Ͻ´|>ÄQáž_ú1sãwŽú­TÕZ¥gž‹sYgÖ•Š€¿~‰µ»Ìüp"ͯ\RiàÏ?U†ìMñ lÃåWƒMLKÃ禵dž†oÌõ6°?+ôůFÑÊgq‰¸¢ªÌÁw’¢}ÄVˆy^X§§›¾mNÒ zx ºkwÁÎáJŒ,/•÷ÛóÕ§
+ì³À1æà‰4;z
+(Ë·àGuÿ2Î-X/BMÀHL6Yïv¾wÞª"¢c¸ë²Xn‚@6¨KÞ”Ó¬¶s°:Â?,ÍR4ú·M–:iÌ©2Žƒz§Üª’ FeˆòKÎ OÍPq® /¬¦Ë3DÈ3‹#;ý$J­±Ý½©Ñ
+IuÅ )CàýÙ9˜ð„×7e琉æ {ƒvHF=­½T–íG¨Mó}ÕvŽI¸zH)þF¥äù#›y*¯íÛ$X+ a4óÎŽ3}I±~DœÞî7 óëíŽ=¢Û.µ=ÒëpÊB«—˜?õ:'lH( “ñ4ÖúšÙ·òW4Î΢†f€šäÛðùHƒN¯•1!-¡7×,̶eÚ8òú†ê¦Ñüš³øñ+EÒ§,Œïóó$,|¶¤>>“õgs |ƒÒK%‡‰sf2Ï.#[™"d·õÄÉù‡1--*BäðOÂŒžv~õéÜAg9l.óVþnÏC¹æ[rÑÔw¹jëÝÏ—«…›€6\“ßZo:âus :xð$<3ßµãSGçåu½ïù:íU.wÑZRSÝæìOjó§Ì-“:‘?Àñâ«|´î,¼¯Aµ •¬ha%™ Ù½-ùüÑöYFaòÕâÃÜ€;A¥°J@K^c‹T–S&•¨±¾+íàÀŒy÷€Û˜jS!æÙ=ÉKC~*)‘“ÚÒ{ô†x VnW¿h©¡…wð¹¢E]„d¿yçÆgêÊé'mÓT"p«³¶kÖl­À.ª´D”½l\…ÈWâíÉäÙßÏ'Œ>m9®I<¦Ü6 ë:©èöé™A¥Þ±¬#ÙòÈG›p
+-ô³:Ë5ŽÈ¨¾ÍÐ|RO8þåâ=çç"nT.B(p?
+óÜ~•/²ß²w×cÁ{n4 e²~וŽC³ÀÝs™y{]?ÄímBH8ßBìð/͹˜°à:ÈõWÎt7|.èzýø½&ÞêùŠôTÕä]êÁFσºvh_L¨ã#o$uÁœGIÕsÂO¦Æ}rÑæ:–øÖ–Ǽè1œ5݉¶y>j± 9é^tû¦ÔxÑœÒÐ]Þ&«gæaÉÆõi»ª5Znú2ì*ÎVÍ7%G¸ˆxÛ‡‡{>‡·‹+<W
+Ø£¹m½ÕÅ+™çýr®ŠVq‹-A«Kݼ‚¼†iôŒSf\?ÊÃI“hëñð”佩ô4õ¥ûBòÁÊT÷QAïëÚ£FÕî'•#Ú1=6ˆ¸°¦²ÊØž=îÝÄçÑ'¹ ßËïeeeHPAeØ禩„S "k*¾@¸ñpúÊ2NÖkŸêܳâ5dSž]|x,Qº¿üÜ™/ùúï/0”º˜'e„"OToë`ž>šÑ+êÛCÌ'¾Œ‹¨ºeh<&n¦?–&iá’@–ÜXÄîÞ—h+UÄ’ÇS\Ò~Ÿx[l#(Þ*וÔkßtéÁAl~Mwß• ÁÇâ§ìDǪ]‹‰þã]ì™´âRYD\¶¶)+¦./'Æ©À¥>¹¿Îg…keÍÈÆéÒx½"K †b΄a)+Uö¶Äp‰ñáGê…xª[½zp‰ôlݺØ-nZw#×P×eeZÒr-’§ö…]Ë}S'ï7[òt«ýŒ8­ñ)äË7|Av®•+‘õ©Þ®óûéÓ¼öCÞ–1»”£á5Êd˜œïõ¥ökž/5_ ¯â®ÙU)|kP5C¨¿¤Sý_>ðÿüOè ‘Åa†YÁðhȆ~(—þÍàÿ;@µendstream
endobj
1440 0 obj <<
/Type /Font
@@ -13380,14 +13394,14 @@ endobj
/FirstChar 97
/LastChar 110
/Widths 2734 0 R
-/BaseFont /KQFWUW+NimbusSanL-ReguItal
+/BaseFont /NQJRHU+NimbusSanL-ReguItal
/FontDescriptor 1438 0 R
>> endobj
1438 0 obj <<
/Ascent 712
/CapHeight 712
/Descent -213
-/FontName /KQFWUW+NimbusSanL-ReguItal
+/FontName /NQJRHU+NimbusSanL-ReguItal
/ItalicAngle -12
/StemV 88
/XHeight 523
@@ -13410,39 +13424,42 @@ stream
xÚívgPTݶ-HPPÉ™&çÐÉ™–œƒº–††î&K(HÎQÉH ’sÎ 9#$ˆ€øÐïžsn}ïüº÷üzõvÕ®ÚkιÆsŽ¹VmVF-]^Yª„p@óùž4`ö–Î(]°ƒ¯ÜEXYå‘P0†pP
G8ÚCзÿãºP(
²BÂÑ€Û¬Z
-JñDÛ‚Ñ¿s£`·n
-uƒZ|™BX‰¼LLIB—Qdt (<okbu:æ}Ò{ŸíûÑ쓼,Vôâº4¯rèéMûäŽãÏõg\=-äpöæxèA­3gkö£¶Qî ~ó<¤]ÃpÏà µ%l“Ç+Ú:æ¹×w醄x‡ß9}™]²}IYΉ¼­*"ÉVb—åìì²Å|ý~ÎÞÑÛÝÕÙ|ŒÓºNÉÏ*î‚MÈæë”N#m¢_äa™ ŒéøÛÔªÏ!´0sL^µ$0ÙÂÿTh5ë¹[­Fúù{ª\™ÏíßÉúÐâ¦Ùé%üföC ~–fí*!Î:‰EvýÔzð­´÷Û6гßÕ•Ü 곺£Âgü«e‰;}ƒv©b]ùßÖÒï6”‡ùÚ}sø.Gj¢T«$Kñ£•I âQ–®‹Â~ÒìEÛ1w.ì*Çbr|¬½}$oÖ‡·Gs]> Ã?V1ñŸx£+w¿³^õ9’e‡Ð†ŠÚ¥ÍäÊu””7œœ¸äN­Ñ÷ˆ¨/ùŠõ.‹ú…'Ð)á0äPùÝÚ…ke
-¸éÛR§ö
-]8sô&sß±­|*åŸî#>cÕ¯‡‹úœ‚ œEëÑymeê÷AÆ€>8m„ 1œ4¬jõõr¦XÜâd8„²³¤¿V>M¼çÀ7ÁÜ&N\€*ÄJÒÜOµøï8•^Ýçôáö¼J%qõ‡ ‘®.µ&у;ìXBÒ0ÊÚcVKŸ0-SÛ·ߌG?óí·Eƒòñ(€(§¸Ëš’=´øô•ú+y\J6.æꔋ‚œÞ»ó^eúÞ‚·V„(õb*$Ã=AÁžéÌmEéïa9žoñ€Rý3™ÙÑS×!÷8ÎãÒ9‹ÅÕçÜrƒÅ£‘C™Äù\‹-ÕÕ²k±ò¡øáÃÍ8
-ušÅ?Ó<–“G¬
-hEá$=k
-jK‹ê\ô#Œ²Ô_j$ø>Û}~';Äë08~Ⱥ:{¤j7l˜ŒEÖÉ/‘ÕØô 5³î*Tô#ÛýêŒm¥(Ÿ¡\B½MÈb\Zk³u
-ÂKJ^'W²Ù3FÁå¤éÉ.ðÊüÊÕúìðã‹’c=,®¬3jÉ/Ì ¬}橃”.‡Ó6Š& êÝîU¸¨Ûkh•kgݺKÙ!ì`M«a'x0¡ƒÌ ùts«,t-¥§†ìC+µýÝû¡ÝÒ^aâBý" ðf°Üpû š±›õvV¥³ƒÃ÷Ì ×pJs®a¯—ÀœÉAgÔ6tå„è/ZÅkQ^î›íF“’Ô¯[t#¾]°rÛÅ‹60^Ùý” ðzFYËP’OI*ÄmÉ×d«òñ¦¾âWfÖòûé!ou¾qÊÜCZhµ ÐÞ“iQ'÷|(D¦¶xÙ*ª÷d_R½˜Ñ%8Z?Èb+
-à‹)קw&¬š>òÕäø° DxùAt€næ£`öVkøqvëð1']/¸t ¡yô8,TÎ.a Os%/i5
-ÉzY`yÖP@-ª¤9¯ŸÇæžÓçý¤>Vo€Ì¢éªd>Í/ˆöõÏ}êY
-³¸~h—•¸8˸ƒŒFF¹õ•Šû?ih
-vžj ×`­Ú[­›öÇ|-…>°ë=].žàŽJ,}”›­ûÈi±ð!æÛ‹õÛ‰ÌJ«—–r•øœEk±9,ð”ˆO’ܽ…n®Ðq !páxÓ“1¶¥©~à]ÙDXÞÑTtÿ Xwd‰–¸rϽ”T…³k«eÛ?ƒ6òg¶òõPªj~«YÏZš{JÃÁp´hü@AÓœlú)ÿ€úBè×@aS‡ž”Y2(õ¡r‹¼û^*84å¹uÞVi¢¾¡HÑÂé…ØÊÏ–)ŸÃ;c4¢ž/{Ž¬Ûe/HìEˆ…jŽÚ¼9CÖ•Š ‚ŒüsB—W¨Èòè!&÷E*l.\ÙÈL4´ÚËÚ÷h„¢Æ·GñZÍŽ<çYÎz9†CÅŸäá¦TKñÅ3c/ÕQYV;Ò+Q%_Vªdá¸ô¿ð‘8ܳ v4e$2iä*õ Œ9csõ3k~YžØaí¼zf¡äö•Á’±¥;Éb1ª"(GO_XLô>ÅGçë%:}¨=Â[#™µ¿Nôp½vCžªÂíu>N1 ¬Ê¼íQù„8¬ì¨`æWn-aö­§m+´Y¬~5A”XĽh§"hV לÞ_9æJqB—¡Ìh'·ïžrs)¤<ÃÑ!]‚ŒšÙZ~\ÍHÒzU´NÏh“[€Hái3
-RgT­$vÊ®éï9‡á׺ù§ßWŸa|…psØ´"ÀÅÑÁñgð~¸¿Õxy¿oA‹z¾Â¼âÕëPúí
-GZ÷± Z6ÂlƒÝI§(²‡
-?Uôü¬Ë÷
-žä¶5Äõv!.[7$›\ÙÌù ö %Ü-DÇ9øÓ\¯ÔÍŸÄ7& Oâ×ÏžÅÚÅ8“£òÅff\Æ
--â×6™…ÈXÓØø¬ï¾ÆÇ„)h}YÆð–êA±>–?qhYêJÁoȯü¸"Š˜‰œñµŠýVw$ˆÇÑ5-C¶Ãö&šg ŸI}2Ñ»5ãùáö¶DăuéBÿ;¤»¥ªïÕ\rþhüæx€Í?‚^z:“Å„ê!Ïå¨Ú
-DЃqB[äßTœB<ug(°Ø˦×ý9J~¿|º#ß*ý2üÌ‘ÔLÉ{¾OO±ÏïùƒiÌ‚øœÎ'=Ú‰dž•TŸT¿ÇÍ8ÕíÌ¿Þó£œÁ8©È«ÚÁZ±€,m³2ÓDŽñC£{p›® Î>*«ic:5uª ÍÐåS;ùEÑÎÙÀHoÑÏWçx ×ØÄИ0uÎlPÎ5 —¢ú½»<>ÕW:‹ƒoY2’˜HJyf€ÇòTcª§Y½ªÄæ'Jçx{êI_Í[¾ÆuE^n¥ñÙ±pmËISDx°ñ¸U
-JŠ+Y–¾^#Y%ÿ GpXŽÒ0Nãˆ&^-`iªiðŸ;ÐNU‡UîS’7K±Åüð[Žç&“vñ;ÁsZ§â§u‰ö´{§¸àôò‡ëòÔˆBW ×B‹CóáiòT£ÊÚÿ“±'ŒÒÞÚ¾ ZwÕ¢‰?UÛ.[ h‡)qŒÐÇ
-¯5Áƒ ¨“¹Ýa%µxkÐÏ_WÃp)ÉâüdÃS<C&fåc—Åo FÏT±Õ„ú°
-)è@#{ë>Y]K¢þäWOk‹à0É
-m›Hi‘œô d„†q. „WôâPløFûÐÀî±Ü"“­[¹É`¬?sòŠô£NÙêqüiv Ž&#‘ÑPb6G¨4Ùpòã¹>¼¾_$”ì¹J‘Nx?~«=!ädœGû¥ªw³
-‡¯0&;ì8u¶IýÚ¼ü?"¦ûø}¶lÞK©#«ÞÓBüFçõ'Ã÷bc-~Žò8îêÜÕ, |¦,kÏ%äq†Ö‰~^÷ŽÓ×™E°~r¥¡˜[©¹Ùéù _T¾lÌâÍî
-ù¡M½Þöxhá,ÿ
-áHQ þY»Bå<GJÞ,6]JOU?ÀÕ«Uh´\ï MNñÂçzŽùy¬˜+߸+¤ „#äoàùØÈ)ÏøÅ PØ
-Û9ÔB1®¥Ò[Yù=cÁ­öâS§¹óp—ü›ÏUÞYKf†mˆ¡ãž\%¬,Ü1õ È<o«»—ÆØ1D*@„ã¯O‡¿q¡ùî)uô¼ÍÌâýükjgWØ!›ÖöÎÏb¶wéÜ/žbmS`¼•9yì>ÕjªâD^ûÐ."ß·ƽú5Zï°Æ溱@²¬®fµ4ðÎ^‚›M²¸©ým|ÿ ¯©‰É«ê4
-$L¦nW`6»SN™’h܉¥::`í ?ä·¾:*Q “ן”„y·±,ˆÅ’·õç ?‘²}ùT{·BV°£3ëÉZmmsÇBkÙ-’Ãøá+@™d׾€ËM¥Üšô³lŒ~‹ûÛ«/xôñTpïÅM~âÓ¶•˜IÓAéoc_3¥KNI/6Và&âûßÕ{´adÂ{Þ@:C&] [°A=Ûe¾¶5YØøJ>ªí®(íPãHš(b"»,ŸÚšíÑ)„Ï\˺_ºw‘©¿cð>b»¨Oœ»ÛybôÃ$N`ðöL~kñ^óÛSïž]Þ ÙXƒ‚AW°}´e•!]¨µØìà×fÏH Í·Œš’ ƒGïa:Õsg«1ì8ñÍÑ –äiöÉñhCìò´g¯Ë8ßêô-Ì–~‘9V|T±&Nn·äML†‘§ÚDü”¹Ú>I^Ž”[û•ÞJ¶½ÕÉò< ë•Zv·yÁ<ü0ˆ¤5ºŒ„hO!ƒÈ÷sÿððd‡åÁúÌ´Jb+"ä(2mfƒ77Ê¿”Í
-8*v4ºÏÄ^±ûà+h5zê2¶;šÞþ,-õQü! C$yw9†CšJO ™ňq\`±"H,Þ)T<icº ¿ª}ZþK§{«Þ®ûªè&4CSQ~åâ7ê
-QH;ǘ¢&šùŸe“ô¿žUÙ|µ°Sc0R2YE]¨
-‡á{__bçâ.°ßþ
-LóÃI8GU–¿Bã¡\‚–Ÿˆ{éõ´Sû›7M‹Š–…;ûÛ䃵h¹0GQœ&÷ <‹"œ_ý¼ÈAze‰ÀN2ÿPÜJ"u]©¶ÕLòs.}æQùü‰iõHö5¨ñ‹‚‘öqLðëƒýUj[’ =Á®…1Ñè²YÆHOŠåoq ’„!¿‡RÒ¯¸ð%ê«~u¯ ³¿0Š×·6î;>nE=m½aÔ\{\ÄcïQq”&T/bµ^þü‹}m“¹ò A’ü陈×O/ÍI>c×b%ÒÌ&ìýºªú· ¶mJ;û7žb{ª6eC‰Æô_è<@ÀbW’+Q'‘šäçÚU›‚ݧ/ˆ+ƒË°a
-<¤þdÑ _IÒõ.˜ê¢Ï\9¾§é-xÚÖ-9?›ìÐv_ wóý}¾éH`…Ñ'>Êß4¬>äŽT‹¬ÌÛúGäµGÔà…$Í ï‚7LI›u`žUJ2ì„΃79ç¯~f´lá­ÊΚìïW 5?|¸':U—.ûrJo ÇÓlÔË5áAÜçxE ³º×ا‰3Ç•ÚTñ#åKþtâ•.iKW@ö/É›ÔÑ÷ ûj&Q ¦Œ²È˜¥t°Èð§Äh-ؤ1íý b?e¾™F Š– ÉXrÙ/&Šjz©¨rAÁM°re.2Òe%ÉÍ£™6"5[¹(H4 :\mdb“™[i:ýP½2“¿Ýä÷ö0JÑ»pÕh¯QšQ¨ý±Qó_»Ã7;mþã«÷Aú^ÁÐ; Ó èvñ¡Õñ¥ã«*’Hóß¹,QëtT½}…ÁbWý€g”ùxÔ$Ó¬GÞ×™®'}¡uÞói õ´’D§ùõ; ¼xðÞÔ¡Æ°~. °öâ%ÅÅ4O”˜»ª¡ Þ»Bï­\ÿÆÈæ 
-†ìvm…$t§³ÎLd?莑ˆ+í–«I&VñZ"-¿35MGöÊìä§7À Ñ4‰>ÅauA×W¯½r‚…`Hã×W{Ûw1Û®­¹E¥^["W¬%BŽ… >«íÜMÑ#nNCuy‹¼Hû %Tž,TÜþ0]4.ïdîžk0œPañœ„5ðY ÓëF–?ªU'?Õ‹«žäfü¸Š·Ö¤qCr®až1j,†º¿÷2Ó“=²õáÿ¶D4ÏØeÊÀ¿I Üóv¼vþ´b„dîÿ¼ø)xý)\+"oÜ´¦ÜD1å[|)h$úØûeGUeŸ?õ¾†Ó<åízznKB†Éd–¬ö…Àÿò!øÿ
+JñDÛ‚Ñ¿s£`·n
+œ6B†NšVµúz9S,nq2BÙYÒ_+Ÿ¦Þsà›`n'.@b%iî§ZüwœJ¯îsúð {^¥’¸úCHW —Z “èŒÁv,!ieí1«¥O˜–©í[oF‹£‡y‚öƒÛ¢Aùx@”SÜeMIƒZ|
+úˆJý€•<.%sõ JŽÅ?ANïÝy¯2}oÁ[+B”z1’áž ‚`Ïtf¶¢tÈwŒ°ÏŽ·xÀ©þ™Ììè)‰ë{çqéœÅâêsn¹ÁâÑÈ!áLâ|®Å–êjÙµXùPüðáæN…:ÍâŸiËÉ#V
+.¡Þ&ä± .­µÙ:á%%¯ÆƒÀ+Ùì£àrÒôdxå ~åj}vøñÅ
+E“õî ÷*\ÔíÀ5´Êµ³nÝ¥¿ìv°¦Õ°“@<˜ÐÀÁæ„|º‡¹Uº–ÒSCö¡•Z„þîýÐni¯0q¡~‘
+5¿Õ¬g-Í=¥á`8Z4~  iN6ý”@}!ôk °)„COÊ,”úP¹EÞ}/šòÜ:o«4QßФháôBlågË”O„á1 QÏ—= GÖíÎ2‹$ö"Ä‚B5GmÞœ!kÊ€ÅÁFþ9¡Ë+TdùGô“Àû"6®ld&Zíeí{4BQãÛ£x­æ
+Çžó,g½Ã!‰âŒOòpÓª¥øℱ—ê¨,«镨’/+U²ðN\ú_øHîÙ;š2™´@r•zPÆœ±¹ú™5¿,Oì°v^=³ŽÐŽrûÊ`ÉØÒd±‡U”£'„/,&z‰â£óõ¾ Ôá­ÌÚ_'z8ƒ^»‚!OUáö:§˜VeÞö¨|BVvÔ0ó+·–0ûÖÓ¶Ú,V¿š J,â^´S´+kNï¯s¥8¡ËÐ f´“[„wO¹¹Ržáè.ÁFFM„l-¿?®f$i½*Z§g´É-@$ˆð‰´…G©3ªV;eW„ôÆwœÃðÇkÝüÓï«Ï0¾B¸9lZàâèàø3 x?Üßj¼¼ß· E=_a^ñêu(ýv
+-gھ蟖¤§I„²kZKéä”ð
+›û,¥ñ­º“Ûý ÙU@žXÒÖrÝ}Â;´w`D­.à™Œ«ž¥ÅÇ3\™»ølð­…Ébñƒ¥‚U³¢ÌöMÌœÞÎÛJ”…¶WkÓhý j¢’«qµD¹Kz瑳³B|óG\Caî+þ¹*ÊÛ~¡ñ¥ÎGÙ§}–ΪJæÄäû§ W÷HíÚ>ÛÀaòœúò4ó üN$ÕYYšžÇï_œ••W+vqƒÛSš:± 0ZÌ©„›a‚â[‹”%sˆ{¬Þd?zä­7~ÞÛsý3M{öži17ÍÖ‚\"éýGeã3mì7
+Kygm/®SÉçÍÄ\ÊqÈbO;z¸‰ð «-4'¤§€+k=ž~(6¸hLìÈÒúô<6»¯´yjÊ^"þxNLÝ°Ç%3jz˾‘e2 ÃÏfĺEÎ>_žÝ(¸š¤²uy•“®ƒ›{!Þ4l"ùíóQtñÚIÝE°ºÙu² ¯‡Ån¹¹ÄùÂGˈÃÄ ›
+?y“w¾ G$ÜË×ß™‹<Ê™2ãtÏ¢Þ}ÿ†­ @´yIGbc‚²Kê·HŸ|ëÖ x°–Ñx½Ùþ2—€_M”+=‘Û~d˜„“•/tŸ†ò³vLFd*°Ä¾ù±b«&} ¢¥çË/à¥2 ?‘©"B¾,|BÊ1û楛æŽÈkf}°¿Åø«þŒ„g“IÆÞyã8‚© .ͲmhïF`”ÜN‚”ƺʨjÊéž=wþ¼æuußÆ?ÀTÓˆ½~.%º·2¢_½¥’()“5”ôe-èÍÜhxlšŒS+é\d®ýÞ¢Ïd=ºñbfýFÇO¹!3‚"Ž±6÷'íjCœ´¾X‰Œ]Š*ÅÂBùwK‡õiŽ€hn"d²¦…Œ·âg쎓š™Îë`ÎÓp¦»²'UJfaþ»f[Ĉ]ˆ•á®þÍz´&—À$ñZ¼¡®i¾—fG‹LßÇzbÕû\dÊÅï격|X“Ý\sÉ•ŠØÊ+¾ÿ fÜŸ|>„%ýHÎÌÚ`=6"æ’P«ô9#Ñ\ Ó#3z-Rô|%ñ¨$¾Gc^¤‹M]÷²³Ôú{'¢_ýDÊû1éÍ*õ,θÈêÝþ²â³Gƒg¸LMa2B Æ»é»*+M[TÏ•´lm§2!ž7V¦Ôˆ·nŠæ‘’¸†pj7ŒÙ>ò"$›XêÐ:{—­¶^˜u^9Ì’„‡DW¬9%%^ ÑËå,W0ß²¦ÜÝ™ZÒ×ý/õ{øúÆ>²Ý” à/"ŽDkúmù0§_ì>WTxìÑéƹœ ‹›
+zƒ½Ê-%¯Oà¸L5“‡û’ªV,î½øÊáÃz‡>ò&ïw¼´rY6Ç—ÆJwŽGƒ ±Â*ÜA5ƒ
+ëšSùSÕi…Ÿ*z~Öå{OrÛÎâ¿z»—­’M®læ|Pû„î"‡ãüi®WêæˆOâ›Ð'ñëgÏbíbœŒÉQùb³ 3.ã…ñk›ÌBd¬ilüÖw_ãcÂŒ´¾,ã Ž
+¢&tG÷ü©Ï¾2¤ûôþÌÓ(v'«.Š
+òôÿÑü0íû¾€Žˆtß
+sožbrÌûvE ²ÁÅ/ÍWRÙu/w¦ØÒÕÛïòxœ‘ h<LšøÖ‘píÇâa ®”Y
+Kqh|>6œÊ³(æÀ’ßë.
+ a‰ñµoWkrŸÔgÔÅÖº›Ð˜wÜ6îÂÞN¾Ùö i± XüÐ~ýÅ´á´ÙÞVó Þ³6÷³Ý>EŽ
+‹^±Šî±nl#šñ‰65%,ç_°Oê”+µNý%Ùz¯>W7¶]•fzã}A}H›ÎÀSÝÀ~ƒQrNÉ)îs¬þr]Lf¸á“
+<á¼ØËûò Aê)¡³k¯×ývuSøGlVªs#Nu¥¬·OŠE•?.j?ø ÿ©ÓwGä“øݺ23oªkvSÛë>Ñ=¶ Ðz¸^"èÁ8¡-òo*N¡žº3Xl‰eÓk‹þœ %¿_>
+Ý‘o•~~æHj¦ä=ß‚§§Øç÷üÁ4fA|Nç“ž@íD2ÏJªÏ ªßãfœêvæ_ïùQÎ`œTäUí`­Ø@–¶Y™i"Çø¡Ñ=¸M×g•Õ´1š:Uпƒfèò©ü¢hçˆ Šl`‡N¤·èç«s¼„klbhL˜:g6(皊…KQ}ÈÞ]Ÿjƒ+ÅÁ7„,IL$¥<³ Àãyª1ÕÓ¬^Ubó¥s¼=õ¤¯æ-_ãº"/·ÒøìX¸¶å¤)"<XŠxÜ*%Å•€,Kß‹?¯‘¬’ÿ„Ç#8,Gi§ñ
+D¯°4Õ4øO‰h§ª‚Ã*÷)É›%ŠØb~ø-GÈs“I»øNà9-ŽSqÈÓºD {Ú½S\pzùÃuyjD¡«†k!ÈÅ¡ùð4yªQemˆÿÉX‡Fiomß­¿»jÑÄŒŸ*m—­´Ã”8Fèc…ךÆàAÔÉÜî°’Z¼5è篫a¸”dñF~²á)ž!“F³ò±Ëâ7£gªØjB}X€‰/‘'™“š"ZtÍCöEqË’¼R7ö¿Õð®ÒÂö@.)¨F…t ‘½uŸ¬®%Qò«§µEp˜Çd€™ÑÛkï#ÝýFø‡‰0A³KE*3Æ€F ‚é®0BÖLqÄ`nÿ‚Š%P爉䅟Ú*›X‹²Å·jÔi÷b¶‹ôRáó"¿¬žû6vTZRœÌ°T3 Séèv\ã«%øÜýI ¯”Þ¯é¡ëæ®ZÖ·mpßú”Qn?ø&Å—Â#Ôߟ›ì}ÅÀ^í° ª"Á"çt{RH:†×¼woŽ¸ÏhFO°™§éç€oÊC£B÷~”…
+ sœçã¸!q?Oƒ¶•G¯îW̳ŒÔ)HænÉøoÌF–A£Êå{Ç‘æä8£jýäUu;W+Aà¢ïóÇ;X;{¥ð”ÇÎwÆ}x" Æš=×N¿nc}& ±Éy[µ~œ ¿öµh¨»š«¢³ñ©"Ì‹üEmÊ`;µ
+Lj
+â³ß
+Ì Q=w¾?‰¦6ª~ûá¤àõd‰xW/aéÒÛ‹†Cú\»UÒâàfÒ~…¶‡Í
+¤´HNú2HBÃ8—GÂ+zq(6|£}h`wŽXn‘ÉÖ­\ƒd0ÖŸ9yEúQ§lõ8þ4»G“‘Èh(1›‚#Tšl8ùñ\^ß/Jö\¥H§¼¿Õž‹r2Σ}‰RÕ»Y€|áCžÓ|ƒi xCªݪÌZ-›Çð0ÜJLÕ—D9dkùåΞ‹üÀu !!‘}U?³9Ü«eŒiÒF̦ì½Äõ–çwNRi¸Ž~ÑqÂzÊ—eh )¶M# ±M¤µ.?¶%aÿ5ßóÀ€L]t“ö´ƒÓÈÙ‹CM³S­ê£²lµ^÷³²ÚfÉÔë'7±‹÷bqÛG2®K œ¾’j…Ã×?“ vœ:Û¤~í ^~ŒÓ}ü>[6ï¥Ô‘Uïi!~£óú“á{±±?Gywuîj>S–µ¿ƒÆçò8CëD?¯‹{ÇéëˆLŠ"X?¹ÒPÌ­ÔÜìô|/*_6fñfw
+=ÂRŸó>ÍjóðÔv)Ùyÿ¹[G¼Ü5)­…ðwÃä¼Ar«òqsV
+…üЦ^o{<´p–…p¤(„¬Ý¡òž#%
+o– ›.%§ª¿ƒàêÕÎ*4Z®÷„&§xás=G‡ü<ṼǕoÜRŠÂò7ð|lä”güâ(l€Â(Ù‘(8Å|)ÿ¿wÆô/þQL™ uG«ØâÐÏœÎÎ~N*{cÀt(û6HÝB=viˆÀ%ŒÐ/ÌÐà>^P䶊ŧ¡¯ÕrȈ=ÂÆé2¾ldÔD4“kêœÐw§3\Wd†@$B}vÓmwÝK&à#ýÁ?¡e6êœÿ¸¥*IÖÔ*Àií¨²Q„É¿åAFÜd@+íy‡íj¡×Ré­¬üž±àV{ñ)„ÓÜy¸K þÍç*ï¬%3Ã6ÄÐqO®Vîz
+Pdž·ÕŽÝKcì" ÂñקÃ߸Ð|÷”: úaAÞffñ~þµGµ³+ìMk{çg1Û»tîO±¶)0ÞÊœ<vŸj5Uq"¯}h‘ïÎ[ ã^ý­ŒwXcsÝX YVW³Zxg/ÁÍ& YÜÔŠþ6¾ÿ„×ÔĈäUu&S·+0›Ý)§LI4îÄR°vò[_•(ÉëOJ¼‡ŽÛXÄbÉÛú󅟃HÙ¾üª½[!+ØÑ™õd­¶¶¹c ¡µìÉŠaüð L²ëb_Àå¦RnMúY6F¿ÅýíÕ<úx*¸÷â&?ñiÛJÌ¤éŠ Žô·Î±¯‰Ò%§¤+Ž pñýïê=Ú02á=o !“®…-‰NØ ží2_Ûš,l|%ÕvW”v¨q$M1‘]–OmÍöèÂg®eÝ/Ý»ÈÔß1x±]Ô'ÎÝíÎ<± úa’'0x{&¿µx¯ùí©wÏ.o†l¬AÁ +Øο>Ú²Ê.ÔZlvp‡k³g¤…æ[FMIÁ‹£÷0ê¹³ÕvœøæhPKò´ ûäx´!vyÚ³×eœï?uúfK¿ŠÈ+>ªX'·[ò&&ÇŒÈSm"~Ê\mŸ$¯ GÊ-ˆýJo%ÛÞêdyž†õJ-»Û¼`~DÒ]FB´§Aäû¹xx²Ãò`}fZ%±ÆÈr™6³Á‡å_Êf
+í&2PƒóuíIŸ[^|uÊàïíŽl«0x¦ŸøpÙ(ÈÅ%mé…ÆÃð½/¯ ±sqØo
+ŠÉËQfþNÒúðÄCzòÛgêg_åD6ºq¸I“ª¸ÊFØ2Ëv­Ö¦™˜¤Pé¿g¦Uu䂱~Õ#ÉUz$¼
+ÇHÄ•vËÕ$«x-‘–ß™š¦#{eöòÓ`ÐhšDŸâ°º ë«×^9ÁB0¤ñ뫽‡í»˜m×ÖÜ¢Ò ¯-‘+ÖŒ!ÇBPŸÕvî¦è ·?§¡ºƒ¼E^$‡ý…’*O*n˜.—Çw2wÏ5N¨°xNÂø,†éõG#ËÕ€ª“ŸêÅUOr3~\Å[kÒ¸! 9×0ϵ
+CÝ_‹{™éÉYŠúð["šgì2eàß$‹îy;Þ;Ú
+_ƒ ÃižòÆv==·%!Ãd2KVûBàùü€ÿ'
endobj
1364 0 obj <<
/Type /Font
@@ -13451,14 +13468,14 @@ endobj
/FirstChar 36
/LastChar 121
/Widths 2735 0 R
-/BaseFont /EYNFEW+NimbusSanL-Bold
+/BaseFont /CBGEIZ+NimbusSanL-Bold
/FontDescriptor 1362 0 R
>> endobj
1362 0 obj <<
/Ascent 722
/CapHeight 722
/Descent -217
-/FontName /EYNFEW+NimbusSanL-Bold
+/FontName /CBGEIZ+NimbusSanL-Bold
/ItalicAngle 0
/StemV 141
/XHeight 532
@@ -13482,7 +13499,7 @@ xÚízU\\kö%‚»înA‚»»;PHî®!x 8 îîîîîÁƒ<$ýý¿ÝÓ·{žæm~Sõp¾o­}ÖÞ{}ûœz)
U 1Kˆ9Pveá`e
„8
l)qøCÀùÏ$AÎ@‹×¦¼Øþî›âöùØ
-¶ü³%K7G6-0ÈÉ ('ù?Á¯ò¿0k +€‡“Ÿ
+¶ü³%K7G6-0ÈÉ ('ù?Á¯ò¿0k +€‡“Ÿ
qýñ$X8x8þÆiÚ€,ìÀ@—׳ø“‚-ÿ–R
l±­®¯SiælùOàÚÂÍÙùÕž?èõÞ¿öV ×@O òÊ"ÄB0Ô¶6´ý¡ZŒØƒe’«Wëî·97rŒ=ô7V˜^e»bîÜÛwŸ³$UÇl„+ `•`¡Ã㉥bø<ìøÅ;X°°Ã°`d#‰NYë„”P/駯Øûˆ¢ R¾Kx Ê^P”ÝéÑKL`i„CpHôœTà‰ÉÊò+TŽøñž‚ÏUdíýÕàçG:%Ùmƒ#RPä»géäõQOï±+:°LûÅÑxæÃe]k/͉õJø:'º8ŸlJÛ¬žªGóy乌טòQK6‡ Ñ+íLvþ˜ð‰Å16(ÎñkX„Éßš†+…¨pœº–QÄ´Ôß^î)RêÔ[W,,¨Þ‘õÉ»ãp%n×)iuGYÖǚπñZ¬Õˆv4¹›îµ:®uľõ­«GZýÖ:„<=Ÿ@‡ª˜yÝ—l:GBÎÚOAs½À:rÁUuiw™ª¨,w‘ʽVç±ÌwZ6ç]ºš½žWßÆe ͹„縤h£öÙ8âØYWÑtÔ¸c}ü5æ?°5&Jt”ùËÞ¨—OÉËÛòÁHÌîZ‚pr_‘\OœÅ±„4šß²~òIÝbâí‡y"ûÊ“¬4òŽZ¦¿;‚Àždz™RÑ t[^cíÆ=ðàæ÷Ÿ‘øÜÏ•ä =X}§^ÍóâÓÌ:Ë;}ß %[µ, ýÉЛ>µÞܱ^4AXç%ä#¬wÛ±W:eÅNã¥S¶SÈ“H f÷ÖϦŠKuP ·}.óF!Ö§•"k¯“/ågö«ÉФÁ
 ê2³Õ°"Ý ÝkÇÃñJ
@@ -13512,7 +13529,7 @@ g~nM"up^ÅÃÓíÓêè” ,{!5ÿ8¿UËn
Ðú‡ä9¬PjK¢!zóÙ!ñHaŸ´Þãïÿ¼£êOß,?€úVÐz¾’¢Œ¤ñ¸gTW-Š«XÑèƒðN¨PÊ94X}chAc~‡^ÅûI8Y½-°Ji ¾á.˜<®¯ÇIâšo,¦ÙNì¥#ÊͽÊûÊàùk¤lùnýh2³ÒþÝu<Aíâ$FŒþ¦ÏD!þ:ƒêj%FDõŠ‚QúPÀ„´èÖ#מbG¡³°ï\ùe%mËf›‘g'CÕ䦨 Ñ)Ê$‰‡x`A%*›H«¶#Ì'å;…p‘ûÚ9ß/iÔ¤N…ï#‰yàE×Óz˜8ƒÄÛ¼êpXe€N®Ñ †µ§r%ç˜û7¯¼Çé&ï`Foùª’׬ó›}tW™ë',4Ó‘õÊ™‘8‘À`Z*\-šðú[Ü‚JåÕ®{i!Ux„T û•ˆ¼‘‡ômÙ85û)îÛ¼e¢ý¾KµÔÌ;¨žè{ÜÈ¡¾è{´Ñe¼Žò»~!–±l˜×R¡^n`žTG?ÂŽÎCMž—û[©s¬ ;ZWÀá¤ì`±3iSw-iUÉCW
ÚVâ>xj„E‹ŒwêIo³}‚üH—ã
Örú ãkÑnT‚e¿S< ¢x K»«- 1…‹54ËÆa«÷-ÕÜ@ÚUóªîÐsL/}8ÀѶ›Ñl¡ò‰ó9È+ß©O¹È¨qD‹£RKˆ7hëÀûÚë,l³Ž[‹x³#‹³ÆÒ4
-¶ÿÚ®½–ZJS•ñ~´õÓp+S!¨yWC6Æjy.Lä“X5­ ^g˜Â£˜ýÿòƒüÿþŸ°°š9»BÌœí}œ.®ç?þ€‡ü¿
+¶ÿÚ®½–ZJS•ñ~´õÓp+S!¨yWC6Æjy.Lä“X5­ ^g˜Â£˜ýÿòƒüÿþŸ°°š9»BÌœí}œ.®ç?þ€‡ü¿
endobj
1361 0 obj <<
/Type /Font
@@ -13521,14 +13538,14 @@ endobj
/FirstChar 2
/LastChar 151
/Widths 2736 0 R
-/BaseFont /SHLYSS+NimbusSanL-Regu
+/BaseFont /MNZWGF+NimbusSanL-Regu
/FontDescriptor 1359 0 R
>> endobj
1359 0 obj <<
/Ascent 712
/CapHeight 712
/Descent -213
-/FontName /SHLYSS+NimbusSanL-Regu
+/FontName /MNZWGF+NimbusSanL-Regu
/ItalicAngle 0
/StemV 85
/XHeight 523
@@ -13544,50 +13561,57 @@ endobj
/Length1 1624
/Length2 9769
/Length3 532
-/Length 10633
+/Length 10632
/Filter /FlateDecode
>>
stream
-xÚíveP\í–.î xÒ¸Kã.ÁÝ
-T!æ®.*PGe¶7P{K5s{ààÅ £“rƒ`¨£4è-Ò`
-bH©©(¨ÊåTu
-…=»0þϺÌþïkò¿¡Åÿ–ÿ[Úû¿kî¿öè¿\âÿí}þWjYW{{UÃó
-PüÙ3€?‹æ+øÿ²9@ì=ÿ«UÔÿé²Å` çrH:Z?·„ ÈÅÎù·â" ñ
- Ÿv==noŸIÐßÈËKÄD­ÔŸf1ù'ALа™°y¾ù}ï4(Y— ôUrüBpSû
-Äâog;ðµ[¬;QŠˆŒ¯Ûwîó=Ö¯ ¼`ó­¼W¯åçL¾q3>ÅW‡èS{àVýd‹&ï•Ï<—ÏÔ=7D|Ãý ¬ZTô0èÿ”¨ŸÇUÓ©äó{š±Ý®$&“vÙ|G~ðy›VØ\™+
-Í1ÆŒCïÈ`"&¿g!¦¬¢5ºvIN§¶L/òëñ‰S£MÀËTpÛ.KŒ…¾þÚÒN‰µ§gCèÆåa€hFظ´GôÆJ#Ô8VZõ»tHÉÚ8Eq”B×…‰¢uæI-?msÙrP™–v)Ú·Ð4v<Š½úš×t¯(æôuƒœ;0®¬RºkIãcŠg‹euÁ–'¨'QÉn§·º>š‰A«Ãö?‚¥/ö‹ìÞÖ¼¶VO­l\š6óšƒó345Åškni­P1 ‡Úž¯g~zysJ´ ¤–æOWñ² H“-À !º “rá<”LyáD—Fo•€ݲçÞbùÂKê[H±3JÊüògŠpcêÖZÂÍឨª¸’Þ ¤íoÕKŠU¢s›Ñ—¸IßíÔá5½0ßç
-’Q(øf´ÕÆv» Îîócqà25•:Hø8™ïd‘_¡Ý’ö¿ˆd¯,Š!*éïÈ?ºf›]æU
-cíÙÐââD<%d)‘Y€­äû#TG™z‡7[¦3BV‡•Dßµi%³M‘›á
-ê»WosDVhHd¯ãå¿~òôÛ¦¿üíKýت@Î5¤Š¼
-—±wOhW]k(òW¬õëÞÝÞX!Þ]?sÀ&yh7v¡¹×Ÿ˜‰á<Ä$½AÍŸBŒí8»©ÒÍ%ýDûÝIÃ%®¢x!EÐ:¸ çB«eVc^*mÔOþBÁs :òµˆVžÍ<Šfs=Q‹•]Ò8mÊ~)„Ò…ß<òY§ó‘˜
-„í€ÎÑ—ð€\&.Mý˜ØÝ»ôÚ¦„é¼¥&lÕ,,8Õº£Qr…™ª&¼œÞ3ô'6ZÝm¿Ä÷ošý—>tÚ{º*¶]¯dh•Þ
-Pâf1|Ô݇çå;Úd{$ƒ×FêY̖ѤÁÚL›¼.g“J{Ä!Æ@ýM1¬û~k÷Ë˪s'1ú㑽ټbÒZRåMýž… •j—Z;Õ¬N>ÈS÷Õ$Úº/”Oï~|EÐ1†± fñiå·tKÈkâ%UÓâ,“ä@ÆreÝá$„H­‘ç„+mäOʦêmÁ0¸0W IôLÛÐ븫™ÜÔ0¤÷ÕíE(Ÿµ¶¨ì,:wQØé¾¼¿]ÚD¨Ô3Îz²œÖ¯æQæ\
-Œ¡Žb¤I÷ûz¢è4ñ
-×Å>zÙ/=Ü›m an¬3m WÎ…ªKd;8±¹Ž“ ~ÛÖzåXkNëþ5 ,±u«°<F‚ƒÀÓðíGqOZù²ÙØc9•xrL¿d'Ë«Áv»;»n}C|×`-Õ‡U\ïñŠÆLÿìHíbô°²ƒ‹¢c¶¦¸xsñi«GB72û¼âW`c컦éÇp¤˜RMÆ…´4)äTIrûŸcÈ‘¢¦]ç|QG®««{y-CøMózã±(™ho'>Äž“ ,'8Ь›áµßaÀ¤Ò]ˆc·_e–K¤ÓdS~z˜Àl2 Sù´©ëÓ 4•nThS(²loŸ®´fSYSÀ:¢{e„©–lÇâ¡éÍýˆîõ†ž–‡<H¿sºñ½UÙ§:ø°¾"¥q~I ÌM ±¾»-§âB2³clJ[/ Ü¥SN|<Thk©?áDÍ)ÂÓ}™+„|(“e]ß<ñ0iu+Ö%nϳUÎzÿãS‰#yă]weÂdêk <÷ìö›_ò¿ñZ: U¢–ႦyfÝN݇ŽT:Ó@ƒøYš‡—{ÝŸ—ÚBèÙ~³Mc
-Z­:•¾LçlçDUr"´2Uú…癉{JÖvEãÖã¦Çõ ûDÃD„…ÔOŠ9ÄÎX\ç.–6 ÝŽôþÝ äüR8¹’ð½c
-ôõ¸¥)•3Øß{•ÈñªwÏ·¼ƒ‘Ïþ»õ’ÑzÏ“ ¬e†?Ó³:›Šãír s èÓáæ- º«¹¾0Ó§±ÙÙa^Êä„òˆ7ÜU·FCòðbŠj }ﻺd.·#BWhô¼œŠYÅetäPÓœ®çí#+¥—C™Ó%ºÒ6&‰ Cn°Ñ|;)oòÕovf*#J‡ŽÃ'´f„D‰HÖd?¢PµUbê9&ó ªüJÎ)Œ6kù6jħء"’džmC–(#©™$cŠ“ecPµ«—¢}c0‰õÕ$ÎÏujeF¶Šä \ÛÏ—ùÂc×*ý
-ýîë£ôS­G$7ZB‹• ·µ§ç´’%ëêDŠ!¦¤+Ž¨P^à' à
-^+êÃP[Fñ­KrùÔÑôÕp‚ªà/—ÀËtH0Nòëù¯òñm‹”siÐüLcie:®”^¯ áS;Sõ/ôªÑ™
-ÖûJ!x;ïRÛÍ.É«™Œ”©$CBu%’`’X¥Ç„¾hvü<LµÁiµbÊIï1ãìC ¤éDely‘r÷y‹F¹k`ÊU]®TÜ}#§Ún%<DôÐ?<N”ý£}œ+‚þõ ‘ó÷°»ûGèë´Kªp®Fe­þF±R[¦þ#C·t ´A<·ƒ´¢ =3Ëï—^h£á%C-Y*½ô"ÑÞ¥±ú¢ò;ãˆÀÉvX9ÍØÖ!¿Ü$ží—½qbÕš9y3ˆ7±s0”ÈiH&zqÜ?·ï)òŠ ÛX§y÷áœ5‡æ‹?ÌD@üw‹CG¿æ@…€?¥òëÕÔT¾- º Š»¸¬_T+ÉùÈH)=åV„ñbcg„¶&Ä“œ 7HÞ¢…_B4YÕ)¿â·ô­:ªßöÈ6”4øÐ-˜¿vÕUvMGk?0vï¦F4Ñ—‚ÃrLóÍw¦¤&˜hƒªØ R²X" NÞ­Pe&YLʱÖǼðˆ#I¸YžU¢ºŠpHz3\'ÇêZ:‡òd~QF…vy°*ößÿ0åRˆ¸äM ¥Ôµ¨v6 Á­ÞBý…æªBmp9%u±ÏnŠ<yc&ä@³×ÞuŸ¬%%Ðñö—'þý S”ÅbÄÉм„p´`ÁD夘æÕx÷­^Ã;„‚é­}¯‘˜>¸íW*‹]M½.¹$'戄M…y¸"X˜Ûèù(0ªu¶v ˜ëù1{¦/›[ Wղ󜯷å9þ&¶ÌiS>÷O\Ô÷¶M…Q}füFJå „÷áÅ¢puÑ5);B&çëÎT¼ 5°ñÈiþ±nе`[/qsÙÑqµßt¶xªÀ€Ê ¦y¹ÒÚšI§.צó2 î4¦ì°¸á¼µžlߟe¼|ëtÝ07l[oÙ·QåÈ¡óãÅk¤k¸ÌfývUî]h$]¦Y5\œ¾iNBy›…vÊ G²…tæI¹­:¡Ê)j§7½Í¬ØË2ñ'‹ÐÏ%ŠxOÃì4ïÓðÜ!ÍŽ‚d÷l¬Ñâ&ÜÎÌNÐ CT$Î,?oªr•À¨›oš0¾N‡ø^áŒ)~ù€ò'S²ˆ\ѯúÞ\j—`ÚõEú1·lñKp?JÆÈŸ›È:¯ÊötãWÍlöBÍßň.䋈OÕ¢5‰Ä«¥º5̲ùÁL4r·ýÁÔŠßL lƒ“T¸ï1wùFWÃÅ(¤û×pcö§Xè¾p,ÌØG ­JÁÐfûÜUM©9›îtzÌC#4Ýy?à|ÿöù‹¨S§‘¤a˜ŽåÊ
-£4+@bÂ_`±:Þï¯dÞÎ8/ë†xcJ œ†I™žëµv°¶‰!ÞOðˆVñúajB³Ð÷r‚&óF¦ìô0Iî3ë/6°÷¥ñ,y0&¹>jxSñú_7úXêáõóä~„ÁÂD§°BsëN¢·p4 ñzãöRe©ŠÈΧD7áG÷ˆ!©K²b‚Ú} RŒŠê|v¨]£¿HšR¿z«]åjdmÎN|ïÌ$ Ž>¸¬êš&Q4ÑV%_øv0:ÐÀäÐÎ>¹¤5Çà“ŒŒ}ŸU;™ ìŽc9”_=¾1õŒWŽá©ƒ¥™¡›ŠJŸÚèÍÚ Æüæw@üøš'þ–º#Fñ”9'$Û IÙ€drÍ݉aáuY†M¡tsj&Kz§XU€]ü‡õê4¨Øûà&„Ûàø¸u>J",ÚÈB…÷U»•næ;$l„˜Š'Ãxh‹Ž^#A
-vi´×®Ø®(OÁή<'ð&öç¶Åý·ßã¾4câ¤é¯èD;ˆÒ$#¶ïCü^¸(÷´À{KÅš·JPw1®;‚744Ú·Î7FŒæêÒÔáðêÈ$šWFÕïæ„ÄXâ×á2xÏ×™²°.ÚYØqø 2?Ç C©K%>  ¡—:€KÄò Ï›\׌I6ìúex“s/°±}zsÜn‘¸%=Ði–‘ð:[ë·^aQ”Šd0¡D1šØLA€LÃäq“¾qö»Úþnˆ „ZIDd”¨ù†èª1RXHVtà˜4ãkÐû ‘ú´÷ÅQßÉÌKè¬(FOªü˜#P#ÎBÇ›ŒU"Ëìë¼D>êE›ëþšÎ"A­’gAˆÏÍy:–ËÚê^ÔMdm&rSî Àoda.”í)½&ž˜Q6`¬0ÏôLÐîÀZº ›vdãÂZÈ‹ä%1üå-cÒ¹žâ÷=SÉ4B*Ç‘Lä/Žý¤ßwʪíú5J›úŠ›Ýñ J£¤Ž.ÖGînvr^ä¾3ï`Uººž µ@…6.Ì”$4}ßÂba7ÌÛ™Æà¬4 ž%ó÷7Þã,Î[Òüë$' <t0¶ä‘ˆŒŠ×BNuíéD&qgµ¯9Xû÷÷ÖŒE¬l&«ùÛL_SòŒÆƒ./ýJ=‰Å~êó5Éá}|;s~àÔš†­óÓÑ]+VÔB|~†óZT»æçq4ŠÖØ"ûeÖ¤s'm¼Ù`룿õÅPh7¾ Y‘>!H«“oà~d™øóóiÁM†*æ0‡Ä/öR¼M\”ÔÖ:š^_•¿áS‡[~èžÚXò/Pûq ú×U­;“_UWÆ,Ù8*ݬ±¼–C·§·ôÝQj¸ø¢ò°|šœùa£dHÖ4ã}
-Ä8ü.)>³"äŒãÇë]°¤ºÜˆÁœ,:x3­RÑù{J]J¬åôMÐÖm7
-\§mG‹ŒDO¬äI<3Œúó§´°_«6Ï<k…TÞ+"tª.¼ïyÈa´…ž ’Žâï*…æ|)!®M2heùÜÒâ¢Hxþëýs8Þ8(ÿêfÖ]zvf“Œ4…Lëáç¶;q
-R`«å¾V®xÙ0*¡{òeñ Á5®a±ß*[‡àñ3ûo»(´–°ùJ1NÙ‰
-žØ=å1žâX™eïÉÇ©Õä¤<\½Ú'N•4­4Eíe6)Ý(î8pùß{½ÙÏI8*ï¡Ý2ŸKÚ>£<ô ù’iVªøÙf ý9÷“Tâj¤¥]†ôBøÓõöa"unáQaÝ,«v”FÝÑûÃ)'Ñ£»æ[¤$ëêj€ÞFuÙ¡>dò–M×~Ÿõ½Bœ–™k½®èMƒGµ
-‰ÃG”0µé éØЀBBV…BZ_Âë /m9Lú‚ßkˆÏ–œ2}Â) :ª2}2jUd^=èΨoDÒœ6š_›ÊXÒÞÜêÚÐÓx¢šÌnM¢Á+ª[ÍäŽî$9Jœ )o¥ÇH÷“q\£³œ‡_žÝÛg
-,^?yŽÁI×Ïú\³ì'´A›C4îs_çj%Râ„*ßã£3ëúµ|”²Œ$ßÔ•¦9yóY½7-áB”[—^çÎv5u$®MžÚE¢ˆârBvŒt2jLArôvCÒìzAŸON¿_ä‡t©Ï°Ò‹šâ=Êíµ"ËŸÞÜîár–ý%*<#ö¡îˆ¼'!éJ Y^GjŽÞ`¢!’+”¸yx,å„èò1ý=,ö@Pí€*þÈÛ
-ÓL=M{*ä)qÒ(iI"\ÄuSý6[þËÕ¨±Ób¦eˆ UγÔnºÅÂÑB4:èuDé…$“dtevö0¸¸ÑéÕÑg¶³¼¥NN2îƒi@6´š<-Ótfù·@Èjã¬Í׸>Ïš/|YMV©Mù¯Ta"cw,\†êÔþõÞ*˜÷Ý~U¢Ò’Žr{^ý­·U™”ã6ÄÕÉ©ÞE\5$¥fX²A…aíÁr³>zgé¹Ù¬u=ñ¦Ó=_ˆíÙHÏ@ÚãË]Ý»žmD©IŸ<¬æ—©J¦kw˜ã¤Ç:½—ƒÚ•ÊŠµŽè8ÕmT)-‡9Y¡¾:ä–Ç!øŒk£YwŸ=âd|æêDÇ.±hìÍä4Îb¹Ô2:HH3buì•fïMwKµ®õ-ãY^
-é2£äª.WÁP¸kSÞI!ÜʨÔ
-#çtûui˜"Çî½ÝSk·×éS?€+xû)dQ d‘uä+Û!f.D¬Ö».œ©’u0ôU0â±6$5‹¢&&ãæÛ±¯AÙfsDŒ)d?Óܧâ¢Òæ8LmGpÛŸxºË6ÇiÇ(¾7<t§êõ·óRÏ
-/$]näû?J$ÔÛÞmö!’Ÿ&ð²P‘c§e“[v$Â)+»NNçérÖuÓ_®…Í@+²H¶_÷÷»Rfžhãs“^Bj˜wrˆ€[‡–íª%ñuƒ4Ü»Fì«¡lñ,Ö±JL¹ì¦Ç2áÂͨŒñ}WŸ$î'`47‡vP]à¶Ápì í°iô]ˆ0W
-El‹RŸKRÁ—&ù$JSü4Ÿ–F…×Á™Ù®8·`ðLïÀå "i½ihDÈG4¼K»ÙT2þD§Œ­©ž}s<µÇHzÊ<WÓèÃÖÖf¼TãI½ÔqßrPµSTn\´ Ž?3 p¡àNØþdÀ¡=Ž³-7J>4Ú[Pšyj­È|ý¹ñöàxÊ;/8{!£…gÇœ³"ÐóØ‚öW6¦¹ÀÞJb%°`ˆ&»x`w{A¯šlvŒ‹‚RRí–[Û`U)(—A1ܹ—“waræ4ëÀÙ`Vm§²ý¾9§¬ü–éå¢I—ÆfU}s)O5<Ž¡ì
-Š–Õ¦IsÉ­|³±jã¸yª7Ÿœ7‰a ²CTx»+ß¹ÓÀUF\÷
-/qZƒ(ï¿UbfG\}Â)¶jo
-iRŸ*"ß‘Ö_Hþ¬2X³EDµFÞo[]ù¼ æP.×ÀC³JOQ1pߊ× ?NU3öŽº¿N‡JHÓN»›ºVk4rDQ¬á×›GO–ËOœrJòíp@rw;tzjgùZ¶ Ô là/^eœY{è§F¤‡Äåì}»ªßØ“äVEP»ãÊ„‚i"û‚o6%‡•‹ýšý¡Ì-”fÛ¹òœiekAö8UË“ç–¯69ï¿Ë'AÚøg¿.:»œÈnéñb
-¬œ6¥á7Â…Ç*WÅDA‘  djjn{3=˜³ntœ.a°ÀxDúKw1 HPÅÚI§wò;áŠS$-íG²$ñþÀí%RѵìÜäi
-½T/>V‡™»EºãÁ¦–ÓjÐAúî²ðÙȯ  –Q^^ŒŒMJŸ9Ö¹X
-?âf,œÿ4“áÈE’3i‚è;++ÞˆÛ—p°tl1/JŒBnbbÛ ÁÚ¥¬*<½Lc¿üA‚ú éjô G…»
+xÚíveP\í–.î xÒ¸»;ww4t5Æ5¸Á=×àÜÝ‚»k°>äûî™3uîüš9¿nÝ]Õ»ö»žµž¥ïª¦£ÒÐf“A-ÀrPG;§0@ â`áê¢
+uTa{µ©[ØC
+ÈÉú¬áðŒ=“i@]`.–Î'àÙ«†ŒÜßqÂl€°?¾] Ï0
+ÃÕâhýÏXÎ`k 3ÈìâòLóÌý§:ÿÌð_²:9Ù{þe ýKë?c€À\ÀöVì\ÜÏ>-aϾ­!Ž†EÑÑ
+
+àâü[ruúævþ«@Œf†é9 êhï
+ktòó* íþ)áëB¥æ÷•!ìµcÂMž3‡NÛJÌ;/íÚ“À'¹¾4Lyø+ô-,;¦…Ø©GúÑÞ§ßUÖŒø9õv6F4µL îQ(ÇZxœÑN¯™hÜòi¯œpü,“¿Æ}ë…{Qõùðˆ>aÿúŠ¡g°¿¯·ý¹s›œ%+NÄ ›>*à]¹„‘n©w­¸ìà0>¦I‚Ôõ’7¶_„›üë%^ÍœKüÉâWöIñ‘ë¨âx&CêŒm
+ä¿àh×ñ€F3>ÒaáÓ®GÀÇíí3IúYbɘ¨•šâÓ,&ÿ$ˆ)66ï7¿ï†%ër¾Ê_îoj_Yüíl§¾v‹w'J‘ñwÛàÎ}¾ÇÁú„l±•÷êµÂœé7ƧøêjܪŸl±Óä½
+™ç
+™zçFˆoxDÔŠ
+’ÆýŸ ò¸K`º•ü~O3¶Û•Äd2.›ïÈ"oÓª›+sÅ¡9&˜qèLÄä÷,Ä”U´Æ—ÀÃâÂ.©éÔ–ÉâEƒ€"~ j´ xÙ
+ÛrɱÐ×_[Ú)±£öô-bݸ= ñÍ —öˆÞXi†šÄʨ}— )Y§(ŽRìº0U²Î<©¨m.[*ÓÖ)EûšÆŽG±W_óâšîÅœ^sÆ•U*âCw-ib|Lñl±œt‚z•ìqz«ç£©•´:lÿ#Xæb¿ÈîmÍ«akÔÊÆ¥is¯Iq8?#33¬YÁ±æ–Ö
+U£p¨íùz槗÷7§DË\Ô2éª^ €4¹œ¢Ë0i΃@©”NtiôV øÑ-{î- ^ÒßúCŠQRæ—?S„›P·Öh ÷DUÅ•ôm| m«QR¬Û|Œ¾ÄCún§¯yè…Å>p>7ðÝÀoì#O!ÿë˜V©Ã¥ ÉBMb˹ ëgj„“ñ¹ü·]Ìį?y¿ZìtpKqtŸáçí¨84Îd‹Syþ¾¬Ÿtv­´‰ß®U—^òȧò ²®4-íÌ’ÏŸDáYÜ›wöjt¿Âî}Ä{µóÉŸü^9ƒ›‚'¦Ežbõè>ÝL»âï¹8j¯(¸¿Ò10#·ŸÞy¨”¯_Q˜qÊýªRM­¶#_ì<Ð'Þ:^ìö³¾#ý½¨¡&QZz±ÆÓnš
+0L_ÅÈ™a攣×w¾js¾ƒ¯kc‰ÓoÌòAoÔH”¾•Ým<ìè·WpÔ Ç>£E/óMæ¨
+¢Ãü)Ä‘‹™”!‚¬QMžZVçü£ÅÙ?f t˯f'+jÉ 2& Ÿí¬1~»3Ù]*¦eæPˆÁÃ
+´(®×áú7¾õu³°XDsÎФ-ßæ ‚ä< ]¤UO_CÑ÷ßC}Þ„©Õ7ã«$³$~©T)*üſתŒ?p3Q©}ÇéÉ“h†Ì ?‡'²½KµƒgòëÎA¸t,´ïG—½Æ2ÕqJv¶"ùÄÓ/$zÀ¨Âo>Óxùå„?æe“`µl˜&eo^äkbMšn«Ä6-ý…ù.Ìúo$KÅž =_Í@Ÿq¿úܳ}ïð¾) î†QZ}GN޾Ȁ"Ÿ× k¾Åš{7&H¢ñ©5ÞbTü®ãÔw6”ˆø×g¬F¼×ØNF´b¸ú ¢L¥p1–Eñ‹
+[=@{TÌÏ à¹ä„á£úVBØW
+e?«ïÀï9Ìüï†LßÓ;Rñ÷†yá ZEåÍ´% ¢ ÕÚeªÄ&Ù—dwàšÂ#ºŸ1X*Bè$XË5Qt*Ñ"ŽNÙ²”äÞÆx©º…”éÙ)Ÿà7,5Í<²wážÿð€¿($ò/ öý²ÉG
+©^0?J¹Þ%S0F½¹a[A3ª_NáÒŸ5VÿBÏ~
+þm!u‚±Ý.óû<¥X¸L-åÀ£~Næ;9äWh·¤ý/"Ù+‹bˆJú;ò®Ùf—ùMØÅÆ©ƒ’™Š”µÔ›ãÂYO±"X{6´¸8ÑO YÊd–`+…þµQ¦ÞáÍ–éŒÕae±ÁwmÚÉlSäæøFBîÕÛ‘GšR™Áëxù¯Ÿ<ýö‡é/ûR#¶*w ©"/@€P+JcÞ‹¯_¨L$¿mìS ©—áV瘛hòÈüÀÊ[†;{Øå\I±Ú>k¸ŸÍ6ò®LèWhÊÛ§d¨n%ôÛB%ÎK÷7­8äÇ© )ˆ¹S‘£ª/OjÛœSNÕ[7’•ªq®÷ç„ñ'Æ °88<ÉŽê Æóß>q`™“a Î*($}RÚTžPÐio £·f›oa?ÖxXž“`gôß%î;P»®ùÜ°R>)5Ë5)ÀÚPoX`¢ø`*7…ÛÄ»'´«®5ùÇ+Öúuïno¬ﮟ9`Ó<´»ÐÜëOÌÄpâ’ÞÀæO!&vœÝTéR~býî¤á’ŠWQ|Œ\!EÐ:¸ çB«eV>*EÔOþÂÁs º
+µ‚ˆVžÍ¼Jæs=Q‹•]28m*~)„2…ß<òY§ó‘˜
+D츜£/3à¹LÜZ‚(1±»wéµM ÓyKMØjY,XpjuG£äŠ3UMx9½gèOl´zÛ~‰ïß4û/}è´÷tUj»^É0Ô.½¤ÄÍ6fø¨·ÏÇ´ÉöH¯ƒÔ³˜-«Eƒµ™6y]Î(.öˆCŒú›
+þbXïýÖî——UçN âô7&#ú³yź)¤µ¤*›= A+Õ/µwªY|§î«Itô^¨œÞýøŠ kc!@Ìâ×Îoé–TÐÂKª¦ÅY&ÉŒåʹÃI
+“Z#ω,VÚ(œ”MÕÛ‚apa®šR虶¡#ÖqW3¹©aþHï«Û‹P>koQÙYvÓ}y»´7ˆP%¤o&Ê5ëÉFpJX¿šG™sÈè’ºñÑ Ìã‹AøÖzŽcøáC ô5slì‹vRuÆê=|aOLÙ!ePÇyL­Ÿ< ïíïaàŠ)æ¥:K,…_îãþ+t2†:Šu’&½ïë‰ÚxÀCÒÄüTœîS$°#géDèxúl+ÍãÌÍqä]‡çÏsº÷=5¸Ù³˜–ŸÎÕ{À¥pYqBx;µ Dj/YØ—ý–3¿¯&„¬¥d±ìTâ”qÙ+W{|°[TNôƒñ—SÿP¶§Äh™ïE?ÐC–Êt#½l
+Ëc$9h
+XGô.£Œ1Õ“MáX<´¼¢y¢ѽâ ÞÃÐÓò™wN7¾·ªûTÂW¤ .Î/ Dxh!Öw·%ãTÜHævŒMië„»t*‰‡Šm-õ'œ¨²Exz/s…‘e³Œ£ë›'>À&­.`Å:¡Äíy¶*9Âï¼s*q$x°ë®L˜L}ÍÏ3û„ýÆæ—Âo¼–N#Õ¨åc¸ „iÞY·S÷¡#ÕÎt@
+æ@à§ÃÍ[tW a¦Oc³%r"|”É åoxªn‡8àÅ•Ô6úÞwuÉ^ oG„$®Ðè{9³IÈêÊ£¦9]ÏÛ/FVÊ,‡2§Kv¥mLA†Ü`£ùvÒÞä«ß>ìÌTF”‡OhÏ‹#¬É}D¡j«Ä>ÔwLæEUý•œSm×òm Õ˜_©C=D4É"Û†,QVJ;2IÖ 'ËÆ°jW?EçÆpë«iœŸëÔÊ(ŒlÉ—km?\æ ]«ü+ô»¯òOõRÑÜhImV‚ÜÖvÞžÓJ–¬«i†˜’®ü9~.Åò?AEWðZQ†ú2Šo]’˧Ž¦¯F$PEy¸>¦ëD’à€q’_Ï•o[¤KƒægK+Óq¥õ{MÁŸÚyª¡WÎT°ÞW
+ÛÚy—ÚnvI]Íd¤L%úk(““¬Àj@bÙñó0µ§ÕŠ)'ýÇŒ³Rf•±åE*Ýç-å®}€)W ùR Wôœj»•ð±Cÿð81fôêôq®úø×'DÎßÃîÓ.©Â¹U´ûÅKmM™úŒÜÒ¹d¬âyd”„è™Y~¿ôÊ@=/jÉR½è¥ö.5SØGäšl‡e‘ÓŒm
+ÈOâÙ~Ù'V«™S0‡xÓ™8C‰œ†d£Çýsûž"¯¸±]¸ê´î>œ³æÐ|ñ‡™
+Jünqèèרô§Ty½šƒÊ¿¥I·Aq—õá‹Z%9?)¥§üŠp¢#^lÌáŒðÖ„„I’³ÑÉ!´ðKˆ«åWü–¾UÇCÛ¹†’º‹×®z*®éhíç&îÝÔˆ¦ÒpXNƒéÁc¾ù."”ôÃmPU›AJÒàäÝ
+Uf’å¤<k}Ì 8’„›åy1eª«‡¤7óÈu’p¬®¥s(OeTh—{ÀbÿýßS.…ˆKÞ”PJ=ËjgóÜê-Ô_h®*!Ô†—óXÒûìfÈ“7æÂ4{í]ùÉÚÒ‚oyâߟ0EY.Fœ ÍKŠô@ LUOŠi^w/Üê7¼C(˜ÞÚ÷‰éƒÛ~õ¨ºØØÕÔë’K‚qbHØÔX˜‡+…Ù¹=€ž£Zgk·„¹ž³gú²¹ÕpW-;ÏùzƒÎñ7°eO›âðy~⢾ï´m*Œê30V.o ¼/ƒ«ëŒF¨±L¡Ø65<_w¦âchĨGN Œ}tƒ®ÛzIXÈŽ«‡ü¦³ÅƒP†P^è2Õ(È—ÖÖL:u¹6—qéÍq‘Æ”7œ·Ö“íû“¢Œ—oŽ£å†më/û6ª9r~¼xtM—ÙlЮƳ ¤Ë4¯†‹30ËI(o³ÔIäÈ@¶Ô„Î<©´U'T9Eí”㦷™{²ÿ|Ð\¢ˆ÷4ÊNó> ÏÒê(HvÏÆ-nÂíÌìä`Þ0DEâÌ
+ð¥ªT Žºù&¡‰àëvHìÅÎø—â—¨|2#‹ÈûjàÍ­~ v ]_¤sË–¸÷£dLý¶‰¬óªl?@7~ÕìÁf/Ôý]ŒéB¾ˆúT-êS“H¾Zª[Ã,›ìÁD#wÛL­øÍ”PÀ68I…ûs—t5\œB¦Ïq G)fŠ…î ÇÂŒ}”ðª4,m¶Ï]ÍŒš£±éŽ@·Ç"4BËý˜ïÎ÷oŸ¿ˆ9uK…é‚V¨‹Q2dY’㇠•oÐXë\\ÁT7ôéL§ æ“Å=„«ßKì»×…ãåÞB^¼ïñ:e:ºûA¾ºÖˆ…Ø×%YäÜ´évJ÷\«æØYûùJV},6>Þšv½øÈÏi÷°6™’^¸OøM–!kÚ^Ù»<l‚'ƒvØCÜZ{óâË!3’î‚UDpì廚ŽgŒ}ÞLªzî…’b_V©ò-DÔ7™h~úÐcÅn»aV¼þŠäãôî´­Ô8Të/Añ^»»£öQÁ*I9ŒëMö|±s£[CËÈP¿Üù†«Ëeõ+tÐÍ ^‹$¾qobC!,cˆqÕÇ_ÎÌuMÔÌß`ÒÔ0Ù˜ú¦BÃညàŸJ}!éGs19lÏñ»Ö—³˜ZéGÓ*HËH"$o—¿Ub-;¶e;žÑœôGé?Õ¥AÉP§ãè}/¸½B °}¬<‰6Çz«ë=ƒS`ü¤4#\žÀÁhRoÜ;½¡ó”sTocíLÀä¤MøX÷ÓÃQ‰
+½å>V·.—
+ÒÜîªQè]‹*ðåVäIw8¶ñÂi›M‰œÌ¿$a| ÙòȱV¼ó i×6\…¼“Dýð¹¢\ý£¡J©ÔK•¹¡áXl¥ÝöVƒoÓÞ$âbÌegž#ñò¢ïF’pÌ ¯Úè‰Ñ^rÅ
+¥›S+YÊ;Ūìâ?¬_§IÅ>Ø7!ÒÇÏ£ûQ
+aÑF"$²¯Ö­|3ß!i#ÌT<ÆK[tô p;w»Ô.Š[°
+ £M~Ñg<ÇÿšâNÜ~¬Š$’
+œ\7±?·-ï¿ý÷¥“ MEo,ÖA„&±}â÷ÂE¥§Þ[:Ö¢•P’º‹qݼ¡©Ù¾u¾1b’0W—¦‡WG&Ù¼2ª¡t7· ,Îĸ—Áw¾Î”…uÑÎŽÕý9f8xºH]*ùY=ŤÔ\">_xÞä¾dB²a×/Ë—œ{íÓ›ã¾p‹Ä#åN³Œ„„×ÙZ¿5ð
+‹¢T4ƒ %ŠÑÔfj ÂÅ4L7¹ág¿«“qàïÖÈ@¨DDF‰šO`„®vÓ(…dE^€É0Þ±½ß­O{_õÌ¢„Îú‡Rô¤ê quâat¼ÉXe²Ì¾ÎKä£^´¹î¯é,’Ôªy–„ø<œ§c9\`9[B½‹º‰¬ÍDªc£ø,̅ò=åÃÄ3ª"&‚Œ™ž :XKdÓNBl|ÂX y‘|$F¿¼EcL;×Sü¾g*›EHç8’‰¾óűŸôûNYµ]¿FiS_q³;¾‚AiœôÂÑÅúÈÝÃNÞ‹Üwæ¬J¯@Ï“¡–ËG±M· 3% ÍÀ·°XÄ óv¦18+M“wÉâý÷8K‡ó–ŒÀ:ÉÉ/Œ-y$"£âµ°S]{:‘)EÜYíkN
+Ä¢ƒ7Ó*e¿§Ô¥Ä‚¦o‚¶n»éPà:m;Zd%«xc¥Nâ™aÔŸ?¥=€ýZuxçY+¤ó^¡Supã}ÏC£Õ,ô\r”xW)<çK qm’E+Ëç‘‘DÂó_ïŸÃñÆ@V7³îÒ³3›”a¤)dÚ?·Ý‰@xäÄÀc”´Ï0̓ºÏó"óâ½û™µrJóòZ˜JÅ›=2Ónñgkù"áz@éóa⵬å½µ?ÝæöP¤!}•-ҾфýG¨ÈVËs­Rñ²aTRïäËâ‚k\Ãb¿U¶.ÁãgößvQ¼h-aó•âœrfAÞ€ÊUÁèDZ$ù('€»¯LM£/hj¸ÒRöâfòg ¶ËŽ§ÝÞ»'ûêºn ³XÍw‡W×6>y~ëF—Æ”§üŽÓúÝ—HÒN•Ûë{Bk}ÒLþo†ô&‰¨¶ßgÎ~Á¼Ù„¨;¥rÁΑ½‚ãi?:±{Êc<ű26ÏÞSˆS¯ÉIy¸z/´Oœ*kYi‰ÙË6lRºQÜqà
+8¾÷z³ž“pTÞC»e1—´}FyèAò%Ó¼&Té³ ÌPæsî'éÄÕH]†ÌBøÓõöa"unáQaÝ,«N”:FÝÑû£i'Ñ£1»Ö[¤$ëêj€þFuÙ¡dò–MÏ~Ÿõ½bœ¶¹k½žØMƒGµ*‰ÃG”0õé ™ØЀBBVÅBZ_Âë /y LæBÀkˆß–œ2}Â)<ª2{2nUb^=èΗx¨oDÒš6ž_›ÊXÒÙÜêÚÐ×x¢–ÌnM¢É'¦WÍäŽî$ 9Jœ )o¥ÇH—ð“ q\£ÍÃ/Ïîí3
+†µËÏú蟥çf³ÖõÄ›M÷|!¶g#=êŒ.wtCìz¶u¥'}ò°˜_¦*›­PtÜaŽw’ëöR\v^ èTª(Õ:¢_ àT·Q¥´æd…úê’ƒŽCð×F³î>{ÄÉúÌÕ‰&Ž]bÑØ›Ë+jžÅýr¨gt2fÄêÚ+ÏÞ›í–j_€âY^
+ë1£äª .WÁPxjSÞI#Üʪ֊ çtûuiš!Çî½ÝSo·×íÓ8€+zqõSÈ¡,È!ë*T¶CÌ]ˆX­9v]&8S/¤ê`諺aÄcmHê–ELL.&Í·c_ƒ²ÍçˆSÈ<:~¦¹OÅ;E¥5Íq˜ÙŽà¶?ñv— nŽÓŽQ|oyèNÕïo磞YHºÜÈ÷”L¨·½ÛìC$?Màc¡"ÇN7ÎâbLnÙq:
+§¬ì:9§ËY×ûM¹6­È"Ù~ÝßïJ™uz¢ƒÏCz ©aÞÉ!âÚª8µs¨•<Ä× Òð쳯†²Å³XcÄ*3å²›Ëj†Gˆ4£j2Æ÷Q@\}’Tyž¸¢i¼á8t‚ê·ý†ó`gh‡M£ïBD¸ëÙ›0Âp^*•-ºkjÚ·Z»æãÜd¨ ÅüîÇ&n»$q‡˜,[ijK„½½­%¡“îe6eS. âú˜ˆfÄ®ý>e¾î–â ¹¶« ŠØ£>;–¢‚/MòI”¡øi1-ƒ
+¯‹3ÿ²]inÁàÞËDÒ>{ÓЈ dx—v³©lò9 ‰N‰+¶¦zöÍñÔ#é)ó\M£[s@Z›ÉR'õRÇ}ËAÕNQ¹IuÒ.8þÌÀˆ‚;a?ú“‡ö8ζÜ8ùx ÐxoAy橵"wðõçÆÛƒã)ï¼àì…ŒÞ Ί@ÌcKÚ_Ù¼Z‚{+ˆ•\£\hr‹v·ñjÉæǸ((%Õn¹ð· V•BòÃ{9y¦gN°œ fµv*Ûï›s**o™^þ(Ú‘r)`lV3°ð‘öTÇãèή hYmš´0”ÚÊ÷8K¯6ù€›§vóÉy“Æ 7D倷»ò§1 \eÌ}¯ø§5ˆòþ[%fvÄÕ'œbÛ©ö¦&©"ò­ƒõ4ìË*Ã5[Dô`1käý¶Õ•Ï ê`•rM<4{áôUC÷­øwݲðãT5cï¨ûët©„U0í ¶»©kµG#G”Ä~}±yôd¹üÄI!ß©¬ÐGÀEîn‡NOí¬PË$‰šÍµÃ‡WgÞú©é!q@¥{ß®ê7ö$¹UÔî¸ò¡Pšè¾Ð›ÍA©a•bg¿fD(s ¥ùv®gZÙZP€=NÕòä9èÕ&çýw…$H›Àì×Eg—ó¹-}>LÁ•Ó¦4üF¸pâX•*À¢„ƒ0¸LM­+ª[‹Àãco®OóbÖŽÓ% Hé.. Ê X;éôN~'R‘`&‹¤­óH–$Ѹ½¤[*¶–›< ZG„‹m8Blà ‚`•‰
+& ùf¾±<£>W†2<퀔ã*õˆ¦¸ïÞºÑbï)£(]|Ͳ7.ÅBêOo_™íí—I>Ĺ=à[väÍ$ø¸ºBÎk[œ y¸;ª$Ô¶VÔ¶¨ì+Qý †$·fø‰AÙu­õ€•ô퇚|ÄS)¬ß©ãb
+ÞëÇáØ(>§"´Ô?"¸ÔvÂj“øÓ‹©OïDkº§«wèKêfhÔu­ÐàÕ–®L~vsÜLðw~ùŽø›f÷ÀGY¯y²™)¿ÓbOú©ogɺeÁ]ñ¡—êÅÇêá0 ·H—c<ØÔrZ :ÁÀ]>Ùã‚!ååÅÈؤüð¹‘c›€ù«ð#®QÆÂùOsYŽ\$yÓ&ˆ³±Ò„} ÏK÷ØÈó¢ä(ä&&¶¬SÊŠ¡ÊÛË4öË(d®NÏpT¸ #;®±õæü_>ÿŸàÿ K{0Ðu
endobj
1321 0 obj <<
/Type /Font
@@ -13596,14 +13620,14 @@ endobj
/FirstChar 35
/LastChar 122
/Widths 2737 0 R
-/BaseFont /PTTGXS+NimbusMonL-BoldObli
+/BaseFont /MCRCVV+NimbusMonL-BoldObli
/FontDescriptor 1319 0 R
>> endobj
1319 0 obj <<
/Ascent 624
/CapHeight 552
/Descent -126
-/FontName /PTTGXS+NimbusMonL-BoldObli
+/FontName /MCRCVV+NimbusMonL-BoldObli
/ItalicAngle -12
/StemV 103
/XHeight 439
@@ -13628,7 +13652,7 @@ xÚíteT\ë–mpw÷‚àÜÝÝ-@€
www4Xp×àNp×à®yœs»ûö¸¯u÷¯7^±kìo͵撹öGC©¦É"nî`
’q°‡°°³²
-˜Î K ³¹-ÈÅåæû¯éü³OÀêèèhëùw´Ãß^ÿQâ²µ`EfçxËiyËm ¶GþðײÈÛ[8
+˜Î K ³¹-ÈÅåæû¯éü³OÀêèèhëùw´Ãß^ÿQâ²µ`EfçxËiyËm ¶GþðײÈÛ[8
Œ»C]ø¶ti ÓRß÷ Ý…X«´m¼L»AŒJÑ2uc¼Ïf•ÖaõyØtv7GÕ5ŒJžáÉÆÛ8ÏîÞ»àRß:¢û™¥×Åãµc6¼Ãþöåè˜6ùàî–®oxp ¿ó®{‡„)7‰FÐ 6:À)—DT_»Â;’iºv—"®;)ˆmq*ó‚?˜1û5_ÝN[ë’ǯ=×ç³"/LIê}Ä£›k¼¶lBñ«¨¯¾-š|oRkÜó&[Þ&±ÝñreéòDQnßô?ª[K79Ð7/Ù/–_!ýmÛÑŸ ·¥Ê“žHÕ]Çy÷A8­\¼ÙŸ.¶h¬æèú†ô“­Bj£­Öè®{ŽúÈ£÷ öÖt=¿ !æ¢DÚ–¶bO„t8&óïû·ù#¿-L.Ii§¼µ\’îžhRºª® xïN
®°V
(Š0¢™PÁ´i—µ…½g` äÒWDWN=%&j c6–K…Á×M囑êæ>vEÂëÁ|Ž¹Eʯ#«îu€U•ý9å™x¼.­dávÈ!ý:8ò¾€Ù€;pñJ#WT ¢Âª^Ûà'áHðmAFr4”,=gK3M¨Ì(R
@@ -13660,7 +13684,7 @@ L„³”%$6$n”%  I1YÈcó³:Áì/÷HÅ
uÎÂüÕÏÍ{1T¨—t+jªNìpC4ç@ÖîÅfÙä:)0ýôðt<P‹b¥7ŠÔÒ·š‚ù(23¬õÙMö+&c Ól.^85^Z£ Luü‰
ê
EªÊqÓëTéCòâ¯yÇõ•+«ûv©FZpÇZòU1ì´‚îâD¨4ùÓ£Bªg9Œ¤ÁÆ{¾Púé™S›vÑ$ ‡¾\ñxllË5çÍiéõ$éTlFÚ—}GÈØf<ü È -ü%ë2bh{açògôCÿ£ÜïW{e1¯éF¾'GŠ)Æa.¨³BG=(”ˆüªCÞÛjHk_×iêPtkºé7ïze›¶ý“tå9¬)U1M¯ž6¾¬ 4*k?¦‘<ꮢ±²àN|×P’.n¹||£ÜU+¶3F”MhÆœ ¡¦9Ÿ?hHû›ç—nr Þ-ä0±Å‡ÝÖà’U·¢PA7ÄÜFwæ°'ŽÁìÓÖ‘–º@çPú)B²àFpéœ=ç(®é…àÎÂL„N·Í-þÄYØÒ.ŽF¹ÏîÀ1­ÇN4.ì—{œH¶/ªB¥0¿N­æ%@»&ZëÑ»BhÙœæ¹áí„WèºÑ$Kí[Êit9œßë;*ø¢FÜíƒPk—×xøOyŒüøŠ¼ÂÛ/¯OwÙóp»B"6àl:ˆ›ŠÕ‚U‘eP
-Ç^; áµ³†˜¸ÔÕñXðÞŸÀ»b’¨®k€*G/·O3(|ýhÉ›ÐÅØ%§Yæ6ÈËM‘~OŽ¿Æñÿü ½}»—%Kƒï¦|º9W¼ø+[Xìè¤P˸—úòbhê~ƒÐT¥:J‹ìÛÔ
+Ç^; áµ³†˜¸ÔÕñXðÞŸÀ»b’¨®k€*G/·O3(|ýhÉ›ÐÅØ%§Yæ6ÈËM‘~OŽ¿Æñÿü ½}»—%Kƒï¦|º9W¼ø+[Xìè¤P˸—úòbhê~ƒÐT¥:J‹ìÛÔ
endobj
1313 0 obj <<
/Type /Font
@@ -13669,14 +13693,14 @@ endobj
/FirstChar 34
/LastChar 122
/Widths 2738 0 R
-/BaseFont /XZHWIU+NimbusMonL-ReguObli
+/BaseFont /AOETMX+NimbusMonL-ReguObli
/FontDescriptor 1311 0 R
>> endobj
1311 0 obj <<
/Ascent 625
/CapHeight 557
/Descent -147
-/FontName /XZHWIU+NimbusMonL-ReguObli
+/FontName /AOETMX+NimbusMonL-ReguObli
/ItalicAngle -12
/StemV 43
/XHeight 426
@@ -13696,7 +13720,7 @@ endobj
/Filter /FlateDecode
>>
stream
-xÚ¬µc”¦ÍÒ%\¶»Ì»ªË¶mÛ¶m]¶­.vÙ¶mÛ¶ñõsÎ̼³Î7¿fÞ×ZWFDîØ;2“„P^‰FÀØÎÐDÔÎÖ™†–ž kacèâ$cg+M#hgm økd!!r41p¶°³6p6ᨙ„MŒ
+xÚ¬µc”¦ÍÒ%\¶»Ì»ªË¶mÛ¶m]¶­.vÙ¶mÛ¶ñõsÎ̼³Î7¿fÞ×ZWFDîØ;2“„P^‰FÀØÎÐDÔÎÖ™†–ž kacèâ$cg+M#hgm økd!!r41p¶°³6p6ᨙ„MŒ
Ú¹¼h˜™
ÿß­tþFÄÖÈÎøŸ)Qr6°5þ;XÿËðÛÈÅÑñ¯žÿ:ë þŸë¸‰‰»‰Ìê’W°eZfºs FîЄ°V_èPˆ}I½rQ•]·_Ú¯Ž
ýêÚ†)ίVÅ3ûÏIÊÑtk²î“«|\ŸŸ½È›¤ílT‡tº%ðéçjQ^× ÒÛ`š¬ôª‡»
@@ -13756,7 +13780,7 @@ Z®ËoÛ4ëŠ*s³°ütg†©NeÔú#‡ßìF¹¤¹K¸]C•f/ZЪ}¿@ôFêbM̼¦K´ØËJ®?L›^ëåɼo¬àÜ^Såõš¾q
VÍ]êAy³XH±ÔŒèyÒLåýkoù"-Õ6_XŸs(GÕjØwOÎÃIÕÕ\‘›"NÚGvB<dÎ2æUøõÇͨa'nœ"dáõj›K†·…éÀaµ*»Üz^YCOs´’âUerÕ3“®©¿*̶^qèåSømÄ“—´¿Ìm+V#.MïäîuS³°¢º ½7Rz·Ú•DÊ£{ót§UYEzØ”Qù-t²y˜’…[ O[UÜW¨‡³!¨ï5ý ¹yK=n¸±u».5®°Rë¡fð¨,¸V2›è>ÓˆŽ…¤Yô·ØfàÄØ(ßÁx‰!´à‰%žM>¯Z)
å"UØð;z¯Ãg«Ô«¼L’"¤Ú-Û‚ Ÿ‚xwÒ×~ e]bþL‚¸=V›Ïóð¨-ÁÅû”Cª³;ÓÖoä®Í ¨ÐÒ&CdÊÜÞ<_}9Ížsßú–M©’£ê˜Eä‡S+ø{ðåÅ1Kg¥V£2¾ÒÁ5«È–­eéýê õÏŠ½SÅöÁ…®ÙK¼TùГ®°zc†\wír,Ö™yÆTôfDÇãF^±–ýtÚ|¶«w]’ÂйP
¿,:Fp\îŽr|0`Ï!ÛÍéy¾.Nïè^(%×½ñ>Ü0Ø]^ÒC ‘$®Çž5~<ðrpÊÃz>ŠPãuÍx{¿šècAÊûß·™ÍZÆ~œe·9^|Ø™ª´:öÛ9½0 *ÿ}ôõW'¼D>½³}=à -zžûcêÈ^‡õsa`ÔúþçBº&¿¯ÈÀ}Ü–#üÝ×õ,¶…ð€5nXœ`KÃ|Úªup´ëqª£¦Ws•³Fþ»‰ûë»ÕnË·+1§!NqM;Ú¦”+1Åôä@2Z œXÞ%ÉŠû:bj
-XãÙS9´½ AÄŠ›˜ì \¿j‹Gq‘ñ YÔ4Ûûª2x"…þ€¦Æ">5IåñOù¼Ðù)þþbZòZj÷Ö›ŒEŒ×©8Œ†–BY‡tç÷]Ü þ×™¢Ë€9£ýd%ut o¥tÃØ_‹Òs¼#Žp9Ä RsˆNóÊ Aα›‘my_êB[öéNU9Wɶ¿~›ê?
+XãÙS9´½ AÄŠ›˜ì \¿j‹Gq‘ñ YÔ4Ûûª2x"…þ€¦Æ">5IåñOù¼Ðù)þþbZòZj÷Ö›ŒEŒ×©8Œ†–BY‡tç÷]Ü þ×™¢Ë€9£ýd%ut o¥tÃØ_‹Òs¼#Žp9Ä RsˆNóÊ Aα›‘my_êB[öéNU9Wɶ¿~›ê?
endobj
1238 0 obj <<
/Type /Font
@@ -13765,14 +13789,14 @@ endobj
/FirstChar 34
/LastChar 125
/Widths 2739 0 R
-/BaseFont /QCARHR+NimbusMonL-Bold
+/BaseFont /AXOYUR+NimbusMonL-Bold
/FontDescriptor 1236 0 R
>> endobj
1236 0 obj <<
/Ascent 624
/CapHeight 552
/Descent -126
-/FontName /QCARHR+NimbusMonL-Bold
+/FontName /AXOYUR+NimbusMonL-Bold
/ItalicAngle 0
/StemV 101
/XHeight 439
@@ -13793,7 +13817,7 @@ endobj
>>
stream
xÚ¬·ctåßÖ&›£’Û¶mWœT²cÛ¶m§bÛ¶]±*¶­[ÿsºûíqnß/}ß{Œßšxæ3ç3×c“)ªÐ ÛþŠÛÚ8Ñ1Ñ3räÍ­:;ÊÙÚÈÒ)Mlpdd"@C's[QC' 7@h ˜™L\\\pd
-ŠšRò
+ŠšRò
üªm{|ÓÂv¸* Þk‚駹?ÛÜ—Ní>ö¥©F{1­(zR€—ùøÞ$T}¨›ä4 z%ˆégQžW‹²ÛZìŒê»“JÊzÅïPߧ;X`®ž¨üH\
üÐIí|ŒRëc1:QA¾Õžž‘'?=R Ž õÜ@öíãÑäÄÂ’ñ¸@ ’GúÙçà h©Ux†SA¥7!àÝ´_}jt{êå‘‘â’FX˾*šæ¯Ù´Ë¾'A¦· ð&Ê9H¶îWþÀ¼žŸŽäJœæšËýZw&sÄâmŸ
쿵$ œÉ„®'~
@@ -13874,7 +13898,7 @@ i¿5xÑ@>,Ïu> w?tiÓ¶0ûôIÏä#%(ù‰ö
^hâŒð·¹ œ£“hZ™Í/øÅ_à7œÀ+P¸¸&&êåî$+Nȶp®Ô ~I(–»c¹ÚŸYªÓÅg¶%ø¥p%ö>­’H¾iL¿\ÚõÐß(¦µâ_«8Cƒ—R{‹
Žµrð¦ëØíû‹0Ê{‡˜ÊQê¸2‰«Zœa‰ƒ†*7Äc¹äJî„I›ÏüìÒ]©æÁ 1=Š¡å©òñS€MX¡¥GMøªéþP¢‹:*½ÙOT9†ÜD¨*ÀzÞÃ*Úž“¬ÿ°Ë_hg
‚œ«ê9ŸjˆŠ"J7Þ®(ðhT(ìâ ª¦¼ÜðÊ™§Ä‹V¬áÝq
-oò]ç }£¯9B‘7õ· öœH{È­’ëæi`T&éVÇãs"¹‡‡ªÃßÛçVMo¼iá÷׈â{C„^×;¿_g¿`,·÷þ2 Ún“ R ɫǶ]ÅjÍuib°ƒãÏV!QÏÆ>²¦aO<ö”ñOÁxƒªH²$áófe°§Åû›ê¥úКxÇÑiêÅà>ò$­–Ìy"-Ú-ŵ ôý‰¤Ëq ¸ŠÖˆÕ"™[Ø m¥cA¸¶¹"t8Q+PK¥ìó÷Ñ”¶ëÛãh_“ ®$+ƒº‡¼S¾ÎúÜþµ$áØ™éezv~7EhÅZÞ‚¥ÓªãHÝåûm®Ý‘(ãŸÄ"Þïòwnúê›»ÉÕ”^«¦
+oò]ç }£¯9B‘7õ· öœH{È­’ëæi`T&éVÇãs"¹‡‡ªÃßÛçVMo¼iá÷׈â{C„^×;¿_g¿`,·÷þ2 Ún“ R ɫǶ]ÅjÍuib°ƒãÏV!QÏÆ>²¦aO<ö”ñOÁxƒªH²$áófe°§Åû›ê¥úКxÇÑiêÅà>ò$­–Ìy"-Ú-ŵ ôý‰¤Ëq ¸ŠÖˆÕ"™[Ø m¥cA¸¶¹"t8Q+PK¥ìó÷Ñ”¶ëÛãh_“ ®$+ƒº‡¼S¾ÎúÜþµ$áØ™éezv~7EhÅZÞ‚¥ÓªãHÝåûm®Ý‘(ãŸÄ"Þïòwnúê›»ÉÕ”^«¦
endobj
1218 0 obj <<
/Type /Font
@@ -13883,14 +13907,14 @@ endobj
/FirstChar 33
/LastChar 125
/Widths 2740 0 R
-/BaseFont /VJKFYL+NimbusMonL-Regu
+/BaseFont /SQDHVH+NimbusMonL-Regu
/FontDescriptor 1216 0 R
>> endobj
1216 0 obj <<
/Ascent 625
/CapHeight 557
/Descent -147
-/FontName /VJKFYL+NimbusMonL-Regu
+/FontName /SQDHVH+NimbusMonL-Regu
/ItalicAngle 0
/StemV 41
/XHeight 426
@@ -13910,7 +13934,7 @@ endobj
/Filter /FlateDecode
>>
stream
-xÚ¬ºct¤]·.Ûv*I§cul'[£b§bÛ¶mÛ¶­Ží¤cwý¼ï·÷>cŸóëœý£jÜk^s^×Zë5FQ’)ª0›Ø%ìlA ,ŒÌ<
+xÚ¬ºct¤]·.Ûv*I§cul'[£b§bÛ¶mÛ¶­Ží¤cwý¼ï·÷>cŸóëœý£jÜk^s^×Zë5FQ’)ª0›Ø%ìlA ,ŒÌ<
šþô­¯œtGLz¥ÈéQž7K²;P?8˜Õö¦””õJ>`ˆg:Yánžiü(\
ü°¾<Ù£ø§6Äbw¡5aÔž_|M<}~¢î½…î?$¤Ë‰…§äuBþéçC(øC­B¼ªùÕi{Ju ¡glŸÏÏìC(»ƒ¢ÈbÓËZÁçjð§fÌÁpC@¶
¦éÂú”/é„ÐaF)¹ìÉT_Äü AÇDF@’_²– z¿IÂ>^"ò“£œŸpÖj×Ñm¡HNZ¬¹Šù—;Ão{ô«OŠ—©š}¾ŽÈïqM gÀÁõ@‰Î
@@ -13984,7 +14008,7 @@ K› ÀöYt^¬evQ&57Ñ„t9Æ©‘;ØQLV2²ûËI2­U^¹¨%Ô~ŸŒ×ˆzW
p
íSß»bò7+֘ߠáænÍwˆ'£#µE°nx‹¢PšL~|ö4KQ¦–!¯jn£ÕªîØãVBGE”}œœ Žý­Ð{ƒéV³”Vã0¾ô.¶Tv‚Ì|` °SU[¸U!&ýø7 >hI£YÉì0…òÇ*껪¦úݳj€í¨ž¨ß`Ù?8sGx9g3ÎîèñÙt÷:n:—SúluHx‹œ›ÍÉPo·«ÃJAüÕh€ß¾ÅW'ˆÃô´B ¶q…¡Jˆ`“ý kaæ®´bg>–MO”¶æB8uk—ÄþÙ7)Çê®Ü¿5GVQ(ë¿P­m-FG*åTA¸¡WK2z)· Ž×?3Ì›QOl
-¹ƒ%ÔÕÝÙêjýn…âendstream
+¹ƒ%ÔÕÝÙêjýÀâendstream
endobj
1161 0 obj <<
/Type /Font
@@ -13993,14 +14017,14 @@ endobj
/FirstChar 2
/LastChar 151
/Widths 2741 0 R
-/BaseFont /IRCWTN+URWPalladioL-Ital
+/BaseFont /APNYSM+URWPalladioL-Ital
/FontDescriptor 1159 0 R
>> endobj
1159 0 obj <<
/Ascent 722
/CapHeight 693
/Descent -261
-/FontName /IRCWTN+URWPalladioL-Ital
+/FontName /APNYSM+URWPalladioL-Ital
/ItalicAngle -9.5
/StemV 78
/XHeight 482
@@ -14025,7 +14049,7 @@ xÚ¬¹eTœm“-Œ»kðÆÝ‚{pw×Æ¥qwwwBpwwwwn‚÷/Ïûž™9kÎùu¾ùÕ÷U»jW]µë®^½š’TI•QÄÌÁÄ\ÒÁÄÈ
R
ššÛ»˜Ó,œ¶ÿ>
üfîajîøÄ
-hjcÿOó9ÿ ™Û›ý÷úÿÊô¯ê™UDE%Ôéÿ½Ê¨jûw¾ Y¹¸ÿ¡ôw@jžŽæ€ÿ•NSÞÁì?ÿð‰Š:x
+hjcÿOó9ÿ ™Û›ý÷úÿÊô¯ê™U4´t$¥èÿ½Ê¨jûw¾ Y¹¸ÿ¡ôw@jžŽæ€ÿ•NSÞÁì?ÿð‰Š:x
2¶7û;nÿiø6uuvþ«ò¿6ÀßëÿÇù_ƒonîanŠ°¾â`Êb‘ ªÃÍ™×èc… u,mT+* ¨qèõψØå­4z« ejšáûh÷\>s|?üFw4Ö‡cKÝ›f~ùЗœ¶¿ý'U'7ýQ³A)ræ¹fŒ÷Õ’Ü”‹ÆÑÞ”²ŠAÉ ÑL'»3ÜÕ#m
‰ªV¶ý^]n?É÷oŠ üÐìæÇÕQÿÑŠ´Këñ¯0AÙ¬ŒÚ#Ûõ½ü¶Sz_“Ò¶Âæ°Â¯£Z¬4¦×âÚpj~¿H]c}jÇyŒ{ì|yz0Òä$·‘×ù³›'È úKåWµ0wïèåóä»÷ ¦¤†®ßëÓôäNg@«ÔËfR~7øX3X¯§º<†ž‡:;D݇Y‹’‡±ÇƲ ¾qv"©Î.嶱8Á[Ö†¸gÛyŽ
‡Ø
@@ -14079,7 +14103,7 @@ T S!õ\¶ZãÒJ)¡#¢:sÌæÀŽ_îR·è¢#Ô¦Bò
êOqÚô¡9U¤ $Ö=6Ððü|Hò‹°s%nS,{¨üˆ&õÊ’—8$²cå’6¿p[Žx7íj£\k@?®ð¶ "Ü<4s=3Ña½BÚ_Z¼–âç0h^×IÓ¡gÀDFÌû"O,v}V%t ïæûüH¦¼¯¸Êi¹ò¢Œ
Vº<3ÿiúü`+zв±ƒõ¤âBy¿e5m¨á^[ÄyaS©aŠ€()ÞŸíÆÜ=7w3ÔV³Md& ðÑÈå’½Teöä´þe¢QŽh¬õ äØîαÿ”øg´>»6¹”¼g´(>\PóÔkºßo†‘vÝ8‹¥‡HZR¯±˜(rÔs•Ì7R¶s×»LíªøŠæüz!ÁÈ U[–Õ²69§QŽƒ.[¿’6çÏhüS—Wse®÷±dßbfïyîI‡dÁFbNþ%ÕgÔÆGœ¢,bœrü(šÙÂ%+'‹ Òl£g"îuªrC`Wro¦1€5ÇCÈ…çpû¶šÍÄ]sG¹ÑOnäàrqœìZI=…M}…)äCQÊ~ ê!µŸ¾Dz9·%eÞ!­û©ÆÁ”,Ý,>׿¿âb‰lGûrs RøV0' uV·ƒÔ) É ²;^%!#úㆹå"à÷È“µ‚i4Í p#Öo·¤_Œä%±!¥Óæ`…(`¢ix¸ü={Pìr {[£3þÝɶ*\ÔvµvÈÆe~0{zŠJ"É®Ñc
µÄÀ‹í_~ …U¢÷íýwõœÅ6o¸JÚè¨OÊÿ7E®Õ?ÿm]~»úàD¾?œñŽ¹,à¾$ôƒc2‹™‹ãé¸æß‹M|&ìšp{³×Ó\Ì «e •Œ¤·Æý:®s”CrªÞr±[G^…_x[´?ÒØæå'®Öܬž ¥Škv5‰GlŸ뽺>QÄè5ó†…¼~šÒÙŽÝ  ÙvnÂ|*ÑÐaòÝ¥ÉÿÞ^á=tønÚÖ•_ÎïxPðdòùCß•b­RæwWbgÖJ?~årοþC¬[BýädƯ{ñ h§úÍwÓ‰Ï'}2~Ñ]Ø6å°âÙŒ9û ²&ÜÔîNÖñûö¡î±`luî‹)G2O=ßùEßCùä”Õùù[
-¹ÓÏ™wŸ˜sìÇÆâ@•»¯M·åöMXvºóEÿÿu9~Û¤k²¹¶…ê¼ ª?yÉg“º”òÌÜ{ç;OÛ«YŸ$3iÕæ#ÛÏn•8²oväóŽ7¯ã}ËÏëÕýÜá?÷þ¹ësÿ„æÕäÈ©Ù÷pö.Õ`¹fýO©a›K<­ÛNîêè=|ˆuÖïD©â¹µßýÝ^Ú(šDªM?T¹CÂxÝ;)ñ´g¥ÙENÓ/Û¾}õ%×ÊÛJ®Q†…É9©‰E%ù¹‰EÙ\
+¹ÓÏ™wŸ˜sìÇÆâ@•»¯M·åöMXvºóEÿÿu9~Û¤k²¹¶…ê¼ ª?yÉg“º”òÌÜ{ç;OÛ«YŸ$3iÕæ#ÛÏn•8²oväóŽ7¯ã}ËÏëÕýÜá?÷þ¹ësÿ„æÕäÈ©Ù÷pö.Õ`¹fýO©a›K<­ÛNîêè=|ˆuÖïD©â¹µßýÝ^Ú(šDªM?T¹CÂxÝ;)ñ´g¥ÙENÓ/Û¾}õ%×ÊÛJ®Q†…É9©‰E%ù¹‰EÙ\
endobj
1026 0 obj <<
/Type /Font
@@ -14088,14 +14112,14 @@ endobj
/FirstChar 35
/LastChar 90
/Widths 2742 0 R
-/BaseFont /SNBBEU+URWPalladioL-Roma-Slant_167
+/BaseFont /RVXZFG+URWPalladioL-Roma-Slant_167
/FontDescriptor 1024 0 R
>> endobj
1024 0 obj <<
/Ascent 715
/CapHeight 680
/Descent -282
-/FontName /SNBBEU+URWPalladioL-Roma-Slant_167
+/FontName /RVXZFG+URWPalladioL-Roma-Slant_167
/ItalicAngle -9
/StemV 84
/XHeight 469
@@ -14111,20 +14135,20 @@ endobj
/Length1 862
/Length2 1251
/Length3 532
-/Length 1860
+/Length 1861
/Filter /FlateDecode
>>
stream
-xÚíUkTgnõJÀ+Å€€¸
-æ2%P4-wTP¤2$H20I0@¹,P ‚A…ÊE ÒJi½
-& X¹ê
-ºè±KîþÚ³3æ}žç{¿gž÷;ç33ñô!8²‘ ØŠ ¤Nn>A2
-ø“‰d2ˆ ±÷íWÀŠÍ>²6O P¨¶
-³p½ÝË>)$¯:¹"ö³s·¿ÿ€¤õ¢­RÝ«ÙìW›ÏcÇøPÏz™‹KG‹•WŽËñ¡
-ýÏYö'uÑËîé_N—è^¸’VTî—Om"öøà#Ódk^Y™2åáN|­4¤7¡Ï|³m{ïô¶¸6³lãйƹÁní–Þ',M7ÓzÏk¼¿ 9ð¸sëdm\Þõ¬‰[÷\™žx‘Kš¹‚ã 4 Í>Âp"
-+¯Ç–»*åQ}öüzô&éãTÓ³g­>åÒ™´XÃèßo†iâ癩eÏ|å¡…k2f\¸-Oº®$eÆïi4v5j{hÍ}¹¹ÍÊ]öQ0yÐzÕÅ‘ZƒöGû®S^«47—Å>/‡B jrŸD…W¿sn?>#†øEõ©ƒOKëåÚÝõz î®»½N™/
-µÜ;4Ò(n’+³²Zîñ1~xܦ£ûöžÒ‡ñ‚÷t ¾ýÊ+ —á¹¼ÒÈh<v-Œ¢e*뢙yà%suùZQ‰Å&QÉÅø±DzÿQ°êFgx_5žq8'–9ÉLÓË ¾š
-!üm94¡ÜÜ›=7âfp¢ŒûLéQg_]flB쵧%õ„DàPYR»rÍü ëÀÎC{ïSŒÃ㲎„™xjèz”Ë.Ûk'$Ô\×-”…ÌîЉМV*¦…­FÔ=3À5½[w8O~¨}©À{ääŽÕKIë·5ûØ÷§«÷ozyàYC?÷£ÐèÎú©_†çÍVSyÈúä—pïç7J¿üñ·¡ÒÉðõùWoʯʉ.„Ö‰Öþ›E¶TÅÑ“Êk•×Ç$ 7ìÍe$å-Êþ„ÓYlÿÒ<ß ?¨="Y—Uªš{êæSE aÐ]EÕÇôy”óÔe¼Â~²²ÔŸþ©ÏÞ_ã¨bÎ Çç¿œ$½Nì~®Q×*5*óeT¥LM—hµ¾Þê™Õ>ä1¨'›³²dPª×Hö6€4»Ýý†;œ9sç—Úµ¬÷U$FÛéx7:á,?ÔyòÓæݯ¸ùOiD§È‡‹øÄuþ÷T«TêSFaô{ò€Š1b]aÚù_Ýw*S’ç#¶ä]k¬Øu ÙìÓò€vlÃlÓËD Õ7™Už¦«‹ûJ*ƶábuÁÀ$ñö²·p}Â(5ñiQBCG¸çÀ\—$§!7!Ç]~9Šœù¸)ökµÑ)Ç÷D_uo€£ŒÚjnÿ=Õáh׺™;wáÔúBÙ˜«jU´fŸîN—²QÝÖ…Zöî–[£!CŽWµ$Aü6ÍŸd‡š@Â!ß¼tÍ› ‰ˆINzÀxwÁv}ÃuÙF{H¾?>¬iÿ˜ú`v«× íøT6Ý1¿é0S x}Î䇯£Ž¨Fü׆þÜ×¢¯ª«;rª³+Ù7ÖÕt®]šrZ9µqg{7áø®lGÌ}Ÿ3\OkôÏɵV'•Ç²;Bêmиƒ’ž˜lo^·`m`onç=òøàþßà¢vuC¨@h(î_uþIendstream
+xÚíUkTgnõJÀ+Õ€€¸T
+æ2¼%X4-@TPLuH&H20I0rY bQDƒ
+UQ ÒJi½
+ VÀh,, â@HøJ Iä8Ò”#–\ˆ
+pÃL~`ˆ\ª°G
+B°½`ÌÉÃÔÌæþ*©4’MµŸNé/<$“H5oˆ,Z¥„Q À¨|¦4~m.HT²™,K I%|†\$…èE${R_…¿D 8%_ !©žÆa¹`¦,¾i#$nÐÖm ®Ç›¹N“H"WnÒDÃ
+ña),ü3ìù~=ôw¸7†Cè;
+)¤Oà ŽÉDÔñŠ@ðñÆ~½šðoB¾
+Ea¹rúlbñ¿­…ld0¬†ù¸Îv„ï›™W±»4ñ³S׿ÿ€dõ¬©ÌÜiÙV•˜/$p©Ç‚EÊ¢þBã…ý:|”Áîs¾ï![ô¼}fо/GOÚž¹q¢$ì@2µžØÁÅkR3´s^z¬ègéb¶.øÚè@¯GïýfùÊÎÑåIM6Ç&æ¶Su=íÖ ÝCº»,¡už¶ì~1^Óý°uÙpURÞåÕü¡k·X¼Â?c…A¸Æ:b€ã c à>FãM“q—`r>{_}¸ú‘Ó—t×'zn‰z,#Ñ!þ÷«Ñ–ø{2 Ǿb[áꘗº¯ëÒ.IYÉꜛî{ŠŸ/iòÒ~$"÷xÎ:ÛWeßù`óÏå`ú+“å’âħ%PTAe®ÓúGq1ßÕ¬žØŒÏL ~Qqxëã¢u{Í"ÐvíÍN¿¬gÇ­‚Z,2(ª ãÚ*ñþ¾wЫ¥ýú†¢ûɲ÷lì¿ý*˜W‰ËdCþ/-2{{ö^Š¦X¹hÛhŽ+¾Üòœ5»d®â¤ÛbÅɳÉ©ôÛ»Àò+­mà]Ó`æöœDÖ0+cQ®èb
+Œ#'û”»7,ÔV/ê¨<ªÕuÙ8YÞ6ˆ[dpÖ–)wJ„G¬Ç³öerxAÁa_X$moÈKã±yOÌ殧¥‹‘£«–¦ „šw³öëŸõ yŒ(¹Öô³mEaé+4ðÙÚ5^c–Œ’£óM,’Ó|…vfS›øøîlqÜÈžc¿¹<Kêùcø»…'" ?ƻ߲@®nÌKê ´?X,~bdWûV;9;}ii‘±¸5¨6­Ù8çþŠçÎÖmïRœb’ìˆpæXزK´ç}­SRdfqÀRÊ‹¬ö¨¡¨œ–FåzGêÇœLpNç²Uë‡?´>WÒwhÕfŠ»Jÿmå&Áλ£›¿ÊÚò¤…i—ûQÔ?lÇÃÌÏcò&wôš÷šØÚ.Ý9ÜûùuêïeüíNÑpÌüü‹WuuD‚~Hûê oªa×½a㥲˪Ú+¾+´$ã5Êæ”#áEy¡g~0³5üó&·åõuÕ“é;{/¢¡›†ò铨ð±ÿ`©ïpYQ8ýSîÆ_“¨JáAÆÓ_‘^¥¶?µ¨Ö«‹C™åé#£'­ô¯–q4ßa÷,ÒNx¸3)sT@†ÏºÛ«Ö 'Nÿ®öiœ7jH÷± ÕùáÜ?´yôÓ†u/Åù÷ZħëzO0ñ©óÂo™f™Ì‡£é·t¼ÒbõñŒÓ¿­=nLß=»4ÿÎ¥ºÒµ[òX ÜÆ{´½ Æ럧º™¾É*ç¸Ìv*ìzq² `.ï-4t@R®,#ôÓùCŸžH©m‰átO´©rjsSr‚tçãÈY‹Â0½—M ¾°#þœ¢}çØTYË»þ÷=kvµÍ»qÞSs\;`šoÙeo{£Õ¿¸ßVÿ¢J°®ñZÿšÈ;Œ‹Vªi“åO/´Ûêy a[hÞ>Ë1¯©ˆsÎ>Þ`{ÁJ;‡yÙŽHBi8>º~ÿzo|Yp÷àH6‘_¿%3<ÅŸrþá븦¾ð¹1ý?w5Ú™ª«wnmÛšà2ѬN?bY¸º¹°m6ûë`×çÌ€#·'tV³ÓJ-‘5^hÒVUGBvˆE§V\0wggn©ð=òøàþßà¢vuC¨‘Ahî_EÖþ}endstream
endobj
964 0 obj <<
/Type /Font
@@ -14133,14 +14157,14 @@ endobj
/FirstChar 13
/LastChar 110
/Widths 2744 0 R
-/BaseFont /DMRGDF+CMSY10
+/BaseFont /SNYZAS+CMSY10
/FontDescriptor 962 0 R
>> endobj
962 0 obj <<
/Ascent 750
/CapHeight 683
/Descent -194
-/FontName /DMRGDF+CMSY10
+/FontName /SNYZAS+CMSY10
/ItalicAngle -14.035
/StemV 85
/XHeight 431
@@ -14164,7 +14188,7 @@ endobj
/Filter /FlateDecode
>>
stream
-xÚ¬ºc”¤]°%\]î²,Û¶mÛvuÙ¶mÛ¶»lW—mÛúú}ïܹ³î̯ùæG®õœˆ8;vÄ>'Öz2“„@^‰FÀØÎÐDÔÎÖ‰†–ž ¢¨&o`mm`la'M£hgc
+xÚ¬ºc”¤]°%\]î²,Û¶mÛvuÙ¶mÛ¶»lW—mÛúú}ïܹ³î̯ùæG®õœˆ8;vÄ>'Öz2“„@^‰FÀØÎÐDÔÎÖ‰†–ž ¢¨&o`mm`la'M£hgc
áàUûZ­RR Ž_&½þ’ÞŸfx¯%Ê3® ôEþsÈC®” ô“‘Bå0²TU’?…šÜ¡ˆhÍÒVùòýåm»T úÃ8Z§ä‚Û°ý ³:I?Ôöz"6›Èbœ^%
yá×h}×¹­Z  ypÓ‚u=jëé 3\xœa(74nŠïRýƒ&cx£aYKÜ¿‰~ػբÉI·XiêS¨“2ø ú›G²¨†lkÕ›$ñé³øI ñƒ<½*­;:̽¤PœT1]š«ÚowŽ0~,A¸ÕO˜Ó%/‡ìdccÅ÷‹k×{GKÌ‘›j™(+ÔBUÞD# ¡6ª:Mð%¿s¾†I¼;v #wïRUèB&%Ô øªÕ(cÊïZB™ª³/7í¿ '|8¾—}Z£6Ã*DLi´¯kâ'/rn¶èXÐ60µ!~Èaïގا*\Dxc(uè³?^NWù ±CVØñ Áá´ÅÚQ[´¬5üŠvȈ0Kïø^•vµÚ*V¦°cœ (p3“¸µMÖiÒ|#Óƒ}5ãByE¦Ç•yÖÌÞ¢º<^×<;>3ý
ÎÈ;V<g5j‡ùôIH›C„ÿæaTÓ€
@@ -14267,7 +14291,7 @@ PÔ3)lmŒ;œ¸—ü“5|—î”+ÀTÅv‰¼Ô_òF^›b QãLT?yÇ¥ðb²èewïA© !ÅdYò]mÝ ÏÈÍ[Ÿ
‡)Í1p’}l‹ÈÙ¤û¨¯šð1ônQ“Öü:”ƒ‘96êì(…+õƒ<“4Ã7Q|ÿF1°²¨üñ#\õl1ï,äÝ?7Âeì7®Œ½nØ<É„3ÄÓ›rhNBRòÂÑC
^[ÜÀ!ÄŠxMcOÝ—ÙPFt>l¿‹JF¢‡ßÂöð1’£†°åïxDÑv hÇÚ
¥åã—r¢fY—òU·zifÁUÆz*JfU¤ËÞ ½ ýä|ÿ:Ð(Pk<’¥WÝìo*Á]ö…gP³Šþ,ÚFjî¶%™;ɘ¹á9L9.DœÇǦÝ@sOµhòÚ³BãtÑsÒ~ˆ®›×)-ÉA
-ÇГöÞVMýͲ:“®³m›ÓWBÖþü/ùÁÿ ±©¡“‹½­¡“5Ìÿ
+ÇГöÞVMýͲ:“®³m›ÓWBÖþü/ùÁÿ ±©¡“‹½­¡“5Ìÿ
endobj
961 0 obj <<
/Type /Font
@@ -14276,14 +14300,14 @@ endobj
/FirstChar 2
/LastChar 216
/Widths 2745 0 R
-/BaseFont /EJFWLR+URWPalladioL-Roma
+/BaseFont /KNFIKS+URWPalladioL-Roma
/FontDescriptor 959 0 R
>> endobj
959 0 obj <<
/Ascent 715
/CapHeight 680
/Descent -282
-/FontName /EJFWLR+URWPalladioL-Roma
+/FontName /KNFIKS+URWPalladioL-Roma
/ItalicAngle 0
/StemV 84
/XHeight 469
@@ -14303,7 +14327,7 @@ endobj
/Filter /FlateDecode
>>
stream
-xÚ¬zcteß³mlÛN:¶“ŽmÛö‰mÛN:¶mÛ¶ŽÙq^ÿþWoÜ÷>½w?ì1öªª5kVÍZkœ3Æ&'VP¦4™Šìœé˜è¹‰T•Ô ml M,2tB
+xÚ¬zcteß³mlÛN:¶“ŽmÛö‰mÛN:¶mÛ¶ŽÙq^ÿþWoÜ÷>½w?ì1öªª5kVÍZkœ3Æ&'VP¦4™Šìœé˜è¹‰T•Ô ml M,2tB
Ѫ&ðëöÜ(ÞÃÇ‘œåRMyû©i¯MH>c¸¤bq›‹bgÜë㤸>· +Zµ‹¥{ü‹q=v¾ ­™«O¼—«Ñ)X!íÁ/$ä±)$§ÁØ^‘w?í¦‘ù]€§“X.2)§©Êer[¤ .©»¹™ ;þÄýI‰ŽBà A¦¸¯»àÐaÁôÞ®|û³ 5ï8sêÓ†
"ŸÍëã-ö .TÞ;”Ïè*Yp§«© ‹ÕÀKÀk" !œÑE¾[OžKA3æTv7‰.ѧü™"Ç S"V™bIÆ@Ζӧ
@@ -14406,7 +14430,7 @@ V‘<}6j]'»EVîhû‚}6¡ÝÀ6àÛ·o÷CfÀ¿ièﬕò1e·)(+‚§l¦…ãƒÖˆç\àíÈìk}/y»—ìǸoÕ
¥`M/\oõÛþJXSù6”¿ü'ŽOØLaà¨oÍZNõµáø÷P³¬æ#À«-’·^=èCp§“´ñ»wÓ^»±òž,àìÎ-3à rg‡lÖ:G>
‡û$Ëú*Ï[¾'е5Ø̽þ^¿‚@rG{XÎN3?Ü&Óvj½ìÖfl3O­ˆÐ¥\á" ÝJ)P\°7À«J&zgT‘š|†ñhÝh^r×X&âhŒç]CŠÒ÷ˆÂú%#ÅŸß’ïçUUÒÙ$ïRDäü¾Rk¤zwŒñ­ã—Z
UßD„j%‘{7¹’&LoÅLó´T0‰*
-Ë—ÌF+uå| ã_ìŽ'¬gk"¸qáD]²
+Ë—ÌF+uå| ã_ìŽ'¬gk"¸qáD]²
endobj
938 0 obj <<
/Type /Font
@@ -14415,14 +14439,14 @@ endobj
/FirstChar 2
/LastChar 151
/Widths 2746 0 R
-/BaseFont /FVCGIL+URWPalladioL-Bold
+/BaseFont /YHPRZJ+URWPalladioL-Bold
/FontDescriptor 936 0 R
>> endobj
936 0 obj <<
/Ascent 708
/CapHeight 672
/Descent -266
-/FontName /FVCGIL+URWPalladioL-Bold
+/FontName /YHPRZJ+URWPalladioL-Bold
/ItalicAngle 0
/StemV 123
/XHeight 471
@@ -14498,7 +14522,7 @@ endobj
/Type /Pages
/Count 6
/Parent 2748 0 R
-/Kids [1652 0 R 1657 0 R 1661 0 R 1665 0 R 1672 0 R 1676 0 R]
+/Kids [1652 0 R 1657 0 R 1661 0 R 1665 0 R 1671 0 R 1676 0 R]
>> endobj
1686 0 obj <<
/Type /Pages
@@ -14506,35 +14530,35 @@ endobj
/Parent 2748 0 R
/Kids [1681 0 R 1688 0 R 1693 0 R 1703 0 R 1707 0 R 1711 0 R]
>> endobj
-1724 0 obj <<
+1723 0 obj <<
/Type /Pages
/Count 6
/Parent 2749 0 R
-/Kids [1718 0 R 1726 0 R 1734 0 R 1739 0 R 1743 0 R 1747 0 R]
+/Kids [1716 0 R 1726 0 R 1734 0 R 1739 0 R 1743 0 R 1747 0 R]
>> endobj
-1759 0 obj <<
+1758 0 obj <<
/Type /Pages
/Count 6
/Parent 2749 0 R
-/Kids [1751 0 R 1761 0 R 1767 0 R 1774 0 R 1779 0 R 1787 0 R]
+/Kids [1751 0 R 1760 0 R 1767 0 R 1772 0 R 1779 0 R 1786 0 R]
>> endobj
-1798 0 obj <<
+1796 0 obj <<
/Type /Pages
/Count 6
/Parent 2749 0 R
-/Kids [1792 0 R 1802 0 R 1807 0 R 1811 0 R 1816 0 R 1822 0 R]
+/Kids [1792 0 R 1799 0 R 1807 0 R 1811 0 R 1816 0 R 1821 0 R]
>> endobj
-1830 0 obj <<
+1829 0 obj <<
/Type /Pages
/Count 6
/Parent 2749 0 R
-/Kids [1826 0 R 1832 0 R 1836 0 R 1844 0 R 1852 0 R 1857 0 R]
+/Kids [1826 0 R 1831 0 R 1836 0 R 1842 0 R 1851 0 R 1856 0 R]
>> endobj
1864 0 obj <<
/Type /Pages
/Count 6
/Parent 2749 0 R
-/Kids [1861 0 R 1866 0 R 1870 0 R 1878 0 R 1882 0 R 1889 0 R]
+/Kids [1861 0 R 1866 0 R 1870 0 R 1874 0 R 1882 0 R 1889 0 R]
>> endobj
1922 0 obj <<
/Type /Pages
@@ -14636,7 +14660,7 @@ endobj
/Type /Pages
/Count 36
/Parent 2753 0 R
-/Kids [1724 0 R 1759 0 R 1798 0 R 1830 0 R 1864 0 R 1922 0 R]
+/Kids [1723 0 R 1758 0 R 1796 0 R 1829 0 R 1864 0 R 1922 0 R]
>> endobj
2750 0 obj <<
/Type /Pages
@@ -16329,7 +16353,7 @@ endobj
/Count -4
>> endobj
2755 0 obj <<
-/Names [(Access_Control_Lists) 2079 0 R (Bv9ARM.ch01) 1230 0 R (Bv9ARM.ch02) 1274 0 R (Bv9ARM.ch03) 1292 0 R (Bv9ARM.ch04) 1355 0 R (Bv9ARM.ch05) 1536 0 R (Bv9ARM.ch06) 1547 0 R (Bv9ARM.ch07) 2078 0 R (Bv9ARM.ch08) 2103 0 R (Bv9ARM.ch09) 2119 0 R (Bv9ARM.ch10) 2380 0 R (Configuration_File_Grammar) 1570 0 R (DNSSEC) 1421 0 R (Doc-Start) 935 0 R (Setting_TTLs) 1999 0 R (acache) 1281 0 R (access_control) 1722 0 R (acl) 1579 0 R (address_match_lists) 1552 0 R (admin_tools) 1314 0 R (appendix.A) 750 0 R (appendix.B) 842 0 R (bibliography) 2127 0 R (bind9.library) 2335 0 R (boolean_options) 1370 0 R (builtin) 1796 0 R (chapter*.1) 969 0 R (chapter.1) 6 0 R (chapter.2) 66 0 R (chapter.3) 90 0 R (chapter.4) 130 0 R (chapter.5) 350 0 R (chapter.6) 362 0 R (chapter.7) 706 0 R (chapter.8) 730 0 R (cite.RFC1033) 2254 0 R (cite.RFC1034) 2139 0 R (cite.RFC1035) 2141 0 R (cite.RFC1101) 2236 0 R (cite.RFC1123) 2238 0 R (cite.RFC1183) 2198 0 R (cite.RFC1464) 2276 0 R (cite.RFC1535) 2184 0 R (cite.RFC1536) 2186 0 R (cite.RFC1537) 2256 0 R (cite.RFC1591) 2240 0 R (cite.RFC1706) 2200 0 R (cite.RFC1712) 2296 0 R (cite.RFC1713) 2278 0 R (cite.RFC1794) 2280 0 R (cite.RFC1876) 2202 0 R (cite.RFC1912) 2258 0 R (cite.RFC1982) 2188 0 R (cite.RFC1995) 2146 0 R (cite.RFC1996) 2148 0 R (cite.RFC2010) 2260 0 R (cite.RFC2052) 2204 0 R (cite.RFC2065) 2308 0 R (cite.RFC2136) 2150 0 R (cite.RFC2137) 2310 0 R (cite.RFC2163) 2206 0 R (cite.RFC2168) 2208 0 R (cite.RFC2181) 2152 0 R (cite.RFC2219) 2262 0 R (cite.RFC2230) 2210 0 R (cite.RFC2240) 2282 0 R (cite.RFC2308) 2154 0 R (cite.RFC2317) 2242 0 R (cite.RFC2345) 2284 0 R (cite.RFC2352) 2286 0 R (cite.RFC2535) 2312 0 R (cite.RFC2536) 2212 0 R (cite.RFC2537) 2214 0 R (cite.RFC2538) 2216 0 R (cite.RFC2539) 2218 0 R (cite.RFC2540) 2220 0 R (cite.RFC2671) 2156 0 R (cite.RFC2672) 2158 0 R (cite.RFC2673) 2298 0 R (cite.RFC2782) 2222 0 R (cite.RFC2825) 2266 0 R (cite.RFC2826) 2244 0 R (cite.RFC2845) 2160 0 R (cite.RFC2874) 2300 0 R (cite.RFC2915) 2224 0 R (cite.RFC2929) 2246 0 R (cite.RFC2930) 2162 0 R (cite.RFC2931) 2164 0 R (cite.RFC3007) 2166 0 R (cite.RFC3008) 2314 0 R (cite.RFC3071) 2288 0 R (cite.RFC3090) 2316 0 R (cite.RFC3110) 2226 0 R (cite.RFC3123) 2228 0 R (cite.RFC3225) 2172 0 R (cite.RFC3258) 2290 0 R (cite.RFC3445) 2318 0 R (cite.RFC3490) 2268 0 R (cite.RFC3491) 2270 0 R (cite.RFC3492) 2272 0 R (cite.RFC3596) 2230 0 R (cite.RFC3597) 2232 0 R (cite.RFC3645) 2168 0 R (cite.RFC3655) 2320 0 R (cite.RFC3658) 2322 0 R (cite.RFC3755) 2324 0 R (cite.RFC3757) 2326 0 R (cite.RFC3833) 2174 0 R (cite.RFC3845) 2328 0 R (cite.RFC3901) 2292 0 R (cite.RFC4033) 2176 0 R (cite.RFC4034) 2178 0 R (cite.RFC4035) 2180 0 R (cite.RFC4074) 2190 0 R (cite.RFC974) 2143 0 R (cite.id2512154) 2333 0 R (clients-per-query) 2053 0 R (configuration_file_elements) 1548 0 R (controls_statement_definition_and_usage) 1338 0 R (diagnostic_tools) 1262 0 R (dnssec.dynamic.zones) 1441 0 R (dynamic_update) 1365 0 R (dynamic_update_policies) 1327 0 R (dynamic_update_security) 1732 0 R (empty) 1805 0 R (historical_dns_information) 2121 0 R (id2466567) 1231 0 R (id2466590) 1232 0 R (id2467233) 1405 0 R (id2467243) 1406 0 R (id2467280) 1411 0 R (id2467337) 1412 0 R (id2467481) 1233 0 R (id2467491) 1234 0 R (id2467731) 1244 0 R (id2467752) 1245 0 R (id2467786) 1246 0 R (id2467870) 1249 0 R (id2467963) 1242 0 R (id2470268) 1256 0 R (id2470292) 1259 0 R (id2470390) 1260 0 R (id2470411) 1261 0 R (id2470441) 1267 0 R (id2470476) 1268 0 R (id2470571) 1269 0 R (id2470605) 1275 0 R (id2470632) 1276 0 R (id2470713) 1277 0 R (id2470739) 1280 0 R (id2470749) 1286 0 R (id2470781) 1294 0 R (id2470797) 1295 0 R (id2470820) 1300 0 R (id2470837) 1301 0 R (id2471242) 1309 0 R (id2471248) 1310 0 R (id2473363) 1343 0 R (id2473374) 1344 0 R (id2473876) 1380 0 R (id2473894) 1386 0 R (id2474464) 1402 0 R (id2474481) 1403 0 R (id2474519) 1404 0 R (id2474896) 1414 0 R (id2474909) 1415 0 R (id2475027) 1420 0 R (id2475163) 1422 0 R (id2475310) 1427 0 R (id2475392) 1428 0 R (id2475612) 1442 0 R (id2475786) 1447 0 R (id2475822) 1448 0 R (id2475905) 1454 0 R (id2475942) 1461 0 R (id2475955) 1462 0 R (id2476056) 1463 0 R (id2476083) 1468 0 R (id2476092) 1469 0 R (id2476170) 1470 0 R (id2476183) 1471 0 R (id2476220) 1472 0 R (id2476230) 1473 0 R (id2476336) 1475 0 R (id2476358) 1482 0 R (id2476528) 1488 0 R (id2476692) 1494 0 R (id2476761) 1495 0 R (id2476878) 1500 0 R (id2477097) 1501 0 R (id2477106) 1502 0 R (id2477138) 1507 0 R (id2477174) 1508 0 R (id2477222) 1509 0 R (id2477253) 1510 0 R (id2477588) 1520 0 R (id2477634) 1521 0 R (id2477825) 1526 0 R (id2477955) 1528 0 R (id2477976) 1529 0 R (id2478009) 1537 0 R (id2478225) 1549 0 R (id2479049) 1557 0 R (id2479077) 1562 0 R (id2479351) 1563 0 R (id2479366) 1564 0 R (id2479396) 1569 0 R (id2479539) 1571 0 R (id2480073) 1578 0 R (id2480116) 1580 0 R (id2480263) 1582 0 R (id2480622) 1589 0 R (id2480640) 1595 0 R (id2480663) 1596 0 R (id2480686) 1597 0 R (id2480845) 1601 0 R (id2480971) 1606 0 R (id2481024) 1607 0 R (id2481649) 1618 0 R (id2482477) 1629 0 R (id2482539) 1630 0 R (id2482997) 1636 0 R (id2483070) 1637 0 R (id2483134) 1644 0 R (id2483178) 1645 0 R (id2483193) 1646 0 R (id2486547) 1684 0 R (id2488798) 1714 0 R (id2488857) 1721 0 R (id2489340) 1731 0 R (id2490618) 1754 0 R (id2490678) 1756 0 R (id2491032) 1765 0 R (id2491671) 1783 0 R (id2493275) 1814 0 R (id2493398) 1820 0 R (id2494636) 1842 0 R (id2494844) 1848 0 R (id2494891) 1850 0 R (id2495249) 1855 0 R (id2496936) 1873 0 R (id2496944) 1874 0 R (id2496949) 1875 0 R (id2497420) 1886 0 R (id2497453) 1892 0 R (id2499608) 1954 0 R (id2500272) 1964 0 R (id2500290) 1965 0 R (id2500310) 1968 0 R (id2500615) 1974 0 R (id2501785) 1981 0 R (id2501913) 1987 0 R (id2501934) 1988 0 R (id2502365) 1990 0 R (id2502502) 1992 0 R (id2502520) 1997 0 R (id2502924) 2000 0 R (id2503117) 2002 0 R (id2503132) 2003 0 R (id2503244) 2009 0 R (id2503267) 2010 0 R (id2503351) 2011 0 R (id2503412) 2012 0 R (id2503481) 2017 0 R (id2503517) 2018 0 R (id2503593) 2019 0 R (id2504036) 2031 0 R (id2504539) 2039 0 R (id2504545) 2040 0 R (id2506081) 2047 0 R (id2506087) 2048 0 R (id2506464) 2050 0 R (id2506469) 2051 0 R (id2507554) 2058 0 R (id2507586) 2059 0 R (id2507927) 2068 0 R (id2508169) 2088 0 R (id2508387) 2089 0 R (id2508515) 2090 0 R (id2508595) 2104 0 R (id2508600) 2105 0 R (id2508612) 2106 0 R (id2508629) 2107 0 R (id2508691) 2120 0 R (id2508862) 2126 0 R (id2509118) 2131 0 R (id2509121) 2137 0 R (id2509129) 2142 0 R (id2509153) 2138 0 R (id2509176) 2140 0 R (id2509212) 2151 0 R (id2509239) 2153 0 R (id2509265) 2145 0 R (id2509289) 2147 0 R (id2509313) 2149 0 R (id2509368) 2155 0 R (id2509395) 2157 0 R (id2509421) 2159 0 R (id2509483) 2161 0 R (id2509513) 2163 0 R (id2509543) 2165 0 R (id2509570) 2167 0 R (id2509644) 2170 0 R (id2509652) 2171 0 R (id2509678) 2173 0 R (id2509715) 2175 0 R (id2509780) 2177 0 R (id2509845) 2179 0 R (id2509910) 2182 0 R (id2509918) 2183 0 R (id2509944) 2185 0 R (id2510081) 2187 0 R (id2510116) 2189 0 R (id2510156) 2196 0 R (id2510162) 2197 0 R (id2510219) 2199 0 R (id2510257) 2207 0 R (id2510292) 2201 0 R (id2510346) 2203 0 R (id2510385) 2205 0 R (id2510410) 2209 0 R (id2510436) 2211 0 R (id2510462) 2213 0 R (id2510489) 2215 0 R (id2510529) 2217 0 R (id2510558) 2219 0 R (id2510588) 2221 0 R (id2510631) 2223 0 R (id2510664) 2225 0 R (id2510691) 2227 0 R (id2510714) 2229 0 R (id2510772) 2231 0 R (id2510796) 2234 0 R (id2510804) 2235 0 R (id2510829) 2237 0 R (id2510852) 2239 0 R (id2510875) 2241 0 R (id2510921) 2243 0 R (id2510945) 2245 0 R (id2510995) 2252 0 R (id2511002) 2253 0 R (id2511026) 2255 0 R (id2511052) 2257 0 R (id2511079) 2259 0 R (id2511115) 2261 0 R (id2511156) 2264 0 R (id2511161) 2265 0 R (id2511193) 2267 0 R (id2511239) 2269 0 R (id2511274) 2271 0 R (id2511301) 2274 0 R (id2511319) 2275 0 R (id2511341) 2277 0 R (id2511367) 2279 0 R (id2511393) 2281 0 R (id2511416) 2283 0 R (id2511462) 2285 0 R (id2511485) 2287 0 R (id2511512) 2289 0 R (id2511538) 2291 0 R (id2511575) 2294 0 R (id2511581) 2295 0 R (id2511707) 2297 0 R (id2511734) 2299 0 R (id2511770) 2306 0 R (id2511782) 2307 0 R (id2511821) 2309 0 R (id2511848) 2311 0 R (id2511878) 2313 0 R (id2511904) 2315 0 R (id2511930) 2317 0 R (id2511966) 2319 0 R (id2512003) 2321 0 R (id2512029) 2323 0 R (id2512056) 2325 0 R (id2512101) 2327 0 R (id2512142) 2330 0 R (id2512152) 2332 0 R (id2512154) 2334 0 R (id2512310) 2341 0 R (id2512320) 2342 0 R (id2512344) 2343 0 R (id2512443) 2344 0 R (id2512588) 2349 0 R (id2512615) 2351 0 R (id2512692) 2352 0 R (id2512782) 2357 0 R (id2512836) 2358 0 R (id2512900) 2359 0 R (id2512915) 2364 0 R (id2513046) 2369 0 R (id2513110) 2370 0 R (incremental_zone_transfers) 1377 0 R (internet_drafts) 2329 0 R (ipv6addresses) 1531 0 R (journal) 1376 0 R (lwresd) 1538 0 R (man.arpaname) 2689 0 R (man.ddns-confgen) 2678 0 R (man.dig) 2381 0 R (man.dnssec-dsfromkey) 2429 0 R (man.dnssec-keyfromlabel) 2447 0 R (man.dnssec-keygen) 1455 0 R (man.dnssec-revoke) 2490 0 R (man.dnssec-settime) 1456 0 R (man.dnssec-signzone) 2518 0 R (man.genrandom) 2695 0 R (man.host) 2413 0 R (man.isc-hmac-fixup) 2706 0 R (man.named) 2575 0 R (man.named-checkconf) 2542 0 R (man.named-checkzone) 2554 0 R (man.named-journalprint) 2597 0 R (man.nsec3hash) 2718 0 R (man.nsupdate) 2608 0 R (man.rndc) 2633 0 R (man.rndc-confgen) 2662 0 R (man.rndc.conf) 2645 0 R (managed-keys) 1477 0 R (notify) 1356 0 R (options) 1326 0 R (page.1) 934 0 R (page.10) 1318 0 R (page.100) 1959 0 R (page.101) 1963 0 R (page.102) 1973 0 R (page.103) 1980 0 R (page.104) 1986 0 R (page.105) 1996 0 R (page.106) 2008 0 R (page.107) 2016 0 R (page.108) 2024 0 R (page.109) 2029 0 R (page.11) 1331 0 R (page.110) 2037 0 R (page.111) 2045 0 R (page.112) 2057 0 R (page.113) 2064 0 R (page.114) 2072 0 R (page.115) 2077 0 R (page.116) 2083 0 R (page.117) 2094 0 R (page.118) 2098 0 R (page.119) 2102 0 R (page.12) 1335 0 R (page.120) 2113 0 R (page.121) 2118 0 R (page.122) 2125 0 R (page.123) 2135 0 R (page.124) 2194 0 R (page.125) 2250 0 R (page.126) 2304 0 R (page.127) 2340 0 R (page.128) 2348 0 R (page.129) 2356 0 R (page.13) 1342 0 R (page.130) 2363 0 R (page.131) 2368 0 R (page.132) 2374 0 R (page.133) 2379 0 R (page.134) 2388 0 R (page.135) 2394 0 R (page.136) 2399 0 R (page.137) 2403 0 R (page.138) 2408 0 R (page.139) 2420 0 R (page.14) 1349 0 R (page.140) 2425 0 R (page.141) 2437 0 R (page.142) 2446 0 R (page.143) 2455 0 R (page.144) 2460 0 R (page.145) 2470 0 R (page.146) 2476 0 R (page.147) 2480 0 R (page.148) 2486 0 R (page.149) 2497 0 R (page.15) 1354 0 R (page.150) 2507 0 R (page.151) 2514 0 R (page.152) 2524 0 R (page.153) 2530 0 R (page.154) 2534 0 R (page.155) 2538 0 R (page.156) 2548 0 R (page.157) 2560 0 R (page.158) 2567 0 R (page.159) 2571 0 R (page.16) 1375 0 R (page.160) 2583 0 R (page.161) 2587 0 R (page.162) 2594 0 R (page.163) 2607 0 R (page.164) 2615 0 R (page.165) 2620 0 R (page.166) 2624 0 R (page.167) 2632 0 R (page.168) 2641 0 R (page.169) 2653 0 R (page.17) 1385 0 R (page.170) 2658 0 R (page.171) 2670 0 R (page.172) 2676 0 R (page.173) 2686 0 R (page.174) 2700 0 R (page.175) 2714 0 R (page.176) 2727 0 R (page.18) 1390 0 R (page.19) 1396 0 R (page.2) 958 0 R (page.20) 1401 0 R (page.21) 1410 0 R (page.22) 1419 0 R (page.23) 1426 0 R (page.24) 1432 0 R (page.25) 1437 0 R (page.26) 1446 0 R (page.27) 1460 0 R (page.28) 1467 0 R (page.29) 1481 0 R (page.3) 1255 0 R (page.30) 1487 0 R (page.31) 1493 0 R (page.32) 1499 0 R (page.33) 1506 0 R (page.34) 1514 0 R (page.35) 1519 0 R (page.36) 1525 0 R (page.37) 1535 0 R (page.38) 1542 0 R (page.39) 1546 0 R (page.4) 1266 0 R (page.40) 1556 0 R (page.41) 1561 0 R (page.42) 1568 0 R (page.43) 1577 0 R (page.44) 1586 0 R (page.45) 1594 0 R (page.46) 1605 0 R (page.47) 1611 0 R (page.48) 1617 0 R (page.49) 1624 0 R (page.5) 1273 0 R (page.50) 1628 0 R (page.51) 1635 0 R (page.52) 1643 0 R (page.53) 1650 0 R (page.54) 1654 0 R (page.55) 1659 0 R (page.56) 1663 0 R (page.57) 1667 0 R (page.58) 1674 0 R (page.59) 1678 0 R (page.6) 1285 0 R (page.60) 1683 0 R (page.61) 1690 0 R (page.62) 1695 0 R (page.63) 1705 0 R (page.64) 1709 0 R (page.65) 1713 0 R (page.66) 1720 0 R (page.67) 1728 0 R (page.68) 1736 0 R (page.69) 1741 0 R (page.7) 1291 0 R (page.70) 1745 0 R (page.71) 1749 0 R (page.72) 1753 0 R (page.73) 1763 0 R (page.74) 1769 0 R (page.75) 1776 0 R (page.76) 1781 0 R (page.77) 1789 0 R (page.78) 1794 0 R (page.79) 1804 0 R (page.8) 1299 0 R (page.80) 1809 0 R (page.81) 1813 0 R (page.82) 1818 0 R (page.83) 1824 0 R (page.84) 1828 0 R (page.85) 1834 0 R (page.86) 1838 0 R (page.87) 1846 0 R (page.88) 1854 0 R (page.89) 1859 0 R (page.9) 1308 0 R (page.90) 1863 0 R (page.91) 1868 0 R (page.92) 1872 0 R (page.93) 1880 0 R (page.94) 1884 0 R (page.95) 1891 0 R (page.96) 1911 0 R (page.97) 1926 0 R (page.98) 1937 0 R (page.99) 1953 0 R (page.i) 968 0 R (page.ii) 1023 0 R (page.iii) 1087 0 R (page.iv) 1150 0 R (page.v) 1212 0 R (pkcs11) 1483 0 R (proposed_standards) 1381 0 R (query_address) 1737 0 R (rfc5011.support) 1474 0 R (rfcs) 1251 0 R (rndc) 1590 0 R (root_delegation_only) 1887 0 R (rrset_ordering) 1304 0 R (sample_configuration) 1293 0 R (section*.10) 2263 0 R (section*.100) 2595 0 R (section*.101) 2596 0 R (section*.102) 2598 0 R (section*.103) 2599 0 R (section*.104) 2600 0 R (section*.105) 2601 0 R (section*.106) 2602 0 R (section*.107) 2609 0 R (section*.108) 2610 0 R (section*.109) 2611 0 R (section*.11) 2273 0 R (section*.110) 2616 0 R (section*.111) 2625 0 R (section*.112) 2626 0 R (section*.113) 2627 0 R (section*.114) 2628 0 R (section*.115) 2634 0 R (section*.116) 2635 0 R (section*.117) 2636 0 R (section*.118) 2637 0 R (section*.119) 2642 0 R (section*.12) 2293 0 R (section*.120) 2643 0 R (section*.121) 2644 0 R (section*.122) 2646 0 R (section*.123) 2647 0 R (section*.124) 2648 0 R (section*.125) 2654 0 R (section*.126) 2659 0 R (section*.127) 2660 0 R (section*.128) 2661 0 R (section*.129) 2663 0 R (section*.13) 2305 0 R (section*.130) 2664 0 R (section*.131) 2665 0 R (section*.132) 2666 0 R (section*.133) 2671 0 R (section*.134) 2672 0 R (section*.135) 2677 0 R (section*.136) 2679 0 R (section*.137) 2680 0 R (section*.138) 2681 0 R (section*.139) 2682 0 R (section*.14) 2331 0 R (section*.140) 2687 0 R (section*.141) 2688 0 R (section*.142) 2690 0 R (section*.143) 2691 0 R (section*.144) 2692 0 R (section*.145) 2693 0 R (section*.146) 2694 0 R (section*.147) 2696 0 R (section*.148) 2701 0 R (section*.149) 2702 0 R (section*.15) 2382 0 R (section*.150) 2703 0 R (section*.151) 2704 0 R (section*.152) 2705 0 R (section*.153) 2707 0 R (section*.154) 2708 0 R (section*.155) 2709 0 R (section*.156) 2715 0 R (section*.157) 2716 0 R (section*.158) 2717 0 R (section*.159) 2719 0 R (section*.16) 2383 0 R (section*.160) 2720 0 R (section*.161) 2721 0 R (section*.162) 2722 0 R (section*.163) 2723 0 R (section*.164) 2728 0 R (section*.17) 2384 0 R (section*.18) 2389 0 R (section*.19) 2390 0 R (section*.2) 2130 0 R (section*.20) 2395 0 R (section*.21) 2404 0 R (section*.22) 2409 0 R (section*.23) 2410 0 R (section*.24) 2411 0 R (section*.25) 2412 0 R (section*.26) 2414 0 R (section*.27) 2415 0 R (section*.28) 2421 0 R (section*.29) 2426 0 R (section*.3) 2136 0 R (section*.30) 2427 0 R (section*.31) 2428 0 R (section*.32) 2430 0 R (section*.33) 2431 0 R (section*.34) 2432 0 R (section*.35) 2433 0 R (section*.36) 2438 0 R (section*.37) 2439 0 R (section*.38) 2440 0 R (section*.39) 2441 0 R (section*.4) 2144 0 R (section*.40) 2442 0 R (section*.41) 2448 0 R (section*.42) 2449 0 R (section*.43) 2450 0 R (section*.44) 2451 0 R (section*.45) 2456 0 R (section*.46) 2461 0 R (section*.47) 2462 0 R (section*.48) 2463 0 R (section*.49) 2464 0 R (section*.5) 2169 0 R (section*.50) 2465 0 R (section*.51) 2471 0 R (section*.52) 2472 0 R (section*.53) 2481 0 R (section*.54) 2482 0 R (section*.55) 2487 0 R (section*.56) 2488 0 R (section*.57) 2489 0 R (section*.58) 2491 0 R (section*.59) 2492 0 R (section*.6) 2181 0 R (section*.60) 2493 0 R (section*.61) 2498 0 R (section*.62) 2499 0 R (section*.63) 2500 0 R (section*.64) 2501 0 R (section*.65) 2502 0 R (section*.66) 2503 0 R (section*.67) 2508 0 R (section*.68) 2509 0 R (section*.69) 2515 0 R (section*.7) 2195 0 R (section*.70) 2516 0 R (section*.71) 2517 0 R (section*.72) 2519 0 R (section*.73) 2520 0 R (section*.74) 2525 0 R (section*.75) 2526 0 R (section*.76) 2539 0 R (section*.77) 2540 0 R (section*.78) 2541 0 R (section*.79) 2543 0 R (section*.8) 2233 0 R (section*.80) 2544 0 R (section*.81) 2549 0 R (section*.82) 2550 0 R (section*.83) 2551 0 R (section*.84) 2552 0 R (section*.85) 2553 0 R (section*.86) 2555 0 R (section*.87) 2561 0 R (section*.88) 2562 0 R (section*.89) 2563 0 R (section*.9) 2251 0 R (section*.90) 2572 0 R (section*.91) 2573 0 R (section*.92) 2574 0 R (section*.93) 2576 0 R (section*.94) 2577 0 R (section*.95) 2578 0 R (section*.96) 2579 0 R (section*.97) 2588 0 R (section*.98) 2589 0 R (section*.99) 2590 0 R (section.1.1) 10 0 R (section.1.2) 14 0 R (section.1.3) 18 0 R (section.1.4) 22 0 R (section.2.1) 70 0 R (section.2.2) 74 0 R (section.2.3) 78 0 R (section.2.4) 82 0 R (section.2.5) 86 0 R (section.3.1) 94 0 R (section.3.2) 106 0 R (section.3.3) 110 0 R (section.4.1) 134 0 R (section.4.10) 274 0 R (section.4.11) 286 0 R (section.4.12) 338 0 R (section.4.2) 138 0 R (section.4.3) 146 0 R (section.4.4) 150 0 R (section.4.5) 158 0 R (section.4.6) 194 0 R (section.4.7) 198 0 R (section.4.8) 202 0 R (section.4.9) 218 0 R (section.5.1) 354 0 R (section.5.2) 358 0 R (section.6.1) 366 0 R (section.6.2) 394 0 R (section.6.3) 618 0 R (section.6.4) 674 0 R (section.7.1) 710 0 R (section.7.2) 714 0 R (section.7.3) 726 0 R (section.8.1) 734 0 R (section.8.2) 742 0 R (section.8.3) 746 0 R (section.A.1) 754 0 R (section.A.2) 762 0 R (section.A.3) 770 0 R (section.A.4) 786 0 R (section.B.1) 846 0 R (section.B.10) 882 0 R (section.B.11) 886 0 R (section.B.12) 890 0 R (section.B.13) 894 0 R (section.B.14) 898 0 R (section.B.15) 902 0 R (section.B.16) 906 0 R (section.B.17) 910 0 R (section.B.18) 914 0 R (section.B.19) 918 0 R (section.B.2) 850 0 R (section.B.20) 922 0 R (section.B.21) 926 0 R (section.B.3) 854 0 R (section.B.4) 858 0 R (section.B.5) 862 0 R (section.B.6) 866 0 R (section.B.7) 870 0 R (section.B.8) 874 0 R (section.B.9) 878 0 R (server_resource_limits) 1758 0 R (server_statement_definition_and_usage) 1701 0 R (server_statement_grammar) 1829 0 R (statistics) 2030 0 R (statistics_counters) 2038 0 R (statschannels) 1841 0 R (statsfile) 1670 0 R (subsection.1.4.1) 26 0 R (subsection.1.4.2) 30 0 R (subsection.1.4.3) 34 0 R (subsection.1.4.4) 38 0 R (subsection.1.4.5) 54 0 R (subsection.1.4.6) 62 0 R (subsection.3.1.1) 98 0 R (subsection.3.1.2) 102 0 R (subsection.3.3.1) 114 0 R (subsection.3.3.2) 126 0 R (subsection.4.10.1) 278 0 R (subsection.4.10.2) 282 0 R (subsection.4.11.1) 290 0 R (subsection.4.11.2) 306 0 R (subsection.4.11.3) 322 0 R (subsection.4.11.4) 326 0 R (subsection.4.11.5) 330 0 R (subsection.4.11.6) 334 0 R (subsection.4.12.1) 342 0 R (subsection.4.12.2) 346 0 R (subsection.4.2.1) 142 0 R (subsection.4.4.1) 154 0 R (subsection.4.5.1) 162 0 R (subsection.4.5.2) 174 0 R (subsection.4.5.3) 178 0 R (subsection.4.5.4) 182 0 R (subsection.4.5.5) 186 0 R (subsection.4.5.6) 190 0 R (subsection.4.8.1) 206 0 R (subsection.4.8.2) 210 0 R (subsection.4.8.3) 214 0 R (subsection.4.9.1) 222 0 R (subsection.4.9.10) 258 0 R (subsection.4.9.11) 262 0 R (subsection.4.9.12) 266 0 R (subsection.4.9.13) 270 0 R (subsection.4.9.2) 226 0 R (subsection.4.9.3) 230 0 R (subsection.4.9.4) 234 0 R (subsection.4.9.5) 238 0 R (subsection.4.9.6) 242 0 R (subsection.4.9.7) 246 0 R (subsection.4.9.8) 250 0 R (subsection.4.9.9) 254 0 R (subsection.6.1.1) 370 0 R (subsection.6.1.2) 382 0 R (subsection.6.2.1) 398 0 R (subsection.6.2.10) 434 0 R (subsection.6.2.11) 450 0 R (subsection.6.2.12) 454 0 R (subsection.6.2.13) 458 0 R (subsection.6.2.14) 462 0 R (subsection.6.2.15) 466 0 R (subsection.6.2.16) 470 0 R (subsection.6.2.17) 554 0 R (subsection.6.2.18) 558 0 R (subsection.6.2.19) 562 0 R (subsection.6.2.2) 402 0 R (subsection.6.2.20) 566 0 R (subsection.6.2.21) 570 0 R (subsection.6.2.22) 574 0 R (subsection.6.2.23) 578 0 R (subsection.6.2.24) 582 0 R (subsection.6.2.25) 586 0 R (subsection.6.2.26) 590 0 R (subsection.6.2.27) 594 0 R (subsection.6.2.28) 598 0 R (subsection.6.2.3) 406 0 R (subsection.6.2.4) 410 0 R (subsection.6.2.5) 414 0 R (subsection.6.2.6) 418 0 R (subsection.6.2.7) 422 0 R (subsection.6.2.8) 426 0 R (subsection.6.2.9) 430 0 R (subsection.6.3.1) 622 0 R (subsection.6.3.2) 634 0 R (subsection.6.3.3) 638 0 R (subsection.6.3.4) 642 0 R (subsection.6.3.5) 646 0 R (subsection.6.3.6) 666 0 R (subsection.6.3.7) 670 0 R (subsection.6.4.1) 682 0 R (subsection.7.2.1) 718 0 R (subsection.7.2.2) 722 0 R (subsection.8.1.1) 738 0 R (subsection.A.1.1) 758 0 R (subsection.A.2.1) 766 0 R (subsection.A.3.1) 774 0 R (subsection.A.3.2) 778 0 R (subsection.A.3.3) 782 0 R (subsection.A.4.1) 790 0 R (subsection.A.4.2) 794 0 R (subsection.A.4.3) 798 0 R (subsection.A.4.4) 802 0 R (subsection.A.4.5) 806 0 R (subsection.A.4.6) 810 0 R (subsection.A.4.7) 838 0 R (subsubsection.1.4.4.1) 42 0 R (subsubsection.1.4.4.2) 46 0 R (subsubsection.1.4.4.3) 50 0 R (subsubsection.1.4.5.1) 58 0 R (subsubsection.3.3.1.1) 118 0 R (subsubsection.3.3.1.2) 122 0 R (subsubsection.4.11.1.1) 294 0 R (subsubsection.4.11.1.2) 298 0 R (subsubsection.4.11.1.3) 302 0 R (subsubsection.4.11.2.1) 310 0 R (subsubsection.4.11.2.2) 314 0 R (subsubsection.4.11.2.3) 318 0 R (subsubsection.4.5.1.1) 166 0 R (subsubsection.4.5.1.2) 170 0 R (subsubsection.6.1.1.1) 374 0 R (subsubsection.6.1.1.2) 378 0 R (subsubsection.6.1.2.1) 386 0 R (subsubsection.6.1.2.2) 390 0 R (subsubsection.6.2.10.1) 438 0 R (subsubsection.6.2.10.2) 442 0 R (subsubsection.6.2.10.3) 446 0 R (subsubsection.6.2.16.1) 474 0 R (subsubsection.6.2.16.10) 510 0 R (subsubsection.6.2.16.11) 514 0 R (subsubsection.6.2.16.12) 518 0 R (subsubsection.6.2.16.13) 522 0 R (subsubsection.6.2.16.14) 526 0 R (subsubsection.6.2.16.15) 530 0 R (subsubsection.6.2.16.16) 534 0 R (subsubsection.6.2.16.17) 538 0 R (subsubsection.6.2.16.18) 542 0 R (subsubsection.6.2.16.19) 546 0 R (subsubsection.6.2.16.2) 478 0 R (subsubsection.6.2.16.20) 550 0 R (subsubsection.6.2.16.3) 482 0 R (subsubsection.6.2.16.4) 486 0 R (subsubsection.6.2.16.5) 490 0 R (subsubsection.6.2.16.6) 494 0 R (subsubsection.6.2.16.7) 498 0 R (subsubsection.6.2.16.8) 502 0 R (subsubsection.6.2.16.9) 506 0 R (subsubsection.6.2.28.1) 602 0 R (subsubsection.6.2.28.2) 606 0 R (subsubsection.6.2.28.3) 610 0 R (subsubsection.6.2.28.4) 614 0 R (subsubsection.6.3.1.1) 626 0 R (subsubsection.6.3.1.2) 630 0 R (subsubsection.6.3.5.1) 650 0 R (subsubsection.6.3.5.2) 654 0 R (subsubsection.6.3.5.3) 658 0 R (subsubsection.6.3.5.4) 662 0 R (subsubsection.6.4.0.1) 678 0 R (subsubsection.6.4.1.1) 686 0 R (subsubsection.6.4.1.2) 690 0 R (subsubsection.6.4.1.3) 694 0 R (subsubsection.6.4.1.4) 698 0 R (subsubsection.6.4.1.5) 702 0 R (subsubsection.A.4.6.1) 814 0 R (subsubsection.A.4.6.2) 818 0 R (subsubsection.A.4.6.3) 822 0 R (subsubsection.A.4.6.4) 826 0 R (subsubsection.A.4.6.5) 830 0 R (subsubsection.A.4.6.6) 834 0 R (table.1.1) 1235 0 R (table.1.2) 1243 0 R (table.3.1) 1302 0 R (table.3.2) 1345 0 R (table.6.1) 1550 0 R (table.6.10) 1969 0 R (table.6.11) 1975 0 R (table.6.12) 1982 0 R (table.6.13) 1989 0 R (table.6.14) 1991 0 R (table.6.15) 1998 0 R (table.6.16) 2001 0 R (table.6.17) 2004 0 R (table.6.18) 2020 0 R (table.6.19) 2032 0 R (table.6.2) 1572 0 R (table.6.20) 2041 0 R (table.6.21) 2049 0 R (table.6.22) 2052 0 R (table.6.23) 2060 0 R (table.6.3) 1581 0 R (table.6.4) 1619 0 R (table.6.5) 1631 0 R (table.6.6) 1685 0 R (table.6.7) 1784 0 R (table.6.8) 1876 0 R (table.6.9) 1955 0 R (the_category_phrase) 1613 0 R (the_sortlist_statement) 1771 0 R (topology) 1770 0 R (trusted-keys) 1847 0 R (tsig) 1397 0 R (tuning) 1785 0 R (types_of_resource_records_and_when_to_use_them) 1250 0 R (view_statement_grammar) 1800 0 R (zone_statement_grammar) 1716 0 R (zone_transfers) 1371 0 R (zonefile_format) 1799 0 R]
+/Names [(Access_Control_Lists) 2079 0 R (Bv9ARM.ch01) 1230 0 R (Bv9ARM.ch02) 1274 0 R (Bv9ARM.ch03) 1292 0 R (Bv9ARM.ch04) 1355 0 R (Bv9ARM.ch05) 1536 0 R (Bv9ARM.ch06) 1547 0 R (Bv9ARM.ch07) 2078 0 R (Bv9ARM.ch08) 2103 0 R (Bv9ARM.ch09) 2119 0 R (Bv9ARM.ch10) 2380 0 R (Configuration_File_Grammar) 1570 0 R (DNSSEC) 1421 0 R (Doc-Start) 935 0 R (Setting_TTLs) 1999 0 R (acache) 1281 0 R (access_control) 1721 0 R (acl) 1579 0 R (address_match_lists) 1552 0 R (admin_tools) 1314 0 R (appendix.A) 750 0 R (appendix.B) 842 0 R (bibliography) 2127 0 R (bind9.library) 2335 0 R (boolean_options) 1370 0 R (builtin) 1802 0 R (chapter*.1) 969 0 R (chapter.1) 6 0 R (chapter.2) 66 0 R (chapter.3) 90 0 R (chapter.4) 130 0 R (chapter.5) 350 0 R (chapter.6) 362 0 R (chapter.7) 706 0 R (chapter.8) 730 0 R (cite.RFC1033) 2254 0 R (cite.RFC1034) 2139 0 R (cite.RFC1035) 2141 0 R (cite.RFC1101) 2236 0 R (cite.RFC1123) 2238 0 R (cite.RFC1183) 2198 0 R (cite.RFC1464) 2276 0 R (cite.RFC1535) 2184 0 R (cite.RFC1536) 2186 0 R (cite.RFC1537) 2256 0 R (cite.RFC1591) 2240 0 R (cite.RFC1706) 2200 0 R (cite.RFC1712) 2296 0 R (cite.RFC1713) 2278 0 R (cite.RFC1794) 2280 0 R (cite.RFC1876) 2202 0 R (cite.RFC1912) 2258 0 R (cite.RFC1982) 2188 0 R (cite.RFC1995) 2146 0 R (cite.RFC1996) 2148 0 R (cite.RFC2010) 2260 0 R (cite.RFC2052) 2204 0 R (cite.RFC2065) 2308 0 R (cite.RFC2136) 2150 0 R (cite.RFC2137) 2310 0 R (cite.RFC2163) 2206 0 R (cite.RFC2168) 2208 0 R (cite.RFC2181) 2152 0 R (cite.RFC2219) 2262 0 R (cite.RFC2230) 2210 0 R (cite.RFC2240) 2282 0 R (cite.RFC2308) 2154 0 R (cite.RFC2317) 2242 0 R (cite.RFC2345) 2284 0 R (cite.RFC2352) 2286 0 R (cite.RFC2535) 2312 0 R (cite.RFC2536) 2212 0 R (cite.RFC2537) 2214 0 R (cite.RFC2538) 2216 0 R (cite.RFC2539) 2218 0 R (cite.RFC2540) 2220 0 R (cite.RFC2671) 2156 0 R (cite.RFC2672) 2158 0 R (cite.RFC2673) 2298 0 R (cite.RFC2782) 2222 0 R (cite.RFC2825) 2266 0 R (cite.RFC2826) 2244 0 R (cite.RFC2845) 2160 0 R (cite.RFC2874) 2300 0 R (cite.RFC2915) 2224 0 R (cite.RFC2929) 2246 0 R (cite.RFC2930) 2162 0 R (cite.RFC2931) 2164 0 R (cite.RFC3007) 2166 0 R (cite.RFC3008) 2314 0 R (cite.RFC3071) 2288 0 R (cite.RFC3090) 2316 0 R (cite.RFC3110) 2226 0 R (cite.RFC3123) 2228 0 R (cite.RFC3225) 2172 0 R (cite.RFC3258) 2290 0 R (cite.RFC3445) 2318 0 R (cite.RFC3490) 2268 0 R (cite.RFC3491) 2270 0 R (cite.RFC3492) 2272 0 R (cite.RFC3596) 2230 0 R (cite.RFC3597) 2232 0 R (cite.RFC3645) 2168 0 R (cite.RFC3655) 2320 0 R (cite.RFC3658) 2322 0 R (cite.RFC3755) 2324 0 R (cite.RFC3757) 2326 0 R (cite.RFC3833) 2174 0 R (cite.RFC3845) 2328 0 R (cite.RFC3901) 2292 0 R (cite.RFC4033) 2176 0 R (cite.RFC4034) 2178 0 R (cite.RFC4035) 2180 0 R (cite.RFC4074) 2190 0 R (cite.RFC974) 2143 0 R (cite.id2512276) 2333 0 R (clients-per-query) 2053 0 R (configuration_file_elements) 1548 0 R (controls_statement_definition_and_usage) 1338 0 R (diagnostic_tools) 1262 0 R (dnssec.dynamic.zones) 1441 0 R (dynamic_update) 1365 0 R (dynamic_update_policies) 1327 0 R (dynamic_update_security) 1732 0 R (empty) 1804 0 R (historical_dns_information) 2121 0 R (id2466567) 1231 0 R (id2466590) 1232 0 R (id2467233) 1405 0 R (id2467243) 1406 0 R (id2467280) 1411 0 R (id2467337) 1412 0 R (id2467481) 1233 0 R (id2467491) 1234 0 R (id2467731) 1244 0 R (id2467752) 1245 0 R (id2467786) 1246 0 R (id2467870) 1249 0 R (id2467963) 1242 0 R (id2470268) 1256 0 R (id2470292) 1259 0 R (id2470390) 1260 0 R (id2470411) 1261 0 R (id2470441) 1267 0 R (id2470476) 1268 0 R (id2470571) 1269 0 R (id2470605) 1275 0 R (id2470632) 1276 0 R (id2470713) 1277 0 R (id2470739) 1280 0 R (id2470749) 1286 0 R (id2470781) 1294 0 R (id2470797) 1295 0 R (id2470820) 1300 0 R (id2470837) 1301 0 R (id2471242) 1309 0 R (id2471248) 1310 0 R (id2473363) 1343 0 R (id2473374) 1344 0 R (id2473876) 1380 0 R (id2473894) 1386 0 R (id2474464) 1402 0 R (id2474481) 1403 0 R (id2474519) 1404 0 R (id2474896) 1414 0 R (id2474909) 1415 0 R (id2475027) 1420 0 R (id2475163) 1422 0 R (id2475310) 1427 0 R (id2475392) 1428 0 R (id2475612) 1442 0 R (id2475786) 1447 0 R (id2475822) 1448 0 R (id2475905) 1454 0 R (id2475942) 1461 0 R (id2475955) 1462 0 R (id2476056) 1463 0 R (id2476083) 1468 0 R (id2476092) 1469 0 R (id2476170) 1470 0 R (id2476183) 1471 0 R (id2476220) 1472 0 R (id2476230) 1473 0 R (id2476336) 1475 0 R (id2476358) 1482 0 R (id2476528) 1488 0 R (id2476692) 1494 0 R (id2476761) 1495 0 R (id2476878) 1500 0 R (id2477097) 1501 0 R (id2477106) 1502 0 R (id2477138) 1507 0 R (id2477174) 1508 0 R (id2477222) 1509 0 R (id2477253) 1510 0 R (id2477588) 1520 0 R (id2477634) 1521 0 R (id2477825) 1526 0 R (id2477955) 1528 0 R (id2477976) 1529 0 R (id2478009) 1537 0 R (id2478225) 1549 0 R (id2479049) 1557 0 R (id2479077) 1562 0 R (id2479351) 1563 0 R (id2479366) 1564 0 R (id2479396) 1569 0 R (id2479539) 1571 0 R (id2480073) 1578 0 R (id2480116) 1580 0 R (id2480263) 1582 0 R (id2480622) 1589 0 R (id2480640) 1595 0 R (id2480663) 1596 0 R (id2480686) 1597 0 R (id2480845) 1601 0 R (id2480971) 1606 0 R (id2481024) 1607 0 R (id2481649) 1618 0 R (id2482477) 1629 0 R (id2482539) 1630 0 R (id2482997) 1636 0 R (id2483070) 1637 0 R (id2483134) 1644 0 R (id2483178) 1645 0 R (id2483193) 1646 0 R (id2486510) 1684 0 R (id2488830) 1714 0 R (id2488957) 1720 0 R (id2489509) 1731 0 R (id2490718) 1754 0 R (id2490778) 1756 0 R (id2491132) 1765 0 R (id2491703) 1783 0 R (id2493307) 1814 0 R (id2493498) 1824 0 R (id2494690) 1846 0 R (id2494829) 1848 0 R (id2494876) 1854 0 R (id2495234) 1859 0 R (id2496921) 1877 0 R (id2496929) 1878 0 R (id2496934) 1879 0 R (id2497474) 1886 0 R (id2497507) 1892 0 R (id2499730) 1954 0 R (id2500393) 1964 0 R (id2500480) 1965 0 R (id2500500) 1968 0 R (id2500668) 1974 0 R (id2501838) 1981 0 R (id2501966) 1987 0 R (id2502056) 1988 0 R (id2502419) 1990 0 R (id2502555) 1992 0 R (id2502573) 1997 0 R (id2503114) 2000 0 R (id2503239) 2002 0 R (id2503254) 2003 0 R (id2503366) 2009 0 R (id2503388) 2010 0 R (id2503404) 2011 0 R (id2503465) 2012 0 R (id2503534) 2017 0 R (id2503571) 2018 0 R (id2503646) 2019 0 R (id2504226) 2031 0 R (id2504661) 2039 0 R (id2504666) 2040 0 R (id2506134) 2047 0 R (id2506140) 2048 0 R (id2506517) 2050 0 R (id2506522) 2051 0 R (id2507607) 2058 0 R (id2507639) 2059 0 R (id2508049) 2068 0 R (id2508222) 2088 0 R (id2508372) 2089 0 R (id2508432) 2090 0 R (id2508512) 2104 0 R (id2508517) 2105 0 R (id2508529) 2106 0 R (id2508546) 2107 0 R (id2508744) 2120 0 R (id2509052) 2126 0 R (id2509172) 2131 0 R (id2509174) 2137 0 R (id2509182) 2142 0 R (id2509206) 2138 0 R (id2509298) 2140 0 R (id2509334) 2151 0 R (id2509361) 2153 0 R (id2509386) 2145 0 R (id2509411) 2147 0 R (id2509434) 2149 0 R (id2509490) 2155 0 R (id2509516) 2157 0 R (id2509543) 2159 0 R (id2509605) 2161 0 R (id2509635) 2163 0 R (id2509665) 2165 0 R (id2509691) 2167 0 R (id2509766) 2170 0 R (id2509773) 2171 0 R (id2509800) 2173 0 R (id2509836) 2175 0 R (id2509901) 2177 0 R (id2510035) 2179 0 R (id2510100) 2182 0 R (id2510108) 2183 0 R (id2510134) 2185 0 R (id2510202) 2187 0 R (id2510237) 2189 0 R (id2510278) 2196 0 R (id2510283) 2197 0 R (id2510341) 2199 0 R (id2510378) 2207 0 R (id2510413) 2201 0 R (id2510468) 2203 0 R (id2510506) 2205 0 R (id2510532) 2209 0 R (id2510557) 2211 0 R (id2510584) 2213 0 R (id2510611) 2215 0 R (id2510650) 2217 0 R (id2510680) 2219 0 R (id2510710) 2221 0 R (id2510753) 2223 0 R (id2510786) 2225 0 R (id2510812) 2227 0 R (id2510836) 2229 0 R (id2510893) 2231 0 R (id2510918) 2234 0 R (id2510925) 2235 0 R (id2510951) 2237 0 R (id2510973) 2239 0 R (id2510997) 2241 0 R (id2511043) 2243 0 R (id2511066) 2245 0 R (id2511116) 2252 0 R (id2511124) 2253 0 R (id2511147) 2255 0 R (id2511174) 2257 0 R (id2511201) 2259 0 R (id2511237) 2261 0 R (id2511277) 2264 0 R (id2511283) 2265 0 R (id2511315) 2267 0 R (id2511361) 2269 0 R (id2511396) 2271 0 R (id2511422) 2274 0 R (id2511441) 2275 0 R (id2511531) 2277 0 R (id2511557) 2279 0 R (id2511582) 2281 0 R (id2511606) 2283 0 R (id2511652) 2285 0 R (id2511675) 2287 0 R (id2511702) 2289 0 R (id2511728) 2291 0 R (id2511765) 2294 0 R (id2511771) 2295 0 R (id2511829) 2297 0 R (id2511856) 2299 0 R (id2511892) 2306 0 R (id2511904) 2307 0 R (id2511943) 2309 0 R (id2511970) 2311 0 R (id2512000) 2313 0 R (id2512025) 2315 0 R (id2512052) 2317 0 R (id2512088) 2319 0 R (id2512124) 2321 0 R (id2512151) 2323 0 R (id2512178) 2325 0 R (id2512222) 2327 0 R (id2512264) 2330 0 R (id2512274) 2332 0 R (id2512276) 2334 0 R (id2512432) 2341 0 R (id2512441) 2342 0 R (id2512466) 2343 0 R (id2512497) 2344 0 R (id2512642) 2349 0 R (id2512668) 2351 0 R (id2512677) 2352 0 R (id2512768) 2357 0 R (id2512821) 2358 0 R (id2512885) 2359 0 R (id2512968) 2364 0 R (id2513099) 2369 0 R (id2513300) 2370 0 R (incremental_zone_transfers) 1377 0 R (internet_drafts) 2329 0 R (ipv6addresses) 1531 0 R (journal) 1376 0 R (lwresd) 1538 0 R (man.arpaname) 2689 0 R (man.ddns-confgen) 2678 0 R (man.dig) 2381 0 R (man.dnssec-dsfromkey) 2429 0 R (man.dnssec-keyfromlabel) 2447 0 R (man.dnssec-keygen) 1455 0 R (man.dnssec-revoke) 2490 0 R (man.dnssec-settime) 1456 0 R (man.dnssec-signzone) 2518 0 R (man.genrandom) 2695 0 R (man.host) 2413 0 R (man.isc-hmac-fixup) 2706 0 R (man.named) 2575 0 R (man.named-checkconf) 2542 0 R (man.named-checkzone) 2554 0 R (man.named-journalprint) 2597 0 R (man.nsec3hash) 2718 0 R (man.nsupdate) 2608 0 R (man.rndc) 2633 0 R (man.rndc-confgen) 2662 0 R (man.rndc.conf) 2645 0 R (managed-keys) 1477 0 R (notify) 1356 0 R (options) 1326 0 R (page.1) 934 0 R (page.10) 1318 0 R (page.100) 1959 0 R (page.101) 1963 0 R (page.102) 1973 0 R (page.103) 1980 0 R (page.104) 1986 0 R (page.105) 1996 0 R (page.106) 2008 0 R (page.107) 2016 0 R (page.108) 2024 0 R (page.109) 2029 0 R (page.11) 1331 0 R (page.110) 2037 0 R (page.111) 2045 0 R (page.112) 2057 0 R (page.113) 2064 0 R (page.114) 2072 0 R (page.115) 2077 0 R (page.116) 2083 0 R (page.117) 2094 0 R (page.118) 2098 0 R (page.119) 2102 0 R (page.12) 1335 0 R (page.120) 2113 0 R (page.121) 2118 0 R (page.122) 2125 0 R (page.123) 2135 0 R (page.124) 2194 0 R (page.125) 2250 0 R (page.126) 2304 0 R (page.127) 2340 0 R (page.128) 2348 0 R (page.129) 2356 0 R (page.13) 1342 0 R (page.130) 2363 0 R (page.131) 2368 0 R (page.132) 2374 0 R (page.133) 2379 0 R (page.134) 2388 0 R (page.135) 2394 0 R (page.136) 2399 0 R (page.137) 2403 0 R (page.138) 2408 0 R (page.139) 2420 0 R (page.14) 1349 0 R (page.140) 2425 0 R (page.141) 2437 0 R (page.142) 2446 0 R (page.143) 2455 0 R (page.144) 2460 0 R (page.145) 2470 0 R (page.146) 2476 0 R (page.147) 2480 0 R (page.148) 2486 0 R (page.149) 2497 0 R (page.15) 1354 0 R (page.150) 2507 0 R (page.151) 2514 0 R (page.152) 2524 0 R (page.153) 2530 0 R (page.154) 2534 0 R (page.155) 2538 0 R (page.156) 2548 0 R (page.157) 2560 0 R (page.158) 2567 0 R (page.159) 2571 0 R (page.16) 1375 0 R (page.160) 2583 0 R (page.161) 2587 0 R (page.162) 2594 0 R (page.163) 2607 0 R (page.164) 2615 0 R (page.165) 2620 0 R (page.166) 2624 0 R (page.167) 2632 0 R (page.168) 2641 0 R (page.169) 2653 0 R (page.17) 1385 0 R (page.170) 2658 0 R (page.171) 2670 0 R (page.172) 2676 0 R (page.173) 2686 0 R (page.174) 2700 0 R (page.175) 2714 0 R (page.176) 2727 0 R (page.18) 1390 0 R (page.19) 1396 0 R (page.2) 958 0 R (page.20) 1401 0 R (page.21) 1410 0 R (page.22) 1419 0 R (page.23) 1426 0 R (page.24) 1432 0 R (page.25) 1437 0 R (page.26) 1446 0 R (page.27) 1460 0 R (page.28) 1467 0 R (page.29) 1481 0 R (page.3) 1255 0 R (page.30) 1487 0 R (page.31) 1493 0 R (page.32) 1499 0 R (page.33) 1506 0 R (page.34) 1514 0 R (page.35) 1519 0 R (page.36) 1525 0 R (page.37) 1535 0 R (page.38) 1542 0 R (page.39) 1546 0 R (page.4) 1266 0 R (page.40) 1556 0 R (page.41) 1561 0 R (page.42) 1568 0 R (page.43) 1577 0 R (page.44) 1586 0 R (page.45) 1594 0 R (page.46) 1605 0 R (page.47) 1611 0 R (page.48) 1617 0 R (page.49) 1624 0 R (page.5) 1273 0 R (page.50) 1628 0 R (page.51) 1635 0 R (page.52) 1643 0 R (page.53) 1650 0 R (page.54) 1654 0 R (page.55) 1659 0 R (page.56) 1663 0 R (page.57) 1667 0 R (page.58) 1673 0 R (page.59) 1678 0 R (page.6) 1285 0 R (page.60) 1683 0 R (page.61) 1690 0 R (page.62) 1695 0 R (page.63) 1705 0 R (page.64) 1709 0 R (page.65) 1713 0 R (page.66) 1718 0 R (page.67) 1728 0 R (page.68) 1736 0 R (page.69) 1741 0 R (page.7) 1291 0 R (page.70) 1745 0 R (page.71) 1749 0 R (page.72) 1753 0 R (page.73) 1762 0 R (page.74) 1769 0 R (page.75) 1774 0 R (page.76) 1781 0 R (page.77) 1788 0 R (page.78) 1794 0 R (page.79) 1801 0 R (page.8) 1299 0 R (page.80) 1809 0 R (page.81) 1813 0 R (page.82) 1818 0 R (page.83) 1823 0 R (page.84) 1828 0 R (page.85) 1833 0 R (page.86) 1838 0 R (page.87) 1844 0 R (page.88) 1853 0 R (page.89) 1858 0 R (page.9) 1308 0 R (page.90) 1863 0 R (page.91) 1868 0 R (page.92) 1872 0 R (page.93) 1876 0 R (page.94) 1884 0 R (page.95) 1891 0 R (page.96) 1911 0 R (page.97) 1926 0 R (page.98) 1937 0 R (page.99) 1953 0 R (page.i) 968 0 R (page.ii) 1023 0 R (page.iii) 1087 0 R (page.iv) 1150 0 R (page.v) 1212 0 R (pkcs11) 1483 0 R (proposed_standards) 1381 0 R (query_address) 1737 0 R (rfc5011.support) 1474 0 R (rfcs) 1251 0 R (rndc) 1590 0 R (root_delegation_only) 1887 0 R (rrset_ordering) 1304 0 R (sample_configuration) 1293 0 R (section*.10) 2263 0 R (section*.100) 2595 0 R (section*.101) 2596 0 R (section*.102) 2598 0 R (section*.103) 2599 0 R (section*.104) 2600 0 R (section*.105) 2601 0 R (section*.106) 2602 0 R (section*.107) 2609 0 R (section*.108) 2610 0 R (section*.109) 2611 0 R (section*.11) 2273 0 R (section*.110) 2616 0 R (section*.111) 2625 0 R (section*.112) 2626 0 R (section*.113) 2627 0 R (section*.114) 2628 0 R (section*.115) 2634 0 R (section*.116) 2635 0 R (section*.117) 2636 0 R (section*.118) 2637 0 R (section*.119) 2642 0 R (section*.12) 2293 0 R (section*.120) 2643 0 R (section*.121) 2644 0 R (section*.122) 2646 0 R (section*.123) 2647 0 R (section*.124) 2648 0 R (section*.125) 2654 0 R (section*.126) 2659 0 R (section*.127) 2660 0 R (section*.128) 2661 0 R (section*.129) 2663 0 R (section*.13) 2305 0 R (section*.130) 2664 0 R (section*.131) 2665 0 R (section*.132) 2666 0 R (section*.133) 2671 0 R (section*.134) 2672 0 R (section*.135) 2677 0 R (section*.136) 2679 0 R (section*.137) 2680 0 R (section*.138) 2681 0 R (section*.139) 2682 0 R (section*.14) 2331 0 R (section*.140) 2687 0 R (section*.141) 2688 0 R (section*.142) 2690 0 R (section*.143) 2691 0 R (section*.144) 2692 0 R (section*.145) 2693 0 R (section*.146) 2694 0 R (section*.147) 2696 0 R (section*.148) 2701 0 R (section*.149) 2702 0 R (section*.15) 2382 0 R (section*.150) 2703 0 R (section*.151) 2704 0 R (section*.152) 2705 0 R (section*.153) 2707 0 R (section*.154) 2708 0 R (section*.155) 2709 0 R (section*.156) 2715 0 R (section*.157) 2716 0 R (section*.158) 2717 0 R (section*.159) 2719 0 R (section*.16) 2383 0 R (section*.160) 2720 0 R (section*.161) 2721 0 R (section*.162) 2722 0 R (section*.163) 2723 0 R (section*.164) 2728 0 R (section*.17) 2384 0 R (section*.18) 2389 0 R (section*.19) 2390 0 R (section*.2) 2130 0 R (section*.20) 2395 0 R (section*.21) 2404 0 R (section*.22) 2409 0 R (section*.23) 2410 0 R (section*.24) 2411 0 R (section*.25) 2412 0 R (section*.26) 2414 0 R (section*.27) 2415 0 R (section*.28) 2421 0 R (section*.29) 2426 0 R (section*.3) 2136 0 R (section*.30) 2427 0 R (section*.31) 2428 0 R (section*.32) 2430 0 R (section*.33) 2431 0 R (section*.34) 2432 0 R (section*.35) 2433 0 R (section*.36) 2438 0 R (section*.37) 2439 0 R (section*.38) 2440 0 R (section*.39) 2441 0 R (section*.4) 2144 0 R (section*.40) 2442 0 R (section*.41) 2448 0 R (section*.42) 2449 0 R (section*.43) 2450 0 R (section*.44) 2451 0 R (section*.45) 2456 0 R (section*.46) 2461 0 R (section*.47) 2462 0 R (section*.48) 2463 0 R (section*.49) 2464 0 R (section*.5) 2169 0 R (section*.50) 2465 0 R (section*.51) 2471 0 R (section*.52) 2472 0 R (section*.53) 2481 0 R (section*.54) 2482 0 R (section*.55) 2487 0 R (section*.56) 2488 0 R (section*.57) 2489 0 R (section*.58) 2491 0 R (section*.59) 2492 0 R (section*.6) 2181 0 R (section*.60) 2493 0 R (section*.61) 2498 0 R (section*.62) 2499 0 R (section*.63) 2500 0 R (section*.64) 2501 0 R (section*.65) 2502 0 R (section*.66) 2503 0 R (section*.67) 2508 0 R (section*.68) 2509 0 R (section*.69) 2515 0 R (section*.7) 2195 0 R (section*.70) 2516 0 R (section*.71) 2517 0 R (section*.72) 2519 0 R (section*.73) 2520 0 R (section*.74) 2525 0 R (section*.75) 2526 0 R (section*.76) 2539 0 R (section*.77) 2540 0 R (section*.78) 2541 0 R (section*.79) 2543 0 R (section*.8) 2233 0 R (section*.80) 2544 0 R (section*.81) 2549 0 R (section*.82) 2550 0 R (section*.83) 2551 0 R (section*.84) 2552 0 R (section*.85) 2553 0 R (section*.86) 2555 0 R (section*.87) 2561 0 R (section*.88) 2562 0 R (section*.89) 2563 0 R (section*.9) 2251 0 R (section*.90) 2572 0 R (section*.91) 2573 0 R (section*.92) 2574 0 R (section*.93) 2576 0 R (section*.94) 2577 0 R (section*.95) 2578 0 R (section*.96) 2579 0 R (section*.97) 2588 0 R (section*.98) 2589 0 R (section*.99) 2590 0 R (section.1.1) 10 0 R (section.1.2) 14 0 R (section.1.3) 18 0 R (section.1.4) 22 0 R (section.2.1) 70 0 R (section.2.2) 74 0 R (section.2.3) 78 0 R (section.2.4) 82 0 R (section.2.5) 86 0 R (section.3.1) 94 0 R (section.3.2) 106 0 R (section.3.3) 110 0 R (section.4.1) 134 0 R (section.4.10) 274 0 R (section.4.11) 286 0 R (section.4.12) 338 0 R (section.4.2) 138 0 R (section.4.3) 146 0 R (section.4.4) 150 0 R (section.4.5) 158 0 R (section.4.6) 194 0 R (section.4.7) 198 0 R (section.4.8) 202 0 R (section.4.9) 218 0 R (section.5.1) 354 0 R (section.5.2) 358 0 R (section.6.1) 366 0 R (section.6.2) 394 0 R (section.6.3) 618 0 R (section.6.4) 674 0 R (section.7.1) 710 0 R (section.7.2) 714 0 R (section.7.3) 726 0 R (section.8.1) 734 0 R (section.8.2) 742 0 R (section.8.3) 746 0 R (section.A.1) 754 0 R (section.A.2) 762 0 R (section.A.3) 770 0 R (section.A.4) 786 0 R (section.B.1) 846 0 R (section.B.10) 882 0 R (section.B.11) 886 0 R (section.B.12) 890 0 R (section.B.13) 894 0 R (section.B.14) 898 0 R (section.B.15) 902 0 R (section.B.16) 906 0 R (section.B.17) 910 0 R (section.B.18) 914 0 R (section.B.19) 918 0 R (section.B.2) 850 0 R (section.B.20) 922 0 R (section.B.21) 926 0 R (section.B.3) 854 0 R (section.B.4) 858 0 R (section.B.5) 862 0 R (section.B.6) 866 0 R (section.B.7) 870 0 R (section.B.8) 874 0 R (section.B.9) 878 0 R (server_resource_limits) 1763 0 R (server_statement_definition_and_usage) 1701 0 R (server_statement_grammar) 1834 0 R (statistics) 2030 0 R (statistics_counters) 2038 0 R (statschannels) 1845 0 R (statsfile) 1669 0 R (subsection.1.4.1) 26 0 R (subsection.1.4.2) 30 0 R (subsection.1.4.3) 34 0 R (subsection.1.4.4) 38 0 R (subsection.1.4.5) 54 0 R (subsection.1.4.6) 62 0 R (subsection.3.1.1) 98 0 R (subsection.3.1.2) 102 0 R (subsection.3.3.1) 114 0 R (subsection.3.3.2) 126 0 R (subsection.4.10.1) 278 0 R (subsection.4.10.2) 282 0 R (subsection.4.11.1) 290 0 R (subsection.4.11.2) 306 0 R (subsection.4.11.3) 322 0 R (subsection.4.11.4) 326 0 R (subsection.4.11.5) 330 0 R (subsection.4.11.6) 334 0 R (subsection.4.12.1) 342 0 R (subsection.4.12.2) 346 0 R (subsection.4.2.1) 142 0 R (subsection.4.4.1) 154 0 R (subsection.4.5.1) 162 0 R (subsection.4.5.2) 174 0 R (subsection.4.5.3) 178 0 R (subsection.4.5.4) 182 0 R (subsection.4.5.5) 186 0 R (subsection.4.5.6) 190 0 R (subsection.4.8.1) 206 0 R (subsection.4.8.2) 210 0 R (subsection.4.8.3) 214 0 R (subsection.4.9.1) 222 0 R (subsection.4.9.10) 258 0 R (subsection.4.9.11) 262 0 R (subsection.4.9.12) 266 0 R (subsection.4.9.13) 270 0 R (subsection.4.9.2) 226 0 R (subsection.4.9.3) 230 0 R (subsection.4.9.4) 234 0 R (subsection.4.9.5) 238 0 R (subsection.4.9.6) 242 0 R (subsection.4.9.7) 246 0 R (subsection.4.9.8) 250 0 R (subsection.4.9.9) 254 0 R (subsection.6.1.1) 370 0 R (subsection.6.1.2) 382 0 R (subsection.6.2.1) 398 0 R (subsection.6.2.10) 434 0 R (subsection.6.2.11) 450 0 R (subsection.6.2.12) 454 0 R (subsection.6.2.13) 458 0 R (subsection.6.2.14) 462 0 R (subsection.6.2.15) 466 0 R (subsection.6.2.16) 470 0 R (subsection.6.2.17) 554 0 R (subsection.6.2.18) 558 0 R (subsection.6.2.19) 562 0 R (subsection.6.2.2) 402 0 R (subsection.6.2.20) 566 0 R (subsection.6.2.21) 570 0 R (subsection.6.2.22) 574 0 R (subsection.6.2.23) 578 0 R (subsection.6.2.24) 582 0 R (subsection.6.2.25) 586 0 R (subsection.6.2.26) 590 0 R (subsection.6.2.27) 594 0 R (subsection.6.2.28) 598 0 R (subsection.6.2.3) 406 0 R (subsection.6.2.4) 410 0 R (subsection.6.2.5) 414 0 R (subsection.6.2.6) 418 0 R (subsection.6.2.7) 422 0 R (subsection.6.2.8) 426 0 R (subsection.6.2.9) 430 0 R (subsection.6.3.1) 622 0 R (subsection.6.3.2) 634 0 R (subsection.6.3.3) 638 0 R (subsection.6.3.4) 642 0 R (subsection.6.3.5) 646 0 R (subsection.6.3.6) 666 0 R (subsection.6.3.7) 670 0 R (subsection.6.4.1) 682 0 R (subsection.7.2.1) 718 0 R (subsection.7.2.2) 722 0 R (subsection.8.1.1) 738 0 R (subsection.A.1.1) 758 0 R (subsection.A.2.1) 766 0 R (subsection.A.3.1) 774 0 R (subsection.A.3.2) 778 0 R (subsection.A.3.3) 782 0 R (subsection.A.4.1) 790 0 R (subsection.A.4.2) 794 0 R (subsection.A.4.3) 798 0 R (subsection.A.4.4) 802 0 R (subsection.A.4.5) 806 0 R (subsection.A.4.6) 810 0 R (subsection.A.4.7) 838 0 R (subsubsection.1.4.4.1) 42 0 R (subsubsection.1.4.4.2) 46 0 R (subsubsection.1.4.4.3) 50 0 R (subsubsection.1.4.5.1) 58 0 R (subsubsection.3.3.1.1) 118 0 R (subsubsection.3.3.1.2) 122 0 R (subsubsection.4.11.1.1) 294 0 R (subsubsection.4.11.1.2) 298 0 R (subsubsection.4.11.1.3) 302 0 R (subsubsection.4.11.2.1) 310 0 R (subsubsection.4.11.2.2) 314 0 R (subsubsection.4.11.2.3) 318 0 R (subsubsection.4.5.1.1) 166 0 R (subsubsection.4.5.1.2) 170 0 R (subsubsection.6.1.1.1) 374 0 R (subsubsection.6.1.1.2) 378 0 R (subsubsection.6.1.2.1) 386 0 R (subsubsection.6.1.2.2) 390 0 R (subsubsection.6.2.10.1) 438 0 R (subsubsection.6.2.10.2) 442 0 R (subsubsection.6.2.10.3) 446 0 R (subsubsection.6.2.16.1) 474 0 R (subsubsection.6.2.16.10) 510 0 R (subsubsection.6.2.16.11) 514 0 R (subsubsection.6.2.16.12) 518 0 R (subsubsection.6.2.16.13) 522 0 R (subsubsection.6.2.16.14) 526 0 R (subsubsection.6.2.16.15) 530 0 R (subsubsection.6.2.16.16) 534 0 R (subsubsection.6.2.16.17) 538 0 R (subsubsection.6.2.16.18) 542 0 R (subsubsection.6.2.16.19) 546 0 R (subsubsection.6.2.16.2) 478 0 R (subsubsection.6.2.16.20) 550 0 R (subsubsection.6.2.16.3) 482 0 R (subsubsection.6.2.16.4) 486 0 R (subsubsection.6.2.16.5) 490 0 R (subsubsection.6.2.16.6) 494 0 R (subsubsection.6.2.16.7) 498 0 R (subsubsection.6.2.16.8) 502 0 R (subsubsection.6.2.16.9) 506 0 R (subsubsection.6.2.28.1) 602 0 R (subsubsection.6.2.28.2) 606 0 R (subsubsection.6.2.28.3) 610 0 R (subsubsection.6.2.28.4) 614 0 R (subsubsection.6.3.1.1) 626 0 R (subsubsection.6.3.1.2) 630 0 R (subsubsection.6.3.5.1) 650 0 R (subsubsection.6.3.5.2) 654 0 R (subsubsection.6.3.5.3) 658 0 R (subsubsection.6.3.5.4) 662 0 R (subsubsection.6.4.0.1) 678 0 R (subsubsection.6.4.1.1) 686 0 R (subsubsection.6.4.1.2) 690 0 R (subsubsection.6.4.1.3) 694 0 R (subsubsection.6.4.1.4) 698 0 R (subsubsection.6.4.1.5) 702 0 R (subsubsection.A.4.6.1) 814 0 R (subsubsection.A.4.6.2) 818 0 R (subsubsection.A.4.6.3) 822 0 R (subsubsection.A.4.6.4) 826 0 R (subsubsection.A.4.6.5) 830 0 R (subsubsection.A.4.6.6) 834 0 R (table.1.1) 1235 0 R (table.1.2) 1243 0 R (table.3.1) 1302 0 R (table.3.2) 1345 0 R (table.6.1) 1550 0 R (table.6.10) 1969 0 R (table.6.11) 1975 0 R (table.6.12) 1982 0 R (table.6.13) 1989 0 R (table.6.14) 1991 0 R (table.6.15) 1998 0 R (table.6.16) 2001 0 R (table.6.17) 2004 0 R (table.6.18) 2020 0 R (table.6.19) 2032 0 R (table.6.2) 1572 0 R (table.6.20) 2041 0 R (table.6.21) 2049 0 R (table.6.22) 2052 0 R (table.6.23) 2060 0 R (table.6.3) 1581 0 R (table.6.4) 1619 0 R (table.6.5) 1631 0 R (table.6.6) 1685 0 R (table.6.7) 1784 0 R (table.6.8) 1880 0 R (table.6.9) 1955 0 R (the_category_phrase) 1613 0 R (the_sortlist_statement) 1775 0 R (topology) 1770 0 R (trusted-keys) 1847 0 R (tsig) 1397 0 R (tuning) 1789 0 R (types_of_resource_records_and_when_to_use_them) 1250 0 R (view_statement_grammar) 1805 0 R (zone_statement_grammar) 1724 0 R (zone_transfers) 1371 0 R (zonefile_format) 1797 0 R]
/Limits [(Access_Control_Lists) (zonefile_format)]
>> endobj
2756 0 obj <<
@@ -16348,7 +16372,7 @@ endobj
>> endobj
2759 0 obj <<
/Author()/Title()/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfeTeX-1.21a)/Keywords()
-/CreationDate (D:20120322172405Z)
+/CreationDate (D:20120720044330Z)
/PTEX.Fullbanner (This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) kpathsea version 3.5.4)
>> endobj
xref
@@ -16359,928 +16383,928 @@ xref
0000000004 00000 f
0000000000 00000 f
0000000009 00000 n
-0000348640 00000 n
-0001181592 00000 n
+0000348639 00000 n
+0001182928 00000 n
0000000054 00000 n
0000000086 00000 n
-0000348767 00000 n
-0001181520 00000 n
+0000348766 00000 n
+0001182856 00000 n
0000000133 00000 n
0000000173 00000 n
-0000348895 00000 n
-0001181434 00000 n
+0000348894 00000 n
+0001182770 00000 n
0000000221 00000 n
0000000273 00000 n
-0000349023 00000 n
-0001181348 00000 n
+0000349022 00000 n
+0001182684 00000 n
0000000321 00000 n
0000000377 00000 n
-0000353309 00000 n
-0001181238 00000 n
+0000353308 00000 n
+0001182574 00000 n
0000000425 00000 n
0000000478 00000 n
-0000353436 00000 n
-0001181164 00000 n
+0000353435 00000 n
+0001182500 00000 n
0000000531 00000 n
0000000572 00000 n
-0000353564 00000 n
-0001181077 00000 n
+0000353563 00000 n
+0001182413 00000 n
0000000625 00000 n
0000000674 00000 n
-0000353691 00000 n
-0001180990 00000 n
+0000353690 00000 n
+0001182326 00000 n
0000000727 00000 n
0000000757 00000 n
-0000357988 00000 n
-0001180866 00000 n
+0000357987 00000 n
+0001182202 00000 n
0000000810 00000 n
0000000861 00000 n
-0000358116 00000 n
-0001180792 00000 n
+0000358115 00000 n
+0001182128 00000 n
0000000919 00000 n
0000000964 00000 n
-0000358244 00000 n
-0001180705 00000 n
+0000358243 00000 n
+0001182041 00000 n
0000001022 00000 n
0000001062 00000 n
-0000358372 00000 n
-0001180631 00000 n
+0000358371 00000 n
+0001181967 00000 n
0000001120 00000 n
0000001162 00000 n
-0000361357 00000 n
-0001180507 00000 n
+0000361356 00000 n
+0001181843 00000 n
0000001215 00000 n
0000001260 00000 n
-0000361485 00000 n
-0001180446 00000 n
+0000361484 00000 n
+0001181782 00000 n
0000001318 00000 n
0000001355 00000 n
-0000361613 00000 n
-0001180372 00000 n
+0000361612 00000 n
+0001181708 00000 n
0000001408 00000 n
0000001463 00000 n
-0000364560 00000 n
-0001180247 00000 n
+0000364559 00000 n
+0001181583 00000 n
0000001509 00000 n
0000001556 00000 n
-0000364688 00000 n
-0001180173 00000 n
+0000364687 00000 n
+0001181509 00000 n
0000001604 00000 n
0000001648 00000 n
-0000364816 00000 n
-0001180086 00000 n
+0000364815 00000 n
+0001181422 00000 n
0000001696 00000 n
0000001735 00000 n
-0000364944 00000 n
-0001179999 00000 n
+0000364943 00000 n
+0001181335 00000 n
0000001783 00000 n
0000001825 00000 n
-0000365071 00000 n
-0001179912 00000 n
+0000365070 00000 n
+0001181248 00000 n
0000001873 00000 n
0000001936 00000 n
-0000366148 00000 n
-0001179838 00000 n
+0000366147 00000 n
+0001181174 00000 n
0000001984 00000 n
0000002034 00000 n
-0000367807 00000 n
-0001179710 00000 n
+0000367806 00000 n
+0001181046 00000 n
0000002080 00000 n
0000002126 00000 n
-0000367934 00000 n
-0001179597 00000 n
+0000367933 00000 n
+0001180933 00000 n
0000002174 00000 n
0000002218 00000 n
-0000368062 00000 n
-0001179521 00000 n
+0000368061 00000 n
+0001180857 00000 n
0000002271 00000 n
0000002323 00000 n
-0000368190 00000 n
-0001179444 00000 n
+0000368189 00000 n
+0001180780 00000 n
0000002377 00000 n
0000002436 00000 n
-0000370639 00000 n
-0001179353 00000 n
+0000370638 00000 n
+0001180689 00000 n
0000002485 00000 n
0000002523 00000 n
-0000373977 00000 n
-0001179236 00000 n
+0000373976 00000 n
+0001180572 00000 n
0000002572 00000 n
0000002618 00000 n
-0000374105 00000 n
-0001179118 00000 n
+0000374104 00000 n
+0001180454 00000 n
0000002672 00000 n
0000002739 00000 n
-0000374233 00000 n
-0001179039 00000 n
+0000374232 00000 n
+0001180375 00000 n
0000002798 00000 n
0000002842 00000 n
-0000374362 00000 n
-0001178960 00000 n
+0000374361 00000 n
+0001180296 00000 n
0000002901 00000 n
0000002949 00000 n
-0000389228 00000 n
-0001178881 00000 n
+0000389227 00000 n
+0001180217 00000 n
0000003003 00000 n
0000003036 00000 n
-0000394852 00000 n
-0001178748 00000 n
+0000394851 00000 n
+0001180084 00000 n
0000003083 00000 n
0000003126 00000 n
-0000394981 00000 n
-0001178669 00000 n
+0000394980 00000 n
+0001180005 00000 n
0000003175 00000 n
0000003205 00000 n
-0000395110 00000 n
-0001178537 00000 n
+0000395109 00000 n
+0001179873 00000 n
0000003254 00000 n
0000003292 00000 n
-0000399482 00000 n
-0001178472 00000 n
+0000399481 00000 n
+0001179808 00000 n
0000003346 00000 n
0000003388 00000 n
-0000399611 00000 n
-0001178379 00000 n
+0000399610 00000 n
+0001179715 00000 n
0000003437 00000 n
0000003496 00000 n
-0000399740 00000 n
-0001178247 00000 n
+0000399739 00000 n
+0001179583 00000 n
0000003545 00000 n
0000003578 00000 n
-0000403460 00000 n
-0001178182 00000 n
+0000403459 00000 n
+0001179518 00000 n
0000003632 00000 n
0000003681 00000 n
-0000406614 00000 n
-0001178050 00000 n
+0000406613 00000 n
+0001179386 00000 n
0000003730 00000 n
0000003758 00000 n
-0000409559 00000 n
-0001177932 00000 n
+0000409558 00000 n
+0001179268 00000 n
0000003812 00000 n
0000003881 00000 n
-0000409688 00000 n
-0001177853 00000 n
+0000409687 00000 n
+0001179189 00000 n
0000003940 00000 n
0000003988 00000 n
-0000409817 00000 n
-0001177774 00000 n
+0000409816 00000 n
+0001179110 00000 n
0000004047 00000 n
0000004092 00000 n
-0000409946 00000 n
-0001177681 00000 n
+0000409945 00000 n
+0001179017 00000 n
0000004146 00000 n
0000004214 00000 n
-0000410075 00000 n
-0001177588 00000 n
+0000410074 00000 n
+0001178924 00000 n
0000004268 00000 n
0000004338 00000 n
-0000413538 00000 n
-0001177495 00000 n
+0000413537 00000 n
+0001178831 00000 n
0000004392 00000 n
0000004455 00000 n
-0000413667 00000 n
-0001177402 00000 n
+0000413666 00000 n
+0001178738 00000 n
0000004509 00000 n
0000004564 00000 n
-0000413796 00000 n
-0001177323 00000 n
+0000413795 00000 n
+0001178659 00000 n
0000004618 00000 n
0000004650 00000 n
-0000413925 00000 n
-0001177230 00000 n
+0000413924 00000 n
+0001178566 00000 n
0000004699 00000 n
0000004727 00000 n
-0000417785 00000 n
-0001177137 00000 n
+0000417784 00000 n
+0001178473 00000 n
0000004776 00000 n
0000004808 00000 n
-0000417914 00000 n
-0001177005 00000 n
+0000417913 00000 n
+0001178341 00000 n
0000004857 00000 n
0000004887 00000 n
-0000418042 00000 n
-0001176926 00000 n
+0000418041 00000 n
+0001178262 00000 n
0000004941 00000 n
0000004982 00000 n
-0000421945 00000 n
-0001176833 00000 n
+0000421944 00000 n
+0001178169 00000 n
0000005036 00000 n
0000005078 00000 n
-0000422073 00000 n
-0001176754 00000 n
+0000422072 00000 n
+0001178090 00000 n
0000005132 00000 n
0000005177 00000 n
-0000427213 00000 n
-0001176621 00000 n
+0000427212 00000 n
+0001177957 00000 n
0000005226 00000 n
0000005294 00000 n
-0000427342 00000 n
-0001176542 00000 n
+0000427341 00000 n
+0001177878 00000 n
0000005348 00000 n
0000005408 00000 n
-0000431147 00000 n
-0001176449 00000 n
+0000431146 00000 n
+0001177785 00000 n
0000005462 00000 n
0000005513 00000 n
-0000431276 00000 n
-0001176356 00000 n
+0000431275 00000 n
+0001177692 00000 n
0000005567 00000 n
0000005621 00000 n
-0000431405 00000 n
-0001176263 00000 n
+0000431404 00000 n
+0001177599 00000 n
0000005675 00000 n
0000005721 00000 n
-0000434523 00000 n
-0001176170 00000 n
+0000434522 00000 n
+0001177506 00000 n
0000005775 00000 n
0000005817 00000 n
-0000434652 00000 n
-0001176077 00000 n
+0000434651 00000 n
+0001177413 00000 n
0000005871 00000 n
0000005922 00000 n
-0000434781 00000 n
-0001175984 00000 n
+0000434780 00000 n
+0001177320 00000 n
0000005976 00000 n
0000006025 00000 n
-0000437879 00000 n
-0001175891 00000 n
+0000437878 00000 n
+0001177227 00000 n
0000006079 00000 n
0000006136 00000 n
-0000438008 00000 n
-0001175798 00000 n
+0000438007 00000 n
+0001177134 00000 n
0000006190 00000 n
0000006245 00000 n
-0000438136 00000 n
-0001175705 00000 n
+0000438135 00000 n
+0001177041 00000 n
0000006300 00000 n
0000006356 00000 n
-0000438265 00000 n
-0001175612 00000 n
+0000438264 00000 n
+0001176948 00000 n
0000006411 00000 n
0000006472 00000 n
-0000438393 00000 n
-0001175519 00000 n
+0000438392 00000 n
+0001176855 00000 n
0000006527 00000 n
0000006573 00000 n
-0000438521 00000 n
-0001175440 00000 n
+0000438520 00000 n
+0001176776 00000 n
0000006628 00000 n
0000006671 00000 n
-0000438650 00000 n
-0001175308 00000 n
+0000438649 00000 n
+0001176644 00000 n
0000006721 00000 n
0000006777 00000 n
-0000438779 00000 n
-0001175229 00000 n
+0000438778 00000 n
+0001176565 00000 n
0000006832 00000 n
0000006878 00000 n
-0000442371 00000 n
-0001175150 00000 n
+0000442370 00000 n
+0001176486 00000 n
0000006933 00000 n
0000006980 00000 n
-0000442500 00000 n
-0001175018 00000 n
+0000442499 00000 n
+0001176354 00000 n
0000007030 00000 n
0000007087 00000 n
-0000445660 00000 n
-0001174900 00000 n
+0000445659 00000 n
+0001176236 00000 n
0000007142 00000 n
0000007182 00000 n
-0000448355 00000 n
-0001174821 00000 n
+0000448354 00000 n
+0001176157 00000 n
0000007242 00000 n
0000007315 00000 n
-0000448484 00000 n
-0001174728 00000 n
+0000448483 00000 n
+0001176064 00000 n
0000007375 00000 n
0000007448 00000 n
-0000451265 00000 n
-0001174649 00000 n
+0000451264 00000 n
+0001175985 00000 n
0000007508 00000 n
0000007565 00000 n
-0000451394 00000 n
-0001174517 00000 n
+0000451393 00000 n
+0001175853 00000 n
0000007620 00000 n
0000007678 00000 n
-0000451523 00000 n
-0001174438 00000 n
+0000451522 00000 n
+0001175774 00000 n
0000007738 00000 n
0000007815 00000 n
-0000454017 00000 n
-0001174345 00000 n
+0000454016 00000 n
+0001175681 00000 n
0000007875 00000 n
0000007952 00000 n
-0000454146 00000 n
-0001174266 00000 n
+0000454145 00000 n
+0001175602 00000 n
0000008012 00000 n
0000008071 00000 n
-0000454275 00000 n
-0001174173 00000 n
+0000454274 00000 n
+0001175509 00000 n
0000008126 00000 n
0000008170 00000 n
-0000454404 00000 n
-0001174080 00000 n
+0000454403 00000 n
+0001175416 00000 n
0000008225 00000 n
0000008265 00000 n
-0000460724 00000 n
-0001173987 00000 n
+0000460723 00000 n
+0001175323 00000 n
0000008320 00000 n
0000008388 00000 n
-0000460853 00000 n
-0001173908 00000 n
+0000460852 00000 n
+0001175244 00000 n
0000008443 00000 n
0000008514 00000 n
-0000463644 00000 n
-0001173790 00000 n
+0000463643 00000 n
+0001175126 00000 n
0000008564 00000 n
0000008611 00000 n
-0000463773 00000 n
-0001173711 00000 n
+0000463772 00000 n
+0001175047 00000 n
0000008666 00000 n
0000008727 00000 n
-0000463902 00000 n
-0001173632 00000 n
+0000463901 00000 n
+0001174968 00000 n
0000008782 00000 n
0000008852 00000 n
-0000466344 00000 n
-0001173499 00000 n
+0000466343 00000 n
+0001174835 00000 n
0000008899 00000 n
0000008952 00000 n
-0000466473 00000 n
-0001173420 00000 n
+0000466472 00000 n
+0001174756 00000 n
0000009001 00000 n
0000009057 00000 n
-0000466602 00000 n
-0001173341 00000 n
+0000466601 00000 n
+0001174677 00000 n
0000009106 00000 n
0000009155 00000 n
-0000470872 00000 n
-0001173208 00000 n
+0000470871 00000 n
+0001174544 00000 n
0000009202 00000 n
0000009254 00000 n
-0000471001 00000 n
-0001173090 00000 n
+0000471000 00000 n
+0001174426 00000 n
0000009303 00000 n
0000009354 00000 n
-0000475693 00000 n
-0001172972 00000 n
+0000475692 00000 n
+0001174308 00000 n
0000009408 00000 n
0000009453 00000 n
-0000475821 00000 n
-0001172893 00000 n
+0000475820 00000 n
+0001174229 00000 n
0000009512 00000 n
0000009546 00000 n
-0000479414 00000 n
-0001172814 00000 n
+0000479413 00000 n
+0001174150 00000 n
0000009605 00000 n
0000009653 00000 n
-0000479543 00000 n
-0001172696 00000 n
+0000479542 00000 n
+0001174032 00000 n
0000009707 00000 n
0000009747 00000 n
-0000479672 00000 n
-0001172617 00000 n
+0000479671 00000 n
+0001173953 00000 n
0000009806 00000 n
0000009840 00000 n
-0000482524 00000 n
-0001172538 00000 n
+0000482523 00000 n
+0001173874 00000 n
0000009899 00000 n
0000009947 00000 n
-0000482653 00000 n
-0001172405 00000 n
+0000482652 00000 n
+0001173741 00000 n
0000009996 00000 n
0000010046 00000 n
-0000485723 00000 n
-0001172326 00000 n
+0000485722 00000 n
+0001173662 00000 n
0000010100 00000 n
0000010147 00000 n
-0000485851 00000 n
-0001172233 00000 n
+0000485850 00000 n
+0001173569 00000 n
0000010201 00000 n
0000010261 00000 n
-0000486110 00000 n
-0001172140 00000 n
+0000486109 00000 n
+0001173476 00000 n
0000010315 00000 n
0000010367 00000 n
-0000491292 00000 n
-0001172047 00000 n
+0000491291 00000 n
+0001173383 00000 n
0000010421 00000 n
0000010486 00000 n
-0000491421 00000 n
-0001171954 00000 n
+0000491420 00000 n
+0001173290 00000 n
0000010540 00000 n
0000010591 00000 n
-0000494898 00000 n
-0001171861 00000 n
+0000494897 00000 n
+0001173197 00000 n
0000010645 00000 n
0000010709 00000 n
-0000495027 00000 n
-0001171768 00000 n
+0000495026 00000 n
+0001173104 00000 n
0000010763 00000 n
0000010810 00000 n
-0000495156 00000 n
-0001171675 00000 n
+0000495155 00000 n
+0001173011 00000 n
0000010864 00000 n
0000010924 00000 n
-0000495285 00000 n
-0001171582 00000 n
+0000495284 00000 n
+0001172918 00000 n
0000010978 00000 n
0000011029 00000 n
-0000499303 00000 n
-0001171450 00000 n
+0000499302 00000 n
+0001172786 00000 n
0000011084 00000 n
0000011149 00000 n
-0000499432 00000 n
-0001171371 00000 n
+0000499431 00000 n
+0001172707 00000 n
0000011209 00000 n
0000011256 00000 n
-0000506253 00000 n
-0001171278 00000 n
+0000506252 00000 n
+0001172614 00000 n
0000011316 00000 n
0000011364 00000 n
-0000513362 00000 n
-0001171199 00000 n
+0000513361 00000 n
+0001172535 00000 n
0000011424 00000 n
0000011478 00000 n
-0000516959 00000 n
-0001171106 00000 n
+0000516958 00000 n
+0001172442 00000 n
0000011533 00000 n
0000011583 00000 n
-0000517088 00000 n
-0001171013 00000 n
+0000517087 00000 n
+0001172349 00000 n
0000011638 00000 n
0000011701 00000 n
-0000519025 00000 n
-0001170920 00000 n
+0000519024 00000 n
+0001172256 00000 n
0000011756 00000 n
0000011808 00000 n
-0000519154 00000 n
-0001170827 00000 n
+0000519153 00000 n
+0001172163 00000 n
0000011863 00000 n
0000011928 00000 n
-0000519283 00000 n
-0001170734 00000 n
+0000519282 00000 n
+0001172070 00000 n
0000011983 00000 n
0000012035 00000 n
-0000524634 00000 n
-0001170601 00000 n
+0000524428 00000 n
+0001171937 00000 n
0000012090 00000 n
0000012155 00000 n
-0000544648 00000 n
-0001170522 00000 n
+0000544388 00000 n
+0001171858 00000 n
0000012215 00000 n
0000012259 00000 n
-0000566543 00000 n
-0001170429 00000 n
+0000565985 00000 n
+0001171765 00000 n
0000012319 00000 n
0000012358 00000 n
-0000569882 00000 n
-0001170336 00000 n
+0000569620 00000 n
+0001171672 00000 n
0000012418 00000 n
0000012465 00000 n
-0000570011 00000 n
-0001170243 00000 n
+0000569749 00000 n
+0001171579 00000 n
0000012525 00000 n
0000012568 00000 n
-0000574357 00000 n
-0001170150 00000 n
+0000574175 00000 n
+0001171486 00000 n
0000012628 00000 n
0000012667 00000 n
-0000577879 00000 n
-0001170057 00000 n
+0000577523 00000 n
+0001171393 00000 n
0000012727 00000 n
0000012769 00000 n
-0000580951 00000 n
-0001169964 00000 n
+0000584483 00000 n
+0001171300 00000 n
0000012829 00000 n
0000012872 00000 n
-0000592154 00000 n
-0001169871 00000 n
+0000592253 00000 n
+0001171207 00000 n
0000012932 00000 n
0000012975 00000 n
-0000592283 00000 n
-0001169778 00000 n
+0000592382 00000 n
+0001171114 00000 n
0000013035 00000 n
0000013096 00000 n
-0000592412 00000 n
-0001169685 00000 n
+0000596338 00000 n
+0001171021 00000 n
0000013157 00000 n
0000013209 00000 n
-0000596564 00000 n
-0001169592 00000 n
+0000596467 00000 n
+0001170928 00000 n
0000013270 00000 n
0000013323 00000 n
-0000599832 00000 n
-0001169499 00000 n
+0000599686 00000 n
+0001170835 00000 n
0000013384 00000 n
0000013422 00000 n
-0000599961 00000 n
-0001169406 00000 n
+0000603538 00000 n
+0001170742 00000 n
0000013483 00000 n
0000013535 00000 n
-0000607050 00000 n
-0001169313 00000 n
+0000606956 00000 n
+0001170649 00000 n
0000013596 00000 n
0000013640 00000 n
-0000607308 00000 n
-0001169220 00000 n
+0000610967 00000 n
+0001170556 00000 n
0000013701 00000 n
0000013737 00000 n
-0000616212 00000 n
-0001169127 00000 n
+0000619337 00000 n
+0001170463 00000 n
0000013798 00000 n
0000013861 00000 n
-0000619235 00000 n
-0001169034 00000 n
+0000619466 00000 n
+0001170370 00000 n
0000013922 00000 n
0000013972 00000 n
-0000622249 00000 n
-0001168941 00000 n
+0000626008 00000 n
+0001170277 00000 n
0000014033 00000 n
0000014089 00000 n
-0000626720 00000 n
-0001168848 00000 n
+0000626135 00000 n
+0001170184 00000 n
0000014150 00000 n
0000014197 00000 n
-0000630845 00000 n
-0001168769 00000 n
+0000634312 00000 n
+0001170105 00000 n
0000014258 00000 n
0000014326 00000 n
-0000637589 00000 n
-0001168676 00000 n
+0000640547 00000 n
+0001170012 00000 n
0000014381 00000 n
0000014432 00000 n
-0000641551 00000 n
-0001168583 00000 n
+0000640676 00000 n
+0001169919 00000 n
0000014487 00000 n
0000014551 00000 n
-0000645997 00000 n
-0001168490 00000 n
+0000649330 00000 n
+0001169826 00000 n
0000014606 00000 n
0000014670 00000 n
-0000646124 00000 n
-0001168397 00000 n
+0000649459 00000 n
+0001169733 00000 n
0000014725 00000 n
0000014802 00000 n
-0000649682 00000 n
-0001168304 00000 n
+0000649588 00000 n
+0001169640 00000 n
0000014857 00000 n
0000014914 00000 n
-0000649811 00000 n
-0001168211 00000 n
+0000649717 00000 n
+0001169547 00000 n
0000014969 00000 n
0000015039 00000 n
-0000649940 00000 n
-0001168118 00000 n
+0000654026 00000 n
+0001169454 00000 n
0000015094 00000 n
0000015151 00000 n
-0000650069 00000 n
-0001168025 00000 n
+0000654155 00000 n
+0001169361 00000 n
0000015206 00000 n
0000015276 00000 n
-0000654253 00000 n
-0001167932 00000 n
+0000657626 00000 n
+0001169268 00000 n
0000015331 00000 n
0000015380 00000 n
-0000654381 00000 n
-0001167839 00000 n
+0000657755 00000 n
+0001169175 00000 n
0000015435 00000 n
0000015497 00000 n
-0000657008 00000 n
-0001167746 00000 n
+0000659509 00000 n
+0001169082 00000 n
0000015552 00000 n
0000015601 00000 n
-0000661703 00000 n
-0001167628 00000 n
+0000665970 00000 n
+0001168964 00000 n
0000015656 00000 n
0000015718 00000 n
-0000661831 00000 n
-0001167549 00000 n
+0000666099 00000 n
+0001168885 00000 n
0000015778 00000 n
0000015817 00000 n
-0000669071 00000 n
-0001167456 00000 n
+0000670336 00000 n
+0001168792 00000 n
0000015877 00000 n
0000015911 00000 n
-0000674993 00000 n
-0001167363 00000 n
+0000676258 00000 n
+0001168699 00000 n
0000015971 00000 n
0000016012 00000 n
-0000690633 00000 n
-0001167284 00000 n
+0000691898 00000 n
+0001168620 00000 n
0000016072 00000 n
0000016124 00000 n
-0000701315 00000 n
-0001167152 00000 n
+0000702584 00000 n
+0001168488 00000 n
0000016173 00000 n
0000016206 00000 n
-0000701444 00000 n
-0001167034 00000 n
+0000702713 00000 n
+0001168370 00000 n
0000016260 00000 n
0000016332 00000 n
-0000701573 00000 n
-0001166955 00000 n
+0000702842 00000 n
+0001168291 00000 n
0000016391 00000 n
0000016435 00000 n
-0000712174 00000 n
-0001166876 00000 n
+0000713443 00000 n
+0001168212 00000 n
0000016494 00000 n
0000016547 00000 n
-0000712563 00000 n
-0001166783 00000 n
+0000713832 00000 n
+0001168119 00000 n
0000016601 00000 n
0000016651 00000 n
-0000716417 00000 n
-0001166690 00000 n
+0000717686 00000 n
+0001168026 00000 n
0000016705 00000 n
0000016743 00000 n
-0000716676 00000 n
-0001166597 00000 n
+0000717945 00000 n
+0001167933 00000 n
0000016797 00000 n
0000016846 00000 n
-0000719449 00000 n
-0001166465 00000 n
+0000720718 00000 n
+0001167801 00000 n
0000016900 00000 n
0000016952 00000 n
-0000719574 00000 n
-0001166386 00000 n
+0000720843 00000 n
+0001167722 00000 n
0000017011 00000 n
0000017056 00000 n
-0000719703 00000 n
-0001166293 00000 n
+0000720972 00000 n
+0001167629 00000 n
0000017115 00000 n
0000017167 00000 n
-0000719832 00000 n
-0001166200 00000 n
+0000721101 00000 n
+0001167536 00000 n
0000017226 00000 n
0000017279 00000 n
-0000722284 00000 n
-0001166121 00000 n
+0000723553 00000 n
+0001167457 00000 n
0000017338 00000 n
0000017387 00000 n
-0000722413 00000 n
-0001166028 00000 n
+0000723682 00000 n
+0001167364 00000 n
0000017441 00000 n
0000017521 00000 n
-0000726728 00000 n
-0001165949 00000 n
+0000727997 00000 n
+0001167285 00000 n
0000017575 00000 n
0000017624 00000 n
-0000730234 00000 n
-0001165831 00000 n
+0000731503 00000 n
+0001167167 00000 n
0000017673 00000 n
0000017713 00000 n
-0000730493 00000 n
-0001165752 00000 n
+0000731762 00000 n
+0001167088 00000 n
0000017772 00000 n
0000017819 00000 n
-0000733925 00000 n
-0001165634 00000 n
+0000735194 00000 n
+0001166970 00000 n
0000017873 00000 n
0000017918 00000 n
-0000734054 00000 n
-0001165555 00000 n
+0000735323 00000 n
+0001166891 00000 n
0000017977 00000 n
0000018036 00000 n
-0000737409 00000 n
-0001165462 00000 n
+0000738678 00000 n
+0001166798 00000 n
0000018095 00000 n
0000018159 00000 n
-0000737668 00000 n
-0001165369 00000 n
+0000738937 00000 n
+0001166705 00000 n
0000018218 00000 n
0000018274 00000 n
-0000741825 00000 n
-0001165276 00000 n
+0000743094 00000 n
+0001166612 00000 n
0000018333 00000 n
0000018391 00000 n
-0000743846 00000 n
-0001165197 00000 n
+0000745115 00000 n
+0001166533 00000 n
0000018450 00000 n
0000018512 00000 n
-0000746014 00000 n
-0001165064 00000 n
+0000747283 00000 n
+0001166400 00000 n
0000018559 00000 n
0000018611 00000 n
-0000746142 00000 n
-0001164985 00000 n
+0000747411 00000 n
+0001166321 00000 n
0000018660 00000 n
0000018704 00000 n
-0000750177 00000 n
-0001164853 00000 n
+0000751446 00000 n
+0001166189 00000 n
0000018753 00000 n
0000018794 00000 n
-0000750306 00000 n
-0001164774 00000 n
+0000751575 00000 n
+0001166110 00000 n
0000018848 00000 n
0000018896 00000 n
-0000750434 00000 n
-0001164695 00000 n
+0000751703 00000 n
+0001166031 00000 n
0000018950 00000 n
0000019001 00000 n
-0000750563 00000 n
-0001164616 00000 n
+0000751832 00000 n
+0001165952 00000 n
0000019050 00000 n
0000019097 00000 n
-0000755162 00000 n
-0001164483 00000 n
+0000756431 00000 n
+0001165819 00000 n
0000019144 00000 n
0000019181 00000 n
-0000755291 00000 n
-0001164365 00000 n
+0000756560 00000 n
+0001165701 00000 n
0000019230 00000 n
0000019269 00000 n
-0000755420 00000 n
-0001164300 00000 n
+0000756689 00000 n
+0001165636 00000 n
0000019323 00000 n
0000019401 00000 n
-0000755549 00000 n
-0001164207 00000 n
+0000756818 00000 n
+0001165543 00000 n
0000019450 00000 n
0000019517 00000 n
-0000755678 00000 n
-0001164128 00000 n
+0000756947 00000 n
+0001165464 00000 n
0000019566 00000 n
0000019611 00000 n
-0000759119 00000 n
-0001163995 00000 n
+0000760388 00000 n
+0001165331 00000 n
0000019659 00000 n
0000019691 00000 n
-0000759248 00000 n
-0001163877 00000 n
+0000760517 00000 n
+0001165213 00000 n
0000019740 00000 n
0000019779 00000 n
-0000759377 00000 n
-0001163812 00000 n
+0000760646 00000 n
+0001165148 00000 n
0000019833 00000 n
0000019894 00000 n
-0000763059 00000 n
-0001163680 00000 n
+0000764328 00000 n
+0001165016 00000 n
0000019943 00000 n
0000020000 00000 n
-0000763188 00000 n
-0001163615 00000 n
+0000764457 00000 n
+0001164951 00000 n
0000020054 00000 n
0000020103 00000 n
-0000763317 00000 n
-0001163483 00000 n
+0000764586 00000 n
+0001164819 00000 n
0000020152 00000 n
0000020214 00000 n
-0000763446 00000 n
-0001163404 00000 n
+0000764715 00000 n
+0001164740 00000 n
0000020268 00000 n
0000020323 00000 n
-0000788288 00000 n
-0001163311 00000 n
+0000789557 00000 n
+0001164647 00000 n
0000020377 00000 n
0000020418 00000 n
-0000788417 00000 n
-0001163232 00000 n
+0000789686 00000 n
+0001164568 00000 n
0000020472 00000 n
0000020524 00000 n
-0000788806 00000 n
-0001163114 00000 n
+0000790075 00000 n
+0001164450 00000 n
0000020573 00000 n
0000020623 00000 n
-0000791627 00000 n
-0001163035 00000 n
+0000792896 00000 n
+0001164371 00000 n
0000020677 00000 n
0000020715 00000 n
-0000791756 00000 n
-0001162942 00000 n
+0000793025 00000 n
+0001164278 00000 n
0000020769 00000 n
0000020806 00000 n
-0000791885 00000 n
-0001162849 00000 n
+0000793154 00000 n
+0001164185 00000 n
0000020860 00000 n
0000020898 00000 n
-0000792014 00000 n
-0001162756 00000 n
+0000793283 00000 n
+0001164092 00000 n
0000020952 00000 n
0000021004 00000 n
-0000795250 00000 n
-0001162663 00000 n
+0000796519 00000 n
+0001163999 00000 n
0000021058 00000 n
0000021101 00000 n
-0000795378 00000 n
-0001162531 00000 n
+0000796647 00000 n
+0001163867 00000 n
0000021155 00000 n
0000021200 00000 n
-0000795506 00000 n
-0001162452 00000 n
+0000796775 00000 n
+0001163788 00000 n
0000021259 00000 n
0000021325 00000 n
-0000798492 00000 n
-0001162359 00000 n
+0000799761 00000 n
+0001163695 00000 n
0000021384 00000 n
0000021472 00000 n
-0000798621 00000 n
-0001162266 00000 n
+0000799890 00000 n
+0001163602 00000 n
0000021531 00000 n
0000021606 00000 n
-0000798750 00000 n
-0001162173 00000 n
+0000800019 00000 n
+0001163509 00000 n
0000021665 00000 n
0000021750 00000 n
-0000801659 00000 n
-0001162080 00000 n
+0000802928 00000 n
+0001163416 00000 n
0000021809 00000 n
0000021890 00000 n
-0000804120 00000 n
-0001162001 00000 n
+0000805389 00000 n
+0001163337 00000 n
0000021949 00000 n
0000022033 00000 n
-0000804249 00000 n
-0001161922 00000 n
+0000805518 00000 n
+0001163258 00000 n
0000022087 00000 n
0000022131 00000 n
-0000807078 00000 n
-0001161802 00000 n
+0000808347 00000 n
+0001163138 00000 n
0000022179 00000 n
0000022213 00000 n
-0000807207 00000 n
-0001161723 00000 n
+0000808476 00000 n
+0001163059 00000 n
0000022262 00000 n
0000022289 00000 n
-0000825174 00000 n
-0001161630 00000 n
+0000826443 00000 n
+0001162966 00000 n
0000022338 00000 n
0000022366 00000 n
-0000832722 00000 n
-0001161537 00000 n
+0000834001 00000 n
+0001162873 00000 n
0000022415 00000 n
0000022455 00000 n
-0000838996 00000 n
-0001161444 00000 n
+0000840285 00000 n
+0001162780 00000 n
0000022504 00000 n
0000022547 00000 n
-0000845531 00000 n
-0001161351 00000 n
+0000846820 00000 n
+0001162687 00000 n
0000022596 00000 n
0000022633 00000 n
-0000858774 00000 n
-0001161258 00000 n
+0000860111 00000 n
+0001162594 00000 n
0000022682 00000 n
0000022719 00000 n
-0000861650 00000 n
-0001161165 00000 n
+0000862987 00000 n
+0001162501 00000 n
0000022768 00000 n
0000022806 00000 n
-0000868436 00000 n
-0001161072 00000 n
+0000869773 00000 n
+0001162408 00000 n
0000022855 00000 n
0000022894 00000 n
-0000881930 00000 n
-0001160979 00000 n
+0000883267 00000 n
+0001162315 00000 n
0000022943 00000 n
0000022982 00000 n
-0000884911 00000 n
-0001160886 00000 n
+0000886248 00000 n
+0001162222 00000 n
0000023032 00000 n
0000023072 00000 n
-0000894401 00000 n
-0001160793 00000 n
+0000895738 00000 n
+0001162129 00000 n
0000023122 00000 n
0000023152 00000 n
-0000903297 00000 n
-0001160700 00000 n
+0000904634 00000 n
+0001162036 00000 n
0000023202 00000 n
0000023245 00000 n
-0000907586 00000 n
-0001160607 00000 n
+0000908923 00000 n
+0001161943 00000 n
0000023295 00000 n
0000023328 00000 n
-0000921539 00000 n
-0001160514 00000 n
+0000922876 00000 n
+0001161850 00000 n
0000023378 00000 n
0000023407 00000 n
-0000924769 00000 n
-0001160421 00000 n
+0000926106 00000 n
+0001161757 00000 n
0000023457 00000 n
0000023491 00000 n
-0000930683 00000 n
-0001160328 00000 n
+0000932020 00000 n
+0001161664 00000 n
0000023541 00000 n
0000023578 00000 n
-0000937443 00000 n
-0001160235 00000 n
+0000938780 00000 n
+0001161571 00000 n
0000023628 00000 n
0000023665 00000 n
-0000939799 00000 n
-0001160142 00000 n
+0000941136 00000 n
+0001161478 00000 n
0000023715 00000 n
0000023748 00000 n
-0000940253 00000 n
-0001160049 00000 n
+0000941590 00000 n
+0001161385 00000 n
0000023798 00000 n
0000023832 00000 n
-0000943019 00000 n
-0001159956 00000 n
+0000944356 00000 n
+0001161292 00000 n
0000023882 00000 n
0000023921 00000 n
-0000945629 00000 n
-0001159877 00000 n
+0000946966 00000 n
+0001161213 00000 n
0000023971 00000 n
0000024005 00000 n
0000024378 00000 n
@@ -17289,10 +17313,10 @@ xref
0000024058 00000 n
0000289175 00000 n
0000289238 00000 n
-0001154099 00000 n
-0001128014 00000 n
-0001153925 00000 n
-0001155137 00000 n
+0001155435 00000 n
+0001129350 00000 n
+0001155261 00000 n
+0001156473 00000 n
0000025809 00000 n
0000026002 00000 n
0000026082 00000 n
@@ -17312,12 +17336,12 @@ xref
0000290546 00000 n
0000289401 00000 n
0000290668 00000 n
-0001126778 00000 n
-0001100159 00000 n
-0001126604 00000 n
-0001099474 00000 n
-0001097330 00000 n
-0001099310 00000 n
+0001128114 00000 n
+0001101495 00000 n
+0001127940 00000 n
+0001100810 00000 n
+0001098665 00000 n
+0001100646 00000 n
0000302473 00000 n
0000293782 00000 n
0000290816 00000 n
@@ -17377,9 +17401,9 @@ xref
0000305912 00000 n
0000302558 00000 n
0000315916 00000 n
-0001096742 00000 n
-0001079321 00000 n
-0001096556 00000 n
+0001098077 00000 n
+0001080656 00000 n
+0001097891 00000 n
0000306562 00000 n
0000306726 00000 n
0000306889 00000 n
@@ -17437,1689 +17461,1689 @@ xref
0000315431 00000 n
0000315593 00000 n
0000315754 00000 n
-0000330137 00000 n
-0000319590 00000 n
+0000330136 00000 n
+0000319588 00000 n
0000316081 00000 n
-0000330072 00000 n
-0000320258 00000 n
-0000320422 00000 n
-0000320591 00000 n
-0000320760 00000 n
-0000320928 00000 n
-0000321092 00000 n
-0000321255 00000 n
-0000321419 00000 n
-0000321583 00000 n
-0000321747 00000 n
-0000321910 00000 n
-0000322079 00000 n
-0000322248 00000 n
-0000322416 00000 n
-0000322585 00000 n
-0000322754 00000 n
-0000322923 00000 n
-0000323092 00000 n
-0000323261 00000 n
-0000323429 00000 n
-0000323599 00000 n
-0000323769 00000 n
-0000323939 00000 n
-0000324109 00000 n
-0000324279 00000 n
-0000324449 00000 n
-0000324619 00000 n
-0000324789 00000 n
-0000324958 00000 n
-0000325128 00000 n
-0000325297 00000 n
-0000325461 00000 n
-0000325625 00000 n
-0000325789 00000 n
-0000325953 00000 n
-0000326117 00000 n
-0000326280 00000 n
-0000326444 00000 n
-0000326608 00000 n
-0000326771 00000 n
-0000326935 00000 n
-0000327099 00000 n
-0000327263 00000 n
-0000327432 00000 n
-0000327601 00000 n
-0000327769 00000 n
-0000327938 00000 n
-0000328096 00000 n
-0000328258 00000 n
-0000328426 00000 n
-0000328593 00000 n
-0000328756 00000 n
-0000328919 00000 n
-0000329082 00000 n
-0000329245 00000 n
-0000329413 00000 n
-0000329580 00000 n
-0000329746 00000 n
-0000329911 00000 n
-0000343319 00000 n
-0000333745 00000 n
-0000330237 00000 n
-0000343254 00000 n
-0000334377 00000 n
-0000334540 00000 n
-0000334698 00000 n
-0000334866 00000 n
-0000335029 00000 n
-0000335197 00000 n
-0000335365 00000 n
-0000335532 00000 n
-0001078430 00000 n
-0001057096 00000 n
-0001078254 00000 n
-0000335698 00000 n
-0000335865 00000 n
-0000336021 00000 n
-0000336178 00000 n
-0000336336 00000 n
-0000336499 00000 n
-0000336662 00000 n
-0000336820 00000 n
-0000336976 00000 n
-0000337134 00000 n
-0000337297 00000 n
-0000337455 00000 n
-0000337613 00000 n
-0000337770 00000 n
-0000337928 00000 n
-0000338091 00000 n
-0000338249 00000 n
-0000338412 00000 n
-0000338570 00000 n
-0000338733 00000 n
-0000338896 00000 n
-0000339059 00000 n
-0000339217 00000 n
-0000339380 00000 n
-0000339543 00000 n
-0000339706 00000 n
-0000339869 00000 n
-0000340032 00000 n
-0000340195 00000 n
-0000340363 00000 n
-0000340531 00000 n
-0000340698 00000 n
-0000340865 00000 n
-0000341033 00000 n
-0000341201 00000 n
-0000341364 00000 n
-0000341520 00000 n
-0000341678 00000 n
-0000341836 00000 n
-0000341994 00000 n
-0000342152 00000 n
-0000342310 00000 n
-0000342468 00000 n
-0000342626 00000 n
-0000342784 00000 n
-0000342940 00000 n
-0000343097 00000 n
-0000346158 00000 n
-0000344279 00000 n
-0000343433 00000 n
-0000346093 00000 n
-0000344507 00000 n
-0000344666 00000 n
-0000344825 00000 n
-0001056128 00000 n
-0001036158 00000 n
-0001055953 00000 n
-0000344983 00000 n
-0000345142 00000 n
-0000345300 00000 n
-0000345459 00000 n
-0000345618 00000 n
-0000345777 00000 n
-0000345934 00000 n
-0001155258 00000 n
-0000349281 00000 n
-0000348514 00000 n
-0000346259 00000 n
-0000348702 00000 n
-0000348830 00000 n
-0000348958 00000 n
-0000349086 00000 n
-0000349151 00000 n
-0000349216 00000 n
-0001035341 00000 n
-0001016876 00000 n
-0001035166 00000 n
-0000353818 00000 n
-0000352677 00000 n
-0000349409 00000 n
-0000353179 00000 n
-0000353244 00000 n
-0000353371 00000 n
-0000353499 00000 n
-0000353627 00000 n
-0000352833 00000 n
-0000353027 00000 n
-0000353753 00000 n
-0000701508 00000 n
-0000763510 00000 n
-0000358500 00000 n
-0000357442 00000 n
-0000353946 00000 n
-0000357923 00000 n
-0000358051 00000 n
-0000357598 00000 n
-0000357761 00000 n
-0000358179 00000 n
-0000358307 00000 n
-0000358435 00000 n
-0000374297 00000 n
-0000361741 00000 n
-0000361166 00000 n
-0000358628 00000 n
-0000361292 00000 n
-0000361420 00000 n
-0000361548 00000 n
-0000361676 00000 n
-0000365199 00000 n
-0000364033 00000 n
-0000361855 00000 n
-0000364495 00000 n
-0000364623 00000 n
-0000364751 00000 n
-0000364879 00000 n
-0000365007 00000 n
-0000364189 00000 n
-0000364342 00000 n
-0000365134 00000 n
-0000622313 00000 n
-0000366276 00000 n
-0000365957 00000 n
-0000365285 00000 n
-0000366083 00000 n
-0000366211 00000 n
-0001155383 00000 n
-0000368319 00000 n
-0000367616 00000 n
-0000366376 00000 n
-0000367742 00000 n
-0000367870 00000 n
-0000367997 00000 n
-0000368125 00000 n
-0000368254 00000 n
-0000370898 00000 n
-0000370268 00000 n
-0000368419 00000 n
-0000370574 00000 n
-0000370703 00000 n
-0000370768 00000 n
-0000370833 00000 n
-0000370415 00000 n
-0000607114 00000 n
-0000374491 00000 n
-0000373786 00000 n
-0000371012 00000 n
-0000373912 00000 n
-0000374041 00000 n
-0000374168 00000 n
-0001016193 00000 n
-0001004131 00000 n
-0001016014 00000 n
-0000374426 00000 n
-0000379098 00000 n
-0000378208 00000 n
-0000374619 00000 n
-0000379033 00000 n
-0001003558 00000 n
-0000992624 00000 n
-0001003379 00000 n
-0000378382 00000 n
-0000378537 00000 n
-0000378707 00000 n
-0000378862 00000 n
-0000524697 00000 n
-0000690695 00000 n
-0000382463 00000 n
-0000382272 00000 n
-0000379267 00000 n
-0000382398 00000 n
-0000387242 00000 n
-0000386844 00000 n
-0000382605 00000 n
-0000387177 00000 n
-0000386991 00000 n
-0001155508 00000 n
-0000491356 00000 n
-0000389485 00000 n
-0000389037 00000 n
-0000387398 00000 n
-0000389163 00000 n
-0000389291 00000 n
-0000389356 00000 n
-0000389421 00000 n
-0000389954 00000 n
-0000389763 00000 n
-0000389613 00000 n
-0000389889 00000 n
-0000392649 00000 n
-0000395239 00000 n
-0000392484 00000 n
-0000389996 00000 n
-0000394787 00000 n
-0000394916 00000 n
-0000395045 00000 n
-0000394292 00000 n
-0000394454 00000 n
-0000991718 00000 n
-0000981698 00000 n
-0000991544 00000 n
-0000981134 00000 n
-0000972048 00000 n
-0000980959 00000 n
-0000395174 00000 n
-0000394616 00000 n
-0000394121 00000 n
-0000394179 00000 n
-0000394269 00000 n
-0000544712 00000 n
-0000581015 00000 n
-0000399869 00000 n
-0000398933 00000 n
-0000395410 00000 n
-0000399417 00000 n
-0000399546 00000 n
-0000399675 00000 n
-0000399089 00000 n
-0000399255 00000 n
-0000399804 00000 n
-0000767541 00000 n
-0000403589 00000 n
-0000403269 00000 n
-0000400025 00000 n
-0000403395 00000 n
-0000403524 00000 n
-0000405165 00000 n
-0000404785 00000 n
-0000403730 00000 n
-0000405100 00000 n
-0000404932 00000 n
-0001155633 00000 n
-0000406742 00000 n
-0000406423 00000 n
-0000405266 00000 n
-0000406549 00000 n
-0000406678 00000 n
-0000410204 00000 n
-0000409368 00000 n
-0000406856 00000 n
-0000409494 00000 n
-0000409623 00000 n
-0000409752 00000 n
-0000409881 00000 n
-0000410010 00000 n
-0000410139 00000 n
-0000414053 00000 n
-0000413156 00000 n
-0000410346 00000 n
-0000413473 00000 n
-0000413602 00000 n
-0000413731 00000 n
-0000413303 00000 n
-0000413860 00000 n
-0000413989 00000 n
-0000418171 00000 n
-0000417594 00000 n
-0000414194 00000 n
-0000417720 00000 n
-0000417849 00000 n
-0000417977 00000 n
-0000418106 00000 n
-0000422202 00000 n
-0000421754 00000 n
-0000418313 00000 n
-0000421880 00000 n
-0000422009 00000 n
-0000422137 00000 n
-0000424202 00000 n
-0000424011 00000 n
-0000422330 00000 n
-0000424137 00000 n
-0001155758 00000 n
-0000427471 00000 n
-0000427022 00000 n
-0000424303 00000 n
-0000427148 00000 n
-0000971773 00000 n
-0000968413 00000 n
-0000971594 00000 n
-0000427277 00000 n
-0000427406 00000 n
-0000431534 00000 n
-0000430597 00000 n
-0000427642 00000 n
-0000431082 00000 n
-0000431211 00000 n
-0000431340 00000 n
-0000968058 00000 n
-0000966060 00000 n
-0000967893 00000 n
-0000430753 00000 n
-0000430918 00000 n
-0000431469 00000 n
-0000845595 00000 n
-0000861714 00000 n
-0000434909 00000 n
-0000434332 00000 n
-0000431662 00000 n
-0000434458 00000 n
-0000434587 00000 n
-0000434716 00000 n
-0000434845 00000 n
-0000438907 00000 n
-0000437511 00000 n
-0000435023 00000 n
-0000437814 00000 n
-0000437943 00000 n
-0000438071 00000 n
-0000438200 00000 n
-0000438329 00000 n
-0000438456 00000 n
-0000438585 00000 n
-0000438714 00000 n
-0000438843 00000 n
-0000437658 00000 n
-0000650133 00000 n
-0000442629 00000 n
-0000442180 00000 n
-0000439035 00000 n
-0000442306 00000 n
-0000442435 00000 n
-0000442564 00000 n
-0000445789 00000 n
-0000445469 00000 n
-0000442743 00000 n
-0000445595 00000 n
-0000445724 00000 n
-0001155883 00000 n
-0000448612 00000 n
-0000448164 00000 n
-0000445959 00000 n
-0000448290 00000 n
-0000448419 00000 n
-0000448547 00000 n
-0000451650 00000 n
-0000451074 00000 n
-0000448769 00000 n
-0000451200 00000 n
-0000451329 00000 n
-0000451458 00000 n
-0000451587 00000 n
-0000454532 00000 n
-0000453826 00000 n
-0000451764 00000 n
-0000453952 00000 n
-0000454081 00000 n
-0000454210 00000 n
-0000454339 00000 n
-0000454468 00000 n
-0000457226 00000 n
-0000457035 00000 n
-0000454646 00000 n
-0000457161 00000 n
-0000459733 00000 n
-0000460981 00000 n
-0000459607 00000 n
-0000457340 00000 n
-0000460659 00000 n
-0000460788 00000 n
-0000460916 00000 n
-0000464031 00000 n
-0000463272 00000 n
-0000461152 00000 n
-0000463579 00000 n
-0000463708 00000 n
-0000463419 00000 n
-0000463837 00000 n
-0000463966 00000 n
-0001156008 00000 n
-0000763252 00000 n
-0000466731 00000 n
-0000466153 00000 n
-0000464159 00000 n
-0000466279 00000 n
-0000466408 00000 n
-0000466537 00000 n
-0000466666 00000 n
-0000467172 00000 n
-0000466981 00000 n
-0000466831 00000 n
-0000467107 00000 n
-0000471259 00000 n
-0000470493 00000 n
-0000467214 00000 n
-0000470807 00000 n
-0000470936 00000 n
-0000471064 00000 n
-0000471129 00000 n
-0000471194 00000 n
-0000470640 00000 n
-0000475757 00000 n
-0000475949 00000 n
-0000475502 00000 n
-0000471359 00000 n
-0000475628 00000 n
-0000475884 00000 n
-0000479801 00000 n
-0000479223 00000 n
-0000476077 00000 n
-0000479349 00000 n
-0000479478 00000 n
-0000479607 00000 n
-0000479736 00000 n
-0000482911 00000 n
-0000482333 00000 n
-0000479942 00000 n
-0000482459 00000 n
-0000482588 00000 n
-0000482717 00000 n
-0000482782 00000 n
-0000482846 00000 n
-0001156133 00000 n
-0000486236 00000 n
-0000485532 00000 n
-0000483068 00000 n
-0000485658 00000 n
-0000485787 00000 n
-0000485915 00000 n
-0000485980 00000 n
-0000486045 00000 n
-0000486171 00000 n
-0000491549 00000 n
-0000490761 00000 n
-0000486350 00000 n
-0000491227 00000 n
-0000490917 00000 n
-0000491068 00000 n
-0000491485 00000 n
-0000947039 00000 n
-0000495414 00000 n
-0000494143 00000 n
-0000491690 00000 n
-0000494833 00000 n
-0000494962 00000 n
-0000495091 00000 n
-0000495220 00000 n
-0000494308 00000 n
-0000494460 00000 n
-0000494646 00000 n
-0000495349 00000 n
-0000499561 00000 n
-0000499112 00000 n
-0000495542 00000 n
-0000499238 00000 n
-0000499367 00000 n
-0000499496 00000 n
-0000503467 00000 n
-0000503088 00000 n
-0000499689 00000 n
-0000503402 00000 n
-0000503235 00000 n
-0000506317 00000 n
-0000506512 00000 n
-0000506062 00000 n
-0000503581 00000 n
-0000506188 00000 n
-0000506382 00000 n
-0000506447 00000 n
-0001156258 00000 n
-0000510073 00000 n
-0000509882 00000 n
-0000506626 00000 n
-0000510008 00000 n
-0000513620 00000 n
-0000513171 00000 n
-0000510187 00000 n
-0000513297 00000 n
-0000513425 00000 n
-0000513490 00000 n
-0000513555 00000 n
-0000517216 00000 n
-0000516433 00000 n
-0000513734 00000 n
-0000516894 00000 n
-0000517023 00000 n
-0000517151 00000 n
-0000516589 00000 n
-0000516742 00000 n
-0000519412 00000 n
-0000518834 00000 n
-0000517330 00000 n
-0000518960 00000 n
-0000519089 00000 n
-0000519218 00000 n
-0000519347 00000 n
-0000520992 00000 n
-0000520801 00000 n
-0000519526 00000 n
-0000520927 00000 n
-0000522520 00000 n
-0000522329 00000 n
-0000521093 00000 n
-0000522455 00000 n
-0001156383 00000 n
-0000524762 00000 n
-0000524443 00000 n
-0000522621 00000 n
-0000524569 00000 n
-0000528397 00000 n
-0000528206 00000 n
-0000524876 00000 n
-0000528332 00000 n
-0000533016 00000 n
-0000532471 00000 n
-0000528539 00000 n
-0000532951 00000 n
-0000532627 00000 n
-0000532783 00000 n
-0000730557 00000 n
-0000536698 00000 n
-0000536507 00000 n
-0000533144 00000 n
-0000536633 00000 n
-0000541038 00000 n
-0000540673 00000 n
-0000536812 00000 n
-0000540973 00000 n
-0000540820 00000 n
-0000544906 00000 n
-0000544457 00000 n
-0000541180 00000 n
-0000544583 00000 n
-0000544777 00000 n
-0000544842 00000 n
-0001156508 00000 n
-0000549250 00000 n
-0000548884 00000 n
-0000545034 00000 n
-0000549185 00000 n
-0000549031 00000 n
-0000554380 00000 n
-0000553247 00000 n
-0000549378 00000 n
-0000554315 00000 n
-0000553430 00000 n
-0000553586 00000 n
-0000553771 00000 n
-0000553945 00000 n
-0000554130 00000 n
-0000641615 00000 n
-0000558606 00000 n
-0000558415 00000 n
-0000554578 00000 n
-0000558541 00000 n
-0000562508 00000 n
-0000562317 00000 n
-0000558720 00000 n
-0000562443 00000 n
-0000566672 00000 n
-0000566164 00000 n
-0000562622 00000 n
-0000566478 00000 n
-0000566607 00000 n
-0000566311 00000 n
-0000657072 00000 n
-0000570140 00000 n
-0000569503 00000 n
-0000566786 00000 n
-0000569817 00000 n
-0000569946 00000 n
-0000570075 00000 n
-0000569650 00000 n
-0001156633 00000 n
-0000574486 00000 n
-0000573795 00000 n
-0000570297 00000 n
-0000574292 00000 n
-0000573951 00000 n
-0000574121 00000 n
-0000574421 00000 n
-0000750627 00000 n
-0000578008 00000 n
-0000577688 00000 n
-0000574614 00000 n
-0000577814 00000 n
-0000577943 00000 n
-0000581079 00000 n
-0000580760 00000 n
-0000578122 00000 n
-0000580886 00000 n
-0000585184 00000 n
-0000584993 00000 n
-0000581250 00000 n
-0000585119 00000 n
-0000588295 00000 n
-0000588104 00000 n
-0000585298 00000 n
-0000588230 00000 n
-0000592540 00000 n
-0000591599 00000 n
-0000588452 00000 n
-0000592089 00000 n
-0000592218 00000 n
-0000591755 00000 n
-0000592347 00000 n
-0000591915 00000 n
-0000592476 00000 n
-0001156758 00000 n
-0000596693 00000 n
-0000596197 00000 n
-0000592654 00000 n
-0000596499 00000 n
-0000596344 00000 n
-0000596628 00000 n
-0000600090 00000 n
-0000599460 00000 n
-0000596821 00000 n
-0000599767 00000 n
-0000599896 00000 n
-0000600025 00000 n
-0000599607 00000 n
-0000603441 00000 n
-0000603073 00000 n
-0000600261 00000 n
-0000603376 00000 n
-0000603220 00000 n
-0000607437 00000 n
-0000606668 00000 n
-0000603555 00000 n
-0000606985 00000 n
-0000606815 00000 n
-0000607179 00000 n
-0000607243 00000 n
-0000607372 00000 n
-0000611421 00000 n
-0000611047 00000 n
-0000607622 00000 n
-0000611356 00000 n
-0000611194 00000 n
-0000616341 00000 n
-0000615663 00000 n
-0000611592 00000 n
-0000616147 00000 n
-0000615819 00000 n
-0000616276 00000 n
-0000615981 00000 n
-0001156883 00000 n
-0000726792 00000 n
-0000654316 00000 n
-0000619363 00000 n
-0000619044 00000 n
-0000616469 00000 n
-0000619170 00000 n
-0000619298 00000 n
-0000622376 00000 n
-0000622058 00000 n
-0000619490 00000 n
-0000622184 00000 n
-0000626849 00000 n
-0000626529 00000 n
-0000622546 00000 n
-0000626655 00000 n
-0000626784 00000 n
-0000630973 00000 n
-0000630482 00000 n
-0000626963 00000 n
-0000630780 00000 n
-0000630629 00000 n
-0000630909 00000 n
-0000635210 00000 n
-0000635019 00000 n
-0000631114 00000 n
-0000635145 00000 n
-0000637718 00000 n
-0000637398 00000 n
-0000635337 00000 n
-0000637524 00000 n
-0000637653 00000 n
-0001157008 00000 n
-0000641680 00000 n
-0000641360 00000 n
-0000637845 00000 n
-0000641486 00000 n
-0000646253 00000 n
-0000645465 00000 n
-0000641794 00000 n
-0000645932 00000 n
-0000645621 00000 n
-0000645772 00000 n
-0000646060 00000 n
-0000646188 00000 n
-0000650197 00000 n
-0000649316 00000 n
-0000646367 00000 n
-0000649617 00000 n
-0000649746 00000 n
-0000649875 00000 n
-0000649463 00000 n
-0000650004 00000 n
-0000654509 00000 n
-0000654062 00000 n
-0000650311 00000 n
-0000654188 00000 n
-0000654445 00000 n
-0000657137 00000 n
-0000656817 00000 n
-0000654651 00000 n
-0000656943 00000 n
-0000658691 00000 n
-0000658500 00000 n
-0000657251 00000 n
-0000658626 00000 n
-0001157133 00000 n
-0000660196 00000 n
-0000660005 00000 n
-0000658792 00000 n
-0000660131 00000 n
-0000662090 00000 n
-0000661512 00000 n
-0000660297 00000 n
-0000661638 00000 n
-0000661766 00000 n
-0000661895 00000 n
-0000661960 00000 n
-0000662025 00000 n
-0000665093 00000 n
-0000664902 00000 n
-0000662204 00000 n
-0000665028 00000 n
-0000669200 00000 n
-0000668692 00000 n
-0000665207 00000 n
-0000669006 00000 n
-0000668839 00000 n
-0000669135 00000 n
-0000947006 00000 n
-0000675122 00000 n
-0000672215 00000 n
-0000669314 00000 n
-0000674928 00000 n
-0000675057 00000 n
-0000672488 00000 n
-0000672650 00000 n
-0000672812 00000 n
-0000672974 00000 n
-0000673136 00000 n
-0000673298 00000 n
-0000673469 00000 n
-0000673631 00000 n
-0000673794 00000 n
-0000673954 00000 n
-0000674115 00000 n
-0000674278 00000 n
-0000674441 00000 n
-0000674604 00000 n
-0000674767 00000 n
-0000680220 00000 n
-0000678303 00000 n
-0000675236 00000 n
-0000680155 00000 n
-0000678531 00000 n
-0000678692 00000 n
-0000678860 00000 n
-0000679030 00000 n
-0000679191 00000 n
-0000679353 00000 n
-0000679515 00000 n
-0000679677 00000 n
-0000679840 00000 n
-0000679994 00000 n
-0001157258 00000 n
-0000684752 00000 n
-0000683390 00000 n
-0000680348 00000 n
-0000684687 00000 n
-0000683591 00000 n
-0000683745 00000 n
-0000683899 00000 n
-0000684053 00000 n
-0000684207 00000 n
-0000684369 00000 n
-0000684529 00000 n
-0000690760 00000 n
-0000688396 00000 n
-0000684880 00000 n
-0000690568 00000 n
-0000688642 00000 n
-0000688803 00000 n
-0000688965 00000 n
-0000689127 00000 n
-0000689289 00000 n
-0000689443 00000 n
-0000689606 00000 n
-0000689761 00000 n
-0000689926 00000 n
-0000690092 00000 n
-0000690254 00000 n
-0000690408 00000 n
-0000694855 00000 n
-0000694534 00000 n
-0000690888 00000 n
-0000694660 00000 n
-0000694725 00000 n
-0000694790 00000 n
-0000697625 00000 n
-0000697434 00000 n
-0000694997 00000 n
-0000697560 00000 n
-0000701832 00000 n
-0000700762 00000 n
-0000697783 00000 n
-0000701250 00000 n
-0000701379 00000 n
-0000701637 00000 n
-0000700918 00000 n
-0000701088 00000 n
-0000701702 00000 n
-0000701767 00000 n
-0000705283 00000 n
-0000704963 00000 n
-0000701960 00000 n
-0000705089 00000 n
-0000705154 00000 n
-0000705218 00000 n
-0001157383 00000 n
-0000708771 00000 n
-0000708450 00000 n
-0000705384 00000 n
-0000708576 00000 n
-0000708641 00000 n
-0000708706 00000 n
-0000712692 00000 n
-0000711983 00000 n
-0000708886 00000 n
-0000712109 00000 n
-0000712238 00000 n
-0000712303 00000 n
-0000712368 00000 n
-0000712433 00000 n
-0000712498 00000 n
-0000712627 00000 n
-0000716933 00000 n
-0000716096 00000 n
-0000712806 00000 n
-0000716222 00000 n
-0000716287 00000 n
-0000716352 00000 n
-0000716481 00000 n
-0000716546 00000 n
-0000716611 00000 n
-0000716740 00000 n
-0000716805 00000 n
-0000716869 00000 n
-0000719960 00000 n
-0000719258 00000 n
-0000717061 00000 n
-0000719384 00000 n
-0000719511 00000 n
-0000719638 00000 n
-0000719767 00000 n
-0000719895 00000 n
-0000722670 00000 n
-0000722093 00000 n
-0000720159 00000 n
-0000722219 00000 n
-0000722348 00000 n
-0000722477 00000 n
-0000722542 00000 n
-0000722606 00000 n
-0000726857 00000 n
-0000726537 00000 n
-0000722855 00000 n
-0000726663 00000 n
-0001157508 00000 n
-0000730622 00000 n
-0000729862 00000 n
-0000726984 00000 n
-0000730169 00000 n
-0000730298 00000 n
-0000730363 00000 n
-0000730428 00000 n
-0000730009 00000 n
-0000734313 00000 n
-0000733734 00000 n
-0000730736 00000 n
-0000733860 00000 n
-0000733989 00000 n
-0000734118 00000 n
-0000734183 00000 n
-0000734248 00000 n
-0000737927 00000 n
-0000737032 00000 n
-0000734427 00000 n
-0000737344 00000 n
-0000737179 00000 n
-0000737473 00000 n
-0000737538 00000 n
-0000737603 00000 n
-0000737732 00000 n
-0000737797 00000 n
-0000737862 00000 n
-0000946973 00000 n
-0000742084 00000 n
-0000741634 00000 n
-0000738041 00000 n
-0000741760 00000 n
-0000741889 00000 n
-0000741954 00000 n
-0000742019 00000 n
-0000743975 00000 n
-0000743655 00000 n
-0000742212 00000 n
-0000743781 00000 n
-0000965779 00000 n
-0000958495 00000 n
-0000965599 00000 n
-0000743910 00000 n
-0000744458 00000 n
-0000744267 00000 n
-0000744117 00000 n
-0000744393 00000 n
-0001157633 00000 n
-0000746270 00000 n
-0000745823 00000 n
-0000744500 00000 n
-0000745949 00000 n
-0000746078 00000 n
-0000746205 00000 n
-0000750692 00000 n
-0000749749 00000 n
-0000746384 00000 n
-0000750112 00000 n
-0000958174 00000 n
-0000948961 00000 n
-0000957988 00000 n
-0000749896 00000 n
-0000750241 00000 n
-0000750369 00000 n
-0000750498 00000 n
-0000752051 00000 n
-0000751860 00000 n
-0000750933 00000 n
-0000751986 00000 n
-0000752492 00000 n
-0000752301 00000 n
-0000752151 00000 n
-0000752427 00000 n
-0000755806 00000 n
-0000754580 00000 n
-0000752534 00000 n
-0000755097 00000 n
-0000755226 00000 n
-0000755355 00000 n
-0000755484 00000 n
-0000755613 00000 n
-0000755742 00000 n
-0000754736 00000 n
-0000754908 00000 n
-0000756261 00000 n
-0000756070 00000 n
-0000755920 00000 n
-0000756196 00000 n
-0001157758 00000 n
-0000759506 00000 n
-0000758928 00000 n
-0000756303 00000 n
-0000759054 00000 n
-0000759183 00000 n
-0000759312 00000 n
-0000759441 00000 n
-0000763703 00000 n
-0000762484 00000 n
-0000759592 00000 n
-0000762994 00000 n
-0000763123 00000 n
-0000763381 00000 n
-0000762640 00000 n
-0000762819 00000 n
-0000763575 00000 n
-0000763639 00000 n
-0000770593 00000 n
-0000766765 00000 n
-0000763859 00000 n
-0000766891 00000 n
-0000766956 00000 n
-0000767021 00000 n
-0000767086 00000 n
-0000767151 00000 n
-0000767216 00000 n
-0000767281 00000 n
-0000767346 00000 n
-0000767411 00000 n
-0000767476 00000 n
-0000767606 00000 n
-0000767671 00000 n
-0000767736 00000 n
-0000767801 00000 n
-0000767866 00000 n
-0000767931 00000 n
-0000767996 00000 n
-0000768061 00000 n
-0000768126 00000 n
-0000768191 00000 n
-0000768256 00000 n
-0000768321 00000 n
-0000768386 00000 n
-0000768451 00000 n
-0000768516 00000 n
-0000768581 00000 n
-0000768646 00000 n
-0000768711 00000 n
-0000768776 00000 n
-0000768841 00000 n
-0000768906 00000 n
-0000768971 00000 n
-0000769036 00000 n
-0000769101 00000 n
-0000769165 00000 n
-0000769230 00000 n
-0000769295 00000 n
-0000769360 00000 n
-0000769425 00000 n
-0000769490 00000 n
-0000769555 00000 n
-0000769620 00000 n
-0000769685 00000 n
-0000769750 00000 n
-0000769815 00000 n
-0000769880 00000 n
-0000769945 00000 n
-0000770010 00000 n
-0000770075 00000 n
-0000770140 00000 n
-0000770205 00000 n
-0000770270 00000 n
-0000770335 00000 n
-0000770400 00000 n
-0000770465 00000 n
-0000770529 00000 n
-0000777241 00000 n
-0000773677 00000 n
-0000770707 00000 n
-0000773803 00000 n
-0000773868 00000 n
-0000773933 00000 n
-0000773998 00000 n
-0000774063 00000 n
-0000774128 00000 n
-0000774193 00000 n
-0000774258 00000 n
-0000774323 00000 n
-0000774388 00000 n
-0000774453 00000 n
-0000774518 00000 n
-0000774582 00000 n
-0000774647 00000 n
-0000774712 00000 n
-0000774777 00000 n
-0000774842 00000 n
-0000774907 00000 n
-0000774972 00000 n
-0000775037 00000 n
-0000775102 00000 n
-0000775167 00000 n
-0000775232 00000 n
-0000775297 00000 n
-0000775361 00000 n
-0000775426 00000 n
-0000775491 00000 n
-0000775556 00000 n
-0000775621 00000 n
-0000775686 00000 n
-0000775751 00000 n
-0000775816 00000 n
-0000775881 00000 n
-0000775946 00000 n
-0000776011 00000 n
-0000776076 00000 n
-0000776141 00000 n
-0000776206 00000 n
-0000776271 00000 n
-0000776336 00000 n
-0000776400 00000 n
-0000776464 00000 n
-0000776528 00000 n
-0000776593 00000 n
-0000776658 00000 n
-0000776723 00000 n
-0000776788 00000 n
-0000776853 00000 n
-0000776918 00000 n
-0000776983 00000 n
-0000777048 00000 n
-0000777113 00000 n
-0000777177 00000 n
-0000783416 00000 n
-0000779978 00000 n
-0000777355 00000 n
-0000780104 00000 n
-0000780169 00000 n
-0000780234 00000 n
-0000780299 00000 n
-0000780364 00000 n
-0000780429 00000 n
-0000780494 00000 n
-0000780559 00000 n
-0000780624 00000 n
-0000780689 00000 n
-0000780754 00000 n
-0000780819 00000 n
-0000780884 00000 n
-0000780949 00000 n
-0000781014 00000 n
-0000781079 00000 n
-0000781144 00000 n
-0000781209 00000 n
-0000781274 00000 n
-0000781339 00000 n
-0000781404 00000 n
-0000781469 00000 n
-0000781534 00000 n
-0000781599 00000 n
-0000781664 00000 n
-0000781729 00000 n
-0000781794 00000 n
-0000781859 00000 n
-0000781924 00000 n
-0000781989 00000 n
-0000782054 00000 n
-0000782119 00000 n
-0000782184 00000 n
-0000782249 00000 n
-0000782313 00000 n
-0000782378 00000 n
-0000782443 00000 n
-0000782508 00000 n
-0000782573 00000 n
-0000782638 00000 n
-0000782703 00000 n
-0000782768 00000 n
-0000782833 00000 n
-0000782898 00000 n
-0000782963 00000 n
-0000783028 00000 n
-0000783093 00000 n
-0000783158 00000 n
-0000783223 00000 n
-0000783288 00000 n
-0000783352 00000 n
-0000788935 00000 n
-0000786539 00000 n
-0000783530 00000 n
-0000786665 00000 n
-0000786730 00000 n
-0000786795 00000 n
-0000786860 00000 n
-0000786925 00000 n
-0000786990 00000 n
-0000787055 00000 n
-0000787120 00000 n
-0000787185 00000 n
-0000787250 00000 n
-0000787315 00000 n
-0000787380 00000 n
-0000787445 00000 n
-0000787509 00000 n
-0000787574 00000 n
-0000787639 00000 n
-0000787704 00000 n
-0000787769 00000 n
-0000787834 00000 n
-0000787899 00000 n
-0000787964 00000 n
-0000788029 00000 n
-0000788094 00000 n
-0000788159 00000 n
-0000788224 00000 n
-0000788352 00000 n
-0000788481 00000 n
-0000788546 00000 n
-0000788611 00000 n
-0000788676 00000 n
-0000788741 00000 n
-0000788870 00000 n
-0001157883 00000 n
-0000792143 00000 n
-0000791436 00000 n
-0000789062 00000 n
-0000791562 00000 n
-0000791691 00000 n
-0000791820 00000 n
-0000791949 00000 n
-0000792078 00000 n
-0000795635 00000 n
-0000794878 00000 n
-0000792270 00000 n
-0000795185 00000 n
-0000795314 00000 n
-0000795025 00000 n
-0000795442 00000 n
-0000795570 00000 n
-0000798879 00000 n
-0000798301 00000 n
-0000795762 00000 n
-0000798427 00000 n
-0000798556 00000 n
-0000798685 00000 n
-0000798814 00000 n
-0000801788 00000 n
-0000801468 00000 n
-0000798993 00000 n
-0000801594 00000 n
-0000801723 00000 n
-0000804378 00000 n
-0000803929 00000 n
-0000801958 00000 n
-0000804055 00000 n
-0000804184 00000 n
-0000804313 00000 n
-0000804819 00000 n
-0000804628 00000 n
-0000804478 00000 n
-0000804754 00000 n
-0001158008 00000 n
-0000807531 00000 n
-0000806887 00000 n
-0000804861 00000 n
-0000807013 00000 n
-0000807142 00000 n
-0000807271 00000 n
-0000807336 00000 n
-0000807401 00000 n
-0000807466 00000 n
-0000811871 00000 n
-0000811551 00000 n
-0000807645 00000 n
-0000811677 00000 n
-0000811742 00000 n
-0000811807 00000 n
-0000815474 00000 n
-0000815219 00000 n
-0000812027 00000 n
-0000815345 00000 n
-0000815410 00000 n
-0000818725 00000 n
-0000818534 00000 n
-0000815616 00000 n
-0000818660 00000 n
-0000822446 00000 n
-0000822190 00000 n
-0000818853 00000 n
-0000822316 00000 n
-0000822381 00000 n
-0000825431 00000 n
-0000824723 00000 n
-0000822588 00000 n
-0000824849 00000 n
-0000824914 00000 n
-0000824979 00000 n
-0000825044 00000 n
-0000825109 00000 n
-0000825238 00000 n
-0000825303 00000 n
-0000825367 00000 n
-0001158133 00000 n
-0000830100 00000 n
-0000829844 00000 n
-0000825573 00000 n
-0000829970 00000 n
-0000830035 00000 n
-0000833109 00000 n
-0000832336 00000 n
-0000830228 00000 n
-0000832462 00000 n
-0000832527 00000 n
-0000832592 00000 n
-0000832657 00000 n
-0000832786 00000 n
-0000832851 00000 n
-0000832914 00000 n
-0000832979 00000 n
-0000833044 00000 n
-0000836022 00000 n
-0000835507 00000 n
-0000833265 00000 n
-0000835633 00000 n
-0000835698 00000 n
-0000835763 00000 n
-0000835828 00000 n
-0000835893 00000 n
-0000835958 00000 n
-0000839385 00000 n
-0000838805 00000 n
-0000836178 00000 n
-0000838931 00000 n
-0000839060 00000 n
-0000839125 00000 n
-0000839190 00000 n
-0000839255 00000 n
-0000839320 00000 n
-0000842837 00000 n
-0000842581 00000 n
-0000839527 00000 n
-0000842707 00000 n
-0000842772 00000 n
-0000845789 00000 n
-0000845145 00000 n
-0000842965 00000 n
-0000845271 00000 n
-0000845336 00000 n
-0000845401 00000 n
-0000845466 00000 n
-0000845660 00000 n
-0000845725 00000 n
-0001158258 00000 n
-0000849382 00000 n
-0000849061 00000 n
-0000845958 00000 n
-0000849187 00000 n
-0000849252 00000 n
-0000849317 00000 n
-0000852973 00000 n
-0000852782 00000 n
-0000849510 00000 n
-0000852908 00000 n
-0000856439 00000 n
-0000856118 00000 n
-0000853101 00000 n
-0000856244 00000 n
-0000856309 00000 n
-0000856374 00000 n
-0000859097 00000 n
-0000858388 00000 n
-0000856580 00000 n
-0000858514 00000 n
-0000858579 00000 n
-0000858644 00000 n
-0000858709 00000 n
-0000858838 00000 n
-0000858903 00000 n
-0000858968 00000 n
-0000859033 00000 n
-0000861974 00000 n
-0000861264 00000 n
-0000859253 00000 n
-0000861390 00000 n
-0000861455 00000 n
-0000861520 00000 n
-0000861585 00000 n
-0000861779 00000 n
-0000861844 00000 n
-0000861909 00000 n
-0000865546 00000 n
-0000865225 00000 n
-0000862130 00000 n
-0000865351 00000 n
-0000865416 00000 n
-0000865481 00000 n
-0001158383 00000 n
-0000868695 00000 n
-0000868050 00000 n
-0000865674 00000 n
-0000868176 00000 n
-0000868241 00000 n
-0000868306 00000 n
-0000868371 00000 n
-0000868500 00000 n
-0000868565 00000 n
-0000868630 00000 n
-0000872226 00000 n
-0000871905 00000 n
-0000868851 00000 n
-0000872031 00000 n
-0000872096 00000 n
-0000872161 00000 n
-0000875809 00000 n
-0000875618 00000 n
-0000872368 00000 n
-0000875744 00000 n
-0000879294 00000 n
-0000879103 00000 n
-0000875937 00000 n
-0000879229 00000 n
-0000882188 00000 n
-0000881544 00000 n
-0000879436 00000 n
-0000881670 00000 n
-0000881735 00000 n
-0000881800 00000 n
-0000881865 00000 n
-0000881994 00000 n
-0000882059 00000 n
-0000882124 00000 n
-0000885101 00000 n
-0000884396 00000 n
-0000882344 00000 n
-0000884522 00000 n
-0000884587 00000 n
-0000884652 00000 n
-0000884717 00000 n
-0000884782 00000 n
-0000884847 00000 n
-0000884973 00000 n
-0000885038 00000 n
-0001158508 00000 n
-0000888306 00000 n
-0000887921 00000 n
-0000885243 00000 n
-0000888047 00000 n
-0000888112 00000 n
-0000888177 00000 n
-0000888242 00000 n
-0000891608 00000 n
-0000891417 00000 n
-0000888448 00000 n
-0000891543 00000 n
-0000894790 00000 n
-0000894016 00000 n
-0000891736 00000 n
-0000894142 00000 n
-0000894207 00000 n
-0000894272 00000 n
-0000894337 00000 n
-0000894465 00000 n
-0000894530 00000 n
-0000894595 00000 n
-0000894660 00000 n
-0000894725 00000 n
-0000898038 00000 n
-0000897847 00000 n
-0000894946 00000 n
-0000897973 00000 n
-0000901197 00000 n
-0000900812 00000 n
-0000898251 00000 n
-0000900938 00000 n
-0000901003 00000 n
-0000901068 00000 n
-0000901133 00000 n
-0000903749 00000 n
-0000902976 00000 n
-0000901438 00000 n
-0000903102 00000 n
-0000903167 00000 n
-0000903232 00000 n
-0000903361 00000 n
-0000903425 00000 n
-0000903490 00000 n
-0000903555 00000 n
-0000903620 00000 n
-0000903685 00000 n
-0001158633 00000 n
-0000907910 00000 n
-0000907395 00000 n
-0000903905 00000 n
-0000907521 00000 n
-0000907650 00000 n
-0000907715 00000 n
-0000907780 00000 n
-0000907845 00000 n
-0000912126 00000 n
-0000911870 00000 n
-0000908038 00000 n
-0000911996 00000 n
-0000912061 00000 n
-0000915461 00000 n
-0000915270 00000 n
-0000912254 00000 n
-0000915396 00000 n
-0000918079 00000 n
-0000917629 00000 n
-0000915589 00000 n
-0000917755 00000 n
-0000917820 00000 n
-0000917885 00000 n
-0000917950 00000 n
-0000918015 00000 n
-0000921928 00000 n
-0000921348 00000 n
-0000918234 00000 n
-0000921474 00000 n
-0000921603 00000 n
-0000921668 00000 n
-0000921733 00000 n
-0000921798 00000 n
-0000921863 00000 n
-0000925093 00000 n
-0000924383 00000 n
-0000922070 00000 n
-0000924509 00000 n
-0000924574 00000 n
-0000924639 00000 n
-0000924704 00000 n
-0000924833 00000 n
-0000924898 00000 n
-0000924963 00000 n
-0000925028 00000 n
-0001158758 00000 n
-0000927814 00000 n
-0000927558 00000 n
-0000925249 00000 n
-0000927684 00000 n
-0000927749 00000 n
-0000931070 00000 n
-0000930297 00000 n
-0000927942 00000 n
-0000930423 00000 n
-0000930488 00000 n
-0000930553 00000 n
-0000930618 00000 n
-0000930747 00000 n
-0000930812 00000 n
-0000930877 00000 n
-0000930941 00000 n
-0000931006 00000 n
-0000934360 00000 n
-0000934041 00000 n
-0000931226 00000 n
-0000934167 00000 n
-0000934232 00000 n
-0000934297 00000 n
-0000937830 00000 n
-0000937187 00000 n
-0000934516 00000 n
-0000937313 00000 n
-0000937378 00000 n
-0000937507 00000 n
-0000937571 00000 n
-0000937636 00000 n
-0000937701 00000 n
-0000937765 00000 n
-0000940445 00000 n
-0000939478 00000 n
-0000937972 00000 n
-0000939604 00000 n
-0000939669 00000 n
-0000939734 00000 n
-0000939863 00000 n
-0000939928 00000 n
-0000939993 00000 n
-0000940058 00000 n
-0000940123 00000 n
-0000940188 00000 n
-0000940316 00000 n
-0000940381 00000 n
-0000943338 00000 n
-0000942503 00000 n
-0000940601 00000 n
-0000942629 00000 n
-0000942694 00000 n
-0000942759 00000 n
-0000942824 00000 n
-0000942889 00000 n
-0000942954 00000 n
-0000943082 00000 n
-0000943145 00000 n
-0000943209 00000 n
-0000943274 00000 n
-0001158883 00000 n
-0000946082 00000 n
-0000945243 00000 n
-0000943480 00000 n
-0000945369 00000 n
-0000945434 00000 n
-0000945499 00000 n
-0000945564 00000 n
-0000945693 00000 n
-0000945758 00000 n
-0000945823 00000 n
-0000945888 00000 n
-0000945953 00000 n
-0000946018 00000 n
-0000946873 00000 n
-0000946617 00000 n
-0000946224 00000 n
-0000946743 00000 n
-0000946808 00000 n
-0000947072 00000 n
-0000958416 00000 n
-0000966005 00000 n
-0000968305 00000 n
-0000968274 00000 n
-0000971993 00000 n
-0000981433 00000 n
-0000992168 00000 n
-0001003864 00000 n
-0001016581 00000 n
-0001035815 00000 n
-0001056711 00000 n
-0001078859 00000 n
-0001097115 00000 n
-0001099961 00000 n
-0001099731 00000 n
-0001127379 00000 n
-0001154645 00000 n
-0001158981 00000 n
-0001159106 00000 n
-0001159232 00000 n
-0001159358 00000 n
-0001159484 00000 n
-0001159610 00000 n
-0001159690 00000 n
-0001159800 00000 n
-0001181702 00000 n
-0001205895 00000 n
-0001205936 00000 n
-0001205976 00000 n
-0001206110 00000 n
+0000330071 00000 n
+0000320256 00000 n
+0000320420 00000 n
+0000320589 00000 n
+0000320758 00000 n
+0000320926 00000 n
+0000321090 00000 n
+0000321253 00000 n
+0000321417 00000 n
+0000321581 00000 n
+0000321745 00000 n
+0000321908 00000 n
+0000322077 00000 n
+0000322246 00000 n
+0000322414 00000 n
+0000322583 00000 n
+0000322752 00000 n
+0000322921 00000 n
+0000323090 00000 n
+0000323259 00000 n
+0000323427 00000 n
+0000323597 00000 n
+0000323767 00000 n
+0000323937 00000 n
+0000324107 00000 n
+0000324277 00000 n
+0000324447 00000 n
+0000324617 00000 n
+0000324787 00000 n
+0000324957 00000 n
+0000325127 00000 n
+0000325296 00000 n
+0000325460 00000 n
+0000325624 00000 n
+0000325788 00000 n
+0000325952 00000 n
+0000326116 00000 n
+0000326279 00000 n
+0000326443 00000 n
+0000326607 00000 n
+0000326770 00000 n
+0000326934 00000 n
+0000327098 00000 n
+0000327262 00000 n
+0000327431 00000 n
+0000327600 00000 n
+0000327768 00000 n
+0000327937 00000 n
+0000328095 00000 n
+0000328257 00000 n
+0000328425 00000 n
+0000328592 00000 n
+0000328755 00000 n
+0000328918 00000 n
+0000329081 00000 n
+0000329244 00000 n
+0000329412 00000 n
+0000329579 00000 n
+0000329745 00000 n
+0000329910 00000 n
+0000343318 00000 n
+0000333744 00000 n
+0000330236 00000 n
+0000343253 00000 n
+0000334376 00000 n
+0000334539 00000 n
+0000334697 00000 n
+0000334865 00000 n
+0000335028 00000 n
+0000335196 00000 n
+0000335364 00000 n
+0000335531 00000 n
+0001079765 00000 n
+0001058431 00000 n
+0001079589 00000 n
+0000335697 00000 n
+0000335864 00000 n
+0000336020 00000 n
+0000336177 00000 n
+0000336335 00000 n
+0000336498 00000 n
+0000336661 00000 n
+0000336819 00000 n
+0000336975 00000 n
+0000337133 00000 n
+0000337296 00000 n
+0000337454 00000 n
+0000337612 00000 n
+0000337769 00000 n
+0000337927 00000 n
+0000338090 00000 n
+0000338248 00000 n
+0000338411 00000 n
+0000338569 00000 n
+0000338732 00000 n
+0000338895 00000 n
+0000339058 00000 n
+0000339216 00000 n
+0000339379 00000 n
+0000339542 00000 n
+0000339705 00000 n
+0000339868 00000 n
+0000340031 00000 n
+0000340194 00000 n
+0000340362 00000 n
+0000340530 00000 n
+0000340697 00000 n
+0000340864 00000 n
+0000341032 00000 n
+0000341200 00000 n
+0000341363 00000 n
+0000341519 00000 n
+0000341677 00000 n
+0000341835 00000 n
+0000341993 00000 n
+0000342151 00000 n
+0000342309 00000 n
+0000342467 00000 n
+0000342625 00000 n
+0000342783 00000 n
+0000342939 00000 n
+0000343096 00000 n
+0000346157 00000 n
+0000344278 00000 n
+0000343432 00000 n
+0000346092 00000 n
+0000344506 00000 n
+0000344665 00000 n
+0000344824 00000 n
+0001057463 00000 n
+0001037493 00000 n
+0001057288 00000 n
+0000344982 00000 n
+0000345141 00000 n
+0000345299 00000 n
+0000345458 00000 n
+0000345617 00000 n
+0000345776 00000 n
+0000345933 00000 n
+0001156594 00000 n
+0000349280 00000 n
+0000348513 00000 n
+0000346258 00000 n
+0000348701 00000 n
+0000348829 00000 n
+0000348957 00000 n
+0000349085 00000 n
+0000349150 00000 n
+0000349215 00000 n
+0001036676 00000 n
+0001018211 00000 n
+0001036501 00000 n
+0000353817 00000 n
+0000352676 00000 n
+0000349408 00000 n
+0000353178 00000 n
+0000353243 00000 n
+0000353370 00000 n
+0000353498 00000 n
+0000353626 00000 n
+0000352832 00000 n
+0000353026 00000 n
+0000353752 00000 n
+0000702777 00000 n
+0000764779 00000 n
+0000358499 00000 n
+0000357441 00000 n
+0000353945 00000 n
+0000357922 00000 n
+0000358050 00000 n
+0000357597 00000 n
+0000357760 00000 n
+0000358178 00000 n
+0000358306 00000 n
+0000358434 00000 n
+0000374296 00000 n
+0000361740 00000 n
+0000361165 00000 n
+0000358627 00000 n
+0000361291 00000 n
+0000361419 00000 n
+0000361547 00000 n
+0000361675 00000 n
+0000365198 00000 n
+0000364032 00000 n
+0000361854 00000 n
+0000364494 00000 n
+0000364622 00000 n
+0000364750 00000 n
+0000364878 00000 n
+0000365006 00000 n
+0000364188 00000 n
+0000364341 00000 n
+0000365133 00000 n
+0000626071 00000 n
+0000366275 00000 n
+0000365956 00000 n
+0000365284 00000 n
+0000366082 00000 n
+0000366210 00000 n
+0001156719 00000 n
+0000368318 00000 n
+0000367615 00000 n
+0000366375 00000 n
+0000367741 00000 n
+0000367869 00000 n
+0000367996 00000 n
+0000368124 00000 n
+0000368253 00000 n
+0000370897 00000 n
+0000370267 00000 n
+0000368418 00000 n
+0000370573 00000 n
+0000370702 00000 n
+0000370767 00000 n
+0000370832 00000 n
+0000370414 00000 n
+0000607020 00000 n
+0000374490 00000 n
+0000373785 00000 n
+0000371011 00000 n
+0000373911 00000 n
+0000374040 00000 n
+0000374167 00000 n
+0001017528 00000 n
+0001005466 00000 n
+0001017349 00000 n
+0000374425 00000 n
+0000379097 00000 n
+0000378207 00000 n
+0000374618 00000 n
+0000379032 00000 n
+0001004893 00000 n
+0000993960 00000 n
+0001004714 00000 n
+0000378381 00000 n
+0000378536 00000 n
+0000378706 00000 n
+0000378861 00000 n
+0000524492 00000 n
+0000691960 00000 n
+0000382462 00000 n
+0000382271 00000 n
+0000379266 00000 n
+0000382397 00000 n
+0000387241 00000 n
+0000386843 00000 n
+0000382604 00000 n
+0000387176 00000 n
+0000386990 00000 n
+0001156844 00000 n
+0000491355 00000 n
+0000389484 00000 n
+0000389036 00000 n
+0000387397 00000 n
+0000389162 00000 n
+0000389290 00000 n
+0000389355 00000 n
+0000389420 00000 n
+0000389953 00000 n
+0000389762 00000 n
+0000389612 00000 n
+0000389888 00000 n
+0000392648 00000 n
+0000395238 00000 n
+0000392483 00000 n
+0000389995 00000 n
+0000394786 00000 n
+0000394915 00000 n
+0000395044 00000 n
+0000394291 00000 n
+0000394453 00000 n
+0000993054 00000 n
+0000983034 00000 n
+0000992880 00000 n
+0000982470 00000 n
+0000973384 00000 n
+0000982295 00000 n
+0000395173 00000 n
+0000394615 00000 n
+0000394120 00000 n
+0000394178 00000 n
+0000394268 00000 n
+0000544452 00000 n
+0000584547 00000 n
+0000399868 00000 n
+0000398932 00000 n
+0000395409 00000 n
+0000399416 00000 n
+0000399545 00000 n
+0000399674 00000 n
+0000399088 00000 n
+0000399254 00000 n
+0000399803 00000 n
+0000768810 00000 n
+0000403588 00000 n
+0000403268 00000 n
+0000400024 00000 n
+0000403394 00000 n
+0000403523 00000 n
+0000405164 00000 n
+0000404784 00000 n
+0000403729 00000 n
+0000405099 00000 n
+0000404931 00000 n
+0001156969 00000 n
+0000406741 00000 n
+0000406422 00000 n
+0000405265 00000 n
+0000406548 00000 n
+0000406677 00000 n
+0000410203 00000 n
+0000409367 00000 n
+0000406855 00000 n
+0000409493 00000 n
+0000409622 00000 n
+0000409751 00000 n
+0000409880 00000 n
+0000410009 00000 n
+0000410138 00000 n
+0000414052 00000 n
+0000413155 00000 n
+0000410345 00000 n
+0000413472 00000 n
+0000413601 00000 n
+0000413730 00000 n
+0000413302 00000 n
+0000413859 00000 n
+0000413988 00000 n
+0000418170 00000 n
+0000417593 00000 n
+0000414193 00000 n
+0000417719 00000 n
+0000417848 00000 n
+0000417976 00000 n
+0000418105 00000 n
+0000422201 00000 n
+0000421753 00000 n
+0000418312 00000 n
+0000421879 00000 n
+0000422008 00000 n
+0000422136 00000 n
+0000424201 00000 n
+0000424010 00000 n
+0000422329 00000 n
+0000424136 00000 n
+0001157094 00000 n
+0000427470 00000 n
+0000427021 00000 n
+0000424302 00000 n
+0000427147 00000 n
+0000973109 00000 n
+0000969750 00000 n
+0000972930 00000 n
+0000427276 00000 n
+0000427405 00000 n
+0000431533 00000 n
+0000430596 00000 n
+0000427641 00000 n
+0000431081 00000 n
+0000431210 00000 n
+0000431339 00000 n
+0000969395 00000 n
+0000967397 00000 n
+0000969230 00000 n
+0000430752 00000 n
+0000430917 00000 n
+0000431468 00000 n
+0000846884 00000 n
+0000863051 00000 n
+0000434908 00000 n
+0000434331 00000 n
+0000431661 00000 n
+0000434457 00000 n
+0000434586 00000 n
+0000434715 00000 n
+0000434844 00000 n
+0000438906 00000 n
+0000437510 00000 n
+0000435022 00000 n
+0000437813 00000 n
+0000437942 00000 n
+0000438070 00000 n
+0000438199 00000 n
+0000438328 00000 n
+0000438455 00000 n
+0000438584 00000 n
+0000438713 00000 n
+0000438842 00000 n
+0000437657 00000 n
+0000654219 00000 n
+0000442628 00000 n
+0000442179 00000 n
+0000439034 00000 n
+0000442305 00000 n
+0000442434 00000 n
+0000442563 00000 n
+0000445788 00000 n
+0000445468 00000 n
+0000442742 00000 n
+0000445594 00000 n
+0000445723 00000 n
+0001157219 00000 n
+0000448611 00000 n
+0000448163 00000 n
+0000445958 00000 n
+0000448289 00000 n
+0000448418 00000 n
+0000448546 00000 n
+0000451649 00000 n
+0000451073 00000 n
+0000448768 00000 n
+0000451199 00000 n
+0000451328 00000 n
+0000451457 00000 n
+0000451586 00000 n
+0000454531 00000 n
+0000453825 00000 n
+0000451763 00000 n
+0000453951 00000 n
+0000454080 00000 n
+0000454209 00000 n
+0000454338 00000 n
+0000454467 00000 n
+0000457225 00000 n
+0000457034 00000 n
+0000454645 00000 n
+0000457160 00000 n
+0000459732 00000 n
+0000460980 00000 n
+0000459606 00000 n
+0000457339 00000 n
+0000460658 00000 n
+0000460787 00000 n
+0000460915 00000 n
+0000464030 00000 n
+0000463271 00000 n
+0000461151 00000 n
+0000463578 00000 n
+0000463707 00000 n
+0000463418 00000 n
+0000463836 00000 n
+0000463965 00000 n
+0001157344 00000 n
+0000764521 00000 n
+0000466730 00000 n
+0000466152 00000 n
+0000464158 00000 n
+0000466278 00000 n
+0000466407 00000 n
+0000466536 00000 n
+0000466665 00000 n
+0000467171 00000 n
+0000466980 00000 n
+0000466830 00000 n
+0000467106 00000 n
+0000471258 00000 n
+0000470492 00000 n
+0000467213 00000 n
+0000470806 00000 n
+0000470935 00000 n
+0000471063 00000 n
+0000471128 00000 n
+0000471193 00000 n
+0000470639 00000 n
+0000475756 00000 n
+0000475948 00000 n
+0000475501 00000 n
+0000471358 00000 n
+0000475627 00000 n
+0000475883 00000 n
+0000479800 00000 n
+0000479222 00000 n
+0000476076 00000 n
+0000479348 00000 n
+0000479477 00000 n
+0000479606 00000 n
+0000479735 00000 n
+0000482910 00000 n
+0000482332 00000 n
+0000479941 00000 n
+0000482458 00000 n
+0000482587 00000 n
+0000482716 00000 n
+0000482781 00000 n
+0000482845 00000 n
+0001157469 00000 n
+0000486235 00000 n
+0000485531 00000 n
+0000483067 00000 n
+0000485657 00000 n
+0000485786 00000 n
+0000485914 00000 n
+0000485979 00000 n
+0000486044 00000 n
+0000486170 00000 n
+0000491548 00000 n
+0000490760 00000 n
+0000486349 00000 n
+0000491226 00000 n
+0000490916 00000 n
+0000491067 00000 n
+0000491484 00000 n
+0000948376 00000 n
+0000495413 00000 n
+0000494142 00000 n
+0000491689 00000 n
+0000494832 00000 n
+0000494961 00000 n
+0000495090 00000 n
+0000495219 00000 n
+0000494307 00000 n
+0000494459 00000 n
+0000494645 00000 n
+0000495348 00000 n
+0000499560 00000 n
+0000499111 00000 n
+0000495541 00000 n
+0000499237 00000 n
+0000499366 00000 n
+0000499495 00000 n
+0000503466 00000 n
+0000503087 00000 n
+0000499688 00000 n
+0000503401 00000 n
+0000503234 00000 n
+0000506316 00000 n
+0000506511 00000 n
+0000506061 00000 n
+0000503580 00000 n
+0000506187 00000 n
+0000506381 00000 n
+0000506446 00000 n
+0001157594 00000 n
+0000510072 00000 n
+0000509881 00000 n
+0000506625 00000 n
+0000510007 00000 n
+0000513619 00000 n
+0000513170 00000 n
+0000510186 00000 n
+0000513296 00000 n
+0000513424 00000 n
+0000513489 00000 n
+0000513554 00000 n
+0000517215 00000 n
+0000516432 00000 n
+0000513733 00000 n
+0000516893 00000 n
+0000517022 00000 n
+0000517150 00000 n
+0000516588 00000 n
+0000516741 00000 n
+0000519411 00000 n
+0000518833 00000 n
+0000517329 00000 n
+0000518959 00000 n
+0000519088 00000 n
+0000519217 00000 n
+0000519346 00000 n
+0000520991 00000 n
+0000520800 00000 n
+0000519525 00000 n
+0000520926 00000 n
+0000522519 00000 n
+0000522328 00000 n
+0000521092 00000 n
+0000522454 00000 n
+0001157719 00000 n
+0000524556 00000 n
+0000524237 00000 n
+0000522620 00000 n
+0000524363 00000 n
+0000528083 00000 n
+0000527892 00000 n
+0000524670 00000 n
+0000528018 00000 n
+0000532444 00000 n
+0000532075 00000 n
+0000528225 00000 n
+0000532379 00000 n
+0000532222 00000 n
+0000731826 00000 n
+0000536380 00000 n
+0000535998 00000 n
+0000532572 00000 n
+0000536315 00000 n
+0000536145 00000 n
+0000540898 00000 n
+0000540533 00000 n
+0000536508 00000 n
+0000540833 00000 n
+0000540680 00000 n
+0000544646 00000 n
+0000544197 00000 n
+0000541040 00000 n
+0000544323 00000 n
+0000544517 00000 n
+0000544581 00000 n
+0001157844 00000 n
+0000548947 00000 n
+0000548581 00000 n
+0000544774 00000 n
+0000548882 00000 n
+0000548728 00000 n
+0000554031 00000 n
+0000552898 00000 n
+0000549075 00000 n
+0000553966 00000 n
+0000553081 00000 n
+0000553237 00000 n
+0000553422 00000 n
+0000553596 00000 n
+0000553781 00000 n
+0000640740 00000 n
+0000558307 00000 n
+0000558116 00000 n
+0000554229 00000 n
+0000558242 00000 n
+0000562260 00000 n
+0000562069 00000 n
+0000558421 00000 n
+0000562195 00000 n
+0000566114 00000 n
+0000565794 00000 n
+0000562374 00000 n
+0000565920 00000 n
+0000566049 00000 n
+0000569878 00000 n
+0000569062 00000 n
+0000566228 00000 n
+0000569555 00000 n
+0000569218 00000 n
+0000569684 00000 n
+0000569813 00000 n
+0000569388 00000 n
+0001157969 00000 n
+0000659573 00000 n
+0000574304 00000 n
+0000573613 00000 n
+0000570035 00000 n
+0000574110 00000 n
+0000573769 00000 n
+0000573939 00000 n
+0000574239 00000 n
+0000751896 00000 n
+0000577652 00000 n
+0000577332 00000 n
+0000574432 00000 n
+0000577458 00000 n
+0000577587 00000 n
+0000580605 00000 n
+0000580414 00000 n
+0000577766 00000 n
+0000580540 00000 n
+0000584611 00000 n
+0000584292 00000 n
+0000580776 00000 n
+0000584418 00000 n
+0000588170 00000 n
+0000587979 00000 n
+0000584768 00000 n
+0000588105 00000 n
+0000592511 00000 n
+0000591697 00000 n
+0000588341 00000 n
+0000592188 00000 n
+0000592317 00000 n
+0000591853 00000 n
+0000592446 00000 n
+0000592014 00000 n
+0001158094 00000 n
+0000596595 00000 n
+0000595971 00000 n
+0000592668 00000 n
+0000596273 00000 n
+0000596402 00000 n
+0000596118 00000 n
+0000596531 00000 n
+0000599815 00000 n
+0000599495 00000 n
+0000596723 00000 n
+0000599621 00000 n
+0000599750 00000 n
+0000603666 00000 n
+0000603000 00000 n
+0000599972 00000 n
+0000603473 00000 n
+0000603601 00000 n
+0000603156 00000 n
+0000603317 00000 n
+0000607215 00000 n
+0000606574 00000 n
+0000603837 00000 n
+0000606891 00000 n
+0000606721 00000 n
+0000607085 00000 n
+0000607150 00000 n
+0000611096 00000 n
+0000610593 00000 n
+0000607400 00000 n
+0000610902 00000 n
+0000611031 00000 n
+0000610740 00000 n
+0000615678 00000 n
+0000615303 00000 n
+0000611267 00000 n
+0000615613 00000 n
+0000615450 00000 n
+0001158219 00000 n
+0000728061 00000 n
+0000619594 00000 n
+0000618956 00000 n
+0000615806 00000 n
+0000619272 00000 n
+0000619401 00000 n
+0000619103 00000 n
+0000619529 00000 n
+0000657690 00000 n
+0000622185 00000 n
+0000621994 00000 n
+0000619721 00000 n
+0000622120 00000 n
+0000626264 00000 n
+0000625817 00000 n
+0000622355 00000 n
+0000625943 00000 n
+0000626199 00000 n
+0000630269 00000 n
+0000629906 00000 n
+0000626378 00000 n
+0000630204 00000 n
+0000630053 00000 n
+0000634441 00000 n
+0000634121 00000 n
+0000630397 00000 n
+0000634247 00000 n
+0000634376 00000 n
+0000638406 00000 n
+0000638215 00000 n
+0000634568 00000 n
+0000638341 00000 n
+0001158344 00000 n
+0000640805 00000 n
+0000640356 00000 n
+0000638533 00000 n
+0000640482 00000 n
+0000640611 00000 n
+0000645519 00000 n
+0000644988 00000 n
+0000640919 00000 n
+0000645454 00000 n
+0000645144 00000 n
+0000645295 00000 n
+0000649846 00000 n
+0000648964 00000 n
+0000645619 00000 n
+0000649265 00000 n
+0000649394 00000 n
+0000649523 00000 n
+0000649652 00000 n
+0000649781 00000 n
+0000649111 00000 n
+0000654284 00000 n
+0000653835 00000 n
+0000649960 00000 n
+0000653961 00000 n
+0000654090 00000 n
+0000657884 00000 n
+0000657435 00000 n
+0000654426 00000 n
+0000657561 00000 n
+0000657819 00000 n
+0000659638 00000 n
+0000659318 00000 n
+0000657998 00000 n
+0000659444 00000 n
+0001158469 00000 n
+0000661250 00000 n
+0000661059 00000 n
+0000659752 00000 n
+0000661185 00000 n
+0000662636 00000 n
+0000662445 00000 n
+0000661351 00000 n
+0000662571 00000 n
+0000666358 00000 n
+0000665779 00000 n
+0000662737 00000 n
+0000665905 00000 n
+0000666034 00000 n
+0000666163 00000 n
+0000666228 00000 n
+0000666293 00000 n
+0000670465 00000 n
+0000669957 00000 n
+0000666472 00000 n
+0000670271 00000 n
+0000670104 00000 n
+0000670400 00000 n
+0000948343 00000 n
+0000676387 00000 n
+0000673480 00000 n
+0000670579 00000 n
+0000676193 00000 n
+0000676322 00000 n
+0000673753 00000 n
+0000673915 00000 n
+0000674077 00000 n
+0000674239 00000 n
+0000674401 00000 n
+0000674563 00000 n
+0000674734 00000 n
+0000674896 00000 n
+0000675059 00000 n
+0000675219 00000 n
+0000675380 00000 n
+0000675543 00000 n
+0000675706 00000 n
+0000675869 00000 n
+0000676032 00000 n
+0000681485 00000 n
+0000679568 00000 n
+0000676501 00000 n
+0000681420 00000 n
+0000679796 00000 n
+0000679957 00000 n
+0000680125 00000 n
+0000680295 00000 n
+0000680456 00000 n
+0000680618 00000 n
+0000680780 00000 n
+0000680942 00000 n
+0000681105 00000 n
+0000681259 00000 n
+0001158594 00000 n
+0000686017 00000 n
+0000684655 00000 n
+0000681613 00000 n
+0000685952 00000 n
+0000684856 00000 n
+0000685010 00000 n
+0000685164 00000 n
+0000685318 00000 n
+0000685472 00000 n
+0000685634 00000 n
+0000685794 00000 n
+0000692025 00000 n
+0000689661 00000 n
+0000686145 00000 n
+0000691833 00000 n
+0000689907 00000 n
+0000690068 00000 n
+0000690230 00000 n
+0000690392 00000 n
+0000690554 00000 n
+0000690708 00000 n
+0000690871 00000 n
+0000691026 00000 n
+0000691191 00000 n
+0000691357 00000 n
+0000691519 00000 n
+0000691673 00000 n
+0000696120 00000 n
+0000695799 00000 n
+0000692153 00000 n
+0000695925 00000 n
+0000695990 00000 n
+0000696055 00000 n
+0000698894 00000 n
+0000698703 00000 n
+0000696262 00000 n
+0000698829 00000 n
+0000703101 00000 n
+0000702031 00000 n
+0000699052 00000 n
+0000702519 00000 n
+0000702648 00000 n
+0000702906 00000 n
+0000702187 00000 n
+0000702357 00000 n
+0000702971 00000 n
+0000703036 00000 n
+0000706552 00000 n
+0000706232 00000 n
+0000703229 00000 n
+0000706358 00000 n
+0000706423 00000 n
+0000706487 00000 n
+0001158719 00000 n
+0000710040 00000 n
+0000709719 00000 n
+0000706653 00000 n
+0000709845 00000 n
+0000709910 00000 n
+0000709975 00000 n
+0000713961 00000 n
+0000713252 00000 n
+0000710155 00000 n
+0000713378 00000 n
+0000713507 00000 n
+0000713572 00000 n
+0000713637 00000 n
+0000713702 00000 n
+0000713767 00000 n
+0000713896 00000 n
+0000718202 00000 n
+0000717365 00000 n
+0000714075 00000 n
+0000717491 00000 n
+0000717556 00000 n
+0000717621 00000 n
+0000717750 00000 n
+0000717815 00000 n
+0000717880 00000 n
+0000718009 00000 n
+0000718074 00000 n
+0000718138 00000 n
+0000721229 00000 n
+0000720527 00000 n
+0000718330 00000 n
+0000720653 00000 n
+0000720780 00000 n
+0000720907 00000 n
+0000721036 00000 n
+0000721164 00000 n
+0000723939 00000 n
+0000723362 00000 n
+0000721428 00000 n
+0000723488 00000 n
+0000723617 00000 n
+0000723746 00000 n
+0000723811 00000 n
+0000723875 00000 n
+0000728126 00000 n
+0000727806 00000 n
+0000724124 00000 n
+0000727932 00000 n
+0001158844 00000 n
+0000731891 00000 n
+0000731131 00000 n
+0000728253 00000 n
+0000731438 00000 n
+0000731567 00000 n
+0000731632 00000 n
+0000731697 00000 n
+0000731278 00000 n
+0000735582 00000 n
+0000735003 00000 n
+0000732005 00000 n
+0000735129 00000 n
+0000735258 00000 n
+0000735387 00000 n
+0000735452 00000 n
+0000735517 00000 n
+0000739196 00000 n
+0000738301 00000 n
+0000735696 00000 n
+0000738613 00000 n
+0000738448 00000 n
+0000738742 00000 n
+0000738807 00000 n
+0000738872 00000 n
+0000739001 00000 n
+0000739066 00000 n
+0000739131 00000 n
+0000948310 00000 n
+0000743353 00000 n
+0000742903 00000 n
+0000739310 00000 n
+0000743029 00000 n
+0000743158 00000 n
+0000743223 00000 n
+0000743288 00000 n
+0000745244 00000 n
+0000744924 00000 n
+0000743481 00000 n
+0000745050 00000 n
+0000967116 00000 n
+0000959832 00000 n
+0000966936 00000 n
+0000745179 00000 n
+0000745727 00000 n
+0000745536 00000 n
+0000745386 00000 n
+0000745662 00000 n
+0001158969 00000 n
+0000747539 00000 n
+0000747092 00000 n
+0000745769 00000 n
+0000747218 00000 n
+0000747347 00000 n
+0000747474 00000 n
+0000751961 00000 n
+0000751018 00000 n
+0000747653 00000 n
+0000751381 00000 n
+0000959511 00000 n
+0000950298 00000 n
+0000959325 00000 n
+0000751165 00000 n
+0000751510 00000 n
+0000751638 00000 n
+0000751767 00000 n
+0000753320 00000 n
+0000753129 00000 n
+0000752202 00000 n
+0000753255 00000 n
+0000753761 00000 n
+0000753570 00000 n
+0000753420 00000 n
+0000753696 00000 n
+0000757075 00000 n
+0000755849 00000 n
+0000753803 00000 n
+0000756366 00000 n
+0000756495 00000 n
+0000756624 00000 n
+0000756753 00000 n
+0000756882 00000 n
+0000757011 00000 n
+0000756005 00000 n
+0000756177 00000 n
+0000757530 00000 n
+0000757339 00000 n
+0000757189 00000 n
+0000757465 00000 n
+0001159094 00000 n
+0000760775 00000 n
+0000760197 00000 n
+0000757572 00000 n
+0000760323 00000 n
+0000760452 00000 n
+0000760581 00000 n
+0000760710 00000 n
+0000764972 00000 n
+0000763753 00000 n
+0000760861 00000 n
+0000764263 00000 n
+0000764392 00000 n
+0000764650 00000 n
+0000763909 00000 n
+0000764088 00000 n
+0000764844 00000 n
+0000764908 00000 n
+0000771862 00000 n
+0000768034 00000 n
+0000765128 00000 n
+0000768160 00000 n
+0000768225 00000 n
+0000768290 00000 n
+0000768355 00000 n
+0000768420 00000 n
+0000768485 00000 n
+0000768550 00000 n
+0000768615 00000 n
+0000768680 00000 n
+0000768745 00000 n
+0000768875 00000 n
+0000768940 00000 n
+0000769005 00000 n
+0000769070 00000 n
+0000769135 00000 n
+0000769200 00000 n
+0000769265 00000 n
+0000769330 00000 n
+0000769395 00000 n
+0000769460 00000 n
+0000769525 00000 n
+0000769590 00000 n
+0000769655 00000 n
+0000769720 00000 n
+0000769785 00000 n
+0000769850 00000 n
+0000769915 00000 n
+0000769980 00000 n
+0000770045 00000 n
+0000770110 00000 n
+0000770175 00000 n
+0000770240 00000 n
+0000770305 00000 n
+0000770370 00000 n
+0000770434 00000 n
+0000770499 00000 n
+0000770564 00000 n
+0000770629 00000 n
+0000770694 00000 n
+0000770759 00000 n
+0000770824 00000 n
+0000770889 00000 n
+0000770954 00000 n
+0000771019 00000 n
+0000771084 00000 n
+0000771149 00000 n
+0000771214 00000 n
+0000771279 00000 n
+0000771344 00000 n
+0000771409 00000 n
+0000771474 00000 n
+0000771539 00000 n
+0000771604 00000 n
+0000771669 00000 n
+0000771734 00000 n
+0000771798 00000 n
+0000778510 00000 n
+0000774946 00000 n
+0000771976 00000 n
+0000775072 00000 n
+0000775137 00000 n
+0000775202 00000 n
+0000775267 00000 n
+0000775332 00000 n
+0000775397 00000 n
+0000775462 00000 n
+0000775527 00000 n
+0000775592 00000 n
+0000775657 00000 n
+0000775722 00000 n
+0000775787 00000 n
+0000775851 00000 n
+0000775916 00000 n
+0000775981 00000 n
+0000776046 00000 n
+0000776111 00000 n
+0000776176 00000 n
+0000776241 00000 n
+0000776306 00000 n
+0000776371 00000 n
+0000776436 00000 n
+0000776501 00000 n
+0000776566 00000 n
+0000776630 00000 n
+0000776695 00000 n
+0000776760 00000 n
+0000776825 00000 n
+0000776890 00000 n
+0000776955 00000 n
+0000777020 00000 n
+0000777085 00000 n
+0000777150 00000 n
+0000777215 00000 n
+0000777280 00000 n
+0000777345 00000 n
+0000777410 00000 n
+0000777475 00000 n
+0000777540 00000 n
+0000777605 00000 n
+0000777669 00000 n
+0000777733 00000 n
+0000777797 00000 n
+0000777862 00000 n
+0000777927 00000 n
+0000777992 00000 n
+0000778057 00000 n
+0000778122 00000 n
+0000778187 00000 n
+0000778252 00000 n
+0000778317 00000 n
+0000778382 00000 n
+0000778446 00000 n
+0000784685 00000 n
+0000781247 00000 n
+0000778624 00000 n
+0000781373 00000 n
+0000781438 00000 n
+0000781503 00000 n
+0000781568 00000 n
+0000781633 00000 n
+0000781698 00000 n
+0000781763 00000 n
+0000781828 00000 n
+0000781893 00000 n
+0000781958 00000 n
+0000782023 00000 n
+0000782088 00000 n
+0000782153 00000 n
+0000782218 00000 n
+0000782283 00000 n
+0000782348 00000 n
+0000782413 00000 n
+0000782478 00000 n
+0000782543 00000 n
+0000782608 00000 n
+0000782673 00000 n
+0000782738 00000 n
+0000782803 00000 n
+0000782868 00000 n
+0000782933 00000 n
+0000782998 00000 n
+0000783063 00000 n
+0000783128 00000 n
+0000783193 00000 n
+0000783258 00000 n
+0000783323 00000 n
+0000783388 00000 n
+0000783453 00000 n
+0000783518 00000 n
+0000783582 00000 n
+0000783647 00000 n
+0000783712 00000 n
+0000783777 00000 n
+0000783842 00000 n
+0000783907 00000 n
+0000783972 00000 n
+0000784037 00000 n
+0000784102 00000 n
+0000784167 00000 n
+0000784232 00000 n
+0000784297 00000 n
+0000784362 00000 n
+0000784427 00000 n
+0000784492 00000 n
+0000784557 00000 n
+0000784621 00000 n
+0000790204 00000 n
+0000787808 00000 n
+0000784799 00000 n
+0000787934 00000 n
+0000787999 00000 n
+0000788064 00000 n
+0000788129 00000 n
+0000788194 00000 n
+0000788259 00000 n
+0000788324 00000 n
+0000788389 00000 n
+0000788454 00000 n
+0000788519 00000 n
+0000788584 00000 n
+0000788649 00000 n
+0000788714 00000 n
+0000788778 00000 n
+0000788843 00000 n
+0000788908 00000 n
+0000788973 00000 n
+0000789038 00000 n
+0000789103 00000 n
+0000789168 00000 n
+0000789233 00000 n
+0000789298 00000 n
+0000789363 00000 n
+0000789428 00000 n
+0000789493 00000 n
+0000789621 00000 n
+0000789750 00000 n
+0000789815 00000 n
+0000789880 00000 n
+0000789945 00000 n
+0000790010 00000 n
+0000790139 00000 n
+0001159219 00000 n
+0000793412 00000 n
+0000792705 00000 n
+0000790331 00000 n
+0000792831 00000 n
+0000792960 00000 n
+0000793089 00000 n
+0000793218 00000 n
+0000793347 00000 n
+0000796904 00000 n
+0000796147 00000 n
+0000793539 00000 n
+0000796454 00000 n
+0000796583 00000 n
+0000796294 00000 n
+0000796711 00000 n
+0000796839 00000 n
+0000800148 00000 n
+0000799570 00000 n
+0000797031 00000 n
+0000799696 00000 n
+0000799825 00000 n
+0000799954 00000 n
+0000800083 00000 n
+0000803057 00000 n
+0000802737 00000 n
+0000800262 00000 n
+0000802863 00000 n
+0000802992 00000 n
+0000805647 00000 n
+0000805198 00000 n
+0000803227 00000 n
+0000805324 00000 n
+0000805453 00000 n
+0000805582 00000 n
+0000806088 00000 n
+0000805897 00000 n
+0000805747 00000 n
+0000806023 00000 n
+0001159344 00000 n
+0000808800 00000 n
+0000808156 00000 n
+0000806130 00000 n
+0000808282 00000 n
+0000808411 00000 n
+0000808540 00000 n
+0000808605 00000 n
+0000808670 00000 n
+0000808735 00000 n
+0000813140 00000 n
+0000812820 00000 n
+0000808914 00000 n
+0000812946 00000 n
+0000813011 00000 n
+0000813076 00000 n
+0000816743 00000 n
+0000816488 00000 n
+0000813296 00000 n
+0000816614 00000 n
+0000816679 00000 n
+0000819994 00000 n
+0000819803 00000 n
+0000816885 00000 n
+0000819929 00000 n
+0000823715 00000 n
+0000823459 00000 n
+0000820122 00000 n
+0000823585 00000 n
+0000823650 00000 n
+0000826700 00000 n
+0000825992 00000 n
+0000823857 00000 n
+0000826118 00000 n
+0000826183 00000 n
+0000826248 00000 n
+0000826313 00000 n
+0000826378 00000 n
+0000826507 00000 n
+0000826572 00000 n
+0000826636 00000 n
+0001159469 00000 n
+0000831369 00000 n
+0000831113 00000 n
+0000826842 00000 n
+0000831239 00000 n
+0000831304 00000 n
+0000834388 00000 n
+0000833615 00000 n
+0000831497 00000 n
+0000833741 00000 n
+0000833806 00000 n
+0000833871 00000 n
+0000833936 00000 n
+0000834065 00000 n
+0000834130 00000 n
+0000834193 00000 n
+0000834258 00000 n
+0000834323 00000 n
+0000837301 00000 n
+0000836786 00000 n
+0000834544 00000 n
+0000836912 00000 n
+0000836977 00000 n
+0000837042 00000 n
+0000837107 00000 n
+0000837172 00000 n
+0000837237 00000 n
+0000840674 00000 n
+0000840094 00000 n
+0000837457 00000 n
+0000840220 00000 n
+0000840349 00000 n
+0000840414 00000 n
+0000840479 00000 n
+0000840544 00000 n
+0000840609 00000 n
+0000844126 00000 n
+0000843870 00000 n
+0000840816 00000 n
+0000843996 00000 n
+0000844061 00000 n
+0000847078 00000 n
+0000846434 00000 n
+0000844254 00000 n
+0000846560 00000 n
+0000846625 00000 n
+0000846690 00000 n
+0000846755 00000 n
+0000846949 00000 n
+0000847014 00000 n
+0001159594 00000 n
+0000850719 00000 n
+0000850398 00000 n
+0000847247 00000 n
+0000850524 00000 n
+0000850589 00000 n
+0000850654 00000 n
+0000854310 00000 n
+0000854119 00000 n
+0000850847 00000 n
+0000854245 00000 n
+0000857776 00000 n
+0000857455 00000 n
+0000854438 00000 n
+0000857581 00000 n
+0000857646 00000 n
+0000857711 00000 n
+0000860434 00000 n
+0000859725 00000 n
+0000857917 00000 n
+0000859851 00000 n
+0000859916 00000 n
+0000859981 00000 n
+0000860046 00000 n
+0000860175 00000 n
+0000860240 00000 n
+0000860305 00000 n
+0000860370 00000 n
+0000863311 00000 n
+0000862601 00000 n
+0000860590 00000 n
+0000862727 00000 n
+0000862792 00000 n
+0000862857 00000 n
+0000862922 00000 n
+0000863116 00000 n
+0000863181 00000 n
+0000863246 00000 n
+0000866883 00000 n
+0000866562 00000 n
+0000863467 00000 n
+0000866688 00000 n
+0000866753 00000 n
+0000866818 00000 n
+0001159719 00000 n
+0000870032 00000 n
+0000869387 00000 n
+0000867011 00000 n
+0000869513 00000 n
+0000869578 00000 n
+0000869643 00000 n
+0000869708 00000 n
+0000869837 00000 n
+0000869902 00000 n
+0000869967 00000 n
+0000873563 00000 n
+0000873242 00000 n
+0000870188 00000 n
+0000873368 00000 n
+0000873433 00000 n
+0000873498 00000 n
+0000877146 00000 n
+0000876955 00000 n
+0000873705 00000 n
+0000877081 00000 n
+0000880631 00000 n
+0000880440 00000 n
+0000877274 00000 n
+0000880566 00000 n
+0000883525 00000 n
+0000882881 00000 n
+0000880773 00000 n
+0000883007 00000 n
+0000883072 00000 n
+0000883137 00000 n
+0000883202 00000 n
+0000883331 00000 n
+0000883396 00000 n
+0000883461 00000 n
+0000886438 00000 n
+0000885733 00000 n
+0000883681 00000 n
+0000885859 00000 n
+0000885924 00000 n
+0000885989 00000 n
+0000886054 00000 n
+0000886119 00000 n
+0000886184 00000 n
+0000886310 00000 n
+0000886375 00000 n
+0001159844 00000 n
+0000889643 00000 n
+0000889258 00000 n
+0000886580 00000 n
+0000889384 00000 n
+0000889449 00000 n
+0000889514 00000 n
+0000889579 00000 n
+0000892945 00000 n
+0000892754 00000 n
+0000889785 00000 n
+0000892880 00000 n
+0000896127 00000 n
+0000895353 00000 n
+0000893073 00000 n
+0000895479 00000 n
+0000895544 00000 n
+0000895609 00000 n
+0000895674 00000 n
+0000895802 00000 n
+0000895867 00000 n
+0000895932 00000 n
+0000895997 00000 n
+0000896062 00000 n
+0000899375 00000 n
+0000899184 00000 n
+0000896283 00000 n
+0000899310 00000 n
+0000902534 00000 n
+0000902149 00000 n
+0000899588 00000 n
+0000902275 00000 n
+0000902340 00000 n
+0000902405 00000 n
+0000902470 00000 n
+0000905086 00000 n
+0000904313 00000 n
+0000902775 00000 n
+0000904439 00000 n
+0000904504 00000 n
+0000904569 00000 n
+0000904698 00000 n
+0000904762 00000 n
+0000904827 00000 n
+0000904892 00000 n
+0000904957 00000 n
+0000905022 00000 n
+0001159969 00000 n
+0000909247 00000 n
+0000908732 00000 n
+0000905242 00000 n
+0000908858 00000 n
+0000908987 00000 n
+0000909052 00000 n
+0000909117 00000 n
+0000909182 00000 n
+0000913463 00000 n
+0000913207 00000 n
+0000909375 00000 n
+0000913333 00000 n
+0000913398 00000 n
+0000916798 00000 n
+0000916607 00000 n
+0000913591 00000 n
+0000916733 00000 n
+0000919416 00000 n
+0000918966 00000 n
+0000916926 00000 n
+0000919092 00000 n
+0000919157 00000 n
+0000919222 00000 n
+0000919287 00000 n
+0000919352 00000 n
+0000923265 00000 n
+0000922685 00000 n
+0000919571 00000 n
+0000922811 00000 n
+0000922940 00000 n
+0000923005 00000 n
+0000923070 00000 n
+0000923135 00000 n
+0000923200 00000 n
+0000926430 00000 n
+0000925720 00000 n
+0000923407 00000 n
+0000925846 00000 n
+0000925911 00000 n
+0000925976 00000 n
+0000926041 00000 n
+0000926170 00000 n
+0000926235 00000 n
+0000926300 00000 n
+0000926365 00000 n
+0001160094 00000 n
+0000929151 00000 n
+0000928895 00000 n
+0000926586 00000 n
+0000929021 00000 n
+0000929086 00000 n
+0000932407 00000 n
+0000931634 00000 n
+0000929279 00000 n
+0000931760 00000 n
+0000931825 00000 n
+0000931890 00000 n
+0000931955 00000 n
+0000932084 00000 n
+0000932149 00000 n
+0000932214 00000 n
+0000932278 00000 n
+0000932343 00000 n
+0000935697 00000 n
+0000935378 00000 n
+0000932563 00000 n
+0000935504 00000 n
+0000935569 00000 n
+0000935634 00000 n
+0000939167 00000 n
+0000938524 00000 n
+0000935853 00000 n
+0000938650 00000 n
+0000938715 00000 n
+0000938844 00000 n
+0000938908 00000 n
+0000938973 00000 n
+0000939038 00000 n
+0000939102 00000 n
+0000941782 00000 n
+0000940815 00000 n
+0000939309 00000 n
+0000940941 00000 n
+0000941006 00000 n
+0000941071 00000 n
+0000941200 00000 n
+0000941265 00000 n
+0000941330 00000 n
+0000941395 00000 n
+0000941460 00000 n
+0000941525 00000 n
+0000941653 00000 n
+0000941718 00000 n
+0000944675 00000 n
+0000943840 00000 n
+0000941938 00000 n
+0000943966 00000 n
+0000944031 00000 n
+0000944096 00000 n
+0000944161 00000 n
+0000944226 00000 n
+0000944291 00000 n
+0000944419 00000 n
+0000944482 00000 n
+0000944546 00000 n
+0000944611 00000 n
+0001160219 00000 n
+0000947419 00000 n
+0000946580 00000 n
+0000944817 00000 n
+0000946706 00000 n
+0000946771 00000 n
+0000946836 00000 n
+0000946901 00000 n
+0000947030 00000 n
+0000947095 00000 n
+0000947160 00000 n
+0000947225 00000 n
+0000947290 00000 n
+0000947355 00000 n
+0000948210 00000 n
+0000947954 00000 n
+0000947561 00000 n
+0000948080 00000 n
+0000948145 00000 n
+0000948409 00000 n
+0000959753 00000 n
+0000967342 00000 n
+0000969642 00000 n
+0000969611 00000 n
+0000973329 00000 n
+0000982769 00000 n
+0000993504 00000 n
+0001005199 00000 n
+0001017916 00000 n
+0001037150 00000 n
+0001058046 00000 n
+0001080194 00000 n
+0001098450 00000 n
+0001101297 00000 n
+0001101067 00000 n
+0001128715 00000 n
+0001155981 00000 n
+0001160317 00000 n
+0001160442 00000 n
+0001160568 00000 n
+0001160694 00000 n
+0001160820 00000 n
+0001160946 00000 n
+0001161026 00000 n
+0001161136 00000 n
+0001183038 00000 n
+0001207231 00000 n
+0001207272 00000 n
+0001207312 00000 n
+0001207446 00000 n
trailer
<<
/Size 2760
/Root 2758 0 R
/Info 2759 0 R
-/ID [<043A5ABB3220F4DDF742DF411E794D61> <043A5ABB3220F4DDF742DF411E794D61>]
+/ID [<56A51CE89D72B9E1A2B24B6DA534816F> <56A51CE89D72B9E1A2B24B6DA534816F>]
>>
startxref
-1206368
+1207704
%%EOF
diff --git a/contrib/bind9/doc/arm/Makefile.in b/contrib/bind9/doc/arm/Makefile.in
index c003e92..3ecf4af 100644
--- a/contrib/bind9/doc/arm/Makefile.in
+++ b/contrib/bind9/doc/arm/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004-2007, 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001, 2002 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/doc/arm/man.arpaname.html b/contrib/bind9/doc/arm/man.arpaname.html
index 44f1dbf..814e0b8 100644
--- a/contrib/bind9/doc/arm/man.arpaname.html
+++ b/contrib/bind9/doc/arm/man.arpaname.html
@@ -50,20 +50,20 @@
<div class="cmdsynopsis"><p><code class="command">arpaname</code> {<em class="replaceable"><code>ipaddress </code></em>...}</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2614792"></a><h2>DESCRIPTION</h2>
+<a name="id2618405"></a><h2>DESCRIPTION</h2>
<p>
<span><strong class="command">arpaname</strong></span> translates IP addresses (IPv4 and
IPv6) to the corresponding IN-ADDR.ARPA or IP6.ARPA names.
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2614807"></a><h2>SEE ALSO</h2>
+<a name="id2618420"></a><h2>SEE ALSO</h2>
<p>
<em class="citetitle">BIND 9 Administrator Reference Manual</em>.
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2652026"></a><h2>AUTHOR</h2>
+<a name="id2618434"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/doc/arm/man.ddns-confgen.html b/contrib/bind9/doc/arm/man.ddns-confgen.html
index ff6d9be..3724304 100644
--- a/contrib/bind9/doc/arm/man.ddns-confgen.html
+++ b/contrib/bind9/doc/arm/man.ddns-confgen.html
@@ -50,7 +50,7 @@
<div class="cmdsynopsis"><p><code class="command">ddns-confgen</code> [<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>] [<code class="option">-h</code>] [<code class="option">-k <em class="replaceable"><code>keyname</code></em></code>] [<code class="option">-r <em class="replaceable"><code>randomfile</code></em></code>] [ -s <em class="replaceable"><code>name</code></em> | -z <em class="replaceable"><code>zone</code></em> ] [<code class="option">-q</code>] [name]</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2651677"></a><h2>DESCRIPTION</h2>
+<a name="id2641910"></a><h2>DESCRIPTION</h2>
<p><span><strong class="command">ddns-confgen</strong></span>
generates a key for use by <span><strong class="command">nsupdate</strong></span>
and <span><strong class="command">named</strong></span>. It simplifies configuration
@@ -77,7 +77,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2651765"></a><h2>OPTIONS</h2>
+<a name="id2641997"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
<dd><p>
@@ -144,7 +144,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2651965"></a><h2>SEE ALSO</h2>
+<a name="id2642608"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">nsupdate</span>(1)</span>,
<span class="citerefentry"><span class="refentrytitle">named.conf</span>(5)</span>,
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
@@ -152,7 +152,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2652004"></a><h2>AUTHOR</h2>
+<a name="id2642646"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/doc/arm/man.dig.html b/contrib/bind9/doc/arm/man.dig.html
index b028d77..e5796ca 100644
--- a/contrib/bind9/doc/arm/man.dig.html
+++ b/contrib/bind9/doc/arm/man.dig.html
@@ -52,7 +52,7 @@
<div class="cmdsynopsis"><p><code class="command">dig</code> [global-queryopt...] [query...]</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2610001"></a><h2>DESCRIPTION</h2>
+<a name="id2609644"></a><h2>DESCRIPTION</h2>
<p><span><strong class="command">dig</strong></span>
(domain information groper) is a flexible tool
for interrogating DNS name servers. It performs DNS lookups and
@@ -98,7 +98,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2610096"></a><h2>SIMPLE USAGE</h2>
+<a name="id2609808"></a><h2>SIMPLE USAGE</h2>
<p>
A typical invocation of <span><strong class="command">dig</strong></span> looks like:
</p>
@@ -144,7 +144,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2610889"></a><h2>OPTIONS</h2>
+<a name="id2610055"></a><h2>OPTIONS</h2>
<p>
The <code class="option">-b</code> option sets the source IP address of the query
to <em class="parameter"><code>address</code></em>. This must be a valid
@@ -248,7 +248,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2662636"></a><h2>QUERY OPTIONS</h2>
+<a name="id2662690"></a><h2>QUERY OPTIONS</h2>
<p><span><strong class="command">dig</strong></span>
provides a number of query options which affect
the way in which lookups are made and the results displayed. Some of
@@ -579,7 +579,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2663651"></a><h2>MULTIPLE QUERIES</h2>
+<a name="id2663772"></a><h2>MULTIPLE QUERIES</h2>
<p>
The BIND 9 implementation of <span><strong class="command">dig </strong></span>
supports
@@ -625,7 +625,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2663804"></a><h2>IDN SUPPORT</h2>
+<a name="id2663858"></a><h2>IDN SUPPORT</h2>
<p>
If <span><strong class="command">dig</strong></span> has been built with IDN (internationalized
domain name) support, it can accept and display non-ASCII domain names.
@@ -639,14 +639,14 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2663833"></a><h2>FILES</h2>
+<a name="id2663886"></a><h2>FILES</h2>
<p><code class="filename">/etc/resolv.conf</code>
</p>
<p><code class="filename">${HOME}/.digrc</code>
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2663854"></a><h2>SEE ALSO</h2>
+<a name="id2663908"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
@@ -654,7 +654,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2663892"></a><h2>BUGS</h2>
+<a name="id2663945"></a><h2>BUGS</h2>
<p>
There are probably too many query options.
</p>
diff --git a/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html b/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html
index 302125c..d63d6da 100644
--- a/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html
+++ b/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html
@@ -51,14 +51,14 @@
<div class="cmdsynopsis"><p><code class="command">dnssec-dsfromkey</code> {-s} [<code class="option">-1</code>] [<code class="option">-2</code>] [<code class="option">-a <em class="replaceable"><code>alg</code></em></code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-l <em class="replaceable"><code>domain</code></em></code>] [<code class="option">-s</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-f <em class="replaceable"><code>file</code></em></code>] [<code class="option">-A</code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] {dnsname}</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2611846"></a><h2>DESCRIPTION</h2>
+<a name="id2611633"></a><h2>DESCRIPTION</h2>
<p><span><strong class="command">dnssec-dsfromkey</strong></span>
outputs the Delegation Signer (DS) resource record (RR), as defined in
RFC 3658 and RFC 4509, for the given key(s).
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2611860"></a><h2>OPTIONS</h2>
+<a name="id2611646"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-1</span></dt>
<dd><p>
@@ -73,7 +73,8 @@
<dd><p>
Select the digest algorithm. The value of
<code class="option">algorithm</code> must be one of SHA-1 (SHA1),
- SHA-256 (SHA256) or GOST. These values are case insensitive.
+ SHA-256 (SHA256), GOST or SHA-384 (SHA384).
+ These values are case insensitive.
</p></dd>
<dt><span class="term">-K <em class="replaceable"><code>directory</code></em></span></dt>
<dd><p>
@@ -119,7 +120,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2612526"></a><h2>EXAMPLE</h2>
+<a name="id2611835"></a><h2>EXAMPLE</h2>
<p>
To build the SHA-256 DS RR from the
<strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
@@ -134,7 +135,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2612563"></a><h2>FILES</h2>
+<a name="id2611872"></a><h2>FILES</h2>
<p>
The keyfile can be designed by the key identification
<code class="filename">Knnnn.+aaa+iiiii</code> or the full file name
@@ -148,13 +149,13 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2612604"></a><h2>CAVEAT</h2>
+<a name="id2611913"></a><h2>CAVEAT</h2>
<p>
A keyfile error can give a "file not found" even if the file exists.
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2612614"></a><h2>SEE ALSO</h2>
+<a name="id2611923"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
@@ -164,7 +165,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2612858"></a><h2>AUTHOR</h2>
+<a name="id2611962"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html b/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html
index 8b16a79..38cba98 100644
--- a/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html
+++ b/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html
@@ -50,7 +50,7 @@
<div class="cmdsynopsis"><p><code class="command">dnssec-keyfromlabel</code> {-l <em class="replaceable"><code>label</code></em>} [<code class="option">-3</code>] [<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>] [<code class="option">-A <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-D <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-E <em class="replaceable"><code>engine</code></em></code>] [<code class="option">-f <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-G</code>] [<code class="option">-I <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-k</code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>] [<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>] [<code class="option">-R <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-y</code>] {name}</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2613302"></a><h2>DESCRIPTION</h2>
+<a name="id2612614"></a><h2>DESCRIPTION</h2>
<p><span><strong class="command">dnssec-keyfromlabel</strong></span>
gets keys with the given label from a crypto hardware and builds
key files for DNSSEC (Secure DNS), as defined in RFC 2535
@@ -63,14 +63,15 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2613322"></a><h2>OPTIONS</h2>
+<a name="id2612634"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
<dd>
<p>
Selects the cryptographic algorithm. The value of
<code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
- DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512 or ECCGOST.
+ DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
+ ECDSAP256SHA256 or ECDSAP384SHA384.
These values are case insensitive.
</p>
<p>
@@ -182,7 +183,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2614168"></a><h2>TIMING OPTIONS</h2>
+<a name="id2613344"></a><h2>TIMING OPTIONS</h2>
<p>
Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS.
If the argument begins with a '+' or '-', it is interpreted as
@@ -229,7 +230,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2614266"></a><h2>GENERATED KEY FILES</h2>
+<a name="id2615080"></a><h2>GENERATED KEY FILES</h2>
<p>
When <span><strong class="command">dnssec-keyfromlabel</strong></span> completes
successfully,
@@ -268,7 +269,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2615589"></a><h2>SEE ALSO</h2>
+<a name="id2615447"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
@@ -276,7 +277,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2615622"></a><h2>AUTHOR</h2>
+<a name="id2615480"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/doc/arm/man.dnssec-keygen.html b/contrib/bind9/doc/arm/man.dnssec-keygen.html
index be8e0f5..3a3a839 100644
--- a/contrib/bind9/doc/arm/man.dnssec-keygen.html
+++ b/contrib/bind9/doc/arm/man.dnssec-keygen.html
@@ -50,7 +50,7 @@
<div class="cmdsynopsis"><p><code class="command">dnssec-keygen</code> [<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>] [<code class="option">-b <em class="replaceable"><code>keysize</code></em></code>] [<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>] [<code class="option">-3</code>] [<code class="option">-A <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-C</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-D <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-E <em class="replaceable"><code>engine</code></em></code>] [<code class="option">-e</code>] [<code class="option">-f <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-G</code>] [<code class="option">-g <em class="replaceable"><code>generator</code></em></code>] [<code class="option">-h</code>] [<code class="option">-I <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-i <em class="replaceable"><code>interval</code></em></code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-k</code>] [<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>] [<code class="option">-q</code>] [<code class="option">-R <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-S <em class="replaceable"><code>key</code></em></code>] [<code class="option">-s <em class="replaceable"><code>strength</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-z</code>] {name}</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2614596"></a><h2>DESCRIPTION</h2>
+<a name="id2613979"></a><h2>DESCRIPTION</h2>
<p><span><strong class="command">dnssec-keygen</strong></span>
generates keys for DNSSEC (Secure DNS), as defined in RFC 2535
and RFC 4034. It can also generate keys for use with
@@ -64,14 +64,15 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2614684"></a><h2>OPTIONS</h2>
+<a name="id2614068"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
<dd>
<p>
Selects the cryptographic algorithm. For DNSSEC keys, the value
of <code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
- DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512 or ECCGOST.
+ DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
+ ECDSAP256SHA256 or ECDSAP384SHA384.
For TSIG/TKEY, the value must
be DH (Diffie Hellman), HMAC-MD5, HMAC-SHA1, HMAC-SHA224,
HMAC-SHA256, HMAC-SHA384, or HMAC-SHA512. These values are
@@ -102,7 +103,8 @@
between 512 and 2048 bits. Diffie Hellman keys must be between
128 and 4096 bits. DSA keys must be between 512 and 1024
bits and an exact multiple of 64. HMAC keys must be
- between 1 and 512 bits.
+ between 1 and 512 bits. Elliptic curve algorithms don't need
+ this parameter.
</p>
<p>
The key size does not need to be specified if using a default
@@ -129,7 +131,8 @@
Use an NSEC3-capable algorithm to generate a DNSSEC key.
If this option is used and no algorithm is explicitly
set on the command line, NSEC3RSASHA1 will be used by
- default. Note that RSASHA256, RSASHA512 and ECCGOST algorithms
+ default. Note that RSASHA256, RSASHA512, ECCGOST,
+ ECDSAP256SHA256 and ECDSAP384SHA384 algorithms
are NSEC3-capable.
</p></dd>
<dt><span class="term">-C</span></dt>
@@ -266,7 +269,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2668243"></a><h2>TIMING OPTIONS</h2>
+<a name="id2666124"></a><h2>TIMING OPTIONS</h2>
<p>
Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS.
If the argument begins with a '+' or '-', it is interpreted as
@@ -337,7 +340,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2668501"></a><h2>GENERATED KEYS</h2>
+<a name="id2666314"></a><h2>GENERATED KEYS</h2>
<p>
When <span><strong class="command">dnssec-keygen</strong></span> completes
successfully,
@@ -383,7 +386,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2668609"></a><h2>EXAMPLE</h2>
+<a name="id2666422"></a><h2>EXAMPLE</h2>
<p>
To generate a 768-bit DSA key for the domain
<strong class="userinput"><code>example.com</code></strong>, the following command would be
@@ -404,7 +407,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2668665"></a><h2>SEE ALSO</h2>
+<a name="id2666478"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
<em class="citetitle">RFC 2539</em>,
@@ -413,7 +416,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2668696"></a><h2>AUTHOR</h2>
+<a name="id2666509"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/doc/arm/man.dnssec-revoke.html b/contrib/bind9/doc/arm/man.dnssec-revoke.html
index f78532f..e1ff637 100644
--- a/contrib/bind9/doc/arm/man.dnssec-revoke.html
+++ b/contrib/bind9/doc/arm/man.dnssec-revoke.html
@@ -50,7 +50,7 @@
<div class="cmdsynopsis"><p><code class="command">dnssec-revoke</code> [<code class="option">-hr</code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-E <em class="replaceable"><code>engine</code></em></code>] [<code class="option">-f</code>] [<code class="option">-R</code>] {keyfile}</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2615650"></a><h2>DESCRIPTION</h2>
+<a name="id2614416"></a><h2>DESCRIPTION</h2>
<p><span><strong class="command">dnssec-revoke</strong></span>
reads a DNSSEC key file, sets the REVOKED bit on the key as defined
in RFC 5011, and creates a new pair of key files containing the
@@ -58,7 +58,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2615664"></a><h2>OPTIONS</h2>
+<a name="id2614429"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-h</span></dt>
<dd><p>
@@ -96,14 +96,14 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2615784"></a><h2>SEE ALSO</h2>
+<a name="id2614550"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
<em class="citetitle">RFC 5011</em>.
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2615809"></a><h2>AUTHOR</h2>
+<a name="id2614574"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/doc/arm/man.dnssec-settime.html b/contrib/bind9/doc/arm/man.dnssec-settime.html
index 8d4b150..cd14fe2 100644
--- a/contrib/bind9/doc/arm/man.dnssec-settime.html
+++ b/contrib/bind9/doc/arm/man.dnssec-settime.html
@@ -50,7 +50,7 @@
<div class="cmdsynopsis"><p><code class="command">dnssec-settime</code> [<code class="option">-f</code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-A <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-R <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-I <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-D <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-h</code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-E <em class="replaceable"><code>engine</code></em></code>] {keyfile}</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2615924"></a><h2>DESCRIPTION</h2>
+<a name="id2614758"></a><h2>DESCRIPTION</h2>
<p><span><strong class="command">dnssec-settime</strong></span>
reads a DNSSEC private key file and sets the key timing metadata
as specified by the <code class="option">-P</code>, <code class="option">-A</code>,
@@ -76,7 +76,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2616051"></a><h2>OPTIONS</h2>
+<a name="id2614817"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-f</span></dt>
<dd><p>
@@ -109,7 +109,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2616145"></a><h2>TIMING OPTIONS</h2>
+<a name="id2615184"></a><h2>TIMING OPTIONS</h2>
<p>
Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS.
If the argument begins with a '+' or '-', it is interpreted as
@@ -188,7 +188,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2616488"></a><h2>PRINTING OPTIONS</h2>
+<a name="id2615322"></a><h2>PRINTING OPTIONS</h2>
<p>
<span><strong class="command">dnssec-settime</strong></span> can also be used to print the
timing metadata associated with a key.
@@ -214,7 +214,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2616636"></a><h2>SEE ALSO</h2>
+<a name="id2615607"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
@@ -222,7 +222,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2617693"></a><h2>AUTHOR</h2>
+<a name="id2615640"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/doc/arm/man.dnssec-signzone.html b/contrib/bind9/doc/arm/man.dnssec-signzone.html
index cd7a80b..3132c54 100644
--- a/contrib/bind9/doc/arm/man.dnssec-signzone.html
+++ b/contrib/bind9/doc/arm/man.dnssec-signzone.html
@@ -50,7 +50,7 @@
<div class="cmdsynopsis"><p><code class="command">dnssec-signzone</code> [<code class="option">-a</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-d <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-E <em class="replaceable"><code>engine</code></em></code>] [<code class="option">-e <em class="replaceable"><code>end-time</code></em></code>] [<code class="option">-f <em class="replaceable"><code>output-file</code></em></code>] [<code class="option">-g</code>] [<code class="option">-h</code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-k <em class="replaceable"><code>key</code></em></code>] [<code class="option">-l <em class="replaceable"><code>domain</code></em></code>] [<code class="option">-i <em class="replaceable"><code>interval</code></em></code>] [<code class="option">-I <em class="replaceable"><code>input-format</code></em></code>] [<code class="option">-j <em class="replaceable"><code>jitter</code></em></code>] [<code class="option">-N <em class="replaceable"><code>soa-serial-format</code></em></code>] [<code class="option">-o <em class="replaceable"><code>origin</code></em></code>] [<code class="option">-O <em class="replaceable"><code>output-format</code></em></code>] [<code class="option">-p</code>] [<code class="option">-P</code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-S</code>] [<code class="option">-s <em class="replaceable"><code>start-time</code></em></code>] [<code class="option">-T <em class="replaceable"><code>ttl</code></em></code>] [<code class="option">-t</code>] [<code class="option">-u</code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-x</code>] [<code class="option">-z</code>] [<code class="option">-3 <em class="replaceable"><code>salt</code></em></code>] [<code class="option">-H <em class="replaceable"><code>iterations</code></em></code>] [<code class="option">-A</code>] {zonefile} [key...]</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2617803"></a><h2>DESCRIPTION</h2>
+<a name="id2616228"></a><h2>DESCRIPTION</h2>
<p><span><strong class="command">dnssec-signzone</strong></span>
signs a zone. It generates
NSEC and RRSIG records and produces a signed version of the
@@ -61,7 +61,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2617822"></a><h2>OPTIONS</h2>
+<a name="id2616247"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-a</span></dt>
<dd><p>
@@ -397,7 +397,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2672553"></a><h2>EXAMPLE</h2>
+<a name="id2667564"></a><h2>EXAMPLE</h2>
<p>
The following command signs the <strong class="userinput"><code>example.com</code></strong>
zone with the DSA key generated by <span><strong class="command">dnssec-keygen</strong></span>
@@ -427,14 +427,14 @@ db.example.com.signed
%</pre>
</div>
<div class="refsect1" lang="en">
-<a name="id2672632"></a><h2>SEE ALSO</h2>
+<a name="id2667643"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
<em class="citetitle">RFC 4033</em>.
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2672657"></a><h2>AUTHOR</h2>
+<a name="id2667668"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/doc/arm/man.genrandom.html b/contrib/bind9/doc/arm/man.genrandom.html
index d046423..0b72a6e 100644
--- a/contrib/bind9/doc/arm/man.genrandom.html
+++ b/contrib/bind9/doc/arm/man.genrandom.html
@@ -50,7 +50,7 @@
<div class="cmdsynopsis"><p><code class="command">genrandom</code> [<code class="option">-n <em class="replaceable"><code>number</code></em></code>] {<em class="replaceable"><code>size</code></em>} {<em class="replaceable"><code>filename</code></em>}</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2652195"></a><h2>DESCRIPTION</h2>
+<a name="id2642837"></a><h2>DESCRIPTION</h2>
<p>
<span><strong class="command">genrandom</strong></span>
generates a file or a set of files containing a specified quantity
@@ -59,7 +59,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2652210"></a><h2>ARGUMENTS</h2>
+<a name="id2642852"></a><h2>ARGUMENTS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-n <em class="replaceable"><code>number</code></em></span></dt>
<dd><p>
@@ -77,14 +77,14 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2652270"></a><h2>SEE ALSO</h2>
+<a name="id2642913"></a><h2>SEE ALSO</h2>
<p>
<span class="citerefentry"><span class="refentrytitle">rand</span>(3)</span>,
<span class="citerefentry"><span class="refentrytitle">arc4random</span>(3)</span>
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2652980"></a><h2>AUTHOR</h2>
+<a name="id2642939"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/doc/arm/man.host.html b/contrib/bind9/doc/arm/man.host.html
index 90a7c9f..dd70d66 100644
--- a/contrib/bind9/doc/arm/man.host.html
+++ b/contrib/bind9/doc/arm/man.host.html
@@ -50,7 +50,7 @@
<div class="cmdsynopsis"><p><code class="command">host</code> [<code class="option">-aCdlnrsTwv</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-N <em class="replaceable"><code>ndots</code></em></code>] [<code class="option">-R <em class="replaceable"><code>number</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-W <em class="replaceable"><code>wait</code></em></code>] [<code class="option">-m <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-4</code>] [<code class="option">-6</code>] {name} [server]</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2611091"></a><h2>DESCRIPTION</h2>
+<a name="id2610871"></a><h2>DESCRIPTION</h2>
<p><span><strong class="command">host</strong></span>
is a simple utility for performing DNS lookups.
It is normally used to convert names to IP addresses and vice versa.
@@ -202,7 +202,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2611537"></a><h2>IDN SUPPORT</h2>
+<a name="id2611317"></a><h2>IDN SUPPORT</h2>
<p>
If <span><strong class="command">host</strong></span> has been built with IDN (internationalized
domain name) support, it can accept and display non-ASCII domain names.
@@ -216,12 +216,12 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2611565"></a><h2>FILES</h2>
+<a name="id2611346"></a><h2>FILES</h2>
<p><code class="filename">/etc/resolv.conf</code>
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2611579"></a><h2>SEE ALSO</h2>
+<a name="id2611360"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">dig</span>(1)</span>,
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>.
</p>
diff --git a/contrib/bind9/doc/arm/man.isc-hmac-fixup.html b/contrib/bind9/doc/arm/man.isc-hmac-fixup.html
index 6bed852..d089af0 100644
--- a/contrib/bind9/doc/arm/man.isc-hmac-fixup.html
+++ b/contrib/bind9/doc/arm/man.isc-hmac-fixup.html
@@ -50,7 +50,7 @@
<div class="cmdsynopsis"><p><code class="command">isc-hmac-fixup</code> {<em class="replaceable"><code>algorithm</code></em>} {<em class="replaceable"><code>secret</code></em>}</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2615000"></a><h2>DESCRIPTION</h2>
+<a name="id2619705"></a><h2>DESCRIPTION</h2>
<p>
Versions of BIND 9 up to and including BIND 9.6 had a bug causing
HMAC-SHA* TSIG keys which were longer than the digest length of the
@@ -76,7 +76,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2653052"></a><h2>SECURITY CONSIDERATIONS</h2>
+<a name="id2643899"></a><h2>SECURITY CONSIDERATIONS</h2>
<p>
Secrets that have been converted by <span><strong class="command">isc-hmac-fixup</strong></span>
are shortened, but as this is how the HMAC protocol works in
@@ -87,14 +87,14 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2653068"></a><h2>SEE ALSO</h2>
+<a name="id2643915"></a><h2>SEE ALSO</h2>
<p>
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
<em class="citetitle">RFC 2104</em>.
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2653085"></a><h2>AUTHOR</h2>
+<a name="id2643932"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/doc/arm/man.named-checkconf.html b/contrib/bind9/doc/arm/man.named-checkconf.html
index 6397402..d3dc621 100644
--- a/contrib/bind9/doc/arm/man.named-checkconf.html
+++ b/contrib/bind9/doc/arm/man.named-checkconf.html
@@ -50,7 +50,7 @@
<div class="cmdsynopsis"><p><code class="command">named-checkconf</code> [<code class="option">-h</code>] [<code class="option">-v</code>] [<code class="option">-j</code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] {filename} [<code class="option">-p</code>] [<code class="option">-z</code>]</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2617986"></a><h2>DESCRIPTION</h2>
+<a name="id2617093"></a><h2>DESCRIPTION</h2>
<p><span><strong class="command">named-checkconf</strong></span>
checks the syntax, but not the semantics, of a
<span><strong class="command">named</strong></span> configuration file. The file is parsed
@@ -70,7 +70,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2618056"></a><h2>OPTIONS</h2>
+<a name="id2617163"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-h</span></dt>
<dd><p>
@@ -109,21 +109,21 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2618190"></a><h2>RETURN VALUES</h2>
+<a name="id2617298"></a><h2>RETURN VALUES</h2>
<p><span><strong class="command">named-checkconf</strong></span>
returns an exit status of 1 if
errors were detected and 0 otherwise.
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2618204"></a><h2>SEE ALSO</h2>
+<a name="id2617312"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">named-checkzone</span>(8)</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>.
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2618234"></a><h2>AUTHOR</h2>
+<a name="id2617341"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/doc/arm/man.named-checkzone.html b/contrib/bind9/doc/arm/man.named-checkzone.html
index dcaa061..12b7897 100644
--- a/contrib/bind9/doc/arm/man.named-checkzone.html
+++ b/contrib/bind9/doc/arm/man.named-checkzone.html
@@ -51,7 +51,7 @@
<div class="cmdsynopsis"><p><code class="command">named-compilezone</code> [<code class="option">-d</code>] [<code class="option">-j</code>] [<code class="option">-q</code>] [<code class="option">-v</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-C <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-f <em class="replaceable"><code>format</code></em></code>] [<code class="option">-F <em class="replaceable"><code>format</code></em></code>] [<code class="option">-i <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-k <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-m <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-n <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-r <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-s <em class="replaceable"><code>style</code></em></code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-w <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-D</code>] [<code class="option">-W <em class="replaceable"><code>mode</code></em></code>] {<code class="option">-o <em class="replaceable"><code>filename</code></em></code>} {zonename} {filename}</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2633185"></a><h2>DESCRIPTION</h2>
+<a name="id2618775"></a><h2>DESCRIPTION</h2>
<p><span><strong class="command">named-checkzone</strong></span>
checks the syntax and integrity of a zone file. It performs the
same checks as <span><strong class="command">named</strong></span> does when loading a
@@ -71,7 +71,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2633235"></a><h2>OPTIONS</h2>
+<a name="id2618825"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-d</span></dt>
<dd><p>
@@ -265,14 +265,14 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2673464"></a><h2>RETURN VALUES</h2>
+<a name="id2671342"></a><h2>RETURN VALUES</h2>
<p><span><strong class="command">named-checkzone</strong></span>
returns an exit status of 1 if
errors were detected and 0 otherwise.
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2673478"></a><h2>SEE ALSO</h2>
+<a name="id2671356"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">named-checkconf</span>(8)</span>,
<em class="citetitle">RFC 1035</em>,
@@ -280,7 +280,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2673511"></a><h2>AUTHOR</h2>
+<a name="id2671389"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/doc/arm/man.named-journalprint.html b/contrib/bind9/doc/arm/man.named-journalprint.html
index 3eed5e8..c6d1b11 100644
--- a/contrib/bind9/doc/arm/man.named-journalprint.html
+++ b/contrib/bind9/doc/arm/man.named-journalprint.html
@@ -50,7 +50,7 @@
<div class="cmdsynopsis"><p><code class="command">named-journalprint</code> {<em class="replaceable"><code>journal</code></em>}</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2612358"></a><h2>DESCRIPTION</h2>
+<a name="id2616312"></a><h2>DESCRIPTION</h2>
<p>
<span><strong class="command">named-journalprint</strong></span>
prints the contents of a zone journal file in a human-readable
@@ -76,7 +76,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2638618"></a><h2>SEE ALSO</h2>
+<a name="id2621956"></a><h2>SEE ALSO</h2>
<p>
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">nsupdate</span>(8)</span>,
@@ -84,7 +84,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2638649"></a><h2>AUTHOR</h2>
+<a name="id2621987"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/doc/arm/man.named.html b/contrib/bind9/doc/arm/man.named.html
index aa1f2670..729a9af 100644
--- a/contrib/bind9/doc/arm/man.named.html
+++ b/contrib/bind9/doc/arm/man.named.html
@@ -50,7 +50,7 @@
<div class="cmdsynopsis"><p><code class="command">named</code> [<code class="option">-4</code>] [<code class="option">-6</code>] [<code class="option">-c <em class="replaceable"><code>config-file</code></em></code>] [<code class="option">-d <em class="replaceable"><code>debug-level</code></em></code>] [<code class="option">-E <em class="replaceable"><code>engine-name</code></em></code>] [<code class="option">-f</code>] [<code class="option">-g</code>] [<code class="option">-m <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-n <em class="replaceable"><code>#cpus</code></em></code>] [<code class="option">-p <em class="replaceable"><code>port</code></em></code>] [<code class="option">-s</code>] [<code class="option">-S <em class="replaceable"><code>#max-socks</code></em></code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-u <em class="replaceable"><code>user</code></em></code>] [<code class="option">-v</code>] [<code class="option">-V</code>] [<code class="option">-x <em class="replaceable"><code>cache-file</code></em></code>]</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2635533"></a><h2>DESCRIPTION</h2>
+<a name="id2619008"></a><h2>DESCRIPTION</h2>
<p><span><strong class="command">named</strong></span>
is a Domain Name System (DNS) server,
part of the BIND 9 distribution from ISC. For more
@@ -65,7 +65,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2635564"></a><h2>OPTIONS</h2>
+<a name="id2619038"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-4</span></dt>
<dd><p>
@@ -246,7 +246,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2660284"></a><h2>SIGNALS</h2>
+<a name="id2638843"></a><h2>SIGNALS</h2>
<p>
In routine operation, signals should not be used to control
the nameserver; <span><strong class="command">rndc</strong></span> should be used
@@ -267,7 +267,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2660334"></a><h2>CONFIGURATION</h2>
+<a name="id2660602"></a><h2>CONFIGURATION</h2>
<p>
The <span><strong class="command">named</strong></span> configuration file is too complex
to describe in detail here. A complete description is provided
@@ -284,7 +284,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2660384"></a><h2>FILES</h2>
+<a name="id2660651"></a><h2>FILES</h2>
<div class="variablelist"><dl>
<dt><span class="term"><code class="filename">/etc/named.conf</code></span></dt>
<dd><p>
@@ -297,7 +297,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2660427"></a><h2>SEE ALSO</h2>
+<a name="id2660695"></a><h2>SEE ALSO</h2>
<p><em class="citetitle">RFC 1033</em>,
<em class="citetitle">RFC 1034</em>,
<em class="citetitle">RFC 1035</em>,
@@ -310,7 +310,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2675585"></a><h2>AUTHOR</h2>
+<a name="id2675716"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/doc/arm/man.nsec3hash.html b/contrib/bind9/doc/arm/man.nsec3hash.html
index 53063a9..d266a22 100644
--- a/contrib/bind9/doc/arm/man.nsec3hash.html
+++ b/contrib/bind9/doc/arm/man.nsec3hash.html
@@ -48,7 +48,7 @@
<div class="cmdsynopsis"><p><code class="command">nsec3hash</code> {<em class="replaceable"><code>salt</code></em>} {<em class="replaceable"><code>algorithm</code></em>} {<em class="replaceable"><code>iterations</code></em>} {<em class="replaceable"><code>domain</code></em>}</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2653133"></a><h2>DESCRIPTION</h2>
+<a name="id2643980"></a><h2>DESCRIPTION</h2>
<p>
<span><strong class="command">nsec3hash</strong></span> generates an NSEC3 hash based on
a set of NSEC3 parameters. This can be used to check the validity
@@ -56,7 +56,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2653148"></a><h2>ARGUMENTS</h2>
+<a name="id2643995"></a><h2>ARGUMENTS</h2>
<div class="variablelist"><dl>
<dt><span class="term">salt</span></dt>
<dd><p>
@@ -80,14 +80,14 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2653210"></a><h2>SEE ALSO</h2>
+<a name="id2644125"></a><h2>SEE ALSO</h2>
<p>
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
<em class="citetitle">RFC 5155</em>.
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2653227"></a><h2>AUTHOR</h2>
+<a name="id2644142"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/doc/arm/man.nsupdate.html b/contrib/bind9/doc/arm/man.nsupdate.html
index fde52b2..1542215 100644
--- a/contrib/bind9/doc/arm/man.nsupdate.html
+++ b/contrib/bind9/doc/arm/man.nsupdate.html
@@ -50,7 +50,7 @@
<div class="cmdsynopsis"><p><code class="command">nsupdate</code> [<code class="option">-d</code>] [<code class="option">-D</code>] [[<code class="option">-g</code>] | [<code class="option">-o</code>] | [<code class="option">-l</code>] | [<code class="option">-y <em class="replaceable"><code>[<span class="optional">hmac:</span>]keyname:secret</code></em></code>] | [<code class="option">-k <em class="replaceable"><code>keyfile</code></em></code>]] [<code class="option">-t <em class="replaceable"><code>timeout</code></em></code>] [<code class="option">-u <em class="replaceable"><code>udptimeout</code></em></code>] [<code class="option">-r <em class="replaceable"><code>udpretries</code></em></code>] [<code class="option">-R <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-v</code>] [filename]</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2639154"></a><h2>DESCRIPTION</h2>
+<a name="id2626656"></a><h2>DESCRIPTION</h2>
<p><span><strong class="command">nsupdate</strong></span>
is used to submit Dynamic DNS Update requests as defined in RFC 2136
to a name server.
@@ -210,7 +210,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2639897"></a><h2>INPUT FORMAT</h2>
+<a name="id2633475"></a><h2>INPUT FORMAT</h2>
<p><span><strong class="command">nsupdate</strong></span>
reads input from
<em class="parameter"><code>filename</code></em>
@@ -498,7 +498,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2678629"></a><h2>EXAMPLES</h2>
+<a name="id2678828"></a><h2>EXAMPLES</h2>
<p>
The examples below show how
<span><strong class="command">nsupdate</strong></span>
@@ -552,7 +552,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2678679"></a><h2>FILES</h2>
+<a name="id2678878"></a><h2>FILES</h2>
<div class="variablelist"><dl>
<dt><span class="term"><code class="constant">/etc/resolv.conf</code></span></dt>
<dd><p>
@@ -575,7 +575,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2678762"></a><h2>SEE ALSO</h2>
+<a name="id2678962"></a><h2>SEE ALSO</h2>
<p>
<em class="citetitle">RFC 2136</em>,
<em class="citetitle">RFC 3007</em>,
@@ -590,7 +590,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2678820"></a><h2>BUGS</h2>
+<a name="id2679019"></a><h2>BUGS</h2>
<p>
The TSIG key is redundantly stored in two separate files.
This is a consequence of nsupdate using the DST library
diff --git a/contrib/bind9/doc/arm/man.rndc-confgen.html b/contrib/bind9/doc/arm/man.rndc-confgen.html
index 9fbc795..b245907 100644
--- a/contrib/bind9/doc/arm/man.rndc-confgen.html
+++ b/contrib/bind9/doc/arm/man.rndc-confgen.html
@@ -50,7 +50,7 @@
<div class="cmdsynopsis"><p><code class="command">rndc-confgen</code> [<code class="option">-a</code>] [<code class="option">-b <em class="replaceable"><code>keysize</code></em></code>] [<code class="option">-c <em class="replaceable"><code>keyfile</code></em></code>] [<code class="option">-h</code>] [<code class="option">-k <em class="replaceable"><code>keyname</code></em></code>] [<code class="option">-p <em class="replaceable"><code>port</code></em></code>] [<code class="option">-r <em class="replaceable"><code>randomfile</code></em></code>] [<code class="option">-s <em class="replaceable"><code>address</code></em></code>] [<code class="option">-t <em class="replaceable"><code>chrootdir</code></em></code>] [<code class="option">-u <em class="replaceable"><code>user</code></em></code>]</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2642617"></a><h2>DESCRIPTION</h2>
+<a name="id2641110"></a><h2>DESCRIPTION</h2>
<p><span><strong class="command">rndc-confgen</strong></span>
generates configuration files
for <span><strong class="command">rndc</strong></span>. It can be used as a
@@ -66,7 +66,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2642683"></a><h2>OPTIONS</h2>
+<a name="id2641176"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-a</span></dt>
<dd>
@@ -173,7 +173,7 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2650101"></a><h2>EXAMPLES</h2>
+<a name="id2641835"></a><h2>EXAMPLES</h2>
<p>
To allow <span><strong class="command">rndc</strong></span> to be used with
no manual configuration, run
@@ -190,7 +190,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2652410"></a><h2>SEE ALSO</h2>
+<a name="id2643189"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">rndc</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">rndc.conf</span>(5)</span>,
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
@@ -198,7 +198,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2652449"></a><h2>AUTHOR</h2>
+<a name="id2643842"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/doc/arm/man.rndc.conf.html b/contrib/bind9/doc/arm/man.rndc.conf.html
index ad84d76..8a3d4e2 100644
--- a/contrib/bind9/doc/arm/man.rndc.conf.html
+++ b/contrib/bind9/doc/arm/man.rndc.conf.html
@@ -50,7 +50,7 @@
<div class="cmdsynopsis"><p><code class="command">rndc.conf</code> </p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2641106"></a><h2>DESCRIPTION</h2>
+<a name="id2639872"></a><h2>DESCRIPTION</h2>
<p><code class="filename">rndc.conf</code> is the configuration file
for <span><strong class="command">rndc</strong></span>, the BIND 9 name server control
utility. This file has a similar structure and syntax to
@@ -135,7 +135,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2641346"></a><h2>EXAMPLE</h2>
+<a name="id2640180"></a><h2>EXAMPLE</h2>
<pre class="programlisting">
options {
default-server localhost;
@@ -209,7 +209,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2641672"></a><h2>NAME SERVER CONFIGURATION</h2>
+<a name="id2640301"></a><h2>NAME SERVER CONFIGURATION</h2>
<p>
The name server must be configured to accept rndc connections and
to recognize the key specified in the <code class="filename">rndc.conf</code>
@@ -219,7 +219,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2641698"></a><h2>SEE ALSO</h2>
+<a name="id2640327"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">rndc</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">rndc-confgen</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">mmencode</span>(1)</span>,
@@ -227,7 +227,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2642419"></a><h2>AUTHOR</h2>
+<a name="id2640365"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/doc/arm/man.rndc.html b/contrib/bind9/doc/arm/man.rndc.html
index 41f4617..0583287 100644
--- a/contrib/bind9/doc/arm/man.rndc.html
+++ b/contrib/bind9/doc/arm/man.rndc.html
@@ -50,7 +50,7 @@
<div class="cmdsynopsis"><p><code class="command">rndc</code> [<code class="option">-b <em class="replaceable"><code>source-address</code></em></code>] [<code class="option">-c <em class="replaceable"><code>config-file</code></em></code>] [<code class="option">-k <em class="replaceable"><code>key-file</code></em></code>] [<code class="option">-s <em class="replaceable"><code>server</code></em></code>] [<code class="option">-p <em class="replaceable"><code>port</code></em></code>] [<code class="option">-V</code>] [<code class="option">-y <em class="replaceable"><code>key_id</code></em></code>] {command}</p></div>
</div>
<div class="refsect1" lang="en">
-<a name="id2640665"></a><h2>DESCRIPTION</h2>
+<a name="id2638953"></a><h2>DESCRIPTION</h2>
<p><span><strong class="command">rndc</strong></span>
controls the operation of a name
server. It supersedes the <span><strong class="command">ndc</strong></span> utility
@@ -79,7 +79,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2640715"></a><h2>OPTIONS</h2>
+<a name="id2639003"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-b <em class="replaceable"><code>source-address</code></em></span></dt>
<dd><p>
@@ -151,7 +151,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2640940"></a><h2>LIMITATIONS</h2>
+<a name="id2639228"></a><h2>LIMITATIONS</h2>
<p><span><strong class="command">rndc</strong></span>
does not yet support all the commands of
the BIND 8 <span><strong class="command">ndc</strong></span> utility.
@@ -165,7 +165,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2640971"></a><h2>SEE ALSO</h2>
+<a name="id2639259"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">rndc.conf</span>(5)</span>,
<span class="citerefentry"><span class="refentrytitle">rndc-confgen</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
@@ -175,7 +175,7 @@
</p>
</div>
<div class="refsect1" lang="en">
-<a name="id2641027"></a><h2>AUTHOR</h2>
+<a name="id2639315"></a><h2>AUTHOR</h2>
<p><span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
diff --git a/contrib/bind9/doc/misc/Makefile.in b/contrib/bind9/doc/misc/Makefile.in
index ebd16aa..0ddd14d 100644
--- a/contrib/bind9/doc/misc/Makefile.in
+++ b/contrib/bind9/doc/misc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/doc/misc/format-options.pl b/contrib/bind9/doc/misc/format-options.pl
index b0b8d52..c405ee2 100644
--- a/contrib/bind9/doc/misc/format-options.pl
+++ b/contrib/bind9/doc/misc/format-options.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/doc/misc/options b/contrib/bind9/doc/misc/options
index 3fd74e9..51d2506 100644
--- a/contrib/bind9/doc/misc/options
+++ b/contrib/bind9/doc/misc/options
@@ -196,10 +196,11 @@ options {
request-nsid <boolean>;
reserved-sockets <integer>;
resolver-query-timeout <integer>;
- response-policy {
- zone <string> [ policy ( given | disabled | passthru |
- no-op | nxdomain | nodata | cname <domain> ) ];
- };
+ response-policy { zone <quoted_string> [ policy ( given | disabled
+ | passthru | no-op | nxdomain | nodata | cname <quoted_string>
+ ) ] [ recursive-only <boolean> ] [ max-policy-ttl <integer> ];
+ ... } [ recursive-only <boolean> ] [ break-dnssec <boolean> ] [
+ max-policy-ttl <integer> ];
rfc2308-type1 <boolean>; // not yet implemented
root-delegation-only [ exclude { <quoted_string>; ... } ];
rrset-order { [ class <string> ] [ type <string> ] [ name
@@ -400,10 +401,11 @@ view <string> <optional_class> {
request-ixfr <boolean>;
request-nsid <boolean>;
resolver-query-timeout <integer>;
- response-policy {
- zone <string> [ policy ( given | disabled | passthru |
- no-op | nxdomain | nodata | cname <domain> ) ];
- };
+ response-policy { zone <quoted_string> [ policy ( given | disabled
+ | passthru | no-op | nxdomain | nodata | cname <quoted_string>
+ ) ] [ recursive-only <boolean> ] [ max-policy-ttl <integer> ];
+ ... } [ recursive-only <boolean> ] [ break-dnssec <boolean> ] [
+ max-policy-ttl <integer> ];
rfc2308-type1 <boolean>; // not yet implemented
root-delegation-only [ exclude { <quoted_string>; ... } ];
rrset-order { [ class <string> ] [ type <string> ] [ name
diff --git a/contrib/bind9/doc/misc/sort-options.pl b/contrib/bind9/doc/misc/sort-options.pl
index 4251521..0030525 100755
--- a/contrib/bind9/doc/misc/sort-options.pl
+++ b/contrib/bind9/doc/misc/sort-options.pl
@@ -1,6 +1,6 @@
#!/bin/perl
#
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/isc-config.sh.in b/contrib/bind9/isc-config.sh.in
index 0eafca7..26b7d64 100644
--- a/contrib/bind9/isc-config.sh.in
+++ b/contrib/bind9/isc-config.sh.in
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/Makefile.in b/contrib/bind9/lib/Makefile.in
index e46aef2..e3f0bdb 100644
--- a/contrib/bind9/lib/Makefile.in
+++ b/contrib/bind9/lib/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2001, 2003 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/bind9/Makefile.in b/contrib/bind9/lib/bind9/Makefile.in
index 35c4022..73285e1 100644
--- a/contrib/bind9/lib/bind9/Makefile.in
+++ b/contrib/bind9/lib/bind9/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/bind9/api b/contrib/bind9/lib/bind9/api
index 089e782..7e9b115 100644
--- a/contrib/bind9/lib/bind9/api
+++ b/contrib/bind9/lib/bind9/api
@@ -4,5 +4,5 @@
# 9.8: 80-89
# 9.9: 90-109
LIBINTERFACE = 80
-LIBREVISION = 5
+LIBREVISION = 7
LIBAGE = 0
diff --git a/contrib/bind9/lib/bind9/check.c b/contrib/bind9/lib/bind9/check.c
index 26eaa1a..f765604 100644
--- a/contrib/bind9/lib/bind9/check.c
+++ b/contrib/bind9/lib/bind9/check.c
@@ -287,10 +287,6 @@ disabled_algorithms(const cfg_obj_t *disabled, isc_log_t *logctx) {
tresult = dns_secalg_fromtext(&alg, &r);
if (tresult != ISC_R_SUCCESS) {
- isc_uint8_t ui;
- result = isc_parse_uint8(&ui, r.base, 10);
- }
- if (tresult != ISC_R_SUCCESS) {
cfg_obj_log(cfg_listelt_value(element), logctx,
ISC_LOG_ERROR, "invalid algorithm '%s'",
r.base);
@@ -1259,6 +1255,29 @@ typedef struct {
} optionstable;
static isc_result_t
+check_nonzero(const cfg_obj_t *options, isc_log_t *logctx) {
+ isc_result_t result = ISC_R_SUCCESS;
+ const cfg_obj_t *obj = NULL;
+ unsigned int i;
+
+ static const char *nonzero[] = { "max-retry-time", "min-retry-time",
+ "max-refresh-time", "min-refresh-time" };
+ /*
+ * Check if value is zero.
+ */
+ for (i = 0; i < sizeof(nonzero) / sizeof(nonzero[0]); i++) {
+ obj = NULL;
+ if (cfg_map_get(options, nonzero[i], &obj) == ISC_R_SUCCESS &&
+ cfg_obj_asuint32(obj) == 0) {
+ cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+ "'%s' must not be zero", nonzero[i]);
+ result = ISC_R_FAILURE;
+ }
+ }
+ return (result);
+}
+
+static isc_result_t
check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
const cfg_obj_t *config, isc_symtab_t *symtab,
dns_rdataclass_t defclass, cfg_aclconfctx_t *actx,
@@ -1267,7 +1286,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
const char *znamestr;
const char *typestr;
unsigned int ztype;
- const cfg_obj_t *zoptions;
+ const cfg_obj_t *zoptions, *goptions = NULL;
const cfg_obj_t *obj = NULL;
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
@@ -1288,8 +1307,10 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
{ "also-notify", MASTERZONE | SLAVEZONE },
{ "dialup", MASTERZONE | SLAVEZONE | STUBZONE },
{ "delegation-only", HINTZONE | STUBZONE | DELEGATIONZONE },
- { "forward", MASTERZONE | SLAVEZONE | STUBZONE | FORWARDZONE },
- { "forwarders", MASTERZONE | SLAVEZONE | STUBZONE | FORWARDZONE },
+ { "forward", MASTERZONE | SLAVEZONE | STUBZONE |
+ STATICSTUBZONE | FORWARDZONE },
+ { "forwarders", MASTERZONE | SLAVEZONE | STUBZONE |
+ STATICSTUBZONE | FORWARDZONE },
{ "maintain-ixfr-base", MASTERZONE | SLAVEZONE },
{ "max-ixfr-log-size", MASTERZONE | SLAVEZONE },
{ "notify-source", MASTERZONE | SLAVEZONE },
@@ -1345,10 +1366,14 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
{ "passive", SLAVEZONE | STUBZONE },
};
+
znamestr = cfg_obj_asstring(cfg_tuple_get(zconfig, "name"));
zoptions = cfg_tuple_get(zconfig, "options");
+ if (config != NULL)
+ cfg_map_get(config, "options", &goptions);
+
obj = NULL;
(void)cfg_map_get(zoptions, "type", &obj);
if (obj == NULL) {
@@ -1430,6 +1455,12 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
}
/*
+ * Check if value is zero.
+ */
+ if (check_nonzero(zoptions, logctx) != ISC_R_SUCCESS)
+ result = ISC_R_FAILURE;
+
+ /*
* Look for inappropriate options for the given zone type.
* Check that ACLs expand correctly.
*/
@@ -2170,6 +2201,14 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
}
/*
+ * Check non-zero options at the global and view levels.
+ */
+ if (options != NULL && check_nonzero(options, logctx) != ISC_R_SUCCESS)
+ result = ISC_R_FAILURE;
+ if (voptions != NULL &&check_nonzero(voptions, logctx) != ISC_R_SUCCESS)
+ result = ISC_R_FAILURE;
+
+ /*
* Check that dual-stack-servers is reasonable.
*/
if (voptions == NULL) {
@@ -2196,15 +2235,15 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
tresult = isc_symtab_create(mctx, 1000, freekey, mctx,
ISC_FALSE, &symtab);
if (tresult != ISC_R_SUCCESS)
- return (ISC_R_NOMEMORY);
+ goto cleanup;
(void)cfg_map_get(config, "key", &keys);
tresult = check_keylist(keys, symtab, mctx, logctx);
if (tresult == ISC_R_EXISTS)
result = ISC_R_FAILURE;
else if (tresult != ISC_R_SUCCESS) {
- isc_symtab_destroy(&symtab);
- return (tresult);
+ result = tresult;
+ goto cleanup;
}
if (voptions != NULL) {
@@ -2214,8 +2253,8 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
if (tresult == ISC_R_EXISTS)
result = ISC_R_FAILURE;
else if (tresult != ISC_R_SUCCESS) {
- isc_symtab_destroy(&symtab);
- return (tresult);
+ result = tresult;
+ goto cleanup;
}
}
@@ -2336,7 +2375,11 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
if (tresult != ISC_R_SUCCESS)
result = tresult;
- cfg_aclconfctx_detach(&actx);
+ cleanup:
+ if (symtab != NULL)
+ isc_symtab_destroy(&symtab);
+ if (actx != NULL)
+ cfg_aclconfctx_detach(&actx);
return (result);
}
diff --git a/contrib/bind9/lib/bind9/include/Makefile.in b/contrib/bind9/lib/bind9/include/Makefile.in
index 65eecb0..0a7436c 100644
--- a/contrib/bind9/lib/bind9/include/Makefile.in
+++ b/contrib/bind9/lib/bind9/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/bind9/include/bind9/Makefile.in b/contrib/bind9/lib/bind9/include/bind9/Makefile.in
index 8abfaf6..11ae586 100644
--- a/contrib/bind9/lib/bind9/include/bind9/Makefile.in
+++ b/contrib/bind9/lib/bind9/include/bind9/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/dns/Makefile.in b/contrib/bind9/lib/dns/Makefile.in
index cfaf775..a01bb41 100644
--- a/contrib/bind9/lib/dns/Makefile.in
+++ b/contrib/bind9/lib/dns/Makefile.in
@@ -47,7 +47,8 @@ LIBS = @LIBS@
# Alphabetically
OPENSSLLINKOBJS = openssl_link.@O@ openssldh_link.@O@ openssldsa_link.@O@ \
- opensslgost_link.@O@ opensslrsa_link.@O@
+ opensslecdsa_link.@O@ opensslgost_link.@O@ \
+ opensslrsa_link.@O@
DSTOBJS = @DST_EXTRA_OBJS@ @OPENSSLLINKOBJS@ \
dst_api.@O@ dst_lib.@O@ dst_parse.@O@ dst_result.@O@ \
@@ -76,7 +77,7 @@ OBJS= ${DNSOBJS} ${OTHEROBJS} ${DSTOBJS}
# Alphabetically
OPENSSLLINKSRCS = openssl_link.c openssldh_link.c openssldsa_link.c \
- opensslgost_link.c opensslrsa_link.c
+ opensslecdsa_link.c opensslgost_link.c opensslrsa_link.c
DSTSRCS = @DST_EXTRA_SRCS@ @OPENSSLLINKSRCS@ \
dst_api.c dst_lib.c dst_parse.c \
diff --git a/contrib/bind9/lib/dns/adb.c b/contrib/bind9/lib/dns/adb.c
index 1dba252..531d112 100644
--- a/contrib/bind9/lib/dns/adb.c
+++ b/contrib/bind9/lib/dns/adb.c
@@ -111,6 +111,7 @@ struct dns_adb {
isc_taskmgr_t *taskmgr;
isc_task_t *task;
+ isc_task_t *excl;
isc_interval_t tick_interval;
int next_cleanbucket;
@@ -1627,10 +1628,12 @@ new_adbname(dns_adb_t *adb, dns_name_t *dnsname) {
LOCK(&adb->namescntlock);
adb->namescnt++;
- if (!adb->grownames_sent && adb->namescnt > (adb->nnames * 8)) {
+ if (!adb->grownames_sent && adb->excl != NULL &&
+ adb->namescnt > (adb->nnames * 8))
+ {
isc_event_t *event = &adb->grownames;
inc_adb_irefcnt(adb);
- isc_task_send(adb->task, &event);
+ isc_task_send(adb->excl, &event);
adb->grownames_sent = ISC_TRUE;
}
UNLOCK(&adb->namescntlock);
@@ -1751,8 +1754,9 @@ new_adbentry(dns_adb_t *adb) {
ISC_LINK_INIT(e, plink);
LOCK(&adb->entriescntlock);
adb->entriescnt++;
- if (!adb->growentries_sent &&
- adb->entriescnt > (adb->nentries * 8)) {
+ if (!adb->growentries_sent && adb->growentries_sent &&
+ adb->entriescnt > (adb->nentries * 8))
+ {
isc_event_t *event = &adb->growentries;
inc_adb_irefcnt(adb);
isc_task_send(adb->task, &event);
@@ -2327,6 +2331,7 @@ destroy(dns_adb_t *adb) {
adb->magic = 0;
isc_task_detach(&adb->task);
+ isc_task_detach(&adb->excl);
isc_mempool_destroy(&adb->nmp);
isc_mempool_destroy(&adb->nhmp);
@@ -2410,6 +2415,7 @@ dns_adb_create(isc_mem_t *mem, dns_view_t *view, isc_timermgr_t *timermgr,
adb->aimp = NULL;
adb->afmp = NULL;
adb->task = NULL;
+ adb->excl = NULL;
adb->mctx = NULL;
adb->view = view;
adb->taskmgr = taskmgr;
@@ -2445,6 +2451,16 @@ dns_adb_create(isc_mem_t *mem, dns_view_t *view, isc_timermgr_t *timermgr,
adb, NULL, NULL);
adb->grownames_sent = ISC_FALSE;
+ result = isc_taskmgr_excltask(adb->taskmgr, &adb->excl);
+ if (result != ISC_R_SUCCESS) {
+ DP(ISC_LOG_INFO, "adb: task-exclusive mode unavailable, "
+ "intializing table sizes to %u\n",
+ nbuckets[11]);
+ adb->nentries = nbuckets[11];
+ adb->nnames= nbuckets[11];
+
+ }
+
isc_mem_attach(mem, &adb->mctx);
result = isc_mutex_init(&adb->lock);
@@ -2557,6 +2573,7 @@ dns_adb_create(isc_mem_t *mem, dns_view_t *view, isc_timermgr_t *timermgr,
result = isc_task_create(adb->taskmgr, 0, &adb->task);
if (result != ISC_R_SUCCESS)
goto fail3;
+
isc_task_setname(adb->task, "ADB", adb);
/*
@@ -3904,8 +3921,10 @@ dns_adb_adjustsrtt(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
addr->entry->srtt = new_srtt;
addr->srtt = new_srtt;
- isc_stdtime_get(&now);
- addr->entry->expires = now + ADB_ENTRY_WINDOW;
+ if (addr->entry->expires == 0) {
+ isc_stdtime_get(&now);
+ addr->entry->expires = now + ADB_ENTRY_WINDOW;
+ }
UNLOCK(&adb->entrylocks[bucket]);
}
@@ -3915,6 +3934,7 @@ dns_adb_changeflags(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
unsigned int bits, unsigned int mask)
{
int bucket;
+ isc_stdtime_t now;
REQUIRE(DNS_ADB_VALID(adb));
REQUIRE(DNS_ADBADDRINFO_VALID(addr));
@@ -3923,6 +3943,11 @@ dns_adb_changeflags(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
LOCK(&adb->entrylocks[bucket]);
addr->entry->flags = (addr->entry->flags & ~mask) | (bits & mask);
+ if (addr->entry->expires == 0) {
+ isc_stdtime_get(&now);
+ addr->entry->expires = now + ADB_ENTRY_WINDOW;
+ }
+
/*
* Note that we do not update the other bits in addr->flags with
* the most recent values from addr->entry->flags.
@@ -4001,15 +4026,16 @@ dns_adb_freeaddrinfo(dns_adb_t *adb, dns_adbaddrinfo_t **addrp) {
entry = addr->entry;
REQUIRE(DNS_ADBENTRY_VALID(entry));
- isc_stdtime_get(&now);
-
*addrp = NULL;
overmem = isc_mem_isovermem(adb->mctx);
bucket = addr->entry->lock_bucket;
LOCK(&adb->entrylocks[bucket]);
- entry->expires = now + ADB_ENTRY_WINDOW;
+ if (entry->expires == 0) {
+ isc_stdtime_get(&now);
+ entry->expires = now + ADB_ENTRY_WINDOW;
+ }
want_check_exit = dec_entry_refcnt(adb, overmem, entry, ISC_FALSE);
diff --git a/contrib/bind9/lib/dns/api b/contrib/bind9/lib/dns/api
index 9e783a5..325781a 100644
--- a/contrib/bind9/lib/dns/api
+++ b/contrib/bind9/lib/dns/api
@@ -3,6 +3,6 @@
# 9.7: 60-79
# 9.8: 80-89
# 9.9: 90-109
-LIBINTERFACE = 87
+LIBINTERFACE = 89
LIBREVISION = 1
-LIBAGE = 6
+LIBAGE = 1
diff --git a/contrib/bind9/lib/dns/db.c b/contrib/bind9/lib/dns/db.c
index 1252c81..0cf2c27 100644
--- a/contrib/bind9/lib/dns/db.c
+++ b/contrib/bind9/lib/dns/db.c
@@ -952,14 +952,13 @@ dns_db_rpz_enabled(dns_db_t *db, dns_rpz_st_t *st)
(db->methods->rpz_enabled)(db, st);
}
-isc_result_t
+void
dns_db_rpz_findips(dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type,
dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version,
dns_rdataset_t *ardataset, dns_rpz_st_t *st,
dns_name_t *query_qname)
{
- if (db->methods->rpz_findips == NULL)
- return (ISC_R_NOTIMPLEMENTED);
- return ((db->methods->rpz_findips)(rpz, rpz_type, zone, db, version,
- ardataset, st, query_qname));
+ if (db->methods->rpz_findips != NULL)
+ (db->methods->rpz_findips)(rpz, rpz_type, zone, db, version,
+ ardataset, st, query_qname);
}
diff --git a/contrib/bind9/lib/dns/dnssec.c b/contrib/bind9/lib/dns/dnssec.c
index b72e82d..3569ad7 100644
--- a/contrib/bind9/lib/dns/dnssec.c
+++ b/contrib/bind9/lib/dns/dnssec.c
@@ -44,10 +44,13 @@
#include <dns/rdataset.h>
#include <dns/rdatastruct.h>
#include <dns/result.h>
+#include <dns/stats.h>
#include <dns/tsig.h> /* for DNS_TSIG_FUDGE */
#include <dst/result.h>
+LIBDNS_EXTERNAL_DATA isc_stats_t *dns_dnssec_stats;
+
#define is_response(msg) (msg->flags & DNS_MESSAGEFLAG_QR)
#define RETERR(x) do { \
@@ -77,6 +80,12 @@ digest_callback(void *arg, isc_region_t *data) {
return (dst_context_adddata(ctx, data));
}
+static inline void
+inc_stat(isc_statscounter_t counter) {
+ if (dns_dnssec_stats != NULL)
+ isc_stats_increment(dns_dnssec_stats, counter);
+}
+
/*
* Make qsort happy.
*/
@@ -153,7 +162,9 @@ dns_dnssec_keyfromrdata(dns_name_t *name, dns_rdata_t *rdata, isc_mem_t *mctx,
}
static isc_result_t
-digest_sig(dst_context_t *ctx, dns_rdata_t *sigrdata, dns_rdata_rrsig_t *sig) {
+digest_sig(dst_context_t *ctx, isc_boolean_t downcase, dns_rdata_t *sigrdata,
+ dns_rdata_rrsig_t *rrsig)
+{
isc_region_t r;
isc_result_t ret;
dns_fixedname_t fname;
@@ -165,11 +176,16 @@ digest_sig(dst_context_t *ctx, dns_rdata_t *sigrdata, dns_rdata_rrsig_t *sig) {
ret = dst_context_adddata(ctx, &r);
if (ret != ISC_R_SUCCESS)
return (ret);
- dns_fixedname_init(&fname);
- RUNTIME_CHECK(dns_name_downcase(&sig->signer,
- dns_fixedname_name(&fname), NULL)
- == ISC_R_SUCCESS);
- dns_name_toregion(dns_fixedname_name(&fname), &r);
+ if (downcase) {
+ dns_fixedname_init(&fname);
+
+ RUNTIME_CHECK(dns_name_downcase(&rrsig->signer,
+ dns_fixedname_name(&fname),
+ NULL) == ISC_R_SUCCESS);
+ dns_name_toregion(dns_fixedname_name(&fname), &r);
+ } else
+ dns_name_toregion(&rrsig->signer, &r);
+
return (dst_context_adddata(ctx, &r));
}
@@ -191,6 +207,7 @@ dns_dnssec_sign(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
isc_uint32_t flags;
unsigned int sigsize;
dns_fixedname_t fnewname;
+ dns_fixedname_t fsigner;
REQUIRE(name != NULL);
REQUIRE(dns_name_countlabels(name) <= 255);
@@ -218,8 +235,14 @@ dns_dnssec_sign(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
sig.common.rdtype = dns_rdatatype_rrsig;
ISC_LINK_INIT(&sig.common, link);
+ /*
+ * Downcase signer.
+ */
dns_name_init(&sig.signer, NULL);
- dns_name_clone(dst_key_name(key), &sig.signer);
+ dns_fixedname_init(&fsigner);
+ RUNTIME_CHECK(dns_name_downcase(dst_key_name(key),
+ dns_fixedname_name(&fsigner), NULL) == ISC_R_SUCCESS);
+ dns_name_clone(dns_fixedname_name(&fsigner), &sig.signer);
sig.covered = set->type;
sig.algorithm = dst_key_alg(key);
@@ -259,7 +282,7 @@ dns_dnssec_sign(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
/*
* Digest the SIG rdata.
*/
- ret = digest_sig(ctx, &tmpsigrdata, &sig);
+ ret = digest_sig(ctx, ISC_FALSE, &tmpsigrdata, &sig);
if (ret != ISC_R_SUCCESS)
goto cleanup_context;
@@ -332,7 +355,7 @@ dns_dnssec_sign(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
memcpy(sig.signature, r.base, sig.siglen);
ret = dns_rdata_fromstruct(sigrdata, sig.common.rdclass,
- sig.common.rdtype, &sig, buffer);
+ sig.common.rdtype, &sig, buffer);
cleanup_array:
isc_mem_put(mctx, rdatas, nrdatas * sizeof(dns_rdata_t));
@@ -363,6 +386,7 @@ dns_dnssec_verify2(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
dst_context_t *ctx = NULL;
int labels = 0;
isc_uint32_t flags;
+ isc_boolean_t downcase = ISC_FALSE;
REQUIRE(name != NULL);
REQUIRE(set != NULL);
@@ -377,8 +401,10 @@ dns_dnssec_verify2(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
if (set->type != sig.covered)
return (DNS_R_SIGINVALID);
- if (isc_serial_lt(sig.timeexpire, sig.timesigned))
+ if (isc_serial_lt(sig.timeexpire, sig.timesigned)) {
+ inc_stat(dns_dnssecstats_fail);
return (DNS_R_SIGINVALID);
+ }
if (!ignoretime) {
isc_stdtime_get(&now);
@@ -386,10 +412,13 @@ dns_dnssec_verify2(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
/*
* Is SIG temporally valid?
*/
- if (isc_serial_lt((isc_uint32_t)now, sig.timesigned))
+ if (isc_serial_lt((isc_uint32_t)now, sig.timesigned)) {
+ inc_stat(dns_dnssecstats_fail);
return (DNS_R_SIGFUTURE);
- else if (isc_serial_lt(sig.timeexpire, (isc_uint32_t)now))
+ } else if (isc_serial_lt(sig.timeexpire, (isc_uint32_t)now)) {
+ inc_stat(dns_dnssecstats_fail);
return (DNS_R_SIGEXPIRED);
+ }
}
/*
@@ -400,16 +429,22 @@ dns_dnssec_verify2(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
case dns_rdatatype_ns:
case dns_rdatatype_soa:
case dns_rdatatype_dnskey:
- if (!dns_name_equal(name, &sig.signer))
+ if (!dns_name_equal(name, &sig.signer)) {
+ inc_stat(dns_dnssecstats_fail);
return (DNS_R_SIGINVALID);
+ }
break;
case dns_rdatatype_ds:
- if (dns_name_equal(name, &sig.signer))
+ if (dns_name_equal(name, &sig.signer)) {
+ inc_stat(dns_dnssecstats_fail);
return (DNS_R_SIGINVALID);
+ }
/* FALLTHROUGH */
default:
- if (!dns_name_issubdomain(name, &sig.signer))
+ if (!dns_name_issubdomain(name, &sig.signer)) {
+ inc_stat(dns_dnssecstats_fail);
return (DNS_R_SIGINVALID);
+ }
break;
}
@@ -417,11 +452,16 @@ dns_dnssec_verify2(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
* Is the key allowed to sign data?
*/
flags = dst_key_flags(key);
- if (flags & DNS_KEYTYPE_NOAUTH)
+ if (flags & DNS_KEYTYPE_NOAUTH) {
+ inc_stat(dns_dnssecstats_fail);
return (DNS_R_KEYUNAUTHORIZED);
- if ((flags & DNS_KEYFLAG_OWNERMASK) != DNS_KEYOWNER_ZONE)
+ }
+ if ((flags & DNS_KEYFLAG_OWNERMASK) != DNS_KEYOWNER_ZONE) {
+ inc_stat(dns_dnssecstats_fail);
return (DNS_R_KEYUNAUTHORIZED);
+ }
+ again:
ret = dst_context_create(key, mctx, &ctx);
if (ret != ISC_R_SUCCESS)
goto cleanup_struct;
@@ -429,7 +469,7 @@ dns_dnssec_verify2(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
/*
* Digest the SIG rdata (not including the signature).
*/
- ret = digest_sig(ctx, sigrdata, &sig);
+ ret = digest_sig(ctx, downcase, sigrdata, &sig);
if (ret != ISC_R_SUCCESS)
goto cleanup_context;
@@ -508,21 +548,40 @@ dns_dnssec_verify2(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
r.base = sig.signature;
r.length = sig.siglen;
ret = dst_context_verify(ctx, &r);
- if (ret == DST_R_VERIFYFAILURE)
- ret = DNS_R_SIGINVALID;
+ if (ret == ISC_R_SUCCESS && downcase) {
+ char namebuf[DNS_NAME_FORMATSIZE];
+ dns_name_format(&sig.signer, namebuf, sizeof(namebuf));
+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+ DNS_LOGMODULE_DNSSEC, ISC_LOG_INFO,
+ "sucessfully validated after lower casing "
+ "signer '%s'", namebuf);
+ inc_stat(dns_dnssecstats_downcase);
+ } else if (ret == ISC_R_SUCCESS)
+ inc_stat(dns_dnssecstats_asis);
cleanup_array:
isc_mem_put(mctx, rdatas, nrdatas * sizeof(dns_rdata_t));
cleanup_context:
dst_context_destroy(&ctx);
+ if (ret == DST_R_VERIFYFAILURE && !downcase) {
+ downcase = ISC_TRUE;
+ goto again;
+ }
cleanup_struct:
dns_rdata_freestruct(&sig);
+ if (ret == DST_R_VERIFYFAILURE)
+ ret = DNS_R_SIGINVALID;
+
+ if (ret != ISC_R_SUCCESS)
+ inc_stat(dns_dnssecstats_fail);
+
if (ret == ISC_R_SUCCESS && labels - sig.labels > 0) {
if (wild != NULL)
RUNTIME_CHECK(dns_name_concatenate(dns_wildcardname,
dns_fixedname_name(&fnewname),
wild, NULL) == ISC_R_SUCCESS);
+ inc_stat(dns_dnssecstats_wildcard);
ret = DNS_R_FROMWILDCARD;
}
return (ret);
@@ -1325,11 +1384,12 @@ dns_dnssec_findmatchingkeys(dns_name_t *origin, const char *directory,
* the keys in the keyset, regardless of whether they have
* metadata indicating they should be deactivated or removed.
*/
-static void
+static isc_result_t
addkey(dns_dnsseckeylist_t *keylist, dst_key_t **newkey,
isc_boolean_t savekeys, isc_mem_t *mctx)
{
dns_dnsseckey_t *key;
+ isc_result_t result;
/* Skip duplicates */
for (key = ISC_LIST_HEAD(*keylist);
@@ -1357,10 +1417,12 @@ addkey(dns_dnsseckeylist_t *keylist, dst_key_t **newkey,
}
key->source = dns_keysource_zoneapex;
- return;
+ return (ISC_R_SUCCESS);
}
- dns_dnsseckey_create(mctx, newkey, &key);
+ result = dns_dnsseckey_create(mctx, newkey, &key);
+ if (result != ISC_R_SUCCESS)
+ return (result);
if (key->legacy || savekeys) {
key->force_publish = ISC_TRUE;
key->force_sign = dst_key_isprivate(key->key);
@@ -1368,6 +1430,7 @@ addkey(dns_dnsseckeylist_t *keylist, dst_key_t **newkey,
key->source = dns_keysource_zoneapex;
ISC_LIST_APPEND(*keylist, key, link);
*newkey = NULL;
+ return (ISC_R_SUCCESS);
}
@@ -1457,7 +1520,7 @@ dns_dnssec_keylistfromrdataset(dns_name_t *origin,
goto skip;
if (public) {
- addkey(keylist, &pubkey, savekeys, mctx);
+ RETERR(addkey(keylist, &pubkey, savekeys, mctx));
goto skip;
}
@@ -1510,7 +1573,7 @@ dns_dnssec_keylistfromrdataset(dns_name_t *origin,
}
if (result == ISC_R_FILENOTFOUND || result == ISC_R_NOPERM) {
- addkey(keylist, &pubkey, savekeys, mctx);
+ RETERR(addkey(keylist, &pubkey, savekeys, mctx));
goto skip;
}
RETERR(result);
@@ -1519,7 +1582,7 @@ dns_dnssec_keylistfromrdataset(dns_name_t *origin,
if ((dst_key_flags(privkey) & DNS_KEYTYPE_NOAUTH) != 0)
goto skip;
- addkey(keylist, &privkey, savekeys, mctx);
+ RETERR(addkey(keylist, &privkey, savekeys, mctx));
skip:
if (pubkey != NULL)
dst_key_free(&pubkey);
diff --git a/contrib/bind9/lib/dns/ds.c b/contrib/bind9/lib/dns/ds.c
index 3c74d1d..e72ecbb 100644
--- a/contrib/bind9/lib/dns/ds.c
+++ b/contrib/bind9/lib/dns/ds.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007, 2010 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2010, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -52,12 +52,13 @@ dns_ds_buildrdata(dns_name_t *owner, dns_rdata_t *key,
{
dns_fixedname_t fname;
dns_name_t *name;
- unsigned char digest[ISC_SHA256_DIGESTLENGTH];
+ unsigned char digest[ISC_SHA384_DIGESTLENGTH];
isc_region_t r;
isc_buffer_t b;
dns_rdata_ds_t ds;
isc_sha1_t sha1;
isc_sha256_t sha256;
+ isc_sha384_t sha384;
#ifdef HAVE_OPENSSL_GOST
EVP_MD_CTX ctx;
const EVP_MD *md;
@@ -86,17 +87,18 @@ dns_ds_buildrdata(dns_name_t *owner, dns_rdata_t *key,
isc_sha1_update(&sha1, r.base, r.length);
isc_sha1_final(&sha1, digest);
break;
+
#ifdef HAVE_OPENSSL_GOST
#define CHECK(x) \
if ((x) != 1) { \
EVP_MD_CTX_cleanup(&ctx); \
- return (DST_R_OPENSSLFAILURE); \
+ return (DST_R_CRYPTOFAILURE); \
}
case DNS_DSDIGEST_GOST:
md = EVP_gost();
if (md == NULL)
- return (DST_R_OPENSSLFAILURE);
+ return (DST_R_CRYPTOFAILURE);
EVP_MD_CTX_init(&ctx);
CHECK(EVP_DigestInit(&ctx, md));
dns_name_toregion(name, &r);
@@ -111,6 +113,18 @@ dns_ds_buildrdata(dns_name_t *owner, dns_rdata_t *key,
CHECK(EVP_DigestFinal(&ctx, digest, NULL));
break;
#endif
+
+ case DNS_DSDIGEST_SHA384:
+ isc_sha384_init(&sha384);
+ dns_name_toregion(name, &r);
+ isc_sha384_update(&sha384, r.base, r.length);
+ dns_rdata_toregion(key, &r);
+ INSIST(r.length >= 4);
+ isc_sha384_update(&sha384, r.base, r.length);
+ isc_sha384_final(digest, &sha384);
+ break;
+
+ case DNS_DSDIGEST_SHA256:
default:
isc_sha256_init(&sha256);
dns_name_toregion(name, &r);
@@ -132,11 +146,18 @@ dns_ds_buildrdata(dns_name_t *owner, dns_rdata_t *key,
case DNS_DSDIGEST_SHA1:
ds.length = ISC_SHA1_DIGESTLENGTH;
break;
+
#ifdef HAVE_OPENSSL_GOST
case DNS_DSDIGEST_GOST:
ds.length = ISC_GOST_DIGESTLENGTH;
break;
#endif
+
+ case DNS_DSDIGEST_SHA384:
+ ds.length = ISC_SHA384_DIGESTLENGTH;
+ break;
+
+ case DNS_DSDIGEST_SHA256:
default:
ds.length = ISC_SHA256_DIGESTLENGTH;
break;
@@ -152,9 +173,11 @@ dns_ds_digest_supported(unsigned int digest_type) {
#ifdef HAVE_OPENSSL_GOST
return (ISC_TF(digest_type == DNS_DSDIGEST_SHA1 ||
digest_type == DNS_DSDIGEST_SHA256 ||
- digest_type == DNS_DSDIGEST_GOST));
+ digest_type == DNS_DSDIGEST_GOST ||
+ digest_type == DNS_DSDIGEST_SHA384));
#else
return (ISC_TF(digest_type == DNS_DSDIGEST_SHA1 ||
- digest_type == DNS_DSDIGEST_SHA256));
+ digest_type == DNS_DSDIGEST_SHA256 ||
+ digest_type == DNS_DSDIGEST_SHA384));
#endif
}
diff --git a/contrib/bind9/lib/dns/dst_api.c b/contrib/bind9/lib/dns/dst_api.c
index a14b268..f5dd89a 100644
--- a/contrib/bind9/lib/dns/dst_api.c
+++ b/contrib/bind9/lib/dns/dst_api.c
@@ -56,6 +56,7 @@
#include <isc/string.h>
#include <isc/time.h>
#include <isc/util.h>
+#include <isc/file.h>
#include <dns/fixedname.h>
#include <dns/keyvalues.h>
@@ -226,6 +227,10 @@ dst_lib_init2(isc_mem_t *mctx, isc_entropy_t *ectx,
#ifdef HAVE_OPENSSL_GOST
RETERR(dst__opensslgost_init(&dst_t_func[DST_ALG_ECCGOST]));
#endif
+#ifdef HAVE_OPENSSL_ECDSA
+ RETERR(dst__opensslecdsa_init(&dst_t_func[DST_ALG_ECDSA256]));
+ RETERR(dst__opensslecdsa_init(&dst_t_func[DST_ALG_ECDSA384]));
+#endif
#endif /* OPENSSL */
#ifdef GSSAPI
RETERR(dst__gssapi_init(&dst_t_func[DST_ALG_GSSAPI]));
@@ -1110,6 +1115,12 @@ dst_key_sigsize(const dst_key_t *key, unsigned int *n) {
case DST_ALG_ECCGOST:
*n = DNS_SIG_GOSTSIGSIZE;
break;
+ case DST_ALG_ECDSA256:
+ *n = DNS_SIG_ECDSA256SIZE;
+ break;
+ case DST_ALG_ECDSA384:
+ *n = DNS_SIG_ECDSA384SIZE;
+ break;
case DST_ALG_HMACMD5:
*n = 16;
break;
@@ -1415,6 +1426,8 @@ issymmetric(const dst_key_t *key) {
case DST_ALG_NSEC3DSA:
case DST_ALG_DH:
case DST_ALG_ECCGOST:
+ case DST_ALG_ECDSA256:
+ case DST_ALG_ECDSA384:
return (ISC_FALSE);
case DST_ALG_HMACMD5:
case DST_ALG_GSSAPI:
@@ -1691,7 +1704,8 @@ algorithm_status(unsigned int alg) {
alg == DST_ALG_HMACMD5 || alg == DST_ALG_NSEC3DSA ||
alg == DST_ALG_NSEC3RSASHA1 ||
alg == DST_ALG_RSASHA256 || alg == DST_ALG_RSASHA512 ||
- alg == DST_ALG_ECCGOST)
+ alg == DST_ALG_ECCGOST ||
+ alg == DST_ALG_ECDSA256 || alg == DST_ALG_ECDSA384)
return (DST_R_NOCRYPTO);
#endif
return (DST_R_UNSUPPORTEDALG);
diff --git a/contrib/bind9/lib/dns/dst_internal.h b/contrib/bind9/lib/dns/dst_internal.h
index d9f6ac8..2f4f946 100644
--- a/contrib/bind9/lib/dns/dst_internal.h
+++ b/contrib/bind9/lib/dns/dst_internal.h
@@ -217,6 +217,9 @@ isc_result_t dst__gssapi_init(struct dst_func **funcp);
#ifdef HAVE_OPENSSL_GOST
isc_result_t dst__opensslgost_init(struct dst_func **funcp);
#endif
+#ifdef HAVE_OPENSSL_ECDSA
+isc_result_t dst__opensslecdsa_init(struct dst_func **funcp);
+#endif
/*%
* Destructors
diff --git a/contrib/bind9/lib/dns/dst_openssl.h b/contrib/bind9/lib/dns/dst_openssl.h
index 7237a5e..a30fd6a 100644
--- a/contrib/bind9/lib/dns/dst_openssl.h
+++ b/contrib/bind9/lib/dns/dst_openssl.h
@@ -39,6 +39,9 @@ ISC_LANG_BEGINDECLS
isc_result_t
dst__openssl_toresult(isc_result_t fallback);
+isc_result_t
+dst__openssl_toresult2(const char *funcname, isc_result_t fallback);
+
#ifdef USE_ENGINE
ENGINE *
dst__openssl_getengine(const char *engine);
diff --git a/contrib/bind9/lib/dns/dst_parse.c b/contrib/bind9/lib/dns/dst_parse.c
index 8e9efbd..95896c4 100644
--- a/contrib/bind9/lib/dns/dst_parse.c
+++ b/contrib/bind9/lib/dns/dst_parse.c
@@ -44,8 +44,10 @@
#include <isc/stdtime.h>
#include <isc/string.h>
#include <isc/util.h>
+#include <isc/file.h>
#include <dns/time.h>
+#include <dns/log.h>
#include "dst_internal.h"
#include "dst_parse.h"
@@ -106,6 +108,8 @@ static struct parse_map map[] = {
{TAG_GOST_PRIVASN1, "GostAsn1:"},
+ {TAG_ECDSA_PRIVATEKEY, "PrivateKey:"},
+
{TAG_HMACMD5_KEY, "Key:"},
{TAG_HMACMD5_BITS, "Bits:"},
@@ -251,6 +255,15 @@ check_gost(const dst_private_t *priv) {
}
static int
+check_ecdsa(const dst_private_t *priv) {
+ if (priv->nelements != ECDSA_NTAGS)
+ return (-1);
+ if (priv->elements[0].tag != TAG(DST_ALG_ECDSA256, 0))
+ return (-1);
+ return (0);
+}
+
+static int
check_hmac_md5(const dst_private_t *priv, isc_boolean_t old) {
int i, j;
@@ -302,13 +315,20 @@ check_data(const dst_private_t *priv, const unsigned int alg,
switch (alg) {
case DST_ALG_RSAMD5:
case DST_ALG_RSASHA1:
+ case DST_ALG_NSEC3RSASHA1:
+ case DST_ALG_RSASHA256:
+ case DST_ALG_RSASHA512:
return (check_rsa(priv));
case DST_ALG_DH:
return (check_dh(priv));
case DST_ALG_DSA:
+ case DST_ALG_NSEC3DSA:
return (check_dsa(priv));
case DST_ALG_ECCGOST:
return (check_gost(priv));
+ case DST_ALG_ECDSA256:
+ case DST_ALG_ECDSA384:
+ return (check_ecdsa(priv));
case DST_ALG_HMACMD5:
return (check_hmac_md5(priv, old));
case DST_ALG_HMACSHA1:
@@ -345,7 +365,7 @@ isc_result_t
dst__privstruct_parse(dst_key_t *key, unsigned int alg, isc_lex_t *lex,
isc_mem_t *mctx, dst_private_t *priv)
{
- int n = 0, major, minor;
+ int n = 0, major, minor, check;
isc_buffer_t b;
isc_token_t token;
unsigned char *data = NULL;
@@ -515,8 +535,14 @@ dst__privstruct_parse(dst_key_t *key, unsigned int alg, isc_lex_t *lex,
data = NULL;
}
done:
- if (check_data(priv, alg, ISC_TRUE) < 0)
+ check = check_data(priv, alg, ISC_TRUE);
+ if (check < 0) {
+ ret = DST_R_INVALIDPRIVATEKEY;
+ goto fail;
+ } else if (check != ISC_R_SUCCESS) {
+ ret = check;
goto fail;
+ }
return (ISC_R_SUCCESS);
@@ -533,7 +559,6 @@ dst__privstruct_writefile(const dst_key_t *key, const dst_private_t *priv,
const char *directory)
{
FILE *fp;
- int ret, i;
isc_result_t result;
char filename[ISC_DIR_NAMEMAX];
char buffer[MAXFIELDSIZE * 2];
@@ -543,16 +568,32 @@ dst__privstruct_writefile(const dst_key_t *key, const dst_private_t *priv,
isc_buffer_t b;
isc_region_t r;
int major, minor;
+ mode_t mode;
+ int i, ret;
REQUIRE(priv != NULL);
- if (check_data(priv, dst_key_alg(key), ISC_FALSE) < 0)
+ ret = check_data(priv, dst_key_alg(key), ISC_FALSE);
+ if (ret < 0)
return (DST_R_INVALIDPRIVATEKEY);
+ else if (ret != ISC_R_SUCCESS)
+ return (ret);
isc_buffer_init(&b, filename, sizeof(filename));
- ret = dst_key_buildfilename(key, DST_TYPE_PRIVATE, directory, &b);
- if (ret != ISC_R_SUCCESS)
- return (ret);
+ result = dst_key_buildfilename(key, DST_TYPE_PRIVATE, directory, &b);
+ if (result != ISC_R_SUCCESS)
+ return (result);
+
+ result = isc_file_mode(filename, &mode);
+ if (result == ISC_R_SUCCESS && mode != 0600) {
+ /* File exists; warn that we are changing its permissions */
+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+ DNS_LOGMODULE_DNSSEC, ISC_LOG_WARNING,
+ "Permissions on the file %s "
+ "have changed from 0%o to 0600 as "
+ "a result of this operation.",
+ filename, (unsigned int)mode);
+ }
if ((fp = fopen(filename, "w")) == NULL)
return (DST_R_WRITEERROR);
@@ -603,6 +644,12 @@ dst__privstruct_writefile(const dst_key_t *key, const dst_private_t *priv,
case DST_ALG_ECCGOST:
fprintf(fp, "(ECC-GOST)\n");
break;
+ case DST_ALG_ECDSA256:
+ fprintf(fp, "(ECDSAP256SHA256)\n");
+ break;
+ case DST_ALG_ECDSA384:
+ fprintf(fp, "(ECDSAP384SHA384)\n");
+ break;
case DST_ALG_HMACMD5:
fprintf(fp, "(HMAC_MD5)\n");
break;
diff --git a/contrib/bind9/lib/dns/dst_parse.h b/contrib/bind9/lib/dns/dst_parse.h
index 91b072f..f048bf0 100644
--- a/contrib/bind9/lib/dns/dst_parse.h
+++ b/contrib/bind9/lib/dns/dst_parse.h
@@ -1,5 +1,5 @@
/*
- * Portions Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (C) 2004-2010, 2012 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) 2000-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -81,6 +81,9 @@
#define GOST_NTAGS 1
#define TAG_GOST_PRIVASN1 ((DST_ALG_ECCGOST << TAG_SHIFT) + 0)
+#define ECDSA_NTAGS 1
+#define TAG_ECDSA_PRIVATEKEY ((DST_ALG_ECDSA256 << TAG_SHIFT) + 0)
+
#define OLD_HMACMD5_NTAGS 1
#define HMACMD5_NTAGS 2
#define TAG_HMACMD5_KEY ((DST_ALG_HMACMD5 << TAG_SHIFT) + 0)
diff --git a/contrib/bind9/lib/dns/dst_result.c b/contrib/bind9/lib/dns/dst_result.c
index 429dbb2..297e809 100644
--- a/contrib/bind9/lib/dns/dst_result.c
+++ b/contrib/bind9/lib/dns/dst_result.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2008, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -30,7 +30,7 @@
static const char *text[DST_R_NRESULTS] = {
"algorithm is unsupported", /*%< 0 */
- "openssl failure", /*%< 1 */
+ "crypto failure", /*%< 1 */
"built with no crypto support", /*%< 2 */
"illegal operation for a null key", /*%< 3 */
"public key is invalid", /*%< 4 */
diff --git a/contrib/bind9/lib/dns/include/Makefile.in b/contrib/bind9/lib/dns/include/Makefile.in
index b52cb98..10d798d 100644
--- a/contrib/bind9/lib/dns/include/Makefile.in
+++ b/contrib/bind9/lib/dns/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/dns/include/dns/db.h b/contrib/bind9/lib/dns/include/dns/db.h
index 6aa02d2..fe268f4 100644
--- a/contrib/bind9/lib/dns/include/dns/db.h
+++ b/contrib/bind9/lib/dns/include/dns/db.h
@@ -172,7 +172,7 @@ typedef struct dns_dbmethods {
isc_boolean_t (*isdnssec)(dns_db_t *db);
dns_stats_t *(*getrrsetstats)(dns_db_t *db);
void (*rpz_enabled)(dns_db_t *db, dns_rpz_st_t *st);
- isc_result_t (*rpz_findips)(dns_rpz_zone_t *rpz,
+ void (*rpz_findips)(dns_rpz_zone_t *rpz,
dns_rpz_type_t rpz_type,
dns_zone_t *zone, dns_db_t *db,
dns_dbversion_t *version,
@@ -1507,7 +1507,7 @@ dns_db_rpz_enabled(dns_db_t *db, dns_rpz_st_t *st);
* DNS_RPZ_TYPE_NSDNAME records.
*/
-isc_result_t
+void
dns_db_rpz_findips(dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type,
dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version,
dns_rdataset_t *ardataset, dns_rpz_st_t *st,
@@ -1524,10 +1524,6 @@ dns_db_rpz_findips(dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type,
* \li 'ardataset' is an A or AAAA rdataset of addresses to check
* \li 'found' specifies the previous best match if any or
* or NULL, an empty name, 0, DNS_RPZ_POLICY_MISS, and 0
- *
- * Returns:
- * \li #ISC_R_SUCCESS
- * \li #ISC_R_UNEXPECTED
*/
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/dnssec.h b/contrib/bind9/lib/dns/include/dns/dnssec.h
index b87fd5c..e986d40 100644
--- a/contrib/bind9/lib/dns/include/dns/dnssec.h
+++ b/contrib/bind9/lib/dns/include/dns/dnssec.h
@@ -24,6 +24,7 @@
#include <isc/lang.h>
#include <isc/stdtime.h>
+#include <isc/stats.h>
#include <dns/diff.h>
#include <dns/types.h>
@@ -32,6 +33,8 @@
ISC_LANG_BEGINDECLS
+LIBDNS_EXTERNAL_DATA extern isc_stats_t *dns_dnssec_stats;
+
/*%< Maximum number of keys supported in a zone. */
#define DNS_MAXZONEKEYS 32
@@ -96,8 +99,8 @@ dns_dnssec_sign(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
isc_stdtime_t *inception, isc_stdtime_t *expire,
isc_mem_t *mctx, isc_buffer_t *buffer, dns_rdata_t *sigrdata);
/*%<
- * Generates a SIG record covering this rdataset. This has no effect
- * on existing SIG records.
+ * Generates a RRSIG record covering this rdataset. This has no effect
+ * on existing RRSIG records.
*
* Requires:
*\li 'name' (the owner name of the record) is a valid name
@@ -130,9 +133,9 @@ dns_dnssec_verify2(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
isc_boolean_t ignoretime, isc_mem_t *mctx,
dns_rdata_t *sigrdata, dns_name_t *wild);
/*%<
- * Verifies the SIG record covering this rdataset signed by a specific
- * key. This does not determine if the key's owner is authorized to
- * sign this record, as this requires a resolver or database.
+ * Verifies the RRSIG record covering this rdataset signed by a specific
+ * key. This does not determine if the key's owner is authorized to sign
+ * this record, as this requires a resolver or database.
* If 'ignoretime' is ISC_TRUE, temporal validity will not be checked.
*
* Requires:
diff --git a/contrib/bind9/lib/dns/include/dns/ds.h b/contrib/bind9/lib/dns/include/dns/ds.h
index b20b408..03ab0ed 100644
--- a/contrib/bind9/lib/dns/include/dns/ds.h
+++ b/contrib/bind9/lib/dns/include/dns/ds.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007, 2010 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2010, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -27,15 +27,16 @@
#define DNS_DSDIGEST_SHA1 (1)
#define DNS_DSDIGEST_SHA256 (2)
#define DNS_DSDIGEST_GOST (3)
+#define DNS_DSDIGEST_SHA384 (4)
/* should not be here... */
#define ISC_GOST_DIGESTLENGTH 32U
/*
- * Assuming SHA-256 digest type.
+ * Assuming SHA-384 digest type.
*/
-#define DNS_DS_BUFFERSIZE (36)
+#define DNS_DS_BUFFERSIZE (52)
ISC_LANG_BEGINDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/iptable.h b/contrib/bind9/lib/dns/include/dns/iptable.h
index d7eb140..2ce8e18 100644
--- a/contrib/bind9/lib/dns/include/dns/iptable.h
+++ b/contrib/bind9/lib/dns/include/dns/iptable.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -23,6 +23,8 @@
#include <isc/magic.h>
#include <isc/radix.h>
+#include <dns/types.h>
+
struct dns_iptable {
unsigned int magic;
isc_mem_t *mctx;
diff --git a/contrib/bind9/lib/dns/include/dns/keyvalues.h b/contrib/bind9/lib/dns/include/dns/keyvalues.h
index 55c0b8f..0c392ca 100644
--- a/contrib/bind9/lib/dns/include/dns/keyvalues.h
+++ b/contrib/bind9/lib/dns/include/dns/keyvalues.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2010, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -71,6 +71,8 @@
#define DNS_KEYALG_RSASHA256 8
#define DNS_KEYALG_RSASHA512 10
#define DNS_KEYALG_ECCGOST 12
+#define DNS_KEYALG_ECDSA256 13
+#define DNS_KEYALG_ECDSA384 14
#define DNS_KEYALG_INDIRECT 252
#define DNS_KEYALG_PRIVATEDNS 253
#define DNS_KEYALG_PRIVATEOID 254 /*%< Key begins with OID giving alg */
@@ -101,4 +103,10 @@
#define DNS_SIG_GOSTSIGSIZE 64
+#define DNS_SIG_ECDSA256SIZE 64
+#define DNS_SIG_ECDSA384SIZE 96
+
+#define DNS_KEY_ECDSA256SIZE 64
+#define DNS_KEY_ECDSA384SIZE 96
+
#endif /* DNS_KEYVALUES_H */
diff --git a/contrib/bind9/lib/dns/include/dns/log.h b/contrib/bind9/lib/dns/include/dns/log.h
index b73b17f..689b148 100644
--- a/contrib/bind9/lib/dns/include/dns/log.h
+++ b/contrib/bind9/lib/dns/include/dns/log.h
@@ -75,6 +75,7 @@ LIBDNS_EXTERNAL_DATA extern isc_logmodule_t dns_modules[];
#define DNS_LOGMODULE_ACACHE (&dns_modules[25])
#define DNS_LOGMODULE_DLZ (&dns_modules[26])
#define DNS_LOGMODULE_DNSSEC (&dns_modules[27])
+#define DNS_LOGMODULE_CRYPTO (&dns_modules[28])
ISC_LANG_BEGINDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/rdataset.h b/contrib/bind9/lib/dns/include/dns/rdataset.h
index 7918551..b2b8370 100644
--- a/contrib/bind9/lib/dns/include/dns/rdataset.h
+++ b/contrib/bind9/lib/dns/include/dns/rdataset.h
@@ -56,6 +56,7 @@
#include <isc/stdtime.h>
#include <dns/types.h>
+#include <dns/rdatastruct.h>
ISC_LANG_BEGINDECLS
@@ -651,6 +652,25 @@ dns_rdataset_expire(dns_rdataset_t *rdataset);
* Mark the rdataset to be expired in the backing database.
*/
+void
+dns_rdataset_trimttl(dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset,
+ dns_rdata_rrsig_t *rrsig, isc_stdtime_t now,
+ isc_boolean_t acceptexpired);
+/*%<
+ * Trim the ttl of 'rdataset' and 'sigrdataset' so that they will expire
+ * at or before 'rrsig->expiretime'. If 'acceptexpired' is true and the
+ * signature has expired or will expire in the next 120 seconds, limit
+ * the ttl to be no more than 120 seconds.
+ *
+ * The ttl is further limited by the original ttl as stored in 'rrsig'
+ * and the original ttl values of 'rdataset' and 'sigrdataset'.
+ *
+ * Requires:
+ * \li 'rdataset' is a valid rdataset.
+ * \li 'sigrdataset' is a valid rdataset.
+ * \li 'rrsig' is non NULL.
+ */
+
const char *
dns_trust_totext(dns_trust_t trust);
/*
diff --git a/contrib/bind9/lib/dns/include/dns/rpz.h b/contrib/bind9/lib/dns/include/dns/rpz.h
index 59d4f87..4227dd4 100644
--- a/contrib/bind9/lib/dns/include/dns/rpz.h
+++ b/contrib/bind9/lib/dns/include/dns/rpz.h
@@ -30,6 +30,7 @@ ISC_LANG_BEGINDECLS
#define DNS_RPZ_IP_ZONE "rpz-ip"
#define DNS_RPZ_NSIP_ZONE "rpz-nsip"
#define DNS_RPZ_NSDNAME_ZONE "rpz-nsdname"
+#define DNS_RPZ_PASSTHRU_ZONE "rpz-passthru"
typedef isc_uint8_t dns_rpz_cidr_bits_t;
@@ -66,11 +67,14 @@ typedef struct dns_rpz_zone dns_rpz_zone_t;
struct dns_rpz_zone {
ISC_LINK(dns_rpz_zone_t) link;
- int num;
+ int num; /* ordinal in list of policy zones */
dns_name_t origin; /* Policy zone name */
dns_name_t nsdname; /* DNS_RPZ_NSDNAME_ZONE.origin */
- dns_rpz_policy_t policy; /* DNS_RPZ_POLICY_GIVEN or override */
+ dns_name_t passthru;/* DNS_RPZ_PASSTHRU_ZONE. */
dns_name_t cname; /* override value for ..._CNAME */
+ dns_ttl_t max_policy_ttl;
+ dns_rpz_policy_t policy; /* DNS_RPZ_POLICY_GIVEN or override */
+ isc_boolean_t recursive_only;
};
/*
@@ -143,6 +147,7 @@ typedef struct {
} dns_rpz_st_t;
#define DNS_RPZ_TTL_DEFAULT 5
+#define DNS_RPZ_MAX_TTL_DEFAULT DNS_RPZ_TTL_DEFAULT
/*
* So various response policy zone messages can be turned up or down.
@@ -152,6 +157,7 @@ typedef struct {
#define DNS_RPZ_DEBUG_LEVEL1 ISC_LOG_DEBUG(1)
#define DNS_RPZ_DEBUG_LEVEL2 ISC_LOG_DEBUG(2)
#define DNS_RPZ_DEBUG_LEVEL3 ISC_LOG_DEBUG(3)
+#define DNS_RPZ_DEBUG_QUIET (DNS_RPZ_DEBUG_LEVEL3+1)
const char *
dns_rpz_type2str(dns_rpz_type_t type);
@@ -192,7 +198,8 @@ dns_rpz_cidr_find(dns_rpz_cidr_t *cidr, const isc_netaddr_t *netaddr,
dns_name_t *search_name, dns_rpz_cidr_bits_t *prefix);
dns_rpz_policy_t
-dns_rpz_decode_cname(dns_rdataset_t *, dns_name_t *selfname);
+dns_rpz_decode_cname(dns_rpz_zone_t *rpz, dns_rdataset_t *rdataset,
+ dns_name_t *selfname);
ISC_LANG_ENDDECLS
diff --git a/contrib/bind9/lib/dns/include/dns/stats.h b/contrib/bind9/lib/dns/include/dns/stats.h
index bc77d1e..5364267 100644
--- a/contrib/bind9/lib/dns/include/dns/stats.h
+++ b/contrib/bind9/lib/dns/include/dns/stats.h
@@ -64,6 +64,16 @@ enum {
dns_resstatscounter_max = 30,
+ /*
+ * DNSSEC stats.
+ */
+ dns_dnssecstats_asis = 0,
+ dns_dnssecstats_downcase = 1,
+ dns_dnssecstats_wildcard = 2,
+ dns_dnssecstats_fail = 3,
+
+ dns_dnssecstats_max = 4,
+
/*%
* Zone statistics counters.
*/
diff --git a/contrib/bind9/lib/dns/include/dns/view.h b/contrib/bind9/lib/dns/include/dns/view.h
index 7db600b..4a04867 100644
--- a/contrib/bind9/lib/dns/include/dns/view.h
+++ b/contrib/bind9/lib/dns/include/dns/view.h
@@ -162,6 +162,8 @@ struct dns_view {
dns_dns64list_t dns64;
unsigned int dns64cnt;
ISC_LIST(dns_rpz_zone_t) rpz_zones;
+ isc_boolean_t rpz_recursive_only;
+ isc_boolean_t rpz_break_dnssec;
/*
* Configurable data for server use only,
diff --git a/contrib/bind9/lib/dns/include/dns/zone.h b/contrib/bind9/lib/dns/include/dns/zone.h
index 9eada59..9db825c 100644
--- a/contrib/bind9/lib/dns/include/dns/zone.h
+++ b/contrib/bind9/lib/dns/include/dns/zone.h
@@ -1815,7 +1815,7 @@ dns_zone_setsignatures(dns_zone_t *zone, isc_uint32_t signatures);
isc_result_t
dns_zone_signwithkey(dns_zone_t *zone, dns_secalg_t algorithm,
- isc_uint16_t keyid, isc_boolean_t delete);
+ isc_uint16_t keyid, isc_boolean_t deleteit);
/*%<
* Initiate/resume signing of the entire zone with the zone DNSKEY(s)
* that match the given algorithm and keyid.
diff --git a/contrib/bind9/lib/dns/include/dst/Makefile.in b/contrib/bind9/lib/dns/include/dst/Makefile.in
index 4ed4ec0..cece67d 100644
--- a/contrib/bind9/lib/dns/include/dst/Makefile.in
+++ b/contrib/bind9/lib/dns/include/dst/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/dns/include/dst/dst.h b/contrib/bind9/lib/dns/include/dst/dst.h
index bf314f3..b0fa690 100644
--- a/contrib/bind9/lib/dns/include/dst/dst.h
+++ b/contrib/bind9/lib/dns/include/dst/dst.h
@@ -59,6 +59,8 @@ typedef struct dst_context dst_context_t;
#define DST_ALG_RSASHA256 8
#define DST_ALG_RSASHA512 10
#define DST_ALG_ECCGOST 12
+#define DST_ALG_ECDSA256 13
+#define DST_ALG_ECDSA384 14
#define DST_ALG_HMACMD5 157
#define DST_ALG_GSSAPI 160
#define DST_ALG_HMACSHA1 161 /* XXXMPA */
diff --git a/contrib/bind9/lib/dns/include/dst/result.h b/contrib/bind9/lib/dns/include/dst/result.h
index d77b72e..00640a1 100644
--- a/contrib/bind9/lib/dns/include/dst/result.h
+++ b/contrib/bind9/lib/dns/include/dst/result.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -34,7 +34,9 @@
#include <isc/result.h> /* Contractual promise. */
#define DST_R_UNSUPPORTEDALG (ISC_RESULTCLASS_DST + 0)
-#define DST_R_OPENSSLFAILURE (ISC_RESULTCLASS_DST + 1)
+#define DST_R_CRYPTOFAILURE (ISC_RESULTCLASS_DST + 1)
+/* compat */
+#define DST_R_OPENSSLFAILURE DST_R_CRYPTOFAILURE
#define DST_R_NOCRYPTO (ISC_RESULTCLASS_DST + 2)
#define DST_R_NULLKEY (ISC_RESULTCLASS_DST + 3)
#define DST_R_INVALIDPUBLICKEY (ISC_RESULTCLASS_DST + 4)
diff --git a/contrib/bind9/lib/dns/log.c b/contrib/bind9/lib/dns/log.c
index 8f3774f..d286d10 100644
--- a/contrib/bind9/lib/dns/log.c
+++ b/contrib/bind9/lib/dns/log.c
@@ -81,6 +81,7 @@ LIBDNS_EXTERNAL_DATA isc_logmodule_t dns_modules[] = {
{ "dns/acache", 0 },
{ "dns/dlz", 0 },
{ "dns/dnssec", 0 },
+ { "dns/crypto", 0 },
{ NULL, 0 }
};
diff --git a/contrib/bind9/lib/dns/master.c b/contrib/bind9/lib/dns/master.c
index 7f6cf58..8304507 100644
--- a/contrib/bind9/lib/dns/master.c
+++ b/contrib/bind9/lib/dns/master.c
@@ -2076,19 +2076,21 @@ load_raw(dns_loadctx_t *lctx) {
unsigned int loop_cnt = 0;
dns_rdatacallbacks_t *callbacks;
unsigned char namebuf[DNS_NAME_MAXWIRE];
- isc_region_t r;
- dns_name_t name;
+ dns_fixedname_t fixed;
+ dns_name_t *name;
rdatalist_head_t head, dummy;
dns_rdatalist_t rdatalist;
isc_mem_t *mctx = lctx->mctx;
dns_rdata_t *rdata = NULL;
unsigned int rdata_size = 0;
int target_size = TSIZ;
- isc_buffer_t target;
+ isc_buffer_t target, buf;
unsigned char *target_mem = NULL;
+ dns_decompress_t dctx;
REQUIRE(DNS_LCTX_VALID(lctx));
callbacks = lctx->callbacks;
+ dns_decompress_init(&dctx, -1, DNS_DECOMPRESS_NONE);
if (lctx->first) {
dns_masterrawheader_t header;
@@ -2145,6 +2147,9 @@ load_raw(dns_loadctx_t *lctx) {
}
isc_buffer_init(&target, target_mem, target_size);
+ dns_fixedname_init(&fixed);
+ name = dns_fixedname_name(&fixed);
+
/*
* In the following loop, we regard any error fatal regardless of
* whether "MANYERRORS" is set in the context option. This is because
@@ -2156,7 +2161,7 @@ load_raw(dns_loadctx_t *lctx) {
for (loop_cnt = 0;
(lctx->loop_cnt == 0 || loop_cnt < lctx->loop_cnt);
loop_cnt++) {
- unsigned int i, rdcount, consumed_name;
+ unsigned int i, rdcount;
isc_uint16_t namelen;
isc_uint32_t totallen;
size_t minlen, readlen;
@@ -2246,12 +2251,11 @@ load_raw(dns_loadctx_t *lctx) {
lctx->f);
if (result != ISC_R_SUCCESS)
goto cleanup;
+
isc_buffer_setactive(&target, (unsigned int)namelen);
- isc_buffer_activeregion(&target, &r);
- dns_name_init(&name, NULL);
- dns_name_fromregion(&name, &r);
- isc_buffer_forward(&target, (unsigned int)namelen);
- consumed_name = isc_buffer_consumedlength(&target);
+ result = dns_name_fromwire(name, &target, &dctx, 0, NULL);
+ if (result != ISC_R_SUCCESS)
+ goto cleanup;
/* Rdata contents. */
if (rdcount > rdata_size) {
@@ -2282,7 +2286,7 @@ load_raw(dns_loadctx_t *lctx) {
/* Partial Commit. */
ISC_LIST_APPEND(head, &rdatalist, link);
- result = commit(callbacks, lctx, &head, &name,
+ result = commit(callbacks, lctx, &head, name,
NULL, 0);
for (j = 0; j < i; j++) {
ISC_LIST_UNLINK(rdatalist.rdata,
@@ -2294,8 +2298,6 @@ load_raw(dns_loadctx_t *lctx) {
/* Rewind the buffer and continue */
isc_buffer_clear(&target);
- isc_buffer_add(&target, consumed_name);
- isc_buffer_forward(&target, consumed_name);
rdcount -= i;
@@ -2315,11 +2317,20 @@ load_raw(dns_loadctx_t *lctx) {
if (result != ISC_R_SUCCESS)
goto cleanup;
isc_buffer_setactive(&target, (unsigned int)rdlen);
- isc_buffer_activeregion(&target, &r);
- isc_buffer_forward(&target, (unsigned int)rdlen);
- dns_rdata_fromregion(&rdata[i], rdatalist.rdclass,
- rdatalist.type, &r);
-
+ /*
+ * It is safe to have the source active region and
+ * the target available region be the same if
+ * decompression is disabled (see dctx above) and we
+ * are not downcasing names (options == 0).
+ */
+ isc_buffer_init(&buf, isc_buffer_current(&target),
+ (unsigned int)rdlen);
+ result = dns_rdata_fromwire(&rdata[i],
+ rdatalist.rdclass,
+ rdatalist.type, &target,
+ &dctx, 0, &buf);
+ if (result != ISC_R_SUCCESS)
+ goto cleanup;
ISC_LIST_APPEND(rdatalist.rdata, &rdata[i], link);
}
@@ -2336,7 +2347,7 @@ load_raw(dns_loadctx_t *lctx) {
ISC_LIST_APPEND(head, &rdatalist, link);
/* Commit this RRset. rdatalist will be unlinked. */
- result = commit(callbacks, lctx, &head, &name, NULL, 0);
+ result = commit(callbacks, lctx, &head, name, NULL, 0);
for (i = 0; i < rdcount; i++) {
ISC_LIST_UNLINK(rdatalist.rdata, &rdata[i], link);
diff --git a/contrib/bind9/lib/dns/masterdump.c b/contrib/bind9/lib/dns/masterdump.c
index 0c17c1a..a10e6f2 100644
--- a/contrib/bind9/lib/dns/masterdump.c
+++ b/contrib/bind9/lib/dns/masterdump.c
@@ -1545,7 +1545,8 @@ dns_master_dumptostream2(isc_mem_t *mctx, dns_db_t *db,
}
static isc_result_t
-opentmp(isc_mem_t *mctx, const char *file, char **tempp, FILE **fp) {
+opentmp(isc_mem_t *mctx, dns_masterformat_t format, const char *file,
+ char **tempp, FILE **fp) {
FILE *f = NULL;
isc_result_t result;
char *tempname = NULL;
@@ -1560,7 +1561,10 @@ opentmp(isc_mem_t *mctx, const char *file, char **tempp, FILE **fp) {
if (result != ISC_R_SUCCESS)
goto cleanup;
- result = isc_file_openunique(tempname, &f);
+ if (format == dns_masterformat_text)
+ result = isc_file_openunique(tempname, &f);
+ else
+ result = isc_file_bopenunique(tempname, &f);
if (result != ISC_R_SUCCESS) {
isc_log_write(dns_lctx, ISC_LOGCATEGORY_GENERAL,
DNS_LOGMODULE_MASTERDUMP, ISC_LOG_ERROR,
@@ -1604,7 +1608,7 @@ dns_master_dumpinc2(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
if (file == NULL)
return (ISC_R_NOMEMORY);
- result = opentmp(mctx, filename, &tempname, &f);
+ result = opentmp(mctx, format, filename, &tempname, &f);
if (result != ISC_R_SUCCESS)
goto cleanup;
@@ -1658,7 +1662,7 @@ dns_master_dump2(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
char *tempname;
dns_dumpctx_t *dctx = NULL;
- result = opentmp(mctx, filename, &tempname, &f);
+ result = opentmp(mctx, format, filename, &tempname, &f);
if (result != ISC_R_SUCCESS)
return (result);
diff --git a/contrib/bind9/lib/dns/openssl_link.c b/contrib/bind9/lib/dns/openssl_link.c
index 59626f2..d186761 100644
--- a/contrib/bind9/lib/dns/openssl_link.c
+++ b/contrib/bind9/lib/dns/openssl_link.c
@@ -45,6 +45,8 @@
#include <isc/thread.h>
#include <isc/util.h>
+#include <dns/log.h>
+
#include <dst/result.h>
#include "dst_internal.h"
@@ -172,6 +174,8 @@ dst__openssl_init(const char *engine) {
CRYPTO_set_locking_callback(lock_callback);
CRYPTO_set_id_callback(id_callback);
+ ERR_load_crypto_strings();
+
rm = mem_alloc(sizeof(RAND_METHOD));
if (rm == NULL) {
result = ISC_R_NOMEMORY;
@@ -285,7 +289,7 @@ dst__openssl_destroy() {
isc_result_t
dst__openssl_toresult(isc_result_t fallback) {
isc_result_t result = fallback;
- int err = ERR_get_error();
+ unsigned long err = ERR_get_error();
switch (ERR_GET_REASON(err)) {
case ERR_R_MALLOC_FAILURE:
@@ -298,6 +302,40 @@ dst__openssl_toresult(isc_result_t fallback) {
return (result);
}
+isc_result_t
+dst__openssl_toresult2(const char *funcname, isc_result_t fallback) {
+ isc_result_t result = fallback;
+ unsigned long err = ERR_peek_error();
+ const char *file, *data;
+ int line, flags;
+ char buf[256];
+
+ switch (ERR_GET_REASON(err)) {
+ case ERR_R_MALLOC_FAILURE:
+ result = ISC_R_NOMEMORY;
+ goto done;
+ default:
+ break;
+ }
+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+ DNS_LOGMODULE_CRYPTO, ISC_LOG_WARNING,
+ "%s failed", funcname);
+ for (;;) {
+ err = ERR_get_error_line_data(&file, &line, &data, &flags);
+ if (err == 0U)
+ goto done;
+ ERR_error_string_n(err, buf, sizeof(buf));
+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+ DNS_LOGMODULE_CRYPTO, ISC_LOG_INFO,
+ "%s:%s:%d:%s", buf, file, line,
+ (flags & ERR_TXT_STRING) ? data : "");
+ }
+
+ done:
+ ERR_clear_error();
+ return (result);
+}
+
#if defined(USE_ENGINE)
ENGINE *
dst__openssl_getengine(const char *engine) {
diff --git a/contrib/bind9/lib/dns/openssldh_link.c b/contrib/bind9/lib/dns/openssldh_link.c
index 71b4b12..9fe9bb5 100644
--- a/contrib/bind9/lib/dns/openssldh_link.c
+++ b/contrib/bind9/lib/dns/openssldh_link.c
@@ -1,5 +1,5 @@
/*
- * Portions Copyright (C) 2004-2009, 2011 Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (C) 2004-2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -94,7 +94,8 @@ openssldh_computesecret(const dst_key_t *pub, const dst_key_t *priv,
return (ISC_R_NOSPACE);
ret = DH_compute_key(r.base, dhpub->pub_key, dhpriv);
if (ret == 0)
- return (dst__openssl_toresult(DST_R_COMPUTESECRETFAILURE));
+ return (dst__openssl_toresult2("DH_compute_key",
+ DST_R_COMPUTESECRETFAILURE));
isc_buffer_add(secret, len);
return (ISC_R_SUCCESS);
}
@@ -204,7 +205,7 @@ openssldh_generate(dst_key_t *key, int generator, void (*callback)(int)) {
#if OPENSSL_VERSION_NUMBER > 0x00908000L
dh = DH_new();
if (dh == NULL)
- return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+ return (dst__openssl_toresult(ISC_R_NOMEMORY));
if (callback == NULL) {
BN_GENCB_set_old(&cb, NULL, NULL);
@@ -216,7 +217,9 @@ openssldh_generate(dst_key_t *key, int generator, void (*callback)(int)) {
if (!DH_generate_parameters_ex(dh, key->key_size, generator,
&cb)) {
DH_free(dh);
- return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+ return (dst__openssl_toresult2(
+ "DH_generate_parameters_ex",
+ DST_R_OPENSSLFAILURE));
}
#else
dh = DH_generate_parameters(key->key_size, generator,
@@ -225,11 +228,13 @@ openssldh_generate(dst_key_t *key, int generator, void (*callback)(int)) {
}
if (dh == NULL)
- return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+ return (dst__openssl_toresult2("DH_generate_parameters",
+ DST_R_OPENSSLFAILURE));
if (DH_generate_key(dh) == 0) {
DH_free(dh);
- return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+ return (dst__openssl_toresult2("DH_generate_key",
+ DST_R_OPENSSLFAILURE));
}
dh->flags &= ~DH_FLAG_CACHE_MONT_P;
@@ -460,6 +465,7 @@ openssldh_tofile(const dst_key_t *key, const char *directory) {
dh = key->keydata.dh;
+ memset(bufs, 0, sizeof(bufs));
for (i = 0; i < 4; i++) {
bufs[i] = isc_mem_get(key->mctx, BN_num_bytes(dh->p));
if (bufs[i] == NULL) {
diff --git a/contrib/bind9/lib/dns/openssldsa_link.c b/contrib/bind9/lib/dns/openssldsa_link.c
index 39c0615..e2cf8cd 100644
--- a/contrib/bind9/lib/dns/openssldsa_link.c
+++ b/contrib/bind9/lib/dns/openssldsa_link.c
@@ -168,7 +168,8 @@ openssldsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
if (!EVP_SignFinal(evp_md_ctx, sigbuf, &siglen, pkey)) {
EVP_PKEY_free(pkey);
free(sigbuf);
- return (ISC_R_FAILURE);
+ return (dst__openssl_toresult2("EVP_SignFinal",
+ ISC_R_FAILURE));
}
INSIST(EVP_PKEY_size(pkey) >= (int) siglen);
EVP_PKEY_free(pkey);
@@ -181,23 +182,26 @@ openssldsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
sb = sigbuf;
if (d2i_DSA_SIG(&dsasig, &sb, (long) siglen) == NULL) {
free(sigbuf);
- return (ISC_R_FAILURE);
+ return (dst__openssl_toresult2("d2i_DSA_SIG", ISC_R_FAILURE));
}
free(sigbuf);
#elif 0
/* Only use EVP for the Digest */
if (!EVP_DigestFinal_ex(evp_md_ctx, digest, &siglen)) {
- return (ISC_R_FAILURE);
+ return (dst__openssl_toresult2("EVP_DigestFinal_ex",
+ ISC_R_FAILURE));
}
dsasig = DSA_do_sign(digest, ISC_SHA1_DIGESTLENGTH, dsa);
if (dsasig == NULL)
- return (dst__openssl_toresult(DST_R_SIGNFAILURE));
+ return (dst__openssl_toresult2("DSA_do_sign",
+ DST_R_SIGNFAILURE));
#else
isc_sha1_final(sha1ctx, digest);
dsasig = DSA_do_sign(digest, ISC_SHA1_DIGESTLENGTH, dsa);
if (dsasig == NULL)
- return (dst__openssl_toresult(DST_R_SIGNFAILURE));
+ return (dst__openssl_toresult2("DSA_do_sign",
+ DST_R_SIGNFAILURE));
#endif
*r.base++ = (key->key_size - 512)/64;
BN_bn2bin_fixed(dsasig->r, r.base, ISC_SHA1_DIGESTLENGTH);
@@ -276,10 +280,15 @@ openssldsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
status = DSA_do_verify(digest, ISC_SHA1_DIGESTLENGTH, dsasig, dsa);
#endif
DSA_SIG_free(dsasig);
- if (status != 1)
+ switch (status) {
+ case 1:
+ return (ISC_R_SUCCESS);
+ case 0:
return (dst__openssl_toresult(DST_R_VERIFYFAILURE));
-
- return (ISC_R_SUCCESS);
+ default:
+ return (dst__openssl_toresult2("DSA_do_verify",
+ DST_R_VERIFYFAILURE));
+ }
}
static isc_boolean_t
@@ -370,19 +379,22 @@ openssldsa_generate(dst_key_t *key, int unused, void (*callback)(int)) {
&cb))
{
DSA_free(dsa);
- return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+ return (dst__openssl_toresult2("DSA_generate_parameters_ex",
+ DST_R_OPENSSLFAILURE));
}
#else
dsa = DSA_generate_parameters(key->key_size, rand_array,
ISC_SHA1_DIGESTLENGTH, NULL, NULL,
NULL, NULL);
if (dsa == NULL)
- return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+ return (dst__openssl_toresult2("DSA_generate_parameters",
+ DST_R_OPENSSLFAILURE));
#endif
if (DSA_generate_key(dsa) == 0) {
DSA_free(dsa);
- return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+ return (dst__openssl_toresult2("DSA_generate_key",
+ DST_R_OPENSSLFAILURE));
}
dsa->flags &= ~DSA_FLAG_CACHE_MONT_P;
diff --git a/contrib/bind9/lib/dns/opensslecdsa_link.c b/contrib/bind9/lib/dns/opensslecdsa_link.c
new file mode 100644
index 0000000..e6c9b67
--- /dev/null
+++ b/contrib/bind9/lib/dns/opensslecdsa_link.c
@@ -0,0 +1,596 @@
+/*
+ * Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id$ */
+
+#include <config.h>
+
+#ifdef HAVE_OPENSSL_ECDSA
+
+#if !defined(HAVE_EVP_SHA256) || !defined(HAVE_EVP_SHA384)
+#error "ECDSA without EVP for SHA2?"
+#endif
+
+#include <isc/entropy.h>
+#include <isc/mem.h>
+#include <isc/sha2.h>
+#include <isc/string.h>
+#include <isc/util.h>
+
+#include <dns/keyvalues.h>
+#include <dst/result.h>
+
+#include "dst_internal.h"
+#include "dst_openssl.h"
+#include "dst_parse.h"
+
+#include <openssl/err.h>
+#include <openssl/objects.h>
+#include <openssl/ecdsa.h>
+#include <openssl/bn.h>
+
+#ifndef NID_X9_62_prime256v1
+#error "P-256 group is not known (NID_X9_62_prime256v1)"
+#endif
+#ifndef NID_secp384r1
+#error "P-384 group is not known (NID_secp384r1)"
+#endif
+
+#define DST_RET(a) {ret = a; goto err;}
+
+static isc_result_t opensslecdsa_todns(const dst_key_t *key,
+ isc_buffer_t *data);
+
+static isc_result_t
+opensslecdsa_createctx(dst_key_t *key, dst_context_t *dctx) {
+ EVP_MD_CTX *evp_md_ctx;
+ const EVP_MD *type = NULL;
+
+ UNUSED(key);
+ REQUIRE(dctx->key->key_alg == DST_ALG_ECDSA256 ||
+ dctx->key->key_alg == DST_ALG_ECDSA384);
+
+ evp_md_ctx = EVP_MD_CTX_create();
+ if (evp_md_ctx == NULL)
+ return (ISC_R_NOMEMORY);
+ if (dctx->key->key_alg == DST_ALG_ECDSA256)
+ type = EVP_sha256();
+ else
+ type = EVP_sha384();
+
+ if (!EVP_DigestInit_ex(evp_md_ctx, type, NULL)) {
+ EVP_MD_CTX_destroy(evp_md_ctx);
+ return (dst__openssl_toresult2("EVP_DigestInit_ex",
+ ISC_R_FAILURE));
+ }
+
+ dctx->ctxdata.evp_md_ctx = evp_md_ctx;
+
+ return (ISC_R_SUCCESS);
+}
+
+static void
+opensslecdsa_destroyctx(dst_context_t *dctx) {
+ EVP_MD_CTX *evp_md_ctx = dctx->ctxdata.evp_md_ctx;
+
+ REQUIRE(dctx->key->key_alg == DST_ALG_ECDSA256 ||
+ dctx->key->key_alg == DST_ALG_ECDSA384);
+
+ if (evp_md_ctx != NULL) {
+ EVP_MD_CTX_destroy(evp_md_ctx);
+ dctx->ctxdata.evp_md_ctx = NULL;
+ }
+}
+
+static isc_result_t
+opensslecdsa_adddata(dst_context_t *dctx, const isc_region_t *data) {
+ EVP_MD_CTX *evp_md_ctx = dctx->ctxdata.evp_md_ctx;
+
+ REQUIRE(dctx->key->key_alg == DST_ALG_ECDSA256 ||
+ dctx->key->key_alg == DST_ALG_ECDSA384);
+
+ if (!EVP_DigestUpdate(evp_md_ctx, data->base, data->length))
+ return (dst__openssl_toresult2("EVP_DigestUpdate",
+ ISC_R_FAILURE));
+
+ return (ISC_R_SUCCESS);
+}
+
+static int
+BN_bn2bin_fixed(BIGNUM *bn, unsigned char *buf, int size) {
+ int bytes = size - BN_num_bytes(bn);
+
+ while (bytes-- > 0)
+ *buf++ = 0;
+ BN_bn2bin(bn, buf);
+ return (size);
+}
+
+static isc_result_t
+opensslecdsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
+ isc_result_t ret;
+ dst_key_t *key = dctx->key;
+ isc_region_t r;
+ ECDSA_SIG *ecdsasig;
+ EVP_MD_CTX *evp_md_ctx = dctx->ctxdata.evp_md_ctx;
+ EVP_PKEY *pkey = key->keydata.pkey;
+ EC_KEY *eckey = EVP_PKEY_get1_EC_KEY(pkey);
+ unsigned int dgstlen, siglen;
+ unsigned char digest[EVP_MAX_MD_SIZE];
+
+ REQUIRE(key->key_alg == DST_ALG_ECDSA256 ||
+ key->key_alg == DST_ALG_ECDSA384);
+
+ if (eckey == NULL)
+ return (ISC_R_FAILURE);
+
+ if (key->key_alg == DST_ALG_ECDSA256)
+ siglen = DNS_SIG_ECDSA256SIZE;
+ else
+ siglen = DNS_SIG_ECDSA384SIZE;
+
+ isc_buffer_availableregion(sig, &r);
+ if (r.length < siglen)
+ DST_RET(ISC_R_NOSPACE);
+
+ if (!EVP_DigestFinal(evp_md_ctx, digest, &dgstlen))
+ DST_RET(dst__openssl_toresult2("EVP_DigestFinal",
+ ISC_R_FAILURE));
+
+ ecdsasig = ECDSA_do_sign(digest, dgstlen, eckey);
+ if (ecdsasig == NULL)
+ DST_RET(dst__openssl_toresult2("ECDSA_do_sign",
+ DST_R_SIGNFAILURE));
+ BN_bn2bin_fixed(ecdsasig->r, r.base, siglen / 2);
+ r.base += siglen / 2;
+ BN_bn2bin_fixed(ecdsasig->s, r.base, siglen / 2);
+ r.base += siglen / 2;
+ ECDSA_SIG_free(ecdsasig);
+ isc_buffer_add(sig, siglen);
+ ret = ISC_R_SUCCESS;
+
+ err:
+ if (eckey != NULL)
+ EC_KEY_free(eckey);
+ return (ret);
+}
+
+static isc_result_t
+opensslecdsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
+ isc_result_t ret;
+ dst_key_t *key = dctx->key;
+ int status;
+ unsigned char *cp = sig->base;
+ ECDSA_SIG *ecdsasig = NULL;
+ EVP_MD_CTX *evp_md_ctx = dctx->ctxdata.evp_md_ctx;
+ EVP_PKEY *pkey = key->keydata.pkey;
+ EC_KEY *eckey = EVP_PKEY_get1_EC_KEY(pkey);
+ unsigned int dgstlen, siglen;
+ unsigned char digest[EVP_MAX_MD_SIZE];
+
+ REQUIRE(key->key_alg == DST_ALG_ECDSA256 ||
+ key->key_alg == DST_ALG_ECDSA384);
+
+ if (eckey == NULL)
+ return (ISC_R_FAILURE);
+
+ if (key->key_alg == DST_ALG_ECDSA256)
+ siglen = DNS_SIG_ECDSA256SIZE;
+ else
+ siglen = DNS_SIG_ECDSA384SIZE;
+
+ if (sig->length != siglen)
+ return (DST_R_VERIFYFAILURE);
+
+ if (!EVP_DigestFinal_ex(evp_md_ctx, digest, &dgstlen))
+ DST_RET (dst__openssl_toresult2("EVP_DigestFinal_ex",
+ ISC_R_FAILURE));
+
+ ecdsasig = ECDSA_SIG_new();
+ if (ecdsasig == NULL)
+ DST_RET (ISC_R_NOMEMORY);
+ ecdsasig->r = BN_bin2bn(cp, siglen / 2, NULL);
+ cp += siglen / 2;
+ ecdsasig->s = BN_bin2bn(cp, siglen / 2, NULL);
+ /* cp += siglen / 2; */
+
+ status = ECDSA_do_verify(digest, dgstlen, ecdsasig, eckey);
+ switch (status) {
+ case 1:
+ ret = ISC_R_SUCCESS;
+ break;
+ case 0:
+ ret = dst__openssl_toresult(DST_R_VERIFYFAILURE);
+ break;
+ default:
+ ret = dst__openssl_toresult2("ECDSA_do_verify",
+ DST_R_VERIFYFAILURE);
+ break;
+ }
+
+ err:
+ if (ecdsasig != NULL)
+ ECDSA_SIG_free(ecdsasig);
+ if (eckey != NULL)
+ EC_KEY_free(eckey);
+ return (ret);
+}
+
+static isc_boolean_t
+opensslecdsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
+ isc_boolean_t ret;
+ int status;
+ EVP_PKEY *pkey1 = key1->keydata.pkey;
+ EVP_PKEY *pkey2 = key2->keydata.pkey;
+ EC_KEY *eckey1 = NULL;
+ EC_KEY *eckey2 = NULL;
+ const BIGNUM *priv1, *priv2;
+
+ if (pkey1 == NULL && pkey2 == NULL)
+ return (ISC_TRUE);
+ else if (pkey1 == NULL || pkey2 == NULL)
+ return (ISC_FALSE);
+
+ eckey1 = EVP_PKEY_get1_EC_KEY(pkey1);
+ eckey2 = EVP_PKEY_get1_EC_KEY(pkey2);
+ if (eckey1 == NULL && eckey2 == NULL) {
+ DST_RET (ISC_TRUE);
+ } else if (eckey1 == NULL || eckey2 == NULL)
+ DST_RET (ISC_FALSE);
+
+ status = EVP_PKEY_cmp(pkey1, pkey2);
+ if (status != 1)
+ DST_RET (ISC_FALSE);
+
+ priv1 = EC_KEY_get0_private_key(eckey1);
+ priv2 = EC_KEY_get0_private_key(eckey2);
+ if (priv1 != NULL || priv2 != NULL) {
+ if (priv1 == NULL || priv2 == NULL)
+ DST_RET (ISC_FALSE);
+ if (BN_cmp(priv1, priv2) != 0)
+ DST_RET (ISC_FALSE);
+ }
+ ret = ISC_TRUE;
+
+ err:
+ if (eckey1 != NULL)
+ EC_KEY_free(eckey1);
+ if (eckey2 != NULL)
+ EC_KEY_free(eckey2);
+ return (ret);
+}
+
+static isc_result_t
+opensslecdsa_generate(dst_key_t *key, int unused, void (*callback)(int)) {
+ isc_result_t ret;
+ EVP_PKEY *pkey;
+ EC_KEY *eckey = NULL;
+ int group_nid;
+
+ REQUIRE(key->key_alg == DST_ALG_ECDSA256 ||
+ key->key_alg == DST_ALG_ECDSA384);
+ UNUSED(unused);
+ UNUSED(callback);
+
+ if (key->key_alg == DST_ALG_ECDSA256)
+ group_nid = NID_X9_62_prime256v1;
+ else
+ group_nid = NID_secp384r1;
+
+ eckey = EC_KEY_new_by_curve_name(group_nid);
+ if (eckey == NULL)
+ return (dst__openssl_toresult2("EC_KEY_new_by_curve_name",
+ DST_R_OPENSSLFAILURE));
+
+ if (EC_KEY_generate_key(eckey) != 1)
+ DST_RET (dst__openssl_toresult2("EC_KEY_generate_key",
+ DST_R_OPENSSLFAILURE));
+
+ pkey = EVP_PKEY_new();
+ if (pkey == NULL)
+ DST_RET (ISC_R_NOMEMORY);
+ if (!EVP_PKEY_set1_EC_KEY(pkey, eckey)) {
+ EVP_PKEY_free(pkey);
+ DST_RET (ISC_R_FAILURE);
+ }
+ key->keydata.pkey = pkey;
+ ret = ISC_R_SUCCESS;
+
+ err:
+ if (eckey != NULL)
+ EC_KEY_free(eckey);
+ return (ret);
+}
+
+static isc_boolean_t
+opensslecdsa_isprivate(const dst_key_t *key) {
+ isc_boolean_t ret;
+ EVP_PKEY *pkey = key->keydata.pkey;
+ EC_KEY *eckey = EVP_PKEY_get1_EC_KEY(pkey);
+
+ ret = ISC_TF(eckey != NULL && EC_KEY_get0_private_key(eckey) != NULL);
+ if (eckey != NULL)
+ EC_KEY_free(eckey);
+ return (ret);
+}
+
+static void
+opensslecdsa_destroy(dst_key_t *key) {
+ EVP_PKEY *pkey = key->keydata.pkey;
+
+ EVP_PKEY_free(pkey);
+ key->keydata.pkey = NULL;
+}
+
+static isc_result_t
+opensslecdsa_todns(const dst_key_t *key, isc_buffer_t *data) {
+ isc_result_t ret;
+ EVP_PKEY *pkey;
+ EC_KEY *eckey = NULL;
+ isc_region_t r;
+ int len;
+ unsigned char *cp;
+ unsigned char buf[DNS_KEY_ECDSA384SIZE + 1];
+
+ REQUIRE(key->keydata.pkey != NULL);
+
+ pkey = key->keydata.pkey;
+ eckey = EVP_PKEY_get1_EC_KEY(pkey);
+ if (eckey == NULL)
+ return (dst__openssl_toresult(ISC_R_FAILURE));
+ len = i2o_ECPublicKey(eckey, NULL);
+ /* skip form */
+ len--;
+
+ isc_buffer_availableregion(data, &r);
+ if (r.length < (unsigned int) len)
+ DST_RET (ISC_R_NOSPACE);
+ cp = buf;
+ if (!i2o_ECPublicKey(eckey, &cp))
+ DST_RET (dst__openssl_toresult(ISC_R_FAILURE));
+ memcpy(r.base, buf + 1, len);
+ isc_buffer_add(data, len);
+ ret = ISC_R_SUCCESS;
+
+ err:
+ if (eckey != NULL)
+ EC_KEY_free(eckey);
+ return (ret);
+}
+
+static isc_result_t
+opensslecdsa_fromdns(dst_key_t *key, isc_buffer_t *data) {
+ isc_result_t ret;
+ EVP_PKEY *pkey;
+ EC_KEY *eckey = NULL;
+ isc_region_t r;
+ int group_nid;
+ unsigned int len;
+ const unsigned char *cp;
+ unsigned char buf[DNS_KEY_ECDSA384SIZE + 1];
+
+ REQUIRE(key->key_alg == DST_ALG_ECDSA256 ||
+ key->key_alg == DST_ALG_ECDSA384);
+
+ if (key->key_alg == DST_ALG_ECDSA256) {
+ len = DNS_KEY_ECDSA256SIZE;
+ group_nid = NID_X9_62_prime256v1;
+ } else {
+ len = DNS_KEY_ECDSA384SIZE;
+ group_nid = NID_secp384r1;
+ }
+
+ isc_buffer_remainingregion(data, &r);
+ if (r.length == 0)
+ return (ISC_R_SUCCESS);
+ if (r.length < len)
+ return (DST_R_INVALIDPUBLICKEY);
+
+ eckey = EC_KEY_new_by_curve_name(group_nid);
+ if (eckey == NULL)
+ return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+
+ buf[0] = POINT_CONVERSION_UNCOMPRESSED;
+ memcpy(buf + 1, r.base, len);
+ cp = buf;
+ if (o2i_ECPublicKey(&eckey,
+ (const unsigned char **) &cp,
+ (long) len + 1) == NULL)
+ DST_RET (dst__openssl_toresult(DST_R_INVALIDPUBLICKEY));
+ if (EC_KEY_check_key(eckey) != 1)
+ DST_RET (dst__openssl_toresult(DST_R_INVALIDPUBLICKEY));
+
+ pkey = EVP_PKEY_new();
+ if (pkey == NULL)
+ DST_RET (ISC_R_NOMEMORY);
+ if (!EVP_PKEY_set1_EC_KEY(pkey, eckey)) {
+ EVP_PKEY_free(pkey);
+ DST_RET (dst__openssl_toresult(ISC_R_FAILURE));
+ }
+
+ isc_buffer_forward(data, len);
+ key->keydata.pkey = pkey;
+ ret = ISC_R_SUCCESS;
+
+ err:
+ if (eckey != NULL)
+ EC_KEY_free(eckey);
+ return (ret);
+}
+
+static isc_result_t
+opensslecdsa_tofile(const dst_key_t *key, const char *directory) {
+ isc_result_t ret;
+ EVP_PKEY *pkey;
+ EC_KEY *eckey = NULL;
+ const BIGNUM *privkey;
+ dst_private_t priv;
+ unsigned char *buf = NULL;
+
+ if (key->keydata.pkey == NULL)
+ return (DST_R_NULLKEY);
+
+ pkey = key->keydata.pkey;
+ eckey = EVP_PKEY_get1_EC_KEY(pkey);
+ if (eckey == NULL)
+ return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+ privkey = EC_KEY_get0_private_key(eckey);
+ if (privkey == NULL)
+ DST_RET (ISC_R_FAILURE);
+
+ buf = isc_mem_get(key->mctx, BN_num_bytes(privkey));
+ if (buf == NULL)
+ DST_RET (ISC_R_NOMEMORY);
+
+ priv.elements[0].tag = TAG_ECDSA_PRIVATEKEY;
+ priv.elements[0].length = BN_num_bytes(privkey);
+ BN_bn2bin(privkey, buf);
+ priv.elements[0].data = buf;
+ priv.nelements = ECDSA_NTAGS;
+ ret = dst__privstruct_writefile(key, &priv, directory);
+
+ err:
+ if (eckey != NULL)
+ EC_KEY_free(eckey);
+ if (buf != NULL)
+ isc_mem_put(key->mctx, buf, BN_num_bytes(privkey));
+ return (ret);
+}
+
+static isc_result_t
+ecdsa_check(EC_KEY *eckey, dst_key_t *pub)
+{
+ isc_result_t ret = ISC_R_FAILURE;
+ EVP_PKEY *pkey;
+ EC_KEY *pubeckey = NULL;
+ const EC_POINT *pubkey;
+
+ if (pub == NULL)
+ return (ISC_R_SUCCESS);
+ pkey = pub->keydata.pkey;
+ if (pkey == NULL)
+ return (ISC_R_SUCCESS);
+ pubeckey = EVP_PKEY_get1_EC_KEY(pkey);
+ if (pubeckey == NULL)
+ return (ISC_R_SUCCESS);
+ pubkey = EC_KEY_get0_public_key(pubeckey);
+ if (pubkey == NULL)
+ DST_RET (ISC_R_SUCCESS);
+ if (EC_KEY_set_public_key(eckey, pubkey) != 1)
+ DST_RET (ISC_R_SUCCESS);
+ if (EC_KEY_check_key(eckey) == 1)
+ DST_RET (ISC_R_SUCCESS);
+
+ err:
+ if (pubeckey != NULL)
+ EC_KEY_free(pubeckey);
+ return (ret);
+}
+
+static isc_result_t
+opensslecdsa_parse(dst_key_t *key, isc_lex_t *lexer, dst_key_t *pub) {
+ dst_private_t priv;
+ isc_result_t ret;
+ EVP_PKEY *pkey;
+ EC_KEY *eckey = NULL;
+ BIGNUM *privkey;
+ int group_nid;
+ isc_mem_t *mctx = key->mctx;
+
+ REQUIRE(key->key_alg == DST_ALG_ECDSA256 ||
+ key->key_alg == DST_ALG_ECDSA384);
+
+ if (key->key_alg == DST_ALG_ECDSA256)
+ group_nid = NID_X9_62_prime256v1;
+ else
+ group_nid = NID_secp384r1;
+
+ eckey = EC_KEY_new_by_curve_name(group_nid);
+ if (eckey == NULL)
+ return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+
+ /* read private key file */
+ ret = dst__privstruct_parse(key, DST_ALG_ECDSA256, lexer, mctx, &priv);
+ if (ret != ISC_R_SUCCESS)
+ goto err;
+
+ privkey = BN_bin2bn(priv.elements[0].data,
+ priv.elements[0].length, NULL);
+ if (privkey == NULL)
+ DST_RET(ISC_R_NOMEMORY);
+ if (!EC_KEY_set_private_key(eckey, privkey))
+ DST_RET(ISC_R_NOMEMORY);
+ if (ecdsa_check(eckey, pub) != ISC_R_SUCCESS)
+ DST_RET(DST_R_INVALIDPRIVATEKEY);
+ dst__privstruct_free(&priv, mctx);
+ memset(&priv, 0, sizeof(priv));
+
+ pkey = EVP_PKEY_new();
+ if (pkey == NULL)
+ DST_RET (ISC_R_NOMEMORY);
+ if (!EVP_PKEY_set1_EC_KEY(pkey, eckey)) {
+ EVP_PKEY_free(pkey);
+ DST_RET (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+ }
+ key->keydata.pkey = pkey;
+ ret = ISC_R_SUCCESS;
+
+ err:
+ if (eckey != NULL)
+ EC_KEY_free(eckey);
+ dst__privstruct_free(&priv, mctx);
+ memset(&priv, 0, sizeof(priv));
+ return (ret);
+}
+
+static dst_func_t opensslecdsa_functions = {
+ opensslecdsa_createctx,
+ opensslecdsa_destroyctx,
+ opensslecdsa_adddata,
+ opensslecdsa_sign,
+ opensslecdsa_verify,
+ NULL, /*%< computesecret */
+ opensslecdsa_compare,
+ NULL, /*%< paramcompare */
+ opensslecdsa_generate,
+ opensslecdsa_isprivate,
+ opensslecdsa_destroy,
+ opensslecdsa_todns,
+ opensslecdsa_fromdns,
+ opensslecdsa_tofile,
+ opensslecdsa_parse,
+ NULL, /*%< cleanup */
+ NULL, /*%< fromlabel */
+ NULL, /*%< dump */
+ NULL, /*%< restore */
+};
+
+isc_result_t
+dst__opensslecdsa_init(dst_func_t **funcp) {
+ REQUIRE(funcp != NULL);
+ if (*funcp == NULL)
+ *funcp = &opensslecdsa_functions;
+ return (ISC_R_SUCCESS);
+}
+
+#else /* HAVE_OPENSSL_ECDSA */
+
+#include <isc/util.h>
+
+EMPTY_TRANSLATION_UNIT
+
+#endif /* HAVE_OPENSSL_ECDSA */
+/*! \file */
diff --git a/contrib/bind9/lib/dns/opensslgost_link.c b/contrib/bind9/lib/dns/opensslgost_link.c
index e92d50f..8a55a6b 100644
--- a/contrib/bind9/lib/dns/opensslgost_link.c
+++ b/contrib/bind9/lib/dns/opensslgost_link.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2010-2012 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -121,10 +121,15 @@ opensslgost_verify(dst_context_t *dctx, const isc_region_t *sig) {
EVP_PKEY *pkey = key->keydata.pkey;
status = EVP_VerifyFinal(evp_md_ctx, sig->base, sig->length, pkey);
- if (status != 1)
+ switch (status) {
+ case 1:
+ return (ISC_R_SUCCESS);
+ case 0:
return (dst__openssl_toresult(DST_R_VERIFYFAILURE));
-
- return (ISC_R_SUCCESS);
+ default:
+ return (dst__openssl_toresult2("EVP_VerifyFinal",
+ DST_R_VERIFYFAILURE));
+ }
}
static isc_boolean_t
@@ -168,22 +173,27 @@ opensslgost_generate(dst_key_t *key, int unused, void (*callback)(int)) {
void (*fptr)(int);
} u;
EVP_PKEY *pkey = NULL;
+ isc_result_t ret;
UNUSED(unused);
ctx = EVP_PKEY_CTX_new_id(NID_id_GostR3410_2001, NULL);
if (ctx == NULL)
- goto err;
+ DST_RET(dst__openssl_toresult2("EVP_PKEY_CTX_new_id",
+ DST_R_OPENSSLFAILURE));
if (callback != NULL) {
u.fptr = callback;
EVP_PKEY_CTX_set_app_data(ctx, u.dptr);
EVP_PKEY_CTX_set_cb(ctx, &progress_cb);
}
if (EVP_PKEY_keygen_init(ctx) <= 0)
- goto err;
+ DST_RET(dst__openssl_toresult2("EVP_PKEY_keygen_init",
+ DST_R_OPENSSLFAILURE));
if (EVP_PKEY_CTX_ctrl_str(ctx, "paramset", "A") <= 0)
- goto err;
+ DST_RET(dst__openssl_toresult2("EVP_PKEY_CTX_ctrl_str",
+ DST_R_OPENSSLFAILURE));
if (EVP_PKEY_keygen(ctx, &pkey) <= 0)
- goto err;
+ DST_RET(dst__openssl_toresult2("EVP_PKEY_keygen",
+ DST_R_OPENSSLFAILURE));
key->keydata.pkey = pkey;
EVP_PKEY_CTX_free(ctx);
return (ISC_R_SUCCESS);
@@ -193,7 +203,7 @@ err:
EVP_PKEY_free(pkey);
if (ctx != NULL)
EVP_PKEY_CTX_free(ctx);
- return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+ return (ret);
}
static isc_boolean_t
@@ -267,7 +277,8 @@ opensslgost_fromdns(dst_key_t *key, isc_buffer_t *data) {
p = der;
if (d2i_PUBKEY(&pkey, &p, (long) sizeof(der)) == NULL)
- return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+ return (dst__openssl_toresult2("d2i_PUBKEY",
+ DST_R_OPENSSLFAILURE));
key->keydata.pkey = pkey;
return (ISC_R_SUCCESS);
@@ -293,7 +304,8 @@ opensslgost_tofile(const dst_key_t *key, const char *directory) {
p = der;
if (i2d_PrivateKey(pkey, &p) != len) {
- result = dst__openssl_toresult(DST_R_OPENSSLFAILURE);
+ result = dst__openssl_toresult2("i2d_PrivateKey",
+ DST_R_OPENSSLFAILURE);
goto fail;
}
@@ -328,7 +340,8 @@ opensslgost_parse(dst_key_t *key, isc_lex_t *lexer, dst_key_t *pub) {
p = priv.elements[0].data;
if (d2i_PrivateKey(NID_id_GostR3410_2001, &pkey, &p,
(long) priv.elements[0].length) == NULL)
- DST_RET(DST_R_INVALIDPRIVATEKEY);
+ DST_RET(dst__openssl_toresult2("d2i_PrivateKey",
+ DST_R_INVALIDPRIVATEKEY));
key->keydata.pkey = pkey;
key->key_size = EVP_PKEY_bits(pkey);
dst__privstruct_free(&priv, mctx);
@@ -377,35 +390,47 @@ static dst_func_t opensslgost_functions = {
isc_result_t
dst__opensslgost_init(dst_func_t **funcp) {
+ isc_result_t ret;
+
REQUIRE(funcp != NULL);
/* check if the gost engine works properly */
e = ENGINE_by_id("gost");
if (e == NULL)
- return (DST_R_OPENSSLFAILURE);
+ return (dst__openssl_toresult2("ENGINE_by_id",
+ DST_R_OPENSSLFAILURE));
if (ENGINE_init(e) <= 0) {
ENGINE_free(e);
e = NULL;
- return (DST_R_OPENSSLFAILURE);
+ return (dst__openssl_toresult2("ENGINE_init",
+ DST_R_OPENSSLFAILURE));
}
/* better than to rely on digest_gost symbol */
opensslgost_digest = ENGINE_get_digest(e, NID_id_GostR3411_94);
+ if (opensslgost_digest == NULL)
+ DST_RET(dst__openssl_toresult2("ENGINE_get_digest",
+ DST_R_OPENSSLFAILURE));
/* from openssl.cnf */
- if ((opensslgost_digest == NULL) ||
- (ENGINE_register_pkey_asn1_meths(e) <= 0) ||
- (ENGINE_ctrl_cmd_string(e,
- "CRYPT_PARAMS",
- "id-Gost28147-89-CryptoPro-A-ParamSet",
- 0) <= 0)) {
- ENGINE_finish(e);
- ENGINE_free(e);
- e = NULL;
- return (DST_R_OPENSSLFAILURE);
- }
+ if (ENGINE_register_pkey_asn1_meths(e) <= 0)
+ DST_RET(dst__openssl_toresult2(
+ "ENGINE_register_pkey_asn1_meths",
+ DST_R_OPENSSLFAILURE));
+ if (ENGINE_ctrl_cmd_string(e,
+ "CRYPT_PARAMS",
+ "id-Gost28147-89-CryptoPro-A-ParamSet",
+ 0) <= 0)
+ DST_RET(dst__openssl_toresult2("ENGINE_ctrl_cmd_string",
+ DST_R_OPENSSLFAILURE));
if (*funcp == NULL)
*funcp = &opensslgost_functions;
return (ISC_R_SUCCESS);
+
+ err:
+ ENGINE_finish(e);
+ ENGINE_free(e);
+ e = NULL;
+ return (ret);
}
#else /* HAVE_OPENSSL_GOST */
diff --git a/contrib/bind9/lib/dns/opensslrsa_link.c b/contrib/bind9/lib/dns/opensslrsa_link.c
index a245618..80c3f57 100644
--- a/contrib/bind9/lib/dns/opensslrsa_link.c
+++ b/contrib/bind9/lib/dns/opensslrsa_link.c
@@ -156,7 +156,8 @@ opensslrsa_createctx(dst_key_t *key, dst_context_t *dctx) {
if (!EVP_DigestInit_ex(evp_md_ctx, type, NULL)) {
EVP_MD_CTX_destroy(evp_md_ctx);
- return (ISC_R_FAILURE);
+ return (dst__openssl_toresult2("EVP_DigestInit_ex",
+ ISC_R_FAILURE));
}
dctx->ctxdata.evp_md_ctx = evp_md_ctx;
#else
@@ -304,7 +305,8 @@ opensslrsa_adddata(dst_context_t *dctx, const isc_region_t *data) {
#if USE_EVP
if (!EVP_DigestUpdate(evp_md_ctx, data->base, data->length)) {
- return (ISC_R_FAILURE);
+ return (dst__openssl_toresult2("EVP_DigestUpdate",
+ ISC_R_FAILURE));
}
#else
switch (dctx->key->key_alg) {
@@ -374,10 +376,6 @@ opensslrsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
int status;
int type = 0;
unsigned int digestlen = 0;
- char *message;
- unsigned long err;
- const char* file;
- int line;
#if OPENSSL_VERSION_NUMBER < 0x00908000L
unsigned int prefixlen = 0;
const unsigned char *prefix = NULL;
@@ -397,7 +395,8 @@ opensslrsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
return (ISC_R_NOSPACE);
if (!EVP_SignFinal(evp_md_ctx, r.base, &siglen, pkey)) {
- return (ISC_R_FAILURE);
+ return (dst__openssl_toresult2("EVP_SignFinal",
+ ISC_R_FAILURE));
}
#else
if (r.length < (unsigned int) RSA_size(rsa))
@@ -489,13 +488,9 @@ opensslrsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
INSIST(type != 0);
status = RSA_sign(type, digest, digestlen, r.base, &siglen, rsa);
#endif
- if (status == 0) {
- err = ERR_peek_error_line(&file, &line);
- if (err != 0U) {
- message = ERR_error_string(err, NULL);
- }
- return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
- }
+ if (status == 0)
+ return (dst__openssl_toresult2("RSA_sign",
+ DST_R_OPENSSLFAILURE));
#endif
isc_buffer_add(sig, siglen);
@@ -615,7 +610,9 @@ opensslrsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
original, rsa,
RSA_PKCS1_PADDING);
if (status <= 0)
- return (DST_R_VERIFYFAILURE);
+ return (dst__openssl_toresult2(
+ "RSA_public_decrypt",
+ DST_R_VERIFYFAILURE));
if (status != (int)(prefixlen + digestlen))
return (DST_R_VERIFYFAILURE);
if (memcmp(original, prefix, prefixlen))
@@ -636,7 +633,8 @@ opensslrsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
#endif
#endif
if (status != 1)
- return (dst__openssl_toresult(DST_R_VERIFYFAILURE));
+ return (dst__openssl_toresult2("RSA_verify",
+ DST_R_VERIFYFAILURE));
return (ISC_R_SUCCESS);
}
@@ -727,6 +725,7 @@ progress_cb(int p, int n, BN_GENCB *cb)
static isc_result_t
opensslrsa_generate(dst_key_t *key, int exp, void (*callback)(int)) {
#if OPENSSL_VERSION_NUMBER > 0x00908000L
+ isc_result_t ret = DST_R_OPENSSLFAILURE;
BN_GENCB cb;
union {
void *dptr;
@@ -776,6 +775,8 @@ opensslrsa_generate(dst_key_t *key, int exp, void (*callback)(int)) {
#endif
return (ISC_R_SUCCESS);
}
+ ret = dst__openssl_toresult2("RSA_generate_key_ex",
+ DST_R_OPENSSLFAILURE);
err:
#if USE_EVP
@@ -786,7 +787,7 @@ err:
BN_free(e);
if (rsa != NULL)
RSA_free(rsa);
- return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+ return (dst__openssl_toresult(ret));
#else
RSA *rsa;
unsigned long e;
@@ -810,7 +811,8 @@ err:
#if USE_EVP
EVP_PKEY_free(pkey);
#endif
- return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+ return (dst__openssl_toresult2("RSA_generate_key",
+ DST_R_OPENSSLFAILURE));
}
SET_FLAGS(rsa);
#if USE_EVP
@@ -1009,6 +1011,7 @@ opensslrsa_tofile(const dst_key_t *key, const char *directory) {
rsa = key->keydata.rsa;
#endif
+ memset(bufs, 0, sizeof(bufs));
for (i = 0; i < 8; i++) {
bufs[i] = isc_mem_get(key->mctx, BN_num_bytes(rsa->n));
if (bufs[i] == NULL) {
@@ -1162,7 +1165,7 @@ opensslrsa_parse(dst_key_t *key, isc_lex_t *lexer, dst_key_t *pub) {
/* read private key file */
ret = dst__privstruct_parse(key, DST_ALG_RSA, lexer, mctx, &priv);
if (ret != ISC_R_SUCCESS)
- return (ret);
+ goto err;
for (i = 0; i < priv.nelements; i++) {
switch (priv.elements[i].tag) {
@@ -1188,10 +1191,10 @@ opensslrsa_parse(dst_key_t *key, isc_lex_t *lexer, dst_key_t *pub) {
if (e == NULL)
DST_RET(DST_R_NOENGINE);
pkey = ENGINE_load_private_key(e, label, NULL, NULL);
- if (pkey == NULL) {
- /* ERR_print_errors_fp(stderr); */
- DST_RET(ISC_R_NOTFOUND);
- }
+ if (pkey == NULL)
+ DST_RET(dst__openssl_toresult2(
+ "ENGINE_load_private_key",
+ ISC_R_NOTFOUND));
key->engine = isc_mem_strdup(key->mctx, engine);
if (key->engine == NULL)
DST_RET(ISC_R_NOMEMORY);
@@ -1336,7 +1339,8 @@ opensslrsa_fromlabel(dst_key_t *key, const char *engine, const char *label,
}
pkey = ENGINE_load_private_key(e, label, NULL, NULL);
if (pkey == NULL)
- DST_RET(ISC_R_NOTFOUND);
+ DST_RET(dst__openssl_toresult2("ENGINE_load_private_key",
+ ISC_R_NOTFOUND));
if (engine != NULL) {
key->engine = isc_mem_strdup(key->mctx, engine);
if (key->engine == NULL)
diff --git a/contrib/bind9/lib/dns/rbtdb.c b/contrib/bind9/lib/dns/rbtdb.c
index a2523ba..ef721b8 100644
--- a/contrib/bind9/lib/dns/rbtdb.c
+++ b/contrib/bind9/lib/dns/rbtdb.c
@@ -113,6 +113,8 @@ typedef isc_uint32_t rbtdb_rdatatype_t;
RBTDB_RDATATYPE_VALUE(dns_rdatatype_rrsig, dns_rdatatype_cname)
#define RBTDB_RDATATYPE_SIGDNAME \
RBTDB_RDATATYPE_VALUE(dns_rdatatype_rrsig, dns_rdatatype_dname)
+#define RBTDB_RDATATYPE_SIGDDS \
+ RBTDB_RDATATYPE_VALUE(dns_rdatatype_rrsig, dns_rdatatype_ds)
#define RBTDB_RDATATYPE_NCACHEANY \
RBTDB_RDATATYPE_VALUE(0, dns_rdatatype_any)
@@ -4572,7 +4574,7 @@ get_rpz_enabled(dns_db_t *db, dns_rpz_st_t *st)
* configured earlier than this policy zone and does not have a higher
* precedence type.
*/
-static isc_result_t
+static void
rpz_findips(dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type,
dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version,
dns_rdataset_t *ardataset, dns_rpz_st_t *st,
@@ -4597,7 +4599,7 @@ rpz_findips(dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type,
if (rbtdb->rpz_cidr == NULL) {
RWUNLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
- return (ISC_R_UNEXPECTED);
+ return;
}
dns_fixedname_init(&selfnamef);
@@ -4659,7 +4661,7 @@ rpz_findips(dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type,
dns_name_format(qname, namebuf, sizeof(namebuf));
isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ,
DNS_LOGMODULE_RBTDB, DNS_RPZ_ERROR_LEVEL,
- "rpz_findips findnode(%s): %s",
+ "rpz_findips findnode(%s) failed: %s",
namebuf, isc_result_totext(result));
continue;
}
@@ -4680,7 +4682,8 @@ rpz_findips(dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type,
if (zrdataset.type != dns_rdatatype_cname) {
rpz_policy = DNS_RPZ_POLICY_RECORD;
} else {
- rpz_policy = dns_rpz_decode_cname(&zrdataset,
+ rpz_policy = dns_rpz_decode_cname(rpz,
+ &zrdataset,
selfname);
if (rpz_policy == DNS_RPZ_POLICY_RECORD ||
rpz_policy == DNS_RPZ_POLICY_WILDCNAME)
@@ -4738,7 +4741,7 @@ rpz_findips(dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type,
st->m.type = rpz_type;
st->m.prefix = prefix;
st->m.policy = rpz_policy;
- st->m.ttl = ttl;
+ st->m.ttl = ISC_MIN(ttl, rpz->max_policy_ttl);
st->m.result = result;
dns_name_copy(qname, st->qname, NULL);
if ((rpz_policy == DNS_RPZ_POLICY_RECORD ||
@@ -4755,7 +4758,6 @@ rpz_findips(dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type,
}
RWUNLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
- return (ISC_R_SUCCESS);
}
#endif
@@ -5914,13 +5916,12 @@ add(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
negtype = 0;
if (rbtversion == NULL && !newheader_nx) {
rdtype = RBTDB_RDATATYPE_BASE(newheader->type);
+ covers = RBTDB_RDATATYPE_EXT(newheader->type);
+ sigtype = RBTDB_RDATATYPE_VALUE(dns_rdatatype_rrsig, covers);
if (NEGATIVE(newheader)) {
/*
* We're adding a negative cache entry.
*/
- covers = RBTDB_RDATATYPE_EXT(newheader->type);
- sigtype = RBTDB_RDATATYPE_VALUE(dns_rdatatype_rrsig,
- covers);
for (topheader = rbtnode->data;
topheader != NULL;
topheader = topheader->next) {
@@ -5953,14 +5954,20 @@ add(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
* We're adding something that isn't a
* negative cache entry. Look for an extant
* non-stale NXDOMAIN/NODATA(QTYPE=ANY) negative
- * cache entry.
+ * cache entry. If we're adding an RRSIG, also
+ * check for an extant non-stale NODATA ncache
+ * entry which covers the same type as the RRSIG.
*/
for (topheader = rbtnode->data;
topheader != NULL;
topheader = topheader->next) {
- if (topheader->type ==
- RBTDB_RDATATYPE_NCACHEANY)
- break;
+ if ((topheader->type ==
+ RBTDB_RDATATYPE_NCACHEANY) ||
+ (newheader->type == sigtype &&
+ topheader->type ==
+ RBTDB_RDATATYPE_VALUE(0, covers))) {
+ break;
+ }
}
if (topheader != NULL && EXISTS(topheader) &&
topheader->rdh_ttl > now) {
@@ -5983,7 +5990,7 @@ add(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
}
/*
* The new rdataset is better. Expire the
- * NXDOMAIN/NODATA(QTYPE=ANY).
+ * ncache entry.
*/
set_ttl(rbtdb, topheader, 0);
topheader->attributes |= RDATASET_ATTR_STALE;
@@ -6145,7 +6152,9 @@ add(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
}
if (IS_CACHE(rbtdb) && header->rdh_ttl > now &&
(header->type == dns_rdatatype_a ||
- header->type == dns_rdatatype_aaaa) &&
+ header->type == dns_rdatatype_aaaa ||
+ header->type == dns_rdatatype_ds ||
+ header->type == RBTDB_RDATATYPE_SIGDDS) &&
!header_nx && !newheader_nx &&
header->trust >= newheader->trust &&
dns_rdataslab_equal((unsigned char *)header,
diff --git a/contrib/bind9/lib/dns/rcode.c b/contrib/bind9/lib/dns/rcode.c
index 09f6d83..0b7fe8c 100644
--- a/contrib/bind9/lib/dns/rcode.c
+++ b/contrib/bind9/lib/dns/rcode.c
@@ -108,6 +108,8 @@
{ DNS_KEYALG_RSASHA256, "RSASHA256", 0 }, \
{ DNS_KEYALG_RSASHA512, "RSASHA512", 0 }, \
{ DNS_KEYALG_ECCGOST, "ECCGOST", 0 }, \
+ { DNS_KEYALG_ECDSA256, "ECDSAP256SHA256", 0 }, \
+ { DNS_KEYALG_ECDSA384, "ECDSAP384SHA384", 0 }, \
{ DNS_KEYALG_INDIRECT, "INDIRECT", 0 }, \
{ DNS_KEYALG_PRIVATEDNS, "PRIVATEDNS", 0 }, \
{ DNS_KEYALG_PRIVATEOID, "PRIVATEOID", 0 }, \
diff --git a/contrib/bind9/lib/dns/rdata.c b/contrib/bind9/lib/dns/rdata.c
index d200f1b..60890e0 100644
--- a/contrib/bind9/lib/dns/rdata.c
+++ b/contrib/bind9/lib/dns/rdata.c
@@ -436,6 +436,8 @@ dns_rdata_fromwire(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
REQUIRE(DNS_RDATA_INITIALIZED(rdata));
REQUIRE(DNS_RDATA_VALIDFLAGS(rdata));
}
+ REQUIRE(source != NULL);
+ REQUIRE(target != NULL);
if (type == 0)
return (DNS_R_FORMERR);
@@ -536,13 +538,11 @@ rdata_validate(isc_buffer_t *src, isc_buffer_t *dest, dns_rdataclass_t rdclass,
dns_rdatatype_t type)
{
dns_decompress_t dctx;
- dns_rdata_t rdata = DNS_RDATA_INIT;
isc_result_t result;
dns_decompress_init(&dctx, -1, DNS_DECOMPRESS_NONE);
isc_buffer_setactive(src, isc_buffer_usedlength(src));
- result = dns_rdata_fromwire(&rdata, rdclass, type, src,
- &dctx, 0, dest);
+ result = dns_rdata_fromwire(NULL, rdclass, type, src, &dctx, 0, dest);
dns_decompress_invalidate(&dctx);
return (result);
@@ -1167,7 +1167,8 @@ txt_fromwire(isc_buffer_t *source, isc_buffer_t *target) {
if (n > tregion.length)
return (ISC_R_NOSPACE);
- memcpy(tregion.base, sregion.base, n);
+ if (tregion.base != sregion.base)
+ memcpy(tregion.base, sregion.base, n);
isc_buffer_forward(source, n);
isc_buffer_add(target, n);
return (ISC_R_SUCCESS);
@@ -1341,7 +1342,8 @@ mem_tobuffer(isc_buffer_t *target, void *base, unsigned int length) {
isc_buffer_availableregion(target, &tr);
if (length > tr.length)
return (ISC_R_NOSPACE);
- memcpy(tr.base, base, length);
+ if (tr.base != base)
+ memcpy(tr.base, base, length);
isc_buffer_add(target, length);
return (ISC_R_SUCCESS);
}
diff --git a/contrib/bind9/lib/dns/rdata/generic/dlv_32769.c b/contrib/bind9/lib/dns/rdata/generic/dlv_32769.c
index f447e7c..4dbcb1e 100644
--- a/contrib/bind9/lib/dns/rdata/generic/dlv_32769.c
+++ b/contrib/bind9/lib/dns/rdata/generic/dlv_32769.c
@@ -84,6 +84,9 @@ fromtext_dlv(ARGS_FROMTEXT) {
case DNS_DSDIGEST_GOST:
length = ISC_GOST_DIGESTLENGTH;
break;
+ case DNS_DSDIGEST_SHA384:
+ length = ISC_SHA384_DIGESTLENGTH;
+ break;
default:
length = -1;
break;
@@ -162,7 +165,9 @@ fromwire_dlv(ARGS_FROMWIRE) {
(sr.base[3] == DNS_DSDIGEST_SHA256 &&
sr.length < 4 + ISC_SHA256_DIGESTLENGTH) ||
(sr.base[3] == DNS_DSDIGEST_GOST &&
- sr.length < 4 + ISC_GOST_DIGESTLENGTH))
+ sr.length < 4 + ISC_GOST_DIGESTLENGTH) ||
+ (sr.base[3] == DNS_DSDIGEST_SHA384 &&
+ sr.length < 4 + ISC_SHA384_DIGESTLENGTH))
return (ISC_R_UNEXPECTEDEND);
/*
@@ -176,6 +181,8 @@ fromwire_dlv(ARGS_FROMWIRE) {
sr.length = 4 + ISC_SHA256_DIGESTLENGTH;
else if (sr.base[3] == DNS_DSDIGEST_GOST)
sr.length = 4 + ISC_GOST_DIGESTLENGTH;
+ else if (sr.base[3] == DNS_DSDIGEST_SHA384)
+ sr.length = 4 + ISC_SHA384_DIGESTLENGTH;
isc_buffer_forward(source, sr.length);
return (mem_tobuffer(target, sr.base, sr.length));
@@ -228,6 +235,9 @@ fromstruct_dlv(ARGS_FROMSTRUCT) {
case DNS_DSDIGEST_GOST:
REQUIRE(dlv->length == ISC_GOST_DIGESTLENGTH);
break;
+ case DNS_DSDIGEST_SHA384:
+ REQUIRE(dlv->length == ISC_SHA384_DIGESTLENGTH);
+ break;
}
UNUSED(type);
diff --git a/contrib/bind9/lib/dns/rdata/generic/ds_43.c b/contrib/bind9/lib/dns/rdata/generic/ds_43.c
index cece442..20bac85 100644
--- a/contrib/bind9/lib/dns/rdata/generic/ds_43.c
+++ b/contrib/bind9/lib/dns/rdata/generic/ds_43.c
@@ -84,6 +84,9 @@ fromtext_ds(ARGS_FROMTEXT) {
case DNS_DSDIGEST_GOST:
length = ISC_GOST_DIGESTLENGTH;
break;
+ case DNS_DSDIGEST_SHA384:
+ length = ISC_SHA384_DIGESTLENGTH;
+ break;
default:
length = -1;
break;
@@ -162,7 +165,9 @@ fromwire_ds(ARGS_FROMWIRE) {
(sr.base[3] == DNS_DSDIGEST_SHA256 &&
sr.length < 4 + ISC_SHA256_DIGESTLENGTH) ||
(sr.base[3] == DNS_DSDIGEST_GOST &&
- sr.length < 4 + ISC_GOST_DIGESTLENGTH))
+ sr.length < 4 + ISC_GOST_DIGESTLENGTH) ||
+ (sr.base[3] == DNS_DSDIGEST_SHA384 &&
+ sr.length < 4 + ISC_SHA384_DIGESTLENGTH))
return (ISC_R_UNEXPECTEDEND);
/*
@@ -176,6 +181,8 @@ fromwire_ds(ARGS_FROMWIRE) {
sr.length = 4 + ISC_SHA256_DIGESTLENGTH;
else if (sr.base[3] == DNS_DSDIGEST_GOST)
sr.length = 4 + ISC_GOST_DIGESTLENGTH;
+ else if (sr.base[3] == DNS_DSDIGEST_SHA384)
+ sr.length = 4 + ISC_SHA384_DIGESTLENGTH;
isc_buffer_forward(source, sr.length);
return (mem_tobuffer(target, sr.base, sr.length));
@@ -228,6 +235,9 @@ fromstruct_ds(ARGS_FROMSTRUCT) {
case DNS_DSDIGEST_GOST:
REQUIRE(ds->length == ISC_GOST_DIGESTLENGTH);
break;
+ case DNS_DSDIGEST_SHA384:
+ REQUIRE(ds->length == ISC_SHA384_DIGESTLENGTH);
+ break;
}
UNUSED(type);
diff --git a/contrib/bind9/lib/dns/rdataset.c b/contrib/bind9/lib/dns/rdataset.c
index 8c86549..026d771 100644
--- a/contrib/bind9/lib/dns/rdataset.c
+++ b/contrib/bind9/lib/dns/rdataset.c
@@ -26,6 +26,7 @@
#include <isc/buffer.h>
#include <isc/mem.h>
#include <isc/random.h>
+#include <isc/serial.h>
#include <isc/util.h>
#include <dns/name.h>
@@ -772,3 +773,30 @@ dns_rdataset_expire(dns_rdataset_t *rdataset) {
if (rdataset->methods->expire != NULL)
(rdataset->methods->expire)(rdataset);
}
+
+void
+dns_rdataset_trimttl(dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset,
+ dns_rdata_rrsig_t *rrsig, isc_stdtime_t now,
+ isc_boolean_t acceptexpired)
+{
+ isc_uint32_t ttl = 0;
+
+ REQUIRE(DNS_RDATASET_VALID(rdataset));
+ REQUIRE(DNS_RDATASET_VALID(sigrdataset));
+ REQUIRE(rrsig != NULL);
+
+ /*
+ * If we accept expired RRsets keep them for no more than 120 seconds.
+ */
+ if (acceptexpired &&
+ (isc_serial_le(rrsig->timeexpire, ((now + 120) & 0xffffffff)) ||
+ isc_serial_le(rrsig->timeexpire, now)))
+ ttl = 120;
+ else if (isc_serial_ge(rrsig->timeexpire, now))
+ ttl = rrsig->timeexpire - now;
+
+ ttl = ISC_MIN(ISC_MIN(rdataset->ttl, sigrdataset->ttl),
+ ISC_MIN(rrsig->originalttl, ttl));
+ rdataset->ttl = ttl;
+ sigrdataset->ttl = ttl;
+}
diff --git a/contrib/bind9/lib/dns/resolver.c b/contrib/bind9/lib/dns/resolver.c
index 4c8b144..503f1d2 100644
--- a/contrib/bind9/lib/dns/resolver.c
+++ b/contrib/bind9/lib/dns/resolver.c
@@ -105,8 +105,21 @@
#define QTRACE(m)
#endif
+#define US_PER_SEC 1000000U
+/*
+ * The maximum time we will wait for a single query.
+ */
+#define MAX_SINGLE_QUERY_TIMEOUT 9U
+#define MAX_SINGLE_QUERY_TIMEOUT_US (MAX_SINGLE_QUERY_TIMEOUT*US_PER_SEC)
+
+/*
+ * We need to allow a individual query time to complete / timeout.
+ */
+#define MINIMUM_QUERY_TIMEOUT (MAX_SINGLE_QUERY_TIMEOUT + 1U)
+
+/* The default time in seconds for the whole query to live. */
#ifndef DEFAULT_QUERY_TIMEOUT
-#define DEFAULT_QUERY_TIMEOUT 30 /* The default time in seconds for the whole query to live. */
+#define DEFAULT_QUERY_TIMEOUT MINIMUM_QUERY_TIMEOUT
#endif
#ifndef MAXIMUM_QUERY_TIMEOUT
@@ -821,8 +834,8 @@ fctx_cancelquery(resquery_t **queryp, dns_dispatchevent_t **deventp,
*/
INSIST(no_response);
rtt = query->addrinfo->srtt + 200000;
- if (rtt > 10000000)
- rtt = 10000000;
+ if (rtt > MAX_SINGLE_QUERY_TIMEOUT_US)
+ rtt = MAX_SINGLE_QUERY_TIMEOUT_US;
/*
* Replace the current RTT with our value.
*/
@@ -1336,12 +1349,18 @@ fctx_setretryinterval(fetchctx_t *fctx, unsigned int rtt) {
us = (800000 << (fctx->restarts - 2));
/*
- * Double the round-trip time.
+ * Add a fudge factor to the expected rtt based on the current
+ * estimate.
*/
- rtt *= 2;
+ if (rtt < 50000)
+ rtt += 50000;
+ else if (rtt < 100000)
+ rtt += 100000;
+ else
+ rtt += 200000;
/*
- * Always wait for at least the doubled round-trip time.
+ * Always wait for at least the expected rtt.
*/
if (us < rtt)
us = rtt;
@@ -1349,11 +1368,11 @@ fctx_setretryinterval(fetchctx_t *fctx, unsigned int rtt) {
/*
* But don't ever wait for more than 10 seconds.
*/
- if (us > 10000000)
- us = 10000000;
+ if (us > MAX_SINGLE_QUERY_TIMEOUT_US)
+ us = MAX_SINGLE_QUERY_TIMEOUT_US;
- seconds = us / 1000000;
- us -= seconds * 1000000;
+ seconds = us / US_PER_SEC;
+ us -= seconds * US_PER_SEC;
isc_interval_set(&fctx->interval, seconds, us * 1000);
}
@@ -1375,6 +1394,11 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
task = res->buckets[fctx->bucketnum].task;
srtt = addrinfo->srtt;
+
+ /*
+ * A forwarder needs to make multiple queries. Give it at least
+ * a second to do these in.
+ */
if (ISFORWARDER(addrinfo) && srtt < 1000000)
srtt = 1000000;
@@ -8211,8 +8235,8 @@ dns_resolver_logfetch(dns_fetch_t *fetch, isc_log_t *lctx,
"timeout:%u,lame:%u,neterr:%u,badresp:%u,"
"adberr:%u,findfail:%u,valfail:%u]",
__FILE__, fctx->exitline, fctx->info,
- fctx->duration / 1000000,
- fctx->duration % 1000000,
+ fctx->duration / US_PER_SEC,
+ fctx->duration % US_PER_SEC,
isc_result_totext(fctx->result),
isc_result_totext(fctx->vresult), domainbuf,
fctx->referrals, fctx->restarts,
@@ -8818,6 +8842,8 @@ dns_resolver_settimeout(dns_resolver_t *resolver, unsigned int seconds) {
seconds = DEFAULT_QUERY_TIMEOUT;
if (seconds > MAXIMUM_QUERY_TIMEOUT)
seconds = MAXIMUM_QUERY_TIMEOUT;
+ if (seconds < MINIMUM_QUERY_TIMEOUT)
+ seconds = MINIMUM_QUERY_TIMEOUT;
resolver->query_timeout = seconds;
}
diff --git a/contrib/bind9/lib/dns/rpz.c b/contrib/bind9/lib/dns/rpz.c
index e3f4989..7865859 100644
--- a/contrib/bind9/lib/dns/rpz.c
+++ b/contrib/bind9/lib/dns/rpz.c
@@ -118,9 +118,9 @@ struct dns_rpz_cidr {
isc_mem_t *mctx;
isc_boolean_t have_nsdname; /* zone has NSDNAME record */
dns_rpz_cidr_node_t *root;
- dns_name_t ip_name; /* RPZ_IP_ZONE.LOCALHOST. */
- dns_name_t nsip_name; /* RPZ_NSIP_ZONE.LOCALHOST. */
- dns_name_t nsdname_name; /* RPZ_NSDNAME_ZONE.LOCALHOST */
+ dns_name_t ip_name; /* RPZ_IP_ZONE.origin. */
+ dns_name_t nsip_name; /* RPZ_NSIP_ZONE.origin. */
+ dns_name_t nsdname_name; /* RPZ_NSDNAME_ZONE.origin */
};
static isc_boolean_t have_rpz_zones = ISC_FALSE;
@@ -183,7 +183,7 @@ dns_rpz_policy2str(dns_rpz_policy_t policy) {
str = "NODATA";
break;
case DNS_RPZ_POLICY_RECORD:
- str = "records";
+ str = "Local-Data";
break;
case DNS_RPZ_POLICY_CNAME:
case DNS_RPZ_POLICY_WILDCNAME:
@@ -255,6 +255,8 @@ dns_rpz_view_destroy(dns_view_t *view) {
ISC_LIST_UNLINK(view->rpz_zones, zone, link);
if (dns_name_dynamic(&zone->origin))
dns_name_free(&zone->origin, view->mctx);
+ if (dns_name_dynamic(&zone->passthru))
+ dns_name_free(&zone->passthru, view->mctx);
if (dns_name_dynamic(&zone->nsdname))
dns_name_free(&zone->nsdname, view->mctx);
if (dns_name_dynamic(&zone->cname))
@@ -427,14 +429,16 @@ new_node(dns_rpz_cidr_t *cidr, const dns_rpz_cidr_key_t *ip,
}
static void
-badname(int level, dns_name_t *name, const char *comment) {
+badname(int level, dns_name_t *name, const char *str1, const char *str2) {
char printname[DNS_NAME_FORMATSIZE];
- if (isc_log_wouldlog(dns_lctx, level)) {
+ if (level < DNS_RPZ_DEBUG_QUIET
+ && isc_log_wouldlog(dns_lctx, level)) {
dns_name_format(name, printname, sizeof(printname));
isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ,
DNS_LOGMODULE_RBTDB, level,
- "invalid rpz \"%s\"%s", printname, comment);
+ "invalid rpz IP address \"%s\"%s%s",
+ printname, str1, str2);
}
}
@@ -566,11 +570,11 @@ name2ipkey(dns_rpz_cidr_t *cidr, int level, dns_name_t *src_name,
dns_rpz_type_t type, dns_rpz_cidr_key_t *tgt_ip,
dns_rpz_cidr_bits_t *tgt_prefix)
{
- isc_buffer_t buffer;
- unsigned char data[DNS_NAME_MAXWIRE+1];
+ isc_result_t result;
dns_fixedname_t fname;
- dns_name_t *name;
- const char *cp, *end;
+ dns_name_t *ipname;
+ char ipstr[DNS_NAME_FORMATSIZE];
+ const char *prefix_str, *cp, *end;
char *cp2;
int ip_labels;
dns_rpz_cidr_bits_t bits;
@@ -585,37 +589,43 @@ name2ipkey(dns_rpz_cidr_t *cidr, int level, dns_name_t *src_name,
ip_labels -= dns_name_countlabels(&cidr->ip_name);
ip_labels--;
if (ip_labels < 1) {
- badname(level, src_name, ", too short");
+ badname(level, src_name, "; too short", "");
return (ISC_R_FAILURE);
}
/*
- * Get text for the IP address without RPZ_x_ZONE.rpz.LOCALHOST.
+ * Get text for the IP address
*/
dns_fixedname_init(&fname);
- name = dns_fixedname_name(&fname);
+ ipname = dns_fixedname_name(&fname);
dns_name_split(src_name, dns_name_countlabels(&cidr->ip_name),
- name, NULL);
- isc_buffer_init(&buffer, data, sizeof(data));
- dns_name_totext(name, ISC_TRUE, &buffer);
- isc_buffer_putuint8(&buffer, '\0');
- cp = isc_buffer_base(&buffer);
-
- prefix = strtoul(cp, &cp2, 10);
- if (prefix < 1U || prefix > 128U || *cp2 != '.') {
- badname(level, src_name, ", bad prefix length");
+ ipname, NULL);
+ dns_name_format(ipname, ipstr, sizeof(ipstr));
+ end = &ipstr[strlen(ipstr)+1];
+ prefix_str = ipstr;
+
+ prefix = strtoul(prefix_str, &cp2, 10);
+ if (*cp2 != '.') {
+ badname(level, src_name,
+ "; invalid leading prefix length", "");
+ return (ISC_R_FAILURE);
+ }
+ *cp2 = '\0';
+ if (prefix < 1U || prefix > 128U) {
+ badname(level, src_name,
+ "; invalid prefix length of ", prefix_str);
return (ISC_R_FAILURE);
}
cp = cp2+1;
- end = isc_buffer_used(&buffer);
if (ip_labels == 4 && !strchr(cp, 'z')) {
/*
* Convert an IPv4 address
* from the form "prefix.w.z.y.x"
*/
if (prefix > 32U) {
- badname(level, src_name, "; bad IPv4 prefix length");
+ badname(level, src_name,
+ "; invalid IPv4 prefix length of ", prefix_str);
return (ISC_R_FAILURE);
}
prefix += 96;
@@ -627,7 +637,10 @@ name2ipkey(dns_rpz_cidr_t *cidr, int level, dns_name_t *src_name,
for (i = 0; i < 32; i += 8) {
l = strtoul(cp, &cp2, 10);
if (l > 255U || (*cp2 != '.' && *cp2 != '\0')) {
- badname(level, src_name, "; bad IPv4 address");
+ if (*cp2 == '.')
+ *cp2 = '\0';
+ badname(level, src_name,
+ "; invalid IPv4 octet ", cp);
return (ISC_R_FAILURE);
}
tgt_ip->w[3] |= l << i;
@@ -654,7 +667,10 @@ name2ipkey(dns_rpz_cidr_t *cidr, int level, dns_name_t *src_name,
l = strtoul(cp, &cp2, 16);
if (l > 0xffffu ||
(*cp2 != '.' && *cp2 != '\0')) {
- badname(level, src_name, "");
+ if (*cp2 == '.')
+ *cp2 = '\0';
+ badname(level, src_name,
+ "; invalid IPv6 word ", cp);
return (ISC_R_FAILURE);
}
if ((i & 1) == 0)
@@ -667,7 +683,7 @@ name2ipkey(dns_rpz_cidr_t *cidr, int level, dns_name_t *src_name,
}
}
if (cp != end) {
- badname(level, src_name, "");
+ badname(level, src_name, "", "");
return (ISC_R_FAILURE);
}
@@ -681,7 +697,8 @@ name2ipkey(dns_rpz_cidr_t *cidr, int level, dns_name_t *src_name,
i = bits % DNS_RPZ_CIDR_WORD_BITS;
aword = tgt_ip->w[bits / DNS_RPZ_CIDR_WORD_BITS];
if ((aword & ~DNS_RPZ_WORD_MASK(i)) != 0) {
- badname(level, src_name, "; wrong prefix length");
+ badname(level, src_name,
+ "; too small prefix length of ", prefix_str);
return (ISC_R_FAILURE);
}
bits -= i;
@@ -689,13 +706,13 @@ name2ipkey(dns_rpz_cidr_t *cidr, int level, dns_name_t *src_name,
}
/*
- * Convert the IPv6 address back to a canonical policy domain name
+ * Convert the address back to a canonical policy domain name
* to ensure that it is in canonical form.
*/
- if (ISC_R_SUCCESS != ip2name(cidr, tgt_ip, (dns_rpz_cidr_bits_t)prefix,
- type, NULL, name) ||
- !dns_name_equal(src_name, name)) {
- badname(level, src_name, "; not canonical");
+ result = ip2name(cidr, tgt_ip, (dns_rpz_cidr_bits_t) prefix,
+ type, NULL, ipname);
+ if (result != ISC_R_SUCCESS || !dns_name_equal(src_name, ipname)) {
+ badname(level, src_name, "; not canonical", "");
return (ISC_R_FAILURE);
}
@@ -934,6 +951,7 @@ search(dns_rpz_cidr_t *cidr, const dns_rpz_cidr_key_t *tgt_ip,
*/
void
dns_rpz_cidr_addip(dns_rpz_cidr_t *cidr, dns_name_t *name) {
+ isc_result_t result;
dns_rpz_cidr_key_t tgt_ip;
dns_rpz_cidr_bits_t tgt_prefix;
dns_rpz_type_t type;
@@ -956,19 +974,22 @@ dns_rpz_cidr_addip(dns_rpz_cidr_t *cidr, dns_name_t *name) {
case DNS_RPZ_TYPE_BAD:
return;
}
- if (ISC_R_SUCCESS != name2ipkey(cidr, DNS_RPZ_ERROR_LEVEL, name,
- type, &tgt_ip, &tgt_prefix))
+ result = name2ipkey(cidr, DNS_RPZ_ERROR_LEVEL, name,
+ type, &tgt_ip, &tgt_prefix);
+ if (result != ISC_R_SUCCESS)
return;
- if (ISC_R_EXISTS == search(cidr, &tgt_ip, tgt_prefix, type,
- ISC_TRUE, NULL) &&
- isc_log_wouldlog(dns_lctx, DNS_RPZ_ERROR_LEVEL)) {
+ result = search(cidr, &tgt_ip, tgt_prefix, type, ISC_TRUE, NULL);
+ if (result == ISC_R_EXISTS &&
+ isc_log_wouldlog(dns_lctx, DNS_RPZ_ERROR_LEVEL))
+ {
char printname[DNS_NAME_FORMATSIZE];
dns_name_format(name, printname, sizeof(printname));
isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ,
DNS_LOGMODULE_RBTDB, DNS_RPZ_ERROR_LEVEL,
- "duplicate rpz name \"%s\"", printname);
+ "rpz add failed; \"%s\" is a duplicate name",
+ printname);
}
}
@@ -978,6 +999,7 @@ dns_rpz_cidr_addip(dns_rpz_cidr_t *cidr, dns_name_t *name) {
*/
void
dns_rpz_cidr_deleteip(dns_rpz_cidr_t *cidr, dns_name_t *name) {
+ isc_result_t result;
dns_rpz_cidr_key_t tgt_ip;
dns_rpz_cidr_bits_t tgt_prefix;
dns_rpz_type_t type;
@@ -1010,19 +1032,14 @@ dns_rpz_cidr_deleteip(dns_rpz_cidr_t *cidr, dns_name_t *name) {
/*
* Do not get excited about the deletion of interior rbt nodes.
*/
- if (ISC_R_SUCCESS != name2ipkey(cidr, DNS_RPZ_DEBUG_LEVEL3, name,
- type, &tgt_ip, &tgt_prefix))
+ result = name2ipkey(cidr, DNS_RPZ_DEBUG_QUIET, name,
+ type, &tgt_ip, &tgt_prefix);
+ if (result != ISC_R_SUCCESS)
return;
- if (ISC_R_SUCCESS != search(cidr, &tgt_ip, tgt_prefix, type,
- ISC_FALSE, &tgt)) {
- if (isc_log_wouldlog(dns_lctx, DNS_RPZ_ERROR_LEVEL)) {
- char printname[DNS_NAME_FORMATSIZE];
-
- dns_name_format(name, printname, sizeof(printname));
- isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ,
- DNS_LOGMODULE_RBTDB, DNS_RPZ_ERROR_LEVEL,
- "missing rpz node \"%s\"", printname);
- }
+
+ result = search(cidr, &tgt_ip, tgt_prefix, type, ISC_FALSE, &tgt);
+ if (result != ISC_R_SUCCESS) {
+ badname(DNS_RPZ_ERROR_LEVEL, name, "; missing rpz node", "");
return;
}
@@ -1135,7 +1152,9 @@ dns_rpz_cidr_find(dns_rpz_cidr_t *cidr, const isc_netaddr_t *netaddr,
* Translate CNAME rdata to a QNAME response policy action.
*/
dns_rpz_policy_t
-dns_rpz_decode_cname(dns_rdataset_t *rdataset, dns_name_t *selfname) {
+dns_rpz_decode_cname(dns_rpz_zone_t *rpz, dns_rdataset_t *rdataset,
+ dns_name_t *selfname)
+{
dns_rdata_t rdata = DNS_RDATA_INIT;
dns_rdata_cname_t cname;
isc_result_t result;
@@ -1171,7 +1190,13 @@ dns_rpz_decode_cname(dns_rdataset_t *rdataset, dns_name_t *selfname) {
}
/*
- * 128.1.0.127.rpz-ip CNAME 128.1.0.0.127. means "do not rewrite"
+ * CNAME PASSTHRU.origin means "do not rewrite.
+ */
+ if (dns_name_equal(&cname.cname, &rpz->passthru))
+ return (DNS_RPZ_POLICY_PASSTHRU);
+
+ /*
+ * 128.1.0.127.rpz-ip CNAME 128.1.0.0.127. is obsolete PASSTHRU
*/
if (selfname != NULL && dns_name_equal(&cname.cname, selfname))
return (DNS_RPZ_POLICY_PASSTHRU);
diff --git a/contrib/bind9/lib/dns/spnego_asn1.pl b/contrib/bind9/lib/dns/spnego_asn1.pl
index 93dd676..0aaa57f 100755
--- a/contrib/bind9/lib/dns/spnego_asn1.pl
+++ b/contrib/bind9/lib/dns/spnego_asn1.pl
@@ -1,6 +1,6 @@
#!/bin/bin/perl -w
#
-# Copyright (C) 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2006, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/dns/validator.c b/contrib/bind9/lib/dns/validator.c
index 3f9aae7..674675f 100644
--- a/contrib/bind9/lib/dns/validator.c
+++ b/contrib/bind9/lib/dns/validator.c
@@ -2075,15 +2075,13 @@ validate(dns_validator_t *val, isc_boolean_t resume) {
validator_log(val, ISC_LOG_DEBUG(3),
"failed to verify rdataset");
else {
- isc_uint32_t ttl;
isc_stdtime_t now;
isc_stdtime_get(&now);
- ttl = ISC_MIN(event->rdataset->ttl,
- ISC_MIN(val->siginfo->originalttl,
- val->siginfo->timeexpire - now));
- event->rdataset->ttl = ttl;
- event->sigrdataset->ttl = ttl;
+ dns_rdataset_trimttl(event->rdataset,
+ event->sigrdataset,
+ val->siginfo, now,
+ val->view->acceptexpired);
}
if (val->keynode != NULL)
diff --git a/contrib/bind9/lib/dns/view.c b/contrib/bind9/lib/dns/view.c
index 4590693..6750058 100644
--- a/contrib/bind9/lib/dns/view.c
+++ b/contrib/bind9/lib/dns/view.c
@@ -193,6 +193,8 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
view->v4_aaaa = dns_v4_aaaa_ok;
view->v4_aaaa_acl = NULL;
ISC_LIST_INIT(view->rpz_zones);
+ view->rpz_recursive_only = ISC_TRUE;
+ view->rpz_break_dnssec = ISC_FALSE;
dns_fixedname_init(&view->dlv_fixed);
view->managed_keys = NULL;
#ifdef BIND9
diff --git a/contrib/bind9/lib/dns/zone.c b/contrib/bind9/lib/dns/zone.c
index efe31eb..22db239 100644
--- a/contrib/bind9/lib/dns/zone.c
+++ b/contrib/bind9/lib/dns/zone.c
@@ -3082,7 +3082,7 @@ zone_journal(dns_zone_t *zone, dns_diff_t *diff, const char *caller) {
ISC_TRUE, &journal);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "%s:dns_journal_open -> %s\n",
+ "%s:dns_journal_open -> %s",
caller, dns_result_totext(result));
return (result);
}
@@ -3091,7 +3091,7 @@ zone_journal(dns_zone_t *zone, dns_diff_t *diff, const char *caller) {
dns_journal_destroy(&journal);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "%s:dns_journal_write_transaction -> %s\n",
+ "%s:dns_journal_write_transaction -> %s",
caller, dns_result_totext(result));
return (result);
}
@@ -3116,7 +3116,7 @@ add_soa(dns_zone_t *zone, dns_db_t *db) {
result = dns_db_newversion(db, &ver);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "add_soa:dns_db_newversion -> %s\n",
+ "add_soa:dns_db_newversion -> %s",
dns_result_totext(result));
goto failure;
}
@@ -3126,7 +3126,7 @@ add_soa(dns_zone_t *zone, dns_db_t *db) {
0, 0, 0, 0, 0, buf, &rdata);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "add_soa:dns_soa_buildrdata -> %s\n",
+ "add_soa:dns_soa_buildrdata -> %s",
dns_result_totext(result));
goto failure;
}
@@ -3178,7 +3178,7 @@ sync_keyzone(dns_zone_t *zone, dns_db_t *db) {
result = dns_db_newversion(db, &ver);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "sync_keyzone:dns_db_newversion -> %s\n",
+ "sync_keyzone:dns_db_newversion -> %s",
dns_result_totext(result));
goto failure;
}
@@ -4939,7 +4939,7 @@ zone_resigninc(dns_zone_t *zone) {
result = dns_db_newversion(db, &version);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "zone_resigninc:dns_db_newversion -> %s\n",
+ "zone_resigninc:dns_db_newversion -> %s",
dns_result_totext(result));
goto failure;
}
@@ -4948,7 +4948,7 @@ zone_resigninc(dns_zone_t *zone) {
zone_keys, &nkeys);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "zone_resigninc:find_zone_keys -> %s\n",
+ "zone_resigninc:find_zone_keys -> %s",
dns_result_totext(result));
goto failure;
}
@@ -4972,7 +4972,7 @@ zone_resigninc(dns_zone_t *zone) {
result = dns_db_getsigningtime(db, &rdataset, name);
if (result != ISC_R_SUCCESS && result != ISC_R_NOTFOUND) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "zone_resigninc:dns_db_getsigningtime -> %s\n",
+ "zone_resigninc:dns_db_getsigningtime -> %s",
dns_result_totext(result));
}
@@ -4996,7 +4996,7 @@ zone_resigninc(dns_zone_t *zone) {
zone_keys, nkeys, now, ISC_TRUE);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "zone_resigninc:del_sigs -> %s\n",
+ "zone_resigninc:del_sigs -> %s",
dns_result_totext(result));
break;
}
@@ -5006,7 +5006,7 @@ zone_resigninc(dns_zone_t *zone) {
expire, check_ksk, keyset_kskonly);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "zone_resigninc:add_sigs -> %s\n",
+ "zone_resigninc:add_sigs -> %s",
dns_result_totext(result));
break;
}
@@ -5018,7 +5018,7 @@ zone_resigninc(dns_zone_t *zone) {
}
if (result != ISC_R_SUCCESS)
dns_zone_log(zone, ISC_LOG_ERROR,
- "zone_resigninc:dns_db_getsigningtime -> %s\n",
+ "zone_resigninc:dns_db_getsigningtime -> %s",
dns_result_totext(result));
}
@@ -5029,7 +5029,7 @@ zone_resigninc(dns_zone_t *zone) {
&sig_diff, zone_keys, nkeys, now, ISC_TRUE);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "zone_resigninc:del_sigs -> %s\n",
+ "zone_resigninc:del_sigs -> %s",
dns_result_totext(result));
goto failure;
}
@@ -5044,7 +5044,7 @@ zone_resigninc(dns_zone_t *zone) {
result = increment_soa_serial(db, version, &sig_diff, zone->mctx);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "zone_resigninc:increment_soa_serial -> %s\n",
+ "zone_resigninc:increment_soa_serial -> %s",
dns_result_totext(result));
goto failure;
}
@@ -5058,7 +5058,7 @@ zone_resigninc(dns_zone_t *zone) {
soaexpire, check_ksk, keyset_kskonly);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "zone_resigninc:add_sigs -> %s\n",
+ "zone_resigninc:add_sigs -> %s",
dns_result_totext(result));
goto failure;
}
@@ -5753,7 +5753,7 @@ update_sigs(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *version,
zone_keys, nkeys, now, ISC_FALSE);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "update_sigs:del_sigs -> %s\n",
+ "update_sigs:del_sigs -> %s",
dns_result_totext(result));
return (result);
}
@@ -5763,7 +5763,7 @@ update_sigs(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *version,
expire, check_ksk, keyset_kskonly);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "update_sigs:add_sigs -> %s\n",
+ "update_sigs:add_sigs -> %s",
dns_result_totext(result));
return (result);
}
@@ -5848,7 +5848,7 @@ zone_nsec3chain(dns_zone_t *zone) {
result = dns_db_newversion(db, &version);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "zone_nsec3chain:dns_db_newversion -> %s\n",
+ "zone_nsec3chain:dns_db_newversion -> %s",
dns_result_totext(result));
goto failure;
}
@@ -5857,7 +5857,7 @@ zone_nsec3chain(dns_zone_t *zone) {
DNS_MAXZONEKEYS, zone_keys, &nkeys);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "zone_nsec3chain:find_zone_keys -> %s\n",
+ "zone_nsec3chain:find_zone_keys -> %s",
dns_result_totext(result));
goto failure;
}
@@ -6003,7 +6003,7 @@ zone_nsec3chain(dns_zone_t *zone) {
&nsec3_diff);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR, "zone_nsec3chain:"
- "dns_nsec3_addnsec3 -> %s\n",
+ "dns_nsec3_addnsec3 -> %s",
dns_result_totext(result));
goto failure;
}
@@ -6061,7 +6061,7 @@ zone_nsec3chain(dns_zone_t *zone) {
} else if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
"zone_nsec3chain:"
- "dns_dbiterator_next -> %s\n",
+ "dns_dbiterator_next -> %s",
dns_result_totext(result));
goto failure;
} else if (delegation) {
@@ -6119,7 +6119,7 @@ zone_nsec3chain(dns_zone_t *zone) {
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
"zone_nsec3chain:"
- "need_nsec_chain -> %s\n",
+ "need_nsec_chain -> %s",
dns_result_totext(result));
goto failure;
}
@@ -6144,7 +6144,7 @@ zone_nsec3chain(dns_zone_t *zone) {
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
"zone_nsec3chain:"
- "fixup_nsec3param -> %s\n",
+ "fixup_nsec3param -> %s",
dns_result_totext(result));
goto failure;
}
@@ -6159,7 +6159,7 @@ zone_nsec3chain(dns_zone_t *zone) {
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
"zone_nsec3chain:"
- "deletematchingnsec3 -> %s\n",
+ "deletematchingnsec3 -> %s",
dns_result_totext(result));
goto failure;
}
@@ -6260,7 +6260,7 @@ zone_nsec3chain(dns_zone_t *zone) {
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
"zone_nsec3chain:"
- "fixup_nsec3param -> %s\n",
+ "fixup_nsec3param -> %s",
dns_result_totext(result));
goto failure;
}
@@ -6268,7 +6268,7 @@ zone_nsec3chain(dns_zone_t *zone) {
} else if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
"zone_nsec3chain:"
- "dns_dbiterator_next -> %s\n",
+ "dns_dbiterator_next -> %s",
dns_result_totext(result));
goto failure;
} else if (delegation) {
@@ -6305,7 +6305,7 @@ zone_nsec3chain(dns_zone_t *zone) {
result = dns_db_allrdatasets(db, node, version, 0, &iterator);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR, "zone_nsec3chain:"
- "dns_db_allrdatasets -> %s\n",
+ "dns_db_allrdatasets -> %s",
dns_result_totext(result));
goto failure;
}
@@ -6331,7 +6331,7 @@ zone_nsec3chain(dns_zone_t *zone) {
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
"zone_nsec3chain:"
- "updatesecure -> %s\n",
+ "updatesecure -> %s",
dns_result_totext(result));
goto failure;
}
@@ -6344,7 +6344,7 @@ zone_nsec3chain(dns_zone_t *zone) {
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
"zone_nsec3chain:"
- "dns_nsec3_addnsec3s -> %s\n",
+ "dns_nsec3_addnsec3s -> %s",
dns_result_totext(result));
goto failure;
}
@@ -6359,7 +6359,7 @@ zone_nsec3chain(dns_zone_t *zone) {
check_ksk, keyset_kskonly, &sig_diff);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR, "zone_nsec3chain:"
- "update_sigs -> %s\n", dns_result_totext(result));
+ "update_sigs -> %s", dns_result_totext(result));
goto failure;
}
@@ -6372,7 +6372,7 @@ zone_nsec3chain(dns_zone_t *zone) {
check_ksk, keyset_kskonly, &sig_diff);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR, "zone_nsec3chain:"
- "update_sigs -> %s\n", dns_result_totext(result));
+ "update_sigs -> %s", dns_result_totext(result));
goto failure;
}
@@ -6383,7 +6383,7 @@ zone_nsec3chain(dns_zone_t *zone) {
zone->minimum, ISC_FALSE, &nsec_diff);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR, "zone_nsec3chain:"
- "updatesecure -> %s\n",
+ "updatesecure -> %s",
dns_result_totext(result));
goto failure;
}
@@ -6394,7 +6394,7 @@ zone_nsec3chain(dns_zone_t *zone) {
check_ksk, keyset_kskonly, &sig_diff);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR, "zone_nsec3chain:"
- "update_sigs -> %s\n", dns_result_totext(result));
+ "update_sigs -> %s", dns_result_totext(result));
goto failure;
}
@@ -6409,14 +6409,14 @@ zone_nsec3chain(dns_zone_t *zone) {
&sig_diff, zone_keys, nkeys, now, ISC_FALSE);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR, "zone_nsec3chain:"
- "del_sigs -> %s\n", dns_result_totext(result));
+ "del_sigs -> %s", dns_result_totext(result));
goto failure;
}
result = increment_soa_serial(db, version, &sig_diff, zone->mctx);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR, "zone_nsec3chain:"
- "increment_soa_serial -> %s\n",
+ "increment_soa_serial -> %s",
dns_result_totext(result));
goto failure;
}
@@ -6426,7 +6426,7 @@ zone_nsec3chain(dns_zone_t *zone) {
soaexpire, check_ksk, keyset_kskonly);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR, "zone_nsec3chain:"
- "add_sigs -> %s\n", dns_result_totext(result));
+ "add_sigs -> %s", dns_result_totext(result));
goto failure;
}
@@ -6470,7 +6470,7 @@ zone_nsec3chain(dns_zone_t *zone) {
failure:
if (result != ISC_R_SUCCESS)
- dns_zone_log(zone, ISC_LOG_ERROR, "zone_nsec3chain: %s\n",
+ dns_zone_log(zone, ISC_LOG_ERROR, "zone_nsec3chain: %s",
dns_result_totext(result));
/*
* On error roll back the current nsec3chain.
@@ -6673,7 +6673,7 @@ zone_sign(dns_zone_t *zone) {
result = dns_db_newversion(db, &version);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "zone_sign:dns_db_newversion -> %s\n",
+ "zone_sign:dns_db_newversion -> %s",
dns_result_totext(result));
goto failure;
}
@@ -6682,7 +6682,7 @@ zone_sign(dns_zone_t *zone) {
DNS_MAXZONEKEYS, zone_keys, &nkeys);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "zone_sign:find_zone_keys -> %s\n",
+ "zone_sign:find_zone_keys -> %s",
dns_result_totext(result));
goto failure;
}
@@ -6903,7 +6903,7 @@ zone_sign(dns_zone_t *zone) {
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone,
ISC_LOG_ERROR,
- "updatesecure -> %s\n",
+ "updatesecure -> %s",
dns_result_totext(result));
goto failure;
}
@@ -6915,8 +6915,7 @@ zone_sign(dns_zone_t *zone) {
&post_diff);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "updatesignwithkey "
- "-> %s\n",
+ "updatesignwithkey -> %s",
dns_result_totext(result));
goto failure;
}
@@ -6924,7 +6923,7 @@ zone_sign(dns_zone_t *zone) {
goto next_signing;
} else if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "zone_sign:dns_dbiterator_next -> %s\n",
+ "zone_sign:dns_dbiterator_next -> %s",
dns_result_totext(result));
goto failure;
} else if (delegation) {
@@ -6950,7 +6949,7 @@ zone_sign(dns_zone_t *zone) {
check_ksk, keyset_kskonly, &sig_diff);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR, "zone_sign:"
- "update_sigs -> %s\n",
+ "update_sigs -> %s",
dns_result_totext(result));
goto failure;
}
@@ -6970,7 +6969,7 @@ zone_sign(dns_zone_t *zone) {
&sig_diff, zone_keys, nkeys, now, ISC_FALSE);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "zone_sign:del_sigs -> %s\n",
+ "zone_sign:del_sigs -> %s",
dns_result_totext(result));
goto failure;
}
@@ -6978,7 +6977,7 @@ zone_sign(dns_zone_t *zone) {
result = increment_soa_serial(db, version, &sig_diff, zone->mctx);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "zone_sign:increment_soa_serial -> %s\n",
+ "zone_sign:increment_soa_serial -> %s",
dns_result_totext(result));
goto failure;
}
@@ -6992,7 +6991,7 @@ zone_sign(dns_zone_t *zone) {
soaexpire, check_ksk, keyset_kskonly);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "zone_sign:add_sigs -> %s\n",
+ "zone_sign:add_sigs -> %s",
dns_result_totext(result));
goto failure;
}
@@ -8034,7 +8033,7 @@ zone_maintenance(dns_zone_t *zone) {
DNS_ZONE_FLAG(zone, DNS_ZONEFLG_LOADED) &&
DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDDUMP)) {
dumping = was_dumping(zone);
- } else
+ } else
dumping = ISC_TRUE;
UNLOCK_ZONE(zone);
if (!dumping) {
@@ -14008,7 +14007,7 @@ sign_apex(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
zone_keys, &nkeys);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "sign_apex:find_zone_keys -> %s\n",
+ "sign_apex:find_zone_keys -> %s",
dns_result_totext(result));
return (result);
}
@@ -14039,7 +14038,7 @@ sign_apex(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
zone_keys, nkeys, now, ISC_FALSE);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "sign_apex:del_sigs -> %s\n",
+ "sign_apex:del_sigs -> %s",
dns_result_totext(result));
goto failure;
}
@@ -14049,7 +14048,7 @@ sign_apex(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
keyset_kskonly);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "sign_apex:add_sigs -> %s\n",
+ "sign_apex:add_sigs -> %s",
dns_result_totext(result));
goto failure;
}
@@ -14061,7 +14060,7 @@ sign_apex(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
- "sign_apex:update_sigs -> %s\n",
+ "sign_apex:update_sigs -> %s",
dns_result_totext(result));
goto failure;
}
diff --git a/contrib/bind9/lib/export/Makefile.in b/contrib/bind9/lib/export/Makefile.in
index fc9d4ad..1fd7216 100644
--- a/contrib/bind9/lib/export/Makefile.in
+++ b/contrib/bind9/lib/export/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/export/dns/Makefile.in b/contrib/bind9/lib/export/dns/Makefile.in
index cd72988..6df36fe 100644
--- a/contrib/bind9/lib/export/dns/Makefile.in
+++ b/contrib/bind9/lib/export/dns/Makefile.in
@@ -44,7 +44,7 @@ LIBS = @LIBS@
# Alphabetically
OPENSSLLINKOBJS = openssl_link.@O@ openssldh_link.@O@ openssldsa_link.@O@ \
- opensslgost_link.@O@ opensslrsa_link.@O@
+ opensslecdsa_link.@O@ opensslgost_link.@O@ opensslrsa_link.@O@
DSTOBJS = @OPENSSLLINKOBJS@ \
dst_api.@O@ dst_lib.@O@ dst_parse.@O@ dst_result.@O@ \
@@ -72,7 +72,7 @@ OBJS= ${DNSOBJS} ${OTHEROBJS} ${DSTOBJS} ${PORTDNSOBJS}
# Alphabetically
OPENSSLLINKSRCS = openssl_link.c openssldh_link.c openssldsa_link.c \
- opensslgost_link.c opensslrsa_link.c
+ opensslecdsa_link.c opensslgost_link.c opensslrsa_link.c
DSTSRCS = @OPENSSLLINKSRCS@ \
dst_api.c dst_lib.c dst_parse.c \
diff --git a/contrib/bind9/lib/export/dns/include/Makefile.in b/contrib/bind9/lib/export/dns/include/Makefile.in
index 9fc0b66..6bf1205 100644
--- a/contrib/bind9/lib/export/dns/include/Makefile.in
+++ b/contrib/bind9/lib/export/dns/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/export/dns/include/dns/Makefile.in b/contrib/bind9/lib/export/dns/include/dns/Makefile.in
index 2d7f2c7..b7f51b4 100644
--- a/contrib/bind9/lib/export/dns/include/dns/Makefile.in
+++ b/contrib/bind9/lib/export/dns/include/dns/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/export/dns/include/dst/Makefile.in b/contrib/bind9/lib/export/dns/include/dst/Makefile.in
index 259e62e..f6f540a 100644
--- a/contrib/bind9/lib/export/dns/include/dst/Makefile.in
+++ b/contrib/bind9/lib/export/dns/include/dst/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/export/irs/include/irs/Makefile.in b/contrib/bind9/lib/export/irs/include/irs/Makefile.in
index c850757..530e67c 100644
--- a/contrib/bind9/lib/export/irs/include/irs/Makefile.in
+++ b/contrib/bind9/lib/export/irs/include/irs/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/export/isc/Makefile.in b/contrib/bind9/lib/export/isc/Makefile.in
index a55a1f4..86726ab 100644
--- a/contrib/bind9/lib/export/isc/Makefile.in
+++ b/contrib/bind9/lib/export/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2010 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2010, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/export/isc/include/isc/Makefile.in b/contrib/bind9/lib/export/isc/include/isc/Makefile.in
index 2499185..91f538c 100644
--- a/contrib/bind9/lib/export/isc/include/isc/Makefile.in
+++ b/contrib/bind9/lib/export/isc/include/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/export/isc/nls/Makefile.in b/contrib/bind9/lib/export/isc/nls/Makefile.in
index a9e779f..2515685 100644
--- a/contrib/bind9/lib/export/isc/nls/Makefile.in
+++ b/contrib/bind9/lib/export/isc/nls/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/export/isc/nothreads/Makefile.in b/contrib/bind9/lib/export/isc/nothreads/Makefile.in
index 93b2109..994da63 100644
--- a/contrib/bind9/lib/export/isc/nothreads/Makefile.in
+++ b/contrib/bind9/lib/export/isc/nothreads/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2010 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2010, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/export/isc/nothreads/include/isc/Makefile.in b/contrib/bind9/lib/export/isc/nothreads/include/isc/Makefile.in
index eb25c88..9bda987 100644
--- a/contrib/bind9/lib/export/isc/nothreads/include/isc/Makefile.in
+++ b/contrib/bind9/lib/export/isc/nothreads/include/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/export/isc/pthreads/Makefile.in b/contrib/bind9/lib/export/isc/pthreads/Makefile.in
index 92788ec..f08e5c6 100644
--- a/contrib/bind9/lib/export/isc/pthreads/Makefile.in
+++ b/contrib/bind9/lib/export/isc/pthreads/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/export/isc/pthreads/include/isc/Makefile.in b/contrib/bind9/lib/export/isc/pthreads/include/isc/Makefile.in
index 77d5c07..4319768 100644
--- a/contrib/bind9/lib/export/isc/pthreads/include/isc/Makefile.in
+++ b/contrib/bind9/lib/export/isc/pthreads/include/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/export/isc/unix/Makefile.in b/contrib/bind9/lib/export/isc/unix/Makefile.in
index 5a8eed8..f5cf7e8 100644
--- a/contrib/bind9/lib/export/isc/unix/Makefile.in
+++ b/contrib/bind9/lib/export/isc/unix/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/export/isc/unix/include/isc/Makefile.in b/contrib/bind9/lib/export/isc/unix/include/isc/Makefile.in
index f19b8c6..7159c76 100644
--- a/contrib/bind9/lib/export/isc/unix/include/isc/Makefile.in
+++ b/contrib/bind9/lib/export/isc/unix/include/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/export/isccfg/include/isccfg/Makefile.in b/contrib/bind9/lib/export/isccfg/include/isccfg/Makefile.in
index 5e9ea78..57a344c 100644
--- a/contrib/bind9/lib/export/isccfg/include/isccfg/Makefile.in
+++ b/contrib/bind9/lib/export/isccfg/include/isccfg/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/export/samples/Makefile-postinstall.in b/contrib/bind9/lib/export/samples/Makefile-postinstall.in
index 174aed6..5b1aafb 100644
--- a/contrib/bind9/lib/export/samples/Makefile-postinstall.in
+++ b/contrib/bind9/lib/export/samples/Makefile-postinstall.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/export/samples/Makefile.in b/contrib/bind9/lib/export/samples/Makefile.in
index c60baac..cdc66b1 100644
--- a/contrib/bind9/lib/export/samples/Makefile.in
+++ b/contrib/bind9/lib/export/samples/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/irs/Makefile.in b/contrib/bind9/lib/irs/Makefile.in
index ed86967..d3c47b0 100644
--- a/contrib/bind9/lib/irs/Makefile.in
+++ b/contrib/bind9/lib/irs/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/irs/include/Makefile.in b/contrib/bind9/lib/irs/include/Makefile.in
index eca1945..91099f1 100644
--- a/contrib/bind9/lib/irs/include/Makefile.in
+++ b/contrib/bind9/lib/irs/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/irs/include/irs/Makefile.in b/contrib/bind9/lib/irs/include/irs/Makefile.in
index 3c3b612..63e7fd6 100644
--- a/contrib/bind9/lib/irs/include/irs/Makefile.in
+++ b/contrib/bind9/lib/irs/include/irs/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/alpha/Makefile.in b/contrib/bind9/lib/isc/alpha/Makefile.in
index 324db07..9c24cdf 100644
--- a/contrib/bind9/lib/isc/alpha/Makefile.in
+++ b/contrib/bind9/lib/isc/alpha/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/alpha/include/Makefile.in b/contrib/bind9/lib/isc/alpha/include/Makefile.in
index f1d8bdd..e399559 100644
--- a/contrib/bind9/lib/isc/alpha/include/Makefile.in
+++ b/contrib/bind9/lib/isc/alpha/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/alpha/include/isc/Makefile.in b/contrib/bind9/lib/isc/alpha/include/isc/Makefile.in
index 5f116ca..4927e21 100644
--- a/contrib/bind9/lib/isc/alpha/include/isc/Makefile.in
+++ b/contrib/bind9/lib/isc/alpha/include/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/api b/contrib/bind9/lib/isc/api
index 3b91551..18de29c 100644
--- a/contrib/bind9/lib/isc/api
+++ b/contrib/bind9/lib/isc/api
@@ -3,6 +3,6 @@
# 9.7: 60-79
# 9.8: 80-89
# 9.9: 90-109
-LIBINTERFACE = 83
-LIBREVISION = 5
-LIBAGE = 0
+LIBINTERFACE = 85
+LIBREVISION = 0
+LIBAGE = 1
diff --git a/contrib/bind9/lib/isc/ia64/Makefile.in b/contrib/bind9/lib/isc/ia64/Makefile.in
index 324db07..9c24cdf 100644
--- a/contrib/bind9/lib/isc/ia64/Makefile.in
+++ b/contrib/bind9/lib/isc/ia64/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/ia64/include/Makefile.in b/contrib/bind9/lib/isc/ia64/include/Makefile.in
index f1d8bdd..e399559 100644
--- a/contrib/bind9/lib/isc/ia64/include/Makefile.in
+++ b/contrib/bind9/lib/isc/ia64/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/ia64/include/isc/Makefile.in b/contrib/bind9/lib/isc/ia64/include/isc/Makefile.in
index 5f116ca..4927e21 100644
--- a/contrib/bind9/lib/isc/ia64/include/isc/Makefile.in
+++ b/contrib/bind9/lib/isc/ia64/include/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/ia64/include/isc/atomic.h b/contrib/bind9/lib/isc/ia64/include/isc/atomic.h
index 74df4c5..557941d 100644
--- a/contrib/bind9/lib/isc/ia64/include/isc/atomic.h
+++ b/contrib/bind9/lib/isc/ia64/include/isc/atomic.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2006, 2007, 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/include/Makefile.in b/contrib/bind9/lib/isc/include/Makefile.in
index 04778d7..70c165e 100644
--- a/contrib/bind9/lib/isc/include/Makefile.in
+++ b/contrib/bind9/lib/isc/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/isc/include/isc/file.h b/contrib/bind9/lib/isc/include/isc/file.h
index 8794065..38f78b7 100644
--- a/contrib/bind9/lib/isc/include/isc/file.h
+++ b/contrib/bind9/lib/isc/include/isc/file.h
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <isc/lang.h>
+#include <isc/stat.h>
#include <isc/types.h>
ISC_LANG_BEGINDECLS
@@ -33,6 +34,9 @@ isc_result_t
isc_file_settime(const char *file, isc_time_t *time);
isc_result_t
+isc_file_mode(const char *file, mode_t *modep);
+
+isc_result_t
isc_file_getmodtime(const char *file, isc_time_t *time);
/*!<
* \brief Get the time of last modification of a file.
@@ -97,15 +101,22 @@ isc_file_mktemplate(const char *path, char *buf, size_t buflen);
* of the path with the internal template string.
*/
-
isc_result_t
isc_file_openunique(char *templet, FILE **fp);
isc_result_t
isc_file_openuniqueprivate(char *templet, FILE **fp);
isc_result_t
isc_file_openuniquemode(char *templet, int mode, FILE **fp);
+isc_result_t
+isc_file_bopenunique(char *templet, FILE **fp);
+isc_result_t
+isc_file_bopenuniqueprivate(char *templet, FILE **fp);
+isc_result_t
+isc_file_bopenuniquemode(char *templet, int mode, FILE **fp);
/*!<
* \brief Create and open a file with a unique name based on 'templet'.
+ * isc_file_bopen*() open the file in binary mode in Windows.
+ * isc_file_open*() open the file in text mode in Windows.
*
* Notes:
*\li 'template' is a reserved work in C++. If you want to complain
diff --git a/contrib/bind9/lib/isc/include/isc/namespace.h b/contrib/bind9/lib/isc/include/isc/namespace.h
index 158cfe5..ae1801d 100644
--- a/contrib/bind9/lib/isc/include/isc/namespace.h
+++ b/contrib/bind9/lib/isc/include/isc/namespace.h
@@ -146,6 +146,8 @@
#define isc_task_getcurrenttime isc__task_getcurrenttime
#define isc_taskmgr_create isc__taskmgr_create
#define isc_taskmgr_destroy isc__taskmgr_destroy
+#define isc_taskmgr_setexcltask isc__taskmgr_setexcltask
+#define isc_taskmgr_excltask isc__taskmgr_excltask
#define isc_task_beginexclusive isc__task_beginexclusive
#define isc_task_endexclusive isc__task_endexclusive
diff --git a/contrib/bind9/lib/isc/include/isc/task.h b/contrib/bind9/lib/isc/include/isc/task.h
index 36fca36..19d4783 100644
--- a/contrib/bind9/lib/isc/include/isc/task.h
+++ b/contrib/bind9/lib/isc/include/isc/task.h
@@ -106,6 +106,8 @@ typedef struct isc_taskmgrmethods {
isc_result_t (*taskcreate)(isc_taskmgr_t *manager,
unsigned int quantum,
isc_task_t **taskp);
+ void (*setexcltask)(isc_taskmgr_t *mgr, isc_task_t *task);
+ isc_result_t (*excltask)(isc_taskmgr_t *mgr, isc_task_t **taskp);
} isc_taskmgrmethods_t;
typedef struct isc_taskmethods {
@@ -697,6 +699,31 @@ isc_taskmgr_destroy(isc_taskmgr_t **managerp);
* have been freed.
*/
+void
+isc_taskmgr_setexcltask(isc_taskmgr_t *mgr, isc_task_t *task);
+/*%<
+ * Set a task which will be used for all task-exclusive operations.
+ *
+ * Requires:
+ *\li 'manager' is a valid task manager.
+ *
+ *\li 'task' is a valid task.
+ */
+
+isc_result_t
+isc_taskmgr_excltask(isc_taskmgr_t *mgr, isc_task_t **taskp);
+/*%<
+ * Attach '*taskp' to the task set by isc_taskmgr_getexcltask().
+ * This task should be used whenever running in task-exclusive mode,
+ * so as to prevent deadlock between two exclusive tasks.
+ *
+ * Requires:
+ *\li 'manager' is a valid task manager.
+
+ *\li taskp != NULL && *taskp == NULL
+ */
+
+
#ifdef HAVE_LIBXML2
void
diff --git a/contrib/bind9/lib/isc/mem.c b/contrib/bind9/lib/isc/mem.c
index 5b4b16c..1964b7a 100644
--- a/contrib/bind9/lib/isc/mem.c
+++ b/contrib/bind9/lib/isc/mem.c
@@ -1191,7 +1191,7 @@ isc___mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size FLARG) {
oldsize -= ALIGNMENT_SIZE;
INSIST(oldsize == size);
}
- isc_mem_free((isc_mem_t *)ctx, ptr);
+ isc__mem_free((isc_mem_t *)ctx, ptr FLARG_PASS);
MCTXLOCK(ctx, &ctx->lock);
ctx->references--;
@@ -1327,7 +1327,7 @@ isc___mem_put(isc_mem_t *ctx0, void *ptr, size_t size FLARG) {
oldsize -= ALIGNMENT_SIZE;
INSIST(oldsize == size);
}
- isc_mem_free((isc_mem_t *)ctx, ptr);
+ isc__mem_free((isc_mem_t *)ctx, ptr FLARG_PASS);
return;
}
@@ -1592,7 +1592,11 @@ isc___mem_reallocate(isc_mem_t *ctx0, void *ptr, size_t size FLARG) {
oldsize = (((size_info *)ptr)[-1]).u.size;
INSIST(oldsize >= ALIGNMENT_SIZE);
oldsize -= ALIGNMENT_SIZE;
- copysize = oldsize > size ? size : oldsize;
+ if ((isc_mem_debugging & ISC_MEM_DEBUGCTX) != 0) {
+ INSIST(oldsize >= ALIGNMENT_SIZE);
+ oldsize -= ALIGNMENT_SIZE;
+ }
+ copysize = (oldsize > size) ? size : oldsize;
memcpy(new_ptr, ptr, copysize);
isc__mem_free(ctx0, ptr FLARG_PASS);
}
diff --git a/contrib/bind9/lib/isc/mips/Makefile.in b/contrib/bind9/lib/isc/mips/Makefile.in
index 324db07..9c24cdf 100644
--- a/contrib/bind9/lib/isc/mips/Makefile.in
+++ b/contrib/bind9/lib/isc/mips/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/mips/include/Makefile.in b/contrib/bind9/lib/isc/mips/include/Makefile.in
index f1d8bdd..e399559 100644
--- a/contrib/bind9/lib/isc/mips/include/Makefile.in
+++ b/contrib/bind9/lib/isc/mips/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/mips/include/isc/Makefile.in b/contrib/bind9/lib/isc/mips/include/isc/Makefile.in
index 5f116ca..4927e21 100644
--- a/contrib/bind9/lib/isc/mips/include/isc/Makefile.in
+++ b/contrib/bind9/lib/isc/mips/include/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/nls/Makefile.in b/contrib/bind9/lib/isc/nls/Makefile.in
index aca4a27..7bacf1c 100644
--- a/contrib/bind9/lib/isc/nls/Makefile.in
+++ b/contrib/bind9/lib/isc/nls/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1999-2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/isc/noatomic/Makefile.in b/contrib/bind9/lib/isc/noatomic/Makefile.in
index 324db07..9c24cdf 100644
--- a/contrib/bind9/lib/isc/noatomic/Makefile.in
+++ b/contrib/bind9/lib/isc/noatomic/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/noatomic/include/Makefile.in b/contrib/bind9/lib/isc/noatomic/include/Makefile.in
index f1d8bdd..e399559 100644
--- a/contrib/bind9/lib/isc/noatomic/include/Makefile.in
+++ b/contrib/bind9/lib/isc/noatomic/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/noatomic/include/isc/Makefile.in b/contrib/bind9/lib/isc/noatomic/include/isc/Makefile.in
index 5f116ca..4927e21 100644
--- a/contrib/bind9/lib/isc/noatomic/include/isc/Makefile.in
+++ b/contrib/bind9/lib/isc/noatomic/include/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/nothreads/Makefile.in b/contrib/bind9/lib/isc/nothreads/Makefile.in
index 7e7abd6..540b243 100644
--- a/contrib/bind9/lib/isc/nothreads/Makefile.in
+++ b/contrib/bind9/lib/isc/nothreads/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007, 2009, 2010 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2009, 2010, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000, 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/isc/nothreads/include/Makefile.in b/contrib/bind9/lib/isc/nothreads/include/Makefile.in
index a52310a..662a72d 100644
--- a/contrib/bind9/lib/isc/nothreads/include/Makefile.in
+++ b/contrib/bind9/lib/isc/nothreads/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000, 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/isc/nothreads/include/isc/Makefile.in b/contrib/bind9/lib/isc/nothreads/include/isc/Makefile.in
index 3c9eab0..a2c347e 100644
--- a/contrib/bind9/lib/isc/nothreads/include/isc/Makefile.in
+++ b/contrib/bind9/lib/isc/nothreads/include/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000, 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/isc/powerpc/Makefile.in b/contrib/bind9/lib/isc/powerpc/Makefile.in
index 324db07..9c24cdf 100644
--- a/contrib/bind9/lib/isc/powerpc/Makefile.in
+++ b/contrib/bind9/lib/isc/powerpc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/powerpc/include/Makefile.in b/contrib/bind9/lib/isc/powerpc/include/Makefile.in
index f1d8bdd..e399559 100644
--- a/contrib/bind9/lib/isc/powerpc/include/Makefile.in
+++ b/contrib/bind9/lib/isc/powerpc/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/powerpc/include/isc/Makefile.in b/contrib/bind9/lib/isc/powerpc/include/isc/Makefile.in
index 5f116ca..4927e21 100644
--- a/contrib/bind9/lib/isc/powerpc/include/isc/Makefile.in
+++ b/contrib/bind9/lib/isc/powerpc/include/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/pthreads/Makefile.in b/contrib/bind9/lib/isc/pthreads/Makefile.in
index d6e7c76..9f66ef3 100644
--- a/contrib/bind9/lib/isc/pthreads/Makefile.in
+++ b/contrib/bind9/lib/isc/pthreads/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/isc/pthreads/condition.c b/contrib/bind9/lib/isc/pthreads/condition.c
index 50281a2..9053cf0 100644
--- a/contrib/bind9/lib/isc/pthreads/condition.c
+++ b/contrib/bind9/lib/isc/pthreads/condition.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -43,7 +43,14 @@ isc_condition_waituntil(isc_condition_t *c, isc_mutex_t *m, isc_time_t *t) {
* POSIX defines a timespec's tv_sec as time_t.
*/
result = isc_time_secondsastimet(t, &ts.tv_sec);
- if (result != ISC_R_SUCCESS)
+
+ /*
+ * If we have a range error ts.tv_sec is most probably a signed
+ * 32 bit value. Set ts.tv_sec to INT_MAX. This is a kludge.
+ */
+ if (result == ISC_R_RANGE)
+ ts.tv_sec = INT_MAX;
+ else if (result != ISC_R_SUCCESS)
return (result);
/*!
diff --git a/contrib/bind9/lib/isc/pthreads/include/Makefile.in b/contrib/bind9/lib/isc/pthreads/include/Makefile.in
index 0303ab1..46c243e 100644
--- a/contrib/bind9/lib/isc/pthreads/include/Makefile.in
+++ b/contrib/bind9/lib/isc/pthreads/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/isc/pthreads/include/isc/Makefile.in b/contrib/bind9/lib/isc/pthreads/include/isc/Makefile.in
index 11675ec..7cadcf4 100644
--- a/contrib/bind9/lib/isc/pthreads/include/isc/Makefile.in
+++ b/contrib/bind9/lib/isc/pthreads/include/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/isc/sparc64/Makefile.in b/contrib/bind9/lib/isc/sparc64/Makefile.in
index 324db07..9c24cdf 100644
--- a/contrib/bind9/lib/isc/sparc64/Makefile.in
+++ b/contrib/bind9/lib/isc/sparc64/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/sparc64/include/Makefile.in b/contrib/bind9/lib/isc/sparc64/include/Makefile.in
index f1d8bdd..e399559 100644
--- a/contrib/bind9/lib/isc/sparc64/include/Makefile.in
+++ b/contrib/bind9/lib/isc/sparc64/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/sparc64/include/isc/Makefile.in b/contrib/bind9/lib/isc/sparc64/include/isc/Makefile.in
index 5f116ca..4927e21 100644
--- a/contrib/bind9/lib/isc/sparc64/include/isc/Makefile.in
+++ b/contrib/bind9/lib/isc/sparc64/include/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/task.c b/contrib/bind9/lib/isc/task.c
index f4e1265..a5f6ef9 100644
--- a/contrib/bind9/lib/isc/task.c
+++ b/contrib/bind9/lib/isc/task.c
@@ -152,6 +152,7 @@ struct isc__taskmgr {
unsigned int tasks_running;
isc_boolean_t exclusive_requested;
isc_boolean_t exiting;
+ isc__task_t *excl;
#ifdef USE_SHARED_MANAGER
unsigned int refs;
#endif /* ISC_PLATFORM_USETHREADS */
@@ -221,6 +222,10 @@ isc__taskmgr_create(isc_mem_t *mctx, unsigned int workers,
unsigned int default_quantum, isc_taskmgr_t **managerp);
ISC_TASKFUNC_SCOPE void
isc__taskmgr_destroy(isc_taskmgr_t **managerp);
+ISC_TASKFUNC_SCOPE void
+isc__taskmgr_setexcltask(isc_taskmgr_t *mgr0, isc_task_t *task0);
+ISC_TASKFUNC_SCOPE isc_result_t
+isc__taskmgr_excltask(isc_taskmgr_t *mgr0, isc_task_t **taskp);
ISC_TASKFUNC_SCOPE isc_result_t
isc__task_beginexclusive(isc_task_t *task);
ISC_TASKFUNC_SCOPE void
@@ -261,7 +266,9 @@ static struct isc__taskmethods {
static isc_taskmgrmethods_t taskmgrmethods = {
isc__taskmgr_destroy,
- isc__task_create
+ isc__task_create,
+ isc__taskmgr_setexcltask,
+ isc__taskmgr_excltask
};
/***
@@ -1262,6 +1269,7 @@ isc__taskmgr_create(isc_mem_t *mctx, unsigned int workers,
manager->tasks_running = 0;
manager->exclusive_requested = ISC_FALSE;
manager->exiting = ISC_FALSE;
+ manager->excl = NULL;
isc_mem_attach(mctx, &manager->mctx);
@@ -1344,6 +1352,12 @@ isc__taskmgr_destroy(isc_taskmgr_t **managerp) {
*/
/*
+ * Detach the exclusive task before acquiring the manager lock
+ */
+ if (manager->excl != NULL)
+ isc__task_detach((isc_task_t **) &manager->excl);
+
+ /*
* Unlike elsewhere, we're going to hold this lock a long time.
* We need to do so, because otherwise the list of tasks could
* change while we were traversing it.
@@ -1440,12 +1454,41 @@ isc__taskmgr_dispatch(isc_taskmgr_t *manager0) {
#endif /* USE_WORKER_THREADS */
+ISC_TASKFUNC_SCOPE void
+isc__taskmgr_setexcltask(isc_taskmgr_t *mgr0, isc_task_t *task0) {
+ isc__taskmgr_t *mgr = (isc__taskmgr_t *) mgr0;
+ isc__task_t *task = (isc__task_t *) task0;
+
+ REQUIRE(VALID_MANAGER(mgr));
+ REQUIRE(VALID_TASK(task));
+ if (mgr->excl != NULL)
+ isc__task_detach((isc_task_t **) &mgr->excl);
+ isc__task_attach(task0, (isc_task_t **) &mgr->excl);
+}
+
+ISC_TASKFUNC_SCOPE isc_result_t
+isc__taskmgr_excltask(isc_taskmgr_t *mgr0, isc_task_t **taskp) {
+ isc__taskmgr_t *mgr = (isc__taskmgr_t *) mgr0;
+
+ REQUIRE(VALID_MANAGER(mgr));
+ REQUIRE(taskp != NULL && *taskp == NULL);
+
+ if (mgr->excl == NULL)
+ return (ISC_R_NOTFOUND);
+
+ isc__task_attach((isc_task_t *) mgr->excl, taskp);
+ return (ISC_R_SUCCESS);
+}
+
ISC_TASKFUNC_SCOPE isc_result_t
isc__task_beginexclusive(isc_task_t *task0) {
#ifdef USE_WORKER_THREADS
isc__task_t *task = (isc__task_t *)task0;
isc__taskmgr_t *manager = task->manager;
+
REQUIRE(task->state == task_state_running);
+ /* XXX: Require task == manager->excl? */
+
LOCK(&manager->lock);
if (manager->exclusive_requested) {
UNLOCK(&manager->lock);
diff --git a/contrib/bind9/lib/isc/task_api.c b/contrib/bind9/lib/isc/task_api.c
index 551d0d37..06a8d24 100644
--- a/contrib/bind9/lib/isc/task_api.c
+++ b/contrib/bind9/lib/isc/task_api.c
@@ -187,6 +187,17 @@ isc_task_purge(isc_task_t *task, void *sender, isc_eventtype_t type, void *tag)
return (task->methods->purgeevents(task, sender, type, tag));
}
+void
+isc_taskmgr_setexcltask(isc_taskmgr_t *mgr, isc_task_t *task) {
+ REQUIRE(ISCAPI_TASK_VALID(task));
+ return (mgr->methods->setexcltask(mgr, task));
+}
+
+isc_result_t
+isc_taskmgr_excltask(isc_taskmgr_t *mgr, isc_task_t **taskp) {
+ return (mgr->methods->excltask(mgr, taskp));
+}
+
isc_result_t
isc_task_beginexclusive(isc_task_t *task) {
REQUIRE(ISCAPI_TASK_VALID(task));
diff --git a/contrib/bind9/lib/isc/unix/Makefile.in b/contrib/bind9/lib/isc/unix/Makefile.in
index 9884ca9..c1411cb 100644
--- a/contrib/bind9/lib/isc/unix/Makefile.in
+++ b/contrib/bind9/lib/isc/unix/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/isc/unix/file.c b/contrib/bind9/lib/isc/unix/file.c
index 0538761..99c02ec 100644
--- a/contrib/bind9/lib/isc/unix/file.c
+++ b/contrib/bind9/lib/isc/unix/file.c
@@ -98,6 +98,20 @@ file_stats(const char *file, struct stat *stats) {
}
isc_result_t
+isc_file_mode(const char *file, mode_t *modep) {
+ isc_result_t result;
+ struct stat stats;
+
+ REQUIRE(modep != NULL);
+
+ result = file_stats(file, &stats);
+ if (result == ISC_R_SUCCESS)
+ *modep = (stats.st_mode & 07777);
+
+ return (result);
+}
+
+isc_result_t
isc_file_getmodtime(const char *file, isc_time_t *time) {
isc_result_t result;
struct stat stats;
@@ -313,6 +327,23 @@ isc_file_openuniquemode(char *templet, int mode, FILE **fp) {
}
isc_result_t
+isc_file_bopenunique(char *templet, FILE **fp) {
+ int mode = S_IWUSR|S_IRUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH;
+ return (isc_file_openuniquemode(templet, mode, fp));
+}
+
+isc_result_t
+isc_file_bopenuniqueprivate(char *templet, FILE **fp) {
+ int mode = S_IWUSR|S_IRUSR;
+ return (isc_file_openuniquemode(templet, mode, fp));
+}
+
+isc_result_t
+isc_file_bopenuniquemode(char *templet, int mode, FILE **fp) {
+ return (isc_file_openuniquemode(templet, mode, fp));
+}
+
+isc_result_t
isc_file_remove(const char *filename) {
int r;
diff --git a/contrib/bind9/lib/isc/unix/include/Makefile.in b/contrib/bind9/lib/isc/unix/include/Makefile.in
index 0303ab1..46c243e 100644
--- a/contrib/bind9/lib/isc/unix/include/Makefile.in
+++ b/contrib/bind9/lib/isc/unix/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/isc/unix/include/isc/Makefile.in b/contrib/bind9/lib/isc/unix/include/isc/Makefile.in
index 2f4d216..d3b5084 100644
--- a/contrib/bind9/lib/isc/unix/include/isc/Makefile.in
+++ b/contrib/bind9/lib/isc/unix/include/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/isc/x86_32/Makefile.in b/contrib/bind9/lib/isc/x86_32/Makefile.in
index 324db07..9c24cdf 100644
--- a/contrib/bind9/lib/isc/x86_32/Makefile.in
+++ b/contrib/bind9/lib/isc/x86_32/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/x86_32/include/Makefile.in b/contrib/bind9/lib/isc/x86_32/include/Makefile.in
index f1d8bdd..e399559 100644
--- a/contrib/bind9/lib/isc/x86_32/include/Makefile.in
+++ b/contrib/bind9/lib/isc/x86_32/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/x86_32/include/isc/Makefile.in b/contrib/bind9/lib/isc/x86_32/include/isc/Makefile.in
index 5f116ca..4927e21 100644
--- a/contrib/bind9/lib/isc/x86_32/include/isc/Makefile.in
+++ b/contrib/bind9/lib/isc/x86_32/include/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/x86_64/Makefile.in b/contrib/bind9/lib/isc/x86_64/Makefile.in
index 324db07..9c24cdf 100644
--- a/contrib/bind9/lib/isc/x86_64/Makefile.in
+++ b/contrib/bind9/lib/isc/x86_64/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/x86_64/include/Makefile.in b/contrib/bind9/lib/isc/x86_64/include/Makefile.in
index f1d8bdd..e399559 100644
--- a/contrib/bind9/lib/isc/x86_64/include/Makefile.in
+++ b/contrib/bind9/lib/isc/x86_64/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isc/x86_64/include/isc/Makefile.in b/contrib/bind9/lib/isc/x86_64/include/isc/Makefile.in
index f33ae99..9a988bb 100644
--- a/contrib/bind9/lib/isc/x86_64/include/isc/Makefile.in
+++ b/contrib/bind9/lib/isc/x86_64/include/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/contrib/bind9/lib/isccc/api b/contrib/bind9/lib/isccc/api
index a629bf7..ba19dd9 100644
--- a/contrib/bind9/lib/isccc/api
+++ b/contrib/bind9/lib/isccc/api
@@ -4,5 +4,5 @@
# 9.8: 80-89
# 9.9: 90-109
LIBINTERFACE = 80
-LIBREVISION = 1
+LIBREVISION = 2
LIBAGE = 0
diff --git a/contrib/bind9/lib/isccc/cc.c b/contrib/bind9/lib/isccc/cc.c
index b549d6cb..1ab9479 100644
--- a/contrib/bind9/lib/isccc/cc.c
+++ b/contrib/bind9/lib/isccc/cc.c
@@ -399,8 +399,6 @@ table_fromwire(isccc_region_t *source, isccc_region_t *secret,
first_tag = ISC_FALSE;
}
- *alistp = alist;
-
if (secret != NULL) {
if (checksum_rstart != NULL)
result = verify(alist, checksum_rstart,
@@ -412,7 +410,9 @@ table_fromwire(isccc_region_t *source, isccc_region_t *secret,
result = ISC_R_SUCCESS;
bad:
- if (result != ISC_R_SUCCESS)
+ if (result == ISC_R_SUCCESS)
+ *alistp = alist;
+ else
isccc_sexpr_free(&alist);
return (result);
diff --git a/contrib/bind9/lib/isccc/include/Makefile.in b/contrib/bind9/lib/isccc/include/Makefile.in
index 9f727c3..6b222a5 100644
--- a/contrib/bind9/lib/isccc/include/Makefile.in
+++ b/contrib/bind9/lib/isccc/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/isccc/include/isccc/Makefile.in b/contrib/bind9/lib/isccc/include/isccc/Makefile.in
index ae5bec7..c4af19a 100644
--- a/contrib/bind9/lib/isccc/include/isccc/Makefile.in
+++ b/contrib/bind9/lib/isccc/include/isccc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/isccfg/api b/contrib/bind9/lib/isccfg/api
index 9f3d38c..cde1e2f 100644
--- a/contrib/bind9/lib/isccfg/api
+++ b/contrib/bind9/lib/isccfg/api
@@ -4,5 +4,5 @@
# 9.8: 80-89
# 9.9: 90-109
LIBINTERFACE = 82
-LIBREVISION = 2
+LIBREVISION = 3
LIBAGE = 0
diff --git a/contrib/bind9/lib/isccfg/include/Makefile.in b/contrib/bind9/lib/isccfg/include/Makefile.in
index 1f24003..5c6976a 100644
--- a/contrib/bind9/lib/isccfg/include/Makefile.in
+++ b/contrib/bind9/lib/isccfg/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/isccfg/include/isccfg/Makefile.in b/contrib/bind9/lib/isccfg/include/isccfg/Makefile.in
index a6fd412..211583a 100644
--- a/contrib/bind9/lib/isccfg/include/isccfg/Makefile.in
+++ b/contrib/bind9/lib/isccfg/include/isccfg/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2005, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001, 2002 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/isccfg/namedconf.c b/contrib/bind9/lib/isccfg/namedconf.c
index 3f9454d..4d09f11 100644
--- a/contrib/bind9/lib/isccfg/namedconf.c
+++ b/contrib/bind9/lib/isccfg/namedconf.c
@@ -1014,66 +1014,60 @@ static cfg_type_t cfg_type_masterformat = {
-/*
+/*%
* response-policy {
* zone <string> [ policy (given|disabled|passthru|
- * nxdomain|nodata|cname <domain> ) ];
- * };
- *
- * this is a chimera of doc_optional_keyvalue() and cfg_doc_enum()
+ * nxdomain|nodata|cname <domain> ) ]
+ * [ recursive-only yes|no ]
+ * [ max-policy-ttl number ] ;
+ * } [ recursive-only yes|no ] [ break-dnssec yes|no ]
+ * [ max-policy-ttl number ] ;
*/
+
static void
-doc_rpz_policies(cfg_printer_t *pctx, const cfg_type_t *type) {
- const keyword_type_t *kw;
+doc_rpz_policy(cfg_printer_t *pctx, const cfg_type_t *type) {
const char * const *p;
-
- kw = type->of;
- cfg_print_chars(pctx, "[ ", 2);
- cfg_print_cstr(pctx, kw->name);
- cfg_print_chars(pctx, " ", 1);
-
+ /*
+ * This is cfg_doc_enum() without the trailing " )".
+ */
cfg_print_chars(pctx, "( ", 2);
- for (p = kw->type->of; *p != NULL; p++) {
+ for (p = type->of; *p != NULL; p++) {
cfg_print_cstr(pctx, *p);
if (p[1] != NULL)
cfg_print_chars(pctx, " | ", 3);
}
}
-/*
- * print_qstring() from parser.c
- */
-static void
-print_rpz_cname(cfg_printer_t *pctx, const cfg_obj_t *obj)
-{
- cfg_print_chars(pctx, "\"", 1);
- cfg_print_ustring(pctx, obj);
- cfg_print_chars(pctx, "\"", 1);
-}
-
static void
doc_rpz_cname(cfg_printer_t *pctx, const cfg_type_t *type) {
cfg_doc_terminal(pctx, type);
- cfg_print_chars(pctx, " ) ]", 4);
+ cfg_print_chars(pctx, " )", 2);
}
+/*
+ * Parse
+ * given|disabled|passthru|nxdomain|nodata|cname <domain>
+ */
static isc_result_t
-parse_rpz(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
+cfg_parse_rpz_policy(cfg_parser_t *pctx, const cfg_type_t *type,
+ cfg_obj_t **ret)
+{
isc_result_t result;
- cfg_obj_t *obj = NULL;
- const cfg_tuplefielddef_t *fields = type->of;
+ cfg_obj_t *obj;
+ const cfg_tuplefielddef_t *fields;
CHECK(cfg_create_tuple(pctx, type, &obj));
+
+ fields = type->of;
CHECK(cfg_parse_obj(pctx, fields[0].type, &obj->value.tuple[0]));
- CHECK(cfg_parse_obj(pctx, fields[1].type, &obj->value.tuple[1]));
/*
* parse cname domain only after "policy cname"
*/
- if (cfg_obj_isvoid(obj->value.tuple[1]) ||
- strcasecmp("cname", cfg_obj_asstring(obj->value.tuple[1]))) {
- CHECK(cfg_parse_void(pctx, NULL, &obj->value.tuple[2]));
+ if (strcasecmp("cname", cfg_obj_asstring(obj->value.tuple[0])) != 0) {
+ CHECK(cfg_parse_void(pctx, NULL, &obj->value.tuple[1]));
} else {
- CHECK(cfg_parse_obj(pctx, fields[2].type, &obj->value.tuple[2]));
+ CHECK(cfg_parse_obj(pctx, fields[1].type,
+ &obj->value.tuple[1]));
}
*ret = obj;
@@ -1084,50 +1078,160 @@ cleanup:
return (result);
}
+/*
+ * Parse a tuple consisting of any kind of required field followed
+ * by 2 or more optional keyvalues that can be in any order.
+ */
+static isc_result_t
+cfg_parse_kv_tuple(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
+ const cfg_tuplefielddef_t *fields, *f;
+ cfg_obj_t *obj;
+ int fn;
+ isc_result_t result;
+
+ obj = NULL;
+ CHECK(cfg_create_tuple(pctx, type, &obj));
+
+ /*
+ * The zone first field is required and always first.
+ */
+ fields = type->of;
+ CHECK(cfg_parse_obj(pctx, fields[0].type, &obj->value.tuple[0]));
+
+ for (;;) {
+ CHECK(cfg_peektoken(pctx, CFG_LEXOPT_QSTRING));
+ if (pctx->token.type != isc_tokentype_string)
+ break;
+
+ for (fn = 1, f = &fields[1]; ; ++fn, ++f) {
+ if (f->name == NULL) {
+ cfg_parser_error(pctx, 0, "unexpected '%s'",
+ TOKEN_STRING(pctx));
+ result = ISC_R_UNEXPECTEDTOKEN;
+ goto cleanup;
+ }
+ if (obj->value.tuple[fn] == NULL &&
+ strcasecmp(f->name, TOKEN_STRING(pctx)) == 0)
+ break;
+ }
+
+ CHECK(cfg_gettoken(pctx, 0));
+ CHECK(cfg_parse_obj(pctx, f->type, &obj->value.tuple[fn]));
+ }
+
+ for (fn = 1, f = &fields[1]; f->name != NULL; ++fn, ++f) {
+ if (obj->value.tuple[fn] == NULL)
+ CHECK(cfg_parse_void(pctx, NULL,
+ &obj->value.tuple[fn]));
+ }
+
+ *ret = obj;
+ return (ISC_R_SUCCESS);
+
+cleanup:
+ CLEANUP_OBJ(obj);
+ return (result);
+}
+
+static void
+cfg_print_kv_tuple(cfg_printer_t *pctx, const cfg_obj_t *obj) {
+ unsigned int i;
+ const cfg_tuplefielddef_t *fields, *f;
+ const cfg_obj_t *fieldobj;
+
+ fields = obj->type->of;
+ for (f = fields, i = 0; f->name != NULL; f++, i++) {
+ fieldobj = obj->value.tuple[i];
+ if (fieldobj->type->print == cfg_print_void)
+ continue;
+ if (i != 0) {
+ cfg_print_chars(pctx, " ", 1);
+ cfg_print_cstr(pctx, f->name);
+ cfg_print_chars(pctx, " ", 1);
+ }
+ cfg_print_obj(pctx, fieldobj);
+ }
+}
+
+static void
+cfg_doc_kv_tuple(cfg_printer_t *pctx, const cfg_type_t *type) {
+ const cfg_tuplefielddef_t *fields, *f;
+
+ fields = type->of;
+ for (f = fields; f->name != NULL; f++) {
+ if (f != fields) {
+ cfg_print_chars(pctx, " [ ", 3);
+ cfg_print_cstr(pctx, f->name);
+ if (f->type->doc != cfg_doc_void)
+ cfg_print_chars(pctx, " ", 1);
+ }
+ cfg_doc_obj(pctx, f->type);
+ if (f != fields)
+ cfg_print_chars(pctx, " ]", 2);
+ }
+}
+
+static keyword_type_t zone_kw = {"zone", &cfg_type_qstring};
+static cfg_type_t cfg_type_rpz_zone = {
+ "zone", parse_keyvalue, print_keyvalue,
+ doc_keyvalue, &cfg_rep_string,
+ &zone_kw
+};
static const char *rpz_policies[] = {
"given", "disabled", "passthru", "no-op", "nxdomain", "nodata",
"cname", NULL
};
-static cfg_type_t cfg_type_rpz_policylist = {
- "policies", cfg_parse_enum, cfg_print_ustring, cfg_doc_enum,
- &cfg_rep_string, &rpz_policies
+static cfg_type_t cfg_type_rpz_policy_name = {
+ "policy name", cfg_parse_enum, cfg_print_ustring,
+ doc_rpz_policy, &cfg_rep_string,
+ &rpz_policies
};
-static keyword_type_t rpz_policies_kw = {
- "policy", &cfg_type_rpz_policylist
+static cfg_type_t cfg_type_rpz_cname = {
+ "quoted_string", cfg_parse_astring, NULL,
+ doc_rpz_cname, &cfg_rep_string,
+ NULL
};
-static cfg_type_t cfg_type_rpz_policy = {
- "optional_policy", parse_optional_keyvalue, print_keyvalue,
- doc_rpz_policies, &cfg_rep_string, &rpz_policies_kw
+static cfg_tuplefielddef_t rpz_policy_fields[] = {
+ { "policy name", &cfg_type_rpz_policy_name, 0 },
+ { "cname", &cfg_type_rpz_cname, 0 },
+ { NULL, NULL, 0 }
};
-static cfg_type_t cfg_type_cname = {
- "domain", cfg_parse_astring, print_rpz_cname, doc_rpz_cname,
- &cfg_rep_string, NULL
+static cfg_type_t cfg_type_rpz_policy = {
+ "policy tuple", cfg_parse_rpz_policy,
+ cfg_print_tuple, cfg_doc_tuple, &cfg_rep_tuple,
+ rpz_policy_fields
};
-static cfg_tuplefielddef_t rpzone_fields[] = {
- { "name", &cfg_type_astring, 0 },
+static cfg_tuplefielddef_t rpz_zone_fields[] = {
+ { "zone name", &cfg_type_rpz_zone, 0 },
{ "policy", &cfg_type_rpz_policy, 0 },
- { "cname", &cfg_type_cname, 0 },
+ { "recursive-only", &cfg_type_boolean, 0 },
+ { "max-policy-ttl", &cfg_type_uint32, 0 },
{ NULL, NULL, 0 }
};
-static cfg_type_t cfg_type_rpzone = {
- "rpzone", parse_rpz, cfg_print_tuple, cfg_doc_tuple,
- &cfg_rep_tuple, rpzone_fields
+static cfg_type_t cfg_type_rpz_tuple = {
+ "rpz tuple", cfg_parse_kv_tuple,
+ cfg_print_kv_tuple, cfg_doc_kv_tuple, &cfg_rep_tuple,
+ rpz_zone_fields
};
-static cfg_clausedef_t rpz_clauses[] = {
- { "zone", &cfg_type_rpzone, CFG_CLAUSEFLAG_MULTI },
- { NULL, NULL, 0 }
+static cfg_type_t cfg_type_rpz_list = {
+ "zone list", cfg_parse_bracketed_list, cfg_print_bracketed_list,
+ cfg_doc_bracketed_list, &cfg_rep_list,
+ &cfg_type_rpz_tuple
};
-static cfg_clausedef_t *rpz_clausesets[] = {
- rpz_clauses,
- NULL
+static cfg_tuplefielddef_t rpz_fields[] = {
+ { "zone list", &cfg_type_rpz_list, 0 },
+ { "recursive-only", &cfg_type_boolean, 0 },
+ { "break-dnssec", &cfg_type_boolean, 0 },
+ { "max-policy-ttl", &cfg_type_uint32, 0 },
+ { NULL, NULL, 0 }
};
static cfg_type_t cfg_type_rpz = {
- "rpz", cfg_parse_map, cfg_print_map, cfg_doc_map,
- &cfg_rep_map, rpz_clausesets
+ "rpz", cfg_parse_kv_tuple,
+ cfg_print_kv_tuple, cfg_doc_kv_tuple, &cfg_rep_tuple,
+ rpz_fields
};
-
/*%
* dnssec-lookaside
*/
diff --git a/contrib/bind9/lib/lwres/Makefile.in b/contrib/bind9/lib/lwres/Makefile.in
index 858b325..0cf873b 100644
--- a/contrib/bind9/lib/lwres/Makefile.in
+++ b/contrib/bind9/lib/lwres/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2005, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000, 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/lwres/api b/contrib/bind9/lib/lwres/api
index ba19dd9..1e51baa 100644
--- a/contrib/bind9/lib/lwres/api
+++ b/contrib/bind9/lib/lwres/api
@@ -4,5 +4,5 @@
# 9.8: 80-89
# 9.9: 90-109
LIBINTERFACE = 80
-LIBREVISION = 2
+LIBREVISION = 3
LIBAGE = 0
diff --git a/contrib/bind9/lib/lwres/getaddrinfo.c b/contrib/bind9/lib/lwres/getaddrinfo.c
index 8e916f3..811a2fe 100644
--- a/contrib/bind9/lib/lwres/getaddrinfo.c
+++ b/contrib/bind9/lib/lwres/getaddrinfo.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* This code is derived from software contributed to ISC by
@@ -398,7 +398,7 @@ lwres_getaddrinfo(const char *hostname, const char *servname,
goto inet6_addr;
}
addrsize = sizeof(struct in_addr);
- addroff = (char *)(&SIN(0)->sin_addr) - (char *)0;
+ addroff = offsetof(struct sockaddr_in, sin_addr);
family = AF_INET;
goto common;
#ifdef LWRES_HAVE_SIN6_SCOPE_ID
@@ -408,7 +408,7 @@ lwres_getaddrinfo(const char *hostname, const char *servname,
if (family && family != AF_INET6)
return (EAI_NONAME);
addrsize = sizeof(struct in6_addr);
- addroff = (char *)(&SIN6(0)->sin6_addr) - (char *)0;
+ addroff = offsetof(struct sockaddr_in6, sin6_addr);
family = AF_INET6;
goto common;
#endif
@@ -417,7 +417,7 @@ lwres_getaddrinfo(const char *hostname, const char *servname,
return (EAI_NONAME);
inet6_addr:
addrsize = sizeof(struct in6_addr);
- addroff = (char *)(&SIN6(0)->sin6_addr) - (char *)0;
+ addroff = offsetof(struct sockaddr_in6, sin6_addr);
family = AF_INET6;
common:
diff --git a/contrib/bind9/lib/lwres/include/Makefile.in b/contrib/bind9/lib/lwres/include/Makefile.in
index 4750a5e..6c3d07f 100644
--- a/contrib/bind9/lib/lwres/include/Makefile.in
+++ b/contrib/bind9/lib/lwres/include/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000, 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/lwres/include/lwres/Makefile.in b/contrib/bind9/lib/lwres/include/lwres/Makefile.in
index fc3126f..36b8b03 100644
--- a/contrib/bind9/lib/lwres/include/lwres/Makefile.in
+++ b/contrib/bind9/lib/lwres/include/lwres/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000, 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/lib/lwres/man/Makefile.in b/contrib/bind9/lib/lwres/man/Makefile.in
index cb723c2..80db9f2 100644
--- a/contrib/bind9/lib/lwres/man/Makefile.in
+++ b/contrib/bind9/lib/lwres/man/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
diff --git a/contrib/bind9/make/rules.in b/contrib/bind9/make/rules.in
index b952bdb..cd4cf4f 100644
--- a/contrib/bind9/make/rules.in
+++ b/contrib/bind9/make/rules.in
@@ -88,7 +88,7 @@ testdirs:
install:: all
install clean distclean maintainer-clean doc docclean man manclean::
- @for i in ${ALL_SUBDIRS}; do \
+ @for i in ${ALL_SUBDIRS} ${ALL_TESTDIRS}; do \
if [ "$$i" != "nulldir" -a -d $$i ]; then \
echo "making $@ in `pwd`/$$i"; \
(cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" $@) || exit 1; \
diff --git a/contrib/bind9/version b/contrib/bind9/version
index b841ff8..1090bee 100644
--- a/contrib/bind9/version
+++ b/contrib/bind9/version
@@ -5,6 +5,6 @@
#
MAJORVER=9
MINORVER=8
-PATCHVER=3
+PATCHVER=4
RELEASETYPE=-P
-RELEASEVER=4
+RELEASEVER=1
diff --git a/contrib/binutils/Makefile.in b/contrib/binutils/Makefile.in
index e34410c..77716fa 100644
--- a/contrib/binutils/Makefile.in
+++ b/contrib/binutils/Makefile.in
@@ -284,7 +284,7 @@ MAKEINFOFLAGS = --split-size=5000000
AS = @AS@
AR = @AR@
-AR_FLAGS = rc
+ARFLAGS = @ARFLAGS@
CC = @CC@
CXX = @CXX@
DLLTOOL = @DLLTOOL@
@@ -474,7 +474,7 @@ BASE_FLAGS_TO_PASS = \
"SHELL=$(SHELL)" \
"YACC=$(YACC)" \
"`echo 'ADAFLAGS=$(ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
- "AR_FLAGS=$(AR_FLAGS)" \
+ "AR_FLAGS=$(ARFLAGS)" \
"`echo 'BOOT_ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
"BOOT_CFLAGS=$(BOOT_CFLAGS)" \
"BOOT_LDFLAGS=$(BOOT_LDFLAGS)" \
diff --git a/contrib/binutils/Makefile.tpl b/contrib/binutils/Makefile.tpl
index 6164a41..35e6542 100644
--- a/contrib/binutils/Makefile.tpl
+++ b/contrib/binutils/Makefile.tpl
@@ -287,7 +287,7 @@ MAKEINFOFLAGS = --split-size=5000000
AS = @AS@
AR = @AR@
-AR_FLAGS = rc
+ARFLAGS = @ARFLAGS@
CC = @CC@
CXX = @CXX@
DLLTOOL = @DLLTOOL@
diff --git a/contrib/binutils/bfd/elflink.c b/contrib/binutils/bfd/elflink.c
index 331ae4f..44973fe 100644
--- a/contrib/binutils/bfd/elflink.c
+++ b/contrib/binutils/bfd/elflink.c
@@ -10584,6 +10584,7 @@ elf_gc_sweep (bfd *abfd, struct bfd_link_info *info)
{
/* Keep debug and special sections. */
if ((o->flags & (SEC_DEBUGGING | SEC_LINKER_CREATED)) != 0
+ || elf_section_data (o)->this_hdr.sh_type == SHT_NOTE
|| (o->flags & (SEC_ALLOC | SEC_LOAD | SEC_RELOC)) == 0)
o->gc_mark = 1;
diff --git a/contrib/binutils/gas/config/tc-arm.c b/contrib/binutils/gas/config/tc-arm.c
index 1c73f6a..0b18b5b 100644
--- a/contrib/binutils/gas/config/tc-arm.c
+++ b/contrib/binutils/gas/config/tc-arm.c
@@ -20107,6 +20107,7 @@ static const struct arm_option_cpu_value_table arm_fpus[] =
{"softvfp", FPU_ARCH_VFP},
{"softvfp+vfp", FPU_ARCH_VFP_V2},
{"vfp", FPU_ARCH_VFP_V2},
+ {"vfpv2", FPU_ARCH_VFP_V2},
{"vfp9", FPU_ARCH_VFP_V2},
{"vfp3", FPU_ARCH_VFP_V3},
{"vfpv3", FPU_ARCH_VFP_V3},
diff --git a/contrib/binutils/libiberty/Makefile.in b/contrib/binutils/libiberty/Makefile.in
index 735f1e6..58a9afe 100644
--- a/contrib/binutils/libiberty/Makefile.in
+++ b/contrib/binutils/libiberty/Makefile.in
@@ -56,7 +56,7 @@ mkinstalldirs = $(SHELL) $(libiberty_topdir)/mkinstalldirs
OUTPUT_OPTION = @OUTPUT_OPTION@
AR = @AR@
-AR_FLAGS = rc
+ARFLAGS = @ARFLAGS@
CC = @CC@
CFLAGS = @CFLAGS@
@@ -81,7 +81,7 @@ EXTRA_OFILES =
# Flags to pass to a recursive make.
FLAGS_TO_PASS = \
"AR=$(AR)" \
- "AR_FLAGS=$(AR_FLAGS)" \
+ "AR_FLAGS=$(ARFLAGS)" \
"CC=$(CC)" \
"CFLAGS=$(CFLAGS)" \
"DESTDIR=$(DESTDIR)" \
@@ -224,12 +224,12 @@ INSTALLED_HEADERS = \
$(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
-rm -f $(TARGETLIB) pic/$(TARGETLIB)
- $(AR) $(AR_FLAGS) $(TARGETLIB) \
+ $(AR) $(ARFLAGS) $(TARGETLIB) \
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
$(RANLIB) $(TARGETLIB)
if [ x"$(PICFLAG)" != x ]; then \
cd pic; \
- $(AR) $(AR_FLAGS) $(TARGETLIB) \
+ $(AR) $(ARFLAGS) $(TARGETLIB) \
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
$(RANLIB) $(TARGETLIB); \
cd ..; \
@@ -237,7 +237,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
$(TESTLIB): $(REQUIRED_OFILES) $(CONFIGURED_OFILES)
-rm -f $(TESTLIB)
- $(AR) $(AR_FLAGS) $(TESTLIB) \
+ $(AR) $(ARFLAGS) $(TESTLIB) \
$(REQUIRED_OFILES) $(CONFIGURED_OFILES)
$(RANLIB) $(TESTLIB)
diff --git a/contrib/cvs/diff/Makefile.in b/contrib/cvs/diff/Makefile.in
index e1faff5..0203d12 100644
--- a/contrib/cvs/diff/Makefile.in
+++ b/contrib/cvs/diff/Makefile.in
@@ -41,8 +41,8 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
LIBRARIES = $(noinst_LIBRARIES)
-AR = ar
-ARFLAGS = cru
+AR = @AR@
+ARFLAGS = @ARFLAGS@
libdiff_a_AR = $(AR) $(ARFLAGS)
libdiff_a_LIBADD =
am_libdiff_a_OBJECTS = diff.$(OBJEXT) diff3.$(OBJEXT) \
diff --git a/contrib/cvs/lib/Makefile.in b/contrib/cvs/lib/Makefile.in
index a515d46..2d0b82e 100644
--- a/contrib/cvs/lib/Makefile.in
+++ b/contrib/cvs/lib/Makefile.in
@@ -63,8 +63,8 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = fnmatch.h
LIBRARIES = $(noinst_LIBRARIES)
-AR = ar
-ARFLAGS = cru
+AR = @AR@
+ARFLAGS = @ARFLAGS@
libcvs_a_AR = $(AR) $(ARFLAGS)
libcvs_a_DEPENDENCIES = @LIBOBJS@
am_libcvs_a_OBJECTS = argmatch.$(OBJEXT) getdate.$(OBJEXT) \
diff --git a/contrib/dialog/CHANGES b/contrib/dialog/CHANGES
index ea89632..b839088 100644
--- a/contrib/dialog/CHANGES
+++ b/contrib/dialog/CHANGES
@@ -1,172 +1,9 @@
--- $Id: CHANGES,v 1.419 2012/07/06 18:18:48 tom Exp $
+-- $Id: CHANGES,v 1.360 2011/07/07 23:35:10 tom Exp $
-- Thomas E. Dickey <dickey@invisible-island.net>
This version of dialog was originally from a Debian snapshot. I've done this
to it:
-2012/07/06
- + modify samples/setup-tempfile to work with Tru64's shell.
- + modify inputmenu sample scripts to make them more portable:
- + use "id" rather than "$GROUPS", use sed to work with Solaris.
- + use sed to split-up the rename results to work with HPUX.
- + fix regression in msgbox (ArchLinux #30574)
-
-2012/07/03
- + modify prgbox widget to work with --extra-button, etc.
- + add case values to several widgets to allow for mouse-clicks with
- "--extra-button" and "--help-button" additions.
- + correct timebox widget's exit code for "--extra-button" when handing
- the "enter" key.
- + modify msgbox widget to honor "--extra-button".
- + corrected processing of "--trace" option, which did not update the
- index into command-line to point past its value.
- + add a check in dialog program for valid characters used in option,
- e.g., to generate an error if a script attempts to add option value
- using "=" rather than with whitespace.
- + add new command-line option --default-button and library function
- dlg_default_button() to retrieve the value set by the option
- to provide a way to set the default button directly rather than
- by combining --nook, etc. (patch by Zoltan Kelemen).
- + amend include of unctrl.h to apply only to the case where curses.h
- is included, to avoid conflict of ncurses' unctrl.h with a system
- implementation (report by Martin Roedlach)
- + add limit-check to dlg_toupper() in non-wide curses mode to work
- when non-character values such as arrow-key codes are passed to
- it (patch by Zoltan Kelemen).
- + override timeout value, e.g., as set via --timeout command-line
- option in pause widget because that interferes with pause's behavior
- (report by Jan Spitalnik).
- + modify samples/inputmenu* to allow ":" in renamed text (report by
- Andreas Stoewing).
- + modify double-quoting to make it more consistent, i.e., checklist
- output is quoted only when needed. This fixes the case where
- single-quotes were used whether or not needed, but also modifies
- older checklist behavior for double-quoting which always added those
- (Debian #663664).
- + correct exit-code used in inputmenu for "rename" button (Debian
- #673041, forwarded from Ubuntu #333909, patch by Lebedev Vadim).
- + update el.po and hr.po from
- http://translationproject.org/latest/dialog/
- + use checkbashisms to clean up sample scripts.
-
-2012/02/15
- + modify menubox.c to use the same improvement as in checklist.c
- + improve auto width computation for checklist widget by using
- dlg_calc_list_width as in the non-auto case (Edho Arief).
- + eliminate some bashisms in the sample scripts (Pedro Giffuni).
- + makefile fixes from FreeBSD ports (Li-Wen Hsu):
- + make --with-package option of configure script work.
- + get LIBTOOL_VERSION from configure script, needed by
- ${LIBTOOL_VERSION} in LIBTOOL_CREATE (LIB_CREATE in configure and
- aclocal.m4)
- + update cs.po and sr.po from
- http://translationproject.org/latest/dialog/
- + updated configure script macros, improving CF_XOPEN_SOURCE among
- other fixes.
-
-2011/10/20
- + fix --analyze warnings for clang versions 2.8, 2.9.
- + add configure check for lint program.
- + add check in dlg_getc() in case its window is freed as a side effect
- of removing callbacks.
- + fix logic in freeing subwindows (report by xDog Walker).
- + fix a regression in logic distinguishing between inputmenu and menu
- widgets (report by xDog Walker).
- + minor fixes to library manpage.
-
-2011/10/18
- + modify header-sh.in to work around limit on sed script length on
- HPUX.
- + add a special case of parameter parsing for "--trace" to the
- initialization done before calling init_dialog(), to allow users to
- capture the initial state of the parameter list before any options
- are processed and removed. This is only done if "--trace" is the
- first option, otherwise it is handled in the common options as before
- (report by xDog Walker).
- + modify samples/testdata-8bit, discarding $1 from the parameter list
- if it was used, so that the source'ing scripts can consistently use
- "$@" to insert parameters before the widget, e.g., as an alternative
- to using $DIALOGOPTS (report by xDog Walker).
- + modify treatment of function pointers in menubox.c, make
- dlg_renamed_menutext() and dlg_dummy_menutext() visible to library
- users (request by xDog Walker).
- + add dlg_count_real_columns(), use to modify centering for "--hline"
- text to account for "\Z"s (report by xDog Walker).
- + improve check in dlg_draw_arrows2() for conflict between the window
- title and up-arrow marker to take into account that the given window
- may not be the top-level window of the widget.
- + change width of page up/down mouse areas in fselect panes to use the
- full width of the panes rather than only the portion from the left
- margin to the up/down arrow.
- + add/use dlg_draw_box2() and dlg_draw_bottom_box2() to use the
- secondary borders.
- + modify rc-file read/write to accept/generate color values that refer
- to previously-processed items in the color table. This reduces the
- number of distinct colors that must be specified to set up a color
- scheme.
- + add color table entries for secondary borders, i.e., the ones that
- are normally drawn with the dialog's text-colors (Debian #641168).
- + modify fselect.c to scan the current directory if the input field
- happens to be empty (Debian #640905).
- + repeated the discussion of environment variables that can override
- the exit-status values in the manpage's return-codes section
- (Debian #642105).
- + add an example to the manpage showing how to override the form
- widget's keys used for field/button traversal (Debian #642108).
- + modify call to dlg_register_window() in formbox.c so that the editing
- bindings are attached to the form sub-window rather than the
- top-level dialog window. Also change the name by which the editing
- bindings are bound for editbox.c, fselect.c and inputbox.c, so that
- the editing and navigation bindings can be different.
- + correct logic in dlg_lookup_key() so that it matches the widget name
- before using a binding from .dialogrc, allowing the inner/outer
- windows of form and other editing widgets to have different bindings.
- + modify dlg_register_window() to call dlg_dump_window_keys() after
- its updates, via the --trace output, to supplement the manpage
- description of key bindings (Debian #642108).
- + add DLGK_FORM_PREV and DLGK_FORM_NEXT key-bindings to form.c, to
- allow binding a single key to traverse both form-fields and buttons
- (Debian #642108).
- + modify dlg_parse_rc() to check for error return from
- dlg_parse_bindkey().
- + add function dlg_dump_window_keys(), to help with debugging widgets.
- + add CR, LF, TAB, FF and ESC to table of curses names to help make
- key bindings more readable.
- + update table of dialog key-names so that helpfile and trace are
- dumped properly.
- + correct dlg_dump_keys(), which was showing only the first item in
- the matched binding table.
- + save/restore window current position in dlg_update_mixedgauge().
- + pass return-code from pause_for_ok() from dlg_progressbox() when
- pauseopt is set, rather than only DLG_OK.
- + call setlocale() in init_dialog() rather than relying on on-demand
- use within inputstr.c, since there are paths in textbox widget which
- do not exercise the latter (report by xDog Walker).
- + fix some places where checks for "\Z" were done without also checking
- dialog_vars.colors (report by Moray Henderson).
- + correct logic for DIALOGOPTS parsing so that the parse happens only
- once unless memory leak checking is enabled (report by xDog Walker).
- + remove an incorrect free() call in dlg_free_gauge() (report by xDog
- Walker).
- + modify dlg_trace_win() to log wide-characters (report by xDog Walker).
- + make traces shorter by skipping repeated ERR's, but showing the
- number skipped (report by xDog Walker).
- + improve description in manpage to distinguish program box and
- progress box from tailboxes (adapted from email by xDog Walker).
- + modify dlg_trace_win() so that it looks for the topmost window in a
- dialog. Because subwindows share space with the top window, tracing
- the latter shows the whole widget (report by xDog Walker).
- + expand tracing so that each window is traced before soliciting input,
- making the ^T feature to print a window on demand partly redundant
- (suggested by xDog Walker).
- + cosmetic change in dialog.h to avoid "*/*" strings from comments next
- to "*" (report by xDog Walker).
- + ensure result from dlg_align_columns() has trailing null on each
- string. Analysis was hindered by libc6's continuance of libc5's
- early-1990s misfeature of clearing the result from malloc, noting
- that libc6's documentation incorrectly claims that it does not do
- this (report by xDog Walker).
-
2011/07/07
+ modify util.c to work better with old versions of ncurses:
+ suppress use of wchgat() before fix in 20060715 which is needed
@@ -250,7 +87,7 @@ to it:
+ CF_XOPEN_SOURCE, workaround for cygwin to get ncurses' configure
script to define _XOPEN_SOURCE_EXTENDED (cygwin's features.h
doesn't do anything, so it needs a crutch).
- + update config.guess, config.sub
+ + updated config.guess, config.sub
2011/03/02
+ add --prgbox and --programbox (adapted from patch by David Boyd).
@@ -318,7 +155,7 @@ to it:
CF_ADD_LIBDIR for the curses-directory here, from
CF_NCURSES_CPPFLAGS and CF_NCURSES_LDFLAGS, so it will work even
with the default checking, e.g., no --with-ncurses, etc.
- + update config.guess, config.sub
+ + updated config.guess, config.sub
2010/04/28
+ several improvements to configure script:
@@ -413,7 +250,7 @@ to it:
libutf8 and libiconv.
+ update da.po, ru.po from
http://translationproject.org/latest/dialog/
- + update config.guess, config.sub
+ + updated config.guess, config.sub
2008/08/19
+ amend changes to quoting; by default, the checklist widget quotes its
@@ -496,7 +333,7 @@ to it:
ESC to be returned, quitting dialog (report by Reiner Huober).
+ add extern "C" declarations to dlg_keys.h so the corresponding
function declarations are exported to C++ as C symbols.
- + update config.guess, config.sub
+ + updated config.guess, config.sub
2007/06/04
+ fix a memory leak in editbox.c
@@ -599,7 +436,7 @@ to it:
CF_CURSES_LIBS, CF_INCLUDE_DIRS, CF_LARGEFILE, CF_MAKEFLAGS,
CF_PATH_SYNTAX, CF_SUBDIR_PATH, CF_SUBST, CF_WITH_DBMALLOC,
CF_WITH_DMALLOC, CF_WITH_LIBTOOL and CF_XOPEN_SOURCE.
- + update config.guess, config.sub
+ + updated config.guess, config.sub
> adapted fixes from SuSE package (Werner Fink):
+ add some limit-checks in dlg_draw_shadow().
+ make shadows resizable, using new dlg_move_window() in msgbox.c
diff --git a/contrib/dialog/VERSION b/contrib/dialog/VERSION
index 8c3a188..0462455 100644
--- a/contrib/dialog/VERSION
+++ b/contrib/dialog/VERSION
@@ -1 +1 @@
-10:4:0 1.1 20120706
+10:0:0 1.1 20110707
diff --git a/contrib/dialog/aclocal.m4 b/contrib/dialog/aclocal.m4
index 0c50c22..159b12f 100644
--- a/contrib/dialog/aclocal.m4
+++ b/contrib/dialog/aclocal.m4
@@ -1,7 +1,7 @@
dnl macros used for DIALOG configure script
-dnl $Id: aclocal.m4,v 1.87 2012/02/16 02:11:26 tom Exp $
+dnl $Id: aclocal.m4,v 1.82 2011/06/28 22:48:31 tom Exp $
dnl ---------------------------------------------------------------------------
-dnl Copyright 1999-2011,2012 -- Thomas E. Dickey
+dnl Copyright 1999-2010,2011 -- Thomas E. Dickey
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the
@@ -592,31 +592,6 @@ changequote([,])dnl
AC_SUBST(GENCAT)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ACVERSION_CHECK version: 2 updated: 2011/05/08 11:22:03
-dnl ------------------
-dnl Conditionally generate script according to whether we're using a given autoconf.
-dnl
-dnl $1 = version to compare against
-dnl $2 = code to use if AC_ACVERSION is at least as high as $1.
-dnl $3 = code to use if AC_ACVERSION is older than $1.
-define(CF_ACVERSION_CHECK,
-[
-ifdef([m4_version_compare],
-[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])],
-[CF_ACVERSION_COMPARE(
-AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])),
-AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl
-dnl ---------------------------------------------------------------------------
-dnl CF_ACVERSION_COMPARE version: 2 updated: 2011/04/14 20:56:50
-dnl --------------------
-dnl CF_ACVERSION_COMPARE(MAJOR1, MINOR1, TERNARY1,
-dnl MAJOR2, MINOR2, TERNARY2,
-dnl PRINTABLE2, not FOUND, FOUND)
-define(CF_ACVERSION_COMPARE,
-[ifelse(builtin([eval], [$2 < $5]), 1,
-[ifelse([$8], , ,[$8])],
-[ifelse([$9], , ,[$9])])])dnl
-dnl ---------------------------------------------------------------------------
dnl CF_AC_PREREQ version: 2 updated: 1997/09/06 13:24:56
dnl ------------
dnl Conditionally generate script according to whether we're using the release
@@ -1252,7 +1227,7 @@ fi
AC_CHECK_HEADERS($cf_cv_ncurses_header)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_LIBS version: 35 updated: 2011/08/09 21:06:37
+dnl CF_CURSES_LIBS version: 34 updated: 2011/04/09 14:51:08
dnl --------------
dnl Look for the curses libraries. Older curses implementations may require
dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first.
@@ -1332,7 +1307,7 @@ if test ".$ac_cv_func_initscr" != .yes ; then
# Check for library containing tgoto. Do this before curses library
# because it may be needed to link the test-case for initscr.
AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[
- for cf_term_lib in $cf_check_list otermcap termcap termlib unknown
+ for cf_term_lib in $cf_check_list termcap termlib unknown
do
AC_CHECK_LIB($cf_term_lib,tgoto,[break])
done
@@ -1558,30 +1533,6 @@ fi
test "$cf_cv_curses_wacs_symbols" != no && AC_DEFINE(CURSES_WACS_SYMBOLS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_WGETPARENT version: 2 updated: 2011/10/17 20:12:04
-dnl --------------------
-dnl Check for curses support for directly determining the parent of a given
-dnl window. Some implementations make this difficult, so we provide for
-dnl defining an application-specific function that gives this functionality.
-dnl
-dnl $1 = name of function to use if the feature is missing
-AC_DEFUN([CF_CURSES_WGETPARENT],[
-CF_CURSES_FUNCS(wgetparent)
-if test "x$cf_cv_func_wgetparent" != xyes
-then
- AC_MSG_CHECKING(if WINDOW has _parent member)
- AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>],
- [WINDOW *p = stdscr->_parent],
- [cf_window__parent=yes],
- [cf_window__parent=no])
- AC_MSG_RESULT($cf_window__parent)
- if test "$cf_window__parent" = yes
- then
- AC_DEFINE(HAVE_WINDOW__PARENT)
- fi
-fi
-])dnl
-dnl ---------------------------------------------------------------------------
dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52
dnl ----------
dnl "dirname" is not portable, so we fake it with a shell script.
@@ -2386,7 +2337,7 @@ ifdef([AC_FUNC_FSEEKO],[
])
])
dnl ---------------------------------------------------------------------------
-dnl CF_LD_RPATH_OPT version: 5 updated: 2011/07/17 14:48:41
+dnl CF_LD_RPATH_OPT version: 4 updated: 2011/06/04 20:09:13
dnl ---------------
dnl For the given system and compiler, find the compiler flags to pass to the
dnl loader to use the "rpath" feature.
@@ -2410,7 +2361,7 @@ linux*|gnu*|k*bsd*-gnu) #(vi
openbsd[[2-9]].*|mirbsd*) #(vi
LD_RPATH_OPT="-Wl,-rpath,"
;;
-dragonfly*|freebsd*) #(vi
+freebsd*) #(vi
LD_RPATH_OPT="-rpath "
;;
netbsd*) #(vi
@@ -2469,11 +2420,11 @@ CF_SUBDIR_PATH($1,$2,lib)
$1="$cf_library_path_list [$]$1"
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_LIB_PREFIX version: 9 updated: 2012/01/21 19:28:10
+dnl CF_LIB_PREFIX version: 8 updated: 2008/09/13 11:34:16
dnl -------------
dnl Compute the library-prefix for the given host system
dnl $1 = variable to set
-define([CF_LIB_PREFIX],
+AC_DEFUN([CF_LIB_PREFIX],
[
case $cf_cv_system_name in #(vi
OS/2*|os2*) #(vi
@@ -2694,7 +2645,7 @@ printf("old\n");
,[$1=no])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_NCURSES_CONFIG version: 9 updated: 2011/11/26 15:42:05
+dnl CF_NCURSES_CONFIG version: 8 updated: 2010/07/08 05:17:30
dnl -----------------
dnl Tie together the configure-script macros for ncurses.
dnl Prefer the "-config" script from ncurses 6.x, to simplify analysis.
@@ -2706,10 +2657,7 @@ AC_DEFUN([CF_NCURSES_CONFIG],
cf_ncuconfig_root=ifelse($1,,ncurses,$1)
echo "Looking for ${cf_ncuconfig_root}-config"
-
-CF_ACVERSION_CHECK(2.52,
- [AC_CHECK_TOOLS(NCURSES_CONFIG, ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)],
- [AC_PATH_PROGS(NCURSES_CONFIG, ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)])
+AC_PATH_PROGS(NCURSES_CONFIG,${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config,none)
if test "$NCURSES_CONFIG" != none ; then
@@ -3223,14 +3171,6 @@ AC_SUBST(PROG_EXT)
test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT")
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14
-dnl ------------
-AC_DEFUN([CF_PROG_LINT],
-[
-AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint)
-AC_SUBST(LINT_OPTS)
-])dnl
-dnl ---------------------------------------------------------------------------
dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50
dnl ----------------
dnl Remove all -U and -D options that refer to the given symbol from a list
@@ -3478,45 +3418,6 @@ ncursesw/term.h)
esac
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_TRY_XOPEN_SOURCE version: 1 updated: 2011/10/30 17:09:50
-dnl -------------------
-dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we
-dnl can define it successfully.
-AC_DEFUN([CF_TRY_XOPEN_SOURCE],[
-AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
- AC_TRY_COMPILE([
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-],[
-#ifndef _XOPEN_SOURCE
-make an error
-#endif],
- [cf_cv_xopen_source=no],
- [cf_save="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
- AC_TRY_COMPILE([
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-],[
-#ifdef _XOPEN_SOURCE
-make an error
-#endif],
- [cf_cv_xopen_source=no],
- [cf_cv_xopen_source=$cf_XOPEN_SOURCE])
- CPPFLAGS="$cf_save"
- ])
-])
-
-if test "$cf_cv_xopen_source" != no ; then
- CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE)
- CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE)
- cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
- CF_ADD_CFLAGS($cf_temp_xopen_source)
-fi
-])
-dnl ---------------------------------------------------------------------------
dnl CF_UNION_WAIT version: 5 updated: 1997/11/23 14:49:44
dnl -------------
dnl Check to see if the BSD-style union wait is declared. Some platforms may
@@ -3779,7 +3680,7 @@ if test "$with_dmalloc" = yes ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_WITH_LIBTOOL version: 28 updated: 2011/07/02 15:40:32
+dnl CF_WITH_LIBTOOL version: 27 updated: 2011/06/28 18:45:38
dnl ---------------
dnl Provide a configure option to incorporate libtool. Define several useful
dnl symbols for the makefile rules.
@@ -3880,7 +3781,7 @@ ifdef([AC_PROG_LIBTOOL],[
# special hack to add -no-undefined (which libtool should do for itself)
LT_UNDEF=
case "$cf_cv_system_name" in #(vi
- cygwin*|mingw32*|uwin*|aix[[4-7]]) #(vi
+ cygwin*|mingw32*|uwin*|aix[[456]]) #(vi
LT_UNDEF=-no-undefined
;;
esac
@@ -4049,7 +3950,7 @@ AC_TRY_LINK([
test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 42 updated: 2012/01/07 08:26:49
+dnl CF_XOPEN_SOURCE version: 35 updated: 2011/02/20 20:37:37
dnl ---------------
dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
dnl or adapt to the vendor's definitions to get equivalent functionality,
@@ -4065,7 +3966,7 @@ cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2])
cf_xopen_source=
case $host_os in #(vi
-aix[[4-7]]*) #(vi
+aix[[456]]*) #(vi
cf_xopen_source="-D_ALL_SOURCE"
;;
cygwin) #(vi
@@ -4076,7 +3977,6 @@ darwin[[0-8]].*) #(vi
;;
darwin*) #(vi
cf_xopen_source="-D_DARWIN_C_SOURCE"
- cf_XOPEN_SOURCE=
;;
freebsd*|dragonfly*) #(vi
# 5.x headers associate
@@ -4094,23 +3994,15 @@ hpux*) #(vi
;;
irix[[56]].*) #(vi
cf_xopen_source="-D_SGI_SOURCE"
- cf_XOPEN_SOURCE=
;;
linux*|gnu*|mint*|k*bsd*-gnu) #(vi
CF_GNU_SOURCE
;;
mirbsd*) #(vi
- # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
- cf_XOPEN_SOURCE=
- CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
+ # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
;;
netbsd*) #(vi
- cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
- ;;
-openbsd[[4-9]]*) #(vi
- # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
- cf_xopen_source="-D_BSD_SOURCE"
- cf_XOPEN_SOURCE=600
+ # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
;;
openbsd*) #(vi
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
@@ -4124,46 +4016,42 @@ nto-qnx*) #(vi
sco*) #(vi
# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
;;
-solaris2.*) #(vi
+solaris2.1[[0-9]]) #(vi
+ cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ ;;
+solaris2.[[1-9]]) #(vi
cf_xopen_source="-D__EXTENSIONS__"
;;
*)
- CF_TRY_XOPEN_SOURCE
- CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
- ;;
-esac
-
-if test -n "$cf_xopen_source" ; then
- CF_ADD_CFLAGS($cf_xopen_source)
-fi
-
-dnl In anything but the default case, we may have system-specific setting
-dnl which is still not guaranteed to provide all of the entrypoints that
-dnl _XOPEN_SOURCE would yield.
-if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
- AC_MSG_CHECKING(if _XOPEN_SOURCE really is set)
- AC_TRY_COMPILE([#include <stdlib.h>],[
+ AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
+ AC_TRY_COMPILE([#include <sys/types.h>],[
#ifndef _XOPEN_SOURCE
make an error
#endif],
- [cf_XOPEN_SOURCE_set=yes],
- [cf_XOPEN_SOURCE_set=no])
- AC_MSG_RESULT($cf_XOPEN_SOURCE_set)
- if test $cf_XOPEN_SOURCE_set = yes
- then
- AC_TRY_COMPILE([#include <stdlib.h>],[
-#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
+ [cf_cv_xopen_source=no],
+ [cf_save="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifdef _XOPEN_SOURCE
make an error
#endif],
- [cf_XOPEN_SOURCE_set_ok=yes],
- [cf_XOPEN_SOURCE_set_ok=no])
- if test $cf_XOPEN_SOURCE_set_ok = no
- then
- AC_MSG_WARN(_XOPEN_SOURCE is lower than requested)
- fi
- else
- CF_TRY_XOPEN_SOURCE
+ [cf_cv_xopen_source=no],
+ [cf_cv_xopen_source=$cf_XOPEN_SOURCE])
+ CPPFLAGS="$cf_save"
+ ])
+])
+ if test "$cf_cv_xopen_source" != no ; then
+ CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE)
+ CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE)
+ cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
+ CF_ADD_CFLAGS($cf_temp_xopen_source)
fi
+ CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
+ ;;
+esac
+
+if test -n "$cf_xopen_source" ; then
+ CF_ADD_CFLAGS($cf_xopen_source)
fi
])
dnl ---------------------------------------------------------------------------
diff --git a/contrib/dialog/arrows.c b/contrib/dialog/arrows.c
index ff706ad..6a25fd9 100644
--- a/contrib/dialog/arrows.c
+++ b/contrib/dialog/arrows.c
@@ -1,5 +1,5 @@
/*
- * $Id: arrows.c,v 1.41 2011/10/20 23:37:17 tom Exp $
+ * $Id: arrows.c,v 1.36 2011/06/27 09:13:56 tom Exp $
*
* arrows.c -- draw arrows to indicate end-of-range for lists
*
@@ -79,9 +79,9 @@ dlg_draw_helpline(WINDOW *win, bool decorations)
const int *cols = dlg_index_columns(dialog_vars.help_line);
int other = decorations ? (ON_LEFT + ON_RIGHT) : 0;
int avail = (getmaxx(win) - other - 2);
- int limit = dlg_count_real_columns(dialog_vars.help_line) + 2;
+ int limit = dlg_limit_columns(dialog_vars.help_line, avail, 0);
- if (limit < avail) {
+ if (limit > 0) {
getyx(win, cur_y, cur_x);
other = decorations ? ON_LEFT : 0;
(void) wmove(win, bottom, other + (avail - limit) / 2);
@@ -107,14 +107,13 @@ dlg_draw_arrows2(WINDOW *win,
int cur_x, cur_y;
int limit_x = getmaxx(win);
bool draw_top = TRUE;
- bool is_toplevel = (wgetparent(win) == stdscr);
getyx(win, cur_y, cur_x);
/*
* If we're drawing a centered title, do not overwrite with the arrows.
*/
- if (dialog_vars.title && is_toplevel && (top - getbegy(win)) < MARGIN) {
+ if (dialog_vars.title) {
int have = (limit_x - dlg_count_columns(dialog_vars.title)) / 2;
int need = x + 5;
if (need > have)
@@ -124,11 +123,11 @@ dlg_draw_arrows2(WINDOW *win,
if (draw_top) {
(void) wmove(win, top, x);
if (top_arrow) {
- (void) wattrset(win, merge_colors(uarrow_attr, attr));
+ wattrset(win, merge_colors(uarrow_attr, attr));
(void) add_acs(win, ACS_UARROW);
(void) waddstr(win, "(-)");
} else {
- (void) wattrset(win, attr);
+ wattrset(win, attr);
(void) whline(win, dlg_boxchar(ACS_HLINE), ON_LEFT);
}
}
@@ -136,11 +135,11 @@ dlg_draw_arrows2(WINDOW *win,
(void) wmove(win, bottom, x);
if (bottom_arrow) {
- (void) wattrset(win, merge_colors(darrow_attr, attr));
+ wattrset(win, merge_colors(darrow_attr, attr));
(void) add_acs(win, ACS_DARROW);
(void) waddstr(win, "(+)");
} else {
- (void) wattrset(win, borderattr);
+ wattrset(win, borderattr);
(void) whline(win, dlg_boxchar(ACS_HLINE), ON_LEFT);
}
mouse_mkbutton(bottom, x - 1, 6, KEY_NPAGE);
@@ -148,7 +147,7 @@ dlg_draw_arrows2(WINDOW *win,
(void) wmove(win, cur_y, cur_x);
wrefresh(win);
- (void) wattrset(win, save);
+ wattrset(win, save);
}
void
@@ -167,13 +166,14 @@ dlg_draw_scrollbar(WINDOW *win,
char buffer[80];
int percent;
int len;
- int oldy, oldx;
+ int oldy, oldx, maxy, maxx;
chtype save = dlg_get_attrs(win);
int top_arrow = (first_data != 0);
int bottom_arrow = (next_data < total_data);
getyx(win, oldy, oldx);
+ getmaxyx(win, maxy, maxx);
dlg_draw_helpline(win, TRUE);
if (bottom_arrow || top_arrow || dialog_state.use_scrollbar) {
@@ -187,12 +187,12 @@ dlg_draw_scrollbar(WINDOW *win,
else if (percent > 100)
percent = 100;
- (void) wattrset(win, position_indicator_attr);
+ wattrset(win, position_indicator_attr);
(void) sprintf(buffer, "%d%%", percent);
(void) wmove(win, bottom, right - 7);
(void) waddstr(win, buffer);
if ((len = dlg_count_columns(buffer)) < 4) {
- (void) wattrset(win, border_attr);
+ wattrset(win, border_attr);
whline(win, dlg_boxchar(ACS_HLINE), 4 - len);
}
}
@@ -212,7 +212,7 @@ dlg_draw_scrollbar(WINDOW *win,
if (bar_high < all_high) {
wmove(win, top + 1, right);
- (void) wattrset(win, save);
+ wattrset(win, save);
wvline(win, ACS_VLINE | A_REVERSE, all_high);
bar_y = BARSIZE(this_data);
@@ -221,7 +221,7 @@ dlg_draw_scrollbar(WINDOW *win,
wmove(win, top + 1 + bar_y, right);
- (void) wattrset(win, position_indicator_attr);
+ wattrset(win, position_indicator_attr);
wattron(win, A_REVERSE);
wvline(win, ACS_BLOCK, bar_high);
}
@@ -236,7 +236,7 @@ dlg_draw_scrollbar(WINDOW *win,
attr,
borderattr);
- (void) wattrset(win, save);
+ wattrset(win, save);
wmove(win, oldy, oldx);
}
@@ -255,6 +255,6 @@ dlg_draw_arrows(WINDOW *win,
x,
top,
bottom,
- menubox_border2_attr,
+ menubox_attr,
menubox_border_attr);
}
diff --git a/contrib/dialog/buttons.c b/contrib/dialog/buttons.c
index 1799851..0241060 100644
--- a/contrib/dialog/buttons.c
+++ b/contrib/dialog/buttons.c
@@ -1,9 +1,9 @@
/*
- * $Id: buttons.c,v 1.90 2012/07/01 20:42:05 tom Exp $
+ * $Id: buttons.c,v 1.86 2011/06/28 10:46:46 tom Exp $
*
* buttons.c -- draw buttons, e.g., OK/Cancel
*
- * Copyright 2000-2011,2012 Thomas E. Dickey
+ * Copyright 2000-2010,2011 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -104,11 +104,11 @@ print_button(WINDOW *win, char *label, int y, int x, int selected)
: button_label_inactive_attr);
(void) wmove(win, y, x);
- (void) wattrset(win, selected
- ? button_active_attr
- : button_inactive_attr);
+ wattrset(win, selected
+ ? button_active_attr
+ : button_inactive_attr);
(void) waddstr(win, "<");
- (void) wattrset(win, label_attr);
+ wattrset(win, label_attr);
for (i = 0; i < limit; ++i) {
int first = indx[i];
int last = indx[i + 1];
@@ -120,14 +120,14 @@ print_button(WINDOW *win, char *label, int y, int x, int selected)
const char *temp = (label + first);
int cmp = string_to_char(&temp);
if (dlg_isupper(cmp)) {
- (void) wattrset(win, key_attr);
+ wattrset(win, key_attr);
state = 1;
}
break;
}
#endif
if (dlg_isupper(UCH(label[first]))) {
- (void) wattrset(win, key_attr);
+ wattrset(win, key_attr);
state = 1;
}
break;
@@ -138,9 +138,9 @@ print_button(WINDOW *win, char *label, int y, int x, int selected)
}
waddnstr(win, label + first, last - first);
}
- (void) wattrset(win, selected
- ? button_active_attr
- : button_inactive_attr);
+ wattrset(win, selected
+ ? button_active_attr
+ : button_inactive_attr);
(void) waddstr(win, ">");
(void) wmove(win, y, x + ((int) strspn(label, " ")) + 1);
}
@@ -310,7 +310,7 @@ dlg_draw_buttons(WINDOW *win,
(void) wmove(win, final_y, final_x);
wrefresh(win);
free(buffer);
- (void) wattrset(win, save);
+ wattrset(win, save);
}
/*
@@ -488,12 +488,10 @@ dlg_exit_buttoncode(int button)
const char **
dlg_ok_label(void)
{
- static const char *labels[4];
+ static const char *labels[3];
int n = 0;
labels[n++] = my_ok_label();
- if (dialog_vars.extra_button)
- labels[n++] = my_extra_label();
if (dialog_vars.help_button)
labels[n++] = my_help_label();
labels[n] = 0;
@@ -539,7 +537,6 @@ dlg_ok_buttoncode(int button)
} else if (dialog_vars.help_button && (button == n)) {
result = DLG_EXIT_HELP;
}
- dlg_trace_msg("# dlg_ok_buttoncode(%d) = %d\n", button, result);
return result;
}
@@ -578,7 +575,7 @@ dlg_prev_ok_buttonindex(int current, int extra)
/*
* Find the button-index for the "OK" or "Cancel" button, according to
* whether --defaultno is given. If --nocancel was given, we always return
- * the index for the first button (usually "OK" unless --nook was used).
+ * the index for "OK".
*/
int
dlg_defaultno_button(void)
@@ -589,30 +586,6 @@ dlg_defaultno_button(void)
while (dlg_ok_buttoncode(result) != DLG_EXIT_CANCEL)
++result;
}
- dlg_trace_msg("# dlg_defaultno_button() = %d\n", result);
- return result;
-}
-
-/*
- * Find the button-index for a button named with --default-button. If the
- * option was not specified, or if the selected button does not exist, return
- * the index of the first button (usually "OK" unless --nook was used).
- */
-int
-dlg_default_button(void)
-{
- int i, n;
- int result = 0;
-
- if (dialog_vars.default_button >= 0) {
- for (i = 0; (n = dlg_ok_buttoncode(i)) >= 0; i++) {
- if (n == dialog_vars.default_button) {
- result = i;
- break;
- }
- }
- }
- dlg_trace_msg("# dlg_default_button() = %d\n", result);
return result;
}
diff --git a/contrib/dialog/calendar.c b/contrib/dialog/calendar.c
index dab4617..45a40ab 100644
--- a/contrib/dialog/calendar.c
+++ b/contrib/dialog/calendar.c
@@ -1,9 +1,9 @@
/*
- * $Id: calendar.c,v 1.66 2012/07/01 18:13:07 Zoltan.Kelemen Exp $
+ * $Id: calendar.c,v 1.62 2011/06/29 09:47:06 tom Exp $
*
* calendar.c -- implements the calendar box
*
- * Copyright 2001-2011,2012 Thomas E. Dickey
+ * Copyright 2001-2010,2011 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -225,14 +225,12 @@ draw_day(BOX * data, struct tm *current)
int prev = days_in_month(current, -1);
werase(data->window);
- dlg_draw_box2(data->parent,
- data->y - MARGIN, data->x - MARGIN,
- data->height + (2 * MARGIN), data->width + (2 * MARGIN),
- menubox_attr,
- menubox_border_attr,
- menubox_border2_attr);
-
- (void) wattrset(data->window, menubox_attr); /* daynames headline */
+ dlg_draw_box(data->parent,
+ data->y - MARGIN, data->x - MARGIN,
+ data->height + (2 * MARGIN), data->width + (2 * MARGIN),
+ menubox_border_attr, menubox_attr); /* border of daybox */
+
+ wattrset(data->window, menubox_attr); /* daynames headline */
for (x = 0; x < 7; x++) {
mvwprintw(data->window,
0, (x + 1) * cell_wide, "%*.*s ",
@@ -248,7 +246,7 @@ draw_day(BOX * data, struct tm *current)
week = (current->tm_yday + 6 + mday - current->tm_mday) / 7;
for (y = 1; mday < last; y++) {
- (void) wattrset(data->window, menubox_attr); /* weeknumbers headline */
+ wattrset(data->window, menubox_attr); /* weeknumbers headline */
mvwprintw(data->window,
y, 0,
"%*d ",
@@ -259,9 +257,9 @@ draw_day(BOX * data, struct tm *current)
++mday;
if (wmove(data->window, y, this_x) == ERR)
continue;
- (void) wattrset(data->window, item_attr); /* not selected days */
+ wattrset(data->window, item_attr); /* not selected days */
if (mday == day) {
- (void) wattrset(data->window, item_selected_attr); /* selected day */
+ wattrset(data->window, item_selected_attr); /* selected day */
save_y = y;
save_x = this_x;
}
@@ -296,15 +294,13 @@ draw_month(BOX * data, struct tm *current)
month = current->tm_mon + 1;
- (void) wattrset(data->parent, dialog_attr); /* Headline "Month" */
+ wattrset(data->parent, dialog_attr); /* Headline "Month" */
(void) mvwprintw(data->parent, data->y - 2, data->x - 1, _("Month"));
- dlg_draw_box2(data->parent,
- data->y - 1, data->x - 1,
- data->height + 2, data->width + 2,
- menubox_attr,
- menubox_border_attr,
- menubox_border2_attr);
- (void) wattrset(data->window, item_attr); /* color the month selection */
+ dlg_draw_box(data->parent,
+ data->y - 1, data->x - 1,
+ data->height + 2, data->width + 2,
+ menubox_border_attr, menubox_attr); /* borders of monthbox */
+ wattrset(data->window, item_attr); /* color the month selection */
mvwprintw(data->window, 0, 0, "%s", nameOfMonth(month - 1));
wmove(data->window, 0, 0);
return 0;
@@ -318,15 +314,13 @@ draw_year(BOX * data, struct tm *current)
{
int year = current->tm_year + 1900;
- (void) wattrset(data->parent, dialog_attr); /* Headline "Year" */
+ wattrset(data->parent, dialog_attr); /* Headline "Year" */
(void) mvwprintw(data->parent, data->y - 2, data->x - 1, _("Year"));
- dlg_draw_box2(data->parent,
- data->y - 1, data->x - 1,
- data->height + 2, data->width + 2,
- menubox_attr,
- menubox_border_attr,
- menubox_border2_attr);
- (void) wattrset(data->window, item_attr); /* color the year selection */
+ dlg_draw_box(data->parent,
+ data->y - 1, data->x - 1,
+ data->height + 2, data->width + 2,
+ menubox_border_attr, menubox_attr); /* borders of yearbox */
+ wattrset(data->window, item_attr); /* color the year selection */
mvwprintw(data->window, 0, 0, "%4d", year);
wmove(data->window, 0, 0);
return 0;
@@ -436,7 +430,7 @@ dialog_calendar(const char *title,
WINDOW *dialog;
time_t now_time = time((time_t *) 0);
struct tm current;
- int state = dlg_default_button();
+ int state = dlg_defaultno_button();
const char **buttons = dlg_ok_labels();
char *prompt = dlg_strclone(subtitle);
int mincols = MIN_WIDE;
@@ -497,11 +491,11 @@ dialog_calendar(const char *title,
dlg_register_buttons(dialog, "calendar", buttons);
/* mainbox */
- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
- dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
+ dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
+ dlg_draw_bottom_box(dialog);
dlg_draw_title(dialog, title);
- (void) wattrset(dialog, dialog_attr); /* text mainbox */
+ wattrset(dialog, dialog_attr); /* text mainbox */
dlg_print_autowrap(dialog, prompt, height, width);
/* compute positions of day, month and year boxes */
@@ -545,7 +539,6 @@ dialog_calendar(const char *title,
return CleanupResult(DLG_EXIT_ERROR, dialog, prompt, &save_vars);
}
- dlg_trace_win(dialog);
while (result == DLG_EXIT_UNKNOWN) {
BOX *obj = (state == sDAY ? &dy_box
: (state == sMONTH ? &mn_box :
diff --git a/contrib/dialog/checklist.c b/contrib/dialog/checklist.c
index 3904e90..4b73ceb 100644
--- a/contrib/dialog/checklist.c
+++ b/contrib/dialog/checklist.c
@@ -1,9 +1,9 @@
/*
- * $Id: checklist.c,v 1.135 2012/07/01 16:30:04 Zoltan.Kelemen Exp $
+ * $Id: checklist.c,v 1.127 2011/06/29 23:04:09 tom Exp $
*
* checklist.c -- implements the checklist box
*
- * Copyright 2000-2011,2012 Thomas E. Dickey
+ * Copyright 2000-2010,2011 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -58,7 +58,7 @@ print_arrows(WINDOW *win,
box_x + list_width,
box_y,
box_y + list_height + 1,
- menubox_border2_attr,
+ menubox_attr,
menubox_border_attr);
}
@@ -81,30 +81,30 @@ print_item(WINDOW *win,
int limit;
/* Clear 'residue' of last item */
- (void) wattrset(win, menubox_attr);
+ wattrset(win, menubox_attr);
(void) wmove(win, choice, 0);
for (i = 0; i < list_width; i++)
(void) waddch(win, ' ');
(void) wmove(win, choice, check_x);
- (void) wattrset(win, selected ? check_selected_attr : check_attr);
+ wattrset(win, selected ? check_selected_attr : check_attr);
(void) wprintw(win,
(checkflag == FLAG_CHECK) ? "[%c]" : "(%c)",
states[item->state]);
- (void) wattrset(win, menubox_attr);
+ wattrset(win, menubox_attr);
(void) waddch(win, ' ');
if (strlen(item->name) != 0) {
indx = dlg_index_wchars(item->name);
- (void) wattrset(win, selected ? tag_key_selected_attr : tag_key_attr);
+ wattrset(win, selected ? tag_key_selected_attr : tag_key_attr);
(void) waddnstr(win, item->name, indx[1]);
if ((int) strlen(item->name) > indx[1]) {
limit = dlg_limit_columns(item->name, (item_x - check_x - 6), 1);
if (limit > 1) {
- (void) wattrset(win, selected ? tag_selected_attr : tag_attr);
+ wattrset(win, selected ? tag_selected_attr : tag_attr);
(void) waddnstr(win,
item->name + indx[1],
indx[limit] - indx[1]);
@@ -118,7 +118,7 @@ print_item(WINDOW *win,
if (limit > 0) {
(void) wmove(win, choice, item_x);
- (void) wattrset(win, selected ? item_selected_attr : item_attr);
+ wattrset(win, selected ? item_selected_attr : item_attr);
dlg_print_text(win, item->text, cols[limit], &attr);
}
}
@@ -126,7 +126,7 @@ print_item(WINDOW *win,
if (selected) {
dlg_item_help(item->help);
}
- (void) wattrset(win, save);
+ wattrset(win, save);
}
/*
@@ -178,7 +178,7 @@ dlg_checklist(const char *title,
#endif
int i, j, key2, found, x, y, cur_x, cur_y, box_x, box_y;
int key = 0, fkey;
- int button = dialog_state.visit_items ? -1 : dlg_default_button();
+ int button = dialog_state.visit_items ? -1 : dlg_defaultno_button();
int choice = dlg_default_listitem(items);
int scrollamt = 0;
int max_choice;
@@ -190,7 +190,6 @@ dlg_checklist(const char *title,
WINDOW *dialog, *list;
char *prompt = dlg_strclone(cprompt);
const char **buttons = dlg_ok_labels();
- const char *widget_name;
dlg_does_output();
dlg_tab_correct_str(prompt);
@@ -212,23 +211,19 @@ dlg_checklist(const char *title,
}
}
}
- widget_name = "radiolist";
- } else {
- widget_name = "checklist";
}
#ifdef KEY_RESIZE
retry:
#endif
use_height = list_height;
- use_width = dlg_calc_list_width(item_no, items) + 10;
- use_width = MAX(26, use_width);
if (use_height == 0) {
+ use_width = dlg_calc_list_width(item_no, items) + 10;
/* calculate height without items (4) */
- dlg_auto_size(title, prompt, &height, &width, MIN_HIGH, use_width);
+ dlg_auto_size(title, prompt, &height, &width, MIN_HIGH, MAX(26, use_width));
dlg_calc_listh(&height, &use_height, item_no);
} else {
- dlg_auto_size(title, prompt, &height, &width, MIN_HIGH + use_height, use_width);
+ dlg_auto_size(title, prompt, &height, &width, MIN_HIGH + use_height, 26);
}
dlg_button_layout(buttons, &width);
dlg_print_size(height, width);
@@ -245,16 +240,16 @@ dlg_checklist(const char *title,
y = dlg_box_y_ordinate(height);
dialog = dlg_new_window(height, width, y, x);
- dlg_register_window(dialog, widget_name, binding);
- dlg_register_buttons(dialog, widget_name, buttons);
+ dlg_register_window(dialog, "checklist", binding);
+ dlg_register_buttons(dialog, "checklist", buttons);
dlg_mouse_setbase(x, y);
- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
- dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
+ dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
+ dlg_draw_bottom_box(dialog);
dlg_draw_title(dialog, title);
- (void) wattrset(dialog, dialog_attr);
+ wattrset(dialog, dialog_attr);
dlg_print_autowrap(dialog, prompt, height, width);
list_width = width - 6;
@@ -281,7 +276,7 @@ dlg_checklist(const char *title,
dlg_draw_box(dialog, box_y, box_x,
use_height + 2 * MARGIN,
list_width + 2 * MARGIN,
- menubox_border_attr, menubox_border2_attr);
+ menubox_border_attr, menubox_attr);
text_width = 0;
name_width = 0;
@@ -333,7 +328,6 @@ dlg_checklist(const char *title,
dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width);
- dlg_trace_win(dialog);
while (result == DLG_EXIT_UNKNOWN) {
if (button < 0) /* --visit-items */
wmove(dialog, box_y + choice + 1, box_x + check_x + 2);
@@ -726,10 +720,7 @@ dialog_checklist(const char *title,
} else {
if (dlg_need_separator())
dlg_add_separator();
- if (flag == FLAG_CHECK)
- dlg_add_quoted(listitems[i].name);
- else
- dlg_add_string(listitems[i].name);
+ dlg_add_string(listitems[i].name);
}
}
}
diff --git a/contrib/dialog/columns.c b/contrib/dialog/columns.c
index d03761f..8e5620c 100644
--- a/contrib/dialog/columns.c
+++ b/contrib/dialog/columns.c
@@ -1,5 +1,5 @@
/*
- * $Id: columns.c,v 1.10 2011/10/20 20:53:55 tom Exp $
+ * $Id: columns.c,v 1.8 2011/06/28 09:26:23 tom Exp $
*
* columns.c -- implements column-alignment
*
@@ -45,7 +45,7 @@ next_row(char **target, int per_row)
{
char *result = (char *) target;
result += per_row;
- return (char **) (void *) result;
+ return (char **) result;
}
static char *
@@ -148,7 +148,6 @@ dlg_align_columns(char **target, int per_row, int num_rows)
memcpy(text + offset, *value + offsets[n], (size_t) widths[n]);
offset += maxwidth[n] + 1;
}
- text[realwidth] = 0;
*value = text;
}
diff --git a/contrib/dialog/configure b/contrib/dialog/configure
index 416f055..44eaeb4 100755
--- a/contrib/dialog/configure
+++ b/contrib/dialog/configure
@@ -2166,47 +2166,10 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-for ac_prog in tdlint lint alint splint lclint
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:2173: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_LINT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$LINT"; then
- ac_cv_prog_LINT="$LINT" # Let the user override the test.
-else
- ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
- IFS=$ac_save_IFS
- test -z "$ac_dir" && ac_dir=.
- $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_LINT="$ac_prog"
-echo "$as_me:2188: found $ac_dir/$ac_word" >&5
-break
-done
-
-fi
-fi
-LINT=$ac_cv_prog_LINT
-if test -n "$LINT"; then
- echo "$as_me:2196: result: $LINT" >&5
-echo "${ECHO_T}$LINT" >&6
-else
- echo "$as_me:2199: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$LINT" && break
-done
-
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo "$as_me:2209: checking for $ac_word" >&5
+echo "$as_me:2172: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_AR+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2221,7 +2184,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_AR="${ac_tool_prefix}ar"
-echo "$as_me:2224: found $ac_dir/$ac_word" >&5
+echo "$as_me:2187: found $ac_dir/$ac_word" >&5
break
done
@@ -2229,10 +2192,10 @@ fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- echo "$as_me:2232: result: $AR" >&5
+ echo "$as_me:2195: result: $AR" >&5
echo "${ECHO_T}$AR" >&6
else
- echo "$as_me:2235: result: no" >&5
+ echo "$as_me:2198: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2241,7 +2204,7 @@ if test -z "$ac_cv_prog_AR"; then
ac_ct_AR=$AR
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
-echo "$as_me:2244: checking for $ac_word" >&5
+echo "$as_me:2207: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2256,7 +2219,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_AR="ar"
-echo "$as_me:2259: found $ac_dir/$ac_word" >&5
+echo "$as_me:2222: found $ac_dir/$ac_word" >&5
break
done
@@ -2265,10 +2228,10 @@ fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
- echo "$as_me:2268: result: $ac_ct_AR" >&5
+ echo "$as_me:2231: result: $ac_ct_AR" >&5
echo "${ECHO_T}$ac_ct_AR" >&6
else
- echo "$as_me:2271: result: no" >&5
+ echo "$as_me:2234: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2277,12 +2240,12 @@ else
AR="$ac_cv_prog_AR"
fi
-echo "$as_me:2280: checking for POSIXized ISC" >&5
+echo "$as_me:2243: checking for POSIXized ISC" >&5
echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
- echo "$as_me:2285: result: yes" >&5
+ echo "$as_me:2248: result: yes" >&5
echo "${ECHO_T}yes" >&6
ISC=yes # If later tests want to check for ISC.
@@ -2296,12 +2259,12 @@ EOF
CC="$CC -Xp"
fi
else
- echo "$as_me:2299: result: no" >&5
+ echo "$as_me:2262: result: no" >&5
echo "${ECHO_T}no" >&6
ISC=
fi
-echo "$as_me:2304: checking for $CC option to accept ANSI C" >&5
+echo "$as_me:2267: checking for $CC option to accept ANSI C" >&5
echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
if test "${ac_cv_prog_cc_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2309,7 +2272,7 @@ else
ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
-#line 2312 "configure"
+#line 2275 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
@@ -2358,16 +2321,16 @@ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIO
do
CC="$ac_save_CC $ac_arg"
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2361: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2324: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2364: \$? = $ac_status" >&5
+ echo "$as_me:2327: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2367: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2330: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2370: \$? = $ac_status" >&5
+ echo "$as_me:2333: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cc_stdc=$ac_arg
break
@@ -2384,21 +2347,21 @@ fi
case "x$ac_cv_prog_cc_stdc" in
x|xno)
- echo "$as_me:2387: result: none needed" >&5
+ echo "$as_me:2350: result: none needed" >&5
echo "${ECHO_T}none needed" >&6 ;;
*)
- echo "$as_me:2390: result: $ac_cv_prog_cc_stdc" >&5
+ echo "$as_me:2353: result: $ac_cv_prog_cc_stdc" >&5
echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
CC="$CC $ac_cv_prog_cc_stdc" ;;
esac
-echo "$as_me:2395: checking for an ANSI C-conforming const" >&5
+echo "$as_me:2358: checking for an ANSI C-conforming const" >&5
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
if test "${ac_cv_c_const+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 2401 "configure"
+#line 2364 "configure"
#include "confdefs.h"
int
@@ -2456,16 +2419,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2459: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2422: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2462: \$? = $ac_status" >&5
+ echo "$as_me:2425: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2465: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2428: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2468: \$? = $ac_status" >&5
+ echo "$as_me:2431: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_const=yes
else
@@ -2475,7 +2438,7 @@ ac_cv_c_const=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:2478: result: $ac_cv_c_const" >&5
+echo "$as_me:2441: result: $ac_cv_c_const" >&5
echo "${ECHO_T}$ac_cv_c_const" >&6
if test $ac_cv_c_const = no; then
@@ -2485,7 +2448,7 @@ EOF
fi
-echo "$as_me:2488: checking for makeflags variable" >&5
+echo "$as_me:2451: checking for makeflags variable" >&5
echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
if test "${cf_cv_makeflags+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2519,10 +2482,10 @@ CF_EOF
rm -f cf_makeflags.tmp
fi
-echo "$as_me:2522: result: $cf_cv_makeflags" >&5
+echo "$as_me:2485: result: $cf_cv_makeflags" >&5
echo "${ECHO_T}$cf_cv_makeflags" >&6
-echo "$as_me:2525: checking if filesystem supports mixed-case filenames" >&5
+echo "$as_me:2488: checking if filesystem supports mixed-case filenames" >&5
echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
if test "${cf_cv_mixedcase+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2549,7 +2512,7 @@ else
fi
fi
-echo "$as_me:2552: result: $cf_cv_mixedcase" >&5
+echo "$as_me:2515: result: $cf_cv_mixedcase" >&5
echo "${ECHO_T}$cf_cv_mixedcase" >&6
test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
#define MIXEDCASE_FILENAMES 1
@@ -2559,7 +2522,7 @@ for ac_prog in exctags ctags
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:2562: checking for $ac_word" >&5
+echo "$as_me:2525: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CTAGS+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2574,7 +2537,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CTAGS="$ac_prog"
-echo "$as_me:2577: found $ac_dir/$ac_word" >&5
+echo "$as_me:2540: found $ac_dir/$ac_word" >&5
break
done
@@ -2582,10 +2545,10 @@ fi
fi
CTAGS=$ac_cv_prog_CTAGS
if test -n "$CTAGS"; then
- echo "$as_me:2585: result: $CTAGS" >&5
+ echo "$as_me:2548: result: $CTAGS" >&5
echo "${ECHO_T}$CTAGS" >&6
else
- echo "$as_me:2588: result: no" >&5
+ echo "$as_me:2551: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2596,7 +2559,7 @@ for ac_prog in exetags etags
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:2599: checking for $ac_word" >&5
+echo "$as_me:2562: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ETAGS+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2611,7 +2574,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ETAGS="$ac_prog"
-echo "$as_me:2614: found $ac_dir/$ac_word" >&5
+echo "$as_me:2577: found $ac_dir/$ac_word" >&5
break
done
@@ -2619,10 +2582,10 @@ fi
fi
ETAGS=$ac_cv_prog_ETAGS
if test -n "$ETAGS"; then
- echo "$as_me:2622: result: $ETAGS" >&5
+ echo "$as_me:2585: result: $ETAGS" >&5
echo "${ECHO_T}$ETAGS" >&6
else
- echo "$as_me:2625: result: no" >&5
+ echo "$as_me:2588: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2631,7 +2594,7 @@ done
# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
set dummy ${CTAGS:-ctags}; ac_word=$2
-echo "$as_me:2634: checking for $ac_word" >&5
+echo "$as_me:2597: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2646,7 +2609,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_MAKE_LOWER_TAGS="yes"
-echo "$as_me:2649: found $ac_dir/$ac_word" >&5
+echo "$as_me:2612: found $ac_dir/$ac_word" >&5
break
done
@@ -2655,17 +2618,17 @@ fi
fi
MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
if test -n "$MAKE_LOWER_TAGS"; then
- echo "$as_me:2658: result: $MAKE_LOWER_TAGS" >&5
+ echo "$as_me:2621: result: $MAKE_LOWER_TAGS" >&5
echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
else
- echo "$as_me:2661: result: no" >&5
+ echo "$as_me:2624: result: no" >&5
echo "${ECHO_T}no" >&6
fi
if test "$cf_cv_mixedcase" = yes ; then
# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
set dummy ${ETAGS:-etags}; ac_word=$2
-echo "$as_me:2668: checking for $ac_word" >&5
+echo "$as_me:2631: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2680,7 +2643,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_MAKE_UPPER_TAGS="yes"
-echo "$as_me:2683: found $ac_dir/$ac_word" >&5
+echo "$as_me:2646: found $ac_dir/$ac_word" >&5
break
done
@@ -2689,10 +2652,10 @@ fi
fi
MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
if test -n "$MAKE_UPPER_TAGS"; then
- echo "$as_me:2692: result: $MAKE_UPPER_TAGS" >&5
+ echo "$as_me:2655: result: $MAKE_UPPER_TAGS" >&5
echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
else
- echo "$as_me:2695: result: no" >&5
+ echo "$as_me:2658: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2712,7 +2675,7 @@ else
MAKE_LOWER_TAGS="#"
fi
-echo "$as_me:2715: checking if you want to see long compiling messages" >&5
+echo "$as_me:2678: checking if you want to see long compiling messages" >&5
echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
# Check whether --enable-echo or --disable-echo was given.
@@ -2746,16 +2709,16 @@ else
ECHO_CC=''
fi;
-echo "$as_me:2749: result: $enableval" >&5
+echo "$as_me:2712: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:2754: error: cannot run $ac_config_sub" >&5
+ { { echo "$as_me:2717: error: cannot run $ac_config_sub" >&5
echo "$as_me: error: cannot run $ac_config_sub" >&2;}
{ (exit 1); exit 1; }; }
-echo "$as_me:2758: checking build system type" >&5
+echo "$as_me:2721: checking build system type" >&5
echo $ECHO_N "checking build system type... $ECHO_C" >&6
if test "${ac_cv_build+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2764,16 +2727,16 @@ else
test -z "$ac_cv_build_alias" &&
ac_cv_build_alias=`$ac_config_guess`
test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:2767: error: cannot guess build type; you must specify one" >&5
+ { { echo "$as_me:2730: error: cannot guess build type; you must specify one" >&5
echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
{ (exit 1); exit 1; }; }
ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:2771: error: $ac_config_sub $ac_cv_build_alias failed." >&5
+ { { echo "$as_me:2734: error: $ac_config_sub $ac_cv_build_alias failed." >&5
echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
{ (exit 1); exit 1; }; }
fi
-echo "$as_me:2776: result: $ac_cv_build" >&5
+echo "$as_me:2739: result: $ac_cv_build" >&5
echo "${ECHO_T}$ac_cv_build" >&6
build=$ac_cv_build
build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
@@ -2781,7 +2744,7 @@ build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
- echo "$as_me:2784: checking host system type" >&5
+ echo "$as_me:2747: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6
if test "${ac_cv_host+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2790,12 +2753,12 @@ else
test -z "$ac_cv_host_alias" &&
ac_cv_host_alias=$ac_cv_build_alias
ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:2793: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+ { { echo "$as_me:2756: error: $ac_config_sub $ac_cv_host_alias failed" >&5
echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
{ (exit 1); exit 1; }; }
fi
-echo "$as_me:2798: result: $ac_cv_host" >&5
+echo "$as_me:2761: result: $ac_cv_host" >&5
echo "${ECHO_T}$ac_cv_host" >&6
host=$ac_cv_host
host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
@@ -2820,13 +2783,13 @@ else
fi
test -z "$system_name" && system_name="$cf_cv_system_name"
-test -n "$cf_cv_system_name" && echo "$as_me:2823: result: Configuring for $cf_cv_system_name" >&5
+test -n "$cf_cv_system_name" && echo "$as_me:2786: result: Configuring for $cf_cv_system_name" >&5
echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
if test ".$system_name" != ".$cf_cv_system_name" ; then
- echo "$as_me:2827: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
+ echo "$as_me:2790: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
- { { echo "$as_me:2829: error: \"Please remove config.cache and try again.\"" >&5
+ { { echo "$as_me:2792: error: \"Please remove config.cache and try again.\"" >&5
echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -2866,7 +2829,7 @@ cf_POSIX_C_SOURCE=199506L
cf_xopen_source=
case $host_os in #(vi
-aix[4-7]*) #(vi
+aix[456]*) #(vi
cf_xopen_source="-D_ALL_SOURCE"
;;
cygwin) #(vi
@@ -2877,7 +2840,6 @@ darwin[0-8].*) #(vi
;;
darwin*) #(vi
cf_xopen_source="-D_DARWIN_C_SOURCE"
- cf_XOPEN_SOURCE=
;;
freebsd*|dragonfly*) #(vi
# 5.x headers associate
@@ -2895,18 +2857,17 @@ hpux*) #(vi
;;
irix[56].*) #(vi
cf_xopen_source="-D_SGI_SOURCE"
- cf_XOPEN_SOURCE=
;;
linux*|gnu*|mint*|k*bsd*-gnu) #(vi
-echo "$as_me:2902: checking if we must define _GNU_SOURCE" >&5
+echo "$as_me:2863: checking if we must define _GNU_SOURCE" >&5
echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
if test "${cf_cv_gnu_source+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 2909 "configure"
+#line 2870 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -2921,16 +2882,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2924: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2885: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2927: \$? = $ac_status" >&5
+ echo "$as_me:2888: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2930: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2891: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2933: \$? = $ac_status" >&5
+ echo "$as_me:2894: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_gnu_source=no
else
@@ -2939,7 +2900,7 @@ cat conftest.$ac_ext >&5
cf_save="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
cat >conftest.$ac_ext <<_ACEOF
-#line 2942 "configure"
+#line 2903 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -2954,16 +2915,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2957: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2918: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2960: \$? = $ac_status" >&5
+ echo "$as_me:2921: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2963: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2924: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2966: \$? = $ac_status" >&5
+ echo "$as_me:2927: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_gnu_source=no
else
@@ -2978,260 +2939,16 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:2981: result: $cf_cv_gnu_source" >&5
+echo "$as_me:2942: result: $cf_cv_gnu_source" >&5
echo "${ECHO_T}$cf_cv_gnu_source" >&6
test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
;;
mirbsd*) #(vi
- # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
- cf_XOPEN_SOURCE=
-
-cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
-
-cf_save_CFLAGS="$CFLAGS"
-cf_save_CPPFLAGS="$CPPFLAGS"
-
-cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
- sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
- -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
-
-cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
- sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
- -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
-
-echo "$as_me:3003: checking if we should define _POSIX_C_SOURCE" >&5
-echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
-if test "${cf_cv_posix_c_source+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-echo "${as_me:-configure}:3009: testing if the symbol is already defined go no further ..." 1>&5
-
- cat >conftest.$ac_ext <<_ACEOF
-#line 3012 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int
-main ()
-{
-
-#ifndef _POSIX_C_SOURCE
-make an error
-#endif
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3027: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:3030: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3033: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:3036: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cf_cv_posix_c_source=no
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_want_posix_source=no
- case .$cf_POSIX_C_SOURCE in #(vi
- .[12]??*) #(vi
- cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
- ;;
- .2) #(vi
- cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
- cf_want_posix_source=yes
- ;;
- .*)
- cf_want_posix_source=yes
- ;;
- esac
- if test "$cf_want_posix_source" = yes ; then
- cat >conftest.$ac_ext <<_ACEOF
-#line 3057 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int
-main ()
-{
-
-#ifdef _POSIX_SOURCE
-make an error
-#endif
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3072: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:3075: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3078: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:3081: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
- fi
-
-echo "${as_me:-configure}:3092: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
-
- CFLAGS="$cf_trim_CFLAGS"
- CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
-
-echo "${as_me:-configure}:3097: testing if the second compile does not leave our definition intact error ..." 1>&5
-
- cat >conftest.$ac_ext <<_ACEOF
-#line 3100 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int
-main ()
-{
-
-#ifndef _POSIX_C_SOURCE
-make an error
-#endif
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3115: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:3118: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3121: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:3124: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_cv_posix_c_source=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$cf_save_CFLAGS"
- CPPFLAGS="$cf_save_CPPFLAGS"
-
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:3140: result: $cf_cv_posix_c_source" >&5
-echo "${ECHO_T}$cf_cv_posix_c_source" >&6
-
-if test "$cf_cv_posix_c_source" != no ; then
- CFLAGS="$cf_trim_CFLAGS"
- CPPFLAGS="$cf_trim_CPPFLAGS"
-
-cf_fix_cppflags=no
-cf_new_cflags=
-cf_new_cppflags=
-cf_new_extra_cppflags=
-
-for cf_add_cflags in $cf_cv_posix_c_source
-do
-case $cf_fix_cppflags in
-no)
- case $cf_add_cflags in #(vi
- -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
- case $cf_add_cflags in
- -D*)
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
-
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=yes
-
- if test $cf_fix_cppflags = yes ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- elif test "${cf_tst_cflags}" = "\"'" ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- fi
- ;;
- esac
- case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
- ;;
- *) #(vi
- case $cf_add_cflags in #(vi
- -D*)
- cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
-
-CPPFLAGS=`echo "$CPPFLAGS" | \
- sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
- -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
-
- ;;
- esac
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
- ;;
- esac
- ;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
- ;;
- esac
- ;;
-yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
-
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
-
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=no
- ;;
-esac
-done
-
-if test -n "$cf_new_cflags" ; then
-
- CFLAGS="$CFLAGS $cf_new_cflags"
-fi
-
-if test -n "$cf_new_cppflags" ; then
-
- CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
-fi
-
-if test -n "$cf_new_extra_cppflags" ; then
-
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
-fi
-
-fi
-
+ # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
;;
netbsd*) #(vi
- cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
- ;;
-openbsd[4-9]*) #(vi
- # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
- cf_xopen_source="-D_BSD_SOURCE"
- cf_XOPEN_SOURCE=600
+ # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
;;
openbsd*) #(vi
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
@@ -3245,25 +2962,23 @@ nto-qnx*) #(vi
sco*) #(vi
# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
;;
-solaris2.*) #(vi
+solaris2.1[0-9]) #(vi
+ cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ ;;
+solaris2.[1-9]) #(vi
cf_xopen_source="-D__EXTENSIONS__"
;;
*)
-
-echo "$as_me:3253: checking if we should define _XOPEN_SOURCE" >&5
+ echo "$as_me:2972: checking if we should define _XOPEN_SOURCE" >&5
echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
if test "${cf_cv_xopen_source+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 3260 "configure"
+#line 2979 "configure"
#include "confdefs.h"
-
-#include <stdlib.h>
-#include <string.h>
#include <sys/types.h>
-
int
main ()
{
@@ -3276,16 +2991,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3279: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2994: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3282: \$? = $ac_status" >&5
+ echo "$as_me:2997: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3285: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3000: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3288: \$? = $ac_status" >&5
+ echo "$as_me:3003: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_xopen_source=no
else
@@ -3294,13 +3009,9 @@ cat conftest.$ac_ext >&5
cf_save="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
cat >conftest.$ac_ext <<_ACEOF
-#line 3297 "configure"
+#line 3012 "configure"
#include "confdefs.h"
-
-#include <stdlib.h>
-#include <string.h>
#include <sys/types.h>
-
int
main ()
{
@@ -3313,16 +3024,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3316: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3027: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3319: \$? = $ac_status" >&5
+ echo "$as_me:3030: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3322: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3033: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3325: \$? = $ac_status" >&5
+ echo "$as_me:3036: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_xopen_source=no
else
@@ -3337,10 +3048,9 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:3340: result: $cf_cv_xopen_source" >&5
+echo "$as_me:3051: result: $cf_cv_xopen_source" >&5
echo "${ECHO_T}$cf_cv_xopen_source" >&6
-
-if test "$cf_cv_xopen_source" != no ; then
+ if test "$cf_cv_xopen_source" != no ; then
CFLAGS=`echo "$CFLAGS" | \
sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
@@ -3350,7 +3060,7 @@ CPPFLAGS=`echo "$CPPFLAGS" | \
sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
- cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
+ cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
cf_fix_cppflags=no
cf_new_cflags=
@@ -3430,7 +3140,7 @@ if test -n "$cf_new_extra_cppflags" ; then
EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi
-fi
+ fi
cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
@@ -3445,16 +3155,16 @@ cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
-echo "$as_me:3448: checking if we should define _POSIX_C_SOURCE" >&5
+echo "$as_me:3158: checking if we should define _POSIX_C_SOURCE" >&5
echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
if test "${cf_cv_posix_c_source+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
-echo "${as_me:-configure}:3454: testing if the symbol is already defined go no further ..." 1>&5
+echo "${as_me:-configure}:3164: testing if the symbol is already defined go no further ..." 1>&5
cat >conftest.$ac_ext <<_ACEOF
-#line 3457 "configure"
+#line 3167 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -3469,16 +3179,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3472: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3182: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3475: \$? = $ac_status" >&5
+ echo "$as_me:3185: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3478: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3188: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3481: \$? = $ac_status" >&5
+ echo "$as_me:3191: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_posix_c_source=no
else
@@ -3499,7 +3209,7 @@ cf_want_posix_source=no
esac
if test "$cf_want_posix_source" = yes ; then
cat >conftest.$ac_ext <<_ACEOF
-#line 3502 "configure"
+#line 3212 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -3514,16 +3224,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3517: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3227: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3520: \$? = $ac_status" >&5
+ echo "$as_me:3230: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3523: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3233: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3526: \$? = $ac_status" >&5
+ echo "$as_me:3236: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -3534,15 +3244,15 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "${as_me:-configure}:3537: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
+echo "${as_me:-configure}:3247: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
CFLAGS="$cf_trim_CFLAGS"
CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
-echo "${as_me:-configure}:3542: testing if the second compile does not leave our definition intact error ..." 1>&5
+echo "${as_me:-configure}:3252: testing if the second compile does not leave our definition intact error ..." 1>&5
cat >conftest.$ac_ext <<_ACEOF
-#line 3545 "configure"
+#line 3255 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -3557,16 +3267,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3560: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3270: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3563: \$? = $ac_status" >&5
+ echo "$as_me:3273: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3566: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3276: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3569: \$? = $ac_status" >&5
+ echo "$as_me:3279: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -3582,7 +3292,7 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:3585: result: $cf_cv_posix_c_source" >&5
+echo "$as_me:3295: result: $cf_cv_posix_c_source" >&5
echo "${ECHO_T}$cf_cv_posix_c_source" >&6
if test "$cf_cv_posix_c_source" != no ; then
@@ -3754,273 +3464,6 @@ fi
fi
-if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
- echo "$as_me:3758: checking if _XOPEN_SOURCE really is set" >&5
-echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-#line 3761 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int
-main ()
-{
-
-#ifndef _XOPEN_SOURCE
-make an error
-#endif
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3776: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:3779: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3782: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:3785: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cf_XOPEN_SOURCE_set=yes
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_XOPEN_SOURCE_set=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:3794: result: $cf_XOPEN_SOURCE_set" >&5
-echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
- if test $cf_XOPEN_SOURCE_set = yes
- then
- cat >conftest.$ac_ext <<_ACEOF
-#line 3799 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int
-main ()
-{
-
-#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
-make an error
-#endif
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3814: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:3817: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3820: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:3823: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cf_XOPEN_SOURCE_set_ok=yes
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_XOPEN_SOURCE_set_ok=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
- if test $cf_XOPEN_SOURCE_set_ok = no
- then
- { echo "$as_me:3834: WARNING: _XOPEN_SOURCE is lower than requested" >&5
-echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
- fi
- else
-
-echo "$as_me:3839: checking if we should define _XOPEN_SOURCE" >&5
-echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
-if test "${cf_cv_xopen_source+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- cat >conftest.$ac_ext <<_ACEOF
-#line 3846 "configure"
-#include "confdefs.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-
-int
-main ()
-{
-
-#ifndef _XOPEN_SOURCE
-make an error
-#endif
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3865: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:3868: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3871: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:3874: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cf_cv_xopen_source=no
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_save="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
- cat >conftest.$ac_ext <<_ACEOF
-#line 3883 "configure"
-#include "confdefs.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-
-int
-main ()
-{
-
-#ifdef _XOPEN_SOURCE
-make an error
-#endif
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3902: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:3905: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3908: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:3911: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cf_cv_xopen_source=no
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_cv_xopen_source=$cf_XOPEN_SOURCE
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
- CPPFLAGS="$cf_save"
-
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:3926: result: $cf_cv_xopen_source" >&5
-echo "${ECHO_T}$cf_cv_xopen_source" >&6
-
-if test "$cf_cv_xopen_source" != no ; then
-
-CFLAGS=`echo "$CFLAGS" | \
- sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
- -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
-
-CPPFLAGS=`echo "$CPPFLAGS" | \
- sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
- -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
-
- cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
-
-cf_fix_cppflags=no
-cf_new_cflags=
-cf_new_cppflags=
-cf_new_extra_cppflags=
-
-for cf_add_cflags in $cf_temp_xopen_source
-do
-case $cf_fix_cppflags in
-no)
- case $cf_add_cflags in #(vi
- -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
- case $cf_add_cflags in
- -D*)
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
-
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=yes
-
- if test $cf_fix_cppflags = yes ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- elif test "${cf_tst_cflags}" = "\"'" ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- fi
- ;;
- esac
- case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
- ;;
- *) #(vi
- case $cf_add_cflags in #(vi
- -D*)
- cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
-
-CPPFLAGS=`echo "$CPPFLAGS" | \
- sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
- -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
-
- ;;
- esac
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
- ;;
- esac
- ;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
- ;;
- esac
- ;;
-yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
-
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
-
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=no
- ;;
-esac
-done
-
-if test -n "$cf_new_cflags" ; then
-
- CFLAGS="$CFLAGS $cf_new_cflags"
-fi
-
-if test -n "$cf_new_cppflags" ; then
-
- CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
-fi
-
-if test -n "$cf_new_extra_cppflags" ; then
-
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
-fi
-
-fi
-
- fi
-fi
-
# Check whether --enable-largefile or --disable-largefile was given.
if test "${enable_largefile+set}" = set; then
enableval="$enable_largefile"
@@ -4028,7 +3471,7 @@ if test "${enable_largefile+set}" = set; then
fi;
if test "$enable_largefile" != no; then
- echo "$as_me:4031: checking for special C compiler options needed for large files" >&5
+ echo "$as_me:3474: checking for special C compiler options needed for large files" >&5
echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
if test "${ac_cv_sys_largefile_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4040,7 +3483,7 @@ else
# IRIX 6.2 and later do not support large files by default,
# so use the C compiler's -n32 option if that helps.
cat >conftest.$ac_ext <<_ACEOF
-#line 4043 "configure"
+#line 3486 "configure"
#include "confdefs.h"
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
@@ -4060,16 +3503,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4063: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3506: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4066: \$? = $ac_status" >&5
+ echo "$as_me:3509: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4069: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3512: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4072: \$? = $ac_status" >&5
+ echo "$as_me:3515: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -4079,16 +3522,16 @@ fi
rm -f conftest.$ac_objext
CC="$CC -n32"
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4082: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3525: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4085: \$? = $ac_status" >&5
+ echo "$as_me:3528: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4088: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3531: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4091: \$? = $ac_status" >&5
+ echo "$as_me:3534: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sys_largefile_CC=' -n32'; break
else
@@ -4102,13 +3545,13 @@ rm -f conftest.$ac_objext
rm -f conftest.$ac_ext
fi
fi
-echo "$as_me:4105: result: $ac_cv_sys_largefile_CC" >&5
+echo "$as_me:3548: result: $ac_cv_sys_largefile_CC" >&5
echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
if test "$ac_cv_sys_largefile_CC" != no; then
CC=$CC$ac_cv_sys_largefile_CC
fi
- echo "$as_me:4111: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+ echo "$as_me:3554: checking for _FILE_OFFSET_BITS value needed for large files" >&5
echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
if test "${ac_cv_sys_file_offset_bits+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4116,7 +3559,7 @@ else
while :; do
ac_cv_sys_file_offset_bits=no
cat >conftest.$ac_ext <<_ACEOF
-#line 4119 "configure"
+#line 3562 "configure"
#include "confdefs.h"
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
@@ -4136,16 +3579,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4139: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3582: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4142: \$? = $ac_status" >&5
+ echo "$as_me:3585: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4145: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3588: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4148: \$? = $ac_status" >&5
+ echo "$as_me:3591: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -4154,7 +3597,7 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 4157 "configure"
+#line 3600 "configure"
#include "confdefs.h"
#define _FILE_OFFSET_BITS 64
#include <sys/types.h>
@@ -4175,16 +3618,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4178: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3621: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4181: \$? = $ac_status" >&5
+ echo "$as_me:3624: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4184: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3627: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4187: \$? = $ac_status" >&5
+ echo "$as_me:3630: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sys_file_offset_bits=64; break
else
@@ -4195,7 +3638,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
break
done
fi
-echo "$as_me:4198: result: $ac_cv_sys_file_offset_bits" >&5
+echo "$as_me:3641: result: $ac_cv_sys_file_offset_bits" >&5
echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
if test "$ac_cv_sys_file_offset_bits" != no; then
@@ -4205,7 +3648,7 @@ EOF
fi
rm -rf conftest*
- echo "$as_me:4208: checking for _LARGE_FILES value needed for large files" >&5
+ echo "$as_me:3651: checking for _LARGE_FILES value needed for large files" >&5
echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
if test "${ac_cv_sys_large_files+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4213,7 +3656,7 @@ else
while :; do
ac_cv_sys_large_files=no
cat >conftest.$ac_ext <<_ACEOF
-#line 4216 "configure"
+#line 3659 "configure"
#include "confdefs.h"
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
@@ -4233,16 +3676,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4236: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3679: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4239: \$? = $ac_status" >&5
+ echo "$as_me:3682: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4242: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3685: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4245: \$? = $ac_status" >&5
+ echo "$as_me:3688: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -4251,7 +3694,7 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 4254 "configure"
+#line 3697 "configure"
#include "confdefs.h"
#define _LARGE_FILES 1
#include <sys/types.h>
@@ -4272,16 +3715,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4275: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3718: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4278: \$? = $ac_status" >&5
+ echo "$as_me:3721: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4281: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3724: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4284: \$? = $ac_status" >&5
+ echo "$as_me:3727: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sys_large_files=1; break
else
@@ -4292,7 +3735,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
break
done
fi
-echo "$as_me:4295: result: $ac_cv_sys_large_files" >&5
+echo "$as_me:3738: result: $ac_cv_sys_large_files" >&5
echo "${ECHO_T}$ac_cv_sys_large_files" >&6
if test "$ac_cv_sys_large_files" != no; then
@@ -4305,7 +3748,7 @@ rm -rf conftest*
fi
if test "$enable_largefile" != no ; then
- echo "$as_me:4308: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+ echo "$as_me:3751: checking for _LARGEFILE_SOURCE value needed for large files" >&5
echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
if test "${ac_cv_sys_largefile_source+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4313,7 +3756,7 @@ else
while :; do
ac_cv_sys_largefile_source=no
cat >conftest.$ac_ext <<_ACEOF
-#line 4316 "configure"
+#line 3759 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -4325,16 +3768,16 @@ return !fseeko;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4328: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3771: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4331: \$? = $ac_status" >&5
+ echo "$as_me:3774: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4334: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3777: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4337: \$? = $ac_status" >&5
+ echo "$as_me:3780: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -4343,7 +3786,7 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 4346 "configure"
+#line 3789 "configure"
#include "confdefs.h"
#define _LARGEFILE_SOURCE 1
#include <stdio.h>
@@ -4356,16 +3799,16 @@ return !fseeko;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4359: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3802: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4362: \$? = $ac_status" >&5
+ echo "$as_me:3805: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4365: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3808: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4368: \$? = $ac_status" >&5
+ echo "$as_me:3811: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sys_largefile_source=1; break
else
@@ -4376,7 +3819,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
break
done
fi
-echo "$as_me:4379: result: $ac_cv_sys_largefile_source" >&5
+echo "$as_me:3822: result: $ac_cv_sys_largefile_source" >&5
echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
if test "$ac_cv_sys_largefile_source" != no; then
@@ -4390,13 +3833,13 @@ rm -rf conftest*
# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
# in glibc 2.1.3, but that breaks too many other things.
# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
-echo "$as_me:4393: checking for fseeko" >&5
+echo "$as_me:3836: checking for fseeko" >&5
echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
if test "${ac_cv_func_fseeko+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4399 "configure"
+#line 3842 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -4408,16 +3851,16 @@ return fseeko && fseeko (stdin, 0, 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4411: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3854: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4414: \$? = $ac_status" >&5
+ echo "$as_me:3857: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4417: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3860: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4420: \$? = $ac_status" >&5
+ echo "$as_me:3863: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_fseeko=yes
else
@@ -4427,7 +3870,7 @@ ac_cv_func_fseeko=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:4430: result: $ac_cv_func_fseeko" >&5
+echo "$as_me:3873: result: $ac_cv_func_fseeko" >&5
echo "${ECHO_T}$ac_cv_func_fseeko" >&6
if test $ac_cv_func_fseeko = yes; then
@@ -4448,14 +3891,14 @@ fi
test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
- echo "$as_me:4451: checking whether to use struct dirent64" >&5
+ echo "$as_me:3894: checking whether to use struct dirent64" >&5
echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
if test "${cf_cv_struct_dirent64+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4458 "configure"
+#line 3901 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -4476,16 +3919,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4479: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3922: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4482: \$? = $ac_status" >&5
+ echo "$as_me:3925: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4485: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3928: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4488: \$? = $ac_status" >&5
+ echo "$as_me:3931: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_struct_dirent64=yes
else
@@ -4496,7 +3939,7 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:4499: result: $cf_cv_struct_dirent64" >&5
+echo "$as_me:3942: result: $cf_cv_struct_dirent64" >&5
echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
#define HAVE_STRUCT_DIRENT64 1
@@ -4506,17 +3949,17 @@ EOF
GCC_VERSION=none
if test "$GCC" = yes ; then
- echo "$as_me:4509: checking version of $CC" >&5
+ echo "$as_me:3952: checking version of $CC" >&5
echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
test -z "$GCC_VERSION" && GCC_VERSION=unknown
- echo "$as_me:4513: result: $GCC_VERSION" >&5
+ echo "$as_me:3956: result: $GCC_VERSION" >&5
echo "${ECHO_T}$GCC_VERSION" >&6
fi
if ( test "$GCC" = yes || test "$GXX" = yes )
then
-echo "$as_me:4519: checking if you want to check for gcc warnings" >&5
+echo "$as_me:3962: checking if you want to check for gcc warnings" >&5
echo $ECHO_N "checking if you want to check for gcc warnings... $ECHO_C" >&6
# Check whether --with-warnings or --without-warnings was given.
@@ -4526,7 +3969,7 @@ if test "${with_warnings+set}" = set; then
else
cf_opt_with_warnings=no
fi;
-echo "$as_me:4529: result: $cf_opt_with_warnings" >&5
+echo "$as_me:3972: result: $cf_opt_with_warnings" >&5
echo "${ECHO_T}$cf_opt_with_warnings" >&6
if test "$cf_opt_with_warnings" != no ; then
@@ -4548,10 +3991,10 @@ cat > conftest.i <<EOF
EOF
if test "$GCC" = yes
then
- { echo "$as_me:4551: checking for $CC __attribute__ directives..." >&5
+ { echo "$as_me:3994: checking for $CC __attribute__ directives..." >&5
echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
cat > conftest.$ac_ext <<EOF
-#line 4554 "${as_me:-configure}"
+#line 3997 "${as_me:-configure}"
#include "confdefs.h"
#include "conftest.h"
#include "conftest.i"
@@ -4600,12 +4043,12 @@ EOF
;;
esac
- if { (eval echo "$as_me:4603: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:4046: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4606: \$? = $ac_status" >&5
+ echo "$as_me:4049: \$? = $ac_status" >&5
(exit $ac_status); }; then
- test -n "$verbose" && echo "$as_me:4608: result: ... $cf_attribute" >&5
+ test -n "$verbose" && echo "$as_me:4051: result: ... $cf_attribute" >&5
echo "${ECHO_T}... $cf_attribute" >&6
cat conftest.h >>confdefs.h
case $cf_attribute in #(vi
@@ -4645,12 +4088,12 @@ INTEL_COMPILER=no
if test "$GCC" = yes ; then
case $host_os in
linux*|gnu*)
- echo "$as_me:4648: checking if this is really Intel C compiler" >&5
+ echo "$as_me:4091: checking if this is really Intel C compiler" >&5
echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
cf_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -no-gcc"
cat >conftest.$ac_ext <<_ACEOF
-#line 4653 "configure"
+#line 4096 "configure"
#include "confdefs.h"
int
@@ -4667,16 +4110,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4670: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4113: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4673: \$? = $ac_status" >&5
+ echo "$as_me:4116: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4676: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4119: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4679: \$? = $ac_status" >&5
+ echo "$as_me:4122: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
INTEL_COMPILER=yes
cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
@@ -4687,14 +4130,14 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
CFLAGS="$cf_save_CFLAGS"
- echo "$as_me:4690: result: $INTEL_COMPILER" >&5
+ echo "$as_me:4133: result: $INTEL_COMPILER" >&5
echo "${ECHO_T}$INTEL_COMPILER" >&6
;;
esac
fi
cat > conftest.$ac_ext <<EOF
-#line 4697 "${as_me:-configure}"
+#line 4140 "${as_me:-configure}"
int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
EOF
@@ -4711,7 +4154,7 @@ then
# remark #981: operands are evaluated in unspecified order
# warning #279: controlling expression is constant
- { echo "$as_me:4714: checking for $CC warning options..." >&5
+ { echo "$as_me:4157: checking for $CC warning options..." >&5
echo "$as_me: checking for $CC warning options..." >&6;}
cf_save_CFLAGS="$CFLAGS"
EXTRA_CFLAGS="-Wall"
@@ -4727,12 +4170,12 @@ echo "$as_me: checking for $CC warning options..." >&6;}
wd981
do
CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
- if { (eval echo "$as_me:4730: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:4173: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4733: \$? = $ac_status" >&5
+ echo "$as_me:4176: \$? = $ac_status" >&5
(exit $ac_status); }; then
- test -n "$verbose" && echo "$as_me:4735: result: ... -$cf_opt" >&5
+ test -n "$verbose" && echo "$as_me:4178: result: ... -$cf_opt" >&5
echo "${ECHO_T}... -$cf_opt" >&6
EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
fi
@@ -4741,7 +4184,7 @@ echo "${ECHO_T}... -$cf_opt" >&6
elif test "$GCC" = yes
then
- { echo "$as_me:4744: checking for $CC warning options..." >&5
+ { echo "$as_me:4187: checking for $CC warning options..." >&5
echo "$as_me: checking for $CC warning options..." >&6;}
cf_save_CFLAGS="$CFLAGS"
EXTRA_CFLAGS=
@@ -4761,12 +4204,12 @@ echo "$as_me: checking for $CC warning options..." >&6;}
Wundef $cf_warn_CONST
do
CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
- if { (eval echo "$as_me:4764: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:4207: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4767: \$? = $ac_status" >&5
+ echo "$as_me:4210: \$? = $ac_status" >&5
(exit $ac_status); }; then
- test -n "$verbose" && echo "$as_me:4769: result: ... -$cf_opt" >&5
+ test -n "$verbose" && echo "$as_me:4212: result: ... -$cf_opt" >&5
echo "${ECHO_T}... -$cf_opt" >&6
case $cf_opt in #(vi
Wcast-qual) #(vi
@@ -4777,7 +4220,7 @@ echo "${ECHO_T}... -$cf_opt" >&6
[34].*)
test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
-echo "${as_me:-configure}:4780: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
+echo "${as_me:-configure}:4223: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
continue;;
esac
@@ -4802,7 +4245,7 @@ else
fi;
if test -f $srcdir/VERSION ; then
- echo "$as_me:4805: checking for package version" >&5
+ echo "$as_me:4248: checking for package version" >&5
echo $ECHO_N "checking for package version... $ECHO_C" >&6
# if there are not enough fields, cut returns the last one...
@@ -4814,39 +4257,39 @@ echo $ECHO_N "checking for package version... $ECHO_C" >&6
VERSION="$cf_field1"
VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
- test -z "$VERSION_MAJOR" && { { echo "$as_me:4817: error: missing major-version" >&5
+ test -z "$VERSION_MAJOR" && { { echo "$as_me:4260: error: missing major-version" >&5
echo "$as_me: error: missing major-version" >&2;}
{ (exit 1); exit 1; }; }
VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
- test -z "$VERSION_MINOR" && { { echo "$as_me:4822: error: missing minor-version" >&5
+ test -z "$VERSION_MINOR" && { { echo "$as_me:4265: error: missing minor-version" >&5
echo "$as_me: error: missing minor-version" >&2;}
{ (exit 1); exit 1; }; }
- echo "$as_me:4826: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
+ echo "$as_me:4269: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
- echo "$as_me:4829: checking for package patch date" >&5
+ echo "$as_me:4272: checking for package patch date" >&5
echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
case .$VERSION_PATCH in
.)
- { { echo "$as_me:4834: error: missing patch-date $VERSION_PATCH" >&5
+ { { echo "$as_me:4277: error: missing patch-date $VERSION_PATCH" >&5
echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
{ (exit 1); exit 1; }; }
;;
.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
;;
*)
- { { echo "$as_me:4841: error: illegal patch-date $VERSION_PATCH" >&5
+ { { echo "$as_me:4284: error: illegal patch-date $VERSION_PATCH" >&5
echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
- echo "$as_me:4846: result: $VERSION_PATCH" >&5
+ echo "$as_me:4289: result: $VERSION_PATCH" >&5
echo "${ECHO_T}$VERSION_PATCH" >&6
else
- { { echo "$as_me:4849: error: did not find $srcdir/VERSION" >&5
+ { { echo "$as_me:4292: error: did not find $srcdir/VERSION" >&5
echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -4854,19 +4297,19 @@ fi
# show the actual data that we have for versions:
test -n "$verbose" && echo " VERSION $VERSION" 1>&6
-echo "${as_me:-configure}:4857: testing VERSION $VERSION ..." 1>&5
+echo "${as_me:-configure}:4300: testing VERSION $VERSION ..." 1>&5
test -n "$verbose" && echo " VERSION_MAJOR $VERSION_MAJOR" 1>&6
-echo "${as_me:-configure}:4861: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
+echo "${as_me:-configure}:4304: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
test -n "$verbose" && echo " VERSION_MINOR $VERSION_MINOR" 1>&6
-echo "${as_me:-configure}:4865: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
+echo "${as_me:-configure}:4308: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
test -n "$verbose" && echo " VERSION_PATCH $VERSION_PATCH" 1>&6
-echo "${as_me:-configure}:4869: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
+echo "${as_me:-configure}:4312: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
cf_PACKAGE=dialog
PACKAGE=$PACKAGE
@@ -4893,13 +4336,13 @@ else
fi;
EXTRAOBJS=""
-echo "$as_me:4896: checking for ANSI C header files" >&5
+echo "$as_me:4339: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4902 "configure"
+#line 4345 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -4907,13 +4350,13 @@ else
#include <float.h>
_ACEOF
-if { (eval echo "$as_me:4910: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:4353: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:4916: \$? = $ac_status" >&5
+ echo "$as_me:4359: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -4935,7 +4378,7 @@ rm -f conftest.err conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
-#line 4938 "configure"
+#line 4381 "configure"
#include "confdefs.h"
#include <string.h>
@@ -4953,7 +4396,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
-#line 4956 "configure"
+#line 4399 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -4974,7 +4417,7 @@ if test $ac_cv_header_stdc = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4977 "configure"
+#line 4420 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
@@ -5000,15 +4443,15 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:5003: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4446: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5006: \$? = $ac_status" >&5
+ echo "$as_me:4449: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:5008: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4451: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5011: \$? = $ac_status" >&5
+ echo "$as_me:4454: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -5021,7 +4464,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
-echo "$as_me:5024: result: $ac_cv_header_stdc" >&5
+echo "$as_me:4467: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
@@ -5031,7 +4474,7 @@ EOF
fi
-echo "$as_me:5034: checking for inline" >&5
+echo "$as_me:4477: checking for inline" >&5
echo $ECHO_N "checking for inline... $ECHO_C" >&6
if test "${ac_cv_c_inline+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5039,7 +4482,7 @@ else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat >conftest.$ac_ext <<_ACEOF
-#line 5042 "configure"
+#line 4485 "configure"
#include "confdefs.h"
#ifndef __cplusplus
static $ac_kw int static_foo () {return 0; }
@@ -5048,16 +4491,16 @@ $ac_kw int foo () {return 0; }
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5051: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4494: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:5054: \$? = $ac_status" >&5
+ echo "$as_me:4497: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5057: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4500: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5060: \$? = $ac_status" >&5
+ echo "$as_me:4503: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_inline=$ac_kw; break
else
@@ -5068,7 +4511,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:5071: result: $ac_cv_c_inline" >&5
+echo "$as_me:4514: result: $ac_cv_c_inline" >&5
echo "${ECHO_T}$ac_cv_c_inline" >&6
case $ac_cv_c_inline in
inline | yes) ;;
@@ -5089,28 +4532,28 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:5092: checking for $ac_header" >&5
+echo "$as_me:4535: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5098 "configure"
+#line 4541 "configure"
#include "confdefs.h"
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5104: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4547: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:5107: \$? = $ac_status" >&5
+ echo "$as_me:4550: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5110: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4553: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5113: \$? = $ac_status" >&5
+ echo "$as_me:4556: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Header=yes"
else
@@ -5120,7 +4563,7 @@ eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:5123: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:4566: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -5130,13 +4573,13 @@ EOF
fi
done
-echo "$as_me:5133: checking for off_t" >&5
+echo "$as_me:4576: checking for off_t" >&5
echo $ECHO_N "checking for off_t... $ECHO_C" >&6
if test "${ac_cv_type_off_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5139 "configure"
+#line 4582 "configure"
#include "confdefs.h"
$ac_includes_default
int
@@ -5151,16 +4594,16 @@ if (sizeof (off_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5154: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4597: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:5157: \$? = $ac_status" >&5
+ echo "$as_me:4600: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5160: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4603: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5163: \$? = $ac_status" >&5
+ echo "$as_me:4606: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_off_t=yes
else
@@ -5170,7 +4613,7 @@ ac_cv_type_off_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:5173: result: $ac_cv_type_off_t" >&5
+echo "$as_me:4616: result: $ac_cv_type_off_t" >&5
echo "${ECHO_T}$ac_cv_type_off_t" >&6
if test $ac_cv_type_off_t = yes; then
:
@@ -5182,13 +4625,13 @@ EOF
fi
-echo "$as_me:5185: checking for size_t" >&5
+echo "$as_me:4628: checking for size_t" >&5
echo $ECHO_N "checking for size_t... $ECHO_C" >&6
if test "${ac_cv_type_size_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5191 "configure"
+#line 4634 "configure"
#include "confdefs.h"
$ac_includes_default
int
@@ -5203,16 +4646,16 @@ if (sizeof (size_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5206: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4649: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:5209: \$? = $ac_status" >&5
+ echo "$as_me:4652: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5212: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4655: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5215: \$? = $ac_status" >&5
+ echo "$as_me:4658: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_size_t=yes
else
@@ -5222,7 +4665,7 @@ ac_cv_type_size_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:5225: result: $ac_cv_type_size_t" >&5
+echo "$as_me:4668: result: $ac_cv_type_size_t" >&5
echo "${ECHO_T}$ac_cv_type_size_t" >&6
if test $ac_cv_type_size_t = yes; then
:
@@ -5236,13 +4679,13 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
-echo "$as_me:5239: checking for working alloca.h" >&5
+echo "$as_me:4682: checking for working alloca.h" >&5
echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
if test "${ac_cv_working_alloca_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5245 "configure"
+#line 4688 "configure"
#include "confdefs.h"
#include <alloca.h>
int
@@ -5254,16 +4697,16 @@ char *p = (char *) alloca (2 * sizeof (int));
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5257: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4700: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5260: \$? = $ac_status" >&5
+ echo "$as_me:4703: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5263: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4706: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5266: \$? = $ac_status" >&5
+ echo "$as_me:4709: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_working_alloca_h=yes
else
@@ -5273,7 +4716,7 @@ ac_cv_working_alloca_h=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:5276: result: $ac_cv_working_alloca_h" >&5
+echo "$as_me:4719: result: $ac_cv_working_alloca_h" >&5
echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
if test $ac_cv_working_alloca_h = yes; then
@@ -5283,13 +4726,13 @@ EOF
fi
-echo "$as_me:5286: checking for alloca" >&5
+echo "$as_me:4729: checking for alloca" >&5
echo $ECHO_N "checking for alloca... $ECHO_C" >&6
if test "${ac_cv_func_alloca_works+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5292 "configure"
+#line 4735 "configure"
#include "confdefs.h"
#ifdef __GNUC__
# define alloca __builtin_alloca
@@ -5321,16 +4764,16 @@ char *p = (char *) alloca (1);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5324: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4767: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5327: \$? = $ac_status" >&5
+ echo "$as_me:4770: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5330: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4773: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5333: \$? = $ac_status" >&5
+ echo "$as_me:4776: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_alloca_works=yes
else
@@ -5340,7 +4783,7 @@ ac_cv_func_alloca_works=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:5343: result: $ac_cv_func_alloca_works" >&5
+echo "$as_me:4786: result: $ac_cv_func_alloca_works" >&5
echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
if test $ac_cv_func_alloca_works = yes; then
@@ -5361,13 +4804,13 @@ cat >>confdefs.h <<\EOF
#define C_ALLOCA 1
EOF
-echo "$as_me:5364: checking whether \`alloca.c' needs Cray hooks" >&5
+echo "$as_me:4807: checking whether \`alloca.c' needs Cray hooks" >&5
echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
if test "${ac_cv_os_cray+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5370 "configure"
+#line 4813 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -5385,18 +4828,18 @@ fi
rm -rf conftest*
fi
-echo "$as_me:5388: result: $ac_cv_os_cray" >&5
+echo "$as_me:4831: result: $ac_cv_os_cray" >&5
echo "${ECHO_T}$ac_cv_os_cray" >&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:5393: checking for $ac_func" >&5
+echo "$as_me:4836: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5399 "configure"
+#line 4842 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -5427,16 +4870,16 @@ f = $ac_func;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5430: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4873: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5433: \$? = $ac_status" >&5
+ echo "$as_me:4876: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5436: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4879: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5439: \$? = $ac_status" >&5
+ echo "$as_me:4882: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -5446,7 +4889,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:5449: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:4892: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
@@ -5460,7 +4903,7 @@ fi
done
fi
-echo "$as_me:5463: checking stack direction for C alloca" >&5
+echo "$as_me:4906: checking stack direction for C alloca" >&5
echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
if test "${ac_cv_c_stack_direction+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5469,7 +4912,7 @@ else
ac_cv_c_stack_direction=0
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5472 "configure"
+#line 4915 "configure"
#include "confdefs.h"
int
find_stack_direction ()
@@ -5492,15 +4935,15 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:5495: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4938: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5498: \$? = $ac_status" >&5
+ echo "$as_me:4941: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:5500: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4943: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5503: \$? = $ac_status" >&5
+ echo "$as_me:4946: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_stack_direction=1
else
@@ -5512,7 +4955,7 @@ fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:5515: result: $ac_cv_c_stack_direction" >&5
+echo "$as_me:4958: result: $ac_cv_c_stack_direction" >&5
echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
cat >>confdefs.h <<EOF
@@ -5524,23 +4967,23 @@ fi
for ac_header in stdlib.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:5527: checking for $ac_header" >&5
+echo "$as_me:4970: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5533 "configure"
+#line 4976 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:5537: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:4980: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:5543: \$? = $ac_status" >&5
+ echo "$as_me:4986: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -5559,7 +5002,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:5562: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:5005: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -5572,13 +5015,13 @@ done
for ac_func in getpagesize
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:5575: checking for $ac_func" >&5
+echo "$as_me:5018: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5581 "configure"
+#line 5024 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -5609,16 +5052,16 @@ f = $ac_func;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5612: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5055: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5615: \$? = $ac_status" >&5
+ echo "$as_me:5058: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5618: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5061: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5621: \$? = $ac_status" >&5
+ echo "$as_me:5064: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -5628,7 +5071,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:5631: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:5074: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -5638,7 +5081,7 @@ EOF
fi
done
-echo "$as_me:5641: checking for working mmap" >&5
+echo "$as_me:5084: checking for working mmap" >&5
echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5647,7 +5090,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5650 "configure"
+#line 5093 "configure"
#include "confdefs.h"
$ac_includes_default
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -5774,15 +5217,15 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:5777: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5220: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5780: \$? = $ac_status" >&5
+ echo "$as_me:5223: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:5782: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5225: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5785: \$? = $ac_status" >&5
+ echo "$as_me:5228: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -5794,7 +5237,7 @@ fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:5797: result: $ac_cv_func_mmap_fixed_mapped" >&5
+echo "$as_me:5240: result: $ac_cv_func_mmap_fixed_mapped" >&5
echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
if test $ac_cv_func_mmap_fixed_mapped = yes; then
@@ -5805,13 +5248,13 @@ EOF
fi
rm -f conftest.mmap
- echo "$as_me:5808: checking whether we are using the GNU C Library 2.1 or newer" >&5
+ echo "$as_me:5251: checking whether we are using the GNU C Library 2.1 or newer" >&5
echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
if test "${ac_cv_gnu_library_2_1+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5814 "configure"
+#line 5257 "configure"
#include "confdefs.h"
#include <features.h>
@@ -5831,7 +5274,7 @@ fi
rm -rf conftest*
fi
-echo "$as_me:5834: result: $ac_cv_gnu_library_2_1" >&5
+echo "$as_me:5277: result: $ac_cv_gnu_library_2_1" >&5
echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
GLIBC21="$ac_cv_gnu_library_2_1"
@@ -5844,7 +5287,7 @@ test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && ec
: ${CONFIG_H:=config.h}
if test -z "$PACKAGE" ; then
- { { echo "$as_me:5847: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
+ { { echo "$as_me:5290: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
echo "$as_me: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -5861,23 +5304,23 @@ for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
stdlib.h string.h unistd.h sys/param.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:5864: checking for $ac_header" >&5
+echo "$as_me:5307: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5870 "configure"
+#line 5313 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:5874: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:5317: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:5880: \$? = $ac_status" >&5
+ echo "$as_me:5323: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -5896,7 +5339,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:5899: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:5342: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -5911,13 +5354,13 @@ getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
strdup strtoul tsearch __argz_count __argz_stringify __argz_next
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:5914: checking for $ac_func" >&5
+echo "$as_me:5357: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5920 "configure"
+#line 5363 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -5948,16 +5391,16 @@ f = $ac_func;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5951: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5394: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5954: \$? = $ac_status" >&5
+ echo "$as_me:5397: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5957: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5400: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5960: \$? = $ac_status" >&5
+ echo "$as_me:5403: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -5967,7 +5410,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:5970: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:5413: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -6015,7 +5458,7 @@ if test -n "$cf_searchpath/include" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 6018 "configure"
+#line 5461 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -6027,16 +5470,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6030: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5473: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6033: \$? = $ac_status" >&5
+ echo "$as_me:5476: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6036: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5479: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6039: \$? = $ac_status" >&5
+ echo "$as_me:5482: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -6053,7 +5496,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:6056: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:5499: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -6094,7 +5537,7 @@ if test -n "$cf_searchpath/../include" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 6097 "configure"
+#line 5540 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -6106,16 +5549,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6109: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5552: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6112: \$? = $ac_status" >&5
+ echo "$as_me:5555: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6115: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5558: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6118: \$? = $ac_status" >&5
+ echo "$as_me:5561: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -6132,7 +5575,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:6135: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:5578: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -6148,7 +5591,7 @@ echo "${as_me:-configure}:6135: testing adding $cf_add_incdir to include-path ..
fi
else
-{ { echo "$as_me:6151: error: cannot find libiconv under $withval" >&5
+{ { echo "$as_me:5594: error: cannot find libiconv under $withval" >&5
echo "$as_me: error: cannot find libiconv under $withval" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -6173,7 +5616,7 @@ if test -n "$cf_searchpath/lib" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:6176: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:5619: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -6202,7 +5645,7 @@ if test -n "$cf_searchpath" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:6205: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:5648: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -6211,7 +5654,7 @@ echo "${as_me:-configure}:6205: testing adding $cf_add_libdir to library-path ..
fi
else
-{ { echo "$as_me:6214: error: cannot find libiconv under $withval" >&5
+{ { echo "$as_me:5657: error: cannot find libiconv under $withval" >&5
echo "$as_me: error: cannot find libiconv under $withval" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -6222,7 +5665,7 @@ done
fi;
- echo "$as_me:6225: checking for iconv" >&5
+ echo "$as_me:5668: checking for iconv" >&5
echo $ECHO_N "checking for iconv... $ECHO_C" >&6
if test "${am_cv_func_iconv+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6233,12 +5676,12 @@ else
cf_cv_header_path_iconv=
cf_cv_library_path_iconv=
-echo "${as_me:-configure}:6236: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
+echo "${as_me:-configure}:5679: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
cf_save_LIBS="$LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 6241 "configure"
+#line 5684 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -6257,16 +5700,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6260: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5703: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6263: \$? = $ac_status" >&5
+ echo "$as_me:5706: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6266: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5709: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6269: \$? = $ac_status" >&5
+ echo "$as_me:5712: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_iconv=yes
@@ -6280,7 +5723,7 @@ cat conftest.$ac_ext >&5
LIBS="-liconv $cf_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 6283 "configure"
+#line 5726 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -6299,16 +5742,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6302: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5745: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6305: \$? = $ac_status" >&5
+ echo "$as_me:5748: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6308: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5751: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6311: \$? = $ac_status" >&5
+ echo "$as_me:5754: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_iconv=yes
@@ -6325,9 +5768,9 @@ cat conftest.$ac_ext >&5
test -n "$verbose" && echo " find linkage for iconv library" 1>&6
-echo "${as_me:-configure}:6328: testing find linkage for iconv library ..." 1>&5
+echo "${as_me:-configure}:5771: testing find linkage for iconv library ..." 1>&5
-echo "${as_me:-configure}:6330: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
+echo "${as_me:-configure}:5773: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
cf_save_CPPFLAGS="$CPPFLAGS"
cf_test_CPPFLAGS="$CPPFLAGS"
@@ -6440,11 +5883,11 @@ cf_search="$cf_search $cf_header_path_list"
if test -d $cf_cv_header_path_iconv ; then
test -n "$verbose" && echo " ... testing $cf_cv_header_path_iconv" 1>&6
-echo "${as_me:-configure}:6443: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
+echo "${as_me:-configure}:5886: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_iconv"
cat >conftest.$ac_ext <<_ACEOF
-#line 6447 "configure"
+#line 5890 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -6463,21 +5906,21 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6466: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5909: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6469: \$? = $ac_status" >&5
+ echo "$as_me:5912: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6472: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5915: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6475: \$? = $ac_status" >&5
+ echo "$as_me:5918: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
test -n "$verbose" && echo " ... found iconv headers in $cf_cv_header_path_iconv" 1>&6
-echo "${as_me:-configure}:6480: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
+echo "${as_me:-configure}:5923: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
cf_cv_find_linkage_iconv=maybe
cf_test_CPPFLAGS="$CPPFLAGS"
@@ -6495,7 +5938,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_cv_find_linkage_iconv" = maybe ; then
-echo "${as_me:-configure}:6498: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
+echo "${as_me:-configure}:5941: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
cf_save_LIBS="$LIBS"
cf_save_LDFLAGS="$LDFLAGS"
@@ -6592,13 +6035,13 @@ cf_search="$cf_library_path_list $cf_search"
if test -d $cf_cv_library_path_iconv ; then
test -n "$verbose" && echo " ... testing $cf_cv_library_path_iconv" 1>&6
-echo "${as_me:-configure}:6595: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
+echo "${as_me:-configure}:6038: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
CPPFLAGS="$cf_test_CPPFLAGS"
LIBS="-liconv $cf_save_LIBS"
LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
cat >conftest.$ac_ext <<_ACEOF
-#line 6601 "configure"
+#line 6044 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -6617,21 +6060,21 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6620: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6063: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6623: \$? = $ac_status" >&5
+ echo "$as_me:6066: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6626: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6069: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6629: \$? = $ac_status" >&5
+ echo "$as_me:6072: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
test -n "$verbose" && echo " ... found iconv library in $cf_cv_library_path_iconv" 1>&6
-echo "${as_me:-configure}:6634: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
+echo "${as_me:-configure}:6077: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
cf_cv_find_linkage_iconv=yes
cf_cv_library_file_iconv="-liconv"
@@ -6671,7 +6114,7 @@ am_cv_func_iconv="no, consider installing GNU libiconv"
fi
fi
-echo "$as_me:6674: result: $am_cv_func_iconv" >&5
+echo "$as_me:6117: result: $am_cv_func_iconv" >&5
echo "${ECHO_T}$am_cv_func_iconv" >&6
if test "$am_cv_func_iconv" = yes; then
@@ -6680,14 +6123,14 @@ cat >>confdefs.h <<\EOF
#define HAVE_ICONV 1
EOF
- echo "$as_me:6683: checking if the declaration of iconv() needs const." >&5
+ echo "$as_me:6126: checking if the declaration of iconv() needs const." >&5
echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
if test "${am_cv_proto_iconv_const+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 6690 "configure"
+#line 6133 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -6712,16 +6155,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6715: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6158: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6718: \$? = $ac_status" >&5
+ echo "$as_me:6161: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6721: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6164: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6724: \$? = $ac_status" >&5
+ echo "$as_me:6167: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
am_cv_proto_iconv_const=no
else
@@ -6731,7 +6174,7 @@ am_cv_proto_iconv_const=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:6734: result: $am_cv_proto_iconv_const" >&5
+echo "$as_me:6177: result: $am_cv_proto_iconv_const" >&5
echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
if test "$am_cv_proto_iconv_const" = yes ; then
@@ -6773,7 +6216,7 @@ if test -n "$cf_cv_header_path_iconv" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 6776 "configure"
+#line 6219 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -6785,16 +6228,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6788: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6231: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6791: \$? = $ac_status" >&5
+ echo "$as_me:6234: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6794: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6237: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6797: \$? = $ac_status" >&5
+ echo "$as_me:6240: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -6811,7 +6254,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:6814: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:6257: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -6848,7 +6291,7 @@ if test -n "$cf_cv_library_path_iconv" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:6851: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:6294: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -6859,13 +6302,13 @@ fi
fi
fi
- echo "$as_me:6862: checking for nl_langinfo and CODESET" >&5
+ echo "$as_me:6305: checking for nl_langinfo and CODESET" >&5
echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
if test "${am_cv_langinfo_codeset+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 6868 "configure"
+#line 6311 "configure"
#include "confdefs.h"
#include <langinfo.h>
int
@@ -6877,16 +6320,16 @@ char* cs = nl_langinfo(CODESET);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6880: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6323: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6883: \$? = $ac_status" >&5
+ echo "$as_me:6326: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6886: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6329: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6889: \$? = $ac_status" >&5
+ echo "$as_me:6332: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
am_cv_langinfo_codeset=yes
else
@@ -6897,7 +6340,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:6900: result: $am_cv_langinfo_codeset" >&5
+echo "$as_me:6343: result: $am_cv_langinfo_codeset" >&5
echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
if test $am_cv_langinfo_codeset = yes; then
@@ -6908,13 +6351,13 @@ EOF
fi
if test $ac_cv_header_locale_h = yes; then
- echo "$as_me:6911: checking for LC_MESSAGES" >&5
+ echo "$as_me:6354: checking for LC_MESSAGES" >&5
echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
if test "${am_cv_val_LC_MESSAGES+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 6917 "configure"
+#line 6360 "configure"
#include "confdefs.h"
#include <locale.h>
int
@@ -6926,16 +6369,16 @@ return LC_MESSAGES
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6929: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6372: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6932: \$? = $ac_status" >&5
+ echo "$as_me:6375: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6935: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6378: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6938: \$? = $ac_status" >&5
+ echo "$as_me:6381: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
am_cv_val_LC_MESSAGES=yes
else
@@ -6945,7 +6388,7 @@ am_cv_val_LC_MESSAGES=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:6948: result: $am_cv_val_LC_MESSAGES" >&5
+echo "$as_me:6391: result: $am_cv_val_LC_MESSAGES" >&5
echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
if test $am_cv_val_LC_MESSAGES = yes; then
@@ -6955,7 +6398,7 @@ EOF
fi
fi
- echo "$as_me:6958: checking whether NLS is requested" >&5
+ echo "$as_me:6401: checking whether NLS is requested" >&5
echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
# Check whether --enable-nls or --disable-nls was given.
@@ -6965,7 +6408,7 @@ if test "${enable_nls+set}" = set; then
else
USE_NLS=no
fi;
- echo "$as_me:6968: result: $USE_NLS" >&5
+ echo "$as_me:6411: result: $USE_NLS" >&5
echo "${ECHO_T}$USE_NLS" >&6
BUILD_INCLUDED_LIBINTL=no
@@ -6978,7 +6421,7 @@ cat >>confdefs.h <<\EOF
#define ENABLE_NLS 1
EOF
- echo "$as_me:6981: checking whether included gettext is requested" >&5
+ echo "$as_me:6424: checking whether included gettext is requested" >&5
echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
# Check whether --with-included-gettext or --without-included-gettext was given.
@@ -6988,7 +6431,7 @@ if test "${with_included_gettext+set}" = set; then
else
nls_cv_force_use_gnu_gettext=no
fi;
- echo "$as_me:6991: result: $nls_cv_force_use_gnu_gettext" >&5
+ echo "$as_me:6434: result: $nls_cv_force_use_gnu_gettext" >&5
echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
@@ -6997,7 +6440,7 @@ echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
cf_save_LIBS_1="$LIBS"
LIBS="$LIBICONV $LIBS"
- echo "$as_me:7000: checking for libintl.h and gettext()" >&5
+ echo "$as_me:6443: checking for libintl.h and gettext()" >&5
echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
if test "${cf_cv_func_gettext+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7008,12 +6451,12 @@ else
cf_cv_header_path_intl=
cf_cv_library_path_intl=
-echo "${as_me:-configure}:7011: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
+echo "${as_me:-configure}:6454: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
cf_save_LIBS="$LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 7016 "configure"
+#line 6459 "configure"
#include "confdefs.h"
#include <libintl.h>
@@ -7033,16 +6476,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7036: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6479: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7039: \$? = $ac_status" >&5
+ echo "$as_me:6482: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7042: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6485: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7045: \$? = $ac_status" >&5
+ echo "$as_me:6488: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_intl=yes
@@ -7056,7 +6499,7 @@ cat conftest.$ac_ext >&5
LIBS="-lintl $cf_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 7059 "configure"
+#line 6502 "configure"
#include "confdefs.h"
#include <libintl.h>
@@ -7076,16 +6519,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7079: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6522: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7082: \$? = $ac_status" >&5
+ echo "$as_me:6525: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7085: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6528: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7088: \$? = $ac_status" >&5
+ echo "$as_me:6531: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_intl=yes
@@ -7102,9 +6545,9 @@ cat conftest.$ac_ext >&5
test -n "$verbose" && echo " find linkage for intl library" 1>&6
-echo "${as_me:-configure}:7105: testing find linkage for intl library ..." 1>&5
+echo "${as_me:-configure}:6548: testing find linkage for intl library ..." 1>&5
-echo "${as_me:-configure}:7107: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
+echo "${as_me:-configure}:6550: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
cf_save_CPPFLAGS="$CPPFLAGS"
cf_test_CPPFLAGS="$CPPFLAGS"
@@ -7217,11 +6660,11 @@ cf_search="$cf_search $cf_header_path_list"
if test -d $cf_cv_header_path_intl ; then
test -n "$verbose" && echo " ... testing $cf_cv_header_path_intl" 1>&6
-echo "${as_me:-configure}:7220: testing ... testing $cf_cv_header_path_intl ..." 1>&5
+echo "${as_me:-configure}:6663: testing ... testing $cf_cv_header_path_intl ..." 1>&5
CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_intl"
cat >conftest.$ac_ext <<_ACEOF
-#line 7224 "configure"
+#line 6667 "configure"
#include "confdefs.h"
#include <libintl.h>
@@ -7241,21 +6684,21 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7244: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6687: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7247: \$? = $ac_status" >&5
+ echo "$as_me:6690: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7250: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6693: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7253: \$? = $ac_status" >&5
+ echo "$as_me:6696: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
test -n "$verbose" && echo " ... found intl headers in $cf_cv_header_path_intl" 1>&6
-echo "${as_me:-configure}:7258: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
+echo "${as_me:-configure}:6701: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
cf_cv_find_linkage_intl=maybe
cf_test_CPPFLAGS="$CPPFLAGS"
@@ -7273,7 +6716,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_cv_find_linkage_intl" = maybe ; then
-echo "${as_me:-configure}:7276: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
+echo "${as_me:-configure}:6719: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
cf_save_LIBS="$LIBS"
cf_save_LDFLAGS="$LDFLAGS"
@@ -7370,13 +6813,13 @@ cf_search="$cf_library_path_list $cf_search"
if test -d $cf_cv_library_path_intl ; then
test -n "$verbose" && echo " ... testing $cf_cv_library_path_intl" 1>&6
-echo "${as_me:-configure}:7373: testing ... testing $cf_cv_library_path_intl ..." 1>&5
+echo "${as_me:-configure}:6816: testing ... testing $cf_cv_library_path_intl ..." 1>&5
CPPFLAGS="$cf_test_CPPFLAGS"
LIBS="-lintl $cf_save_LIBS"
LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
cat >conftest.$ac_ext <<_ACEOF
-#line 7379 "configure"
+#line 6822 "configure"
#include "confdefs.h"
#include <libintl.h>
@@ -7396,21 +6839,21 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7399: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6842: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7402: \$? = $ac_status" >&5
+ echo "$as_me:6845: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7405: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6848: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7408: \$? = $ac_status" >&5
+ echo "$as_me:6851: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
test -n "$verbose" && echo " ... found intl library in $cf_cv_library_path_intl" 1>&6
-echo "${as_me:-configure}:7413: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
+echo "${as_me:-configure}:6856: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
cf_cv_find_linkage_intl=yes
cf_cv_library_file_intl="-lintl"
@@ -7450,7 +6893,7 @@ cf_cv_func_gettext=no
fi
fi
-echo "$as_me:7453: result: $cf_cv_func_gettext" >&5
+echo "$as_me:6896: result: $cf_cv_func_gettext" >&5
echo "${ECHO_T}$cf_cv_func_gettext" >&6
LIBS="$cf_save_LIBS_1"
@@ -7489,7 +6932,7 @@ if test -n "$cf_cv_header_path_intl" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 7492 "configure"
+#line 6935 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -7501,16 +6944,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7504: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6947: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7507: \$? = $ac_status" >&5
+ echo "$as_me:6950: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7510: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6953: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7513: \$? = $ac_status" >&5
+ echo "$as_me:6956: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -7527,7 +6970,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:7530: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:6973: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -7564,7 +7007,7 @@ if test -n "$cf_cv_library_path_intl" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:7567: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:7010: testing adding $cf_add_libdir to library-path ..." 1>&5
INTLLIBS="-L$cf_add_libdir $INTLLIBS"
fi
@@ -7580,13 +7023,13 @@ fi
for ac_func in dcgettext
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:7583: checking for $ac_func" >&5
+echo "$as_me:7026: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 7589 "configure"
+#line 7032 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -7617,16 +7060,16 @@ f = $ac_func;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7620: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7063: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7623: \$? = $ac_status" >&5
+ echo "$as_me:7066: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7626: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7069: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7629: \$? = $ac_status" >&5
+ echo "$as_me:7072: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -7636,7 +7079,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:7639: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:7082: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -7651,7 +7094,7 @@ done
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-echo "$as_me:7654: checking for $ac_word" >&5
+echo "$as_me:7097: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_MSGFMT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7678,16 +7121,16 @@ esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test "$MSGFMT" != ":"; then
- echo "$as_me:7681: result: $MSGFMT" >&5
+ echo "$as_me:7124: result: $MSGFMT" >&5
echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$as_me:7684: result: no" >&5
+ echo "$as_me:7127: result: no" >&5
echo "${ECHO_T}no" >&6
fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
-echo "$as_me:7690: checking for $ac_word" >&5
+echo "$as_me:7133: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_GMSGFMT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7704,7 +7147,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if $as_executable_p "$ac_dir/$ac_word"; then
ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- echo "$as_me:7707: found $ac_dir/$ac_word" >&5
+ echo "$as_me:7150: found $ac_dir/$ac_word" >&5
break
fi
done
@@ -7716,17 +7159,17 @@ fi
GMSGFMT=$ac_cv_path_GMSGFMT
if test -n "$GMSGFMT"; then
- echo "$as_me:7719: result: $GMSGFMT" >&5
+ echo "$as_me:7162: result: $GMSGFMT" >&5
echo "${ECHO_T}$GMSGFMT" >&6
else
- echo "$as_me:7722: result: no" >&5
+ echo "$as_me:7165: result: no" >&5
echo "${ECHO_T}no" >&6
fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
-echo "$as_me:7729: checking for $ac_word" >&5
+echo "$as_me:7172: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_XGETTEXT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7753,10 +7196,10 @@ esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test "$XGETTEXT" != ":"; then
- echo "$as_me:7756: result: $XGETTEXT" >&5
+ echo "$as_me:7199: result: $XGETTEXT" >&5
echo "${ECHO_T}$XGETTEXT" >&6
else
- echo "$as_me:7759: result: no" >&5
+ echo "$as_me:7202: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -7771,7 +7214,7 @@ fi
if test "$nls_cv_use_gnu_gettext" = "yes"; then
if test ! -d $srcdir/intl ; then
- { { echo "$as_me:7774: error: no NLS library is packaged with this application" >&5
+ { { echo "$as_me:7217: error: no NLS library is packaged with this application" >&5
echo "$as_me: error: no NLS library is packaged with this application" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -7779,7 +7222,7 @@ echo "$as_me: error: no NLS library is packaged with this application" >&2;}
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-echo "$as_me:7782: checking for $ac_word" >&5
+echo "$as_me:7225: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_MSGFMT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7806,16 +7249,16 @@ esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test "$MSGFMT" != ":"; then
- echo "$as_me:7809: result: $MSGFMT" >&5
+ echo "$as_me:7252: result: $MSGFMT" >&5
echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$as_me:7812: result: no" >&5
+ echo "$as_me:7255: result: no" >&5
echo "${ECHO_T}no" >&6
fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
-echo "$as_me:7818: checking for $ac_word" >&5
+echo "$as_me:7261: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_GMSGFMT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7832,7 +7275,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if $as_executable_p "$ac_dir/$ac_word"; then
ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- echo "$as_me:7835: found $ac_dir/$ac_word" >&5
+ echo "$as_me:7278: found $ac_dir/$ac_word" >&5
break
fi
done
@@ -7844,17 +7287,17 @@ fi
GMSGFMT=$ac_cv_path_GMSGFMT
if test -n "$GMSGFMT"; then
- echo "$as_me:7847: result: $GMSGFMT" >&5
+ echo "$as_me:7290: result: $GMSGFMT" >&5
echo "${ECHO_T}$GMSGFMT" >&6
else
- echo "$as_me:7850: result: no" >&5
+ echo "$as_me:7293: result: no" >&5
echo "${ECHO_T}no" >&6
fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
-echo "$as_me:7857: checking for $ac_word" >&5
+echo "$as_me:7300: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_XGETTEXT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7881,10 +7324,10 @@ esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test "$XGETTEXT" != ":"; then
- echo "$as_me:7884: result: $XGETTEXT" >&5
+ echo "$as_me:7327: result: $XGETTEXT" >&5
echo "${ECHO_T}$XGETTEXT" >&6
else
- echo "$as_me:7887: result: no" >&5
+ echo "$as_me:7330: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -7899,7 +7342,7 @@ fi
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
: ;
else
- echo "$as_me:7902: result: found msgfmt program is not GNU msgfmt; ignore it" >&5
+ echo "$as_me:7345: result: found msgfmt program is not GNU msgfmt; ignore it" >&5
echo "${ECHO_T}found msgfmt program is not GNU msgfmt; ignore it" >&6
GMSGFMT=":"
fi
@@ -7909,7 +7352,7 @@ echo "${ECHO_T}found msgfmt program is not GNU msgfmt; ignore it" >&6
if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
: ;
else
- echo "$as_me:7912: result: found xgettext program is not GNU xgettext; ignore it" >&5
+ echo "$as_me:7355: result: found xgettext program is not GNU xgettext; ignore it" >&5
echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
XGETTEXT=":"
fi
@@ -7929,7 +7372,7 @@ echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:7932: checking for $ac_word" >&5
+echo "$as_me:7375: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_INTLBISON+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7944,7 +7387,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_INTLBISON="$ac_prog"
-echo "$as_me:7947: found $ac_dir/$ac_word" >&5
+echo "$as_me:7390: found $ac_dir/$ac_word" >&5
break
done
@@ -7952,10 +7395,10 @@ fi
fi
INTLBISON=$ac_cv_prog_INTLBISON
if test -n "$INTLBISON"; then
- echo "$as_me:7955: result: $INTLBISON" >&5
+ echo "$as_me:7398: result: $INTLBISON" >&5
echo "${ECHO_T}$INTLBISON" >&6
else
- echo "$as_me:7958: result: no" >&5
+ echo "$as_me:7401: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -7965,7 +7408,7 @@ done
if test -z "$INTLBISON"; then
ac_verc_fail=yes
else
- echo "$as_me:7968: checking version of bison" >&5
+ echo "$as_me:7411: checking version of bison" >&5
echo $ECHO_N "checking version of bison... $ECHO_C" >&6
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
@@ -7974,7 +7417,7 @@ echo $ECHO_N "checking version of bison... $ECHO_C" >&6
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
esac
- echo "$as_me:7977: result: $ac_prog_version" >&5
+ echo "$as_me:7420: result: $ac_prog_version" >&5
echo "${ECHO_T}$ac_prog_version" >&6
fi
if test $ac_verc_fail = yes; then
@@ -8000,7 +7443,7 @@ echo "${ECHO_T}$ac_prog_version" >&6
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
- echo "$as_me:8003: checking for catalogs to be installed" >&5
+ echo "$as_me:7446: checking for catalogs to be installed" >&5
echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
NEW_LINGUAS=
for presentlang in $ALL_LINGUAS; do
@@ -8020,7 +7463,7 @@ echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
fi
done
LINGUAS=$NEW_LINGUAS
- echo "$as_me:8023: result: $LINGUAS" >&5
+ echo "$as_me:7466: result: $LINGUAS" >&5
echo "${ECHO_T}$LINGUAS" >&6
fi
@@ -8055,7 +7498,7 @@ cf_makefile=makefile
use_our_messages=no
if test "$USE_NLS" = yes ; then
if test -d $srcdir/po ; then
-echo "$as_me:8058: checking if we should use included message-library" >&5
+echo "$as_me:7501: checking if we should use included message-library" >&5
echo $ECHO_N "checking if we should use included message-library... $ECHO_C" >&6
# Check whether --enable-included-msgs or --disable-included-msgs was given.
@@ -8066,7 +7509,7 @@ else
use_our_messages=yes
fi;
fi
-echo "$as_me:8069: result: $use_our_messages" >&5
+echo "$as_me:7512: result: $use_our_messages" >&5
echo "${ECHO_T}$use_our_messages" >&6
fi
@@ -8107,23 +7550,23 @@ else
for ac_header in libintl.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:8110: checking for $ac_header" >&5
+echo "$as_me:7553: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8116 "configure"
+#line 7559 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:8120: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:7563: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:8126: \$? = $ac_status" >&5
+ echo "$as_me:7569: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -8142,7 +7585,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:8145: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:7588: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -8187,14 +7630,14 @@ EOF
fi
fi
-echo "$as_me:8190: checking if -lm needed for math functions" >&5
+echo "$as_me:7633: checking if -lm needed for math functions" >&5
echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
if test "${cf_cv_need_libm+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8197 "configure"
+#line 7640 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -8209,16 +7652,16 @@ double x = rand(); printf("result = %g\n", sqrt(x))
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8212: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7655: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8215: \$? = $ac_status" >&5
+ echo "$as_me:7658: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8218: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7661: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8221: \$? = $ac_status" >&5
+ echo "$as_me:7664: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_need_libm=no
else
@@ -8228,7 +7671,7 @@ cf_cv_need_libm=yes
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:8231: result: $cf_cv_need_libm" >&5
+echo "$as_me:7674: result: $cf_cv_need_libm" >&5
echo "${ECHO_T}$cf_cv_need_libm" >&6
if test "$cf_cv_need_libm" = yes
then
@@ -8237,7 +7680,7 @@ then
fi
-echo "$as_me:8240: checking if you want to use dmalloc for testing" >&5
+echo "$as_me:7683: checking if you want to use dmalloc for testing" >&5
echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
# Check whether --with-dmalloc or --without-dmalloc was given.
@@ -8253,7 +7696,7 @@ EOF
else
with_dmalloc=
fi;
-echo "$as_me:8256: result: ${with_dmalloc:-no}" >&5
+echo "$as_me:7699: result: ${with_dmalloc:-no}" >&5
echo "${ECHO_T}${with_dmalloc:-no}" >&6
case .$with_cflags in #(vi
@@ -8347,23 +7790,23 @@ fi
esac
if test "$with_dmalloc" = yes ; then
- echo "$as_me:8350: checking for dmalloc.h" >&5
+ echo "$as_me:7793: checking for dmalloc.h" >&5
echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
if test "${ac_cv_header_dmalloc_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8356 "configure"
+#line 7799 "configure"
#include "confdefs.h"
#include <dmalloc.h>
_ACEOF
-if { (eval echo "$as_me:8360: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:7803: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:8366: \$? = $ac_status" >&5
+ echo "$as_me:7809: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -8382,11 +7825,11 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:8385: result: $ac_cv_header_dmalloc_h" >&5
+echo "$as_me:7828: result: $ac_cv_header_dmalloc_h" >&5
echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
if test $ac_cv_header_dmalloc_h = yes; then
-echo "$as_me:8389: checking for dmalloc_debug in -ldmalloc" >&5
+echo "$as_me:7832: checking for dmalloc_debug in -ldmalloc" >&5
echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8394,7 +7837,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldmalloc $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 8397 "configure"
+#line 7840 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -8413,16 +7856,16 @@ dmalloc_debug ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8416: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7859: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8419: \$? = $ac_status" >&5
+ echo "$as_me:7862: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8422: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7865: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8425: \$? = $ac_status" >&5
+ echo "$as_me:7868: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dmalloc_dmalloc_debug=yes
else
@@ -8433,7 +7876,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:8436: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
+echo "$as_me:7879: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
cat >>confdefs.h <<EOF
@@ -8448,7 +7891,7 @@ fi
fi
-echo "$as_me:8451: checking if you want to use dbmalloc for testing" >&5
+echo "$as_me:7894: checking if you want to use dbmalloc for testing" >&5
echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
# Check whether --with-dbmalloc or --without-dbmalloc was given.
@@ -8464,7 +7907,7 @@ EOF
else
with_dbmalloc=
fi;
-echo "$as_me:8467: result: ${with_dbmalloc:-no}" >&5
+echo "$as_me:7910: result: ${with_dbmalloc:-no}" >&5
echo "${ECHO_T}${with_dbmalloc:-no}" >&6
case .$with_cflags in #(vi
@@ -8558,23 +8001,23 @@ fi
esac
if test "$with_dbmalloc" = yes ; then
- echo "$as_me:8561: checking for dbmalloc.h" >&5
+ echo "$as_me:8004: checking for dbmalloc.h" >&5
echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
if test "${ac_cv_header_dbmalloc_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8567 "configure"
+#line 8010 "configure"
#include "confdefs.h"
#include <dbmalloc.h>
_ACEOF
-if { (eval echo "$as_me:8571: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:8014: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:8577: \$? = $ac_status" >&5
+ echo "$as_me:8020: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -8593,11 +8036,11 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:8596: result: $ac_cv_header_dbmalloc_h" >&5
+echo "$as_me:8039: result: $ac_cv_header_dbmalloc_h" >&5
echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
if test $ac_cv_header_dbmalloc_h = yes; then
-echo "$as_me:8600: checking for debug_malloc in -ldbmalloc" >&5
+echo "$as_me:8043: checking for debug_malloc in -ldbmalloc" >&5
echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8605,7 +8048,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldbmalloc $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 8608 "configure"
+#line 8051 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -8624,16 +8067,16 @@ debug_malloc ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8627: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8070: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8630: \$? = $ac_status" >&5
+ echo "$as_me:8073: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8633: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8076: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8636: \$? = $ac_status" >&5
+ echo "$as_me:8079: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dbmalloc_debug_malloc=yes
else
@@ -8644,7 +8087,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:8647: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
+echo "$as_me:8090: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
cat >>confdefs.h <<EOF
@@ -8659,7 +8102,7 @@ fi
fi
-echo "$as_me:8662: checking if you want to use purify for testing" >&5
+echo "$as_me:8105: checking if you want to use purify for testing" >&5
echo $ECHO_N "checking if you want to use purify for testing... $ECHO_C" >&6
# Check whether --with-purify or --without-purify was given.
@@ -8675,7 +8118,7 @@ EOF
else
with_purify=
fi;
-echo "$as_me:8678: result: ${with_purify:-no}" >&5
+echo "$as_me:8121: result: ${with_purify:-no}" >&5
echo "${ECHO_T}${with_purify:-no}" >&6
case .$with_cflags in #(vi
@@ -8768,7 +8211,7 @@ fi
;;
esac
-echo "$as_me:8771: checking if you want to use valgrind for testing" >&5
+echo "$as_me:8214: checking if you want to use valgrind for testing" >&5
echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
# Check whether --with-valgrind or --without-valgrind was given.
@@ -8784,7 +8227,7 @@ EOF
else
with_valgrind=
fi;
-echo "$as_me:8787: result: ${with_valgrind:-no}" >&5
+echo "$as_me:8230: result: ${with_valgrind:-no}" >&5
echo "${ECHO_T}${with_valgrind:-no}" >&6
case .$with_cflags in #(vi
@@ -8877,7 +8320,7 @@ fi
;;
esac
-echo "$as_me:8880: checking if you want to perform memory-leak testing" >&5
+echo "$as_me:8323: checking if you want to perform memory-leak testing" >&5
echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
# Check whether --with-no-leaks or --without-no-leaks was given.
@@ -8899,10 +8342,10 @@ EOF
else
with_no_leaks=
fi;
-echo "$as_me:8902: result: $with_no_leaks" >&5
+echo "$as_me:8345: result: $with_no_leaks" >&5
echo "${ECHO_T}$with_no_leaks" >&6
-echo "$as_me:8905: checking if you want --trace option" >&5
+echo "$as_me:8348: checking if you want --trace option" >&5
echo $ECHO_N "checking if you want --trace option... $ECHO_C" >&6
# Check whether --enable-trace or --disable-trace was given.
@@ -8912,7 +8355,7 @@ if test "${enable_trace+set}" = set; then
else
enableval=yes
fi;
-echo "$as_me:8915: result: $enableval" >&5
+echo "$as_me:8358: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS trace\$o"
@@ -8926,7 +8369,7 @@ fi
LIBTOOL_MAKE="#"
-echo "$as_me:8929: checking if libtool -version-number should be used" >&5
+echo "$as_me:8372: checking if libtool -version-number should be used" >&5
echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
# Check whether --enable-libtool-version or --disable-libtool-version was given.
@@ -8943,7 +8386,7 @@ else
cf_libtool_version=yes
fi;
-echo "$as_me:8946: result: $cf_libtool_version" >&5
+echo "$as_me:8389: result: $cf_libtool_version" >&5
echo "${ECHO_T}$cf_libtool_version" >&6
if test "$cf_libtool_version" = yes ; then
@@ -8968,7 +8411,7 @@ LIB_LINK='${CC}'
LIB_INSTALL=
LIB_UNINSTALL=
-echo "$as_me:8971: checking if you want to build libraries with libtool" >&5
+echo "$as_me:8414: checking if you want to build libraries with libtool" >&5
echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
# Check whether --with-libtool or --without-libtool was given.
@@ -8978,7 +8421,7 @@ if test "${with_libtool+set}" = set; then
else
with_libtool=no
fi;
-echo "$as_me:8981: result: $with_libtool" >&5
+echo "$as_me:8424: result: $with_libtool" >&5
echo "${ECHO_T}$with_libtool" >&6
if test "$with_libtool" != "no"; then
@@ -9009,7 +8452,7 @@ case ".$with_libtool" in #(vi
with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
;;
*)
- { { echo "$as_me:9012: error: expected a pathname, not \"$with_libtool\"" >&5
+ { { echo "$as_me:8455: error: expected a pathname, not \"$with_libtool\"" >&5
echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
{ (exit 1); exit 1; }; }
;;
@@ -9019,7 +8462,7 @@ esac
else
# Extract the first word of "libtool", so it can be a program name with args.
set dummy libtool; ac_word=$2
-echo "$as_me:9022: checking for $ac_word" >&5
+echo "$as_me:8465: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_LIBTOOL+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9036,7 +8479,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if $as_executable_p "$ac_dir/$ac_word"; then
ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
- echo "$as_me:9039: found $ac_dir/$ac_word" >&5
+ echo "$as_me:8482: found $ac_dir/$ac_word" >&5
break
fi
done
@@ -9047,16 +8490,16 @@ fi
LIBTOOL=$ac_cv_path_LIBTOOL
if test -n "$LIBTOOL"; then
- echo "$as_me:9050: result: $LIBTOOL" >&5
+ echo "$as_me:8493: result: $LIBTOOL" >&5
echo "${ECHO_T}$LIBTOOL" >&6
else
- echo "$as_me:9053: result: no" >&5
+ echo "$as_me:8496: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$LIBTOOL" ; then
- { { echo "$as_me:9059: error: Cannot find libtool" >&5
+ { { echo "$as_me:8502: error: Cannot find libtool" >&5
echo "$as_me: error: Cannot find libtool" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -9071,17 +8514,17 @@ echo "$as_me: error: Cannot find libtool" >&2;}
LIB_PREP=:
# Show the version of libtool
- echo "$as_me:9074: checking version of libtool" >&5
+ echo "$as_me:8517: checking version of libtool" >&5
echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
# Save the version in a cache variable - this is not entirely a good
# thing, but the version string from libtool is very ugly, and for
# bug reports it might be useful to have the original string. "("
cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
- echo "$as_me:9081: result: $cf_cv_libtool_version" >&5
+ echo "$as_me:8524: result: $cf_cv_libtool_version" >&5
echo "${ECHO_T}$cf_cv_libtool_version" >&6
if test -z "$cf_cv_libtool_version" ; then
- { { echo "$as_me:9084: error: This is not GNU libtool" >&5
+ { { echo "$as_me:8527: error: This is not GNU libtool" >&5
echo "$as_me: error: This is not GNU libtool" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -9089,7 +8532,7 @@ echo "$as_me: error: This is not GNU libtool" >&2;}
# special hack to add -no-undefined (which libtool should do for itself)
LT_UNDEF=
case "$cf_cv_system_name" in #(vi
- cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
+ cygwin*|mingw32*|uwin*|aix[456]) #(vi
LT_UNDEF=-no-undefined
;;
esac
@@ -9115,7 +8558,7 @@ if test "$with_libtool" = "yes" ; then
OBJEXT="lo"
LIBTOOL_MAKE=
-echo "$as_me:9118: checking for additional libtool options" >&5
+echo "$as_me:8561: checking for additional libtool options" >&5
echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
# Check whether --with-libtool-opts or --without-libtool-opts was given.
@@ -9125,7 +8568,7 @@ if test "${with_libtool_opts+set}" = set; then
else
with_libtool_opts=no
fi;
-echo "$as_me:9128: result: $with_libtool_opts" >&5
+echo "$as_me:8571: result: $with_libtool_opts" >&5
echo "${ECHO_T}$with_libtool_opts" >&6
case .$with_libtool_opts in
@@ -9138,7 +8581,7 @@ esac
fi
-echo "$as_me:9141: checking for specific curses-directory" >&5
+echo "$as_me:8584: checking for specific curses-directory" >&5
echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
# Check whether --with-curses-dir or --without-curses-dir was given.
@@ -9148,7 +8591,7 @@ if test "${with_curses_dir+set}" = set; then
else
cf_cv_curses_dir=no
fi;
-echo "$as_me:9151: result: $cf_cv_curses_dir" >&5
+echo "$as_me:8594: result: $cf_cv_curses_dir" >&5
echo "${ECHO_T}$cf_cv_curses_dir" >&6
if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
@@ -9179,7 +8622,7 @@ case ".$withval" in #(vi
withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
;;
*)
- { { echo "$as_me:9182: error: expected a pathname, not \"$withval\"" >&5
+ { { echo "$as_me:8625: error: expected a pathname, not \"$withval\"" >&5
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
{ (exit 1); exit 1; }; }
;;
@@ -9212,7 +8655,7 @@ if test -n "$cf_cv_curses_dir/include" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 9215 "configure"
+#line 8658 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -9224,16 +8667,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9227: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8670: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9230: \$? = $ac_status" >&5
+ echo "$as_me:8673: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9233: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8676: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9236: \$? = $ac_status" >&5
+ echo "$as_me:8679: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -9250,7 +8693,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:9253: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:8696: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -9284,7 +8727,7 @@ if test -n "$cf_cv_curses_dir/lib" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:9287: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:8730: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -9312,7 +8755,7 @@ if test $use_ncurses != no ; then
cf_wide_curses=yes
if test $use_ncurses = ncursesw ; then
-echo "$as_me:9315: checking for multibyte character support" >&5
+echo "$as_me:8758: checking for multibyte character support" >&5
echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
if test "${cf_cv_utf8_lib+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9320,7 +8763,7 @@ else
cf_save_LIBS="$LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 9323 "configure"
+#line 8766 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -9333,16 +8776,16 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9336: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8779: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9339: \$? = $ac_status" >&5
+ echo "$as_me:8782: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9342: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8785: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9345: \$? = $ac_status" >&5
+ echo "$as_me:8788: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_utf8_lib=yes
else
@@ -9354,12 +8797,12 @@ cat conftest.$ac_ext >&5
cf_cv_header_path_utf8=
cf_cv_library_path_utf8=
-echo "${as_me:-configure}:9357: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
+echo "${as_me:-configure}:8800: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
cf_save_LIBS="$LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 9362 "configure"
+#line 8805 "configure"
#include "confdefs.h"
#include <libutf8.h>
@@ -9372,16 +8815,16 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9375: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8818: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9378: \$? = $ac_status" >&5
+ echo "$as_me:8821: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9381: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8824: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9384: \$? = $ac_status" >&5
+ echo "$as_me:8827: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_utf8=yes
@@ -9395,7 +8838,7 @@ cat conftest.$ac_ext >&5
LIBS="-lutf8 $cf_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 9398 "configure"
+#line 8841 "configure"
#include "confdefs.h"
#include <libutf8.h>
@@ -9408,16 +8851,16 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9411: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8854: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9414: \$? = $ac_status" >&5
+ echo "$as_me:8857: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9417: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8860: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9420: \$? = $ac_status" >&5
+ echo "$as_me:8863: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_utf8=yes
@@ -9434,9 +8877,9 @@ cat conftest.$ac_ext >&5
test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
-echo "${as_me:-configure}:9437: testing find linkage for utf8 library ..." 1>&5
+echo "${as_me:-configure}:8880: testing find linkage for utf8 library ..." 1>&5
-echo "${as_me:-configure}:9439: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
+echo "${as_me:-configure}:8882: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
cf_save_CPPFLAGS="$CPPFLAGS"
cf_test_CPPFLAGS="$CPPFLAGS"
@@ -9549,11 +8992,11 @@ cf_search="$cf_search $cf_header_path_list"
if test -d $cf_cv_header_path_utf8 ; then
test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
-echo "${as_me:-configure}:9552: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:8995: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
cat >conftest.$ac_ext <<_ACEOF
-#line 9556 "configure"
+#line 8999 "configure"
#include "confdefs.h"
#include <libutf8.h>
@@ -9566,21 +9009,21 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9569: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9012: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9572: \$? = $ac_status" >&5
+ echo "$as_me:9015: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9575: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9018: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9578: \$? = $ac_status" >&5
+ echo "$as_me:9021: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
-echo "${as_me:-configure}:9583: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:9026: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
cf_cv_find_linkage_utf8=maybe
cf_test_CPPFLAGS="$CPPFLAGS"
@@ -9598,7 +9041,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_cv_find_linkage_utf8" = maybe ; then
-echo "${as_me:-configure}:9601: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
+echo "${as_me:-configure}:9044: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
cf_save_LIBS="$LIBS"
cf_save_LDFLAGS="$LDFLAGS"
@@ -9695,13 +9138,13 @@ cf_search="$cf_library_path_list $cf_search"
if test -d $cf_cv_library_path_utf8 ; then
test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
-echo "${as_me:-configure}:9698: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:9141: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
CPPFLAGS="$cf_test_CPPFLAGS"
LIBS="-lutf8 $cf_save_LIBS"
LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
cat >conftest.$ac_ext <<_ACEOF
-#line 9704 "configure"
+#line 9147 "configure"
#include "confdefs.h"
#include <libutf8.h>
@@ -9714,21 +9157,21 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9717: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9160: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9720: \$? = $ac_status" >&5
+ echo "$as_me:9163: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9723: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9166: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9726: \$? = $ac_status" >&5
+ echo "$as_me:9169: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
-echo "${as_me:-configure}:9731: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:9174: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
cf_cv_find_linkage_utf8=yes
cf_cv_library_file_utf8="-lutf8"
@@ -9770,7 +9213,7 @@ fi
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:9773: result: $cf_cv_utf8_lib" >&5
+echo "$as_me:9216: result: $cf_cv_utf8_lib" >&5
echo "${ECHO_T}$cf_cv_utf8_lib" >&6
# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
@@ -9804,7 +9247,7 @@ if test -n "$cf_cv_header_path_utf8" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 9807 "configure"
+#line 9250 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -9816,16 +9259,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9819: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9262: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9822: \$? = $ac_status" >&5
+ echo "$as_me:9265: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9825: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9268: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9828: \$? = $ac_status" >&5
+ echo "$as_me:9271: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -9842,7 +9285,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:9845: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:9288: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -9876,7 +9319,7 @@ if test -n "$cf_cv_library_path_utf8" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:9879: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:9322: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -9892,87 +9335,48 @@ fi
cf_ncuconfig_root=$use_ncurses
echo "Looking for ${cf_ncuconfig_root}-config"
-
-if test -n "$ac_tool_prefix"; then
- for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:9901: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$NCURSES_CONFIG"; then
- ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
-else
- ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
- IFS=$ac_save_IFS
- test -z "$ac_dir" && ac_dir=.
- $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
-echo "$as_me:9916: found $ac_dir/$ac_word" >&5
-break
-done
-
-fi
-fi
-NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
-if test -n "$NCURSES_CONFIG"; then
- echo "$as_me:9924: result: $NCURSES_CONFIG" >&5
-echo "${ECHO_T}$NCURSES_CONFIG" >&6
-else
- echo "$as_me:9927: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$NCURSES_CONFIG" && break
- done
-fi
-if test -z "$NCURSES_CONFIG"; then
- ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
- for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
+for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:9940: checking for $ac_word" >&5
+echo "$as_me:9342: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
+if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$ac_ct_NCURSES_CONFIG"; then
- ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
-else
+ case $NCURSES_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
IFS=$ac_save_IFS
test -z "$ac_dir" && ac_dir=.
- $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
-echo "$as_me:9955: found $ac_dir/$ac_word" >&5
-break
+ if $as_executable_p "$ac_dir/$ac_word"; then
+ ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
+ echo "$as_me:9359: found $ac_dir/$ac_word" >&5
+ break
+fi
done
+ ;;
+esac
fi
-fi
-ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
-if test -n "$ac_ct_NCURSES_CONFIG"; then
- echo "$as_me:9963: result: $ac_ct_NCURSES_CONFIG" >&5
-echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
+NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
+
+if test -n "$NCURSES_CONFIG"; then
+ echo "$as_me:9370: result: $NCURSES_CONFIG" >&5
+echo "${ECHO_T}$NCURSES_CONFIG" >&6
else
- echo "$as_me:9966: result: no" >&5
+ echo "$as_me:9373: result: no" >&5
echo "${ECHO_T}no" >&6
fi
- test -n "$ac_ct_NCURSES_CONFIG" && break
+ test -n "$NCURSES_CONFIG" && break
done
-test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
-
- NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
-fi
+test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
if test "$NCURSES_CONFIG" != none ; then
@@ -9981,7 +9385,7 @@ LIBS="`$NCURSES_CONFIG --libs` $LIBS"
# even with config script, some packages use no-override for curses.h
-echo "$as_me:9984: checking if we have identified curses headers" >&5
+echo "$as_me:9388: checking if we have identified curses headers" >&5
echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
if test "${cf_cv_ncurses_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9995,7 +9399,7 @@ for cf_header in \
curses.h
do
cat >conftest.$ac_ext <<_ACEOF
-#line 9998 "configure"
+#line 9402 "configure"
#include "confdefs.h"
#include <${cf_header}>
int
@@ -10007,16 +9411,16 @@ initscr(); tgoto("?", 0,0)
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10010: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9414: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10013: \$? = $ac_status" >&5
+ echo "$as_me:9417: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10016: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9420: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10019: \$? = $ac_status" >&5
+ echo "$as_me:9423: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_header=$cf_header; break
else
@@ -10027,11 +9431,11 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:10030: result: $cf_cv_ncurses_header" >&5
+echo "$as_me:9434: result: $cf_cv_ncurses_header" >&5
echo "${ECHO_T}$cf_cv_ncurses_header" >&6
if test "$cf_cv_ncurses_header" = none ; then
- { { echo "$as_me:10034: error: No curses header-files found" >&5
+ { { echo "$as_me:9438: error: No curses header-files found" >&5
echo "$as_me: error: No curses header-files found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -10041,23 +9445,23 @@ fi
for ac_header in $cf_cv_ncurses_header
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:10044: checking for $ac_header" >&5
+echo "$as_me:9448: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 10050 "configure"
+#line 9454 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:10054: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:9458: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:10060: \$? = $ac_status" >&5
+ echo "$as_me:9464: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -10076,7 +9480,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:10079: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:9483: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -10129,7 +9533,7 @@ if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 10132 "configure"
+#line 9536 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -10141,16 +9545,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10144: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9548: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10147: \$? = $ac_status" >&5
+ echo "$as_me:9551: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10150: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9554: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10153: \$? = $ac_status" >&5
+ echo "$as_me:9557: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -10167,7 +9571,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:10170: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:9574: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -10184,7 +9588,7 @@ fi
}
-echo "$as_me:10187: checking for $cf_ncuhdr_root header in include-path" >&5
+echo "$as_me:9591: checking for $cf_ncuhdr_root header in include-path" >&5
echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
if test "${cf_cv_ncurses_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10196,7 +9600,7 @@ else
do
cat >conftest.$ac_ext <<_ACEOF
-#line 10199 "configure"
+#line 9603 "configure"
#include "confdefs.h"
#include <$cf_header>
@@ -10220,16 +9624,16 @@ printf("old\n");
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10223: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9627: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10226: \$? = $ac_status" >&5
+ echo "$as_me:9630: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10229: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9633: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10232: \$? = $ac_status" >&5
+ echo "$as_me:9636: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_h=$cf_header
@@ -10244,14 +9648,14 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:10247: result: $cf_cv_ncurses_h" >&5
+echo "$as_me:9651: result: $cf_cv_ncurses_h" >&5
echo "${ECHO_T}$cf_cv_ncurses_h" >&6
if test "$cf_cv_ncurses_h" != no ; then
cf_cv_ncurses_header=$cf_cv_ncurses_h
else
-echo "$as_me:10254: checking for $cf_ncuhdr_root include-path" >&5
+echo "$as_me:9658: checking for $cf_ncuhdr_root include-path" >&5
echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
if test "${cf_cv_ncurses_h2+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10391,7 +9795,7 @@ if test -n "$cf_incdir" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 10394 "configure"
+#line 9798 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -10403,16 +9807,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10406: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9810: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10409: \$? = $ac_status" >&5
+ echo "$as_me:9813: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10412: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9816: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10415: \$? = $ac_status" >&5
+ echo "$as_me:9819: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -10429,7 +9833,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:10432: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:9836: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -10450,7 +9854,7 @@ fi
do
cat >conftest.$ac_ext <<_ACEOF
-#line 10453 "configure"
+#line 9857 "configure"
#include "confdefs.h"
#include <$cf_header>
@@ -10474,16 +9878,16 @@ printf("old\n");
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10477: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9881: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10480: \$? = $ac_status" >&5
+ echo "$as_me:9884: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10483: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9887: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10486: \$? = $ac_status" >&5
+ echo "$as_me:9890: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_h2=$cf_header
@@ -10504,12 +9908,12 @@ rm -f conftest.$ac_objext conftest.$ac_ext
CPPFLAGS="$cf_save2_CPPFLAGS"
test "$cf_cv_ncurses_h2" != no && break
done
- test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10507: error: not found" >&5
+ test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9911: error: not found" >&5
echo "$as_me: error: not found" >&2;}
{ (exit 1); exit 1; }; }
fi
-echo "$as_me:10512: result: $cf_cv_ncurses_h2" >&5
+echo "$as_me:9916: result: $cf_cv_ncurses_h2" >&5
echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
@@ -10542,7 +9946,7 @@ if test -n "$cf_1st_incdir" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 10545 "configure"
+#line 9949 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -10554,16 +9958,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10557: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9961: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10560: \$? = $ac_status" >&5
+ echo "$as_me:9964: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10563: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9967: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10566: \$? = $ac_status" >&5
+ echo "$as_me:9970: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -10580,7 +9984,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:10583: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:9987: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -10623,7 +10027,7 @@ EOF
;;
esac
-echo "$as_me:10626: checking for terminfo header" >&5
+echo "$as_me:10030: checking for terminfo header" >&5
echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
if test "${cf_cv_term_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10641,7 +10045,7 @@ esac
for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
do
cat >conftest.$ac_ext <<_ACEOF
-#line 10644 "configure"
+#line 10048 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -10656,16 +10060,16 @@ int x = auto_left_margin
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10659: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10063: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10662: \$? = $ac_status" >&5
+ echo "$as_me:10066: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10665: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10069: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10668: \$? = $ac_status" >&5
+ echo "$as_me:10072: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_term_header="$cf_test"
@@ -10681,7 +10085,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:10684: result: $cf_cv_term_header" >&5
+echo "$as_me:10088: result: $cf_cv_term_header" >&5
echo "${ECHO_T}$cf_cv_term_header" >&6
# Set definitions to allow ifdef'ing to accommodate subdirectories
@@ -10715,7 +10119,7 @@ cat >>confdefs.h <<\EOF
#define NCURSES 1
EOF
-echo "$as_me:10718: checking for ncurses version" >&5
+echo "$as_me:10122: checking for ncurses version" >&5
echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
if test "${cf_cv_ncurses_version+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10741,10 +10145,10 @@ Autoconf "old"
#endif
EOF
cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
- { (eval echo "$as_me:10744: \"$cf_try\"") >&5
+ { (eval echo "$as_me:10148: \"$cf_try\"") >&5
(eval $cf_try) 2>&5
ac_status=$?
- echo "$as_me:10747: \$? = $ac_status" >&5
+ echo "$as_me:10151: \$? = $ac_status" >&5
(exit $ac_status); }
if test -f conftest.out ; then
cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
@@ -10754,7 +10158,7 @@ EOF
else
cat >conftest.$ac_ext <<_ACEOF
-#line 10757 "configure"
+#line 10161 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -10779,15 +10183,15 @@ int main()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:10782: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10186: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10785: \$? = $ac_status" >&5
+ echo "$as_me:10189: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:10787: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10191: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10790: \$? = $ac_status" >&5
+ echo "$as_me:10194: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -10801,7 +10205,7 @@ fi
rm -f $cf_tempfile
fi
-echo "$as_me:10804: result: $cf_cv_ncurses_version" >&5
+echo "$as_me:10208: result: $cf_cv_ncurses_version" >&5
echo "${ECHO_T}$cf_cv_ncurses_version" >&6
test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
#define NCURSES 1
@@ -10813,7 +10217,7 @@ cf_nculib_root=$use_ncurses
# to link gpm.
cf_ncurses_LIBS=""
cf_ncurses_SAVE="$LIBS"
-echo "$as_me:10816: checking for Gpm_Open in -lgpm" >&5
+echo "$as_me:10220: checking for Gpm_Open in -lgpm" >&5
echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10821,7 +10225,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10824 "configure"
+#line 10228 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -10840,16 +10244,16 @@ Gpm_Open ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10843: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10247: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10846: \$? = $ac_status" >&5
+ echo "$as_me:10250: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10849: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10253: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10852: \$? = $ac_status" >&5
+ echo "$as_me:10256: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_gpm_Gpm_Open=yes
else
@@ -10860,10 +10264,10 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:10863: result: $ac_cv_lib_gpm_Gpm_Open" >&5
+echo "$as_me:10267: result: $ac_cv_lib_gpm_Gpm_Open" >&5
echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
if test $ac_cv_lib_gpm_Gpm_Open = yes; then
- echo "$as_me:10866: checking for initscr in -lgpm" >&5
+ echo "$as_me:10270: checking for initscr in -lgpm" >&5
echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
if test "${ac_cv_lib_gpm_initscr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10871,7 +10275,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10874 "configure"
+#line 10278 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -10890,16 +10294,16 @@ initscr ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10893: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10297: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10896: \$? = $ac_status" >&5
+ echo "$as_me:10300: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10899: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10303: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10902: \$? = $ac_status" >&5
+ echo "$as_me:10306: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_gpm_initscr=yes
else
@@ -10910,7 +10314,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:10913: result: $ac_cv_lib_gpm_initscr" >&5
+echo "$as_me:10317: result: $ac_cv_lib_gpm_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
if test $ac_cv_lib_gpm_initscr = yes; then
LIBS="$cf_ncurses_SAVE"
@@ -10925,7 +10329,7 @@ freebsd*)
# This is only necessary if you are linking against an obsolete
# version of ncurses (but it should do no harm, since it's static).
if test "$cf_nculib_root" = ncurses ; then
- echo "$as_me:10928: checking for tgoto in -lmytinfo" >&5
+ echo "$as_me:10332: checking for tgoto in -lmytinfo" >&5
echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10933,7 +10337,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lmytinfo $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10936 "configure"
+#line 10340 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -10952,16 +10356,16 @@ tgoto ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10955: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10359: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10958: \$? = $ac_status" >&5
+ echo "$as_me:10362: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10961: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10365: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10964: \$? = $ac_status" >&5
+ echo "$as_me:10368: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_mytinfo_tgoto=yes
else
@@ -10972,7 +10376,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:10975: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "$as_me:10379: result: $ac_cv_lib_mytinfo_tgoto" >&5
echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
if test $ac_cv_lib_mytinfo_tgoto = yes; then
cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
@@ -10991,13 +10395,13 @@ else
eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
cf_libdir=""
- echo "$as_me:10994: checking for initscr" >&5
+ echo "$as_me:10398: checking for initscr" >&5
echo $ECHO_N "checking for initscr... $ECHO_C" >&6
if test "${ac_cv_func_initscr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11000 "configure"
+#line 10404 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char initscr (); below. */
@@ -11028,16 +10432,16 @@ f = initscr;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11031: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10435: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11034: \$? = $ac_status" >&5
+ echo "$as_me:10438: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11037: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10441: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11040: \$? = $ac_status" >&5
+ echo "$as_me:10444: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_initscr=yes
else
@@ -11047,18 +10451,18 @@ ac_cv_func_initscr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:11050: result: $ac_cv_func_initscr" >&5
+echo "$as_me:10454: result: $ac_cv_func_initscr" >&5
echo "${ECHO_T}$ac_cv_func_initscr" >&6
if test $ac_cv_func_initscr = yes; then
eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
else
cf_save_LIBS="$LIBS"
- echo "$as_me:11057: checking for initscr in -l$cf_nculib_root" >&5
+ echo "$as_me:10461: checking for initscr in -l$cf_nculib_root" >&5
echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
LIBS="-l$cf_nculib_root $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 11061 "configure"
+#line 10465 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -11070,25 +10474,25 @@ initscr()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11073: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10477: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11076: \$? = $ac_status" >&5
+ echo "$as_me:10480: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11079: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10483: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11082: \$? = $ac_status" >&5
+ echo "$as_me:10486: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:11084: result: yes" >&5
+ echo "$as_me:10488: result: yes" >&5
echo "${ECHO_T}yes" >&6
eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-echo "$as_me:11091: result: no" >&5
+echo "$as_me:10495: result: no" >&5
echo "${ECHO_T}no" >&6
cf_search=
@@ -11178,11 +10582,11 @@ cf_search="$cf_library_path_list $cf_search"
for cf_libdir in $cf_search
do
- echo "$as_me:11181: checking for -l$cf_nculib_root in $cf_libdir" >&5
+ echo "$as_me:10585: checking for -l$cf_nculib_root in $cf_libdir" >&5
echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 11185 "configure"
+#line 10589 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -11194,25 +10598,25 @@ initscr()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11197: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10601: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11200: \$? = $ac_status" >&5
+ echo "$as_me:10604: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11203: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10607: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11206: \$? = $ac_status" >&5
+ echo "$as_me:10610: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:11208: result: yes" >&5
+ echo "$as_me:10612: result: yes" >&5
echo "${ECHO_T}yes" >&6
eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
break
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-echo "$as_me:11215: result: no" >&5
+echo "$as_me:10619: result: no" >&5
echo "${ECHO_T}no" >&6
LIBS="$cf_save_LIBS"
fi
@@ -11227,7 +10631,7 @@ fi
eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
if test $cf_found_library = no ; then
- { { echo "$as_me:11230: error: Cannot link $cf_nculib_root library" >&5
+ { { echo "$as_me:10634: error: Cannot link $cf_nculib_root library" >&5
echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -11235,7 +10639,7 @@ fi
fi
if test -n "$cf_ncurses_LIBS" ; then
- echo "$as_me:11238: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
+ echo "$as_me:10642: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
cf_ncurses_SAVE="$LIBS"
for p in $cf_ncurses_LIBS ; do
@@ -11245,7 +10649,7 @@ echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS..
fi
done
cat >conftest.$ac_ext <<_ACEOF
-#line 11248 "configure"
+#line 10652 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -11257,23 +10661,23 @@ initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11260: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10664: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11263: \$? = $ac_status" >&5
+ echo "$as_me:10667: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11266: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10670: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11269: \$? = $ac_status" >&5
+ echo "$as_me:10673: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:11271: result: yes" >&5
+ echo "$as_me:10675: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-echo "$as_me:11276: result: no" >&5
+echo "$as_me:10680: result: no" >&5
echo "${ECHO_T}no" >&6
LIBS="$cf_ncurses_SAVE"
fi
@@ -11291,7 +10695,7 @@ fi
else
cf_wide_curses=no
-echo "$as_me:11294: checking for extra include directories" >&5
+echo "$as_me:10698: checking for extra include directories" >&5
echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
if test "${cf_cv_curses_incdir+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11317,11 +10721,11 @@ sunos3*|sunos4*)
esac
fi
-echo "$as_me:11320: result: $cf_cv_curses_incdir" >&5
+echo "$as_me:10724: result: $cf_cv_curses_incdir" >&5
echo "${ECHO_T}$cf_cv_curses_incdir" >&6
test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
-echo "$as_me:11324: checking if we have identified curses headers" >&5
+echo "$as_me:10728: checking if we have identified curses headers" >&5
echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
if test "${cf_cv_ncurses_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11333,7 +10737,7 @@ for cf_header in \
curses.h ncurses/ncurses.h ncurses/curses.h
do
cat >conftest.$ac_ext <<_ACEOF
-#line 11336 "configure"
+#line 10740 "configure"
#include "confdefs.h"
#include <${cf_header}>
int
@@ -11345,16 +10749,16 @@ initscr(); tgoto("?", 0,0)
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11348: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10752: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11351: \$? = $ac_status" >&5
+ echo "$as_me:10755: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11354: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10758: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11357: \$? = $ac_status" >&5
+ echo "$as_me:10761: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_header=$cf_header; break
else
@@ -11365,11 +10769,11 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:11368: result: $cf_cv_ncurses_header" >&5
+echo "$as_me:10772: result: $cf_cv_ncurses_header" >&5
echo "${ECHO_T}$cf_cv_ncurses_header" >&6
if test "$cf_cv_ncurses_header" = none ; then
- { { echo "$as_me:11372: error: No curses header-files found" >&5
+ { { echo "$as_me:10776: error: No curses header-files found" >&5
echo "$as_me: error: No curses header-files found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -11379,23 +10783,23 @@ fi
for ac_header in $cf_cv_ncurses_header
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:11382: checking for $ac_header" >&5
+echo "$as_me:10786: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11388 "configure"
+#line 10792 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:11392: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:10796: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:11398: \$? = $ac_status" >&5
+ echo "$as_me:10802: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -11414,7 +10818,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:11417: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:10821: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -11424,7 +10828,7 @@ EOF
fi
done
-echo "$as_me:11427: checking for terminfo header" >&5
+echo "$as_me:10831: checking for terminfo header" >&5
echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
if test "${cf_cv_term_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11442,7 +10846,7 @@ esac
for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
do
cat >conftest.$ac_ext <<_ACEOF
-#line 11445 "configure"
+#line 10849 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -11457,16 +10861,16 @@ int x = auto_left_margin
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11460: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10864: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11463: \$? = $ac_status" >&5
+ echo "$as_me:10867: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11466: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10870: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11469: \$? = $ac_status" >&5
+ echo "$as_me:10873: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_term_header="$cf_test"
@@ -11482,7 +10886,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:11485: result: $cf_cv_term_header" >&5
+echo "$as_me:10889: result: $cf_cv_term_header" >&5
echo "${ECHO_T}$cf_cv_term_header" >&6
# Set definitions to allow ifdef'ing to accommodate subdirectories
@@ -11511,7 +10915,7 @@ EOF
;;
esac
-echo "$as_me:11514: checking for ncurses version" >&5
+echo "$as_me:10918: checking for ncurses version" >&5
echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
if test "${cf_cv_ncurses_version+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11537,10 +10941,10 @@ Autoconf "old"
#endif
EOF
cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
- { (eval echo "$as_me:11540: \"$cf_try\"") >&5
+ { (eval echo "$as_me:10944: \"$cf_try\"") >&5
(eval $cf_try) 2>&5
ac_status=$?
- echo "$as_me:11543: \$? = $ac_status" >&5
+ echo "$as_me:10947: \$? = $ac_status" >&5
(exit $ac_status); }
if test -f conftest.out ; then
cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
@@ -11550,7 +10954,7 @@ EOF
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11553 "configure"
+#line 10957 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -11575,15 +10979,15 @@ int main()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:11578: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10982: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11581: \$? = $ac_status" >&5
+ echo "$as_me:10985: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:11583: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10987: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11586: \$? = $ac_status" >&5
+ echo "$as_me:10990: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -11597,16 +11001,16 @@ fi
rm -f $cf_tempfile
fi
-echo "$as_me:11600: result: $cf_cv_ncurses_version" >&5
+echo "$as_me:11004: result: $cf_cv_ncurses_version" >&5
echo "${ECHO_T}$cf_cv_ncurses_version" >&6
test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
#define NCURSES 1
EOF
-echo "$as_me:11606: checking if we have identified curses libraries" >&5
+echo "$as_me:11010: checking if we have identified curses libraries" >&5
echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line 11609 "configure"
+#line 11013 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -11618,16 +11022,16 @@ initscr(); tgoto("?", 0,0)
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11621: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11025: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11624: \$? = $ac_status" >&5
+ echo "$as_me:11028: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11627: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11031: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11630: \$? = $ac_status" >&5
+ echo "$as_me:11034: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -11636,13 +11040,13 @@ cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-echo "$as_me:11639: result: $cf_result" >&5
+echo "$as_me:11043: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test "$cf_result" = no ; then
case $host_os in #(vi
freebsd*) #(vi
- echo "$as_me:11645: checking for tgoto in -lmytinfo" >&5
+ echo "$as_me:11049: checking for tgoto in -lmytinfo" >&5
echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11650,7 +11054,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lmytinfo $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 11653 "configure"
+#line 11057 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -11669,16 +11073,16 @@ tgoto ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11672: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11076: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11675: \$? = $ac_status" >&5
+ echo "$as_me:11079: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11678: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11082: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11681: \$? = $ac_status" >&5
+ echo "$as_me:11085: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_mytinfo_tgoto=yes
else
@@ -11689,7 +11093,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:11692: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "$as_me:11096: result: $ac_cv_lib_mytinfo_tgoto" >&5
echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
if test $ac_cv_lib_mytinfo_tgoto = yes; then
LIBS="-lmytinfo $LIBS"
@@ -11703,7 +11107,7 @@ hpux10.*) #(vi
# term.h) for cur_colr
if test "x$cf_cv_screen" = "xcurses_colr"
then
- echo "$as_me:11706: checking for initscr in -lcur_colr" >&5
+ echo "$as_me:11110: checking for initscr in -lcur_colr" >&5
echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11711,7 +11115,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcur_colr $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 11714 "configure"
+#line 11118 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -11730,16 +11134,16 @@ initscr ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11733: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11137: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11736: \$? = $ac_status" >&5
+ echo "$as_me:11140: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11739: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11143: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11742: \$? = $ac_status" >&5
+ echo "$as_me:11146: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_cur_colr_initscr=yes
else
@@ -11750,7 +11154,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:11753: result: $ac_cv_lib_cur_colr_initscr" >&5
+echo "$as_me:11157: result: $ac_cv_lib_cur_colr_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
if test $ac_cv_lib_cur_colr_initscr = yes; then
@@ -11759,7 +11163,7 @@ if test $ac_cv_lib_cur_colr_initscr = yes; then
else
- echo "$as_me:11762: checking for initscr in -lHcurses" >&5
+ echo "$as_me:11166: checking for initscr in -lHcurses" >&5
echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11767,7 +11171,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lHcurses $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 11770 "configure"
+#line 11174 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -11786,16 +11190,16 @@ initscr ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11789: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11193: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11792: \$? = $ac_status" >&5
+ echo "$as_me:11196: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11795: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11199: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11798: \$? = $ac_status" >&5
+ echo "$as_me:11202: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_Hcurses_initscr=yes
else
@@ -11806,7 +11210,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:11809: result: $ac_cv_lib_Hcurses_initscr" >&5
+echo "$as_me:11213: result: $ac_cv_lib_Hcurses_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
if test $ac_cv_lib_Hcurses_initscr = yes; then
@@ -11846,7 +11250,7 @@ if test -n "/lib64" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:11849: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:11253: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -11875,7 +11279,7 @@ if test -n "/lib" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:11878: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:11282: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -11906,7 +11310,7 @@ if test -n "/lib" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:11909: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:11313: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -11941,7 +11345,7 @@ if test -n "/usr/5lib" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:11944: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:11348: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -11970,13 +11374,13 @@ if test ".$ac_cv_func_initscr" != .yes ; then
# Check for library containing tgoto. Do this before curses library
# because it may be needed to link the test-case for initscr.
- echo "$as_me:11973: checking for tgoto" >&5
+ echo "$as_me:11377: checking for tgoto" >&5
echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
if test "${ac_cv_func_tgoto+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11979 "configure"
+#line 11383 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char tgoto (); below. */
@@ -12007,16 +11411,16 @@ f = tgoto;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12010: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11414: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12013: \$? = $ac_status" >&5
+ echo "$as_me:11417: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12016: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11420: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12019: \$? = $ac_status" >&5
+ echo "$as_me:11423: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_tgoto=yes
else
@@ -12026,16 +11430,16 @@ ac_cv_func_tgoto=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:12029: result: $ac_cv_func_tgoto" >&5
+echo "$as_me:11433: result: $ac_cv_func_tgoto" >&5
echo "${ECHO_T}$ac_cv_func_tgoto" >&6
if test $ac_cv_func_tgoto = yes; then
cf_term_lib=predefined
else
- for cf_term_lib in $cf_check_list otermcap termcap termlib unknown
+ for cf_term_lib in $cf_check_list termcap termlib unknown
do
as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
-echo "$as_me:12038: checking for tgoto in -l$cf_term_lib" >&5
+echo "$as_me:11442: checking for tgoto in -l$cf_term_lib" >&5
echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12043,7 +11447,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$cf_term_lib $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12046 "configure"
+#line 11450 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -12062,16 +11466,16 @@ tgoto ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12065: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11469: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12068: \$? = $ac_status" >&5
+ echo "$as_me:11472: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12071: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11475: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12074: \$? = $ac_status" >&5
+ echo "$as_me:11478: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Lib=yes"
else
@@ -12082,7 +11486,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:12085: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "$as_me:11489: result: `eval echo '${'$as_ac_Lib'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
break
@@ -12097,7 +11501,7 @@ fi
for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
do
as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
-echo "$as_me:12100: checking for initscr in -l$cf_curs_lib" >&5
+echo "$as_me:11504: checking for initscr in -l$cf_curs_lib" >&5
echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12105,7 +11509,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$cf_curs_lib $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12108 "configure"
+#line 11512 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -12124,16 +11528,16 @@ initscr ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12127: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11531: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12130: \$? = $ac_status" >&5
+ echo "$as_me:11534: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12133: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11537: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12136: \$? = $ac_status" >&5
+ echo "$as_me:11540: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Lib=yes"
else
@@ -12144,23 +11548,23 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:12147: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "$as_me:11551: result: `eval echo '${'$as_ac_Lib'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
break
fi
done
- test $cf_curs_lib = unknown && { { echo "$as_me:12154: error: no curses library found" >&5
+ test $cf_curs_lib = unknown && { { echo "$as_me:11558: error: no curses library found" >&5
echo "$as_me: error: no curses library found" >&2;}
{ (exit 1); exit 1; }; }
LIBS="-l$cf_curs_lib $cf_save_LIBS"
if test "$cf_term_lib" = unknown ; then
- echo "$as_me:12160: checking if we can link with $cf_curs_lib library" >&5
+ echo "$as_me:11564: checking if we can link with $cf_curs_lib library" >&5
echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line 12163 "configure"
+#line 11567 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -12172,16 +11576,16 @@ initscr()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12175: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11579: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12178: \$? = $ac_status" >&5
+ echo "$as_me:11582: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12181: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11585: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12184: \$? = $ac_status" >&5
+ echo "$as_me:11588: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -12190,18 +11594,18 @@ cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- echo "$as_me:12193: result: $cf_result" >&5
+ echo "$as_me:11597: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
- test $cf_result = no && { { echo "$as_me:12195: error: Cannot link curses library" >&5
+ test $cf_result = no && { { echo "$as_me:11599: error: Cannot link curses library" >&5
echo "$as_me: error: Cannot link curses library" >&2;}
{ (exit 1); exit 1; }; }
elif test "$cf_curs_lib" = "$cf_term_lib" ; then
:
elif test "$cf_term_lib" != predefined ; then
- echo "$as_me:12201: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
+ echo "$as_me:11605: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line 12204 "configure"
+#line 11608 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -12213,16 +11617,16 @@ initscr(); tgoto((char *)0, 0, 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12216: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11620: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12219: \$? = $ac_status" >&5
+ echo "$as_me:11623: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12222: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11626: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12225: \$? = $ac_status" >&5
+ echo "$as_me:11629: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=no
else
@@ -12231,7 +11635,7 @@ cat conftest.$ac_ext >&5
LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12234 "configure"
+#line 11638 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -12243,16 +11647,16 @@ initscr()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12246: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11650: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12249: \$? = $ac_status" >&5
+ echo "$as_me:11653: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12252: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11656: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12255: \$? = $ac_status" >&5
+ echo "$as_me:11659: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -12264,7 +11668,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- echo "$as_me:12267: result: $cf_result" >&5
+ echo "$as_me:11671: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
fi
fi
@@ -12274,7 +11678,7 @@ fi
cf_all_widgets=yes
-echo "$as_me:12277: checking if you want extra dialogs" >&5
+echo "$as_me:11681: checking if you want extra dialogs" >&5
echo $ECHO_N "checking if you want extra dialogs... $ECHO_C" >&6
# Check whether --enable-extras or --disable-extras was given.
@@ -12284,7 +11688,7 @@ if test "${enable_extras+set}" = set; then
else
enableval=yes
fi;
-echo "$as_me:12287: result: $enableval" >&5
+echo "$as_me:11691: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
cf_all_widgets=yes
@@ -12292,7 +11696,7 @@ else
cf_all_widgets=no
fi
-echo "$as_me:12295: checking if you want config-file support" >&5
+echo "$as_me:11699: checking if you want config-file support" >&5
echo $ECHO_N "checking if you want config-file support... $ECHO_C" >&6
# Check whether --enable-rc-file or --disable-rc-file was given.
@@ -12302,7 +11706,7 @@ if test "${enable_rc_file+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:12305: result: $enableval" >&5
+echo "$as_me:11709: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS rc\$o"
@@ -12314,7 +11718,7 @@ else
:
fi
-echo "$as_me:12317: checking if you want Xdialog-style dialogs" >&5
+echo "$as_me:11721: checking if you want Xdialog-style dialogs" >&5
echo $ECHO_N "checking if you want Xdialog-style dialogs... $ECHO_C" >&6
# Check whether --enable-Xdialog or --disable-Xdialog was given.
@@ -12324,7 +11728,7 @@ if test "${enable_Xdialog+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:12327: result: $enableval" >&5
+echo "$as_me:11731: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
@@ -12336,7 +11740,7 @@ else
:
fi
-echo "$as_me:12339: checking if you want the form dialog" >&5
+echo "$as_me:11743: checking if you want the form dialog" >&5
echo $ECHO_N "checking if you want the form dialog... $ECHO_C" >&6
# Check whether --enable-form or --disable-form was given.
@@ -12346,7 +11750,7 @@ if test "${enable_form+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:12349: result: $enableval" >&5
+echo "$as_me:11753: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS formbox\$o"
@@ -12358,7 +11762,7 @@ else
:
fi
-echo "$as_me:12361: checking if you want the gauge dialog" >&5
+echo "$as_me:11765: checking if you want the gauge dialog" >&5
echo $ECHO_N "checking if you want the gauge dialog... $ECHO_C" >&6
# Check whether --enable-gauge or --disable-gauge was given.
@@ -12368,7 +11772,7 @@ if test "${enable_gauge+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:12371: result: $enableval" >&5
+echo "$as_me:11775: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o prgbox\$o progressbox\$o"
@@ -12380,7 +11784,7 @@ else
:
fi
-echo "$as_me:12383: checking if you want the tailbox dialog" >&5
+echo "$as_me:11787: checking if you want the tailbox dialog" >&5
echo $ECHO_N "checking if you want the tailbox dialog... $ECHO_C" >&6
# Check whether --enable-tailbox or --disable-tailbox was given.
@@ -12390,7 +11794,7 @@ if test "${enable_tailbox+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:12393: result: $enableval" >&5
+echo "$as_me:11797: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS tailbox\$o"
@@ -12402,7 +11806,7 @@ else
:
fi
-echo "$as_me:12405: checking if you want the mixedform dialog" >&5
+echo "$as_me:11809: checking if you want the mixedform dialog" >&5
echo $ECHO_N "checking if you want the mixedform dialog... $ECHO_C" >&6
# Check whether --enable-mixedform or --disable-mixedform was given.
@@ -12412,7 +11816,7 @@ if test "${enable_mixedform+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:12415: result: $enableval" >&5
+echo "$as_me:11819: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS mixedform\$o"
@@ -12424,7 +11828,7 @@ else
:
fi
-echo "$as_me:12427: checking if you want the mixedgauge dialog" >&5
+echo "$as_me:11831: checking if you want the mixedgauge dialog" >&5
echo $ECHO_N "checking if you want the mixedgauge dialog... $ECHO_C" >&6
# Check whether --enable-mixedgauge or --disable-mixedgauge was given.
@@ -12434,7 +11838,7 @@ if test "${enable_mixedgauge+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:12437: result: $enableval" >&5
+echo "$as_me:11841: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
@@ -12446,7 +11850,7 @@ else
:
fi
-echo "$as_me:12449: checking if you want the wide-curses features" >&5
+echo "$as_me:11853: checking if you want the wide-curses features" >&5
echo $ECHO_N "checking if you want the wide-curses features... $ECHO_C" >&6
# Check whether --enable-widec or --disable-widec was given.
@@ -12456,7 +11860,7 @@ if test "${enable_widec+set}" = set; then
else
enableval=$cf_wide_curses
fi;
-echo "$as_me:12459: result: $enableval" >&5
+echo "$as_me:11863: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
cat >>confdefs.h <<\EOF
@@ -12467,13 +11871,13 @@ else
:
fi
-echo "$as_me:12470: checking for ANSI C header files" >&5
+echo "$as_me:11874: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12476 "configure"
+#line 11880 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -12481,13 +11885,13 @@ else
#include <float.h>
_ACEOF
-if { (eval echo "$as_me:12484: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:11888: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:12490: \$? = $ac_status" >&5
+ echo "$as_me:11894: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -12509,7 +11913,7 @@ rm -f conftest.err conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
-#line 12512 "configure"
+#line 11916 "configure"
#include "confdefs.h"
#include <string.h>
@@ -12527,7 +11931,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
-#line 12530 "configure"
+#line 11934 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -12548,7 +11952,7 @@ if test $ac_cv_header_stdc = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12551 "configure"
+#line 11955 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
@@ -12574,15 +11978,15 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:12577: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11981: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12580: \$? = $ac_status" >&5
+ echo "$as_me:11984: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:12582: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11986: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12585: \$? = $ac_status" >&5
+ echo "$as_me:11989: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -12595,7 +11999,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
-echo "$as_me:12598: result: $ac_cv_header_stdc" >&5
+echo "$as_me:12002: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
@@ -12605,13 +12009,13 @@ EOF
fi
-echo "$as_me:12608: checking whether time.h and sys/time.h may both be included" >&5
+echo "$as_me:12012: checking whether time.h and sys/time.h may both be included" >&5
echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
if test "${ac_cv_header_time+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12614 "configure"
+#line 12018 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -12627,16 +12031,16 @@ return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12630: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12034: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12633: \$? = $ac_status" >&5
+ echo "$as_me:12037: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12636: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12040: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12639: \$? = $ac_status" >&5
+ echo "$as_me:12043: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_header_time=yes
else
@@ -12646,7 +12050,7 @@ ac_cv_header_time=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:12649: result: $ac_cv_header_time" >&5
+echo "$as_me:12053: result: $ac_cv_header_time" >&5
echo "${ECHO_T}$ac_cv_header_time" >&6
if test $ac_cv_header_time = yes; then
@@ -12659,13 +12063,13 @@ fi
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-echo "$as_me:12662: checking for $ac_hdr that defines DIR" >&5
+echo "$as_me:12066: checking for $ac_hdr that defines DIR" >&5
echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12668 "configure"
+#line 12072 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -12680,16 +12084,16 @@ return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12683: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12087: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12686: \$? = $ac_status" >&5
+ echo "$as_me:12090: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12689: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12093: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12692: \$? = $ac_status" >&5
+ echo "$as_me:12096: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Header=yes"
else
@@ -12699,7 +12103,7 @@ eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:12702: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:12106: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -12712,7 +12116,7 @@ fi
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
- echo "$as_me:12715: checking for opendir in -ldir" >&5
+ echo "$as_me:12119: checking for opendir in -ldir" >&5
echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
if test "${ac_cv_lib_dir_opendir+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12720,7 +12124,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldir $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12723 "configure"
+#line 12127 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -12739,16 +12143,16 @@ opendir ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12742: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12146: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12745: \$? = $ac_status" >&5
+ echo "$as_me:12149: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12748: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12152: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12751: \$? = $ac_status" >&5
+ echo "$as_me:12155: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dir_opendir=yes
else
@@ -12759,14 +12163,14 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:12762: result: $ac_cv_lib_dir_opendir" >&5
+echo "$as_me:12166: result: $ac_cv_lib_dir_opendir" >&5
echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
if test $ac_cv_lib_dir_opendir = yes; then
LIBS="$LIBS -ldir"
fi
else
- echo "$as_me:12769: checking for opendir in -lx" >&5
+ echo "$as_me:12173: checking for opendir in -lx" >&5
echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
if test "${ac_cv_lib_x_opendir+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12774,7 +12178,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lx $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12777 "configure"
+#line 12181 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -12793,16 +12197,16 @@ opendir ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12796: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12200: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12799: \$? = $ac_status" >&5
+ echo "$as_me:12203: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12802: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12206: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12805: \$? = $ac_status" >&5
+ echo "$as_me:12209: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_x_opendir=yes
else
@@ -12813,7 +12217,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:12816: result: $ac_cv_lib_x_opendir" >&5
+echo "$as_me:12220: result: $ac_cv_lib_x_opendir" >&5
echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
if test $ac_cv_lib_x_opendir = yes; then
LIBS="$LIBS -lx"
@@ -12824,23 +12228,23 @@ fi
for ac_header in search.h unctrl.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:12827: checking for $ac_header" >&5
+echo "$as_me:12231: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12833 "configure"
+#line 12237 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:12837: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:12241: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:12843: \$? = $ac_status" >&5
+ echo "$as_me:12247: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -12859,7 +12263,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:12862: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:12266: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -12869,7 +12273,7 @@ EOF
fi
done
-echo "$as_me:12872: checking for term.h" >&5
+echo "$as_me:12276: checking for term.h" >&5
echo $ECHO_N "checking for term.h... $ECHO_C" >&6
if test "${cf_cv_term_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12890,7 +12294,7 @@ esac
for cf_header in $cf_header_list
do
cat >conftest.$ac_ext <<_ACEOF
-#line 12893 "configure"
+#line 12297 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -12904,16 +12308,16 @@ WINDOW *x
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12907: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12311: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12910: \$? = $ac_status" >&5
+ echo "$as_me:12314: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12913: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12317: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12916: \$? = $ac_status" >&5
+ echo "$as_me:12320: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_term_header=$cf_header
break
@@ -12932,7 +12336,7 @@ no)
for cf_header in ncurses/term.h ncursesw/term.h
do
cat >conftest.$ac_ext <<_ACEOF
-#line 12935 "configure"
+#line 12339 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -12950,16 +12354,16 @@ WINDOW *x
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12953: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12357: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12956: \$? = $ac_status" >&5
+ echo "$as_me:12360: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12959: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12363: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12962: \$? = $ac_status" >&5
+ echo "$as_me:12366: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_term_header=$cf_header
break
@@ -12974,7 +12378,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
esac
fi
-echo "$as_me:12977: result: $cf_cv_term_header" >&5
+echo "$as_me:12381: result: $cf_cv_term_header" >&5
echo "${ECHO_T}$cf_cv_term_header" >&6
case $cf_cv_term_header in #(vi
@@ -12998,13 +12402,13 @@ EOF
;;
esac
-echo "$as_me:13001: checking return type of signal handlers" >&5
+echo "$as_me:12405: checking return type of signal handlers" >&5
echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
if test "${ac_cv_type_signal+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13007 "configure"
+#line 12411 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -13026,16 +12430,16 @@ int i;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13029: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12433: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13032: \$? = $ac_status" >&5
+ echo "$as_me:12436: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13035: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12439: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13038: \$? = $ac_status" >&5
+ echo "$as_me:12442: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_signal=void
else
@@ -13045,7 +12449,7 @@ ac_cv_type_signal=int
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:13048: result: $ac_cv_type_signal" >&5
+echo "$as_me:12452: result: $ac_cv_type_signal" >&5
echo "${ECHO_T}$ac_cv_type_signal" >&6
cat >>confdefs.h <<EOF
@@ -13070,13 +12474,13 @@ wctomb \
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:13073: checking for $ac_func" >&5
+echo "$as_me:12477: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13079 "configure"
+#line 12483 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -13107,16 +12511,16 @@ f = $ac_func;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13110: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12514: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13113: \$? = $ac_status" >&5
+ echo "$as_me:12517: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13116: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12520: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13119: \$? = $ac_status" >&5
+ echo "$as_me:12523: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -13126,7 +12530,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:13129: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:12533: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -13136,14 +12540,14 @@ EOF
fi
done
-echo "$as_me:13139: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
+echo "$as_me:12543: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
if test "${cf_cv_need_xopen_extension+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13146 "configure"
+#line 12550 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -13165,23 +12569,23 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13168: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12572: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13171: \$? = $ac_status" >&5
+ echo "$as_me:12575: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13174: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12578: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13177: \$? = $ac_status" >&5
+ echo "$as_me:12581: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_need_xopen_extension=no
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line 13184 "configure"
+#line 12588 "configure"
#include "confdefs.h"
#define _XOPEN_SOURCE_EXTENDED
@@ -13203,16 +12607,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13206: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12610: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13209: \$? = $ac_status" >&5
+ echo "$as_me:12613: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13212: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12616: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13215: \$? = $ac_status" >&5
+ echo "$as_me:12619: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_need_xopen_extension=yes
else
@@ -13224,11 +12628,11 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:13227: result: $cf_cv_need_xopen_extension" >&5
+echo "$as_me:12631: result: $cf_cv_need_xopen_extension" >&5
echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
-echo "$as_me:13231: checking for unctrl.h" >&5
+echo "$as_me:12635: checking for unctrl.h" >&5
echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
if test "${cf_cv_unctrl_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13249,7 +12653,7 @@ esac
for cf_header in $cf_header_list
do
cat >conftest.$ac_ext <<_ACEOF
-#line 13252 "configure"
+#line 12656 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -13263,16 +12667,16 @@ WINDOW *x
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13266: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12670: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13269: \$? = $ac_status" >&5
+ echo "$as_me:12673: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13272: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12676: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13275: \$? = $ac_status" >&5
+ echo "$as_me:12679: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_unctrl_header=$cf_header
break
@@ -13286,13 +12690,13 @@ done
case $cf_cv_unctrl_header in #(vi
no)
- { echo "$as_me:13289: WARNING: unctrl.h header not found" >&5
+ { echo "$as_me:12693: WARNING: unctrl.h header not found" >&5
echo "$as_me: WARNING: unctrl.h header not found" >&2;}
;;
esac
fi
-echo "$as_me:13295: result: $cf_cv_unctrl_header" >&5
+echo "$as_me:12699: result: $cf_cv_unctrl_header" >&5
echo "${ECHO_T}$cf_cv_unctrl_header" >&6
case $cf_cv_unctrl_header in #(vi
@@ -13338,10 +12742,10 @@ do
cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- echo "$as_me:13341: checking for ${cf_func}" >&5
+ echo "$as_me:12745: checking for ${cf_func}" >&5
echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
-echo "${as_me:-configure}:13344: testing ${cf_func} ..." 1>&5
+echo "${as_me:-configure}:12748: testing ${cf_func} ..." 1>&5
if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13350,7 +12754,7 @@ else
eval cf_result='$ac_cv_func_'$cf_func
if test ".$cf_result" != ".no"; then
cat >conftest.$ac_ext <<_ACEOF
-#line 13353 "configure"
+#line 12757 "configure"
#include "confdefs.h"
#ifdef HAVE_XCURSES
@@ -13382,16 +12786,16 @@ if (foo + 1234 > 5678)
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13385: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12789: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13388: \$? = $ac_status" >&5
+ echo "$as_me:12792: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13391: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12795: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13394: \$? = $ac_status" >&5
+ echo "$as_me:12798: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -13407,7 +12811,7 @@ fi
# use the computed/retrieved cache-value:
eval 'cf_result=$cf_cv_func_'$cf_func
- echo "$as_me:13410: result: $cf_result" >&5
+ echo "$as_me:12814: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test $cf_result != no; then
cat >>confdefs.h <<EOF
@@ -13417,13 +12821,13 @@ EOF
fi
done
-echo "$as_me:13420: checking for start_color" >&5
+echo "$as_me:12824: checking for start_color" >&5
echo $ECHO_N "checking for start_color... $ECHO_C" >&6
if test "${ac_cv_func_start_color+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13426 "configure"
+#line 12830 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char start_color (); below. */
@@ -13454,16 +12858,16 @@ f = start_color;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13457: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12861: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13460: \$? = $ac_status" >&5
+ echo "$as_me:12864: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13463: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12867: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13466: \$? = $ac_status" >&5
+ echo "$as_me:12870: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_start_color=yes
else
@@ -13473,7 +12877,7 @@ ac_cv_func_start_color=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:13476: result: $ac_cv_func_start_color" >&5
+echo "$as_me:12880: result: $ac_cv_func_start_color" >&5
echo "${ECHO_T}$ac_cv_func_start_color" >&6
if test $ac_cv_func_start_color = yes; then
cat >>confdefs.h <<\EOF
@@ -13482,14 +12886,14 @@ EOF
fi
-echo "$as_me:13485: checking for chtype typedef" >&5
+echo "$as_me:12889: checking for chtype typedef" >&5
echo $ECHO_N "checking for chtype typedef... $ECHO_C" >&6
if test "${cf_cv_chtype_decl+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13492 "configure"
+#line 12896 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -13501,16 +12905,16 @@ chtype foo
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13504: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12908: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13507: \$? = $ac_status" >&5
+ echo "$as_me:12911: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13510: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12914: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13513: \$? = $ac_status" >&5
+ echo "$as_me:12917: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_chtype_decl=yes
else
@@ -13520,21 +12924,21 @@ cf_cv_chtype_decl=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:13523: result: $cf_cv_chtype_decl" >&5
+echo "$as_me:12927: result: $cf_cv_chtype_decl" >&5
echo "${ECHO_T}$cf_cv_chtype_decl" >&6
if test $cf_cv_chtype_decl = yes ; then
cat >>confdefs.h <<\EOF
#define HAVE_TYPE_CHTYPE 1
EOF
- echo "$as_me:13530: checking if chtype is scalar or struct" >&5
+ echo "$as_me:12934: checking if chtype is scalar or struct" >&5
echo $ECHO_N "checking if chtype is scalar or struct... $ECHO_C" >&6
if test "${cf_cv_chtype_type+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13537 "configure"
+#line 12941 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -13546,16 +12950,16 @@ chtype foo; long x = foo
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13549: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12953: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13552: \$? = $ac_status" >&5
+ echo "$as_me:12956: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13555: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12959: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13558: \$? = $ac_status" >&5
+ echo "$as_me:12962: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_chtype_type=scalar
else
@@ -13565,7 +12969,7 @@ cf_cv_chtype_type=struct
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:13568: result: $cf_cv_chtype_type" >&5
+echo "$as_me:12972: result: $cf_cv_chtype_type" >&5
echo "${ECHO_T}$cf_cv_chtype_type" >&6
if test $cf_cv_chtype_type = scalar ; then
cat >>confdefs.h <<\EOF
@@ -13575,7 +12979,7 @@ EOF
fi
fi
-echo "$as_me:13578: checking for wide alternate character set array" >&5
+echo "$as_me:12982: checking for wide alternate character set array" >&5
echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
if test "${cf_cv_curses_wacs_map+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13585,7 +12989,7 @@ else
for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
do
cat >conftest.$ac_ext <<_ACEOF
-#line 13588 "configure"
+#line 12992 "configure"
#include "confdefs.h"
#ifndef _XOPEN_SOURCE_EXTENDED
@@ -13601,16 +13005,16 @@ void *foo = &($name['k'])
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13604: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13008: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13607: \$? = $ac_status" >&5
+ echo "$as_me:13011: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13610: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13014: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13613: \$? = $ac_status" >&5
+ echo "$as_me:13017: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_curses_wacs_map=$name
break
@@ -13621,14 +13025,14 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
done
fi
-echo "$as_me:13624: result: $cf_cv_curses_wacs_map" >&5
+echo "$as_me:13028: result: $cf_cv_curses_wacs_map" >&5
echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
test "$cf_cv_curses_wacs_map" != unknown && cat >>confdefs.h <<EOF
#define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
EOF
-echo "$as_me:13631: checking for wide alternate character constants" >&5
+echo "$as_me:13035: checking for wide alternate character constants" >&5
echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
if test "${cf_cv_curses_wacs_symbols+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13638,7 +13042,7 @@ cf_cv_curses_wacs_symbols=no
if test "$cf_cv_curses_wacs_map" != unknown
then
cat >conftest.$ac_ext <<_ACEOF
-#line 13641 "configure"
+#line 13045 "configure"
#include "confdefs.h"
#ifndef _XOPEN_SOURCE_EXTENDED
@@ -13655,16 +13059,16 @@ cchar_t *foo = WACS_PLUS;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13658: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13062: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13661: \$? = $ac_status" >&5
+ echo "$as_me:13065: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13664: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13068: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13667: \$? = $ac_status" >&5
+ echo "$as_me:13071: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_curses_wacs_symbols=yes
else
@@ -13674,7 +13078,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13677 "configure"
+#line 13081 "configure"
#include "confdefs.h"
#ifndef _XOPEN_SOURCE_EXTENDED
@@ -13690,16 +13094,16 @@ cchar_t *foo = WACS_PLUS
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13693: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13097: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13696: \$? = $ac_status" >&5
+ echo "$as_me:13100: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13699: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13103: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13702: \$? = $ac_status" >&5
+ echo "$as_me:13106: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_curses_wacs_symbols=yes
else
@@ -13710,163 +13114,33 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
fi
-echo "$as_me:13713: result: $cf_cv_curses_wacs_symbols" >&5
+echo "$as_me:13117: result: $cf_cv_curses_wacs_symbols" >&5
echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
test "$cf_cv_curses_wacs_symbols" != no && cat >>confdefs.h <<\EOF
#define CURSES_WACS_SYMBOLS 1
EOF
-for cf_func in wgetparent
-do
-
-cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-
- echo "$as_me:13725: checking for ${cf_func}" >&5
-echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
-
-echo "${as_me:-configure}:13728: testing ${cf_func} ..." 1>&5
-
- if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- eval cf_result='$ac_cv_func_'$cf_func
- if test ".$cf_result" != ".no"; then
- cat >conftest.$ac_ext <<_ACEOF
-#line 13737 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_XCURSES
-#include <xcurses.h>
-char * XCursesProgramName = "test";
-#else
-#include <${cf_cv_ncurses_header:-curses.h}>
-#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-#include <ncursesw/term.h>
-#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-#include <ncurses/term.h>
-#elif defined(HAVE_TERM_H)
-#include <term.h>
-#endif
-#endif
-
-int
-main ()
-{
-
-#ifndef ${cf_func}
-long foo = (long)(&${cf_func});
-if (foo + 1234 > 5678)
- ${cf_cv_main_return:-return}(foo);
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13769: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:13772: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13775: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:13778: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cf_result=yes
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_result=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
- eval 'cf_cv_func_'$cf_func'=$cf_result'
-
-fi
-
- # use the computed/retrieved cache-value:
- eval 'cf_result=$cf_cv_func_'$cf_func
- echo "$as_me:13794: result: $cf_result" >&5
-echo "${ECHO_T}$cf_result" >&6
- if test $cf_result != no; then
- cat >>confdefs.h <<EOF
-#define HAVE_${cf_tr_func} 1
-EOF
-
- fi
-done
-
-if test "x$cf_cv_func_wgetparent" != xyes
-then
- echo "$as_me:13806: checking if WINDOW has _parent member" >&5
-echo $ECHO_N "checking if WINDOW has _parent member... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-#line 13809 "configure"
-#include "confdefs.h"
-#include <${cf_cv_ncurses_header:-curses.h}>
-int
-main ()
-{
-WINDOW *p = stdscr->_parent
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13821: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:13824: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13827: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:13830: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cf_window__parent=yes
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_window__parent=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:13839: result: $cf_window__parent" >&5
-echo "${ECHO_T}$cf_window__parent" >&6
- if test "$cf_window__parent" = yes
- then
- cat >>confdefs.h <<\EOF
-#define HAVE_WINDOW__PARENT 1
-EOF
-
- fi
-fi
-
for ac_header in sys/wait.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:13853: checking for $ac_header" >&5
+echo "$as_me:13127: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13859 "configure"
+#line 13133 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:13863: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:13137: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:13869: \$? = $ac_status" >&5
+ echo "$as_me:13143: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -13885,7 +13159,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:13888: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:13162: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -13906,23 +13180,23 @@ else
for ac_header in wait.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:13909: checking for $ac_header" >&5
+echo "$as_me:13183: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13915 "configure"
+#line 13189 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:13919: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:13193: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:13925: \$? = $ac_status" >&5
+ echo "$as_me:13199: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -13941,7 +13215,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:13944: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:13218: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -13954,23 +13228,23 @@ done
for ac_header in waitstatus.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:13957: checking for $ac_header" >&5
+echo "$as_me:13231: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13963 "configure"
+#line 13237 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:13967: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:13241: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:13973: \$? = $ac_status" >&5
+ echo "$as_me:13247: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -13989,7 +13263,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:13992: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:13266: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -14011,14 +13285,14 @@ cf_wait_headers="$cf_wait_headers
fi
fi
-echo "$as_me:14014: checking for union wait" >&5
+echo "$as_me:13288: checking for union wait" >&5
echo $ECHO_N "checking for union wait... $ECHO_C" >&6
if test "${cf_cv_type_unionwait+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14021 "configure"
+#line 13295 "configure"
#include "confdefs.h"
$cf_wait_headers
int
@@ -14034,16 +13308,16 @@ int x;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14037: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13311: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14040: \$? = $ac_status" >&5
+ echo "$as_me:13314: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14043: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13317: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14046: \$? = $ac_status" >&5
+ echo "$as_me:13320: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_type_unionwait=no
echo compiles ok w/o union wait 1>&5
@@ -14053,7 +13327,7 @@ else
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line 14056 "configure"
+#line 13330 "configure"
#include "confdefs.h"
$cf_wait_headers
int
@@ -14073,16 +13347,16 @@ union wait x;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14076: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13350: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14079: \$? = $ac_status" >&5
+ echo "$as_me:13353: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14082: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13356: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14085: \$? = $ac_status" >&5
+ echo "$as_me:13359: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_type_unionwait=yes
echo compiles ok with union wait and possibly macros too 1>&5
@@ -14097,7 +13371,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:14100: result: $cf_cv_type_unionwait" >&5
+echo "$as_me:13374: result: $cf_cv_type_unionwait" >&5
echo "${ECHO_T}$cf_cv_type_unionwait" >&6
test $cf_cv_type_unionwait = yes && cat >>confdefs.h <<\EOF
#define HAVE_TYPE_UNIONWAIT 1
@@ -14105,14 +13379,14 @@ EOF
if test $cf_cv_type_unionwait = yes; then
- echo "$as_me:14108: checking if union wait can be used as wait-arg" >&5
+ echo "$as_me:13382: checking if union wait can be used as wait-arg" >&5
echo $ECHO_N "checking if union wait can be used as wait-arg... $ECHO_C" >&6
if test "${cf_cv_arg_union_wait+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14115 "configure"
+#line 13389 "configure"
#include "confdefs.h"
$cf_wait_headers
int
@@ -14124,16 +13398,16 @@ union wait x; wait(&x)
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14127: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13401: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14130: \$? = $ac_status" >&5
+ echo "$as_me:13404: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14133: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13407: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14136: \$? = $ac_status" >&5
+ echo "$as_me:13410: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_arg_union_wait=yes
else
@@ -14145,20 +13419,20 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
- echo "$as_me:14148: result: $cf_cv_arg_union_wait" >&5
+ echo "$as_me:13422: result: $cf_cv_arg_union_wait" >&5
echo "${ECHO_T}$cf_cv_arg_union_wait" >&6
test $cf_cv_arg_union_wait = yes && cat >>confdefs.h <<\EOF
#define WAIT_USES_UNION 1
EOF
- echo "$as_me:14154: checking if union wait can be used as waitpid-arg" >&5
+ echo "$as_me:13428: checking if union wait can be used as waitpid-arg" >&5
echo $ECHO_N "checking if union wait can be used as waitpid-arg... $ECHO_C" >&6
if test "${cf_cv_arg_union_waitpid+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14161 "configure"
+#line 13435 "configure"
#include "confdefs.h"
$cf_wait_headers
int
@@ -14170,16 +13444,16 @@ union wait x; waitpid(0, &x, 0)
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14173: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13447: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14176: \$? = $ac_status" >&5
+ echo "$as_me:13450: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14179: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13453: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14182: \$? = $ac_status" >&5
+ echo "$as_me:13456: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_arg_union_waitpid=yes
else
@@ -14191,7 +13465,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
- echo "$as_me:14194: result: $cf_cv_arg_union_waitpid" >&5
+ echo "$as_me:13468: result: $cf_cv_arg_union_waitpid" >&5
echo "${ECHO_T}$cf_cv_arg_union_waitpid" >&6
test $cf_cv_arg_union_waitpid = yes && cat >>confdefs.h <<\EOF
#define WAITPID_USES_UNION 1
@@ -14199,14 +13473,14 @@ EOF
fi
-echo "$as_me:14202: checking if we must include wchar.h to declare mbstate_t" >&5
+echo "$as_me:13476: checking if we must include wchar.h to declare mbstate_t" >&5
echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
if test "${cf_cv_mbstate_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14209 "configure"
+#line 13483 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -14223,23 +13497,23 @@ mbstate_t state
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14226: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13500: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14229: \$? = $ac_status" >&5
+ echo "$as_me:13503: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14232: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13506: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14235: \$? = $ac_status" >&5
+ echo "$as_me:13509: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_mbstate_t=no
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line 14242 "configure"
+#line 13516 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -14257,16 +13531,16 @@ mbstate_t value
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14260: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13534: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14263: \$? = $ac_status" >&5
+ echo "$as_me:13537: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14266: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13540: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14269: \$? = $ac_status" >&5
+ echo "$as_me:13543: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_mbstate_t=yes
else
@@ -14278,7 +13552,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:14281: result: $cf_cv_mbstate_t" >&5
+echo "$as_me:13555: result: $cf_cv_mbstate_t" >&5
echo "${ECHO_T}$cf_cv_mbstate_t" >&6
if test "$cf_cv_mbstate_t" = yes ; then
@@ -14301,7 +13575,7 @@ PACKAGE_CONFIG=dlg_config.h
EXTRA_OUTPUT="$EXTRA_OUTPUT headers-sh:$srcdir/headers-sh.in"
cat >conftest.$ac_ext <<_ACEOF
-#line 14304 "configure"
+#line 13578 "configure"
#include "confdefs.h"
#include <locale.h>
int
@@ -14313,16 +13587,16 @@ setlocale(LC_ALL, "")
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14316: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13590: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14319: \$? = $ac_status" >&5
+ echo "$as_me:13593: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14322: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13596: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14325: \$? = $ac_status" >&5
+ echo "$as_me:13599: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cat >>confdefs.h <<\EOF
#define HAVE_SETLOCALE 1
@@ -14335,7 +13609,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LD_RPATH_OPT=
-echo "$as_me:14338: checking for an rpath option" >&5
+echo "$as_me:13612: checking for an rpath option" >&5
echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
case $cf_cv_system_name in #(vi
irix*) #(vi
@@ -14351,7 +13625,7 @@ linux*|gnu*|k*bsd*-gnu) #(vi
openbsd[2-9].*|mirbsd*) #(vi
LD_RPATH_OPT="-Wl,-rpath,"
;;
-dragonfly*|freebsd*) #(vi
+freebsd*) #(vi
LD_RPATH_OPT="-rpath "
;;
netbsd*) #(vi
@@ -14366,17 +13640,17 @@ solaris2*) #(vi
*)
;;
esac
-echo "$as_me:14369: result: $LD_RPATH_OPT" >&5
+echo "$as_me:13643: result: $LD_RPATH_OPT" >&5
echo "${ECHO_T}$LD_RPATH_OPT" >&6
case "x$LD_RPATH_OPT" in #(vi
x-R*)
- echo "$as_me:14374: checking if we need a space after rpath option" >&5
+ echo "$as_me:13648: checking if we need a space after rpath option" >&5
echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
cf_save_LIBS="$LIBS"
LIBS="${LD_RPATH_OPT}$libdir $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 14379 "configure"
+#line 13653 "configure"
#include "confdefs.h"
int
@@ -14388,16 +13662,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14391: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13665: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14394: \$? = $ac_status" >&5
+ echo "$as_me:13668: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14397: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13671: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14400: \$? = $ac_status" >&5
+ echo "$as_me:13674: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_rpath_space=no
else
@@ -14407,13 +13681,13 @@ cf_rpath_space=yes
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS="$cf_save_LIBS"
- echo "$as_me:14410: result: $cf_rpath_space" >&5
+ echo "$as_me:13684: result: $cf_rpath_space" >&5
echo "${ECHO_T}$cf_rpath_space" >&6
test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
;;
esac
-echo "$as_me:14416: checking if rpath-hack should be disabled" >&5
+echo "$as_me:13690: checking if rpath-hack should be disabled" >&5
echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
@@ -14430,21 +13704,21 @@ else
cf_disable_rpath_hack=no
fi;
-echo "$as_me:14433: result: $cf_disable_rpath_hack" >&5
+echo "$as_me:13707: result: $cf_disable_rpath_hack" >&5
echo "${ECHO_T}$cf_disable_rpath_hack" >&6
if test "$cf_disable_rpath_hack" = no ; then
-echo "$as_me:14437: checking for updated LDFLAGS" >&5
+echo "$as_me:13711: checking for updated LDFLAGS" >&5
echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
if test -n "$LD_RPATH_OPT" ; then
- echo "$as_me:14440: result: maybe" >&5
+ echo "$as_me:13714: result: maybe" >&5
echo "${ECHO_T}maybe" >&6
for ac_prog in ldd
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:14447: checking for $ac_word" >&5
+echo "$as_me:13721: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14459,7 +13733,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_cf_ldd_prog="$ac_prog"
-echo "$as_me:14462: found $ac_dir/$ac_word" >&5
+echo "$as_me:13736: found $ac_dir/$ac_word" >&5
break
done
@@ -14467,10 +13741,10 @@ fi
fi
cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
if test -n "$cf_ldd_prog"; then
- echo "$as_me:14470: result: $cf_ldd_prog" >&5
+ echo "$as_me:13744: result: $cf_ldd_prog" >&5
echo "${ECHO_T}$cf_ldd_prog" >&6
else
- echo "$as_me:14473: result: no" >&5
+ echo "$as_me:13747: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -14484,7 +13758,7 @@ test -n "$cf_ldd_prog" || cf_ldd_prog="no"
cf_rpath_oops=
cat >conftest.$ac_ext <<_ACEOF
-#line 14487 "configure"
+#line 13761 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -14496,16 +13770,16 @@ printf("Hello");
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14499: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13773: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14502: \$? = $ac_status" >&5
+ echo "$as_me:13776: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14505: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13779: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14508: \$? = $ac_status" >&5
+ echo "$as_me:13782: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
@@ -14533,7 +13807,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
then
test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
-echo "${as_me:-configure}:14536: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
+echo "${as_me:-configure}:13810: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
break
@@ -14545,11 +13819,11 @@ echo "${as_me:-configure}:14536: testing ...adding -L$cf_rpath_dir/lib to LDFLAG
test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
-echo "${as_me:-configure}:14548: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:13822: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
-echo "${as_me:-configure}:14552: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:13826: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
cf_rpath_dst=
for cf_rpath_src in $LDFLAGS
@@ -14586,7 +13860,7 @@ do
then
test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
-echo "${as_me:-configure}:14589: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
+echo "${as_me:-configure}:13863: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
fi
@@ -14599,11 +13873,11 @@ LDFLAGS=$cf_rpath_dst
test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
-echo "${as_me:-configure}:14602: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:13876: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
-echo "${as_me:-configure}:14606: testing ...checking LIBS $LIBS ..." 1>&5
+echo "${as_me:-configure}:13880: testing ...checking LIBS $LIBS ..." 1>&5
cf_rpath_dst=
for cf_rpath_src in $LIBS
@@ -14640,7 +13914,7 @@ do
then
test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
-echo "${as_me:-configure}:14643: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
+echo "${as_me:-configure}:13917: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
fi
@@ -14653,11 +13927,11 @@ LIBS=$cf_rpath_dst
test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
-echo "${as_me:-configure}:14656: testing ...checked LIBS $LIBS ..." 1>&5
+echo "${as_me:-configure}:13930: testing ...checked LIBS $LIBS ..." 1>&5
test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
-echo "${as_me:-configure}:14660: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:13934: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
fi
@@ -14744,7 +14018,7 @@ DEFS=-DHAVE_CONFIG_H
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:14747: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:14021: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
@@ -14920,7 +14194,7 @@ cat >>$CONFIG_STATUS <<\EOF
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
- { { echo "$as_me:14923: error: ambiguous option: $1
+ { { echo "$as_me:14197: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
@@ -14939,7 +14213,7 @@ Try \`$0 --help' for more information." >&2;}
ac_need_defaults=false;;
# This is an error.
- -*) { { echo "$as_me:14942: error: unrecognized option: $1
+ -*) { { echo "$as_me:14216: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
@@ -14989,7 +14263,7 @@ do
"default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
"dlg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS dlg_config.h:config.hin" ;;
- *) { { echo "$as_me:14992: error: invalid argument: $ac_config_target" >&5
+ *) { { echo "$as_me:14266: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
@@ -15086,8 +14360,6 @@ s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@LINT@,$LINT,;t t
-s,@LINT_OPTS@,$LINT_OPTS,;t t
s,@AR@,$AR,;t t
s,@ac_ct_AR@,$ac_ct_AR,;t t
s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
@@ -15163,7 +14435,6 @@ s,@LIB_INSTALL@,$LIB_INSTALL,;t t
s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
s,@LIBTOOL_MAKE@,$LIBTOOL_MAKE,;t t
s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
-s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
s,@EXTRAOBJS@,$EXTRAOBJS,;t t
s,@PACKAGE_PREFIX@,$PACKAGE_PREFIX,;t t
s,@PACKAGE_CONFIG@,$PACKAGE_CONFIG,;t t
@@ -15283,7 +14554,7 @@ done; }
esac
if test x"$ac_file" != x-; then
- { echo "$as_me:15286: creating $ac_file" >&5
+ { echo "$as_me:14557: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
@@ -15301,7 +14572,7 @@ echo "$as_me: creating $ac_file" >&6;}
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:15304: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:14575: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -15314,7 +14585,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:15317: error: cannot find input file: $f" >&5
+ { { echo "$as_me:14588: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@@ -15380,7 +14651,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
* ) ac_file_in=$ac_file.in ;;
esac
- test x"$ac_file" != x- && { echo "$as_me:15383: creating $ac_file" >&5
+ test x"$ac_file" != x- && { echo "$as_me:14654: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
# First look for the input files in the build tree, otherwise in the
@@ -15391,7 +14662,7 @@ echo "$as_me: creating $ac_file" >&6;}
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:15394: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:14665: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -15404,7 +14675,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:15407: error: cannot find input file: $f" >&5
+ { { echo "$as_me:14678: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@@ -15462,7 +14733,7 @@ cat >>$CONFIG_STATUS <<\EOF
rm -f $tmp/in
if test x"$ac_file" != x-; then
if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
- { echo "$as_me:15465: $ac_file is unchanged" >&5
+ { echo "$as_me:14736: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
diff --git a/contrib/dialog/configure.in b/contrib/dialog/configure.in
index ea2d562..2feac73 100644
--- a/contrib/dialog/configure.in
+++ b/contrib/dialog/configure.in
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.68 2011/10/20 21:02:43 tom Exp $
+dnl $Id: configure.in,v 1.65 2011/06/27 10:42:27 tom Exp $
dnl Process this file with autoconf to produce a configure script.
dnl ---------------------------------------------------------------------------
dnl Copyright 1999-2010,2011 -- Thomas E. Dickey
@@ -45,7 +45,6 @@ AC_PROG_GCC_TRADITIONAL
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PROG_INSTALL
-CF_PROG_LINT
dnl needed for CF_WITH_LIBTOOL
AC_CHECK_TOOL(AR, ar, ar)
@@ -233,7 +232,6 @@ wget_wch \
AC_CHECK_FUNC(start_color,[AC_DEFINE(HAVE_COLOR)])
CF_CURSES_CHTYPE
CF_CURSES_WACS_SYMBOLS
-CF_CURSES_WGETPARENT
CF_FUNC_WAIT
CF_MBSTATE_T
diff --git a/contrib/dialog/dialog.1 b/contrib/dialog/dialog.1
index 89f4918..8fd4de1 100644
--- a/contrib/dialog/dialog.1
+++ b/contrib/dialog/dialog.1
@@ -1,6 +1,6 @@
'\" t
-.\" $Id: dialog.1,v 1.145 2012/07/03 08:32:33 tom Exp $
-.\" Copyright 2005-2011,2012 Thomas E. Dickey
+.\" $Id: dialog.1,v 1.133 2011/06/29 09:39:29 tom Exp $
+.\" Copyright 2005-2010,2011 Thomas E. Dickey
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU Lesser General Public License, version 2.1
@@ -27,17 +27,16 @@
.ne 8
.IP
..
-.de Ex
-.RS +7
-.PP
+.de EX
+.RS +10
.nf
..
-.de Ee
+.de EE
.fi
.RE
..
.
-.TH \*D 1 "" "$Date: 2012/07/03 08:32:33 $"
+.TH \*D 1 "" "$Date: 2011/06/29 09:39:29 $"
.SH NAME
\*p \- display dialog boxes from shell scripts
.SH SYNOPSIS
@@ -173,39 +172,39 @@ To compare the effects, use these:
.
.ES
All three widgets visible, staircase effect, ordered 1,2,3:
-.Ex
-\*p \\
+.EX
+\*p \
--begin 2 2 --yesno "" 0 0 \\
--and-widget --begin 4 4 --yesno "" 0 0 \\
--and-widget --begin 6 6 --yesno "" 0 0
-.Ee
+.EE
.
.ES
Only the last widget is left visible:
-.Ex
-\*p \\
+.EX
+\*p \
--clear --begin 2 2 --yesno "" 0 0 \\
--and-widget --clear --begin 4 4 --yesno "" 0 0 \\
--and-widget --begin 6 6 --yesno "" 0 0
-.Ee
+.EE
.
.ES
All three widgets visible, staircase effect, ordered 3,2,1:
-.Ex
-\*p \\
+.EX
+\*p \
--keep-window --begin 2 2 --yesno "" 0 0 \\
--and-widget --keep-window --begin 4 4 --yesno "" 0 0 \\
--and-widget --begin 6 6 --yesno "" 0 0
-.Ee
+.EE
.
.ES
First and third widget visible, staircase effect, ordered 3,1:
-.Ex
-\*p \\
+.EX
+\*p \
--keep-window --begin 2 2 --yesno "" 0 0 \\
--and-widget --clear --begin 4 4 --yesno "" 0 0 \\
--and-widget --begin 6 6 --yesno "" 0 0
-.Ee
+.EE
.IP
Note, if you want to restore original console colors and send your
cursor home after the dialog program has exited, use the \fBclear\fR\ (1)
@@ -238,7 +237,6 @@ occurrences of the given string, and to align the split data into columns.
.IP "\fB--cr-wrap"
Interpret embedded newlines in the dialog text as a newline on the screen.
Otherwise, \fB\*p\fR will only wrap lines where needed to fit inside the text box.
-.IP
Even though you can control line breaks with this,
\fB\*L\fR will still wrap any lines that are too long for the width of the box.
Without cr-wrap, the layout of your text may be formatted to look nice
@@ -272,25 +270,6 @@ If "\fB--nocancel\fP" or "\fB--visit-items\fP" are given
those options overrides this,
making the default button always "Yes" (internally the same as "OK").
.
-.IP "\fB--default-button \fIstring"
-Set the default (preselected) button in a widget.
-By preselecting a button,
-a script makes it possible for the user to simply press \fIEnter\fP
-to proceed through a dialog with minimum interaction.
-.IP
-The option's value is the name of the button:
-.IR ok ,
-.IR yes ,
-.IR cancel ,
-.IR no ,
-.IR help "\ or"
-.IR extra .
-.IP
-Normally the first button in each widget is the default.
-The first button shown is determined by the widget
-together with the "\fB--nook\fP" and "\fB--nocancel\fP options.
-If this option is not given, there is no default button assigned.
-.
.IP "\fB--default-item \fIstring"
Set the default item in a checklist, form or menu box.
Normally the first item in the box is the default.
@@ -359,14 +338,13 @@ adding a column which is displayed in the bottom line of the
screen, for the currently selected item.
.
.IP "\fB--keep-tite"
-When built with \fBncurses\fP,
-\fB\*p\fP normally checks to see if it is running in an \fBxterm\fP,
+Normally \fB\*p\fP checks to see if it is running in an \fBxterm\fP,
and in that case tries to suppress the initialization strings that
would make it switch to the alternate screen.
Switching between the normal and alternate screens
is visually distracting in a script which runs \fB\*p\fP
several times.
-Use this option to allow \fB\*p\fP to use those initialization strings.
+Use this option to allow \fB\*p\fP to use those initialization strings.
.
.IP "\fB--keep-window"
Normally when \fB\*p\fR performs several \fBtailboxbg\fR widgets
@@ -455,11 +433,6 @@ Prints \fB\*p\fR's version to \fB\*p\fP's output.
This may be used alone, without other options.
It does not cause \fBdialog\fP to exit by itself.
.
-.IP "\fB--quoted"
-Normally \fB\*p\fP quotes the strings returned by checklist's
-as well as the item-help text.
-Use this option to quote all string results.
-.
.IP "\fB--scrollbar"
For widgets holding a scrollable set of data,
draw a scrollbar on its right-margin.
@@ -483,8 +456,8 @@ Draw a shadow to the right and bottom of each dialog box.
Use single-quoting as needed (and no quotes if unneeded) for the
output of checklist's as well as the item-help text.
If this option is not set, \fB\*p\fP uses double quotes around each item.
-In either case,
-\fB\*p\fP adds backslashes to make the output useful in shell scripts.
+That requires occasional use of backslashes to make the output useful in
+shell scripts.
.
.IP "\fB--size-err"
Check the resulting size of a dialog box before trying to use it,
@@ -528,11 +501,8 @@ The day, month, year values in this case are for the current local time.
.IP "\fB--timeout \fIsecs"
Timeout (exit with error code)
if no user response within the given number of seconds.
+This is overridden if the background "\fB--tailboxbg\fP is used.
A timeout of zero seconds is ignored.
-.IP
-This option is ignored by the "\fB--pause\fP" widget.
-It is also overridden if the background "\fB--tailboxbg\fP" option is used
-to setup multiple concurrent widgets.
.
.IP "\fB--title \fItitle"
Specifies a
@@ -540,16 +510,11 @@ Specifies a
string to be displayed at the top of the dialog box.
.
.IP "\fB--trace \fIfilename"
-logs the command-line parameters,
-keystrokes and other information to the given file.
+logs the command-line parameters and
+keystrokes to the given file.
If \fBdialog\fP reads a configure file, it is logged as well.
Piped input to the \fIgauge\fP widget is logged.
Use control/T to log a picture of the current dialog window.
-.PP
-The \fB\*p\fR program handles some command-line parameters specially,
-and removes them from the parameter list as they are processed.
-For example, if the first option is \fB--trace\fP,
-then that is processed (and removed) before \fB\*p\fR initializes the display.
.
.IP "\fB--trim"
eliminate leading blanks,
@@ -624,10 +589,8 @@ The initial on/off state of each entry is specified by
On exit, a list of the \fItag\fP
strings of those entries that are turned on
will be printed on \fB\*p\fP's output.
-.IP
If the "\fB--separate-output\fP" option is not given,
-the strings will be quoted as needed to make it simple for scripts to separate them.
-By default, this uses double-quotes.
+the strings will be quoted to make it simple for scripts to separate them.
See the "\fB--single-quoted\fP" option, which modifies the quoting behavior.
.
.
@@ -658,7 +621,7 @@ On exit, the contents of the text-entry window are written to \fB\*p\fP's output
.
.IP "\fB--editbox \fIfilepath height width\fR"
The edit-box dialog displays a copy of the file.
-You may edit it using
+You may edit it using
the \fIbackspace\fP, \fIdelete\fP and cursor keys
to correct typing errors.
It also recognizes pageup/pagedown.
@@ -884,7 +847,7 @@ On exit, no text is written to \fB\*p\fP's output.
Only an "OK" button is provided for input,
but an ESC exit status may be returned.
.
-.IP "\fB--pause \fItext height width seconds\fR"
+.IP "\fB\-\-pause \fItext height width seconds\fR"
A
\fBpause\fP
box displays a meter along the bottom of the box.
@@ -936,8 +899,7 @@ If only two parameters are given, this text is omitted.
.IP "\fB--programbox \fIheight width"
A \fBprogrambox\fP is very similar to a \fBprogressbox\fP.
The only difference between a \fBprogram\fP box and a \fBprogress\fP
-box is that a \fBprogram\fP box displays an \fBOK\fP button
-(but only after the command completes).
+box is that a \fBprogram\fP box displays an \fBOK\fP button.
.IP
This dialog box is used to display the piped output of a command.
After the command completes, the user can press the \fIENTER\fP key so that
@@ -951,16 +913,7 @@ If only two parameters are given, this text is omitted.
.IP "\fB--progressbox \fItext height width"
.IP "\fB--progressbox \fIheight width"
A \fBprogressbox\fP is similar to an \fBtailbox\fP,
-except that
-.RS
-.TP 3
-a) rather than displaying the contents of a file,
-it displays the piped output of a command and
-.TP 3
-b) it will exit when it reaches the end of the file
-(there is no "OK" button).
-.RE
-.IP
+except that it will exit when it reaches the end of the file.
If three parameters are given, it displays the text under the title,
delineated from the scrolling file's contents.
If only two parameters are given, this text is omitted.
@@ -1141,10 +1094,9 @@ can find, as stated in step 2 above.
You can override or add to key bindings in \fB\*p\fP
by adding to the configuration file.
\fB\*L\fP's \fBbindkey\fP command maps single keys to its internal coding.
-.Ex
+.EX
bindkey \fIwidget\fP \fIcurses_key\fP \fIdialog_key\fP
-.Ee
-.PP
+.EE
The \fIwidget\fP name can be "*" (all widgets), or
specific widgets such as \fBtextbox\fP.
Specific widget bindings override the "*" bindings.
@@ -1159,82 +1111,6 @@ Finally, it allows any single character to be escaped with a backslash.
\fB\*L\fP's internal keycode names correspond to the
\fBDLG_KEYS_ENUM\fP type in
\fBdlg_keys.h\fP, e.g., "HELP" from "DLGK_HELP".
-.SS Widget Names
-.PP
-Some widgets (such as the formbox) have an area where fields can be edited.
-Those are managed in a subwindow of the widget, and
-may have separate keybindings from the main widget
-because the subwindows are registered using a different name.
-.TS
-center tab(/) ;
-l l l
-l l l .
-\fIWidget\fR/\fIWindow name\fR/\fISubwindow Name\fR
-calendar/calendar
-checklist/checklist
-editbox/editbox/editbox2
-form/formbox/formfield
-fselect/fselect/fselect2
-inputbox/inputbox/inputbox2
-menu/menubox/menu
-msgbox/msgbox
-pause/pause
-progressbox/progressbox
-radiolist/radiolist
-tailbox/tailbox
-textbox/textbox/searchbox
-timebox/timebox
-yesno/yesno
-.TE
-.PP
-Some widgets are actually other widgets,
-using internal settings to modify the behavior.
-Those use the same widget name as the actual widget:
-.TS
-center tab(/) ;
-l l
-l l .
-\fIWidget\fR/\fIActual Widget\fR
-dselect/fselect
-infobox/msgbox
-inputmenu/menu
-mixedform/form
-passwordbox/inputbox
-passwordform/form
-prgbox/progressbox
-programbox/progressbox
-tailboxbg/tailbox
-.TE
-.SS Built-in Bindings
-This manual page does not list the key bindings for each widget,
-because that detailed information can be obtained by running \fB\*p\fP.
-If you have set the \fB--trace\fP option,
-\fB\*p\fP writes the key-binding information for each widget
-as it is registered.
-.SS Example
-Normally \fB\*p\fP uses different keys for navigating between the buttons
-and editing part of a dialog versus navigating within the editing part.
-That is, tab (and back-tab) traverse buttons
-(or between buttons and the editing part),
-while arrow keys traverse fields within the editing part.
-Tabs are also recognized as a special case for traversing between
-widgets, e.g., when using multiple tailboxbg widgets.
-.PP
-Some users may wish to use the same key for traversing within the
-editing part as for traversing between buttons.
-The form widget is written to support this sort of redefinition of
-the keys, by adding a special group in <code>dlgk_keys.h</code>
-for "form" (left/right/next/prev).
-Here is an example binding demonstrating how to do this:
-.Ex
-bindkey formfield TAB form_NEXT
-bindkey formbox TAB form_NEXT
-bindkey formfield BTAB form_prev
-bindkey formbox BTAB form_prev
-.Ee
-.PP
-That type of redefinition would not be useful in other widgets,
-e.g., calendar, due to the potentially large number of fields to traverse.
.
.\" ************************************************************************
.SH ENVIRONMENT
@@ -1273,7 +1149,7 @@ error (-1),
ESC (255),
Extra (3),
Help (2),
-Help with \fB--item-help\fP (2),
+Help with --item-help (2),
or OK (0).
Normally shell scripts cannot distinguish between -1 and 255.
.TP 15
@@ -1291,39 +1167,35 @@ of how to use the different box options and how they look.
Just take a look into the directory \fBsamples/\fP of the source.
.SH DIAGNOSTICS
Exit status is subject to being overridden by environment variables.
-The default values and corresponding environment variables
-that can override them are:
+Normally they are:
.TP 5
0
if
.BR \*p " is exited by pressing the " Yes " or " OK
-button (DIALOG_OK).
+button.
.TP 5
1
if the
.BR No " or " Cancel
-button is pressed (DIALOG_CANCEL).
+button is pressed.
.TP 5
2
if the
.BR Help
-button is pressed (DIALOG_HELP).
+button is pressed.
.TP 5
3
if the
.BR Extra
-button is pressed (DIALOG_EXTRA).
-.TP 5
+button is pressed.
4
if the
-.BR Help
-button is pressed (DIALOG_HELP),
-or the \fB--item-help\fP option is set
-when the \fBHelp\fP button is pressed (DIALOG_ITEM_HELP),
+.BR Item Help
+button is pressed.
.TP 5
-1
-if errors occur inside \fB\*p\fP (DIALOG_ERROR)
-or \fB\*p\fP is exited by pressing the \fIESC\fP key (DIALOG_ESC).
+if errors occur inside \fB\*p\fP
+or \fB\*p\fP is exited by pressing the \fIESC\fP key.
.
.\" ************************************************************************
.SH PORTABILITY
@@ -1398,8 +1270,7 @@ Its documentation claims
.sp
.nf
whiptail(1) is a lightweight replacement for \*p(1),
-to provide dialog boxes for shell scripts.
-It is built on the
+to provide dialog boxes for shell scripts. It is built on the
newt windowing library rather than the ncurses library, allowing
it to be smaller in embedded enviroments such as installers,
rescue disks, etc.
@@ -1427,7 +1298,7 @@ but oddly cites only \fB\*p\fP versions up to 0.4 (1996) as a source.
That is, its manpage refers to features which
were borrowed from more recent versions of \fB\*p\fP, e.g.,
the \fB--gauge\fP and \fB--password\fP boxes,
-as well as options such as \fB--separate-output\fP (2008).
+as well as options such as \fB-separate-output\fP (2008).
Somewhat humorously, one may note that the \fBpopt\fP feature
(undocumented in its manpage)
of using a "--" as an escape was documented in \fB\*p\fP's manpage about
diff --git a/contrib/dialog/dialog.3 b/contrib/dialog/dialog.3
index 737b577..62938af 100644
--- a/contrib/dialog/dialog.3
+++ b/contrib/dialog/dialog.3
@@ -1,5 +1,5 @@
-.\" $Id: dialog.3,v 1.76 2012/07/03 08:22:10 tom Exp $
-.\" Copyright 2005-2011,2012 Thomas E. Dickey
+.\" $Id: dialog.3,v 1.68 2011/06/29 09:07:36 tom Exp $
+.\" Copyright 2005-2010,2011 Thomas E. Dickey
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU Lesser General Public License, version 2.1
@@ -38,7 +38,7 @@
.de bP
.IP \(bu 4
..
-.TH \*D 3 "" "$Date: 2012/07/03 08:22:10 $"
+.TH \*D 3 "" "$Date: 2011/06/29 09:07:36 $"
.SH NAME
\*l \- widgets and utilities for the \*p program
.SH SYNOPSIS
@@ -108,11 +108,6 @@ are designed for use by the calling application
while variables beginning with "\fIdlg_\fP"
are intended for lower levels, e.g., by the \fB\*l\fP library.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.all_subwindows
-This is a linked list of all subwindows created by the library.
-The \fBdlg_del_window\fP function uses this
-to free storage for subwindows when deleting a window.
-.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_STATE.all_windows
This is a linked list of all windows created by the library.
The \fBdlg_del_window\fP function uses this to locate windows which
@@ -295,9 +290,6 @@ bright red.
Restore normal settings with "\\Zn".
.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_VARS.column_separator
-This corresponds to the command-line option "\fB--column-separator\fP".
-\fB\*L\fP splits data for radio/checkboxes and menus on the
-occurrences of the given string, and aligns the split data into columns.
.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_VARS.cr_wrap
This corresponds to the command-line option "\fB--cr-wrap\fP".
@@ -315,16 +307,11 @@ This corresponds to the command-line option "\fB--date-format\fP \fIstring\fP".
If the host provides \fBstrftime\fP, and the value is nonnull,
the calendar widget uses this to format its output.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.default_button
-This is set by the command-line option "\fB--default-button\fP.
-It is used by \fBdlg_default_button\fP.
-.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_VARS.default_item
This corresponds to the command-line option "\fB--default-item\fP \fIstring\fP".
The given string is used as
the default item in a checklist, form or menu box.
Normally the first item in the box is the default.
-.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_VARS.defaultno
This corresponds to the command-line option "\fB--defaultno\fP".
If true,
@@ -490,8 +477,6 @@ Note that \fB\*p\fR will still wrap text, subject to the \fB--cr-wrap\fR
option.
.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_VARS.nook
-This corresponds to the command-line option "\fB--nook\fP.
-\fB\*L\fP will suppress the "ok" (or "yes") button from the widget.
.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_VARS.ok_label
This corresponds to the command-line option "\fB--ok-label\fP \fIstring\fP".
@@ -503,7 +488,6 @@ If true,
each widget prints its size to \fB\*p\fP's output when it is invoked.
.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_VARS.quoted
-This corresponds to the command-line option "\fB--quoted\fP.
.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_VARS.separate_output
This corresponds to the command-line option "\fB--separate-output\fP".
@@ -517,9 +501,8 @@ If true,
Use single-quoting as needed (and no quotes if unneeded) for the
output of checklist's as well as the item-help text.
If this option is not set, \fB\*p\fP uses double quotes around each item.
-The latter requires occasional use of backslashes to make the output useful in
+That requires occasional use of backslashes to make the output useful in
shell scripts.
-.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_VARS.size_err
This corresponds to the command-line option "\fB--size-err\fP".
If true,
@@ -935,8 +918,7 @@ If zero, the height is based on the screen size.
.B int \fIwidth
is the desired width of the box.
If zero, the height is based on the screen size.
-.TP 5
-.B int \fIpercent
+.IP percent
is the percentage to show in the progress bar.
.TP 5
.B int \fIitem_no
@@ -1211,9 +1193,6 @@ function to call when input ends, e.g., to free caller's additional data.
.TP 5
.B dlg_add_quoted
Add a quoted string to the result buffer (see \fBdlg_add_result\fP).
-If no quotes are necessary, none are used.
-If \fBdialog_vars.single_quoted\fR is set, single-quotes are used.
-Otherwise, double-quotes are used.
.RS
.TP 5
.B char * \fIstring
@@ -1222,7 +1201,7 @@ is the string to add.
.\" ---------------------------------------------------------------------------
.TP 5
.B dlg_add_result
-Add a string to the result buffer \fBdialog_vars.input_result\fP.
+Add a quoted string to the result buffer \fBdialog_vars.input_result\fP.
.RS
.TP 5
.B char * \fIstring
@@ -1297,10 +1276,6 @@ is the percentage to show in the progress bar.
returns its parameter transformed to the
corresponding "+" or "-", etc. for the line-drawing characters used in \fB\*p\fP.
If the parameter is not a line-drawing or other special character such as ACS_DARROW, it returns 0.
-.RS
-.TP 5
-.B chtype \fIch
-is the parameter, usually one of the \fBACS_\fP\fIxxx\fP constants.
.RE
.\" ---------------------------------------------------------------------------
.TP 5
@@ -1362,13 +1337,13 @@ is the name of the file.
.TP 5
.B int * \fIheight
is the nominal height.
-If it is -1, use the screen's height (after subtracting \fBdialog_vars.begin_y\fP
-if \fBdialog_vars.begin_set\fP is true).
+If it is -1, use the screen's height after subtracting \fBdialog_vars.begin_y\fP
+if \fBdialog_vars.begin_set\fP is true.
.TP 5
-.B int * \fIwidth
+.B int \fI*width
is the nominal width.
-If it is -1, use the screen's width (after subtracting \fBdialog_vars.begin_x\fP
-if \fBdialog_vars.begin_set\fP is true).
+If it is -1, use the screen's width after subtracting \fBdialog_vars.begin_x\fP
+if \fBdialog_vars.begin_set\fP is true.
.TP 5
.B int \fIboxlines
is the number of lines to reserve on the screen for drawing boxes.
@@ -1385,7 +1360,7 @@ this calls \fBbeep\fP once and sets
.\" ---------------------------------------------------------------------------
.TP 5
.B dlg_boxchar
-returns its \fBchtype\fP parameter transformed as follows:
+returns its parameter transformed as follows:
.RS
.TP 3
.B -
@@ -1710,18 +1685,6 @@ is the string to measure.
.RE
.\" ---------------------------------------------------------------------------
.TP 5
-.B dlg_count_real_columns
-Returns the number of columns used for a string,
-accounting for "\\Z" sequences which can be used for
-coloring the text if \fBdialog_vars.colors\fP is set.
-This is not necessarily the number of bytes in a string.
-.RS
-.TP 5
-.B const char * \fIstring
-is the string to measure.
-.RE
-.\" ---------------------------------------------------------------------------
-.TP 5
.B dlg_count_wchars
Returns the number of wide-characters in the string.
.RS
@@ -1756,13 +1719,6 @@ is the window's width
.RE
.\" ---------------------------------------------------------------------------
.TP 5
-.B dlg_default_button
-If \fBdialog_vars.default_button\fP is positive,
-return the button-index for that button code,
-using \fBdlg_ok_buttoncode\fP to test indices starting with zero.
-Otherwise (or if no match was found for the button code), return zero.
-.\" ---------------------------------------------------------------------------
-.TP 5
.B dlg_default_formitem
If \fBdialog_vars.default_item\fP is not null,
find that name by matching the \fIname\fP field in the list of form \fIitems\fP.
@@ -1874,34 +1830,12 @@ is the window's border attribute.
Draw a partial box at the bottom of a window,
e.g., to surround a row of buttons.
It is designed to merge with an existing box around
-the whole window (see \fBdlg_draw_box\fP),
-so it uses tee-elements rather than corner-elements
-on the top corners of this box.
-.RS
-.TP 5
-.B WINDOW * \fIwin
-is the window to update.
-.RE
-.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_draw_bottom_box2
-Draw a partial box at the bottom of a window,
-e.g., to surround a row of buttons.
-It is designed to merge with an existing box around
-the whole window (see \fBdlg_draw_box2\fP),
-so it uses tee-elements rather than corner-elements
+the whole window, so it uses tee-elements rather than corner-elements
on the top corners of this box.
.RS
.TP 5
.B WINDOW * \fIwin
is the window to update.
-.B chtype \fIon_left
-is used to color the upper/left edges of the box, i.e., the tee-element and
-horizontal line
-.B chtype \fIon_right
-is used to color the right edge of the box, i.e., the tee-element
-.B chtype \fIon_inside
-is used to fill-color the inside of the box
.RE
.\" ---------------------------------------------------------------------------
.TP 5
@@ -1933,36 +1867,6 @@ is used to color the upper/left edges.
.RE
.\" ---------------------------------------------------------------------------
.TP 5
-.B dlg_draw_box2
-Draw a rectangular box with line drawing characters.
-.RS
-.TP 5
-.B WINDOW * \fIwin
-is the window to update.
-.TP 5
-.B int \fIy
-is the top row of the box.
-.TP 5
-.B int \fIx
-is the left column of the box.
-.TP 5
-.B int \fIheight
-is the height of the box.
-.TP 5
-.B int \fIwidth
-is the width of the box.
-.TP 5
-.B chtype \fIboxchar
-is used to fill-color for the box contents.
-.TP 5
-.B chtype \fIborderchar
-is used to color the upper/left edges.
-.TP 5
-.B chtype \fIborderchar2
-is used to color the right/lower edges.
-.RE
-.\" ---------------------------------------------------------------------------
-.TP 5
.B dlg_draw_buttons
Print a list of buttons at the given position.
.RS
@@ -2088,27 +1992,6 @@ is the title string to display at the top of the widget.
.RE
.\" ---------------------------------------------------------------------------
.TP 5
-.B dlg_dummy_menutext
-This is a utility function which supports the \fB--inputmenu\fP option of
-the \fB\*p\fP program.
-If \fBdialog_vars.input_menu\fP is set, \fBdialog_menu\fP passes this
-pointer to \fBdlg_menu\fP as the \fIrename_menutext\fP parameter.
-Otherwise, it passes \fBdlg_dummy_menutext\fP.
-.IP
-The function should only return \fBDLG_EXIT_ERROR\fP.
-.RS
-.TP 5
-.B DIALOG_LISTITEM * \fIitems
-is the list of menu items
-.TP 5
-.B int \fIcurrent
-is the index of the currently-selected item
-.TP 5
-.B char * \fInewtext
-is the updated text for the menu item
-.RE
-.\" ---------------------------------------------------------------------------
-.TP 5
.B dlg_dump_keys
Write all user-defined key-bindings to the given stream,
e.g., as part of \fBdlg_create_rc\fP.
@@ -2119,20 +2002,6 @@ is the stream on which to write the bindings.
.RE
.\" ---------------------------------------------------------------------------
.TP 5
-.B dlg_dump_window_keys
-Write all user-defined key-bindings to the given stream,
-e.g., as part of \fBdlg_create_rc\fP.
-.RS
-.TP 5
-.B FILE * \fIfp
-is the stream on which to write the bindings.
-.TP 5
-.B WINDOW * \fIwin
-is the window for which bindings should be dumped.
-If it is null, then only built-in bindings are dumped.
-.RE
-.\" ---------------------------------------------------------------------------
-.TP 5
.B dlg_eat_argv
Remove one or more items from an argument vector.
.RS
@@ -2547,10 +2416,6 @@ The widget sets the referenced location to the index of the current display
item (cursor) when it returns.
.TP 5
.B DIALOG_INPUTMENU \fIrename_menutext
-If this is not \fBdlg_dummy_menutext\fP,
-the widget acts like an \fIinputmenu\fP widget,
-providing an extra "Rename" button,
-which activates an edit feature on the selected menu item.
.RE
.\" ---------------------------------------------------------------------------
.TP 5
@@ -3033,35 +2898,11 @@ is the binding table
Remove a callback.
.RS
.TP 5
-.B DIALOG_CALLBACK * \fIp
+.B DIALOG_CALLBACK \fI* p
contains the callback information.
.RE
.\" ---------------------------------------------------------------------------
.TP 5
-.B dlg_renamed_menutext
-This is a utility function which supports the \fB--inputmenu\fP option of
-the \fB\*p\fP program.
-If \fBdialog_vars.input_menu\fP is set, \fBdialog_menu\fP passes this
-pointer to \fBdlg_menu\fP as the \fIrename_menutext\fP parameter.
-Otherwise, it passes \fBdlg_dummy_menutext\fP.
-.IP
-The function should add "RENAMED" to \fBdialog_vars.input_result\fP ,
-followed by the menu item's name and the \fInewtext\fP value
-(with a space separating the three items),
-and return \fBDLG_EXIT_EXTRA\fP.
-.RS
-.TP 5
-.B DIALOG_LISTITEM * \fIitems
-is the list of menu items
-.TP 5
-.B int \fIcurrent
-is the index of the currently-selected item
-.TP 5
-.B char * \fInewtext
-is the updated text for the menu item
-.RE
-.\" ---------------------------------------------------------------------------
-.TP 5
.B dlg_restore_vars
Restore \fB\*p\fP's variables from the given variable (see \fBdialog_save_vars\fP).
.RS
@@ -3174,10 +3015,10 @@ is the string to duplicate
compare two strings, ignoring case.
.RS
.TP 5
-.B const char * \fIa
+.B const char \fI* a
is one string
.TP 5
-.B const char * \fIb
+.B const char \fI* b
is the other string
.RE
.\" ---------------------------------------------------------------------------
diff --git a/contrib/dialog/dialog.c b/contrib/dialog/dialog.c
index 249eaac..44a16db 100644
--- a/contrib/dialog/dialog.c
+++ b/contrib/dialog/dialog.c
@@ -1,9 +1,9 @@
/*
- * $Id: dialog.c,v 1.202 2012/07/01 20:20:39 tom Exp $
+ * $Id: dialog.c,v 1.193 2011/06/29 09:10:56 tom Exp $
*
* cdialog - Display simple dialog boxes from shell scripts
*
- * Copyright 2000-2011,2012 Thomas E. Dickey
+ * Copyright 2000-2010,2011 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -57,7 +57,6 @@ typedef enum {
,o_cr_wrap
,o_create_rc
,o_date_format
- ,o_default_button
,o_default_item
,o_defaultno
,o_dselect
@@ -202,7 +201,6 @@ static const Options options[] = {
{ "cr-wrap", o_cr_wrap, 1, "" },
{ "create-rc", o_create_rc, 1, NULL },
{ "date-format", o_date_format, 1, "<str>" },
- { "default-button", o_default_button, 1, "<str>" },
{ "default-item", o_default_item, 1, "<str>" },
{ "defaultno", o_defaultno, 1, "" },
{ "dselect", o_dselect, 2, "<directory> <height> <width>" },
@@ -433,12 +431,6 @@ unescape_argv(int *argcp, char ***argvp)
dialog_argv = (*argvp);
}
-#define OptionChars "\
-0123456789\
--\
-abcdefghijklmnopqrstuvwxyz\
-"
-
/*
* Check if the given string from main's argv is an option.
*/
@@ -457,11 +449,7 @@ isOption(const char *arg)
}
}
} else if (!strncmp(arg, "--", (size_t) 2) && isalpha(UCH(arg[2]))) {
- if (strlen(arg) == strspn(arg, OptionChars)) {
- result = TRUE;
- } else {
- dlg_exiterr("Invalid option \"%s\"", arg);
- }
+ result = TRUE;
}
}
return result;
@@ -471,19 +459,17 @@ static eOptions
lookupOption(const char *name, int pass)
{
unsigned n;
- eOptions result = o_unknown;
if (isOption(name)) {
name += 2;
for (n = 0; n < sizeof(options) / sizeof(options[0]); n++) {
if ((pass & options[n].pass) != 0
&& !strcmp(name, options[n].name)) {
- result = options[n].code;
- break;
+ return options[n].code;
}
}
}
- return result;
+ return o_unknown;
}
static void
@@ -699,7 +685,9 @@ call_checklist(CALLARGS)
{
int tags = howmany_tags(av + 5, CHECKBOX_TAGS);
int code;
+ bool save_quoted = dialog_vars.quoted;
+ dialog_vars.quoted = !dialog_vars.separate_output;
*offset_add = 5 + tags * CHECKBOX_TAGS;
code = dialog_checklist(t,
av[1],
@@ -707,6 +695,7 @@ call_checklist(CALLARGS)
numeric_arg(av, 3),
numeric_arg(av, 4),
tags, av + 5, FLAG_CHECK);
+ dialog_vars.quoted = save_quoted;
return code;
}
@@ -1063,43 +1052,6 @@ optionValue(char **argv, int *num)
return result;
}
-/* Return exit-code for a named button */
-static int
-button_code(const char *name)
-{
- /* *INDENT-OFF* */
- static struct {
- const char *name;
- int code;
- } table[] = {
- { "ok", DLG_EXIT_OK },
- { "yes", DLG_EXIT_OK },
- { "cancel", DLG_EXIT_CANCEL },
- { "no", DLG_EXIT_CANCEL },
- { "help", DLG_EXIT_HELP },
- { "extra", DLG_EXIT_EXTRA },
- };
- /* *INDENT-ON* */
-
- int code = DLG_EXIT_ERROR;
- size_t i;
-
- for (i = 0; i < (sizeof(table) / sizeof(table[0])); i++) {
- if (!dlg_strcmp(name, table[i].name)) {
- code = table[i].code;
- break;
- }
- }
-
- if (code == DLG_EXIT_ERROR) {
- char temp[80];
- sprintf(temp, "Button name \"%.20s\" unknown", name);
- Usage(temp);
- }
-
- return code;
-}
-
/*
* Print parts of a message
*/
@@ -1163,7 +1115,7 @@ Help(void)
static const char *const tbl_1[] =
{
"cdialog (ComeOn Dialog!) version %s",
- "Copyright 2000-2011,2012 Thomas E. Dickey",
+ "Copyright 2000-2008,2011 Thomas E. Dickey",
"This is free software; see the source for copying conditions. There is NO",
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.",
"",
@@ -1227,29 +1179,6 @@ Help(void)
dlg_exit(DLG_EXIT_OK);
}
-#ifdef HAVE_DLG_TRACE
-/*
- * Only the first call to dlg_trace will open a trace file. But each time
- * --trace is parsed, we show the whole parameter list as it is at that moment,
- * counting discarded parameters. The only way to capture the whole parameter
- * list is if --trace is the first option.
- */
-static void
-process_trace_option(char **argv, int *offset)
-{
- int j;
-
- if (dialog_state.trace_output == 0)
- dlg_trace(optionString(argv, offset));
-
- dlg_trace_msg("# Parameters:\n");
- for (j = 0; argv[j] != 0; ++j) {
- dlg_trace_msg("# argv[%d] = %s\n", j, argv[j]);
- }
- *offset += 1;
-}
-#endif
-
/*
* "Common" options apply to all widgets more/less. Most of the common options
* set values in dialog_vars, a few set dialog_state and a couple write to the
@@ -1258,12 +1187,12 @@ process_trace_option(char **argv, int *offset)
static int
process_common_options(int argc, char **argv, int offset, bool output)
{
+#ifdef HAVE_DLG_TRACE
+ int n;
+#endif
bool done = FALSE;
- dlg_trace_msg("# process_common_options, offset %d\n", offset);
-
while (offset < argc && !done) { /* Common options */
- dlg_trace_msg("#\targv[%d] = %s\n", offset, argv[offset]);
switch (lookupOption(argv[offset], 1)) {
case o_title:
dialog_vars.title = optionString(argv, &offset);
@@ -1321,11 +1250,6 @@ process_common_options(int argc, char **argv, int offset, bool output)
break;
case o_defaultno:
dialog_vars.defaultno = TRUE;
- dialog_vars.default_button = DLG_EXIT_CANCEL;
- break;
- case o_default_button:
- dialog_vars.default_button = button_code(optionString(argv, &offset));
- dialog_vars.defaultno = dialog_vars.default_button == DLG_EXIT_CANCEL;
break;
case o_default_item:
dialog_vars.default_item = optionString(argv, &offset);
@@ -1492,7 +1416,10 @@ process_common_options(int argc, char **argv, int offset, bool output)
break;
#ifdef HAVE_DLG_TRACE
case o_trace:
- process_trace_option(argv, &offset);
+ dlg_trace(optionString(argv, &offset));
+ for (n = 0; argv[n] != 0; ++n) {
+ dlg_trace_msg("argv[%d] = %s\n", n, argv[n]);
+ }
break;
#endif
}
@@ -1513,16 +1440,12 @@ init_result(char *buffer)
static char **special_argv = 0;
static int special_argc = 0;
- dlg_trace_msg("# init_result\n");
-
/* clear everything we do not save for the next widget */
memset(&dialog_vars, 0, sizeof(dialog_vars));
dialog_vars.input_result = buffer;
dialog_vars.input_result[0] = '\0';
- dialog_vars.default_button = -1;
-
/*
* The first time this is called, check for common options given by an
* environment variable.
@@ -1535,20 +1458,12 @@ init_result(char *buffer)
special_argv = dlg_string_to_argv(env);
special_argc = dlg_count_argv(special_argv);
}
- first = FALSE;
}
-
- /*
- * If we are not checking memory leaks, just do the parse of the
- * environment once.
- */
if (special_argv != 0) {
process_common_options(special_argc, special_argv, 0, FALSE);
#ifdef NO_LEAKS
free(special_argv[0]);
free(special_argv);
- special_argv = 0;
- special_argc = 0;
first = TRUE;
#endif
}
@@ -1624,28 +1539,10 @@ main(int argc, char *argv[])
case o_help:
Help();
break;
-#ifdef HAVE_DLG_TRACE
- case o_trace:
- /*
- * Process/remove the --trace option if it is the first option.
- * Otherwise, process it in more/less expected order as a
- * "common" option.
- */
- if (base == 1) {
- process_trace_option(argv, &offset);
- break;
- } else {
- ++offset;
- continue;
- }
-#endif
default:
++offset;
continue;
}
- dlg_trace_msg("# discarding %d parameters starting with argv[%d] (%s)\n",
- 1 + offset - base, base,
- argv[base]);
for (j = base; j < argc; ++j) {
dialog_argv[j] = dialog_argv[j + 1 + (offset - base)];
if (dialog_opts != 0)
@@ -1782,7 +1679,6 @@ main(int argc, char *argv[])
retval = show_result((*(modePtr->jumper)) (dialog_vars.title,
argv + offset,
&offset_add));
- dlg_trace_msg("# widget returns %d\n", retval);
offset += offset_add;
if (dialog_vars.input_result != my_buffer) {
diff --git a/contrib/dialog/dialog.h b/contrib/dialog/dialog.h
index 1e31b09..4e1b01c 100644
--- a/contrib/dialog/dialog.h
+++ b/contrib/dialog/dialog.h
@@ -1,9 +1,9 @@
/*
- * $Id: dialog.h,v 1.245 2012/07/01 18:44:03 tom Exp $
+ * $Id: dialog.h,v 1.231 2011/06/29 09:51:00 tom Exp $
*
* dialog.h -- common declarations for all dialog modules
*
- * Copyright 2000-2011,2012 Thomas E. Dickey
+ * Copyright 2000-2010,2011 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -59,9 +59,11 @@
#include <ncurses.h>
#else
#include <curses.h>
-#if defined(HAVE_UNCTRL_H)
-#include <unctrl.h> /* most curses.h headers include this, some do not */
#endif
+
+/* most curses.h headers include this, some do not */
+#if defined(HAVE_UNCTRL_H)
+#include <unctrl.h>
#endif
/* Solaris xpg4 renames these */
@@ -95,10 +97,6 @@
#define _(s) s
#endif
-#ifndef GCC_PRINTFLIKE
-#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
-#endif
-
#ifndef GCC_NORETURN
#define GCC_NORETURN /*nothing*/
#endif
@@ -235,11 +233,6 @@
#define getparyx(win,y,x) (y = (win)?(win)->_pary:ERR, x = (win)?(win)->_parx:ERR)
#endif
-#if !defined(HAVE_WGETPARENT) && defined(HAVE_WINDOW__PARENT)
-#undef wgetparent
-#define wgetparent(win) ((win) ? (win)->_parent : 0)
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -281,12 +274,6 @@ extern int dlg_getparx(WINDOW * /*win*/);
extern int dlg_getpary(WINDOW * /*win*/);
#endif
-#if !(defined(HAVE_WGETPARENT) && defined(HAVE_WINDOW__PARENT))
-#undef wgetparent
-#define wgetparent(win) dlg_wgetparent(win)
-extern WINDOW * dlg_wgetparent(WINDOW * /*win*/);
-#endif
-
/*
* This is a list of "old" names, which should be helpful in updating
* applications that use libdialog. Starting with 2003/11/26, all exported
@@ -370,10 +357,6 @@ extern WINDOW * dlg_wgetparent(WINDOW * /*win*/);
#define form_text_attr DIALOG_ATR(31)
#define form_item_readonly_attr DIALOG_ATR(32)
#define gauge_attr DIALOG_ATR(33)
-#define border2_attr DIALOG_ATR(34)
-#define inputbox_border2_attr DIALOG_ATR(35)
-#define searchbox_border2_attr DIALOG_ATR(36)
-#define menubox_border2_attr DIALOG_ATR(37)
#define DLGK_max (KEY_MAX + 256)
@@ -413,7 +396,6 @@ typedef struct {
DIALOG_CALLBACK *getc_callbacks;
DIALOG_CALLBACK *getc_redirect;
DIALOG_WINDOWS *all_windows;
- DIALOG_WINDOWS *all_subwindows;
FILE *output; /* option "--output-fd fd" */
FILE *pipe_input; /* used for gauge widget */
FILE *screen_output; /* newterm(), etc. */
@@ -503,8 +485,6 @@ typedef struct {
char *help_file; /* option "--hfile" */
bool in_helpfile; /* flag to prevent recursion in --hfile */
bool no_nl_expand; /* option "--no-nl-expand" */
- /* 1.1-20120701 */
- int default_button; /* option "--default-button" (exit code) */
} DIALOG_VARS;
#define USE_ITEM_HELP(s) (dialog_vars.item_help && (s) != 0)
@@ -643,7 +623,7 @@ extern void dlg_align_columns(char ** /* target */, int /* per_row */, int /* n
extern void dlg_free_columns(char ** /* target */, int /* per_row */, int /* num_rows */);
/* editbox.c */
-extern int dlg_editbox(const char * /*title*/, char *** /*list*/, int * /*rows*/, int /*height*/, int /*width*/);
+extern int dlg_editbox(const char */*title*/, char ***/*list*/, int */*rows*/, int /*height*/, int /*width*/);
/* formbox.c */
extern int dlg_default_formitem(DIALOG_FORMITEM * /*items*/);
@@ -666,10 +646,6 @@ extern int dlg_find_index(const int * /*list*/, int /*limit*/, int /*to_find*/)
extern int dlg_limit_columns(const char * /*string*/, int /*limit*/, int /*offset*/);
extern void dlg_show_string(WINDOW * /*win*/, const char * /*string*/, int /*offset*/, chtype /*attr*/, int /*y_base*/, int /*x_base*/, int /*x_last*/, bool /*hidden*/, bool /*force*/);
-/* menubox.c */
-extern int dlg_dummy_menutext(DIALOG_LISTITEM * /*items*/, int /*current*/, char * /*newtext*/);
-extern int dlg_renamed_menutext(DIALOG_LISTITEM * /*items*/, int /*current*/, char * /*newtext*/);
-
/* rc.c */
#ifdef HAVE_RC_FILE
extern int dlg_parse_rc(void);
@@ -697,17 +673,15 @@ extern char * dlg_strempty(void);
extern chtype dlg_asciibox(chtype /*ch*/);
extern chtype dlg_boxchar(chtype /*ch*/);
extern chtype dlg_get_attrs(WINDOW * /*win*/);
-extern const char * dlg_print_line(WINDOW * /*win*/, chtype * /*attr*/, const char * /*prompt*/, int /*lm*/, int /*rm*/, int * /*x*/);
+extern const char * dlg_print_line(WINDOW */*win*/, chtype */*attr*/, const char */*prompt*/, int /*lm*/, int /*rm*/, int */*x*/);
extern int dlg_box_x_ordinate(int /*width*/);
extern int dlg_box_y_ordinate(int /*height*/);
extern int dlg_calc_list_width(int /*item_no*/, DIALOG_LISTITEM * /*items*/);
extern int dlg_calc_listw(int /*item_no*/, char ** /*items*/, int /*group*/);
-extern int dlg_check_scrolled(int /* key */, int /* last */, int /* page */, bool * /* show */, int * /* offset */);
-extern int dlg_count_real_columns(const char * /*text*/);
+extern int dlg_check_scrolled(int /* key */, int /* last */, int /* page */, bool */* show */, int */* offset */);
extern int dlg_default_item(char ** /*items*/, int /*llen*/);
extern int dlg_default_listitem(DIALOG_LISTITEM * /*items*/);
extern int dlg_defaultno_button(void);
-extern int dlg_default_button(void);
extern int dlg_max_input(int /*max_len*/);
extern int dlg_print_scrolled(WINDOW * /* win */, const char * /* prompt */, int /* offset */, int /* height */, int /* width */, int /* pauseopt */);
extern void dlg_add_quoted(char * /*string*/);
@@ -725,9 +699,7 @@ extern void dlg_ctl_size(int /*height*/, int /*width*/);
extern void dlg_del_window(WINDOW * /*win*/);
extern void dlg_does_output(void);
extern void dlg_draw_bottom_box(WINDOW * /*win*/);
-extern void dlg_draw_bottom_box2(WINDOW * /*win*/, chtype /*on_left*/, chtype /*on_right*/, chtype /*on_inside*/);
extern void dlg_draw_box(WINDOW * /*win*/, int /*y*/, int /*x*/, int /*height*/, int /*width*/, chtype /*boxchar*/, chtype /*borderchar*/);
-extern void dlg_draw_box2(WINDOW * /*win*/, int /*y*/, int /*x*/, int /*height*/, int /*width*/, chtype /*boxchar*/, chtype /*borderchar*/, chtype /*borderchar2*/);
extern void dlg_draw_title(WINDOW *win, const char *title);
extern void dlg_exit(int /*code*/) GCC_NORETURN;
extern void dlg_item_help(const char * /*txt*/);
@@ -743,7 +715,11 @@ extern void dlg_trim_string(char * /*src*/);
extern void end_dialog(void);
extern void init_dialog(FILE * /*input*/, FILE * /*output*/);
-extern void dlg_exiterr(const char *, ...) GCC_NORETURN GCC_PRINTFLIKE(1,2);
+extern void dlg_exiterr(const char *, ...) GCC_NORETURN
+#if defined(__GNUC__) && !defined(printf)
+__attribute__((format(printf,1,2)))
+#endif
+;
#ifdef HAVE_COLOR
extern chtype dlg_color_pair(int /*foreground*/, int /*background*/);
@@ -760,7 +736,11 @@ extern int dlg_strcmp(const char * /*a*/, const char * /*b*/);
#ifdef HAVE_DLG_TRACE
#define DLG_TRACE(params) dlg_trace_msg params
-extern void dlg_trace_msg(const char *fmt, ...) GCC_PRINTFLIKE(1,2);
+extern void dlg_trace_msg(const char *fmt, ...)
+#ifdef GCC_PRINTF
+ __attribute__((format(printf,1,2)))
+#endif
+;
extern void dlg_trace_win(WINDOW * /*win*/);
extern void dlg_trace_chr(int /*ch*/, int /*fkey*/);
extern void dlg_trace(const char * /*fname*/);
diff --git a/contrib/dialog/dlg_colors.h b/contrib/dialog/dlg_colors.h
index c047f72..84123dd 100644
--- a/contrib/dialog/dlg_colors.h
+++ b/contrib/dialog/dlg_colors.h
@@ -1,5 +1,5 @@
/*
- * $Id: dlg_colors.h,v 1.17 2011/10/14 21:19:59 tom Exp $
+ * $Id: dlg_colors.h,v 1.16 2011/01/17 00:20:32 tom Exp $
*
* colors.h -- color attribute definitions
*
@@ -56,10 +56,6 @@
#define DLGC_BG_BORDER COLOR_WHITE
#define DLGC_HL_BORDER TRUE
-#define DLGC_FG_BORDER2 DLGC_FG_DIALOG
-#define DLGC_BG_BORDER2 DLGC_BG_DIALOG
-#define DLGC_HL_BORDER2 DLGC_HL_DIALOG
-
#define DLGC_FG_BUTTON_ACTIVE COLOR_WHITE
#define DLGC_BG_BUTTON_ACTIVE COLOR_BLUE
#define DLGC_HL_BUTTON_ACTIVE TRUE
@@ -96,10 +92,6 @@
#define DLGC_BG_INPUTBOX_BORDER COLOR_WHITE
#define DLGC_HL_INPUTBOX_BORDER FALSE
-#define DLGC_FG_INPUTBOX_BORDER2 DLGC_FG_INPUTBOX
-#define DLGC_BG_INPUTBOX_BORDER2 DLGC_BG_INPUTBOX
-#define DLGC_HL_INPUTBOX_BORDER2 DLGC_HL_INPUTBOX
-
#define DLGC_FG_SEARCHBOX COLOR_BLACK
#define DLGC_BG_SEARCHBOX COLOR_WHITE
#define DLGC_HL_SEARCHBOX FALSE
@@ -112,10 +104,6 @@
#define DLGC_BG_SEARCHBOX_BORDER COLOR_WHITE
#define DLGC_HL_SEARCHBOX_BORDER TRUE
-#define DLGC_FG_SEARCHBOX_BORDER2 DLGC_FG_SEARCHBOX
-#define DLGC_BG_SEARCHBOX_BORDER2 DLGC_BG_SEARCHBOX
-#define DLGC_HL_SEARCHBOX_BORDER2 DLGC_HL_SEARCHBOX
-
#define DLGC_FG_POSITION_INDICATOR COLOR_BLUE
#define DLGC_BG_POSITION_INDICATOR COLOR_WHITE
#define DLGC_HL_POSITION_INDICATOR TRUE
@@ -128,10 +116,6 @@
#define DLGC_BG_MENUBOX_BORDER COLOR_WHITE
#define DLGC_HL_MENUBOX_BORDER TRUE
-#define DLGC_FG_MENUBOX_BORDER2 DLGC_FG_MENUBOX
-#define DLGC_BG_MENUBOX_BORDER2 DLGC_BG_MENUBOX
-#define DLGC_HL_MENUBOX_BORDER2 DLGC_HL_MENUBOX
-
#define DLGC_FG_ITEM COLOR_BLACK
#define DLGC_BG_ITEM COLOR_WHITE
#define DLGC_HL_ITEM FALSE
diff --git a/contrib/dialog/dlg_keys.c b/contrib/dialog/dlg_keys.c
index 4b59f6b..97ca865 100644
--- a/contrib/dialog/dlg_keys.c
+++ b/contrib/dialog/dlg_keys.c
@@ -1,9 +1,9 @@
/*
- * $Id: dlg_keys.c,v 1.34 2011/10/14 00:41:08 tom Exp $
+ * $Id: dlg_keys.c,v 1.26 2009/02/22 16:19:51 tom Exp $
*
- * dlg_keys.c -- runtime binding support for dialog
+ * dlg_keys.c -- runtime binding support for dialog
*
- * Copyright 2006-2009,2011 Thomas E. Dickey
+ * Copyright 2006-2007,2009 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -34,7 +34,6 @@ LIST_BINDINGS {
DLG_KEYS_BINDING *binding; /* list of bindings */
};
-#define WILDNAME "*"
static LIST_BINDINGS *all_bindings;
static const DLG_KEYS_BINDING end_keys_binding = END_KEYS_BINDING;
@@ -62,17 +61,6 @@ dlg_register_window(WINDOW *win, const char *name, DLG_KEYS_BINDING * binding)
else
all_bindings = p;
}
-#if defined(HAVE_DLG_TRACE) && defined(HAVE_RC_FILE)
- /*
- * Trace the binding information assigned to this window. For most widgets
- * there is only one binding table. forms have two, so the trace will be
- * longer. Since compiled-in bindings are only visible when the widget is
- * registered, there is no other way to see what bindings are available,
- * than by running dialog and tracing it.
- */
- dlg_trace_msg("# dlg_register_window %s\n", name);
- dlg_dump_window_keys(dialog_state.trace_output, win);
-#endif
}
/*
@@ -201,7 +189,7 @@ int
dlg_lookup_key(WINDOW *win, int curses_key, int *fkey)
{
LIST_BINDINGS *p;
- DLG_KEYS_BINDING *q;
+ int n;
/*
* Ignore mouse clicks, since they are already encoded properly.
@@ -220,28 +208,19 @@ dlg_lookup_key(WINDOW *win, int curses_key, int *fkey)
} else
#endif
if (*fkey == 0 || curses_key < KEY_MAX) {
- const char *name = WILDNAME;
- if (win != 0) {
- for (p = all_bindings; p != 0; p = p->link) {
- if (p->win == win) {
- name = p->name;
- break;
- }
- }
- }
for (p = all_bindings; p != 0; p = p->link) {
- if (p->win == win || (p->win == 0 && !strcmp(p->name, name))) {
+ if (p->win == win || p->win == 0) {
int function_key = (*fkey != 0);
- for (q = p->binding; q->is_function_key >= 0; ++q) {
+ for (n = 0; p->binding[n].is_function_key >= 0; ++n) {
if (p->buttons
&& !function_key
- && q->curses_key == (int) dlg_toupper(curses_key)) {
+ && p->binding[n].curses_key == (int) dlg_toupper(curses_key)) {
*fkey = 0;
- return q->dialog_key;
+ return p->binding[n].dialog_key;
}
- if (q->curses_key == curses_key
- && q->is_function_key == function_key) {
- *fkey = q->dialog_key;
+ if (p->binding[n].curses_key == curses_key
+ && p->binding[n].is_function_key == function_key) {
+ *fkey = p->binding[n].dialog_key;
return *fkey;
}
}
@@ -316,18 +295,10 @@ typedef struct {
int code;
} CODENAME;
-#define ASCII_NAME(name,code) { #name, code }
#define CURSES_NAME(upper) { #upper, KEY_ ## upper }
#define COUNT_CURSES sizeof(curses_names)/sizeof(curses_names[0])
static const CODENAME curses_names[] =
{
- ASCII_NAME(ESC, '\033'),
- ASCII_NAME(CR, '\r'),
- ASCII_NAME(LF, '\n'),
- ASCII_NAME(FF, '\f'),
- ASCII_NAME(TAB, '\t'),
- ASCII_NAME(DEL, '\177'),
-
CURSES_NAME(DOWN),
CURSES_NAME(UP),
CURSES_NAME(LEFT),
@@ -437,10 +408,6 @@ static const CODENAME dialog_names[] =
DIALOG_NAME(FIELD_LAST),
DIALOG_NAME(FIELD_NEXT),
DIALOG_NAME(FIELD_PREV),
- DIALOG_NAME(FORM_FIRST),
- DIALOG_NAME(FORM_LAST),
- DIALOG_NAME(FORM_NEXT),
- DIALOG_NAME(FORM_PREV),
DIALOG_NAME(GRID_UP),
DIALOG_NAME(GRID_DOWN),
DIALOG_NAME(GRID_LEFT),
@@ -451,9 +418,7 @@ static const CODENAME dialog_names[] =
DIALOG_NAME(ENTER),
DIALOG_NAME(BEGIN),
DIALOG_NAME(FINAL),
- DIALOG_NAME(SELECT),
- DIALOG_NAME(HELPFILE),
- DIALOG_NAME(TRACE)
+ DIALOG_NAME(SELECT)
};
static char *
@@ -507,9 +472,9 @@ compare_bindings(LIST_BINDINGS * a, LIST_BINDINGS * b)
if (a->win == b->win) {
if (!strcmp(a->name, b->name)) {
result = a->binding[0].curses_key - b->binding[0].curses_key;
- } else if (!strcmp(b->name, WILDNAME)) {
+ } else if (!strcmp(b->name, "*")) {
result = -1;
- } else if (!strcmp(a->name, WILDNAME)) {
+ } else if (!strcmp(a->name, "*")) {
result = 1;
} else {
result = dlg_strcmp(a->name, b->name);
@@ -607,7 +572,6 @@ dlg_parse_bindkey(char *params)
p = skip_black(p);
if (p != widget && *p != '\0') {
*p++ = '\0';
- p = skip_white(p);
q = p;
while (*p != '\0' && curses_key < 0) {
if (escaped) {
@@ -649,7 +613,7 @@ dlg_parse_bindkey(char *params)
for (xx = 0; xx < COUNT_CURSES; ++xx) {
if (!dlg_strcmp(curses_names[xx].name, q)) {
curses_key = curses_names[xx].code;
- is_function = (curses_key >= KEY_MIN);
+ is_function = TRUE;
break;
}
}
@@ -736,53 +700,30 @@ dump_one_binding(FILE *fp, const char *widget, DLG_KEYS_BINDING * binding)
fputc('\n', fp);
}
-/*
- * Dump bindings for the given window. If it is a null, then this dumps the
- * initial bindings which were loaded from the rc-file that are used as
- * overall defaults.
- */
void
-dlg_dump_window_keys(FILE *fp, WINDOW *win)
+dlg_dump_keys(FILE *fp)
{
- if (fp != 0) {
- LIST_BINDINGS *p;
- DLG_KEYS_BINDING *q;
- const char *last = "";
+ LIST_BINDINGS *p;
+ const char *last = "";
+ unsigned n;
+ unsigned count = 0;
- for (p = all_bindings; p != 0; p = p->link) {
- if (p->win == win) {
+ for (p = all_bindings; p != 0; p = p->link) {
+ if (p->win == 0) {
+ ++count;
+ }
+ }
+ if (count != 0) {
+ for (p = all_bindings, n = 0; p != 0; p = p->link) {
+ if (p->win == 0) {
if (dlg_strcmp(last, p->name)) {
fprintf(fp, "\n# key bindings for %s widgets\n",
- !strcmp(p->name, WILDNAME) ? "all" : p->name);
+ !strcmp(p->name, "*") ? "all" : p->name);
last = p->name;
}
- for (q = p->binding; q->is_function_key >= 0; ++q) {
- dump_one_binding(fp, p->name, q);
- }
+ dump_one_binding(fp, p->name, p->binding);
}
}
}
}
-
-/*
- * Dump all of the bindings which are not specific to a given widget, i.e.,
- * the "win" member is null.
- */
-void
-dlg_dump_keys(FILE *fp)
-{
- if (fp != 0) {
- LIST_BINDINGS *p;
- unsigned count = 0;
-
- for (p = all_bindings; p != 0; p = p->link) {
- if (p->win == 0) {
- ++count;
- }
- }
- if (count != 0) {
- dlg_dump_window_keys(fp, 0);
- }
- }
-}
#endif /* HAVE_RC_FILE */
diff --git a/contrib/dialog/dlg_keys.h b/contrib/dialog/dlg_keys.h
index 3469e40..34b4cba 100644
--- a/contrib/dialog/dlg_keys.h
+++ b/contrib/dialog/dlg_keys.h
@@ -1,9 +1,9 @@
/*
- * $Id: dlg_keys.h,v 1.31 2012/07/02 23:57:52 tom Exp $
+ * $Id: dlg_keys.h,v 1.26 2011/06/21 22:09:22 tom Exp $
*
* dlg_keys.h -- runtime binding support for dialog
*
- * Copyright 2005-2011,2012 Thomas E. Dickey
+ * Copyright 2005-2010,2011 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -23,7 +23,6 @@
#ifndef DLG_KEYS_H_included
#define DLG_KEYS_H_included 1
-/* *INDENT-OFF* */
#include <dialog.h>
@@ -32,7 +31,7 @@
#define dlg_toupper(ch) towupper((wint_t)ch)
#define dlg_isupper(ch) iswupper((wint_t)ch)
#else
-#define dlg_toupper(ch) (((ch) > 0 && (ch) <= 255) ? toupper(ch) : (ch))
+#define dlg_toupper(ch) toupper(ch)
#define dlg_isupper(ch) (isalpha(ch) && isupper(ch))
#endif
@@ -46,7 +45,7 @@ typedef struct {
int dialog_key;
} DLG_KEYS_BINDING;
-#define DLG_KEYS_DATA(dialog, curses) { (curses) >= KEY_MIN, curses, dialog }
+#define DLG_KEYS_DATA(dialog, curses) { curses >= KEY_MIN, curses, dialog }
#define END_KEYS_BINDING { -1, 0, 0 }
@@ -76,11 +75,6 @@ typedef enum {
DLGK_FIELD_LAST,
DLGK_FIELD_NEXT,
DLGK_FIELD_PREV,
- /* moving from form-field to form-field (or buttons) */
- DLGK_FORM_FIRST,
- DLGK_FORM_LAST,
- DLGK_FORM_NEXT,
- DLGK_FORM_PREV,
/* moving within a grid */
DLGK_GRID_UP,
DLGK_GRID_DOWN,
@@ -142,15 +136,6 @@ typedef enum {
DLG_KEYS_DATA( DLGK_PAGE_PREV, 'b' ), \
DLG_KEYS_DATA( DLGK_PAGE_PREV, KEY_PPAGE )
-#define TRAVERSE_BINDINGS \
- DLG_KEYS_DATA( DLGK_ENTER, ' ' ), \
- DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_DOWN ), \
- DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_RIGHT ), \
- DLG_KEYS_DATA( DLGK_FIELD_NEXT, TAB ), \
- DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_UP ), \
- DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ), \
- DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_LEFT )
-
extern int dlg_lookup_key(WINDOW * /*win*/, int /*curses_key*/, int * /*dialog_key*/);
extern int dlg_result_key(int /*dialog_key*/, int /*fkey*/, int * /*resultp*/);
extern void dlg_register_buttons(WINDOW * /*win*/, const char * /*name*/, const char ** /*buttons*/);
@@ -160,12 +145,10 @@ extern void dlg_unregister_window(WINDOW * /*win*/);
#ifdef HAVE_RC_FILE
extern int dlg_parse_bindkey(char * /*params*/);
extern void dlg_dump_keys(FILE * /*fp*/);
-extern void dlg_dump_window_keys(FILE * /*fp*/, WINDOW * /*win*/);
#endif
#ifdef __cplusplus
}
#endif
-/* *INDENT-ON* */
#endif /* DLG_KEYS_H_included */
diff --git a/contrib/dialog/editbox.c b/contrib/dialog/editbox.c
index 7488d65..c7da10c 100644
--- a/contrib/dialog/editbox.c
+++ b/contrib/dialog/editbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: editbox.c,v 1.61 2012/07/01 18:13:32 Zoltan.Kelemen Exp $
+ * $Id: editbox.c,v 1.55 2011/06/21 00:10:46 tom Exp $
*
* editbox.c -- implements the edit box
*
- * Copyright 2007-2011,2012 Thomas E. Dickey
+ * Copyright 2007-2010,2011 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -43,10 +43,9 @@ grow_list(char ***list, int *have, int want)
(*list) = dlg_realloc(char *, need, *list);
if ((*list) == 0) {
fail_list();
- } else {
- while (++last < need) {
- (*list)[last] = 0;
- }
+ }
+ while (++last < need) {
+ (*list)[last] = 0;
}
}
}
@@ -69,47 +68,45 @@ load_list(const char *file, char ***list, int *rows)
dlg_exiterr("Not a file: %s", file);
size = (size_t) sb.st_size;
- if ((blob = dlg_malloc(char, size + 1)) == 0) {
- fail_list();
- } else {
- blob[size] = '\0';
-
- if ((fp = fopen(file, "r")) == 0)
- dlg_exiterr("Cannot open: %s", file);
- size = fread(blob, sizeof(char), size, fp);
- fclose(fp);
-
- for (pass = 0; pass < 2; ++pass) {
- int first = TRUE;
- need = 0;
- for (n = 0; n < size; ++n) {
- if (first && pass) {
- (*list)[need] = blob + n;
- first = FALSE;
- }
- if (blob[n] == '\n') {
- first = TRUE;
- ++need;
- if (pass)
- blob[n] = '\0';
- }
+ if ((blob = dlg_malloc(char, size + 1)) == 0)
+ fail_list();
+ blob[size] = '\0';
+
+ if ((fp = fopen(file, "r")) == 0)
+ dlg_exiterr("Cannot open: %s", file);
+ size = fread(blob, sizeof(char), size, fp);
+ fclose(fp);
+
+ for (pass = 0; pass < 2; ++pass) {
+ int first = TRUE;
+ need = 0;
+ for (n = 0; n < size; ++n) {
+ if (first && pass) {
+ (*list)[need] = blob + n;
+ first = FALSE;
}
- if (pass) {
- if (need == 0) {
- (*list)[0] = dlg_strclone("");
- (*list)[1] = 0;
- } else {
- for (n = 0; n < need; ++n) {
- (*list)[n] = dlg_strclone((*list)[n]);
- }
- (*list)[need] = 0;
- }
+ if (blob[n] == '\n') {
+ first = TRUE;
+ ++need;
+ if (pass)
+ blob[n] = '\0';
+ }
+ }
+ if (pass) {
+ if (need == 0) {
+ (*list)[0] = dlg_strclone("");
+ (*list)[1] = 0;
} else {
- grow_list(list, rows, (int) need + 1);
+ for (n = 0; n < need; ++n) {
+ (*list)[n] = dlg_strclone((*list)[n]);
+ }
+ (*list)[need] = 0;
}
+ } else {
+ grow_list(list, rows, (int) need + 1);
}
- free(blob);
}
+ free(blob);
}
static void
@@ -347,7 +344,6 @@ dlg_editbox(const char *title,
size_t max_len = (size_t) dlg_max_input(widest_line(*list));
char *input, *buffer;
bool show_all, show_one, was_mouse;
- bool first_trace = TRUE;
WINDOW *dialog;
WINDOW *editing;
DIALOG_VARS save_vars;
@@ -368,8 +364,8 @@ dlg_editbox(const char *title,
retry:
#endif
show_buttons = TRUE;
- state = dialog_vars.default_button >= 0 ? dlg_default_button() : sTEXT;
- fkey = 0;
+ state = dialog_vars.defaultno ? dlg_defaultno_button() : sTEXT;
+ key = fkey = 0;
dlg_button_layout(buttons, &mincols);
dlg_auto_size(title, "", &height, &width, 3 * LINES / 4, mincols);
@@ -385,11 +381,11 @@ dlg_editbox(const char *title,
dlg_mouse_setbase(x, y);
- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
- dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
+ dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
+ dlg_draw_bottom_box(dialog);
dlg_draw_title(dialog, title);
- (void) wattrset(dialog, dialog_attr);
+ wattrset(dialog, dialog_attr);
/* Draw the editing field in a box */
box_y = MARGIN + 0;
@@ -402,7 +398,7 @@ dlg_editbox(const char *title,
box_x,
box_height,
box_width,
- border_attr, border2_attr);
+ border_attr, dialog_attr);
dlg_mouse_mkbigregion(box_y + MARGIN,
box_x + MARGIN,
box_height - (2 * MARGIN),
@@ -413,7 +409,7 @@ dlg_editbox(const char *title,
box_width - (2 * MARGIN),
getbegy(dialog) + box_y + 1,
getbegx(dialog) + box_x + 1);
- dlg_register_window(editing, "editbox2", binding2);
+ dlg_register_window(editing, "editbox", binding2);
show_all = TRUE;
show_one = FALSE;
@@ -448,7 +444,7 @@ dlg_editbox(const char *title,
box_x + getmaxx(editing),
box_y + 0,
box_y + getmaxy(editing) + 1,
- border2_attr,
+ dialog_attr,
border_attr);
wmove(editing, y, x);
show_one = FALSE;
@@ -480,11 +476,6 @@ dlg_editbox(const char *title,
}
}
- if (first_trace) {
- first_trace = FALSE;
- dlg_trace_win(dialog);
- }
-
key = dlg_mouse_wgetch((state == sTEXT) ? editing : dialog, &fkey);
if (key == ERR) {
result = DLG_EXIT_ERROR;
diff --git a/contrib/dialog/formbox.c b/contrib/dialog/formbox.c
index 8cbe8a8..7ec798c 100644
--- a/contrib/dialog/formbox.c
+++ b/contrib/dialog/formbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: formbox.c,v 1.81 2012/07/01 18:13:51 Zoltan.Kelemen Exp $
+ * $Id: formbox.c,v 1.73 2011/06/29 09:48:08 tom Exp $
*
* formbox.c -- implements the form (i.e, some pairs label/editbox)
*
- * Copyright 2003-2011,2012 Thomas E. Dickey
+ * Copyright 2003-2010,2011 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -188,34 +188,6 @@ form_limit(DIALOG_FORMITEM item[])
return limit;
}
-static int
-is_first_field(DIALOG_FORMITEM item[], int choice)
-{
- int count = 0;
- while (choice >= 0) {
- if (item[choice].text_flen > 0) {
- ++count;
- }
- --choice;
- }
-
- return (count == 1);
-}
-
-static int
-is_last_field(DIALOG_FORMITEM item[], int choice, int item_no)
-{
- int count = 0;
- while (choice < item_no) {
- if (item[choice].text_flen > 0) {
- ++count;
- }
- ++choice;
- }
-
- return (count == 1);
-}
-
/*
* Tab to the next field.
*/
@@ -482,9 +454,8 @@ dlg_form(const char *title,
int form_width;
int first = TRUE;
- int first_trace = TRUE;
int chr_offset = 0;
- int state = dialog_vars.default_button >=0 ? dlg_default_button() : sTEXT;
+ int state = dialog_vars.defaultno ? dlg_defaultno_button() : sTEXT;
int x, y, cur_x, cur_y, box_x, box_y;
int code;
int key = 0;
@@ -539,31 +510,30 @@ dlg_form(const char *title,
dialog = dlg_new_window(height, width, y, x);
dlg_register_window(dialog, "formbox", binding);
+ dlg_register_window(dialog, "formfield", binding2);
dlg_register_buttons(dialog, "formbox", buttons);
dlg_mouse_setbase(x, y);
- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
- dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
+ dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
+ dlg_draw_bottom_box(dialog);
dlg_draw_title(dialog, title);
- (void) wattrset(dialog, dialog_attr);
+ wattrset(dialog, dialog_attr);
dlg_print_autowrap(dialog, prompt, height, width);
form_width = width - 6;
getyx(dialog, cur_y, cur_x);
- (void) cur_x;
box_y = cur_y + 1;
box_x = (width - form_width) / 2 - 1;
/* create new window for the form */
form = dlg_sub_window(dialog, form_height, form_width, y + box_y + 1,
x + box_x + 1);
- dlg_register_window(form, "formfield", binding2);
/* draw a box around the form items */
dlg_draw_box(dialog, box_y, box_x, form_height + 2, form_width + 2,
- menubox_border_attr, menubox_border2_attr);
+ menubox_border_attr, menubox_attr);
/* register the new window, along with its borders */
dlg_mouse_mkbigregion(getbegy(form) - getbegy(dialog),
@@ -594,7 +564,7 @@ dlg_form(const char *title,
box_x + form_width,
box_y,
box_y + form_height + 1,
- menubox_border2_attr,
+ menubox_attr,
menubox_border_attr);
scroll_changed = FALSE;
}
@@ -609,11 +579,6 @@ dlg_form(const char *title,
show_buttons = FALSE;
}
- if (first_trace) {
- first_trace = FALSE;
- dlg_trace_win(dialog);
- }
-
if (field_changed || state == sTEXT) {
if (field_changed)
chr_offset = 0;
@@ -629,7 +594,7 @@ dlg_form(const char *title,
field_changed = FALSE;
}
- key = dlg_mouse_wgetch((state == sTEXT) ? form : dialog, &fkey);
+ key = dlg_mouse_wgetch(dialog, &fkey);
if (dlg_result_key(key, fkey, &result))
break;
@@ -688,25 +653,6 @@ dlg_form(const char *title,
continue;
}
- case DLGK_FORM_PREV:
- if (state == sTEXT && !is_first_field(items, choice)) {
- do_tab = TRUE;
- move_by = -1;
- break;
- } else {
- int old_state = state;
- state = prev_valid_buttonindex(state, sTEXT, non_editable);
- show_buttons = TRUE;
- if (old_state >= 0 && state == sTEXT) {
- new_choice = item_no - 1;
- if (choice != new_choice) {
- print_item(form, items + choice, scrollamt, FALSE);
- choice = new_choice;
- }
- }
- continue;
- }
-
case DLGK_FIELD_PREV:
state = prev_valid_buttonindex(state, sTEXT, non_editable);
show_buttons = TRUE;
@@ -733,21 +679,6 @@ dlg_form(const char *title,
continue;
}
- case DLGK_FORM_NEXT:
- if (state == sTEXT && !is_last_field(items, choice, item_no)) {
- do_tab = TRUE;
- move_by = 1;
- break;
- } else {
- state = next_valid_buttonindex(state, sTEXT, non_editable);
- show_buttons = TRUE;
- if (state == sTEXT && choice) {
- print_item(form, items + choice, scrollamt, FALSE);
- choice = 0;
- }
- continue;
- }
-
#ifdef KEY_RESIZE
case KEY_RESIZE:
/* reset data */
diff --git a/contrib/dialog/fselect.c b/contrib/dialog/fselect.c
index 123605e..e082abf 100644
--- a/contrib/dialog/fselect.c
+++ b/contrib/dialog/fselect.c
@@ -1,9 +1,9 @@
/*
- * $Id: fselect.c,v 1.87 2012/07/01 18:14:09 Zoltan.Kelemen Exp $
+ * $Id: fselect.c,v 1.78 2011/06/29 09:48:21 tom Exp $
*
* fselect.c -- implements the file-selector box
*
- * Copyright 2000-2011,2012 Thomas E. Dickey
+ * Copyright 2000-2010,2011 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -230,11 +230,11 @@ display_list(LIST * list)
break;
(void) wmove(list->win, y, 0);
if (n == list->choice)
- (void) wattrset(list->win, item_selected_attr);
+ wattrset(list->win, item_selected_attr);
(void) waddstr(list->win, list->data[n]);
- (void) wattrset(list->win, item_attr);
+ wattrset(list->win, item_attr);
}
- (void) wattrset(list->win, item_attr);
+ wattrset(list->win, item_attr);
getparyx(list->win, y, x);
@@ -249,7 +249,7 @@ display_list(LIST * list)
x + getmaxx(list->win),
top,
bottom,
- menubox_border2_attr,
+ menubox_attr,
menubox_border_attr);
(void) wmove(list->win, list->choice - list->offset, 0);
@@ -270,20 +270,18 @@ fix_arrows(LIST * list)
int x;
int y;
int top;
- int right;
int bottom;
if (list->win != 0) {
getparyx(list->win, y, x);
top = y - 1;
- right = getmaxx(list->win);
bottom = y + getmaxy(list->win);
- mouse_mkbutton(top, x, right,
+ mouse_mkbutton(top, x, 6,
((list->mousex == MOUSE_D)
? KEY_PREVIOUS
: KEY_PPAGE));
- mouse_mkbutton(bottom, x, right,
+ mouse_mkbutton(bottom, x, 6,
((list->mousex == MOUSE_D)
? KEY_NEXT
: KEY_NPAGE));
@@ -431,8 +429,6 @@ complete(char *name, LIST * d_list, LIST * f_list, char **buff_ptr)
static bool
fill_lists(char *current, char *input, LIST * d_list, LIST * f_list, int keep)
{
- bool result = TRUE;
- bool rescan = FALSE;
DIR *dp;
DIRENT *de;
struct stat sb;
@@ -445,60 +441,51 @@ fill_lists(char *current, char *input, LIST * d_list, LIST * f_list, int keep)
if (current[n] != input[n])
break;
}
-
- if (current[n] == input[n]) {
- result = FALSE;
- rescan = (n == 0 && d_list->length == 0);
- } else if (strchr(current + n, '/') == 0
- && strchr(input + n, '/') == 0) {
- result = show_both_lists(input, d_list, f_list, keep);
- } else {
- rescan = TRUE;
+ if (current[n] == input[n])
+ return FALSE;
+ if (strchr(current + n, '/') == 0
+ && strchr(input + n, '/') == 0) {
+ return show_both_lists(input, d_list, f_list, keep);
}
- if (rescan) {
+ strcpy(current, input);
- strcpy(current, input);
-
- /* refill the lists */
- free_list(d_list, TRUE);
- free_list(f_list, TRUE);
- strcpy(path, current);
- if ((leaf = strrchr(path, '/')) != 0) {
- *++leaf = 0;
- } else {
- strcpy(path, "./");
- leaf = path + strlen(path);
- }
- dlg_trace_msg("opendir '%s'\n", path);
- if ((dp = opendir(path)) != 0) {
- while ((de = readdir(dp)) != 0) {
- strncpy(leaf, de->d_name, NAMLEN(de))[NAMLEN(de)] = 0;
- if (stat(path, &sb) == 0) {
- if ((sb.st_mode & S_IFMT) == S_IFDIR)
- add_to_list(d_list, leaf);
- else if (f_list->win)
- add_to_list(f_list, leaf);
- }
+ /* refill the lists */
+ free_list(d_list, TRUE);
+ free_list(f_list, TRUE);
+ strcpy(path, current);
+ if ((leaf = strrchr(path, '/')) != 0) {
+ *++leaf = 0;
+ } else {
+ strcpy(path, "./");
+ leaf = path + strlen(path);
+ }
+ if ((dp = opendir(path)) != 0) {
+ while ((de = readdir(dp)) != 0) {
+ strncpy(leaf, de->d_name, NAMLEN(de))[NAMLEN(de)] = 0;
+ if (stat(path, &sb) == 0) {
+ if ((sb.st_mode & S_IFMT) == S_IFDIR)
+ add_to_list(d_list, leaf);
+ else if (f_list->win)
+ add_to_list(f_list, leaf);
}
- (void) closedir(dp);
- /* sort the lists */
- qsort(d_list->data,
- (size_t) d_list->length,
- sizeof(d_list->data[0]),
- compar);
- qsort(f_list->data,
- (size_t) f_list->length,
- sizeof(f_list->data[0]),
- compar);
}
-
- (void) show_both_lists(input, d_list, f_list, FALSE);
- d_list->offset = d_list->choice;
- f_list->offset = f_list->choice;
- result = TRUE;
+ (void) closedir(dp);
+ /* sort the lists */
+ qsort(d_list->data,
+ (size_t) d_list->length,
+ sizeof(d_list->data[0]),
+ compar);
+ qsort(f_list->data,
+ (size_t) f_list->length,
+ sizeof(f_list->data[0]),
+ compar);
}
- return result;
+
+ (void) show_both_lists(input, d_list, f_list, FALSE);
+ d_list->offset = d_list->choice;
+ f_list->offset = f_list->choice;
+ return TRUE;
}
static bool
@@ -573,10 +560,9 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
int fkey = FALSE;
int code;
int result = DLG_EXIT_UNKNOWN;
- int state = dialog_vars.default_button >=0 ? dlg_default_button() : sTEXT;
- int button;
+ int state = dialog_vars.defaultno ? dlg_defaultno_button() : sTEXT;
+ int button = state;
int first = (state == sTEXT);
- int first_trace = TRUE;
char *input;
char *completed;
char current[MAX_LEN + 1];
@@ -618,11 +604,11 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
dlg_mouse_setbase(0, 0);
- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
- dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
+ dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
+ dlg_draw_bottom_box(dialog);
dlg_draw_title(dialog, title);
- (void) wattrset(dialog, dialog_attr);
+ wattrset(dialog, dialog_attr);
/* Draw the input field box */
tbox_height = 1;
@@ -637,14 +623,14 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
(void) keypad(w_text, TRUE);
dlg_draw_box(dialog, tbox_y - MARGIN, tbox_x - MARGIN,
(2 * MARGIN + 1), tbox_width + (MARGIN + EXT_WIDE),
- menubox_border_attr, menubox_border2_attr);
+ menubox_border_attr, menubox_attr);
dlg_mouse_mkbigregion(getbegy(dialog) + tbox_y - MARGIN,
getbegx(dialog) + tbox_x - MARGIN,
1 + (2 * MARGIN),
tbox_width + (MARGIN + EXT_WIDE),
MOUSE_T, 1, 1, 3 /* doesn't matter */ );
- dlg_register_window(w_text, "fselect2", binding2);
+ dlg_register_window(w_text, "fselect", binding2);
/* Draw the directory listing box */
if (dselect)
@@ -660,11 +646,11 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
return DLG_EXIT_ERROR;
(void) keypad(w_work, TRUE);
- (void) mvwaddstr(dialog, dbox_y - (MARGIN + 1), dbox_x - MARGIN, d_label);
+ (void) mvwprintw(dialog, dbox_y - (MARGIN + 1), dbox_x - MARGIN, d_label);
dlg_draw_box(dialog,
dbox_y - MARGIN, dbox_x - MARGIN,
dbox_height + (MARGIN + 1), dbox_width + (MARGIN + 1),
- menubox_border_attr, menubox_border2_attr);
+ menubox_border_attr, menubox_attr);
init_list(&d_list, dialog, w_work, MOUSE_D);
if (!dselect) {
@@ -679,11 +665,11 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
return DLG_EXIT_ERROR;
(void) keypad(w_work, TRUE);
- (void) mvwaddstr(dialog, fbox_y - (MARGIN + 1), fbox_x - MARGIN, f_label);
+ (void) mvwprintw(dialog, fbox_y - (MARGIN + 1), fbox_x - MARGIN, f_label);
dlg_draw_box(dialog,
fbox_y - MARGIN, fbox_x - MARGIN,
fbox_height + (MARGIN + 1), fbox_width + (MARGIN + 1),
- menubox_border_attr, menubox_border2_attr);
+ menubox_border_attr, menubox_attr);
init_list(&f_list, dialog, w_work, MOUSE_F);
} else {
memset(&f_list, 0, sizeof(f_list));
@@ -710,12 +696,6 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
button = (state < 0) ? 0 : state;
dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width);
}
-
- if (first_trace) {
- first_trace = FALSE;
- dlg_trace_win(dialog);
- }
-
if (state < 0) {
switch (state) {
case sTEXT:
diff --git a/contrib/dialog/guage.c b/contrib/dialog/guage.c
index 1e2929c..b25052f 100644
--- a/contrib/dialog/guage.c
+++ b/contrib/dialog/guage.c
@@ -1,5 +1,5 @@
/*
- * $Id: guage.c,v 1.64 2011/10/20 23:34:35 tom Exp $
+ * $Id: guage.c,v 1.60 2011/06/27 00:52:28 tom Exp $
*
* guage.c -- implements the gauge dialog
*
@@ -122,29 +122,27 @@ repaint_text(MY_OBJ * obj)
if (dialog != 0 && obj->obj.input != 0) {
(void) werase(dialog);
- dlg_draw_box2(dialog, 0, 0, obj->height, obj->width, dialog_attr,
- border_attr, border2_attr);
+ dlg_draw_box(dialog, 0, 0, obj->height, obj->width, dialog_attr, border_attr);
dlg_draw_title(dialog, obj->title);
- (void) wattrset(dialog, dialog_attr);
+ wattrset(dialog, dialog_attr);
dlg_draw_helpline(dialog, FALSE);
dlg_print_autowrap(dialog, obj->prompt, obj->height, obj->width);
- dlg_draw_box2(dialog,
- obj->height - 4, 2 + MARGIN,
- 2 + MARGIN, obj->width - 2 * (2 + MARGIN),
- dialog_attr,
- border_attr,
- border2_attr);
+ dlg_draw_box(dialog,
+ obj->height - 4, 2 + MARGIN,
+ 2 + MARGIN, obj->width - 2 * (2 + MARGIN),
+ dialog_attr,
+ border_attr);
/*
* Clear the area for the progress bar by filling it with spaces
- * in the gauge-attribute, and write the percentage with that
+ * in the title-attribute, and write the percentage with that
* attribute.
*/
(void) wmove(dialog, obj->height - 3, 4);
- (void) wattrset(dialog, gauge_attr);
+ wattrset(dialog, gauge_attr);
for (i = 0; i < (obj->width - 2 * (3 + MARGIN)); i++)
(void) waddch(dialog, ' ');
@@ -158,15 +156,15 @@ repaint_text(MY_OBJ * obj)
* but requires some tweaks to reverse it.
*/
x = (obj->percent * (obj->width - 2 * (3 + MARGIN))) / 100;
- if ((gauge_attr & A_REVERSE) != 0) {
+ if ((title_attr & A_REVERSE) != 0) {
wattroff(dialog, A_REVERSE);
} else {
- (void) wattrset(dialog, A_REVERSE);
+ wattrset(dialog, A_REVERSE);
}
(void) wmove(dialog, obj->height - 3, 4);
for (i = 0; i < x; i++) {
chtype ch2 = winch(dialog);
- if (gauge_attr & A_REVERSE) {
+ if (title_attr & A_REVERSE) {
ch2 &= ~A_REVERSE;
}
(void) waddch(dialog, ch2);
@@ -337,6 +335,7 @@ dlg_free_gauge(void *objptr)
delink(obj);
obj->obj.keep_win = FALSE;
dlg_remove_callback(&(obj->obj));
+ free(obj);
}
}
@@ -363,7 +362,6 @@ dialog_gauge(const char *title,
dlg_add_callback_ref((DIALOG_CALLBACK **) & obj, my_cleanup);
dlg_update_gauge(obj, percent);
- dlg_trace_win(obj->obj.win);
do {
ch = dlg_getc(obj->obj.win, &fkey);
#ifdef KEY_RESIZE
diff --git a/contrib/dialog/headers-sh.in b/contrib/dialog/headers-sh.in
index 9bad19f..906c018 100755
--- a/contrib/dialog/headers-sh.in
+++ b/contrib/dialog/headers-sh.in
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: headers-sh.in,v 1.11 2011/10/18 23:49:13 tom Exp $
+# $Id: headers-sh.in,v 1.9 2011/01/06 09:38:25 tom Exp $
##############################################################################
# Copyright (c) 2004-2007,2011 Thomas E. Dickey #
# #
@@ -45,8 +45,6 @@ PKGNAME=@PACKAGE_PREFIX@
CONFIGH=@PACKAGE_CONFIG@
SUB_INC=@SUB_INC@
-: ${TMPDIR:=/tmp}
-
TMPSED=headers.sed
DIGIT=0123456789
@@ -100,9 +98,9 @@ s/ $//
:done
EOF
# pick up autoconf-style symbols used in the application's headers
- for name in $REF/*.h
+ for i in $REF/*.h
do
- sed -e 's/^[ ][ ]*#[ ][ ]*/#/' $name \
+ sed -e 's/^[ ][ ]*#[ ][ ]*/#/' $i \
| egrep '^#(if|ifdef|ifndef|elif)' \
| sed -f headers.tmp \
| sort -u \
@@ -118,7 +116,8 @@ EOF
-e 's/^#define[ ][ ]*//' \
-e 's/[ ].*//' \
| egrep -v "^${PACKAGE}_" \
- | sort -u`
+ | sort -u \
+ | egrep -v "^${PKGNAME}_"`
do
echo "s/\\<$name\\>/${PKGNAME}_$name/g" >>$TMPSED
done
@@ -128,8 +127,6 @@ EOF
echo "s,#include <${pkgname}_,#include <${PACKAGE}/${pkgname}_," >>$TMPSED
fi
- echo '/_FILE_OFFSET_BITS/d' >>$TMPSED
-
# reduce the count if possible, since some old sed's limit is 100 lines
sort -u $TMPSED >headers.tmp
mv headers.tmp $TMPSED
@@ -145,32 +142,13 @@ else
SRC=$3
SHOW=`basename $SRC`
- TMPSRC=$TMPDIR/${SHOW}-text$$
- TMPEDT=$TMPDIR/${SHOW}-edit$$
- TMPTMP=$TMPDIR/${SHOW}-temp$$
+ TMPSRC=${TMPDIR-/tmp}/${SHOW}$$
echo " ... $SHOW"
test -f $REF/$SRC && SRC="$REF/$SRC"
rm -f $TMPSRC
- cat $SRC >$TMPSRC
-
- tmp1=1
- while true
- do
- tmp2=`expr $tmp1 + 49`
- if test $tmp1 = 1
- then
- sed "${tmp2}q" $TMPSED >$TMPEDT
- else
- sed "1,${tmp1}d; ${tmp2}q" $TMPSED >$TMPEDT
- fi
- test -s $TMPEDT || break
- sed -f $TMPEDT $TMPSRC > $TMPTMP
- mv $TMPTMP $TMPSRC
- tmp1=$tmp2
- done
-
+ sed -f $TMPSED $SRC > $TMPSRC
NAME=`basename $SRC`
# Just in case someone gzip'd manpages, remove the conflicting copy.
@@ -194,6 +172,6 @@ else
fi
eval $PRG $TMPSRC $DST/$NAME
- rm -f $TMPEDT $TMPTMP $TMPSRC
+ rm -f $TMPSRC
fi
# vile:ts=4 sw=4
diff --git a/contrib/dialog/inputbox.c b/contrib/dialog/inputbox.c
index 9d2eec2..14e2c28 100644
--- a/contrib/dialog/inputbox.c
+++ b/contrib/dialog/inputbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: inputbox.c,v 1.74 2012/07/01 18:13:40 Zoltan.Kelemen Exp $
+ * $Id: inputbox.c,v 1.67 2011/06/29 09:48:34 tom Exp $
*
* inputbox.c -- implements the input box
*
- * Copyright 2000-2011,2012 Thomas E. Dickey
+ * Copyright 2000-2010,2011 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -90,7 +90,7 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width,
retry:
#endif
show_buttons = TRUE;
- state = dialog_vars.default_button >= 0 ? dlg_default_button() : sTEXT;
+ state = dialog_vars.defaultno ? dlg_defaultno_button() : sTEXT;
first = (state == sTEXT);
key = fkey = 0;
@@ -116,29 +116,27 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width,
dlg_mouse_setbase(xorg, yorg);
- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
- dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
+ dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
+ dlg_draw_bottom_box(dialog);
dlg_draw_title(dialog, title);
- (void) wattrset(dialog, dialog_attr);
+ wattrset(dialog, dialog_attr);
dlg_draw_helpline(dialog, FALSE);
dlg_print_autowrap(dialog, prompt, height, width);
/* Draw the input field box */
box_width = width - 6;
getyx(dialog, y, x);
- (void) x;
box_y = y + 2;
box_x = (width - box_width) / 2;
dlg_mouse_mkregion(y + 1, box_x - 1, 3, box_width + 2, 'i');
dlg_draw_box(dialog, y + 1, box_x - 1, 3, box_width + 2,
- border_attr, border2_attr);
+ border_attr, dialog_attr);
/* Make a window for the input-field, to associate bindings */
editor = dlg_sub_window(dialog, 1, box_width, yorg + box_y, xorg + box_x);
- dlg_register_window(editor, "inputbox2", binding2);
+ dlg_register_window(editor, "inputbox", binding2);
- dlg_trace_win(dialog);
while (result == DLG_EXIT_UNKNOWN) {
int edit = 0;
diff --git a/contrib/dialog/inputstr.c b/contrib/dialog/inputstr.c
index aa719a1..685b126 100644
--- a/contrib/dialog/inputstr.c
+++ b/contrib/dialog/inputstr.c
@@ -1,5 +1,5 @@
/*
- * $Id: inputstr.c,v 1.70 2011/10/20 23:42:49 tom Exp $
+ * $Id: inputstr.c,v 1.69 2011/01/16 21:52:35 tom Exp $
*
* inputstr.c -- functions for input/display of a string
*
@@ -261,6 +261,7 @@ dlg_count_wcbytes(const char *string, size_t len)
load_cache(&cache, string);
if (!same_cache1(&cache, string, len)) {
while (len != 0) {
+ int part = 0;
size_t code = 0;
const char *src = cache.string;
mbstate_t state;
@@ -273,6 +274,7 @@ dlg_count_wcbytes(const char *string, size_t len)
if ((int) code >= 0) {
break;
}
+ ++part;
--len;
}
cache.i_len = len;
@@ -698,7 +700,7 @@ dlg_show_string(WINDOW *win,
compute_edit_offset(string, chr_offset, x_last, &input_x, &scrollamt);
- (void) wattrset(win, attr);
+ wattrset(win, attr);
(void) wmove(win, y_base, x_base);
for (i = scrollamt, k = 0; i < limit && k < x_last; ++i) {
int check = cols[i + 1] - cols[scrollamt];
diff --git a/contrib/dialog/makefile.in b/contrib/dialog/makefile.in
index bef2d48..d05d74d 100644
--- a/contrib/dialog/makefile.in
+++ b/contrib/dialog/makefile.in
@@ -1,7 +1,7 @@
-# $Id: makefile.in,v 1.82 2012/02/16 00:35:37 Li-Wen.Hsu Exp $
+# $Id: makefile.in,v 1.79 2011/06/25 00:27:56 tom Exp $
# template makefile for DIALOG
##############################################################################
-# Copyright (c) 1999-2011,2012 Thomas E. Dickey #
+# Copyright (c) 1999-2010,2011 Thomas E. Dickey #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -71,8 +71,7 @@ LIBS = @LIBS@ @INTLLIBS@
RANLIB = @LIB_PREP@
RM = rm -f
-LINT = @LINT@
-LINT_OPTS = @LINT_OPTS@
+LINT = lint
CTAGS = @CTAGS@
ETAGS = @ETAGS@
@@ -85,7 +84,6 @@ LIBTOOL_CREATE = @LIB_CREATE@
LIBTOOL_LINK = @LIB_LINK@
LIBTOOL_INSTALL = @LIB_INSTALL@
LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
-LIBTOOL_VERSION = @LIBTOOL_VERSION@
INSTALL = @INSTALL@
INSTALL_PROGRAM = $(LIBTOOL_INSTALL) @INSTALL_PROGRAM@
@@ -103,7 +101,7 @@ LIB_CONFIG = @PACKAGE@-config
# The library name $(LIB) is set at configure/make time, since it is used as a
# makefile target. Ditto for $(PROG).
LIB = @LIB_PREFIX@@PACKAGE@$a
-PROG = @PACKAGE@$x
+PROG = dialog$x
#
# Standard .c to .o compile line.
#
@@ -181,7 +179,7 @@ $(LIB) : $(LIB_OBJECT)
$(LIBTOOL_CREATE) $(LIB) $(LIB_OBJECT)
$(RANLIB) $@
-$(PROG)$x : $(LIB) dialog$o @INTLDIR_MAKE@ @INTLLIBS@
+dialog$x : $(LIB) dialog$o @INTLDIR_MAKE@ @INTLLIBS@
$(LINK) -o $@ dialog$o -L. -l@PACKAGE@ $(LDFLAGS) $(LIBS)
clean \
@@ -251,20 +249,20 @@ install-lib :: $(LIB_DIRS) $(LIB) headers.sed
@ echo "** installing library in $(LIBDIR)"
@ $(LIBTOOL_INSTALL) $(INSTALL_DATA) $(LIB) $(LIBDIR)
@ echo "** installing headers in $(INCLUDEDIR)"
- @ $(SHELL) headers-sh $(INSTALL_DATA) $(INCLUDEDIR) $(srcdir) dialog.h
- @ $(SHELL) headers-sh $(INSTALL_DATA) $(INCLUDEDIR) $(srcdir) dlg_colors.h
- @ $(SHELL) headers-sh $(INSTALL_DATA) $(INCLUDEDIR) $(srcdir) dlg_keys.h
- @ $(SHELL) headers-sh $(INSTALL_DATA) $(INCLUDEDIR) . dlg_config.h
+ @ $(SHELL) $(srcdir)/headers-sh $(INSTALL_DATA) $(INCLUDEDIR) $(srcdir) dialog.h
+ @ $(SHELL) $(srcdir)/headers-sh $(INSTALL_DATA) $(INCLUDEDIR) $(srcdir) dlg_colors.h
+ @ $(SHELL) $(srcdir)/headers-sh $(INSTALL_DATA) $(INCLUDEDIR) $(srcdir) dlg_keys.h
+ @ $(SHELL) $(srcdir)/headers-sh $(INSTALL_DATA) $(INCLUDEDIR) . dlg_config.h
uninstall-lib :: $(BINDIR)
$(RM) $(BINDIR)/$(LIB_CONFIG)
uninstall-lib :: $(LIB_DIRS)
- $(LIBTOOL_UNINSTALL) $(RM) $(LIBDIR)/$(LIB)
- @ $(SHELL) headers-sh $(RM) $(INCLUDEDIR) $(srcdir) dialog.h
- @ $(SHELL) headers-sh $(RM) $(INCLUDEDIR) $(srcdir) dlg_colors.h
- @ $(SHELL) headers-sh $(RM) $(INCLUDEDIR) $(srcdir) dlg_keys.h
- @ $(SHELL) headers-sh $(RM) $(INCLUDEDIR) . dlg_config.h
+ @ $(SHELL) $(srcdir)/headers-sh $(RM) $(INCLUDEDIR) $(srcdir) dialog.h
+ @ $(SHELL) $(srcdir)/headers-sh $(RM) $(INCLUDEDIR) $(srcdir) dlg_colors.h
+ @ $(SHELL) $(srcdir)/headers-sh $(RM) $(INCLUDEDIR) $(srcdir) dlg_keys.h
+ @ $(SHELL) $(srcdir)/headers-sh $(RM) $(INCLUDEDIR) . dlg_config.h
install-lib :: $(MAN3DIR)
@ echo "** installing @PACKAGE@.3"
@@ -278,8 +276,8 @@ install-lib :: $(MAN3DIR)
uninstall-lib ::
$(RM) $(MAN3DIR)/@PACKAGE@.3
-headers.sed : headers-sh
- $(SHELL) headers-sh $(INCLUDEDIR) $(srcdir)
+headers.sed : $(srcdir)/headers-sh
+ $(SHELL) $(srcdir)/headers-sh $(INCLUDEDIR) $(srcdir)
################################################################################
TOP_DOCS = \
@@ -330,4 +328,4 @@ update-po:
test -f $(PO_DIR)/makefile && cd $(PO_DIR) && $(MAKE) $@
lint:
- $(LINT) $(LINT_OPTS) $(CPPFLAGS) *.c
+ $(LINT) $(CPPFLAGS) *.c
diff --git a/contrib/dialog/menubox.c b/contrib/dialog/menubox.c
index 58a714b..25005a4 100644
--- a/contrib/dialog/menubox.c
+++ b/contrib/dialog/menubox.c
@@ -1,9 +1,9 @@
/*
- * $Id: menubox.c,v 1.132 2012/07/01 16:30:04 Zoltan.Kelemen Exp $
+ * $Id: menubox.c,v 1.122 2011/06/29 09:48:46 tom Exp $
*
* menubox.c -- implements the menu box
*
- * Copyright 2000-2011,2012 Thomas E. Dickey
+ * Copyright 2000-2010,2011 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public Licens, version 2.1e
@@ -66,7 +66,7 @@ print_arrows(WINDOW *win,
box_x + menu_width,
box_y,
box_y + menu_height + 1,
- menubox_border2_attr,
+ menubox_attr,
menubox_border_attr);
}
@@ -83,11 +83,14 @@ print_tag(WINDOW *win,
int my_x = item_x;
int my_y = ItemToRow(choice);
int tag_width = (my_x - tag_x - GUTTER);
+ const int *cols;
const int *indx;
int limit;
int prefix;
+ cols = dlg_index_columns(item->name);
indx = dlg_index_wchars(item->name);
+ limit = dlg_count_wchars(item->name);
prefix = (indx[1] - indx[0]);
/* highlight first char of the tag to be special */
@@ -249,7 +252,7 @@ handle_button(int code, DIALOG_LISTITEM * items, int choice)
return code;
}
-int
+static int
dlg_renamed_menutext(DIALOG_LISTITEM * items, int current, char *newtext)
{
if (dialog_vars.input_result)
@@ -261,7 +264,7 @@ dlg_renamed_menutext(DIALOG_LISTITEM * items, int current, char *newtext)
return DLG_EXIT_EXTRA;
}
-int
+static int
dlg_dummy_menutext(DIALOG_LISTITEM * items, int current, char *newtext)
{
(void) items;
@@ -322,18 +325,17 @@ dlg_menu(const char *title,
#endif
int i, j, x, y, cur_x, cur_y, box_x, box_y;
int key = 0, fkey;
- int button = dialog_state.visit_items ? -1 : dlg_default_button();
+ int button = dialog_state.visit_items ? -1 : dlg_defaultno_button();
int choice = dlg_default_listitem(items);
int result = DLG_EXIT_UNKNOWN;
int scrollamt = 0;
- int max_choice;
+ int max_choice, min_width;
int found;
int use_height, use_width, name_width, text_width;
WINDOW *dialog, *menu;
char *prompt = dlg_strclone(cprompt);
const char **buttons = dlg_ok_labels();
- bool is_inputmenu = ((rename_menutext != 0)
- && (rename_menutext != dlg_dummy_menutext));
+ bool is_inputmenu = (rename_menutext == dlg_renamed_menutext);
dlg_does_output();
dlg_tab_correct_str(prompt);
@@ -343,14 +345,13 @@ dlg_menu(const char *title,
#endif
use_height = menu_height;
- use_width = dlg_calc_list_width(item_no, items) + 10;
- use_width = MAX(26, use_width);
if (use_height == 0) {
+ min_width = dlg_calc_list_width(item_no, items) + 10;
/* calculate height without items (4) */
- dlg_auto_size(title, prompt, &height, &width, MIN_HIGH, use_width);
+ dlg_auto_size(title, prompt, &height, &width, MIN_HIGH, MAX(26, min_width));
dlg_calc_listh(&height, &use_height, item_no);
} else {
- dlg_auto_size(title, prompt, &height, &width, MIN_HIGH + use_height, use_width);
+ dlg_auto_size(title, prompt, &height, &width, MIN_HIGH + use_height, 26);
}
dlg_button_layout(buttons, &width);
dlg_print_size(height, width);
@@ -365,8 +366,8 @@ dlg_menu(const char *title,
dlg_mouse_setbase(x, y);
- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
- dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
+ dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
+ dlg_draw_bottom_box(dialog);
dlg_draw_title(dialog, title);
wattrset(dialog, dialog_attr);
@@ -401,7 +402,7 @@ dlg_menu(const char *title,
/* draw a box around the menu items */
dlg_draw_box(dialog, box_y, box_x, use_height + 2, menu_width + 2,
- menubox_border_attr, menubox_border2_attr);
+ menubox_border_attr, menubox_attr);
name_width = 0;
text_width = 0;
@@ -460,7 +461,6 @@ dlg_menu(const char *title,
dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width);
- dlg_trace_win(dialog);
while (result == DLG_EXIT_UNKNOWN) {
if (button < 0) /* --visit-items */
wmove(dialog, box_y + ItemToRow(choice) + 1, box_x + tag_x + 1);
@@ -687,14 +687,17 @@ dlg_menu(const char *title,
FALSE, width);
break;
case DLGK_ENTER:
- if (is_inputmenu)
- result = dlg_ok_buttoncode(button);
- else
- result = dlg_enter_buttoncode(button);
+ result = dlg_enter_buttoncode(button);
/*
* If dlg_menu() is called from dialog_menu(), we want to
- * capture the results into dialog_vars.input_result.
+ * capture the results into dialog_vars.input_result, but not
+ * if dlg_menu() is called directly from an application. We
+ * can check this by testing if rename_menutext is the function
+ * pointer owned by dialog_menu(). It would be nicer to have
+ * this logic inside dialog_menu(), but that cannot be done
+ * since we would lose compatibility for the results reported
+ * after input_menu_edit().
*/
if (result == DLG_EXIT_ERROR) {
result = DLG_EXIT_UNKNOWN;
@@ -809,9 +812,7 @@ dialog_menu(const char *title,
item_no,
listitems,
&choice,
- (dialog_vars.input_menu
- ? dlg_renamed_menutext
- : dlg_dummy_menutext));
+ dialog_vars.input_menu ? dlg_renamed_menutext : dlg_dummy_menutext);
dlg_free_columns(&listitems[0].text, sizeof(DIALOG_LISTITEM), item_no);
free(listitems);
diff --git a/contrib/dialog/mixedform.c b/contrib/dialog/mixedform.c
index 05ba7b1..b2fe538 100644
--- a/contrib/dialog/mixedform.c
+++ b/contrib/dialog/mixedform.c
@@ -1,9 +1,9 @@
/*
- * $Id: mixedform.c,v 1.9 2011/10/10 00:49:43 tom Exp $
+ * $Id: mixedform.c,v 1.8 2010/04/28 20:54:11 tom Exp $
*
- * mixedform.c -- implements the mixed form (i.e, typed pairs label/editbox)
+ * formbox.c -- implements the form (i.e, some pairs label/editbox)
*
- * Copyright 2007-2010,2011 Thomas E. Dickey
+ * Copyright 2007-2008,2010 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
diff --git a/contrib/dialog/mixedgauge.c b/contrib/dialog/mixedgauge.c
index 6d78517..e15a4df 100644
--- a/contrib/dialog/mixedgauge.c
+++ b/contrib/dialog/mixedgauge.c
@@ -1,5 +1,5 @@
/*
- * $Id: mixedgauge.c,v 1.29 2011/10/20 23:35:31 tom Exp $
+ * $Id: mixedgauge.c,v 1.24 2011/06/27 08:16:38 tom Exp $
*
* mixedgauge.c -- implements the mixedgauge dialog
*
@@ -113,6 +113,7 @@ myprint_status(DIALOG_MIXEDGAUGE * dlg)
int y = MARGIN;
int item;
int cells = dlg->len_text - 2;
+ int rm = limit_x; /* right margin */
int lm = limit_x - dlg->len_text - 1;
int bm = limit_y; /* bottom margin */
int last_y = 0, last_x = 0;
@@ -122,6 +123,7 @@ myprint_status(DIALOG_MIXEDGAUGE * dlg)
char *freeMe = 0;
if (win) {
+ rm -= (2 * MARGIN);
bm -= (2 * MARGIN);
}
if (win != 0)
@@ -145,7 +147,7 @@ myprint_status(DIALOG_MIXEDGAUGE * dlg)
(void) wmove(win, y, lm + (cells - (int) strlen(status)) / 2);
if (freeMe) {
(void) wmove(win, y, lm + 1);
- (void) wattrset(win, title_attr);
+ wattrset(win, title_attr);
for (j = 0; j < cells; j++)
(void) waddch(win, ' ');
@@ -155,7 +157,7 @@ myprint_status(DIALOG_MIXEDGAUGE * dlg)
if ((title_attr & A_REVERSE) != 0) {
wattroff(win, A_REVERSE);
} else {
- (void) wattrset(win, A_REVERSE);
+ wattrset(win, A_REVERSE);
}
(void) wmove(win, y, lm + 1);
@@ -179,8 +181,6 @@ myprint_status(DIALOG_MIXEDGAUGE * dlg)
(void) waddch(win, ']');
(void) wnoutrefresh(win);
}
- if (win != 0)
- wmove(win, last_y, last_x);
}
static void
@@ -192,10 +192,10 @@ mydraw_mixed_box(WINDOW *win, int y, int x, int height, int width,
chtype attr = A_NORMAL;
const char *message = _("Overall Progress");
chtype save2 = dlg_get_attrs(win);
- (void) wattrset(win, title_attr);
+ wattrset(win, title_attr);
(void) wmove(win, y, x + 2);
dlg_print_text(win, message, width, &attr);
- (void) wattrset(win, save2);
+ wattrset(win, save2);
}
}
@@ -223,7 +223,7 @@ dlg_update_mixedgauge(DIALOG_MIXEDGAUGE * dlg, int percent)
* attribute.
*/
(void) wmove(dlg->dialog, dlg->height - 3, 4);
- (void) wattrset(dlg->dialog, gauge_attr);
+ wattrset(dlg->dialog, gauge_attr);
for (i = 0; i < (dlg->width - 2 * (3 + MARGIN)); i++)
(void) waddch(dlg->dialog, ' ');
@@ -240,7 +240,7 @@ dlg_update_mixedgauge(DIALOG_MIXEDGAUGE * dlg, int percent)
if ((title_attr & A_REVERSE) != 0) {
wattroff(dlg->dialog, A_REVERSE);
} else {
- (void) wattrset(dlg->dialog, A_REVERSE);
+ wattrset(dlg->dialog, A_REVERSE);
}
(void) wmove(dlg->dialog, dlg->height - 3, 4);
for (i = 0; i < x; i++) {
@@ -251,7 +251,6 @@ dlg_update_mixedgauge(DIALOG_MIXEDGAUGE * dlg, int percent)
(void) waddch(dlg->dialog, ch);
}
myprint_status(dlg);
- dlg_trace_win(dlg->dialog);
}
/*
@@ -325,11 +324,11 @@ dlg_begin_mixedgauge(DIALOG_MIXEDGAUGE * dlg,
dlg->dialog = dlg_new_window(dlg->height, dlg->width, y, x);
(void) werase(dlg->dialog);
- dlg_draw_box2(dlg->dialog,
- 0, 0,
- dlg->height,
- dlg->width,
- dialog_attr, border_attr, border2_attr);
+ dlg_draw_box(dlg->dialog,
+ 0, 0,
+ dlg->height,
+ dlg->width,
+ dialog_attr, border_attr);
dlg_draw_title(dlg->dialog, dlg->title);
dlg_draw_helpline(dlg->dialog, FALSE);
@@ -341,7 +340,7 @@ dlg_begin_mixedgauge(DIALOG_MIXEDGAUGE * dlg,
dlg->width,
y + dlg->item_no + (2 * MARGIN),
x);
- (void) wattrset(dlg->caption, dialog_attr);
+ wattrset(dlg->caption, dialog_attr);
dlg_print_autowrap(dlg->caption, dlg->prompt, dlg->height, dlg->width);
}
diff --git a/contrib/dialog/msgbox.c b/contrib/dialog/msgbox.c
index 1353209..25a021b 100644
--- a/contrib/dialog/msgbox.c
+++ b/contrib/dialog/msgbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: msgbox.c,v 1.74 2012/07/06 16:53:53 tom Exp $
+ * $Id: msgbox.c,v 1.66 2011/06/27 08:36:28 tom Exp $
*
* msgbox.c -- implements the message box and info box
*
- * Copyright 2000-2011,2012 Thomas E. Dickey
+ * Copyright 2000-2010,2011 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -39,14 +39,20 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
static DLG_KEYS_BINDING binding[] = {
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
- TRAVERSE_BINDINGS,
+ DLG_KEYS_DATA( DLGK_ENTER, ' ' ),
SCROLLKEY_BINDINGS,
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_DOWN ),
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_RIGHT ),
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, TAB ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_UP ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_LEFT ),
END_KEYS_BINDING
};
/* *INDENT-ON* */
int x, y, last = 0, page;
- int button;
+ int button = 0;
int key = 0, fkey;
int result = DLG_EXIT_UNKNOWN;
WINDOW *dialog = 0;
@@ -56,18 +62,10 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
int check;
bool show = TRUE;
int min_width = (pauseopt == 1 ? 12 : 0);
- int save_nocancel = dialog_vars.nocancel;
-#ifdef KEY_RESIZE
- int req_high;
- int req_wide;
-#endif
-
- dialog_vars.nocancel = TRUE;
- button = dlg_default_button();
#ifdef KEY_RESIZE
- req_high = height;
- req_wide = width;
+ int req_high = height;
+ int req_wide = width;
restart:
#endif
@@ -97,13 +95,13 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
dlg_mouse_setbase(x, y);
- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
+ dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
dlg_draw_title(dialog, title);
wattrset(dialog, dialog_attr);
if (pauseopt) {
- dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
+ dlg_draw_bottom_box(dialog);
mouse_mkbutton(height - 2, width / 2 - 4, 6, '\n');
dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width);
dlg_draw_helpline(dialog, FALSE);
@@ -112,7 +110,6 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
if (show) {
last = dlg_print_scrolled(dialog, prompt, offset,
page, width, pauseopt);
- dlg_trace_win(dialog);
show = FALSE;
}
key = dlg_mouse_wgetch(dialog, &fkey);
@@ -120,7 +117,7 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
break;
if (!fkey && (check = dlg_char_to_button(key, buttons)) >= 0) {
- result = dlg_ok_buttoncode(check);
+ result = check ? DLG_EXIT_HELP : DLG_EXIT_OK;
break;
}
@@ -153,21 +150,22 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
FALSE, width);
break;
case DLGK_ENTER:
- result = dlg_ok_buttoncode(button);
+ result = button ? DLG_EXIT_HELP : DLG_EXIT_OK;
+ break;
+ case DLGK_MOUSE(0):
+ result = DLG_EXIT_OK;
+ break;
+ case DLGK_MOUSE(1):
+ result = DLG_EXIT_HELP;
break;
default:
- if (is_DLGK_MOUSE(key)) {
- result = dlg_ok_buttoncode(key - M_EVENT);
- if (result < 0)
- result = DLG_EXIT_OK;
- } else if (dlg_check_scrolled(key,
- last,
- page,
- &show,
- &offset) == 0) {
- } else {
- beep();
- }
+ if (dlg_check_scrolled(key,
+ last,
+ page,
+ &show,
+ &offset) == 0)
+ break;
+ beep();
break;
}
} else {
@@ -178,15 +176,11 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
dlg_print_scrolled(dialog, prompt, offset, page, width, pauseopt);
dlg_draw_helpline(dialog, FALSE);
wrefresh(dialog);
- dlg_trace_win(dialog);
result = DLG_EXIT_OK;
}
dlg_del_window(dialog);
dlg_mouse_free_regions();
free(prompt);
-
- dialog_vars.nocancel = save_nocancel;
-
return result;
}
diff --git a/contrib/dialog/package/debian/changelog b/contrib/dialog/package/debian/changelog
index 62fe5da..51d497e 100644
--- a/contrib/dialog/package/debian/changelog
+++ b/contrib/dialog/package/debian/changelog
@@ -1,38 +1,3 @@
-cdialog (20120706) unstable; urgency=high
-
- * fix regression in msgbox (ArchLinux #30574)
-
- -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 06 Jul 2012 12:52:46 -0400
-
-cdialog (20120703) unstable; urgency=low
-
- * minor fixes
- * add --default-button
-
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 30 Jun 2012 10:41:05 -0400
-
-cdialog (20120215) unstable; urgency=low
-
- * minor fixes
-
- -- Thomas E. Dickey <dickey@invisible-island.net> Wed, 15 Feb 2012 19:40:32 -0500
-
-cdialog (20111020) unstable; urgency=high
-
- * fix regression in menubox.c logic for inputmenu vs menu.
-
- -- Thomas E. Dickey <dickey@invisible-island.net> Wed, 19 Oct 2011 19:17:40 -0400
-
-cdialog (20111018) unstable; urgency=high
-
- * improve color configurability
- * misc bug-fixes.
- * various improvements to tracing.
- * remove an incorrect free() call in dlg_free_gauge()
- * fix missing trailing null from dlg_align_columns
-
- -- Thomas E. Dickey <dickey@invisible-island.net> Wed, 07 Sep 2011 20:04:04 -0400
-
cdialog (20110707) unstable; urgency=high
* fix a regression in dlg_getc() from 20110630 changes.
diff --git a/contrib/dialog/package/dialog.spec b/contrib/dialog/package/dialog.spec
index 5037ee6..f5df494 100644
--- a/contrib/dialog/package/dialog.spec
+++ b/contrib/dialog/package/dialog.spec
@@ -1,9 +1,9 @@
Summary: dialog - display dialog boxes from shell scripts
%define AppProgram dialog
%define AppVersion 1.1
-%define AppRelease 20120706
+%define AppRelease 20110707
%define ActualProg c%{AppProgram}
-# $XTermId: dialog.spec,v 1.38 2012/07/06 16:51:44 tom Exp $
+# $XTermId: dialog.spec,v 1.24 2011/07/07 22:10:02 tom Exp $
Name: %{ActualProg}
Version: %{AppVersion}
Release: %{AppRelease}
@@ -53,11 +53,8 @@ make
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
make install-full DESTDIR=$RPM_BUILD_ROOT
-libtool --finish %{_libdir}
strip $RPM_BUILD_ROOT%{_bindir}/%{ActualProg}
-chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib%{ActualProg}.so.*.*.*
-rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{ActualProg}.la
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
@@ -78,8 +75,5 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{ActualProg}.la
%changelog
# each patch should add its ChangeLog entries here
-* Tue Oct 18 2011 Thomas Dickey
-- add executable permissions for shared libraries, discard ".la" file.
-
* Thu Dec 30 2010 Thomas Dickey
- initial version
diff --git a/contrib/dialog/pause.c b/contrib/dialog/pause.c
index acca9b7..c104a70 100644
--- a/contrib/dialog/pause.c
+++ b/contrib/dialog/pause.c
@@ -1,9 +1,9 @@
/*
- * $Id: pause.c,v 1.36 2012/07/03 00:01:59 tom Exp $
+ * $Id: pause.c,v 1.29 2011/06/29 09:48:53 tom Exp $
*
* pause.c -- implements the pause dialog
*
- * Copyright 2004-2011,2012 Thomas E. Dickey
+ * Copyright 2004-2010,2011 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -55,7 +55,13 @@ dialog_pause(const char *title,
static DLG_KEYS_BINDING binding[] = {
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
- TRAVERSE_BINDINGS,
+ DLG_KEYS_DATA( DLGK_ENTER, ' ' ),
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_DOWN ),
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_RIGHT ),
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, TAB ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_UP ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_LEFT ),
END_KEYS_BINDING
};
/* *INDENT-ON* */
@@ -66,24 +72,21 @@ dialog_pause(const char *title,
#endif
int i, x, y, step;
- int button = dlg_default_button();
+ int button = 0;
int seconds_orig;
WINDOW *dialog;
const char **buttons = dlg_ok_labels();
bool have_buttons = (dlg_button_count(buttons) != 0);
- bool first;
int key = 0, fkey;
int result = DLG_EXIT_UNKNOWN;
int button_high = (have_buttons ? BTN_HIGH : MARGIN);
int gauge_y;
char *prompt = dlg_strclone(cprompt);
- int save_timeout = dialog_vars.timeout_secs;
curs_set(0);
dlg_tab_correct_str(prompt);
- dialog_vars.timeout_secs = 0;
seconds_orig = (seconds > 0) ? seconds : 1;
#ifdef KEY_RESIZE
@@ -117,23 +120,21 @@ dialog_pause(const char *title,
dlg_mouse_setbase(x, y);
nodelay(dialog, TRUE);
- first = TRUE;
do {
(void) werase(dialog);
- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
+ dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
dlg_draw_title(dialog, title);
dlg_draw_helpline(dialog, FALSE);
- (void) wattrset(dialog, dialog_attr);
+ wattrset(dialog, dialog_attr);
dlg_print_autowrap(dialog, prompt, height, width);
- dlg_draw_box2(dialog,
- gauge_y, 2 + MARGIN,
- 2 + MARGIN, width - 2 * (2 + MARGIN),
- dialog_attr,
- border_attr,
- border2_attr);
+ dlg_draw_box(dialog,
+ gauge_y, 2 + MARGIN,
+ 2 + MARGIN, width - 2 * (2 + MARGIN),
+ dialog_attr,
+ border_attr);
/*
* Clear the area for the progress bar by filling it with spaces
@@ -141,7 +142,7 @@ dialog_pause(const char *title,
* attribute.
*/
(void) wmove(dialog, gauge_y + MARGIN, 4);
- (void) wattrset(dialog, title_attr);
+ wattrset(dialog, title_attr);
for (i = 0; i < (width - 2 * (3 + MARGIN)); i++)
(void) waddch(dialog, ' ');
@@ -158,7 +159,7 @@ dialog_pause(const char *title,
if ((title_attr & A_REVERSE) != 0) {
wattroff(dialog, A_REVERSE);
} else {
- (void) wattrset(dialog, A_REVERSE);
+ wattrset(dialog, A_REVERSE);
}
(void) wmove(dialog, gauge_y + MARGIN, 4);
for (i = 0; i < x; i++) {
@@ -171,14 +172,10 @@ dialog_pause(const char *title,
mouse_mkbutton(height - 2, width / 2 - 4, 6, '\n');
if (have_buttons) {
- dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
+ dlg_draw_bottom_box(dialog);
dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width);
}
- if (first) {
- (void) wrefresh(dialog);
- dlg_trace_win(dialog);
- first = FALSE;
- }
+ (void) wrefresh(dialog);
for (step = 0;
(result == DLG_EXIT_UNKNOWN) && (step < 1000);
@@ -222,25 +219,24 @@ dialog_pause(const char *title,
case DLGK_ENTER:
result = dlg_enter_buttoncode(button);
break;
+ case DLGK_MOUSE(0):
+ result = DLG_EXIT_OK;
+ break;
+ case DLGK_MOUSE(1):
+ result = DLG_EXIT_CANCEL;
+ break;
case ERR:
break;
default:
- if (is_DLGK_MOUSE(key)) {
- result = dlg_ok_buttoncode(key - M_EVENT);
- if (result < 0)
- result = DLG_EXIT_OK;
- }
break;
}
}
} while ((result == DLG_EXIT_UNKNOWN) && (seconds-- > 0));
+ nodelay(dialog, FALSE);
curs_set(1);
dlg_mouse_free_regions();
dlg_del_window(dialog);
free(prompt);
-
- dialog_vars.timeout_secs = save_timeout;
-
return ((result == DLG_EXIT_UNKNOWN) ? DLG_EXIT_OK : result);
}
diff --git a/contrib/dialog/po/cs.po b/contrib/dialog/po/cs.po
index 7986891..b4a40e9 100644
--- a/contrib/dialog/po/cs.po
+++ b/contrib/dialog/po/cs.po
@@ -1,23 +1,15 @@
-# Czech translations for dialog package.
-# Copyright (C) 2011 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the dialog package.
-#
-# Martin Povolny <martin@solnet.cz>
-# Marek Černocký <marek@manet.cz>, 2011.
-#
+# From: Martin Povolny <martin@solnet.cz>
msgid ""
msgstr ""
-"Project-Id-Version: dialog 1.1.20080819\n"
+"Project-Id-Version: dialog 0.9a-20010527\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-06-18 18:26-0400\n"
-"PO-Revision-Date: 2011-11-25 13:18+0100\n"
-"Last-Translator: Marek Černocký <marek@manet.cz>\n"
-"Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
-"Language: cs\n"
+"PO-Revision-Date: 2004-12-19 20:14-0500\n"
+"Last-Translator: Martin Povolny <martin@solnet.cz>\n"
+"Language-Team:\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+"Content-Transfer-Encoding: 8-bit\n"
#: buttons.c:385
msgid "Yes"
@@ -29,7 +21,7 @@ msgstr "Ne"
#: buttons.c:401
msgid "OK"
-msgstr "Budiž"
+msgstr "OK"
#: buttons.c:409
msgid "Cancel"
@@ -41,11 +33,11 @@ msgstr "Konec"
#: buttons.c:425
msgid "Extra"
-msgstr "Další"
+msgstr ""
#: buttons.c:433
msgid "Help"
-msgstr "Nápověda"
+msgstr ""
#. Headline "Month"
#: calendar.c:273
@@ -59,11 +51,11 @@ msgstr "Rok"
#: dialog.c:741
msgid "Rename"
-msgstr "Přejmenovat"
+msgstr ""
#: fselect.c:550
msgid "Directories"
-msgstr "Složky"
+msgstr "Adresáře"
#: fselect.c:551
msgid "Files"
@@ -71,44 +63,46 @@ msgstr "Soubory"
#: mixedgauge.c:58
msgid "Succeeded"
-msgstr "Úspěšné"
+msgstr ""
#: mixedgauge.c:61
+#, fuzzy
msgid "Failed"
-msgstr "Selhalo"
+msgstr "Soubory"
#: mixedgauge.c:64
msgid "Passed"
-msgstr "Pozastaveno"
+msgstr ""
#: mixedgauge.c:67
msgid "Completed"
-msgstr "DokonÄeno"
+msgstr ""
#: mixedgauge.c:70
msgid "Checked"
-msgstr "Zkontrolováno"
+msgstr ""
#: mixedgauge.c:73
msgid "Done"
-msgstr "Hotovo"
+msgstr ""
#: mixedgauge.c:76
msgid "Skipped"
-msgstr "PÅ™eskoÄeno"
+msgstr ""
#: mixedgauge.c:79
msgid "In Progress"
-msgstr "Probíhá"
+msgstr ""
#: mixedgauge.c:85
msgid "N/A"
-msgstr "Není známo"
+msgstr ""
#: mixedgauge.c:193
msgid "Overall Progress"
-msgstr "Celkový průběh"
+msgstr ""
#: textbox.c:489
+#, fuzzy
msgid "Search"
-msgstr "Hledat"
+msgstr "Search"
diff --git a/contrib/dialog/po/el.po b/contrib/dialog/po/el.po
index 2fadd9b..3b87e8e 100644
--- a/contrib/dialog/po/el.po
+++ b/contrib/dialog/po/el.po
@@ -1,20 +1,14 @@
-# Greek translation for dialog.
-# This file is distributed under the same license as the dialog package.
-# Copyright (C) 2008 Free Software Foundation, Inc.
-# Savvas Radevic <vicedar@gmail.com>, 2012.
-#
msgid ""
msgstr ""
-"Project-Id-Version: dialog 1.1.20080819\n"
+"Project-Id-Version: Dialog\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-06-18 18:26-0400\n"
-"PO-Revision-Date: 2012-03-18 00:54+0100\n"
-"Last-Translator: Savvas Radevic <vicedar@gmail.com>\n"
-"Language-Team: Greek <team@lists.gnome.gr>\n"
-"Language: el\n"
+"PO-Revision-Date: 2002-06-05 10:00GMT+2\n"
+"Last-Translator: kromJx <kromJx@crosswinds.net>\n"
+"Language-Team: <i18ngr@hellug.gr>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
+"Content-Transfer-Encoding: 8-bit\n"
#: buttons.c:385
msgid "Yes"
@@ -26,7 +20,7 @@ msgstr "Όχι"
#: buttons.c:401
msgid "OK"
-msgstr "Εντάξει"
+msgstr "OK"
#: buttons.c:409
msgid "Cancel"
@@ -38,7 +32,7 @@ msgstr "Έξοδος"
#: buttons.c:425
msgid "Extra"
-msgstr "ΠÏόσθετα"
+msgstr ""
#: buttons.c:433
msgid "Help"
@@ -56,7 +50,7 @@ msgstr "Έτος"
#: dialog.c:741
msgid "Rename"
-msgstr "Μετονομασία"
+msgstr ""
#: fselect.c:550
msgid "Directories"
@@ -68,44 +62,46 @@ msgstr "ΑÏχεία"
#: mixedgauge.c:58
msgid "Succeeded"
-msgstr "Επιτυχία"
+msgstr ""
#: mixedgauge.c:61
+#, fuzzy
msgid "Failed"
-msgstr "Αποτυχία"
+msgstr "ΑÏχεία"
#: mixedgauge.c:64
msgid "Passed"
-msgstr "ΠέÏασε"
+msgstr ""
#: mixedgauge.c:67
msgid "Completed"
-msgstr "ΟλοκλήÏωση"
+msgstr ""
#: mixedgauge.c:70
msgid "Checked"
-msgstr "Έλεγχος"
+msgstr ""
#: mixedgauge.c:73
msgid "Done"
-msgstr "Τέλος"
+msgstr ""
#: mixedgauge.c:76
msgid "Skipped"
-msgstr "ΠαÏάλειψη"
+msgstr ""
#: mixedgauge.c:79
msgid "In Progress"
-msgstr "Σε εξέλιξη"
+msgstr ""
#: mixedgauge.c:85
msgid "N/A"
-msgstr "Μη Διαθέσιμο"
+msgstr ""
#: mixedgauge.c:193
msgid "Overall Progress"
-msgstr "Συνολική Ï€Ïόοδος"
+msgstr ""
#: textbox.c:489
+#, fuzzy
msgid "Search"
-msgstr "Αναζήτηση"
+msgstr "Search"
diff --git a/contrib/dialog/po/hr.po b/contrib/dialog/po/hr.po
index c3661db..6f3f546 100644
--- a/contrib/dialog/po/hr.po
+++ b/contrib/dialog/po/hr.po
@@ -1,112 +1,110 @@
-# Dialog
-# Copyright 2003-2007,2008 # Thomas Dickey
+# Croatian translation of Dialog.
# This file is distributed under the same license as the dialog package.
-# Tomislav Krznar <tomislav.krznar@gmail.com>, 2012.
+# Copyright (C) 2005 Thomas Dickey.
#
msgid ""
msgstr ""
-"Project-Id-Version: dialog 1.1.20080819\n"
+"Project-Id-Version: Dialog 1.0-20050116\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-06-18 18:26-0400\n"
-"PO-Revision-Date: 2012-03-31 00:10+0200\n"
-"Last-Translator: Tomislav Krznar <tomislav.krznar@gmail.com>\n"
+"POT-Creation-Date: 2011-01-16 17:57-0500\n"
+"PO-Revision-Date: 2004-07-25 14:52+0200\n"
+"Last-Translator: Krunoslav Gernhard <kruno@linux.hr>\n"
"Language-Team: Croatian <lokalizacija@linux.hr>\n"
"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
-#: buttons.c:385
+#: buttons.c:387
msgid "Yes"
msgstr "Da"
-#: buttons.c:393
+#: buttons.c:395
msgid "No"
msgstr "Ne"
-#: buttons.c:401
+#: buttons.c:403
msgid "OK"
msgstr "U redu"
-#: buttons.c:409
+#: buttons.c:411
msgid "Cancel"
msgstr "Otkaži"
-#: buttons.c:417
+#: buttons.c:419
msgid "EXIT"
-msgstr "IZLAZ"
+msgstr ""
-#: buttons.c:425
+#: buttons.c:427
msgid "Extra"
-msgstr "Dodatno"
+msgstr ""
-#: buttons.c:433
+#: buttons.c:435
msgid "Help"
-msgstr "Pomoć"
+msgstr ""
#. Headline "Month"
-#: calendar.c:273
+#: calendar.c:298
msgid "Month"
-msgstr "Mjesec"
+msgstr ""
#. Headline "Year"
-#: calendar.c:293
+#: calendar.c:318
msgid "Year"
-msgstr "Godina"
+msgstr ""
-#: dialog.c:741
+#: dialog.c:756
msgid "Rename"
-msgstr "Preimenuj"
+msgstr ""
-#: fselect.c:550
+#: fselect.c:571
msgid "Directories"
-msgstr "Direktoriji"
+msgstr ""
-#: fselect.c:551
+#: fselect.c:572
msgid "Files"
-msgstr "Datoteke"
+msgstr ""
#: mixedgauge.c:58
msgid "Succeeded"
-msgstr "Uspjeh"
+msgstr ""
#: mixedgauge.c:61
msgid "Failed"
-msgstr "Neuspjeh"
+msgstr ""
#: mixedgauge.c:64
msgid "Passed"
-msgstr "Prošlo"
+msgstr ""
#: mixedgauge.c:67
msgid "Completed"
-msgstr "Dovršeno"
+msgstr ""
#: mixedgauge.c:70
msgid "Checked"
-msgstr "Provjereno"
+msgstr ""
#: mixedgauge.c:73
msgid "Done"
-msgstr "Gotovo"
+msgstr ""
#: mixedgauge.c:76
msgid "Skipped"
-msgstr "PreskoÄeno"
+msgstr ""
#: mixedgauge.c:79
msgid "In Progress"
-msgstr "U tijeku"
+msgstr ""
#: mixedgauge.c:85
msgid "N/A"
-msgstr "Nedostupno"
+msgstr ""
#: mixedgauge.c:193
msgid "Overall Progress"
-msgstr "Ukupni napredak"
+msgstr ""
-#: textbox.c:489
+#: textbox.c:468
msgid "Search"
-msgstr "Pretraga"
+msgstr ""
diff --git a/contrib/dialog/po/sr.po b/contrib/dialog/po/sr.po
index 46b049d..9414692 100644
--- a/contrib/dialog/po/sr.po
+++ b/contrib/dialog/po/sr.po
@@ -1,21 +1,18 @@
-# Serbian translation of dialog.
+# Serbian translation of `dialog'.
# Copyright (C) 2005 Free Software Foundation, Inc.
-# This file is distributed under the same license as the dialog package.
+# This file is distributed under the same license as the `dialog' package.
# Aleksandar Jelenak <jelenak@verizon.net>, 2005.
-# МироÑлав Ðиколић <miroslavnikolic@rocketmail.com>, 2011.
msgid ""
msgstr ""
-"Project-Id-Version: dialog-1.1.20080819\n"
+"Project-Id-Version: dialog 1.0-rel20041222\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-06-18 18:26-0400\n"
-"PO-Revision-Date: 2011-12-24 21:29+0200\n"
-"Last-Translator: МироÑлав Ðиколић <miroslavnikolic@rocketmail.com>\n"
+"PO-Revision-Date: 2005-08-21 12:53-0400\n"
+"Last-Translator: Aleksandar Jelenak <jelenak@verizon.net>\n"
"Language-Team: Serbian <gnu@prevod.org>\n"
-"Language: sr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: buttons.c:385
msgid "Yes"
@@ -69,43 +66,44 @@ msgstr "Датотеке"
#: mixedgauge.c:58
msgid "Succeeded"
-msgstr "УÑпешно"
+msgstr ""
#: mixedgauge.c:61
+#, fuzzy
msgid "Failed"
-msgstr "ÐеуÑпешно"
+msgstr "Датотеке"
#: mixedgauge.c:64
msgid "Passed"
-msgstr "Прошло"
+msgstr ""
#: mixedgauge.c:67
msgid "Completed"
-msgstr "Завршено"
+msgstr ""
#: mixedgauge.c:70
msgid "Checked"
-msgstr "Проверено"
+msgstr ""
#: mixedgauge.c:73
msgid "Done"
-msgstr "Урађено"
+msgstr ""
#: mixedgauge.c:76
msgid "Skipped"
-msgstr "ПреÑкочено"
+msgstr ""
#: mixedgauge.c:79
msgid "In Progress"
-msgstr "У току"
+msgstr ""
#: mixedgauge.c:85
msgid "N/A"
-msgstr "Ð/Д"
+msgstr ""
#: mixedgauge.c:193
msgid "Overall Progress"
-msgstr "Укупно напредовање"
+msgstr ""
#: textbox.c:489
msgid "Search"
diff --git a/contrib/dialog/prgbox.c b/contrib/dialog/prgbox.c
index cd7bb8c..a3b3ea6 100644
--- a/contrib/dialog/prgbox.c
+++ b/contrib/dialog/prgbox.c
@@ -1,5 +1,5 @@
/*
- * $Id: prgbox.c,v 1.8 2011/10/20 23:42:32 tom Exp $
+ * $Id: prgbox.c,v 1.7 2011/06/30 20:44:13 tom Exp $
*
* prgbox.c -- implements the prg box
*
@@ -31,10 +31,11 @@ dlg_popen(const char *command, const char *type)
{
FILE *result = 0;
int fd[2];
+ int pid;
const char *argv[4];
if ((*type == 'r' || *type != 'w') && pipe(fd) == 0) {
- switch (fork()) {
+ switch (pid = fork()) {
case -1: /* Error. */
(void) close(fd[0]);
(void) close(fd[1]);
diff --git a/contrib/dialog/progressbox.c b/contrib/dialog/progressbox.c
index 077339c..024e288 100644
--- a/contrib/dialog/progressbox.c
+++ b/contrib/dialog/progressbox.c
@@ -1,5 +1,5 @@
/*
- * $Id: progressbox.c,v 1.21 2012/07/03 00:12:52 tom Exp $
+ * $Id: progressbox.c,v 1.13 2011/06/27 08:18:20 tom Exp $
*
* progressbox.c -- implements the progress box
*
@@ -99,7 +99,6 @@ print_line(MY_OBJ * obj, WINDOW *win, int row, int width)
#endif
getyx(win, y, x);
- (void) y;
/* Clear 'residue' of previous line */
for (i = 0; i < width - x; i++)
(void) waddch(win, ' ');
@@ -112,79 +111,54 @@ pause_for_ok(WINDOW *dialog, int height, int width)
static DLG_KEYS_BINDING binding[] = {
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
- TRAVERSE_BINDINGS,
+ DLG_KEYS_DATA( DLGK_ENTER, ' ' ),
END_KEYS_BINDING
};
/* *INDENT-ON* */
- int button;
+ int button = 0;
int key = 0, fkey;
int result = DLG_EXIT_UNKNOWN;
const char **buttons = dlg_ok_label();
int check;
- int save_nocancel = dialog_vars.nocancel;
- bool redraw = TRUE;
-
- dialog_vars.nocancel = TRUE;
- button = dlg_default_button();
dlg_register_window(dialog, "progressbox", binding);
dlg_register_buttons(dialog, "progressbox", buttons);
- dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
+ dlg_draw_bottom_box(dialog);
mouse_mkbutton(height - 2, width / 2 - 4, 6, '\n');
+ dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width);
while (result == DLG_EXIT_UNKNOWN) {
- if (redraw) {
- redraw = FALSE;
- if (button < 0)
- button = 0;
- dlg_draw_buttons(dialog,
- height - 2, 0,
- buttons, button,
- FALSE, width);
- }
-
key = dlg_mouse_wgetch(dialog, &fkey);
if (dlg_result_key(key, fkey, &result))
break;
if (!fkey && (check = dlg_char_to_button(key, buttons)) >= 0) {
- result = dlg_ok_buttoncode(check);
+ result = check ? DLG_EXIT_HELP : DLG_EXIT_OK;
break;
}
if (fkey) {
switch (key) {
- case DLGK_FIELD_NEXT:
- button = dlg_next_button(buttons, button);
- redraw = TRUE;
+ case DLGK_ENTER:
+ result = button ? DLG_EXIT_HELP : DLG_EXIT_OK;
break;
- case DLGK_FIELD_PREV:
- button = dlg_prev_button(buttons, button);
- redraw = TRUE;
+ case DLGK_MOUSE(0):
+ result = DLG_EXIT_OK;
break;
- case DLGK_ENTER:
- result = dlg_ok_buttoncode(button);
+ case DLGK_MOUSE(1):
+ result = DLG_EXIT_HELP;
break;
default:
- if (is_DLGK_MOUSE(key)) {
- result = dlg_ok_buttoncode(key - M_EVENT);
- if (result < 0)
- result = DLG_EXIT_OK;
- } else {
- beep();
- }
+ beep();
break;
}
-
} else {
beep();
}
}
dlg_unregister_window(dialog);
-
- dialog_vars.nocancel = save_nocancel;
return result;
}
@@ -214,17 +188,16 @@ dlg_progressbox(const char *title,
dialog = dlg_new_window(height, width, y, x);
- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
+ dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
dlg_draw_title(dialog, title);
dlg_draw_helpline(dialog, FALSE);
if (*prompt != '\0') {
int y2, x2;
- (void) wattrset(dialog, dialog_attr);
+ wattrset(dialog, dialog_attr);
dlg_print_autowrap(dialog, prompt, height, width);
getyx(dialog, y2, x2);
- (void) x2;
++y2;
wmove(dialog, y2, MARGIN);
for (i = 0; i < getmaxx(dialog) - 2 * MARGIN; i++)
@@ -263,7 +236,6 @@ dlg_progressbox(const char *title,
print_line(obj, text, thigh - 1, width - (2 * MARGIN));
}
(void) wrefresh(text);
- dlg_trace_win(dialog);
if (obj->is_eof)
break;
}
@@ -282,7 +254,7 @@ dlg_progressbox(const char *title,
free(prompt);
free(obj);
- return result;
+ return DLG_EXIT_OK;
}
/*
diff --git a/contrib/dialog/rc.c b/contrib/dialog/rc.c
index cc6af29..2e2c7e6 100644
--- a/contrib/dialog/rc.c
+++ b/contrib/dialog/rc.c
@@ -1,5 +1,5 @@
/*
- * $Id: rc.c,v 1.49 2011/10/15 00:56:44 tom Exp $
+ * $Id: rc.c,v 1.47 2011/06/20 22:30:04 tom Exp $
*
* rc.c -- routines for processing the configuration file
*
@@ -203,10 +203,9 @@ attr_to_str(char *str, int fg, int bg, int hl)
/*
* Extract the foreground, background and highlight values from an attribute
- * represented as a string in one of two forms:
+ * represented as a string in this form:
*
* "(foreground,background,highlight)"
- " "xxxx_color"
*/
static int
str_to_attr(char *str, int *fg, int *bg, int *hl)
@@ -215,15 +214,8 @@ str_to_attr(char *str, int *fg, int *bg, int *hl)
unsigned j;
char tempstr[MAX_LEN + 1], *part;
- if (str[0] != '(' || lastch(str) != ')') {
- if ((i = find_color(str)) >= 0) {
- *fg = dlg_color_table[i].fg;
- *bg = dlg_color_table[i].bg;
- *hl = dlg_color_table[i].hilite;
- return 0;
- }
+ if (str[0] != '(' || lastch(str) != ')')
return -1; /* invalid representation */
- }
/* remove the parenthesis */
strcpy(tempstr, str + 1);
@@ -432,29 +424,13 @@ dlg_create_rc(const char *filename)
#ifdef HAVE_COLOR
for (i = 0; i < (unsigned) dlg_color_count(); ++i) {
char buffer[MAX_LEN + 1];
- unsigned j;
- bool repeat = FALSE;
fprintf(rc_file, "\n# %s\n", dlg_color_table[i].comment);
- for (j = 0; j != i; ++j) {
- if (dlg_color_table[i].fg == dlg_color_table[j].fg
- && dlg_color_table[i].bg == dlg_color_table[j].bg
- && dlg_color_table[i].hilite == dlg_color_table[j].hilite) {
- fprintf(rc_file, "%s = %s\n",
- dlg_color_table[i].name,
- dlg_color_table[j].name);
- repeat = TRUE;
- break;
- }
- }
-
- if (!repeat) {
- fprintf(rc_file, "%s = %s\n", dlg_color_table[i].name,
- attr_to_str(buffer,
- dlg_color_table[i].fg,
- dlg_color_table[i].bg,
- dlg_color_table[i].hilite));
- }
+ fprintf(rc_file, "%s = %s\n", dlg_color_table[i].name,
+ attr_to_str(buffer,
+ dlg_color_table[i].fg,
+ dlg_color_table[i].bg,
+ dlg_color_table[i].hilite));
}
#endif /* HAVE_COLOR */
dlg_dump_keys(rc_file);
@@ -531,10 +507,7 @@ dlg_parse_rc(void)
lastch(str) = '\0';
if (begins_with(str, "bindkey", &params)) {
- if (!dlg_parse_bindkey(params)) {
- fprintf(stderr, "\nParse error: line %d of configuration\n", l);
- result = -1;
- }
+ dlg_parse_bindkey(params);
continue;
}
parse = parse_line(str, &var, &value); /* parse current line */
diff --git a/contrib/dialog/samples/copifuncs/admin.funcs b/contrib/dialog/samples/copifuncs/admin.funcs
index ff1b80d..27800dc 100755
--- a/contrib/dialog/samples/copifuncs/admin.funcs
+++ b/contrib/dialog/samples/copifuncs/admin.funcs
@@ -1,5 +1,5 @@
-#!/usr/bin/env bash
-# $Id: admin.funcs,v 1.3 2012/02/16 01:29:39 tom Exp $
+#!/bin/bash
+# $Id: admin.funcs,v 1.2 2001/01/15 22:20:11 tom Exp $
#
# ComeOn Point Functions! v0.9.2
# - usate da vari altri moduli ComeOn Point...
diff --git a/contrib/dialog/samples/copifuncs/common.funcs b/contrib/dialog/samples/copifuncs/common.funcs
index 63640c4..04eca9a 100755
--- a/contrib/dialog/samples/copifuncs/common.funcs
+++ b/contrib/dialog/samples/copifuncs/common.funcs
@@ -1,5 +1,3 @@
-#!/usr/bin/env bash
-# $Id: common.funcs,v 1.2 2012/06/29 22:33:42 tom Exp $
#
# ComeOn Point Functions! v0.9.2
# - usate da vari altri moduli ComeOn Point...
diff --git a/contrib/dialog/samples/copifuncs/copi.funcs b/contrib/dialog/samples/copifuncs/copi.funcs
index 87a623c..7be4bdb 100755
--- a/contrib/dialog/samples/copifuncs/copi.funcs
+++ b/contrib/dialog/samples/copifuncs/copi.funcs
@@ -1,5 +1,5 @@
-#!/usr/bin/env bash
-# $Id: copi.funcs,v 1.4 2012/02/16 01:29:39 tom Exp $
+#!/bin/bash
+# $Id: copi.funcs,v 1.3 2001/01/15 22:24:26 tom Exp $
# ComeOn Point Functions! v0.9.2
# - usate da vari altri moduli ComeOn Point...
#
@@ -244,7 +244,7 @@ create_innconf_newsfeeds_distrib() {
save $INNCONF
cat <<EOF >$INNCONF
-## $Revision: 1.4 $
+## $Revision: 1.3 $
## inn.conf -- inn configuration data
## Format:
## <parameter>:<whitespace><value>
@@ -350,7 +350,7 @@ create_nnrpaccess() {
save $NNRPACCESS
cat <<EOF >$NNRPACCESS
-## $Revision: 1.4 $
+## $Revision: 1.3 $
## nnrp.access - access file for on-campus NNTP sites
## Format:
## <host>:<perm>:<user>:<pass>:<groups>
@@ -386,7 +386,7 @@ create_hostsnntp() {
save $HOSTSNNTP
cat <<EOF >$HOSTSNNTP
-## $Revision: 1.4 $
+## $Revision: 1.3 $
## hosts.nntp - names and addresses that feed us news
## Format
## <host>:
diff --git a/contrib/dialog/samples/copifuncs/copi.ifman2 b/contrib/dialog/samples/copifuncs/copi.ifman2
index 7a111bf..0b6dbb7 100755
--- a/contrib/dialog/samples/copifuncs/copi.ifman2
+++ b/contrib/dialog/samples/copifuncs/copi.ifman2
@@ -1,6 +1,3 @@
-# vile:perlmode
-# $Id: copi.ifman2,v 1.2 2012/06/29 22:33:42 tom Exp $
-
if ( getpwuid($<) ne $ifowner ) { print "You must be owner of ifmail\n"; exit 1; }
if ( (@ARGV < 3) || $ARGV[0] eq "-?" || $ARGV[0] eq "-h" ) {
diff --git a/contrib/dialog/samples/copifuncs/copi.ifpoll2 b/contrib/dialog/samples/copifuncs/copi.ifpoll2
index ea4deb1..216bff0 100755
--- a/contrib/dialog/samples/copifuncs/copi.ifpoll2
+++ b/contrib/dialog/samples/copifuncs/copi.ifpoll2
@@ -1,5 +1,3 @@
-#!/usr/bin/env bash
-# $Id: copi.ifpoll2,v 1.2 2012/06/29 22:33:42 tom Exp $
# Packets backup directory - You have to CREATE this directory
BAK=/var/spool/ifmail/BAK
diff --git a/contrib/dialog/samples/copifuncs/copi.ifreq2 b/contrib/dialog/samples/copifuncs/copi.ifreq2
index 19ff08c..9ee78ff 100755
--- a/contrib/dialog/samples/copifuncs/copi.ifreq2
+++ b/contrib/dialog/samples/copifuncs/copi.ifreq2
@@ -1,6 +1,3 @@
-#!/usr/bin/perl
-# $Id: copi.ifreq2,v 1.2 2012/06/29 22:33:42 tom Exp $
-#
# this is the base directory, where the req-files are stored and the
# default outbound
$flo_path = "/var/spool/ifmail";
diff --git a/contrib/dialog/samples/copifuncs/copi.sendifm1 b/contrib/dialog/samples/copifuncs/copi.sendifm1
index dcf9c78..564b9c6 100755
--- a/contrib/dialog/samples/copifuncs/copi.sendifm1
+++ b/contrib/dialog/samples/copifuncs/copi.sendifm1
@@ -1,5 +1,5 @@
-#!/usr/bin/env bash
-# $Id: copi.sendifm1,v 1.2 2012/06/29 22:33:42 tom Exp $
+#! /bin/sh
+## $Revision: 1.1 $
## SH script to send UUCP batches out.
## =()<. @<_PATH_SHELLVARS>@>()=
diff --git a/contrib/dialog/samples/copifuncs/copi.wheel b/contrib/dialog/samples/copifuncs/copi.wheel
index ecb5061..567e559 100755
--- a/contrib/dialog/samples/copifuncs/copi.wheel
+++ b/contrib/dialog/samples/copifuncs/copi.wheel
@@ -1,5 +1,5 @@
-#!/bin/sh
-# $Id: copi.wheel,v 1.4 2012/06/29 10:53:52 tom Exp $
+#!/bin/bash
+# $Id: copi.wheel,v 1.2 2001/01/15 22:26:33 tom Exp $
mkstemp size
dialog --print-maxsize 2>$tmp_size
@@ -9,10 +9,10 @@ rm $tmp_size
# Takes an integer, multiplies it for COLS, divides for 132
scalex() {
- expr $1 \* $COLS / 132
+ echo $[$1*$COLS/132]
}
scaley() {
- expr $1 \* $ROWS / 60
+ echo $[$1*$ROWS/60]
}
dialog --backtitle "$TITLE" --no-shadow \
diff --git a/contrib/dialog/samples/copismall b/contrib/dialog/samples/copismall
index 537c4ac..3dfb485 100755
--- a/contrib/dialog/samples/copismall
+++ b/contrib/dialog/samples/copismall
@@ -1,5 +1,5 @@
-#!/usr/bin/env bash
-# $Id: copismall,v 1.9 2012/02/16 01:29:39 Pedro.Giffuni Exp $
+#!/bin/bash
+# $Id: copismall,v 1.8 2010/01/13 10:26:52 tom Exp $
#
# ComeOn Point Installer! v0.9a.small (small version for cdialog v0.9a)
# - installa il point in modo visuale e auto-detecting. Versione light.
diff --git a/contrib/dialog/samples/debian.rc b/contrib/dialog/samples/debian.rc
index 195d798..3b42eb8 100644
--- a/contrib/dialog/samples/debian.rc
+++ b/contrib/dialog/samples/debian.rc
@@ -1,4 +1,4 @@
-# $Id: debian.rc,v 1.7 2011/10/15 01:00:09 tom Exp $
+# $Id: debian.rc,v 1.5 2011/01/17 00:14:53 tom Exp $
# vile:confmode
# Run-time configuration file for dialog, matches Debian color scheme.
# (these are the default values for dialog)
@@ -47,10 +47,10 @@ border_color = (WHITE,WHITE,ON)
button_active_color = (WHITE,BLUE,ON)
# Inactive button color
-button_inactive_color = dialog_color
+button_inactive_color = (BLACK,WHITE,OFF)
# Active button key color
-button_key_active_color = button_active_color
+button_key_active_color = (WHITE,BLUE,ON)
# Inactive button key color
button_key_inactive_color = (RED,WHITE,OFF)
@@ -62,64 +62,64 @@ button_label_active_color = (YELLOW,BLUE,ON)
button_label_inactive_color = (BLACK,WHITE,ON)
# Input box color
-inputbox_color = dialog_color
+inputbox_color = (BLACK,WHITE,OFF)
# Input box border color
-inputbox_border_color = dialog_color
+inputbox_border_color = (BLACK,WHITE,OFF)
# Search box color
-searchbox_color = dialog_color
+searchbox_color = (BLACK,WHITE,OFF)
# Search box title color
-searchbox_title_color = title_color
+searchbox_title_color = (BLUE,WHITE,ON)
# Search box border color
-searchbox_border_color = border_color
+searchbox_border_color = (WHITE,WHITE,ON)
# File position indicator color
-position_indicator_color = title_color
+position_indicator_color = (BLUE,WHITE,ON)
# Menu box color
-menubox_color = dialog_color
+menubox_color = (BLACK,WHITE,OFF)
# Menu box border color
-menubox_border_color = border_color
+menubox_border_color = (WHITE,WHITE,ON)
# Item color
-item_color = dialog_color
+item_color = (BLACK,WHITE,OFF)
# Selected item color
-item_selected_color = button_active_color
+item_selected_color = (WHITE,BLUE,ON)
# Tag color
-tag_color = title_color
+tag_color = (BLUE,WHITE,ON)
# Selected tag color
-tag_selected_color = button_label_active_color
+tag_selected_color = (YELLOW,BLUE,ON)
# Tag key color
-tag_key_color = button_key_inactive_color
+tag_key_color = (RED,WHITE,OFF)
# Selected tag key color
tag_key_selected_color = (RED,BLUE,ON)
# Check box color
-check_color = dialog_color
+check_color = (BLACK,WHITE,OFF)
# Selected check box color
-check_selected_color = button_active_color
+check_selected_color = (WHITE,BLUE,ON)
# Up arrow color
uarrow_color = (GREEN,WHITE,ON)
# Down arrow color
-darrow_color = uarrow_color
+darrow_color = (GREEN,WHITE,ON)
# Item help-text color
itemhelp_color = (WHITE,BLACK,OFF)
# Active form text color
-form_active_text_color = button_active_color
+form_active_text_color = (WHITE,BLUE,ON)
# Form text color
form_text_color = (WHITE,CYAN,ON)
@@ -128,16 +128,4 @@ form_text_color = (WHITE,CYAN,ON)
form_item_readonly_color = (CYAN,WHITE,ON)
# Dialog box gauge color
-gauge_color = title_color
-
-# Dialog box border2 color
-border2_color = dialog_color
-
-# Input box border2 color
-inputbox_border2_color = dialog_color
-
-# Search box border2 color
-searchbox_border2_color = dialog_color
-
-# Menu box border2 color
-menubox_border2_color = dialog_color
+gauge_color = (BLUE,WHITE,ON)
diff --git a/contrib/dialog/samples/dft-cancel b/contrib/dialog/samples/dft-cancel
deleted file mode 100755
index 2b317fc..0000000
--- a/contrib/dialog/samples/dft-cancel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-# $Id: dft-cancel,v 1.2 2012/07/03 09:44:02 tom Exp $
-DIALOGOPTS="$DIALOGOPTS --extra-button --help-button --default-button cancel" "$@"
diff --git a/contrib/dialog/samples/dft-extra b/contrib/dialog/samples/dft-extra
deleted file mode 100755
index de08cd7..0000000
--- a/contrib/dialog/samples/dft-extra
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-# $Id: dft-extra,v 1.2 2012/07/03 09:44:02 tom Exp $
-DIALOGOPTS="$DIALOGOPTS --extra-button --help-button --default-button extra" "$@"
diff --git a/contrib/dialog/samples/dft-help b/contrib/dialog/samples/dft-help
deleted file mode 100755
index cade8a7..0000000
--- a/contrib/dialog/samples/dft-help
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-# $Id: dft-help,v 1.2 2012/07/03 09:44:02 tom Exp $
-DIALOGOPTS="$DIALOGOPTS --extra-button --help-button --default-button help" "$@"
diff --git a/contrib/dialog/samples/dft-no b/contrib/dialog/samples/dft-no
deleted file mode 100755
index 172bcb2..0000000
--- a/contrib/dialog/samples/dft-no
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-# $Id: dft-no,v 1.2 2012/07/03 09:44:02 tom Exp $
-DIALOGOPTS="$DIALOGOPTS --extra-button --help-button --defaultno" "$@"
diff --git a/contrib/dialog/samples/dialog.py b/contrib/dialog/samples/dialog.py
index 5286b41..db66fd7 100644
--- a/contrib/dialog/samples/dialog.py
+++ b/contrib/dialog/samples/dialog.py
@@ -1,5 +1,4 @@
-#!/usr/bin/python
-# $Id: dialog.py,v 1.4 2012/06/29 09:33:18 tom Exp $
+# $Id: dialog.py,v 1.3 2004/09/21 00:52:15 tom Exp $
# Module: dialog.py
# Copyright (c) 2000 Robb Shecter <robb@acm.org>
# All rights reserved.
diff --git a/contrib/dialog/samples/dselect b/contrib/dialog/samples/dselect
new file mode 100755
index 0000000..22995b4
--- /dev/null
+++ b/contrib/dialog/samples/dselect
@@ -0,0 +1,11 @@
+#!/bin/sh
+# $Id: dselect,v 1.6 2010/01/13 10:20:03 tom Exp $
+
+. ./setup-vars
+
+exec 3>&1
+RESULT=`$DIALOG --title "Please choose a directory" "$@" --dselect $HOME/ 14 48 2>&1 1>&3`
+retval=$?
+exec 3>&-
+
+. ./report-string
diff --git a/contrib/dialog/samples/form1 b/contrib/dialog/samples/form1
index 38e2364..cfa8a4a 100755
--- a/contrib/dialog/samples/form1
+++ b/contrib/dialog/samples/form1
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: form1,v 1.15 2011/10/04 23:36:53 tom Exp $
+# $Id: form1,v 1.14 2010/01/13 10:53:11 tom Exp $
. ./setup-vars
@@ -63,8 +63,8 @@ $show" 10 40
echo "Button 3 (Extra) pressed."
exit
;;
- $DIALOG_ERROR)
- echo "ERROR!$value"
+ $DIALOG_ERR)
+ echo "ERROR!"
exit
;;
$DIALOG_ESC)
diff --git a/contrib/dialog/samples/fselect0 b/contrib/dialog/samples/fselect0
deleted file mode 100755
index 3bd5b6d..0000000
--- a/contrib/dialog/samples/fselect0
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-# $Id: fselect0,v 1.1 2011/10/14 08:32:48 tom Exp $
-
-. ./setup-vars
-
-exec 3>&1
-RESULT=`$DIALOG --title "Please choose a file" "$@" --fselect '' 14 48 2>&1 1>&3`
-retval=$?
-exec 3>&-
-
-. ./report-string
diff --git a/contrib/dialog/samples/inputmenu b/contrib/dialog/samples/inputmenu
index 3c80811..5053cda 100755
--- a/contrib/dialog/samples/inputmenu
+++ b/contrib/dialog/samples/inputmenu
@@ -1,65 +1,60 @@
-#! /bin/sh
-# $Id: inputmenu,v 1.15 2012/07/06 18:11:21 tom Exp $
+#! /bin/bash
+# $Id: inputmenu,v 1.10 2010/01/13 10:29:22 tom Exp $
# 2002 - written by Tobias Rittweiler <tobrit@freebits.de>
. ./setup-vars
-user="$USER"
-uid=`id|sed -e 's/^uid=//' -e 's/(.*//'`
-gid=`id|sed -e 's/^.*gid=//' -e 's/(.*//'`
-home="$HOME"
+user="$USER" ; uid="$UID" ;
+gid="$GROUPS" ; home="$HOME" ;
while [ ${returncode:-99} -ne 1 -a ${returncode:-99} -ne 250 ]; do
- exec 3>&1
- value=`$DIALOG \
- --clear --ok-label "Create" \
- --backtitle "An Example for the use of --inputmenu:" "$@" \
- --inputmenu "Originally I designed --inputmenu for a \
+ exec 3>&1
+ value=$("$DIALOG" --clear --ok-label "Create" \
+ --backtitle "An Example for the use of --inputmenu:" "$@" \
+ --inputmenu "Originally I designed --inputmenu for a \
configuration purpose. Here is a possible piece of a configuration program. \
" 20 50 10 \
"Username:" "$user" \
"UID:" "$uid" \
"GID:" "$gid" \
"HOME:" "$home" \
-2>&1 1>&3 `
- returncode=$?
- exec 3>&-
- case $returncode in
- $DIALOG_CANCEL)
- "$DIALOG" \
- --clear --backtitle "An Example for the use of --inputmenu:" \
- --yesno "Really quit?" 10 30
- case $? in
- $DIALOG_OK) break;;
- $DIALOG_CANCEL) returncode=99;;
- esac
- ;;
- $DIALOG_OK)
- "$DIALOG" \
- --clear --backtitle "An Example for the use of --inputmenu:" \
+2>&1 1>&3 )
+ returncode=$?
+ exec 3>&-
+ case $returncode in
+ $DIALOG_CANCEL)
+ "$DIALOG" --clear --backtitle "An Example for the use of --inputmenu:" \
+ --yesno "Really quit?" 10 30
+ case $? in
+ $DIALOG_OK) break;;
+ $DIALOG_CANCEL) returncode=99;;
+ esac
+ ;;
+ $DIALOG_OK)
+ "$DIALOG" --clear --backtitle "An Example for the use of --inputmenu:" \
--msgbox "useradd \n\
-d $home \n\
-u $uid \n\
-g $gid \n\
$user" 10 40
- ;;
- $DIALOG_EXTRA)
- value=`echo "$value" | sed -e 's/^RENAMED //'`
- tag=`echo "$value" | sed -e 's/:.*//'`
- item=`echo "$value" | sed -e 's/^[^:]*:[ ][ ]*//'`
+ ;;
+ $DIALOG_EXTRA)
+ value="${value:8:${#value}}"
+ tag="${value%:*}"
+ item="${value#*: }"
- case "$tag" in
- Username) user="$item" ;;
- UID) uid="$item" ;;
- GID) gid="$item" ;;
- HOME) home="$item" ;;
- esac
- ;;
+ case "$tag" in
+ Username) user="$item";;
+ UID) uid="$item";;
+ GID) gid="$item";;
+ HOME) home="$item";;
+ esac
+ ;;
- $DIALOG_ESC)
- echo "ESC pressed."
- break
- ;;
+ $DIALOG_ESC)
+ echo "ESC pressed."
+ break
+ ;;
- esac
+ esac
done
diff --git a/contrib/dialog/samples/inputmenu-stdout b/contrib/dialog/samples/inputmenu-stdout
index a778226..22fce04 100755
--- a/contrib/dialog/samples/inputmenu-stdout
+++ b/contrib/dialog/samples/inputmenu-stdout
@@ -1,63 +1,53 @@
-#! /bin/sh
-# $Id: inputmenu-stdout,v 1.13 2012/07/06 18:11:12 tom Exp $
+#! /bin/bash
+# $Id: inputmenu-stdout,v 1.8 2010/01/13 10:30:14 tom Exp $
# 2002 - written by Tobias Rittweiler <tobrit@freebits.de>
. ./setup-vars
-user="$USER"
-uid=`id|sed -e 's/^uid=//' -e 's/(.*//'`
-gid=`id|sed -e 's/^.*gid=//' -e 's/(.*//'`
-home="$HOME"
+user="$USER" ; uid="$UID" ;
+gid="$GROUPS" ; home="$HOME" ;
while [ ${returncode:-99} -ne 1 -a ${returncode:-99} -ne 250 ]; do
- value=`$DIALOG \
- --stdout --clear --ok-label "Create" \
- --backtitle "An Example for the use of --inputmenu:" "$@" \
- --inputmenu "Originally I designed --inputmenu for a \
-configuration purpose. Here is a possible piece of a configuration program. \
-" 20 50 10 \
-"Username:" "$user" \
-"UID:" "$uid" \
-"GID:" "$gid" \
-"HOME:" "$home" \
-`
- returncode=$?
- case $returncode in
- $DIALOG_CANCEL)
- "$DIALOG" \
- --clear --backtitle "An Example for the use of --inputmenu:" \
- --yesno "Really quit?" 10 30
- case $? in
- $DIALOG_OK) break;;
- $DIALOG_CANCEL) returncode=99;;
- esac
- ;;
- $DIALOG_OK)
- "$DIALOG" \
- --clear --backtitle "An Example for the use of --inputmenu:" \
+ value="$("$DIALOG" --stdout --clear --ok-label "Create" \
+ --backtitle "An Example for the use of --inputmenu:" "$@" \
+ --inputmenu "Originally I designed --inputmenu for a \
+configuration purpose. Here is a possible piece of a configuration program.
+" 20 50 10 "Username:" "$user" "UID:" "$uid" "GID:" "$gid" "HOME:" "$home")"
+ returncode=$?
+ case $returncode in
+ $DIALOG_CANCEL)
+ "$DIALOG" --clear --backtitle "An Example for the use of --inputmenu:" \
+ --yesno "Really quit?" 10 30
+ case $? in
+ $DIALOG_OK) break;;
+ $DIALOG_CANCEL) returncode=99;;
+ esac
+ ;;
+ $DIALOG_OK)
+ "$DIALOG" --clear --backtitle "An Example for the use of --inputmenu:" \
--msgbox "useradd \n\
-d $home \n\
-u $uid \n\
-g $gid \n\
$user" 10 40
- ;;
- $DIALOG_EXTRA)
- value=`echo "$value" | sed -e 's/^RENAMED //'`
- tag=`echo "$value" | sed -e 's/:.*//'`
- item=`echo "$value" | sed -e 's/^[^:]*:[ ][ ]*//'`
+ ;;
+ $DIALOG_EXTRA)
+ value="${value:8:${#value}}"
+ tag="${value%:*}"
+ item="${value#*: }"
- case "$tag" in
- Username) user="$item" ;;
- UID) uid="$item" ;;
- GID) gid="$item" ;;
- HOME) home="$item" ;;
- esac
- ;;
+ case "$tag" in
+ Username) user="$item";;
+ UID) uid="$item";;
+ GID) gid="$item";;
+ HOME) home="$item";;
+ esac
+ ;;
- $DIALOG_ESC)
- echo "ESC pressed."
- break
- ;;
+ $DIALOG_ESC)
+ echo "ESC pressed."
+ break
+ ;;
- esac
+ esac
done
diff --git a/contrib/dialog/samples/inputmenu1 b/contrib/dialog/samples/inputmenu1
index 905c292..4e9bae2 100755
--- a/contrib/dialog/samples/inputmenu1
+++ b/contrib/dialog/samples/inputmenu1
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: inputmenu1,v 1.9 2012/07/01 00:59:54 tom Exp $
+# $Id: inputmenu1,v 1.8 2010/01/13 10:31:02 tom Exp $
#
# "inputmenu" rewritten into Bourne shell.
@@ -58,7 +58,7 @@ exec 3>&-
;;
$DIALOG_EXTRA)
tag=`echo "$value" |sed -e 's/^RENAMED //' -e 's/:.*//'`
- item=`echo "$value" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
+ item=`echo "$value" |sed -e 's/^.*:[ ]*//' -e 's/[ ]*$//'`
case "$tag" in
Username)
diff --git a/contrib/dialog/samples/inputmenu2 b/contrib/dialog/samples/inputmenu2
index ecef674..f560aba 100755
--- a/contrib/dialog/samples/inputmenu2
+++ b/contrib/dialog/samples/inputmenu2
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: inputmenu2,v 1.9 2012/07/01 01:00:34 tom Exp $
+# $Id: inputmenu2,v 1.8 2010/01/13 10:32:04 tom Exp $
#
# "inputmenu1" with defaultitem, help-button.
@@ -66,7 +66,7 @@ exec 3>&-
;;
$DIALOG_EXTRA)
tag=`echo "$value" |sed -e 's/^RENAMED //' -e 's/:.*/:/'`
- item=`echo "$value" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
+ item=`echo "$value" |sed -e 's/^.*:[ ]*//' -e 's/[ ]*$//'`
case "$tag" in
Username:)
diff --git a/contrib/dialog/samples/inputmenu3 b/contrib/dialog/samples/inputmenu3
index 4b9d522..e3250d8 100755
--- a/contrib/dialog/samples/inputmenu3
+++ b/contrib/dialog/samples/inputmenu3
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: inputmenu3,v 1.11 2012/07/01 01:00:34 tom Exp $
+# $Id: inputmenu3,v 1.10 2010/01/13 10:32:51 tom Exp $
#
# "inputmenu1" with defaultitem, help-button and item-help.
@@ -75,7 +75,7 @@ exec 3>&-
;;
$DIALOG_EXTRA)
tag=`echo "$value" |sed -e 's/^RENAMED //' -e 's/:.*/:/'`
- item=`echo "$value" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
+ item=`echo "$value" |sed -e 's/^.*:[ ]*//' -e 's/[ ]*$//'`
case "$tag" in
Username:)
diff --git a/contrib/dialog/samples/inputmenu4 b/contrib/dialog/samples/inputmenu4
index 6688c9c..a872527 100755
--- a/contrib/dialog/samples/inputmenu4
+++ b/contrib/dialog/samples/inputmenu4
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: inputmenu4,v 1.9 2012/07/01 01:00:34 tom Exp $
+# $Id: inputmenu4,v 1.8 2010/01/13 10:33:35 tom Exp $
#
# "inputmenu1" with a different label for the extra-button
@@ -59,7 +59,7 @@ exec 3>&-
;;
$DIALOG_EXTRA)
tag=`echo "$value" |sed -e 's/^RENAMED //' -e 's/:.*//'`
- item=`echo "$value" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
+ item=`echo "$value" |sed -e 's/^.*:[ ]*//' -e 's/[ ]*$//'`
case "$tag" in
Username)
diff --git a/contrib/dialog/samples/killall b/contrib/dialog/samples/killall
index 7030fe2..9d233f0 100755
--- a/contrib/dialog/samples/killall
+++ b/contrib/dialog/samples/killall
@@ -1,16 +1,13 @@
#! /bin/sh
-# $Id: killall,v 1.3 2012/06/29 09:39:19 tom Exp $
+# $Id: killall,v 1.2 2004/09/17 19:56:18 tom Exp $
# Linux has a program that does this correctly.
-
-. ./setup-vars
-
for prog in $*
do
pid=`ps -a |fgrep $prog |fgrep -v fgrep|sed -e 's/^[ ]*//' -e 's/ .*//' `
if test -n "$pid" ; then
echo killing pid=$pid, $prog
- kill -$SIG_HUP $pid || \
- kill -$SIG_TERM $pid || \
- kill -$SIG_KILL $pid
+ kill -1 $pid || \
+ kill -15 $pid || \
+ kill -9 $pid
fi
done
diff --git a/contrib/dialog/samples/prgbox b/contrib/dialog/samples/prgbox
index c06a630..9170a36 100755
--- a/contrib/dialog/samples/prgbox
+++ b/contrib/dialog/samples/prgbox
@@ -1,9 +1,6 @@
#!/bin/sh
-# $Id: prgbox,v 1.2 2012/07/02 09:46:24 tom Exp $
+# $Id: prgbox,v 1.1 2011/03/02 00:10:54 tom Exp $
. ./setup-vars
$DIALOG --title "PRGBOX" "$@" --prgbox "./shortlist" 20 70
-
-retval=$?
-. ./report-button
diff --git a/contrib/dialog/samples/prgbox2 b/contrib/dialog/samples/prgbox2
index ba94622..53f3daa 100755
--- a/contrib/dialog/samples/prgbox2
+++ b/contrib/dialog/samples/prgbox2
@@ -1,9 +1,6 @@
#!/bin/sh
-# $Id: prgbox2,v 1.2 2012/07/02 09:46:24 tom Exp $
+# $Id: prgbox2,v 1.1 2011/03/02 01:25:54 tom Exp $
. ./setup-vars
$DIALOG --title "PRGBOX" "$@" --prgbox "./shortlist 3" 20 70
-
-retval=$?
-. ./report-button
diff --git a/contrib/dialog/samples/report-button b/contrib/dialog/samples/report-button
index c6a1730..e13b03a 100644
--- a/contrib/dialog/samples/report-button
+++ b/contrib/dialog/samples/report-button
@@ -1,5 +1,4 @@
-#!/bin/sh
-# $Id: report-button,v 1.3 2012/06/29 09:29:36 tom Exp $
+# $Id: report-button,v 1.2 2010/01/13 09:59:14 tom Exp $
# Report button-only, no $RESULT
# vile:shmode
diff --git a/contrib/dialog/samples/report-edit b/contrib/dialog/samples/report-edit
index 37e3eb0..f17b6d3 100644
--- a/contrib/dialog/samples/report-edit
+++ b/contrib/dialog/samples/report-edit
@@ -1,5 +1,4 @@
-#!/bin/sh
-# $Id: report-edit,v 1.4 2012/06/29 09:29:41 tom Exp $
+# $Id: report-edit,v 1.3 2010/01/13 09:59:43 tom Exp $
# Report results from editing.
# vile:shmode
diff --git a/contrib/dialog/samples/report-string b/contrib/dialog/samples/report-string
index dc96c2f..a674517 100644
--- a/contrib/dialog/samples/report-string
+++ b/contrib/dialog/samples/report-string
@@ -1,5 +1,4 @@
-#!/bin/sh
-# $Id: report-string,v 1.3 2012/06/29 09:32:17 tom Exp $
+# $Id: report-string,v 1.2 2010/01/13 10:00:11 tom Exp $
# Report result passed in a string $RESULT
# vile:shmode
diff --git a/contrib/dialog/samples/report-tempfile b/contrib/dialog/samples/report-tempfile
index 32c04e0..5a88d44 100644
--- a/contrib/dialog/samples/report-tempfile
+++ b/contrib/dialog/samples/report-tempfile
@@ -1,5 +1,4 @@
-#!/bin/sh
-# $Id: report-tempfile,v 1.4 2012/06/29 09:29:47 tom Exp $
+# $Id: report-tempfile,v 1.3 2010/01/13 09:59:05 tom Exp $
# Report results in a temporary-file.
# vile:shmode
diff --git a/contrib/dialog/samples/report-yesno b/contrib/dialog/samples/report-yesno
index d22ebe4..81da89b 100644
--- a/contrib/dialog/samples/report-yesno
+++ b/contrib/dialog/samples/report-yesno
@@ -1,5 +1,4 @@
-#!/bin/sh
-# $Id: report-yesno,v 1.2 2012/06/29 09:32:12 tom Exp $
+# $Id: report-yesno,v 1.1 2010/01/13 10:40:14 tom Exp $
# Report button-only, no $RESULT
# vile:shmode
diff --git a/contrib/dialog/samples/setup-edit b/contrib/dialog/samples/setup-edit
index 8f9d284..df86297 100644
--- a/contrib/dialog/samples/setup-edit
+++ b/contrib/dialog/samples/setup-edit
@@ -1,7 +1,6 @@
-#!/bin/sh
-# $Id: setup-edit,v 1.2 2012/06/29 09:31:49 tom Exp $
+# $Id: setup-edit,v 1.1 2010/01/13 01:56:07 tom Exp $
# vile:shmode
input=`tempfile 2>/dev/null` || input=/tmp/input$$
output=`tempfile 2>/dev/null` || output=/tmp/test$$
-trap "rm -f $input $output" $SIG_NONE $SIG_HUP $SIG_INT $SIG_TRAP $SIG_TERM
+trap "rm -f $input $output" 0 1 2 5 15
diff --git a/contrib/dialog/samples/setup-tempfile b/contrib/dialog/samples/setup-tempfile
index 3a67ea6..6db551f 100644
--- a/contrib/dialog/samples/setup-tempfile
+++ b/contrib/dialog/samples/setup-tempfile
@@ -1,6 +1,5 @@
-#!/bin/sh
-# $Id: setup-tempfile,v 1.3 2012/07/06 17:51:56 tom Exp $
+# $Id: setup-tempfile,v 1.1 2010/01/13 01:41:02 tom Exp $
# vile:shmode
-tempfile=`(tempfile) 2>/dev/null` || tempfile=/tmp/test$$
-trap "rm -f $tempfile" 0 $SIG_NONE $SIG_HUP $SIG_INT $SIG_TRAP $SIG_TERM
+tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$
+trap "rm -f $tempfile" 0 1 2 5 15
diff --git a/contrib/dialog/samples/setup-utf8 b/contrib/dialog/samples/setup-utf8
index 07cff39..2fd70d4 100644
--- a/contrib/dialog/samples/setup-utf8
+++ b/contrib/dialog/samples/setup-utf8
@@ -1,5 +1,4 @@
-#!/bin/sh
-# $Id: setup-utf8,v 1.2 2012/06/29 09:50:32 tom Exp $
+# $Id: setup-utf8,v 1.1 2010/01/13 01:51:44 tom Exp $
# vile:shmode
case none"$LANG$LC_ALL$LC_CTYPE" in
diff --git a/contrib/dialog/samples/setup-vars b/contrib/dialog/samples/setup-vars
index f0ea779..ae5e725 100644
--- a/contrib/dialog/samples/setup-vars
+++ b/contrib/dialog/samples/setup-vars
@@ -1,5 +1,4 @@
-#!/bin/sh
-# $Id: setup-vars,v 1.3 2012/06/29 09:52:26 tom Exp $
+# $Id: setup-vars,v 1.2 2011/01/04 00:21:43 tom Exp $
# vile:shmode
# These symbols are defined to use in the sample shell scripts to make them
@@ -14,10 +13,3 @@
: ${DIALOG_EXTRA=3}
: ${DIALOG_ITEM_HELP=4}
: ${DIALOG_ESC=255}
-
-: ${SIG_NONE=0}
-: ${SIG_HUP=1}
-: ${SIG_INT=2}
-: ${SIG_QUIT=3}
-: ${SIG_KILL=9}
-: ${SIG_TERM=15}
diff --git a/contrib/dialog/samples/slackware.rc b/contrib/dialog/samples/slackware.rc
index f12d27b..967147e 100644
--- a/contrib/dialog/samples/slackware.rc
+++ b/contrib/dialog/samples/slackware.rc
@@ -1,4 +1,4 @@
-# $Id: slackware.rc,v 1.9 2011/10/15 01:00:25 tom Exp $
+# $Id: slackware.rc,v 1.7 2011/01/17 00:14:41 tom Exp $
# vile:confmode
# Run-time configuration file for dialog, matches Slackware color scheme.
#
@@ -46,16 +46,16 @@ border_color = (CYAN,CYAN,ON)
button_active_color = (WHITE,BLUE,ON)
# Inactive button color
-button_inactive_color = dialog_color
+button_inactive_color = (BLACK,CYAN,OFF)
# Active button key color
-button_key_active_color = button_active_color
+button_key_active_color = (WHITE,BLUE,ON)
# Inactive button key color
button_key_inactive_color = (RED,CYAN,OFF)
# Active button label color
-button_label_active_color = button_active_color
+button_label_active_color = (WHITE,BLUE,ON)
# Inactive button label color
button_label_inactive_color = (BLACK,CYAN,ON)
@@ -64,46 +64,47 @@ button_label_inactive_color = (BLACK,CYAN,ON)
inputbox_color = (BLUE,WHITE,OFF)
# Input box border color
-inputbox_border_color = border_color
+inputbox_border_color = (CYAN,CYAN,ON)
# Search box color
searchbox_color = (YELLOW,WHITE,ON)
# Search box title color
+# FIXME
searchbox_title_color = (WHITE,WHITE,ON)
# Search box border color
searchbox_border_color = (RED,WHITE,OFF)
# File position indicator color
-position_indicator_color = button_key_inactive_color
+position_indicator_color = (RED,CYAN,OFF)
# Menu box color
-menubox_color = dialog_color
+menubox_color = (BLACK,CYAN,OFF)
# Menu box border color
-menubox_border_color = border_color
+menubox_border_color = (CYAN,CYAN,ON)
# Item color
-item_color = dialog_color
+item_color = (BLACK,CYAN,OFF)
# Selected item color
-item_selected_color = screen_color
+item_selected_color = (WHITE,BLUE,OFF)
# Tag color
-tag_color = title_color
+tag_color = (YELLOW,CYAN,ON)
# Selected tag color
-tag_selected_color = screen_color
+tag_selected_color = (WHITE,BLUE,OFF)
# Tag key color
-tag_key_color = button_key_inactive_color
+tag_key_color = (RED,CYAN,OFF)
# Selected tag key color
tag_key_selected_color = (RED,BLUE,ON)
# Check box color
-check_color = dialog_color
+check_color = (BLACK,CYAN,OFF)
# Selected check box color
check_selected_color = (WHITE,CYAN,ON)
@@ -112,13 +113,13 @@ check_selected_color = (WHITE,CYAN,ON)
uarrow_color = (GREEN,CYAN,ON)
# Down arrow color
-darrow_color = uarrow_color
+darrow_color = (GREEN,CYAN,ON)
# Item help-text color
-itemhelp_color = shadow_color
+itemhelp_color = (WHITE,BLACK,OFF)
# Active form text color
-form_active_text_color = inputbox_color
+form_active_text_color = (BLUE,WHITE,OFF)
# Form text color
form_text_color = (CYAN,BLUE,ON)
@@ -128,15 +129,3 @@ form_item_readonly_color = (CYAN,WHITE,ON)
# Dialog box gauge color
gauge_color = (BLUE,WHITE,ON)
-
-# Dialog box border2 color
-border2_color = (BLACK,WHITE,OFF)
-
-# Input box border2 color
-inputbox_border2_color = border2_color
-
-# Search box border2 color
-searchbox_border2_color = border2_color
-
-# Menu box border2 color
-menubox_border2_color = border2_color
diff --git a/contrib/dialog/samples/sourcemage.rc b/contrib/dialog/samples/sourcemage.rc
index 9384798..1ba826f 100644
--- a/contrib/dialog/samples/sourcemage.rc
+++ b/contrib/dialog/samples/sourcemage.rc
@@ -1,4 +1,4 @@
-# $Id: sourcemage.rc,v 1.6 2011/10/15 01:00:41 tom Exp $
+# $Id: sourcemage.rc,v 1.4 2011/01/17 00:14:25 tom Exp $
# vile:confmode
# Run-time configuration file for dialog, matches SourceMage color scheme.
#
@@ -46,10 +46,10 @@ border_color = (WHITE,WHITE,ON)
button_active_color = (WHITE,RED,ON)
# Inactive button color
-button_inactive_color = dialog_color
+button_inactive_color = (BLACK,WHITE,OFF)
# Active button key color
-button_key_active_color = button_active_color
+button_key_active_color = (WHITE,RED,ON)
# Inactive button key color
button_key_inactive_color = (RED,WHITE,OFF)
@@ -61,82 +61,70 @@ button_label_active_color = (RED,RED,ON)
button_label_inactive_color = (BLACK,WHITE,ON)
# Input box color
-inputbox_color = dialog_color
+inputbox_color = (BLACK,WHITE,OFF)
# Input box border color
-inputbox_border_color = dialog_color
+inputbox_border_color = (BLACK,WHITE,OFF)
# Search box color
-searchbox_color = dialog_color
+searchbox_color = (BLACK,WHITE,OFF)
# Search box title color
-searchbox_title_color = title_color
+searchbox_title_color = (RED,WHITE,ON)
# Search box border color
-searchbox_border_color = border_color
+searchbox_border_color = (WHITE,WHITE,ON)
# File position indicator color
-position_indicator_color = title_color
+position_indicator_color = (RED,WHITE,ON)
# Menu box color
-menubox_color = dialog_color
+menubox_color = (BLACK,WHITE,OFF)
# Menu box border color
-menubox_border_color = border_color
+menubox_border_color = (WHITE,WHITE,ON)
# Item color
-item_color = dialog_color
+item_color = (BLACK,WHITE,OFF)
# Selected item color
-item_selected_color = button_active_color
+item_selected_color = (WHITE,RED,ON)
# Tag color
-tag_color = title_color
+tag_color = (RED,WHITE,ON)
# Selected tag color
-tag_selected_color = button_label_active_color
+tag_selected_color = (RED,RED,ON)
# Tag key color
-tag_key_color = title_color
+tag_key_color = (RED,WHITE,ON)
# Selected tag key color
-tag_key_selected_color = button_active_color
+tag_key_selected_color = (WHITE,RED,ON)
# Check box color
-check_color = dialog_color
+check_color = (BLACK,WHITE,OFF)
# Selected check box color
-check_selected_color = button_active_color
+check_selected_color = (WHITE,RED,ON)
# Up arrow color
-uarrow_color = title_color
+uarrow_color = (RED,WHITE,ON)
# Down arrow color
-darrow_color = title_color
+darrow_color = (RED,WHITE,ON)
# Item help-text color
itemhelp_color = (WHITE,BLACK,OFF)
# Active form text color
-form_active_text_color = dialog_color
+form_active_text_color = (BLACK,WHITE,OFF)
# Form text color
-form_text_color = screen_color
+form_text_color = (RED,BLACK,ON)
# Readonly form item color
form_item_readonly_color = (CYAN,WHITE,ON)
# Dialog box gauge color
gauge_color = (BLUE,WHITE,ON)
-
-# Dialog box border2 color
-border2_color = dialog_color
-
-# Input box border2 color
-inputbox_border2_color = dialog_color
-
-# Search box border2 color
-searchbox_border2_color = dialog_color
-
-# Menu box border2 color
-menubox_border2_color = dialog_color
diff --git a/contrib/dialog/samples/suse.rc b/contrib/dialog/samples/suse.rc
index c8ff099..f2417b2 100644
--- a/contrib/dialog/samples/suse.rc
+++ b/contrib/dialog/samples/suse.rc
@@ -1,4 +1,4 @@
-# $Id: suse.rc,v 1.5 2011/10/15 01:01:00 tom Exp $
+# $Id: suse.rc,v 1.3 2011/01/17 00:15:27 tom Exp $
# vile:confmode
# Run-time configuration file for dialog, matches SuSE color scheme.
#
@@ -46,10 +46,10 @@ border_color = (WHITE,WHITE,ON)
button_active_color = (WHITE,BLUE,ON)
# Inactive button color
-button_inactive_color = dialog_color
+button_inactive_color = (BLACK,WHITE,OFF)
# Active button key color
-button_key_active_color = button_active_color
+button_key_active_color = (WHITE,BLUE,ON)
# Inactive button key color
button_key_inactive_color = (RED,WHITE,OFF)
@@ -61,64 +61,64 @@ button_label_active_color = (YELLOW,BLUE,ON)
button_label_inactive_color = (BLACK,WHITE,ON)
# Input box color
-inputbox_color = dialog_color
+inputbox_color = (BLACK,WHITE,OFF)
# Input box border color
-inputbox_border_color = dialog_color
+inputbox_border_color = (BLACK,WHITE,OFF)
# Search box color
-searchbox_color = dialog_color
+searchbox_color = (BLACK,WHITE,OFF)
# Search box title color
-searchbox_title_color = title_color
+searchbox_title_color = (YELLOW,WHITE,ON)
# Search box border color
-searchbox_border_color = border_color
+searchbox_border_color = (WHITE,WHITE,ON)
# File position indicator color
-position_indicator_color = title_color
+position_indicator_color = (YELLOW,WHITE,ON)
# Menu box color
-menubox_color = dialog_color
+menubox_color = (BLACK,WHITE,OFF)
# Menu box border color
-menubox_border_color = border_color
+menubox_border_color = (WHITE,WHITE,ON)
# Item color
-item_color = dialog_color
+item_color = (BLACK,WHITE,OFF)
# Selected item color
-item_selected_color = button_active_color
+item_selected_color = (WHITE,BLUE,ON)
# Tag color
-tag_color = title_color
+tag_color = (YELLOW,WHITE,ON)
# Selected tag color
-tag_selected_color = button_label_active_color
+tag_selected_color = (YELLOW,BLUE,ON)
# Tag key color
-tag_key_color = button_key_inactive_color
+tag_key_color = (RED,WHITE,OFF)
# Selected tag key color
tag_key_selected_color = (RED,BLUE,ON)
# Check box color
-check_color = dialog_color
+check_color = (BLACK,WHITE,OFF)
# Selected check box color
-check_selected_color = button_active_color
+check_selected_color = (WHITE,BLUE,ON)
# Up arrow color
uarrow_color = (GREEN,WHITE,ON)
# Down arrow color
-darrow_color = uarrow_color
+darrow_color = (GREEN,WHITE,ON)
# Item help-text color
itemhelp_color = (WHITE,BLACK,OFF)
# Active form text color
-form_active_text_color = button_active_color
+form_active_text_color = (WHITE,BLUE,ON)
# Form text color
form_text_color = (WHITE,CYAN,ON)
@@ -128,15 +128,3 @@ form_item_readonly_color = (CYAN,WHITE,ON)
# Dialog box gauge color
gauge_color = (BLUE,WHITE,ON)
-
-# Dialog box border2 color
-border2_color = dialog_color
-
-# Input box border2 color
-inputbox_border2_color = dialog_color
-
-# Search box border2 color
-searchbox_border2_color = dialog_color
-
-# Menu box border2 color
-menubox_border2_color = dialog_color
diff --git a/contrib/dialog/samples/tailboxbg b/contrib/dialog/samples/tailboxbg
index bcc3434..957d774 100755
--- a/contrib/dialog/samples/tailboxbg
+++ b/contrib/dialog/samples/tailboxbg
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: tailboxbg,v 1.10 2012/06/29 09:48:28 tom Exp $
+# $Id: tailboxbg,v 1.9 2010/01/13 10:20:03 tom Exp $
. ./setup-vars
@@ -16,7 +16,7 @@ $DIALOG --title "TAIL BOX" \
sleep 10
# now kill it
-kill -$SIG_QUIT `cat $tempfile` 2>&1 >/dev/null 2>/dev/null
+kill -3 `cat $tempfile` 2>&1 >/dev/null 2>/dev/null
# ...and the process that is making the listing
./killall listing
diff --git a/contrib/dialog/samples/tailboxbg1 b/contrib/dialog/samples/tailboxbg1
index f04567a..2955ad0 100755
--- a/contrib/dialog/samples/tailboxbg1
+++ b/contrib/dialog/samples/tailboxbg1
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: tailboxbg1,v 1.10 2012/06/29 09:51:46 tom Exp $
+# $Id: tailboxbg1,v 1.9 2010/01/13 10:20:03 tom Exp $
. ./setup-vars
@@ -24,7 +24,7 @@ if test -n "$pid" ; then
sleep 10
# now kill it
-kill -$SIG_QUIT $pid 2>&1 >/dev/null 2>/dev/null
+kill -3 $pid 2>&1 >/dev/null 2>/dev/null
echo "killed [$pid]"
fi
diff --git a/contrib/dialog/samples/tailboxbg2 b/contrib/dialog/samples/tailboxbg2
index 628cb05..0617708 100755
--- a/contrib/dialog/samples/tailboxbg2
+++ b/contrib/dialog/samples/tailboxbg2
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: tailboxbg2,v 1.10 2012/06/29 09:51:11 tom Exp $
+# $Id: tailboxbg2,v 1.9 2010/01/13 10:20:03 tom Exp $
. ./setup-vars
@@ -25,7 +25,7 @@ if test -n "$pid" ; then
sleep 10
# now kill it
-kill -$SIG_QUIT $pid 2>&1 >/dev/null 2>/dev/null
+kill -3 $pid 2>&1 >/dev/null 2>/dev/null
echo "killed [$pid]"
fi
diff --git a/contrib/dialog/samples/testdata-8bit b/contrib/dialog/samples/testdata-8bit
index f09021d..7810f9e 100755
--- a/contrib/dialog/samples/testdata-8bit
+++ b/contrib/dialog/samples/testdata-8bit
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: testdata-8bit,v 1.2 2011/10/16 23:26:32 tom Exp $
+# $Id: testdata-8bit,v 1.1 2004/12/19 16:19:12 tom Exp $
# Select one of the "SAMPLE=" lines, to test handling of characters which
# are nonprinting in a POSIX locale:
@@ -37,12 +37,3 @@ case .$1 in
SAMPLE=" "
;;
esac
-
-# This script is source'd from other scripts, and uses the parameter list from
-# those explicitly. But they may use the parameter list later, to set options
-# specially for dialog. Work around the conflicting uses by removing the
-# parameter which we just used to select a set of data.
-if test $# != 0
-then
- shift 1
-fi
diff --git a/contrib/dialog/samples/valgrind.log b/contrib/dialog/samples/valgrind.log
new file mode 100644
index 0000000..f33b862
--- /dev/null
+++ b/contrib/dialog/samples/valgrind.log
@@ -0,0 +1,847 @@
+==23273== Memcheck, a memory error detector.
+==23273== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
+==23273== Using LibVEX rev 1854, a library for dynamic binary translation.
+==23273== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
+==23273== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation framework.
+==23273== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
+==23273==
+--23273-- Command line
+--23273-- /usr/build/dialog/dialog-1.1-20110707/dialog
+--23273-- --title
+--23273-- YES/NO BOX
+--23273-- --clear
+--23273-- --yesno
+--23273-- Hi, this is a yes/no dialog box. You can use this to ask questions that have an answer of either yes or no. BTW, do you notice that long lines will be automatically wrapped around so that they can fit in the box? You can also control line breaking explicitly by inserting 'backslash n' at any place you like, but in this case, auto wrap around will be disabled and you will have to control line breaking yourself.
+--23273-- 15
+--23273-- 61
+--23273-- Startup, with flags:
+--23273-- --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp
+--23273-- -v
+--23273-- --num-callers=10
+--23273-- --error-limit=no
+--23273-- --show-reachable=yes
+--23273-- --leak-resolution=high
+--23273-- --leak-check=yes
+--23273-- --show-reachable=yes
+--23273-- --log-fd=2
+--23273-- Contents of /proc/version:
+--23273-- Linux version 2.6.26-2-686 (Debian 2.6.26-26lenny3) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Sat Jun 11 14:54:10 UTC 2011
+--23273-- Arch and hwcaps: X86, x86-sse1-sse2
+--23273-- Page sizes: currently 4096, max supported 4096
+--23273-- Valgrind library directory: /usr/lib/valgrind
+--23273-- Reading syms from /lib/ld-2.7.so (0x4000000)
+--23273-- Reading debug info from /lib/ld-2.7.so...
+--23273-- ... CRC mismatch (computed 0f4d8d49 wanted a869dbba)
+--23273-- Reading debug info from /usr/lib/debug/lib/ld-2.7.so...
+--23273-- Reading syms from /usr/build/dialog/dialog-1.1-20110707/dialog (0x8048000)
+--23273-- Reading syms from /usr/lib/valgrind/x86-linux/memcheck (0x38000000)
+--23273-- object doesn't have a dynamic symbol table
+--23273-- Reading suppressions file: /usr/lib/valgrind/debian-libc6-dbg.supp
+--23273-- Reading suppressions file: /usr/lib/valgrind/default.supp
+--23273-- REDIR: 0x4015500 (index) redirected to 0x3802cf43 (vgPlain_x86_linux_REDIR_FOR_index)
+--23273-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_core.so (0x401E000)
+--23273-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so (0x4020000)
+==23273== WARNING: new redirection conflicts with existing -- ignoring it
+--23273-- new: 0x04015500 (index ) R-> 0x040241e0 index
+--23273-- REDIR: 0x40156f0 (strlen) redirected to 0x4024490 (strlen)
+--23273-- Reading syms from /usr/lib/debug/libm-2.7.so (0x4027000)
+--23273-- Reading syms from /usr/lib/debug/libc-2.7.so (0x404D000)
+--23273-- REDIR: 0x40beaf0 (rindex) redirected to 0x40240c0 (rindex)
+--23273-- REDIR: 0x40bf760 (memset) redirected to 0x4025380 (memset)
+--23273-- REDIR: 0x40be160 (strcmp) redirected to 0x4024770 (strcmp)
+--23273-- REDIR: 0x40be700 (strlen) redirected to 0x4024470 (strlen)
+--23273-- REDIR: 0x40be910 (strncmp) redirected to 0x40246e0 (strncmp)
+--23273-- REDIR: 0x40bdff0 (index) redirected to 0x40241b0 (index)
+--23273-- REDIR: 0x40b9740 (free) redirected to 0x4022ad0 (free)
+--23273-- REDIR: 0x40bb2c0 (calloc) redirected to 0x4021d60 (calloc)
+--23273-- REDIR: 0x40c07e0 (strchrnul) redirected to 0x4025450 (strchrnul)
+--23273-- REDIR: 0x40bb5e0 (malloc) redirected to 0x4023cb0 (malloc)
+--23273-- REDIR: 0x40bfc80 (memcpy) redirected to 0x40248e0 (memcpy)
+--23273-- REDIR: 0x40be7b0 (strnlen) redirected to 0x4024430 (strnlen)
+--23273-- REDIR: 0x40bf7c0 (mempcpy) redirected to 0x40254b0 (mempcpy)
+--23273-- REDIR: 0x40be1f0 (strcpy) redirected to 0x40244d0 (strcpy)
+--23273-- REDIR: 0x40bba60 (realloc) redirected to 0x4023dc0 (realloc)
+--23273-- REDIR: 0x40bea20 (strncpy) redirected to 0x40245a0 (strncpy)
+--23273-- REDIR: 0x40bf690 (bcmp) redirected to 0x4025070 (bcmp)
+--23273-- REDIR: 0x40bde40 (strcat) redirected to 0x4024240 (strcat)
+==23273==
+==23273== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 14 from 1)
+--23273--
+--23273-- supp: 14 dl-hack3-cond-1
+==23273== malloc/free: in use at exit: 72,482 bytes in 382 blocks.
+==23273== malloc/free: 419 allocs, 37 frees, 79,695 bytes allocated.
+==23273==
+==23273== searching for pointers to 382 not-freed blocks.
+==23273== checked 149,580 bytes.
+==23273==
+==23273== 6 bytes in 1 blocks are still reachable in loss record 1 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x8068E64: dlg_strclone (util.c:1740)
+==23273== by 0x805FE72: same_cache2 (inputstr.c:212)
+==23273== by 0x805FEE7: dlg_index_wchars (inputstr.c:342)
+==23273== by 0x8059BBE: print_button (buttons.c:97)
+==23273== by 0x805A265: dlg_draw_buttons (buttons.c:297)
+==23273== by 0x806A2D0: dialog_yesno (yesno.c:98)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273== by 0x804CC56: main (dialog.c:1679)
+==23273==
+==23273==
+==23273== 6 bytes in 1 blocks are still reachable in loss record 2 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x8068E64: dlg_strclone (util.c:1740)
+==23273== by 0x805FE72: same_cache2 (inputstr.c:212)
+==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
+==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273== by 0x805A1F3: dlg_draw_buttons (buttons.c:296)
+==23273== by 0x806A2D0: dialog_yesno (yesno.c:98)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273== by 0x804CC56: main (dialog.c:1679)
+==23273==
+==23273==
+==23273== 7 bytes in 2 blocks are still reachable in loss record 3 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x8068E64: dlg_strclone (util.c:1740)
+==23273== by 0x805FE72: same_cache2 (inputstr.c:212)
+==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
+==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273== by 0x8059E3A: dlg_button_sizes (buttons.c:179)
+==23273== by 0x8059F04: dlg_button_x_step (buttons.c:209)
+==23273== by 0x805A02F: dlg_button_layout (buttons.c:234)
+==23273== by 0x806A11F: dialog_yesno (yesno.c:71)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273==
+==23273==
+==23273== 11 bytes in 1 blocks are still reachable in loss record 4 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x8068E64: dlg_strclone (util.c:1740)
+==23273== by 0x805FE72: same_cache2 (inputstr.c:212)
+==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
+==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273== by 0x8067711: real_auto_size (util.c:1101)
+==23273== by 0x8067A1F: dlg_auto_size (util.c:1167)
+==23273== by 0x806A14E: dialog_yesno (yesno.c:72)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273== by 0x804CC56: main (dialog.c:1679)
+==23273==
+==23273==
+==23273== 12 bytes in 1 blocks are still reachable in loss record 5 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x807F18F: _nc_add_to_try (add_tries.c:90)
+==23273== by 0x80885C6: _nc_init_keytry (init_keytry.c:74)
+==23273== by 0x80807F4: _nc_keypad (lib_options.c:262)
+==23273== by 0x808035F: keypad (lib_options.c:129)
+==23273== by 0x8066340: init_dialog (util.c:330)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273==
+==23273== 16 bytes in 1 blocks are still reachable in loss record 6 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x41165D0: tsearch (tsearch.c:281)
+==23273== by 0x805FC92: make_cache (inputstr.c:149)
+==23273== by 0x805FCF7: load_cache (inputstr.c:161)
+==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
+==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273== by 0x8066FD3: dlg_print_scrolled (util.c:886)
+==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273== by 0x804CC56: main (dialog.c:1679)
+==23273==
+==23273==
+==23273== 16 bytes in 1 blocks are still reachable in loss record 7 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x41165D0: tsearch (tsearch.c:281)
+==23273== by 0x805FC92: make_cache (inputstr.c:149)
+==23273== by 0x805FCF7: load_cache (inputstr.c:161)
+==23273== by 0x805FECD: dlg_index_wchars (inputstr.c:341)
+==23273== by 0x8059BBE: print_button (buttons.c:97)
+==23273== by 0x805A265: dlg_draw_buttons (buttons.c:297)
+==23273== by 0x806A2D0: dialog_yesno (yesno.c:98)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273== by 0x804CC56: main (dialog.c:1679)
+==23273==
+==23273==
+==23273== 16 bytes in 1 blocks are still reachable in loss record 8 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x41165D0: tsearch (tsearch.c:281)
+==23273== by 0x805FC92: make_cache (inputstr.c:149)
+==23273== by 0x805FCF7: load_cache (inputstr.c:161)
+==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
+==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273== by 0x805A1F3: dlg_draw_buttons (buttons.c:296)
+==23273== by 0x806A2D0: dialog_yesno (yesno.c:98)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273== by 0x804CC56: main (dialog.c:1679)
+==23273==
+==23273==
+==23273== 16 bytes in 1 blocks are still reachable in loss record 9 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x41165D0: tsearch (tsearch.c:281)
+==23273== by 0x805FC92: make_cache (inputstr.c:149)
+==23273== by 0x805FCF7: load_cache (inputstr.c:161)
+==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
+==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273== by 0x8067711: real_auto_size (util.c:1101)
+==23273== by 0x8067A1F: dlg_auto_size (util.c:1167)
+==23273== by 0x806A14E: dialog_yesno (yesno.c:72)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273==
+==23273==
+==23273== 16 bytes in 1 blocks are still reachable in loss record 10 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x807F2D5: _nc_doalloc (doalloc.c:55)
+==23273== by 0x8086167: _nc_trace_alloc (trace_buf.c:55)
+==23273== by 0x8086261: _nc_trace_buf (trace_buf.c:90)
+==23273== by 0x80864A7: _nc_visbuf2n (visbuf.c:94)
+==23273== by 0x8086538: _nc_visbuf2 (visbuf.c:114)
+==23273== by 0x8086553: _nc_visbuf (visbuf.c:120)
+==23273== by 0x8088693: recur_tries (trace_tries.c:55)
+==23273== by 0x80886D7: recur_tries (trace_tries.c:59)
+==23273== by 0x80886D7: recur_tries (trace_tries.c:59)
+==23273==
+==23273==
+==23273== 21 bytes in 1 blocks are still reachable in loss record 11 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x40BE45F: strdup (strdup.c:43)
+==23273== by 0x8081EE0: setupterm (lib_setup.c:471)
+==23273== by 0x8072292: newterm (lib_newterm.c:115)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273== by 0x8066211: init_dialog (util.c:292)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273==
+==23273== 23 bytes in 1 blocks are still reachable in loss record 12 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x8088526: _nc_home_terminfo (home_terminfo.c:57)
+==23273== by 0x8085E1B: _nc_read_entry (read_entry.c:492)
+==23273== by 0x8081834: grab_entry (lib_setup.c:255)
+==23273== by 0x8081D46: setupterm (lib_setup.c:438)
+==23273== by 0x8072292: newterm (lib_newterm.c:115)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273== by 0x8066211: init_dialog (util.c:292)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273==
+==23273== 24 bytes in 1 blocks are still reachable in loss record 13 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x805FDE1: same_cache2 (inputstr.c:201)
+==23273== by 0x805FEE7: dlg_index_wchars (inputstr.c:342)
+==23273== by 0x8059BBE: print_button (buttons.c:97)
+==23273== by 0x805A265: dlg_draw_buttons (buttons.c:297)
+==23273== by 0x806A2D0: dialog_yesno (yesno.c:98)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273== by 0x804CC56: main (dialog.c:1679)
+==23273==
+==23273==
+==23273== 24 bytes in 1 blocks are still reachable in loss record 14 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x805FDE1: same_cache2 (inputstr.c:201)
+==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
+==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273== by 0x805A1F3: dlg_draw_buttons (buttons.c:296)
+==23273== by 0x806A2D0: dialog_yesno (yesno.c:98)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273== by 0x804CC56: main (dialog.c:1679)
+==23273==
+==23273==
+==23273== 28 bytes in 1 blocks are still reachable in loss record 15 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x805FC0F: make_cache (inputstr.c:139)
+==23273== by 0x805FCF7: load_cache (inputstr.c:161)
+==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
+==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273== by 0x8066FD3: dlg_print_scrolled (util.c:886)
+==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273== by 0x804CC56: main (dialog.c:1679)
+==23273==
+==23273==
+==23273== 28 bytes in 1 blocks are still reachable in loss record 16 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x805FC0F: make_cache (inputstr.c:139)
+==23273== by 0x805FCF7: load_cache (inputstr.c:161)
+==23273== by 0x805FECD: dlg_index_wchars (inputstr.c:341)
+==23273== by 0x8059BBE: print_button (buttons.c:97)
+==23273== by 0x805A265: dlg_draw_buttons (buttons.c:297)
+==23273== by 0x806A2D0: dialog_yesno (yesno.c:98)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273== by 0x804CC56: main (dialog.c:1679)
+==23273==
+==23273==
+==23273== 28 bytes in 1 blocks are still reachable in loss record 17 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x805FC0F: make_cache (inputstr.c:139)
+==23273== by 0x805FCF7: load_cache (inputstr.c:161)
+==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
+==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273== by 0x805A1F3: dlg_draw_buttons (buttons.c:296)
+==23273== by 0x806A2D0: dialog_yesno (yesno.c:98)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273== by 0x804CC56: main (dialog.c:1679)
+==23273==
+==23273==
+==23273== 28 bytes in 1 blocks are still reachable in loss record 18 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x805FC0F: make_cache (inputstr.c:139)
+==23273== by 0x805FCF7: load_cache (inputstr.c:161)
+==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
+==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273== by 0x8067711: real_auto_size (util.c:1101)
+==23273== by 0x8067A1F: dlg_auto_size (util.c:1167)
+==23273== by 0x806A14E: dialog_yesno (yesno.c:72)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273== by 0x804CC56: main (dialog.c:1679)
+==23273==
+==23273==
+==23273== 28 bytes in 2 blocks are still reachable in loss record 19 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x805FDE1: same_cache2 (inputstr.c:201)
+==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
+==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273== by 0x8059E3A: dlg_button_sizes (buttons.c:179)
+==23273== by 0x8059F04: dlg_button_x_step (buttons.c:209)
+==23273== by 0x805A02F: dlg_button_layout (buttons.c:234)
+==23273== by 0x806A11F: dialog_yesno (yesno.c:71)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273== by 0x804CC56: main (dialog.c:1679)
+==23273==
+==23273==
+==23273== 32 bytes in 2 blocks are still reachable in loss record 20 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x41165D0: tsearch (tsearch.c:281)
+==23273== by 0x805FC92: make_cache (inputstr.c:149)
+==23273== by 0x805FCF7: load_cache (inputstr.c:161)
+==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
+==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273== by 0x8059E3A: dlg_button_sizes (buttons.c:179)
+==23273== by 0x8059F04: dlg_button_x_step (buttons.c:209)
+==23273== by 0x805A02F: dlg_button_layout (buttons.c:234)
+==23273== by 0x806A11F: dialog_yesno (yesno.c:71)
+==23273==
+==23273==
+==23273== 33 bytes in 1 blocks are still reachable in loss record 21 of 62
+==23273== at 0x4023E8C: realloc (vg_replace_malloc.c:429)
+==23273== by 0x807F2A9: _nc_doalloc (doalloc.c:50)
+==23273== by 0x808620A: _nc_trace_alloc (trace_buf.c:63)
+==23273== by 0x8086261: _nc_trace_buf (trace_buf.c:90)
+==23273== by 0x80864A7: _nc_visbuf2n (visbuf.c:94)
+==23273== by 0x8086538: _nc_visbuf2 (visbuf.c:114)
+==23273== by 0x8086553: _nc_visbuf (visbuf.c:120)
+==23273== by 0x8088693: recur_tries (trace_tries.c:55)
+==23273== by 0x80886D7: recur_tries (trace_tries.c:59)
+==23273== by 0x80886D7: recur_tries (trace_tries.c:59)
+==23273==
+==23273==
+==23273== 44 bytes in 1 blocks are still reachable in loss record 22 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x805FDE1: same_cache2 (inputstr.c:201)
+==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
+==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273== by 0x8067711: real_auto_size (util.c:1101)
+==23273== by 0x8067A1F: dlg_auto_size (util.c:1167)
+==23273== by 0x806A14E: dialog_yesno (yesno.c:72)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273== by 0x804CC56: main (dialog.c:1679)
+==23273==
+==23273==
+==23273== 47 bytes in 1 blocks are still reachable in loss record 23 of 62
+==23273== at 0x4023E8C: realloc (vg_replace_malloc.c:429)
+==23273== by 0x807F2A9: _nc_doalloc (doalloc.c:50)
+==23273== by 0x8085368: read_termtype (read_entry.c:283)
+==23273== by 0x8085B64: _nc_read_file_entry (read_entry.c:392)
+==23273== by 0x8085BF5: _nc_read_tic_entry (read_entry.c:413)
+==23273== by 0x8085C8A: _nc_read_terminfo_dirs (read_entry.c:438)
+==23273== by 0x8085E90: _nc_read_entry (read_entry.c:500)
+==23273== by 0x8081834: grab_entry (lib_setup.c:255)
+==23273== by 0x8081D46: setupterm (lib_setup.c:438)
+==23273== by 0x8072292: newterm (lib_newterm.c:115)
+==23273==
+==23273==
+==23273== 55 bytes in 1 blocks are still reachable in loss record 24 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x8084EC3: read_termtype (read_entry.c:207)
+==23273== by 0x8085B64: _nc_read_file_entry (read_entry.c:392)
+==23273== by 0x8085BF5: _nc_read_tic_entry (read_entry.c:413)
+==23273== by 0x8085C8A: _nc_read_terminfo_dirs (read_entry.c:438)
+==23273== by 0x8085E90: _nc_read_entry (read_entry.c:500)
+==23273== by 0x8081834: grab_entry (lib_setup.c:255)
+==23273== by 0x8081D46: setupterm (lib_setup.c:438)
+==23273== by 0x8072292: newterm (lib_newterm.c:115)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273==
+==23273==
+==23273== 56 bytes in 2 blocks are still reachable in loss record 25 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x805FC0F: make_cache (inputstr.c:139)
+==23273== by 0x805FCF7: load_cache (inputstr.c:161)
+==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
+==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273== by 0x8059E3A: dlg_button_sizes (buttons.c:179)
+==23273== by 0x8059F04: dlg_button_x_step (buttons.c:209)
+==23273== by 0x805A02F: dlg_button_layout (buttons.c:234)
+==23273== by 0x806A11F: dialog_yesno (yesno.c:71)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273==
+==23273==
+==23273== 66 bytes in 1 blocks are still reachable in loss record 26 of 62
+==23273== at 0x4023E8C: realloc (vg_replace_malloc.c:429)
+==23273== by 0x807F2A9: _nc_doalloc (doalloc.c:50)
+==23273== by 0x808238C: get_space (lib_tparm.c:155)
+==23273== by 0x8082443: save_number (lib_tparm.c:180)
+==23273== by 0x8082D8B: tparam_internal (lib_tparm.c:564)
+==23273== by 0x80833C4: tparm (lib_tparm.c:788)
+==23273== by 0x80704CF: _nc_mvcur_init (lib_mvcur.c:358)
+==23273== by 0x8072684: newterm (lib_newterm.c:191)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273== by 0x8066211: init_dialog (util.c:292)
+==23273==
+==23273==
+==23273== 80 bytes in 1 blocks are still reachable in loss record 27 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x8072E08: _nc_makenew (lib_newwin.c:218)
+==23273== by 0x807299B: newwin (lib_newwin.c:126)
+==23273== by 0x8074F9A: _nc_setupscreen (lib_set_term.c:459)
+==23273== by 0x80723F1: newterm (lib_newterm.c:146)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273== by 0x8066211: init_dialog (util.c:292)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273==
+==23273== 80 bytes in 1 blocks are still reachable in loss record 28 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x8072E08: _nc_makenew (lib_newwin.c:218)
+==23273== by 0x807299B: newwin (lib_newwin.c:126)
+==23273== by 0x8074CB3: _nc_setupscreen (lib_set_term.c:414)
+==23273== by 0x80723F1: newterm (lib_newterm.c:146)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273== by 0x8066211: init_dialog (util.c:292)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273==
+==23273== 80 bytes in 1 blocks are still reachable in loss record 29 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x8072E08: _nc_makenew (lib_newwin.c:218)
+==23273== by 0x807299B: newwin (lib_newwin.c:126)
+==23273== by 0x8074C55: _nc_setupscreen (lib_set_term.c:410)
+==23273== by 0x80723F1: newterm (lib_newterm.c:146)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273== by 0x8066211: init_dialog (util.c:292)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273==
+==23273== 80 bytes in 1 blocks are still reachable in loss record 30 of 62
+==23273== at 0x4023E8C: realloc (vg_replace_malloc.c:429)
+==23273== by 0x807F2A9: _nc_doalloc (doalloc.c:50)
+==23273== by 0x808538F: read_termtype (read_entry.c:284)
+==23273== by 0x8085B64: _nc_read_file_entry (read_entry.c:392)
+==23273== by 0x8085BF5: _nc_read_tic_entry (read_entry.c:413)
+==23273== by 0x8085C8A: _nc_read_terminfo_dirs (read_entry.c:438)
+==23273== by 0x8085E90: _nc_read_entry (read_entry.c:500)
+==23273== by 0x8081834: grab_entry (lib_setup.c:255)
+==23273== by 0x8081D46: setupterm (lib_setup.c:438)
+==23273== by 0x8072292: newterm (lib_newterm.c:115)
+==23273==
+==23273==
+==23273== 112 bytes in 7 blocks are still reachable in loss record 31 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x41165D0: tsearch (tsearch.c:281)
+==23273== by 0x805FC92: make_cache (inputstr.c:149)
+==23273== by 0x805FCF7: load_cache (inputstr.c:161)
+==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
+==23273== by 0x8066A0A: dlg_print_line (util.c:668)
+==23273== by 0x8066E40: justify_text (util.c:813)
+==23273== by 0x8066F5E: dlg_print_autowrap (util.c:843)
+==23273== by 0x806703E: dlg_print_scrolled (util.c:892)
+==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
+==23273==
+==23273==
+==23273== 118 bytes in 1 blocks are still reachable in loss record 32 of 62
+==23273== at 0x4023E8C: realloc (vg_replace_malloc.c:429)
+==23273== by 0x807F2A9: _nc_doalloc (doalloc.c:50)
+==23273== by 0x8082957: _nc_tparm_analyze (lib_tparm.c:374)
+==23273== by 0x8082B5E: tparam_internal (lib_tparm.c:502)
+==23273== by 0x80833C4: tparm (lib_tparm.c:788)
+==23273== by 0x80782E6: vidputs (lib_vidattr.c:187)
+==23273== by 0x8078B59: vidattr (lib_vidattr.c:270)
+==23273== by 0x807ACE8: ClrToEOS (tty_update.c:957)
+==23273== by 0x807AF54: ClrBottom (tty_update.c:1006)
+==23273== by 0x807AB1C: ClrUpdate (tty_update.c:897)
+==23273==
+==23273==
+==23273== 128 bytes in 8 blocks are still reachable in loss record 33 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x41165D0: tsearch (tsearch.c:281)
+==23273== by 0x805FC92: make_cache (inputstr.c:149)
+==23273== by 0x805FCF7: load_cache (inputstr.c:161)
+==23273== by 0x805FECD: dlg_index_wchars (inputstr.c:341)
+==23273== by 0x8066A18: dlg_print_line (util.c:669)
+==23273== by 0x8066E40: justify_text (util.c:813)
+==23273== by 0x8066F5E: dlg_print_autowrap (util.c:843)
+==23273== by 0x806703E: dlg_print_scrolled (util.c:892)
+==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
+==23273==
+==23273==
+==23273== 128 bytes in 1 blocks are still reachable in loss record 34 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x806BDE0: start_color (lib_color.c:238)
+==23273== by 0x80663B1: dlg_color_setup (util.c:360)
+==23273== by 0x806638E: init_dialog (util.c:342)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273==
+==23273== 128 bytes in 1 blocks are still reachable in loss record 35 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x806BDA7: start_color (lib_color.c:236)
+==23273== by 0x80663B1: dlg_color_setup (util.c:360)
+==23273== by 0x806638E: init_dialog (util.c:342)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273==
+==23273== 160 bytes in 1 blocks are still reachable in loss record 36 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x8087176: _nc_hash_map (hashmap.c:299)
+==23273== by 0x80865F4: _nc_scroll_optimize (hardscroll.c:199)
+==23273== by 0x807A762: doupdate (tty_update.c:778)
+==23273== by 0x8073C0A: wrefresh (lib_refresh.c:58)
+==23273== by 0x806D95D: _nc_wgetch (lib_getch.c:295)
+==23273== by 0x806DD0D: wgetch (lib_getch.c:467)
+==23273== by 0x80654FC: really_getch (ui_getc.c:352)
+==23273== by 0x806566B: dlg_getc (ui_getc.c:423)
+==23273== by 0x80627C4: mouse_wgetch (mousewget.c:35)
+==23273==
+==23273==
+==23273== 160 bytes in 1 blocks are still reachable in loss record 37 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x8087141: _nc_hash_map (hashmap.c:297)
+==23273== by 0x80865F4: _nc_scroll_optimize (hardscroll.c:199)
+==23273== by 0x807A762: doupdate (tty_update.c:778)
+==23273== by 0x8073C0A: wrefresh (lib_refresh.c:58)
+==23273== by 0x806D95D: _nc_wgetch (lib_getch.c:295)
+==23273== by 0x806DD0D: wgetch (lib_getch.c:467)
+==23273== by 0x80654FC: really_getch (ui_getc.c:352)
+==23273== by 0x806566B: dlg_getc (ui_getc.c:423)
+==23273== by 0x80627C4: mouse_wgetch (mousewget.c:35)
+==23273==
+==23273==
+==23273== 160 bytes in 1 blocks are still reachable in loss record 38 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x807F2D5: _nc_doalloc (doalloc.c:55)
+==23273== by 0x80865CB: _nc_scroll_optimize (hardscroll.c:192)
+==23273== by 0x807A762: doupdate (tty_update.c:778)
+==23273== by 0x8073C0A: wrefresh (lib_refresh.c:58)
+==23273== by 0x806D95D: _nc_wgetch (lib_getch.c:295)
+==23273== by 0x806DD0D: wgetch (lib_getch.c:467)
+==23273== by 0x80654FC: really_getch (ui_getc.c:352)
+==23273== by 0x806566B: dlg_getc (ui_getc.c:423)
+==23273== by 0x80627C4: mouse_wgetch (mousewget.c:35)
+==23273==
+==23273==
+==23273== 172 bytes in 1 blocks are still reachable in loss record 39 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x8081CD7: setupterm (lib_setup.c:431)
+==23273== by 0x8072292: newterm (lib_newterm.c:115)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273== by 0x8066211: init_dialog (util.c:292)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273==
+==23273== 196 bytes in 7 blocks are still reachable in loss record 40 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x805FC0F: make_cache (inputstr.c:139)
+==23273== by 0x805FCF7: load_cache (inputstr.c:161)
+==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
+==23273== by 0x8066A0A: dlg_print_line (util.c:668)
+==23273== by 0x8066E40: justify_text (util.c:813)
+==23273== by 0x8066F5E: dlg_print_autowrap (util.c:843)
+==23273== by 0x806703E: dlg_print_scrolled (util.c:892)
+==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273==
+==23273==
+==23273== 224 bytes in 8 blocks are still reachable in loss record 41 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x805FC0F: make_cache (inputstr.c:139)
+==23273== by 0x805FCF7: load_cache (inputstr.c:161)
+==23273== by 0x805FECD: dlg_index_wchars (inputstr.c:341)
+==23273== by 0x8066A18: dlg_print_line (util.c:669)
+==23273== by 0x8066E40: justify_text (util.c:813)
+==23273== by 0x8066F5E: dlg_print_autowrap (util.c:843)
+==23273== by 0x806703E: dlg_print_scrolled (util.c:892)
+==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273==
+==23273==
+==23273== 252 bytes in 1 blocks are still reachable in loss record 42 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x80858B3: read_termtype (read_entry.c:345)
+==23273== by 0x8085B64: _nc_read_file_entry (read_entry.c:392)
+==23273== by 0x8085BF5: _nc_read_tic_entry (read_entry.c:413)
+==23273== by 0x8085C8A: _nc_read_terminfo_dirs (read_entry.c:438)
+==23273== by 0x8085E90: _nc_read_entry (read_entry.c:500)
+==23273== by 0x8081834: grab_entry (lib_setup.c:255)
+==23273== by 0x8081D46: setupterm (lib_setup.c:438)
+==23273== by 0x8072292: newterm (lib_newterm.c:115)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273==
+==23273==
+==23273== 421 bytes in 1 blocks are still reachable in loss record 43 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x8068E64: dlg_strclone (util.c:1740)
+==23273== by 0x805FE72: same_cache2 (inputstr.c:212)
+==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
+==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273== by 0x8066FD3: dlg_print_scrolled (util.c:886)
+==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273== by 0x804CC56: main (dialog.c:1679)
+==23273==
+==23273==
+==23273== 480 bytes in 1 blocks are still reachable in loss record 44 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x8072E36: _nc_makenew (lib_newwin.c:223)
+==23273== by 0x807299B: newwin (lib_newwin.c:126)
+==23273== by 0x8074F9A: _nc_setupscreen (lib_set_term.c:459)
+==23273== by 0x80723F1: newterm (lib_newterm.c:146)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273== by 0x8066211: init_dialog (util.c:292)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273==
+==23273== 480 bytes in 1 blocks are still reachable in loss record 45 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x8072E36: _nc_makenew (lib_newwin.c:223)
+==23273== by 0x807299B: newwin (lib_newwin.c:126)
+==23273== by 0x8074CB3: _nc_setupscreen (lib_set_term.c:414)
+==23273== by 0x80723F1: newterm (lib_newterm.c:146)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273== by 0x8066211: init_dialog (util.c:292)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273==
+==23273== 480 bytes in 1 blocks are still reachable in loss record 46 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x8072E36: _nc_makenew (lib_newwin.c:223)
+==23273== by 0x807299B: newwin (lib_newwin.c:126)
+==23273== by 0x8074C55: _nc_setupscreen (lib_set_term.c:410)
+==23273== by 0x80723F1: newterm (lib_newterm.c:146)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273== by 0x8066211: init_dialog (util.c:292)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273==
+==23273== 689 bytes in 1 blocks are still reachable in loss record 47 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x8085659: read_termtype (read_entry.c:318)
+==23273== by 0x8085B64: _nc_read_file_entry (read_entry.c:392)
+==23273== by 0x8085BF5: _nc_read_tic_entry (read_entry.c:413)
+==23273== by 0x8085C8A: _nc_read_terminfo_dirs (read_entry.c:438)
+==23273== by 0x8085E90: _nc_read_entry (read_entry.c:500)
+==23273== by 0x8081834: grab_entry (lib_setup.c:255)
+==23273== by 0x8081D46: setupterm (lib_setup.c:438)
+==23273== by 0x8072292: newterm (lib_newterm.c:115)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273==
+==23273==
+==23273== 780 bytes in 65 blocks are still reachable in loss record 48 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x807F1FF: _nc_add_to_try (add_tries.c:104)
+==23273== by 0x80885C6: _nc_init_keytry (init_keytry.c:74)
+==23273== by 0x80807F4: _nc_keypad (lib_options.c:262)
+==23273== by 0x808035F: keypad (lib_options.c:129)
+==23273== by 0x8066340: init_dialog (util.c:330)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273==
+==23273== 1,008 bytes in 84 blocks are still reachable in loss record 49 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x807F119: _nc_add_to_try (add_tries.c:77)
+==23273== by 0x80885C6: _nc_init_keytry (init_keytry.c:74)
+==23273== by 0x80807F4: _nc_keypad (lib_options.c:262)
+==23273== by 0x808035F: keypad (lib_options.c:129)
+==23273== by 0x8066340: init_dialog (util.c:330)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273==
+==23273== 1,338 bytes in 1 blocks are still reachable in loss record 50 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x8084DF7: read_termtype (read_entry.c:193)
+==23273== by 0x8085B64: _nc_read_file_entry (read_entry.c:392)
+==23273== by 0x8085BF5: _nc_read_tic_entry (read_entry.c:413)
+==23273== by 0x8085C8A: _nc_read_terminfo_dirs (read_entry.c:438)
+==23273== by 0x8085E90: _nc_read_entry (read_entry.c:500)
+==23273== by 0x8081834: grab_entry (lib_setup.c:255)
+==23273== by 0x8081D46: setupterm (lib_setup.c:438)
+==23273== by 0x8072292: newterm (lib_newterm.c:115)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273==
+==23273==
+==23273== 1,382 bytes in 7 blocks are still reachable in loss record 51 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x8068E64: dlg_strclone (util.c:1740)
+==23273== by 0x805FE72: same_cache2 (inputstr.c:212)
+==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
+==23273== by 0x8066A0A: dlg_print_line (util.c:668)
+==23273== by 0x8066E40: justify_text (util.c:813)
+==23273== by 0x8066F5E: dlg_print_autowrap (util.c:843)
+==23273== by 0x806703E: dlg_print_scrolled (util.c:892)
+==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273==
+==23273==
+==23273== 1,520 bytes in 1 blocks are still reachable in loss record 52 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x80747CF: _nc_setupscreen (lib_set_term.c:221)
+==23273== by 0x80723F1: newterm (lib_newterm.c:146)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273== by 0x8066211: init_dialog (util.c:292)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273==
+==23273== 1,640 bytes in 1 blocks are still reachable in loss record 53 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x8087007: _nc_hash_map (hashmap.c:277)
+==23273== by 0x80865F4: _nc_scroll_optimize (hardscroll.c:199)
+==23273== by 0x807A762: doupdate (tty_update.c:778)
+==23273== by 0x8073C0A: wrefresh (lib_refresh.c:58)
+==23273== by 0x806D95D: _nc_wgetch (lib_getch.c:295)
+==23273== by 0x806DD0D: wgetch (lib_getch.c:467)
+==23273== by 0x80654FC: really_getch (ui_getc.c:352)
+==23273== by 0x806566B: dlg_getc (ui_getc.c:423)
+==23273== by 0x80627C4: mouse_wgetch (mousewget.c:35)
+==23273==
+==23273==
+==23273== 1,684 bytes in 1 blocks are still reachable in loss record 54 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x805FDE1: same_cache2 (inputstr.c:201)
+==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
+==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273== by 0x8066FD3: dlg_print_scrolled (util.c:886)
+==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273== by 0x804CC56: main (dialog.c:1679)
+==23273==
+==23273==
+==23273== 1,803 bytes in 8 blocks are still reachable in loss record 55 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x8068E64: dlg_strclone (util.c:1740)
+==23273== by 0x805FE72: same_cache2 (inputstr.c:212)
+==23273== by 0x805FEE7: dlg_index_wchars (inputstr.c:342)
+==23273== by 0x8066A18: dlg_print_line (util.c:669)
+==23273== by 0x8066E40: justify_text (util.c:813)
+==23273== by 0x8066F5E: dlg_print_autowrap (util.c:843)
+==23273== by 0x806703E: dlg_print_scrolled (util.c:892)
+==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273==
+==23273==
+==23273== 1,892 bytes in 1 blocks are still reachable in loss record 56 of 62
+==23273== at 0x4023E8C: realloc (vg_replace_malloc.c:429)
+==23273== by 0x807F2A9: _nc_doalloc (doalloc.c:50)
+==23273== by 0x80853BA: read_termtype (read_entry.c:285)
+==23273== by 0x8085B64: _nc_read_file_entry (read_entry.c:392)
+==23273== by 0x8085BF5: _nc_read_tic_entry (read_entry.c:413)
+==23273== by 0x8085C8A: _nc_read_terminfo_dirs (read_entry.c:438)
+==23273== by 0x8085E90: _nc_read_entry (read_entry.c:500)
+==23273== by 0x8081834: grab_entry (lib_setup.c:255)
+==23273== by 0x8081D46: setupterm (lib_setup.c:438)
+==23273== by 0x8072292: newterm (lib_newterm.c:115)
+==23273==
+==23273==
+==23273== 2,800 bytes in 1 blocks are still reachable in loss record 57 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x8085F59: _nc_set_buffer (setbuf.c:119)
+==23273== by 0x807481F: _nc_setupscreen (lib_set_term.c:232)
+==23273== by 0x80723F1: newterm (lib_newterm.c:146)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273== by 0x8066211: init_dialog (util.c:292)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273==
+==23273== 5,528 bytes in 7 blocks are still reachable in loss record 58 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x805FDE1: same_cache2 (inputstr.c:201)
+==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
+==23273== by 0x8066A0A: dlg_print_line (util.c:668)
+==23273== by 0x8066E40: justify_text (util.c:813)
+==23273== by 0x8066F5E: dlg_print_autowrap (util.c:843)
+==23273== by 0x806703E: dlg_print_scrolled (util.c:892)
+==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273== by 0x804CC56: main (dialog.c:1679)
+==23273==
+==23273==
+==23273== 7,212 bytes in 8 blocks are still reachable in loss record 59 of 62
+==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273== by 0x805FDE1: same_cache2 (inputstr.c:201)
+==23273== by 0x805FEE7: dlg_index_wchars (inputstr.c:342)
+==23273== by 0x8066A18: dlg_print_line (util.c:669)
+==23273== by 0x8066E40: justify_text (util.c:813)
+==23273== by 0x8066F5E: dlg_print_autowrap (util.c:843)
+==23273== by 0x806703E: dlg_print_scrolled (util.c:892)
+==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
+==23273== by 0x804A728: call_yesno (dialog.c:600)
+==23273== by 0x804CC56: main (dialog.c:1679)
+==23273==
+==23273==
+==23273== 12,800 bytes in 40 blocks are still reachable in loss record 60 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x80729EC: newwin (lib_newwin.c:130)
+==23273== by 0x8074F9A: _nc_setupscreen (lib_set_term.c:459)
+==23273== by 0x80723F1: newterm (lib_newterm.c:146)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273== by 0x8066211: init_dialog (util.c:292)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273==
+==23273== 12,800 bytes in 40 blocks are still reachable in loss record 61 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x80729EC: newwin (lib_newwin.c:130)
+==23273== by 0x8074CB3: _nc_setupscreen (lib_set_term.c:414)
+==23273== by 0x80723F1: newterm (lib_newterm.c:146)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273== by 0x8066211: init_dialog (util.c:292)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273==
+==23273== 12,800 bytes in 40 blocks are still reachable in loss record 62 of 62
+==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273== by 0x80729EC: newwin (lib_newwin.c:130)
+==23273== by 0x8074C55: _nc_setupscreen (lib_set_term.c:410)
+==23273== by 0x80723F1: newterm (lib_newterm.c:146)
+==23273== by 0x806E82C: initscr (lib_initscr.c:83)
+==23273== by 0x8066211: init_dialog (util.c:292)
+==23273== by 0x804C880: main (dialog.c:1604)
+==23273==
+==23273== LEAK SUMMARY:
+==23273== definitely lost: 0 bytes in 0 blocks.
+==23273== possibly lost: 0 bytes in 0 blocks.
+==23273== still reachable: 72,482 bytes in 382 blocks.
+==23273== suppressed: 0 bytes in 0 blocks.
+--23273-- memcheck: sanity checks: 8 cheap, 2 expensive
+--23273-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
+--23273-- memcheck: auxmaps_L1: 0 searches, 0 cmps, ratio 0:10
+--23273-- memcheck: auxmaps_L2: 0 searches, 0 nodes
+--23273-- memcheck: SMs: n_issued = 11 (176k, 0M)
+--23273-- memcheck: SMs: n_deissued = 0 (0k, 0M)
+--23273-- memcheck: SMs: max_noaccess = 65535 (1048560k, 1023M)
+--23273-- memcheck: SMs: max_undefined = 0 (0k, 0M)
+--23273-- memcheck: SMs: max_defined = 25 (400k, 0M)
+--23273-- memcheck: SMs: max_non_DSM = 11 (176k, 0M)
+--23273-- memcheck: max sec V bit nodes: 21 (1k, 0M)
+--23273-- memcheck: set_sec_vbits8 calls: 130 (new: 21, updates: 109)
+--23273-- memcheck: max shadow mem size: 481k, 0M
+--23273-- translate: fast SP updates identified: 4,767 ( 83.0%)
+--23273-- translate: generic_known SP updates identified: 612 ( 10.6%)
+--23273-- translate: generic_unknown SP updates identified: 358 ( 6.2%)
+--23273-- tt/tc: 11,509 tt lookups requiring 11,938 probes
+--23273-- tt/tc: 11,509 fast-cache updates, 3 flushes
+--23273-- transtab: new 5,099 (117,852 -> 1,563,594; ratio 132:10) [0 scs]
+--23273-- transtab: dumped 0 (0 -> ??)
+--23273-- transtab: discarded 9 (222 -> ??)
+--23273-- scheduler: 864,676 jumps (bb entries).
+--23273-- scheduler: 8/7,086 major/minor sched events.
+--23273-- sanity: 9 cheap, 2 expensive checks.
+--23273-- exectx: 769 lists, 102 contexts (avg 0 per list)
+--23273-- exectx: 470 searches, 372 full compares (791 per 1000)
+--23273-- exectx: 0 cmp2, 36 cmp4, 2,470 cmpAll
+--23273-- errormgr: 69 supplist searches, 5,672 comparisons during search
+--23273-- errormgr: 14 errlist searches, 36 comparisons during search
diff --git a/contrib/dialog/samples/wheel b/contrib/dialog/samples/wheel
index 4adef26..ff75f71 100755
--- a/contrib/dialog/samples/wheel
+++ b/contrib/dialog/samples/wheel
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: wheel,v 1.8 2012/06/29 09:59:40 tom Exp $
+# $Id: wheel,v 1.7 2010/01/13 01:44:12 tom Exp $
. ./setup-vars
@@ -17,10 +17,10 @@ COLS=`expr $COLS - 30`
# Takes an integer, multiplies it for COLS, divides for 132
scalex() {
- expr $1 \* $COLS / 132
+ echo $[$1*$COLS/132]
}
scaley() {
- expr $1 \* $ROWS / 60
+ echo $[$1*$ROWS/60]
}
$DIALOG --backtitle "$TITLE" --no-shadow \
diff --git a/contrib/dialog/samples/whiptail.rc b/contrib/dialog/samples/whiptail.rc
index b12e687..8515012 100644
--- a/contrib/dialog/samples/whiptail.rc
+++ b/contrib/dialog/samples/whiptail.rc
@@ -1,4 +1,4 @@
-# $Id: whiptail.rc,v 1.5 2011/10/15 01:01:16 tom Exp $
+# $Id: whiptail.rc,v 1.3 2011/01/17 00:15:54 tom Exp $
# vile:confmode
# Run-time configuration file for dialog, matches whiptail's color scheme.
#
@@ -46,79 +46,79 @@ border_color = (WHITE,WHITE,ON)
button_active_color = (WHITE,RED,ON)
# Inactive button color
-button_inactive_color = dialog_color
+button_inactive_color = (BLACK,WHITE,OFF)
# Active button key color
-button_key_active_color = button_active_color
+button_key_active_color = (WHITE,RED,ON)
# Inactive button key color
-button_key_inactive_color = dialog_color
+button_key_inactive_color = (BLACK,WHITE,OFF)
# Active button label color
-button_label_active_color = button_active_color
+button_label_active_color = (WHITE,RED,ON)
# Inactive button label color
button_label_inactive_color = (BLACK,WHITE,ON)
# Input box color
-inputbox_color = dialog_color
+inputbox_color = (BLACK,WHITE,OFF)
# Input box border color
-inputbox_border_color = dialog_color
+inputbox_border_color = (BLACK,WHITE,OFF)
# Search box color
-searchbox_color = dialog_color
+searchbox_color = (BLACK,WHITE,OFF)
# Search box title color
-searchbox_title_color = title_color
+searchbox_title_color = (RED,WHITE,ON)
# Search box border color
-searchbox_border_color = border_color
+searchbox_border_color = (WHITE,WHITE,ON)
# File position indicator color
-position_indicator_color = title_color
+position_indicator_color = (RED,WHITE,ON)
# Menu box color
menubox_color = (YELLOW,BLUE,OFF)
# Menu box border color
-menubox_border_color = screen_color
+menubox_border_color = (YELLOW,BLUE,ON)
# Item color
-item_color = menubox_color
+item_color = (YELLOW,BLUE,OFF)
# Selected item color
-item_selected_color = screen_color
+item_selected_color = (YELLOW,BLUE,ON)
# Tag color
-tag_color = screen_color
+tag_color = (YELLOW,BLUE,ON)
# Selected tag color
-tag_selected_color = screen_color
+tag_selected_color = (YELLOW,BLUE,ON)
# Tag key color
-tag_key_color = menubox_color
+tag_key_color = (YELLOW,BLUE,OFF)
# Selected tag key color
tag_key_selected_color = (WHITE,BLUE,ON)
# Check box color
-check_color = menubox_color
+check_color = (YELLOW,BLUE,OFF)
# Selected check box color
-check_selected_color = screen_color
+check_selected_color = (YELLOW,BLUE,ON)
# Up arrow color
-uarrow_color = screen_color
+uarrow_color = (YELLOW,BLUE,ON)
# Down arrow color
-darrow_color = screen_color
+darrow_color = (YELLOW,BLUE,ON)
# Item help-text color
itemhelp_color = (WHITE,BLACK,OFF)
# Active form text color
-form_active_text_color = tag_key_selected_color
+form_active_text_color = (WHITE,BLUE,ON)
# Form text color
form_text_color = (WHITE,CYAN,ON)
@@ -128,15 +128,3 @@ form_item_readonly_color = (CYAN,WHITE,ON)
# Dialog box gauge color
gauge_color = (BLUE,WHITE,ON)
-
-# Dialog box border2 color
-border2_color = dialog_color
-
-# Input box border2 color
-inputbox_border2_color = dialog_color
-
-# Search box border2 color
-searchbox_border2_color = dialog_color
-
-# Menu box border2 color
-menubox_border2_color = dialog_color
diff --git a/contrib/dialog/samples/with-dquotes b/contrib/dialog/samples/with-dquotes
deleted file mode 100755
index 604f51b..0000000
--- a/contrib/dialog/samples/with-dquotes
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-# $Id: with-dquotes,v 1.1 2012/07/03 09:40:19 tom Exp $
-DIALOGOPTS="$DIALOGOPTS --quoted" "$@"
diff --git a/contrib/dialog/samples/with-squotes b/contrib/dialog/samples/with-squotes
deleted file mode 100755
index 6a08f9f..0000000
--- a/contrib/dialog/samples/with-squotes
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-# $Id: with-squotes,v 1.1 2012/07/03 09:40:29 tom Exp $
-DIALOGOPTS="$DIALOGOPTS --single-quoted" "$@"
diff --git a/contrib/dialog/tailbox.c b/contrib/dialog/tailbox.c
index 0324009..c111f64 100644
--- a/contrib/dialog/tailbox.c
+++ b/contrib/dialog/tailbox.c
@@ -1,5 +1,5 @@
/*
- * $Id: tailbox.c,v 1.67 2011/10/15 12:43:07 tom Exp $
+ * $Id: tailbox.c,v 1.63 2011/06/27 08:19:43 tom Exp $
*
* tailbox.c -- implements the tail box
*
@@ -96,7 +96,6 @@ print_line(MY_OBJ * obj, WINDOW *win, int row, int width)
#endif
getyx(win, y, x);
- (void) y;
/* Clear 'residue' of previous line */
for (i = 0; i < width - x; i++)
(void) waddch(win, ' ');
@@ -337,8 +336,8 @@ dialog_tailbox(const char *title, const char *file, int height, int width, int b
y + MARGIN,
x + MARGIN);
- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
- dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
+ dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
+ dlg_draw_bottom_box(dialog);
dlg_draw_title(dialog, title);
dlg_draw_helpline(dialog, FALSE);
@@ -372,7 +371,6 @@ dialog_tailbox(const char *title, const char *file, int height, int width, int b
dlg_attr_clear(text, thigh, getmaxx(text), dialog_attr);
repaint_text(obj);
- dlg_trace_win(dialog);
if (bg_task) {
result = DLG_EXIT_OK;
} else {
diff --git a/contrib/dialog/textbox.c b/contrib/dialog/textbox.c
index bf89ca5..72a9b11 100644
--- a/contrib/dialog/textbox.c
+++ b/contrib/dialog/textbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: textbox.c,v 1.107 2012/07/01 18:13:24 Zoltan.Kelemen Exp $
+ * $Id: textbox.c,v 1.101 2011/06/29 09:53:03 tom Exp $
*
* textbox.c -- implements the text box
*
- * Copyright 2000-2011,2012 Thomas E. Dickey
+ * Copyright 2000-2010,2011 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -414,7 +414,6 @@ print_page(MY_OBJ * obj, int height, int width)
passed_end = 1;
}
(void) wnoutrefresh(obj->text);
- dlg_trace_win(obj->text);
}
/*
@@ -489,10 +488,9 @@ get_search_term(WINDOW *dialog, char *input, int height, int width)
keypad(widget, TRUE);
dlg_register_window(widget, "searchbox", binding);
- dlg_draw_box2(widget, 0, 0, box_height, box_width,
- searchbox_attr,
- searchbox_border_attr,
- searchbox_border2_attr);
+ dlg_draw_box(widget, 0, 0, box_height, box_width,
+ searchbox_attr,
+ searchbox_border_attr);
wattrset(widget, searchbox_title_attr);
(void) wmove(widget, 0, (box_width - len_caption) / 2);
@@ -500,6 +498,8 @@ get_search_term(WINDOW *dialog, char *input, int height, int width)
limit = dlg_limit_columns(caption, len_caption, 0);
(void) waddnstr(widget, caption + indx[0], indx[limit] - indx[0]);
+ box_y++;
+ box_x++;
box_width -= 2;
offset = dlg_count_columns(input);
@@ -581,6 +581,7 @@ perform_search(MY_OBJ * obj, int height, int width, int key, char *search_term)
back_lines(obj, (dir
? obj->page_length - 1
: obj->page_length + 1));
+ found = FALSE;
if (dir) { /* Forward search */
while ((found = match_string(obj, search_term)) == FALSE) {
if (obj->end_reached)
@@ -674,7 +675,7 @@ dialog_textbox(const char *title, const char *file, int height, int width)
WINDOW *dialog;
bool moved;
int result = DLG_EXIT_UNKNOWN;
- int button = dlg_default_button();
+ int button = dialog_vars.extra_button ? dlg_defaultno_button() : 0;
int min_width = 12;
search_term[0] = '\0'; /* no search term entered yet */
@@ -724,8 +725,8 @@ dialog_textbox(const char *title, const char *file, int height, int width)
/* register the new window, along with its borders */
dlg_mouse_mkbigregion(0, 0, PAGE_LENGTH + 2, width, KEY_MAX, 1, 1, 1 /* lines */ );
- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
- dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
+ dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
+ dlg_draw_bottom_box(dialog);
dlg_draw_title(dialog, title);
dlg_draw_buttons(dialog, PAGE_LENGTH + 2, 0, obj.buttons, button, FALSE, width);
@@ -914,6 +915,7 @@ dialog_textbox(const char *title, const char *file, int height, int width)
height = old_height;
width = old_width;
back_lines(&obj, obj.page_length);
+ moved = TRUE;
/* repaint */
dlg_clear();
dlg_del_window(dialog);
diff --git a/contrib/dialog/timebox.c b/contrib/dialog/timebox.c
index 439120b..5a6be3e 100644
--- a/contrib/dialog/timebox.c
+++ b/contrib/dialog/timebox.c
@@ -1,9 +1,9 @@
/*
- * $Id: timebox.c,v 1.52 2012/07/02 09:34:04 tom Exp $
+ * $Id: timebox.c,v 1.45 2011/06/27 08:20:22 tom Exp $
*
* timebox.c -- implements the timebox dialog
*
- * Copyright 2001-2011,2012 Thomas E. Dickey
+ * Copyright 2001-2010,2011 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -82,9 +82,9 @@ draw_cell(BOX * data)
dlg_draw_box(data->parent,
data->y - MARGIN, data->x - MARGIN,
data->height + (2 * MARGIN), data->width + (2 * MARGIN),
- menubox_border_attr, menubox_border2_attr);
+ menubox_border_attr, menubox_attr);
- (void) wattrset(data->window, item_attr);
+ wattrset(data->window, item_attr);
wprintw(data->window, "%02d", data->value);
return 0;
}
@@ -184,7 +184,7 @@ dialog_timebox(const char *title,
WINDOW *dialog;
time_t now_time = time((time_t *) 0);
struct tm current;
- int state = dlg_default_button();
+ int state = dlg_defaultno_button();
const char **buttons = dlg_ok_labels();
char *prompt = dlg_strclone(subtitle);
char buffer[MAX_LEN];
@@ -221,12 +221,12 @@ dialog_timebox(const char *title,
dlg_register_window(dialog, "timebox", binding);
dlg_register_buttons(dialog, "timebox", buttons);
- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
- dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
+ dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
+ dlg_draw_bottom_box(dialog);
dlg_draw_title(dialog, title);
dlg_draw_helpline(dialog, FALSE);
- (void) wattrset(dialog, dialog_attr);
+ wattrset(dialog, dialog_attr);
dlg_print_autowrap(dialog, prompt, height, width);
/* compute positions of hour, month and year boxes */
@@ -275,7 +275,6 @@ dialog_timebox(const char *title,
return CleanupResult(DLG_EXIT_ERROR, dialog, prompt, &save_vars);
}
- dlg_trace_win(dialog);
while (result == DLG_EXIT_UNKNOWN) {
BOX *obj = (state == sHR ? &hr_box
: (state == sMN ? &mn_box :
@@ -296,6 +295,12 @@ dialog_timebox(const char *title,
/* handle function-keys */
if (fkey) {
switch (key) {
+ case DLGK_MOUSE(0):
+ result = DLG_EXIT_OK;
+ break;
+ case DLGK_MOUSE(1):
+ result = DLG_EXIT_CANCEL;
+ break;
case DLGK_MOUSE('H'):
state = sHR;
break;
@@ -306,7 +311,7 @@ dialog_timebox(const char *title,
state = sSC;
break;
case DLGK_ENTER:
- result = dlg_ok_buttoncode(button);
+ result = button;
break;
case DLGK_FIELD_PREV:
state = dlg_prev_ok_buttonindex(state, sHR);
@@ -356,11 +361,7 @@ dialog_timebox(const char *title,
goto retry;
#endif
default:
- if (is_DLGK_MOUSE(key)) {
- result = dlg_ok_buttoncode(key - M_EVENT);
- if (result < 0)
- result = DLG_EXIT_OK;
- } else if (obj != 0) {
+ if (obj != 0) {
int step = next_or_previous(key);
if (step != 0) {
obj->value += step;
diff --git a/contrib/dialog/trace.c b/contrib/dialog/trace.c
index 50ccfac..a742ae8 100644
--- a/contrib/dialog/trace.c
+++ b/contrib/dialog/trace.c
@@ -1,5 +1,5 @@
/*
- * $Id: trace.c,v 1.20 2011/10/18 10:47:26 tom Exp $
+ * $Id: trace.c,v 1.14 2011/06/21 21:12:56 tom Exp $
*
* trace.c -- implements screen-dump and keystroke-logging
*
@@ -24,10 +24,6 @@
#ifdef HAVE_DLG_TRACE
-#ifdef NEED_WCHAR_H
-#include <wchar.h>
-#endif
-
#include <dlg_keys.h>
#include <time.h>
@@ -58,94 +54,38 @@ dlg_trace_win(WINDOW *win)
if (myFP != 0) {
int y, x;
int j, k;
- WINDOW *top = wgetparent(win);
-
- while (top != 0 && top != stdscr) {
- win = top;
- top = wgetparent(win);
- }
-
- if (win != 0) {
- int rc = getmaxy(win);
- int cc = getmaxx(win);
- chtype ch, c2;
-
- fprintf(myFP, "window %dx%d at %d,%d\n",
- rc, cc, getbegy(win), getbegx(win));
-
- getyx(win, y, x);
- for (j = 0; j < rc; ++j) {
- fprintf(myFP, "%3d:", j);
- for (k = 0; k < cc; ++k) {
-#ifdef USE_WIDE_CURSES
- char buffer[80];
-
- ch = mvwinch(win, j, k) & (A_CHARTEXT | A_ALTCHARSET);
- if (ch & A_ALTCHARSET) {
- c2 = dlg_asciibox(ch);
- if (c2 != 0) {
- ch = c2;
- }
- buffer[0] = (char) ch;
- buffer[1] = '\0';
- } else {
- cchar_t cch;
- wchar_t *uc;
-
- if (win_wch(win, &cch) == ERR
- || (uc = wunctrl(&cch)) == 0
- || uc[1] != 0
- || wcwidth(uc[0]) <= 0) {
- buffer[0] = '.';
- buffer[1] = '\0';
- } else {
- mbstate_t state;
- const wchar_t *ucp = uc;
-
- memset(&state, 0, sizeof(state));
- wcsrtombs(buffer, &ucp, sizeof(buffer), &state);
- k += wcwidth(uc[0]) - 1;
- }
- }
- fputs(buffer, myFP);
-#else
- ch = mvwinch(win, j, k) & (A_CHARTEXT | A_ALTCHARSET);
- c2 = dlg_asciibox(ch);
- if (c2 != 0) {
- ch = c2;
- } else if (unctrl(ch) == 0 || strlen(unctrl(ch)) > 1) {
- ch = '.';
- }
- fputc((int) (ch & 0xff), myFP);
-#endif
+ int rc = getmaxy(win);
+ int cc = getmaxx(win);
+ chtype ch, c2;
+
+ fprintf(myFP, "window %dx%d at %d,%d\n",
+ rc, cc, getbegy(win), getbegx(win));
+
+ getyx(win, y, x);
+ for (j = 0; j < rc; ++j) {
+ fprintf(myFP, "%3d:", j);
+ for (k = 0; k < cc; ++k) {
+ ch = mvwinch(win, j, k) & (A_CHARTEXT | A_ALTCHARSET);
+ c2 = dlg_asciibox(ch);
+ if (c2 != 0) {
+ ch = c2;
+ } else if (unctrl(ch) == 0 || strlen(unctrl(ch)) > 1) {
+ ch = '.';
}
- fputc('\n', myFP);
+ fputc((int) (ch & 0xff), myFP);
}
- wmove(win, y, x);
- fflush(myFP);
+ fputc('\n', myFP);
}
+ wmove(win, y, x);
+ fflush(myFP);
}
}
void
dlg_trace_chr(int ch, int fkey)
{
- static int last_err = 0;
-
- /*
- * Do not bother to trace ERR's indefinitely, since those are usually due
- * to relatively short polling timeouts.
- */
- if (last_err && !fkey && ch == ERR) {
- ++last_err;
- } else if (myFP != 0) {
+ if (myFP != 0) {
const char *fkey_name = "?";
-
- if (last_err) {
- fprintf(myFP, "skipped %d ERR's\n", last_err);
- last_err = 0;
- }
-
if (fkey) {
if (fkey > KEY_MAX || (fkey_name = keyname(fkey)) == 0) {
#define CASE(name) case name: fkey_name = #name; break
@@ -168,10 +108,6 @@ dlg_trace_chr(int ch, int fkey)
CASE(DLGK_FIELD_LAST);
CASE(DLGK_FIELD_NEXT);
CASE(DLGK_FIELD_PREV);
- CASE(DLGK_FORM_FIRST);
- CASE(DLGK_FORM_LAST);
- CASE(DLGK_FORM_NEXT);
- CASE(DLGK_FORM_PREV);
CASE(DLGK_GRID_UP);
CASE(DLGK_GRID_DOWN);
CASE(DLGK_GRID_LEFT);
@@ -189,7 +125,6 @@ dlg_trace_chr(int ch, int fkey)
}
} else if (ch == ERR) {
fkey_name = "ERR";
- last_err = 1;
} else {
fkey_name = unctrl((chtype) ch);
if (fkey_name == 0)
diff --git a/contrib/dialog/ui_getc.c b/contrib/dialog/ui_getc.c
index b0ff15b..d9d5a93 100644
--- a/contrib/dialog/ui_getc.c
+++ b/contrib/dialog/ui_getc.c
@@ -1,5 +1,5 @@
/*
- * $Id: ui_getc.c,v 1.65 2011/10/20 23:45:48 tom Exp $
+ * $Id: ui_getc.c,v 1.63 2011/07/07 22:05:58 tom Exp $
*
* ui_getc.c - user interface glue for getc()
*
@@ -294,7 +294,8 @@ valid_file(FILE *fp)
int fd = fileno(fp);
if (fd >= 0) {
- if (fcntl(fd, F_GETFL, 0) >= 0) {
+ long result = 0;
+ if ((result = fcntl(fd, F_GETFL, 0)) >= 0) {
code = TRUE;
}
}
@@ -529,7 +530,6 @@ dlg_getc(WINDOW *win, int *fkey)
if (handle_others) {
if ((p = dialog_state.getc_redirect) != 0) {
if (!(p->handle_getc(p, ch, *fkey, &result))) {
- done = (p->win == save_win) && (!p->keep_win);
dlg_remove_callback(p);
dialog_state.getc_redirect = 0;
win = save_win;
diff --git a/contrib/dialog/util.c b/contrib/dialog/util.c
index ab9c47c..82ef4fa 100644
--- a/contrib/dialog/util.c
+++ b/contrib/dialog/util.c
@@ -1,9 +1,9 @@
/*
- * $Id: util.c,v 1.243 2012/06/30 12:58:04 tom Exp $
+ * $Id: util.c,v 1.227 2011/07/07 23:42:30 tom Exp $
*
* util.c -- miscellaneous utilities for dialog
*
- * Copyright 2000-2011,2012 Thomas E. Dickey
+ * Copyright 2000-2010,2011 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -27,14 +27,6 @@
#include <dialog.h>
#include <dlg_keys.h>
-#ifdef HAVE_SETLOCALE
-#include <locale.h>
-#endif
-
-#ifdef NEED_WCHAR_H
-#include <wchar.h>
-#endif
-
#ifdef NCURSES_VERSION
#if defined(HAVE_NCURSESW_TERM_H)
#include <ncursesw/term.h>
@@ -63,12 +55,6 @@
DIALOG_STATE dialog_state;
DIALOG_VARS dialog_vars;
-#if !(defined(HAVE_WGETPARENT) && defined(HAVE_WINDOW__PARENT))
-#define NEED_WGETPARENT 1
-#else
-#undef NEED_WGETPARENT
-#endif
-
#define concat(a,b) a##b
#ifdef HAVE_RC_FILE
@@ -93,7 +79,6 @@ DIALOG_VARS dialog_vars;
/*
* Table of color and attribute values, default is for mono display.
- * The order matches the DIALOG_ATR() values.
*/
/* *INDENT-OFF* */
DIALOG_COLORS dlg_color_table[] =
@@ -131,57 +116,11 @@ DIALOG_COLORS dlg_color_table[] =
DATA(A_BOLD, FORM_ACTIVE_TEXT, form_active_text, "Active form text"),
DATA(A_REVERSE, FORM_TEXT, form_text, "Form text"),
DATA(A_NORMAL, FORM_ITEM_READONLY, form_item_readonly, "Readonly form item"),
- DATA(A_REVERSE, GAUGE, gauge, "Dialog box gauge"),
- DATA(A_REVERSE, BORDER2, border2, "Dialog box border2"),
- DATA(A_REVERSE, INPUTBOX_BORDER2, inputbox_border2, "Input box border2"),
- DATA(A_REVERSE, SEARCHBOX_BORDER2, searchbox_border2, "Search box border2"),
- DATA(A_REVERSE, MENUBOX_BORDER2, menubox_border2, "Menu box border2")
+ DATA(A_REVERSE, GAUGE, gauge, "Dialog box gauge")
};
/* *INDENT-ON* */
/*
- * Maintain a list of subwindows so that we can delete them to cleanup.
- * More important, this provides a fallback when wgetparent() is not available.
- */
-static void
-add_subwindow(WINDOW *parent, WINDOW *child)
-{
- DIALOG_WINDOWS *p = dlg_calloc(DIALOG_WINDOWS, 1);
-
- if (p != 0) {
- p->normal = parent;
- p->shadow = child;
- p->next = dialog_state.all_subwindows;
- dialog_state.all_subwindows = p;
- }
-}
-
-static void
-del_subwindows(WINDOW *parent)
-{
- DIALOG_WINDOWS *p = dialog_state.all_subwindows;
- DIALOG_WINDOWS *q = 0;
- DIALOG_WINDOWS *r;
-
- while (p != 0) {
- if (p->normal == parent) {
- delwin(p->shadow);
- r = p->next;
- if (q == 0) {
- dialog_state.all_subwindows = r;
- } else {
- q->next = r;
- }
- free(p);
- p = r;
- } else {
- q = p;
- p = p->next;
- }
- }
-}
-
-/*
* Display background title if it exists ...
*/
void
@@ -287,8 +226,6 @@ init_dialog(FILE *input, FILE *output)
int fd1, fd2;
char *device = 0;
- setlocale(LC_ALL, "");
-
dialog_state.output = output;
dialog_state.tab_len = TAB_LEN;
dialog_state.aspect_ratio = DEFAULT_ASPECT_RATIO;
@@ -315,7 +252,7 @@ init_dialog(FILE *input, FILE *output)
*/
dialog_state.pipe_input = stdin;
if (fileno(input) != fileno(stdin)) {
- if (dup(fileno(input)) >= 0
+ if ((fd1 = dup(fileno(input))) >= 0
&& (fd2 = dup(fileno(stdin))) >= 0) {
(void) dup2(fileno(input), fileno(stdin));
dialog_state.pipe_input = fdopen(fd2, "r");
@@ -324,7 +261,7 @@ init_dialog(FILE *input, FILE *output)
} else
dlg_exiterr("cannot open tty-input");
} else if (!isatty(fileno(stdin))) {
- if (open_terminal(&device, O_RDONLY) >= 0
+ if ((fd1 = open_terminal(&device, O_RDONLY)) >= 0
&& (fd2 = dup(fileno(stdin))) >= 0) {
dialog_state.pipe_input = fdopen(fd2, "r");
if (freopen(device, "r", stdin) == 0)
@@ -569,32 +506,22 @@ end_dialog(void)
#define ESCAPE_LEN 3
#define isOurEscape(p) (((p)[0] == '\\') && ((p)[1] == 'Z') && ((p)[2] != 0))
-int
-dlg_count_real_columns(const char *text)
-{
- int result = dlg_count_columns(text);
- if (result && dialog_vars.colors) {
- int hidden = 0;
- while (*text) {
- if (dialog_vars.colors && isOurEscape(text)) {
- hidden += ESCAPE_LEN;
- text += ESCAPE_LEN;
- } else {
- ++text;
- }
- }
- result -= hidden;
- }
- return result;
-}
-
static int
centered(int width, const char *string)
{
- int need = dlg_count_real_columns(string);
+ int len = dlg_count_columns(string);
int left;
+ int hide = 0;
+ int n;
- left = (width - need) / 2 - 1;
+ if (dialog_vars.colors) {
+ for (n = 0; n < len; ++n) {
+ if (isOurEscape(string + n)) {
+ hide += ESCAPE_LEN;
+ }
+ }
+ }
+ left = (width - (len - hide)) / 2 - 1;
if (left < 0)
left = 0;
return left;
@@ -720,10 +647,8 @@ dlg_print_text(WINDOW *win, const char *txt, int cols, chtype *attr)
* more blanks.
*/
thisTab = (CharOf(*txt) == TAB);
- if (thisTab) {
+ if (thisTab)
getyx(win, y_before, x_before);
- (void) y_before;
- }
(void) waddch(win, CharOf(*txt++) | useattr);
getyx(win, y_after, x_after);
if (thisTab && (y_after == y_origin))
@@ -779,7 +704,7 @@ dlg_print_line(WINDOW *win,
} else if (*test_ptr == ' ' && n != 0 && prompt[indx[n - 1]] != ' ') {
wrap_inx = n;
*x = cur_x;
- } else if (dialog_vars.colors && isOurEscape(test_ptr)) {
+ } else if (isOurEscape(test_ptr)) {
hide_ptr = test_ptr;
hidden += ESCAPE_LEN;
n += (ESCAPE_LEN - 1);
@@ -826,7 +751,7 @@ dlg_print_line(WINDOW *win,
hidden -= ESCAPE_LEN;
test_ptr = wrap_ptr;
while (test_ptr < wrap_ptr) {
- if (dialog_vars.colors && isOurEscape(test_ptr)) {
+ if (isOurEscape(test_ptr)) {
hidden -= ESCAPE_LEN;
test_ptr += ESCAPE_LEN;
} else {
@@ -986,7 +911,6 @@ dlg_print_scrolled(WINDOW *win,
werase(dummy);
dlg_print_autowrap(dummy, prompt, high, width);
getyx(dummy, y, x);
- (void) x;
copywin(dummy, /* srcwin */
win, /* dstwin */
@@ -1157,6 +1081,25 @@ longest_word(const char *string)
return result;
}
+static int
+count_real_columns(const char *text)
+{
+ int result = dlg_count_columns(text);
+ if (result && dialog_vars.colors) {
+ int hidden = 0;
+ while (*text) {
+ if (isOurEscape(text)) {
+ hidden += ESCAPE_LEN;
+ text += ESCAPE_LEN;
+ } else {
+ ++text;
+ }
+ }
+ result -= hidden;
+ }
+ return result;
+}
+
/*
* if (height or width == -1) Maximize()
* if (height or width == 0), justify and return actual limits.
@@ -1189,24 +1132,23 @@ real_auto_size(const char *title,
high = SLINES - y;
}
- if (*width <= 0) {
- if (prompt != 0) {
- wide = MAX(title_length, mincols);
- if (strchr(prompt, '\n') == 0) {
- double val = (dialog_state.aspect_ratio *
- dlg_count_real_columns(prompt));
- double xxx = sqrt(val);
- int tmp = (int) xxx;
- wide = MAX(wide, tmp);
- wide = MAX(wide, longest_word(prompt));
- justify_text((WINDOW *) 0, prompt, high, wide, height, width);
- } else {
- auto_size_preformatted(prompt, height, width);
- }
- } else {
- wide = SCOLS - x;
+ if (*width > 0) {
+ wide = *width;
+ } else if (prompt != 0) {
+ wide = MAX(title_length, mincols);
+ if (strchr(prompt, '\n') == 0) {
+ double val = dialog_state.aspect_ratio * count_real_columns(prompt);
+ double xxx = sqrt(val);
+ int tmp = (int) xxx;
+ wide = MAX(wide, tmp);
+ wide = MAX(wide, longest_word(prompt));
justify_text((WINDOW *) 0, prompt, high, wide, height, width);
+ } else {
+ auto_size_preformatted(prompt, height, width);
}
+ } else {
+ wide = SCOLS - x;
+ justify_text((WINDOW *) 0, prompt, high, wide, height, width);
}
if (*width < title_length) {
@@ -1349,8 +1291,8 @@ dlg_get_cell_attrs(WINDOW *win)
* reverse this choice.
*/
void
-dlg_draw_box2(WINDOW *win, int y, int x, int height, int width,
- chtype boxchar, chtype borderchar, chtype borderchar2)
+dlg_draw_box(WINDOW *win, int y, int x, int height, int width,
+ chtype boxchar, chtype borderchar)
{
int i, j;
chtype save = dlg_get_attrs(win);
@@ -1364,30 +1306,23 @@ dlg_draw_box2(WINDOW *win, int y, int x, int height, int width,
else if (i == height - 1 && !j)
(void) waddch(win, borderchar | dlg_boxchar(ACS_LLCORNER));
else if (!i && j == width - 1)
- (void) waddch(win, borderchar2 | dlg_boxchar(ACS_URCORNER));
+ (void) waddch(win, boxchar | dlg_boxchar(ACS_URCORNER));
else if (i == height - 1 && j == width - 1)
- (void) waddch(win, borderchar2 | dlg_boxchar(ACS_LRCORNER));
+ (void) waddch(win, boxchar | dlg_boxchar(ACS_LRCORNER));
else if (!i)
(void) waddch(win, borderchar | dlg_boxchar(ACS_HLINE));
else if (i == height - 1)
- (void) waddch(win, borderchar2 | dlg_boxchar(ACS_HLINE));
+ (void) waddch(win, boxchar | dlg_boxchar(ACS_HLINE));
else if (!j)
(void) waddch(win, borderchar | dlg_boxchar(ACS_VLINE));
else if (j == width - 1)
- (void) waddch(win, borderchar2 | dlg_boxchar(ACS_VLINE));
+ (void) waddch(win, boxchar | dlg_boxchar(ACS_VLINE));
else
(void) waddch(win, boxchar | ' ');
}
wattrset(win, save);
}
-void
-dlg_draw_box(WINDOW *win, int y, int x, int height, int width,
- chtype boxchar, chtype borderchar)
-{
- dlg_draw_box2(win, y, x, height, width, boxchar, borderchar, boxchar);
-}
-
static DIALOG_WINDOWS *
find_window(WINDOW *win)
{
@@ -1519,7 +1454,7 @@ repaint_cell(DIALOG_WINDOWS * dw, bool draw, int y, int x)
#if USE_WCHGAT
wchgat(cellwin, 1,
the_attr & (chtype) (~A_COLOR),
- (short) PAIR_NUMBER(the_attr),
+ PAIR_NUMBER(the_attr),
NULL);
#else
{
@@ -1909,31 +1844,24 @@ dlg_draw_title(WINDOW *win, const char *title)
}
void
-dlg_draw_bottom_box2(WINDOW *win, chtype on_left, chtype on_right, chtype on_inside)
+dlg_draw_bottom_box(WINDOW *win)
{
int width = getmaxx(win);
int height = getmaxy(win);
int i;
- wattrset(win, on_left);
+ wattrset(win, border_attr);
(void) wmove(win, height - 3, 0);
(void) waddch(win, dlg_boxchar(ACS_LTEE));
for (i = 0; i < width - 2; i++)
(void) waddch(win, dlg_boxchar(ACS_HLINE));
- wattrset(win, on_right);
+ wattrset(win, dialog_attr);
(void) waddch(win, dlg_boxchar(ACS_RTEE));
- wattrset(win, on_inside);
(void) wmove(win, height - 2, 1);
for (i = 0; i < width - 2; i++)
(void) waddch(win, ' ');
}
-void
-dlg_draw_bottom_box(WINDOW *win)
-{
- dlg_draw_bottom_box2(win, border_attr, dialog_attr, dialog_attr);
-}
-
/*
* Remove a window, repainting everything else. This would be simpler if we
* used the panel library, but that is not _always_ available.
@@ -1979,7 +1907,6 @@ dlg_del_window(WINDOW *win)
if (q) {
if (dialog_state.all_windows != 0)
erase_childs_shadow(q);
- del_subwindows(q->normal);
delwin(q->normal);
dlg_unregister_window(q->normal);
free(q);
@@ -2069,7 +1996,6 @@ dlg_sub_window(WINDOW *parent, int height, int width, int y, int x)
y, x, height, width);
}
- add_subwindow(parent, win);
(void) keypad(win, TRUE);
return win;
}
@@ -2131,7 +2057,6 @@ dlg_item_help(const char *txt)
if (itemhelp_attr & A_COLOR) {
/* fill the remainder of the line with the window's attributes */
getyx(stdscr, y, x);
- (void) y;
while (x < COLS) {
(void) addch(' ');
++x;
@@ -2415,7 +2340,7 @@ dlg_add_quoted(char *string)
? FIX_SINGLE
: FIX_DOUBLE);
- if (must_quote(string)) {
+ if (dialog_vars.quoted || must_quote(string)) {
temp[1] = '\0';
dlg_add_result(my_quote);
while (*string != '\0') {
@@ -2507,14 +2432,14 @@ dlg_does_output(void)
*/
#if !(defined(HAVE_GETBEGX) && defined(HAVE_GETBEGY))
int
-dlg_getbegx(WINDOW *win)
+getbegx(WINDOW *win)
{
int y, x;
getbegyx(win, y, x);
return x;
}
int
-dlg_getbegy(WINDOW *win)
+getbegy(WINDOW *win)
{
int y, x;
getbegyx(win, y, x);
@@ -2524,14 +2449,14 @@ dlg_getbegy(WINDOW *win)
#if !(defined(HAVE_GETCURX) && defined(HAVE_GETCURY))
int
-dlg_getcurx(WINDOW *win)
+getcurx(WINDOW *win)
{
int y, x;
getyx(win, y, x);
return x;
}
int
-dlg_getcury(WINDOW *win)
+getcury(WINDOW *win)
{
int y, x;
getyx(win, y, x);
@@ -2541,14 +2466,14 @@ dlg_getcury(WINDOW *win)
#if !(defined(HAVE_GETMAXX) && defined(HAVE_GETMAXY))
int
-dlg_getmaxx(WINDOW *win)
+getmaxx(WINDOW *win)
{
int y, x;
getmaxyx(win, y, x);
return x;
}
int
-dlg_getmaxy(WINDOW *win)
+getmaxy(WINDOW *win)
{
int y, x;
getmaxyx(win, y, x);
@@ -2558,35 +2483,17 @@ dlg_getmaxy(WINDOW *win)
#if !(defined(HAVE_GETPARX) && defined(HAVE_GETPARY))
int
-dlg_getparx(WINDOW *win)
+getparx(WINDOW *win)
{
int y, x;
getparyx(win, y, x);
return x;
}
int
-dlg_getpary(WINDOW *win)
+getpary(WINDOW *win)
{
int y, x;
getparyx(win, y, x);
return y;
}
#endif
-
-#ifdef NEED_WGETPARENT
-WINDOW *
-dlg_wgetparent(WINDOW *win)
-{
-#undef wgetparent
- WINDOW *result = 0;
- DIALOG_WINDOWS *p;
-
- for (p = dialog_state.all_subwindows; p != 0; p = p->next) {
- if (p->shadow == win) {
- result = p->normal;
- break;
- }
- }
- return result;
-}
-#endif
diff --git a/contrib/dialog/yesno.c b/contrib/dialog/yesno.c
index e97d760..4efb073 100644
--- a/contrib/dialog/yesno.c
+++ b/contrib/dialog/yesno.c
@@ -1,9 +1,9 @@
/*
- * $Id: yesno.c,v 1.56 2012/07/02 23:58:08 tom Exp $
+ * $Id: yesno.c,v 1.51 2011/06/27 08:20:57 tom Exp $
*
* yesno.c -- implements the yes/no box
*
- * Copyright 1999-2011,2012 Thomas E. Dickey
+ * Copyright 1999-2010,2011 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -37,7 +37,13 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
static DLG_KEYS_BINDING binding[] = {
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
- TRAVERSE_BINDINGS,
+ DLG_KEYS_DATA( DLGK_ENTER, ' ' ),
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_DOWN ),
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_RIGHT ),
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, TAB ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_UP ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_LEFT ),
SCROLLKEY_BINDINGS,
END_KEYS_BINDING
};
@@ -46,7 +52,7 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
int x, y;
int key = 0, fkey;
int code;
- int button = dlg_default_button();
+ int button = dlg_defaultno_button();
WINDOW *dialog = 0;
int result = DLG_EXIT_UNKNOWN;
char *prompt = dlg_strclone(cprompt);
@@ -81,8 +87,8 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
dlg_register_buttons(dialog, "yesno", buttons);
}
- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
- dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
+ dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
+ dlg_draw_bottom_box(dialog);
dlg_draw_title(dialog, title);
dlg_draw_helpline(dialog, FALSE);
@@ -97,7 +103,6 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
if (show) {
last = dlg_print_scrolled(dialog, prompt, offset,
page, width, TRUE);
- dlg_trace_win(dialog);
show = FALSE;
}
key = dlg_mouse_wgetch(dialog, &fkey);
diff --git a/contrib/dtc/Makefile b/contrib/dtc/Makefile
index 1169e6c..dd4d1a8bc 100644
--- a/contrib/dtc/Makefile
+++ b/contrib/dtc/Makefile
@@ -48,7 +48,7 @@ ifdef V
VECHO = :
else
VECHO = echo " "
-ARFLAGS = rc
+ARFLAGS ?= rc
.SILENT:
endif
diff --git a/contrib/gcc/Makefile.in b/contrib/gcc/Makefile.in
index e48d863..0f0ce9b 100644
--- a/contrib/gcc/Makefile.in
+++ b/contrib/gcc/Makefile.in
@@ -238,7 +238,7 @@ BISONFLAGS =
FLEX = @FLEX@
FLEXFLAGS =
AR = @AR@
-AR_FLAGS = rc
+ARFLAGS = @ARFLAGS@
NM = @NM@
RANLIB = @RANLIB@
RANLIB_FLAGS = @ranlib_flags@
@@ -1303,7 +1303,7 @@ compilations: $(BACKEND)
# This archive is strictly for the host.
libbackend.a: $(OBJS@onestep@)
-rm -rf libbackend.a
- $(AR) $(AR_FLAGS) libbackend.a $(OBJS@onestep@)
+ $(AR) $(ARFLAGS) libbackend.a $(OBJS@onestep@)
-$(RANLIB) $(RANLIB_FLAGS) libbackend.a
# We call this executable `xgcc' rather than `gcc'
diff --git a/contrib/gcc/config/arm/arm.h b/contrib/gcc/config/arm/arm.h
index 20a869f..89b8a38 100644
--- a/contrib/gcc/config/arm/arm.h
+++ b/contrib/gcc/config/arm/arm.h
@@ -1866,8 +1866,10 @@ typedef struct
# define DTOR_LIST_BEGIN asm (ARM_EABI_DTORS_SECTION_OP)
# define DTOR_LIST_END /* empty */
# else /* !defined (__ARM_EABI__) */
+# ifndef __clang__
# define CTORS_SECTION_ASM_OP ARM_CTORS_SECTION_OP
# define DTORS_SECTION_ASM_OP ARM_DTORS_SECTION_OP
+# endif
# endif /* !defined (__ARM_EABI__) */
#endif /* !defined (IN_LIBCC2) */
diff --git a/contrib/gcc/dwarf2out.c b/contrib/gcc/dwarf2out.c
index 25a906b..5e4354a 100644
--- a/contrib/gcc/dwarf2out.c
+++ b/contrib/gcc/dwarf2out.c
@@ -10812,9 +10812,9 @@ add_byte_size_attribute (dw_die_ref die, tree tree_node)
/* Note that `size' might be -1 when we get to this point. If it is, that
indicates that the byte size of the entity in question is variable. We
- have no good way of expressing this fact in Dwarf at the present time,
- so just let the -1 pass on through. */
- add_AT_unsigned (die, DW_AT_byte_size, size);
+ have no good way of expressing this fact in Dwarf at the present time.
+ GCC/35998: Avoid passing negative sizes to Dtrace and gdb. */
+ add_AT_unsigned (die, DW_AT_byte_size, (size != (unsigned)-1 ? size : 0));
}
/* For a FIELD_DECL node which represents a bit-field, output an attribute
diff --git a/contrib/gcc/longlong.h b/contrib/gcc/longlong.h
index a789d16..f91eb52 100644
--- a/contrib/gcc/longlong.h
+++ b/contrib/gcc/longlong.h
@@ -205,7 +205,7 @@ UDItype __umulsidi3 (USItype, USItype);
"rI" ((USItype) (bl)) __CLOBBER_CC)
#define umul_ppmm(xh, xl, a, b) \
{register USItype __t0, __t1, __t2; \
- __asm__ ("%@ Inlined umul_ppmm\n" \
+ __asm__ ("/* Inlined umul_ppmm */\n" \
" mov %2, %5, lsr #16\n" \
" mov %0, %6, lsr #16\n" \
" bic %3, %5, %2, lsl #16\n" \
diff --git a/contrib/gcclibs/libcpp/Makefile.in b/contrib/gcclibs/libcpp/Makefile.in
index f565fa2..7a0b74f 100644
--- a/contrib/gcclibs/libcpp/Makefile.in
+++ b/contrib/gcclibs/libcpp/Makefile.in
@@ -26,8 +26,8 @@ srcdir = @srcdir@
top_builddir = .
VPATH = @srcdir@
INSTALL = @INSTALL@
-AR = ar
-ARFLAGS = cru
+AR = @AR@
+ARFLAGS = @ARFLAGS@
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
diff --git a/contrib/gcclibs/libdecnumber/Makefile.in b/contrib/gcclibs/libdecnumber/Makefile.in
index c020e0b..eb314b4 100644
--- a/contrib/gcclibs/libdecnumber/Makefile.in
+++ b/contrib/gcclibs/libdecnumber/Makefile.in
@@ -26,8 +26,8 @@ srcdir = @srcdir@
top_builddir = .
VPATH = @srcdir@
INSTALL = @INSTALL@
-AR = ar
-ARFLAGS = cru
+AR = @AR@
+ARFLAGS = @ARFLAGS@
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
diff --git a/contrib/gcclibs/libiberty/Makefile.in b/contrib/gcclibs/libiberty/Makefile.in
index 570d2e8..2370a83 100644
--- a/contrib/gcclibs/libiberty/Makefile.in
+++ b/contrib/gcclibs/libiberty/Makefile.in
@@ -56,7 +56,7 @@ mkinstalldirs = $(SHELL) $(libiberty_topdir)/mkinstalldirs
OUTPUT_OPTION = @OUTPUT_OPTION@
AR = @AR@
-AR_FLAGS = rc
+ARFLAGS = @ARFLAGS@
CC = @CC@
CFLAGS = @CFLAGS@
@@ -81,7 +81,7 @@ EXTRA_OFILES =
# Flags to pass to a recursive make.
FLAGS_TO_PASS = \
"AR=$(AR)" \
- "AR_FLAGS=$(AR_FLAGS)" \
+ "AR_FLAGS=$(ARFLAGS)" \
"CC=$(CC)" \
"CFLAGS=$(CFLAGS)" \
"DESTDIR=$(DESTDIR)" \
@@ -224,12 +224,12 @@ INSTALLED_HEADERS = \
$(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
-rm -f $(TARGETLIB) pic/$(TARGETLIB)
- $(AR) $(AR_FLAGS) $(TARGETLIB) \
+ $(AR) $(ARFLAGS) $(TARGETLIB) \
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
$(RANLIB) $(TARGETLIB)
if [ x"$(PICFLAG)" != x ]; then \
cd pic; \
- $(AR) $(AR_FLAGS) $(TARGETLIB) \
+ $(AR) $(ARFLAGS) $(TARGETLIB) \
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
$(RANLIB) $(TARGETLIB); \
cd ..; \
@@ -237,7 +237,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
$(TESTLIB): $(REQUIRED_OFILES) $(CONFIGURED_OFILES)
-rm -f $(TESTLIB)
- $(AR) $(AR_FLAGS) $(TESTLIB) \
+ $(AR) $(ARFLAGS) $(TESTLIB) \
$(REQUIRED_OFILES) $(CONFIGURED_OFILES)
$(RANLIB) $(TESTLIB)
diff --git a/contrib/gdb/gdb/dwarf2read.c b/contrib/gdb/gdb/dwarf2read.c
index 1093ff2..7a1b52e 100644
--- a/contrib/gdb/gdb/dwarf2read.c
+++ b/contrib/gdb/gdb/dwarf2read.c
@@ -834,6 +834,8 @@ static void read_tag_const_type (struct die_info *, struct dwarf2_cu *);
static void read_tag_volatile_type (struct die_info *, struct dwarf2_cu *);
+static void read_tag_restrict_type (struct die_info *, struct dwarf2_cu *);
+
static void read_tag_string_type (struct die_info *, struct dwarf2_cu *);
static void read_subroutine_type (struct die_info *, struct dwarf2_cu *);
@@ -3729,7 +3731,8 @@ read_tag_const_type (struct die_info *die, struct dwarf2_cu *cu)
}
base_type = die_type (die, cu);
- die->type = make_cv_type (1, TYPE_VOLATILE (base_type), base_type, 0);
+ die->type = make_cvr_type (1, TYPE_VOLATILE (base_type),
+ TYPE_RESTRICT (base_type), base_type, 0);
}
static void
@@ -3743,7 +3746,23 @@ read_tag_volatile_type (struct die_info *die, struct dwarf2_cu *cu)
}
base_type = die_type (die, cu);
- die->type = make_cv_type (TYPE_CONST (base_type), 1, base_type, 0);
+ die->type = make_cvr_type (TYPE_CONST (base_type), 1,
+ TYPE_RESTRICT (base_type), base_type, 0);
+}
+
+static void
+read_tag_restrict_type (struct die_info *die, struct dwarf2_cu *cu)
+{
+ struct type *base_type;
+
+ if (die->type)
+ {
+ return;
+ }
+
+ base_type = die_type (die, cu);
+ die->type = make_cvr_type (TYPE_CONST (base_type), TYPE_VOLATILE (base_type),
+ 1, base_type, 0);
}
/* Extract all information from a DW_TAG_string_type DIE and add to
@@ -6086,6 +6105,9 @@ read_type_die (struct die_info *die, struct dwarf2_cu *cu)
case DW_TAG_volatile_type:
read_tag_volatile_type (die, cu);
break;
+ case DW_TAG_restrict_type:
+ read_tag_restrict_type (die, cu);
+ break;
case DW_TAG_string_type:
read_tag_string_type (die, cu);
break;
diff --git a/contrib/gdb/gdb/gdbtypes.c b/contrib/gdb/gdb/gdbtypes.c
index 1349ffb..4128fb3 100644
--- a/contrib/gdb/gdb/gdbtypes.c
+++ b/contrib/gdb/gdb/gdbtypes.c
@@ -502,7 +502,8 @@ make_type_with_address_space (struct type *type, int space_flag)
We allocate new memory if needed. */
struct type *
-make_cv_type (int cnst, int voltl, struct type *type, struct type **typeptr)
+make_cvr_type (int cnst, int voltl, int restrct, struct type *type,
+ struct type **typeptr)
{
struct type *ntype; /* New type */
struct type *tmp_type = type; /* tmp type */
@@ -517,6 +518,9 @@ make_cv_type (int cnst, int voltl, struct type *type, struct type **typeptr)
if (voltl)
new_flags |= TYPE_FLAG_VOLATILE;
+ if (restrct)
+ new_flags |= TYPE_FLAG_RESTRICT;
+
if (typeptr && *typeptr != NULL)
{
/* Objfile is per-core-type. This const-qualified type had best
@@ -1371,7 +1375,7 @@ struct type *
check_typedef (struct type *type)
{
struct type *orig_type = type;
- int is_const, is_volatile;
+ int is_const, is_volatile, is_restrict;
while (TYPE_CODE (type) == TYPE_CODE_TYPEDEF)
{
@@ -1407,6 +1411,7 @@ check_typedef (struct type *type)
is_const = TYPE_CONST (type);
is_volatile = TYPE_VOLATILE (type);
+ is_restrict = TYPE_RESTRICT (type);
/* If this is a struct/class/union with no fields, then check whether a
full definition exists somewhere else. This is for systems where a
@@ -1424,7 +1429,7 @@ check_typedef (struct type *type)
}
newtype = lookup_transparent_type (name);
if (newtype)
- make_cv_type (is_const, is_volatile, newtype, &type);
+ make_cvr_type (is_const, is_volatile, is_restrict, newtype, &type);
}
/* Otherwise, rely on the stub flag being set for opaque/stubbed types */
else if (TYPE_STUB (type) && !currently_reading_symtab)
@@ -1442,7 +1447,8 @@ check_typedef (struct type *type)
}
sym = lookup_symbol (name, 0, STRUCT_DOMAIN, 0, (struct symtab **) NULL);
if (sym)
- make_cv_type (is_const, is_volatile, SYMBOL_TYPE (sym), &type);
+ make_cvr_type (is_const, is_volatile, is_restrict, SYMBOL_TYPE (sym),
+ &type);
}
if (TYPE_TARGET_STUB (type))
diff --git a/contrib/gdb/gdb/gdbtypes.h b/contrib/gdb/gdb/gdbtypes.h
index c0696ad..bd37712 100644
--- a/contrib/gdb/gdb/gdbtypes.h
+++ b/contrib/gdb/gdb/gdbtypes.h
@@ -273,6 +273,13 @@ enum type_code
#define TYPE_ADDRESS_CLASS_ALL(t) (TYPE_INSTANCE_FLAGS(t) \
& TYPE_FLAG_ADDRESS_CLASS_ALL)
+/* Restrict type. If this is set, the corresponding type has a
+ * restrict modifier.
+ */
+
+#define TYPE_FLAG_RESTRICT (1 << 17)
+#define TYPE_RESTRICT(t) (TYPE_INSTANCE_FLAGS (t) & TYPE_FLAG_RESTRICT)
+
/* Array bound type. */
enum array_bound_type
{
@@ -1099,7 +1106,8 @@ extern struct type *lookup_reference_type (struct type *);
extern struct type *make_reference_type (struct type *, struct type **);
-extern struct type *make_cv_type (int, int, struct type *, struct type **);
+extern struct type *make_cvr_type (int, int, int, struct type *,
+ struct type **);
extern void replace_type (struct type *, struct type *);
diff --git a/contrib/gdb/gdb/hpread.c b/contrib/gdb/gdb/hpread.c
index d345a04..82cda28 100644
--- a/contrib/gdb/gdb/hpread.c
+++ b/contrib/gdb/gdb/hpread.c
@@ -4939,8 +4939,9 @@ hpread_type_lookup (dnttpointer hp_type, struct objfile *objfile)
* "m_void" modifiers? Is static_flag really needed here?
* (m_static used for methods of classes, elsewhere).
*/
- tmp_type = make_cv_type (dn_bufp->dmodifier.m_const,
+ tmp_type = make_cvr_type (dn_bufp->dmodifier.m_const,
dn_bufp->dmodifier.m_volatile,
+ 0,
hpread_type_lookup (dn_bufp->dmodifier.type, objfile),
0);
return tmp_type;
diff --git a/contrib/gdb/gdb/parse.c b/contrib/gdb/gdb/parse.c
index 374e88e..8e6c80a 100644
--- a/contrib/gdb/gdb/parse.c
+++ b/contrib/gdb/gdb/parse.c
@@ -1167,13 +1167,15 @@ follow_types (struct type *follow_type)
case tp_end:
done = 1;
if (make_const)
- follow_type = make_cv_type (make_const,
- TYPE_VOLATILE (follow_type),
- follow_type, 0);
+ follow_type = make_cvr_type (make_const,
+ TYPE_VOLATILE (follow_type),
+ TYPE_RESTRICT (follow_type),
+ follow_type, 0);
if (make_volatile)
- follow_type = make_cv_type (TYPE_CONST (follow_type),
- make_volatile,
- follow_type, 0);
+ follow_type = make_cvr_type (TYPE_CONST (follow_type),
+ make_volatile,
+ TYPE_RESTRICT (follow_type),
+ follow_type, 0);
if (make_addr_space)
follow_type = make_type_with_address_space (follow_type,
make_addr_space);
@@ -1192,13 +1194,15 @@ follow_types (struct type *follow_type)
case tp_pointer:
follow_type = lookup_pointer_type (follow_type);
if (make_const)
- follow_type = make_cv_type (make_const,
- TYPE_VOLATILE (follow_type),
- follow_type, 0);
+ follow_type = make_cvr_type (make_const,
+ TYPE_VOLATILE (follow_type),
+ TYPE_RESTRICT (follow_type),
+ follow_type, 0);
if (make_volatile)
- follow_type = make_cv_type (TYPE_CONST (follow_type),
- make_volatile,
- follow_type, 0);
+ follow_type = make_cvr_type (TYPE_CONST (follow_type),
+ make_volatile,
+ TYPE_RESTRICT (follow_type),
+ follow_type, 0);
if (make_addr_space)
follow_type = make_type_with_address_space (follow_type,
make_addr_space);
@@ -1208,13 +1212,15 @@ follow_types (struct type *follow_type)
case tp_reference:
follow_type = lookup_reference_type (follow_type);
if (make_const)
- follow_type = make_cv_type (make_const,
- TYPE_VOLATILE (follow_type),
- follow_type, 0);
+ follow_type = make_cvr_type (make_const,
+ TYPE_VOLATILE (follow_type),
+ TYPE_RESTRICT (follow_type),
+ follow_type, 0);
if (make_volatile)
- follow_type = make_cv_type (TYPE_CONST (follow_type),
- make_volatile,
- follow_type, 0);
+ follow_type = make_cvr_type (TYPE_CONST (follow_type),
+ make_volatile,
+ TYPE_RESTRICT (follow_type),
+ follow_type, 0);
if (make_addr_space)
follow_type = make_type_with_address_space (follow_type,
make_addr_space);
diff --git a/contrib/gdb/gdb/stabsread.c b/contrib/gdb/gdb/stabsread.c
index 5cee516..1f4512b 100644
--- a/contrib/gdb/gdb/stabsread.c
+++ b/contrib/gdb/gdb/stabsread.c
@@ -1750,13 +1750,13 @@ again:
case 'k': /* Const qualifier on some type (Sun) */
type = read_type (pp, objfile);
- type = make_cv_type (1, TYPE_VOLATILE (type), type,
+ type = make_cvr_type (1, TYPE_VOLATILE (type), TYPE_RESTRICT(type), type,
dbx_lookup_type (typenums));
break;
case 'B': /* Volatile qual on some type (Sun) */
type = read_type (pp, objfile);
- type = make_cv_type (TYPE_CONST (type), 1, type,
+ type = make_cvr_type (TYPE_CONST (type), 1, TYPE_RESTRICT(type), type,
dbx_lookup_type (typenums));
break;
diff --git a/contrib/gdtoa/makefile b/contrib/gdtoa/makefile
index b1f18cd..97bd44f 100644
--- a/contrib/gdtoa/makefile
+++ b/contrib/gdtoa/makefile
@@ -26,6 +26,8 @@
.SUFFIXES: .c .o
CC = cc
CFLAGS = -g
+AR ?= ar
+ARFLAGS ?= ruv
.c.o:
$(CC) -c $(CFLAGS) $*.c
@@ -52,12 +54,12 @@ gdtoa.a: dmisc.c dtoa.c g_Qfmt.c g__fmt.c g_ddfmt.c g_dfmt.c\
strtopx.c strtopxL.c strtorQ.c strtord.c strtordd.c strtorf.c\
strtorx.c strtorxL.c sum.c ulp.c
$(CC) -c $(CFLAGS) $?
- x=`echo $? | sed 's/\.c/.o/g'` && ar ruv gdtoa.a $$x && rm $$x
+ x=`echo $? | sed 's/\.c/.o/g'` && $(AR) $(ARFLAGS) gdtoa.a $$x && rm $$x
ranlib gdtoa.a || true
Printf: all printf.c
$(CC) -c $(CFLAGS) printf.c
- ar ruv gdtoa.a printf.o
+ $(AR) $(ARFLAGS) gdtoa.a printf.o
rm printf.o
touch Printf
diff --git a/contrib/gperf/lib/Makefile.in b/contrib/gperf/lib/Makefile.in
index 8412d44..26dca93 100644
--- a/contrib/gperf/lib/Makefile.in
+++ b/contrib/gperf/lib/Makefile.in
@@ -43,8 +43,8 @@ CXXCPP = @CXXCPP@
# Both C and C++ compiler
OBJEXT = @OBJEXT@
# Other
-AR = ar
-AR_FLAGS = rc
+AR = @AR@
+ARFLAGS = @ARFLAGS@
RANLIB = @RANLIB@
MV = mv
LN = ln
@@ -71,7 +71,7 @@ all : $(TARGETLIB)
$(TARGETLIB): $(OBJECTS)
$(RM) $@
- $(AR) $(AR_FLAGS) $@ $(OBJECTS)
+ $(AR) $(ARFLAGS) $@ $(OBJECTS)
$(RANLIB) $@
# Don't use implicit rules, since AIX "make" and OSF/1 "make" don't always
diff --git a/lib/libc/gen/unvis.3 b/contrib/libc-vis/unvis.3
index 9164f79..472c49d 100644
--- a/lib/libc/gen/unvis.3
+++ b/contrib/libc-vis/unvis.3
@@ -1,3 +1,6 @@
+.\" $NetBSD: unvis.3,v 1.23 2011/03/17 14:06:29 wiz Exp $
+.\" $FreeBSD$
+.\"
.\" Copyright (c) 1989, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -9,7 +12,7 @@
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
-.\" 4. Neither the name of the University nor the names of its contributors
+.\" 3. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
@@ -26,9 +29,8 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)unvis.3 8.2 (Berkeley) 12/11/93
-.\" $FreeBSD$
.\"
-.Dd December 11, 1993
+.Dd March 12, 2011
.Dt UNVIS 3
.Os
.Sh NAME
@@ -44,7 +46,11 @@
.Ft int
.Fn strunvis "char *dst" "const char *src"
.Ft int
+.Fn strnunvis "char *dst" "size_t dlen" "const char *src"
+.Ft int
.Fn strunvisx "char *dst" "const char *src" "int flag"
+.Ft int
+.Fn strnunvisx "char *dst" "size_t dlen" "const char *src" "int flag"
.Sh DESCRIPTION
The
.Fn unvis ,
@@ -57,37 +63,37 @@ by the
.Xr vis 3
function, back into
the original form.
-Unvis is called with successive characters in
-.Fa c
-until a valid
-sequence is recognized, at which time the decoded character is
-available at the character pointed to by
-.Fa cp .
-Strunvis decodes the
-characters pointed to by
-.Fa src
-into the buffer pointed to by
-.Fa dst .
+.Pp
+The
+.Fn unvis
+function is called with successive characters in
+.Ar c
+until a valid sequence is recognized, at which time the decoded
+character is available at the character pointed to by
+.Ar cp .
.Pp
The
.Fn strunvis
-function
-simply copies
-.Fa src
+function decodes the characters pointed to by
+.Ar src
+into the buffer pointed to by
+.Ar dst .
+The
+.Fn strunvis
+function simply copies
+.Ar src
to
-.Fa dst ,
+.Ar dst ,
decoding any escape sequences along the way,
and returns the number of characters placed into
-.Fa dst ,
+.Ar dst ,
or \-1 if an
invalid escape sequence was detected.
The size of
-.Fa dst
-should be
-equal to the size of
-.Fa src
-(that is, no expansion takes place during
-decoding).
+.Ar dst
+should be equal to the size of
+.Ar src
+(that is, no expansion takes place during decoding).
.Pp
The
.Fn strunvisx
@@ -95,32 +101,29 @@ function does the same as the
.Fn strunvis
function,
but it allows you to add a flag that specifies the style the string
-.Fa src
+.Ar src
is encoded with.
-Currently, the only supported flag is
-.Dv VIS_HTTPSTYLE .
+Currently, the supported flags are:
+.Dv VIS_HTTPSTYLE
+and
+.Dv VIS_MIMESTYLE .
.Pp
The
.Fn unvis
-function
-implements a state machine that can be used to decode an arbitrary
-stream of bytes.
-All state associated with the bytes being decoded
-is stored outside the
+function implements a state machine that can be used to decode an
+arbitrary stream of bytes.
+All state associated with the bytes being decoded is stored outside the
.Fn unvis
function (that is, a pointer to the state is passed in), so
calls decoding different streams can be freely intermixed.
-To
-start decoding a stream of bytes, first initialize an integer
-to zero.
+To start decoding a stream of bytes, first initialize an integer to zero.
Call
.Fn unvis
with each successive byte, along with a pointer
to this integer, and a pointer to a destination character.
The
.Fn unvis
-function
-has several return codes that must be handled properly.
+function has several return codes that must be handled properly.
They are:
.Bl -tag -width UNVIS_VALIDPUSH
.It Li \&0 (zero)
@@ -134,29 +137,39 @@ pointed to by cp; however, the character currently passed in should
be passed in again.
.It Dv UNVIS_NOCHAR
A valid sequence was detected, but no character was produced.
-This
-return code is necessary to indicate a logical break between characters.
+This return code is necessary to indicate a logical break between characters.
.It Dv UNVIS_SYNBAD
-An invalid escape sequence was detected, or the decoder is in an
-unknown state.
+An invalid escape sequence was detected, or the decoder is in an unknown state.
The decoder is placed into the starting state.
.El
.Pp
When all bytes in the stream have been processed, call
.Fn unvis
-one more time with
-.Fa flag
-set to
+one more time with flag set to
.Dv UNVIS_END
to extract any remaining character (the character passed in is ignored).
.Pp
The
-.Fa flag
+.Ar flag
argument is also used to specify the encoding style of the source.
If set to
-.Dv VIS_HTTPSTYLE ,
+.Dv VIS_HTTPSTYLE
+or
+.Dv VIS_HTTP1808 ,
.Fn unvis
will decode URI strings as specified in RFC 1808.
+If set to
+.Dv VIS_HTTP1866 ,
+.Fn unvis
+will decode URI strings as specified in RFC 1866.
+If set to
+.Dv VIS_MIMESTYLE ,
+.Fn unvis
+will decode MIME Quoted-Printable strings as specified in RFC 2045.
+If set to
+.Dv VIS_NOESCAPE ,
+.Fn unvis
+will not decode \e quoted characters.
.Pp
The following code fragment illustrates a proper use of
.Fn unvis .
@@ -166,25 +179,51 @@ char out;
while ((ch = getchar()) != EOF) {
again:
- switch(unvis(&out, ch, &state, 0)) {
+ switch(unvis(\*[Am]out, ch, \*[Am]state, 0)) {
case 0:
case UNVIS_NOCHAR:
break;
case UNVIS_VALID:
- (void) putchar(out);
+ (void)putchar(out);
break;
case UNVIS_VALIDPUSH:
- (void) putchar(out);
+ (void)putchar(out);
goto again;
case UNVIS_SYNBAD:
- (void)fprintf(stderr, "bad sequence!\en");
- exit(1);
+ errx(EXIT_FAILURE, "Bad character sequence!");
}
}
-if (unvis(&out, (char)0, &state, UNVIS_END) == UNVIS_VALID)
- (void) putchar(out);
+if (unvis(\*[Am]out, '\e0', \*[Am]state, UNVIS_END) == UNVIS_VALID)
+ (void)putchar(out);
.Ed
+.Sh ERRORS
+The functions
+.Fn strunvis ,
+.Fn strnunvis ,
+.Fn strunvisx ,
+and
+.Fn strnunvisx
+will return \-1 on error and set
+.Va errno
+to:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+An invalid escape sequence was detected, or the decoder is in an unknown state.
+.El
+.Pp
+In addition the functions
+.Fn strnunvis
+and
+.Fn strnunvisx
+will can also set
+.Va errno
+on error to:
+.Bl -tag -width Er
+.It Bq Er ENOSPC
+Not enough space to perform the conversion.
+.El
.Sh SEE ALSO
+.Xr unvis 1 ,
.Xr vis 1 ,
.Xr vis 3
.Rs
@@ -198,3 +237,11 @@ The
function
first appeared in
.Bx 4.4 .
+The
+.Fn strnunvis
+and
+.Fn strnunvisx
+functions appeared in
+.Nx 6.0
+and
+.Fx 10.0 .
diff --git a/contrib/libc-vis/unvis.c b/contrib/libc-vis/unvis.c
new file mode 100644
index 0000000..d87812a
--- /dev/null
+++ b/contrib/libc-vis/unvis.c
@@ -0,0 +1,562 @@
+/* $NetBSD: unvis.c,v 1.40 2012/12/14 21:31:01 christos Exp $ */
+
+/*-
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+#if defined(LIBC_SCCS) && !defined(lint)
+#if 0
+static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/4/93";
+#else
+__RCSID("$NetBSD: unvis.c,v 1.40 2012/12/14 21:31:01 christos Exp $");
+#endif
+#endif /* LIBC_SCCS and not lint */
+__FBSDID("$FreeBSD$");
+
+#include "namespace.h"
+#include <sys/types.h>
+
+#include <assert.h>
+#include <ctype.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <errno.h>
+#include <vis.h>
+
+#define _DIAGASSERT(x) assert(x)
+
+/*
+ * Return the number of elements in a statically-allocated array,
+ * __x.
+ */
+#define __arraycount(__x) (sizeof(__x) / sizeof(__x[0]))
+
+#ifdef __weak_alias
+__weak_alias(strnunvisx,_strnunvisx)
+#endif
+
+#if !HAVE_VIS
+/*
+ * decode driven by state machine
+ */
+#define S_GROUND 0 /* haven't seen escape char */
+#define S_START 1 /* start decoding special sequence */
+#define S_META 2 /* metachar started (M) */
+#define S_META1 3 /* metachar more, regular char (-) */
+#define S_CTRL 4 /* control char started (^) */
+#define S_OCTAL2 5 /* octal digit 2 */
+#define S_OCTAL3 6 /* octal digit 3 */
+#define S_HEX 7 /* mandatory hex digit */
+#define S_HEX1 8 /* http hex digit */
+#define S_HEX2 9 /* http hex digit 2 */
+#define S_MIME1 10 /* mime hex digit 1 */
+#define S_MIME2 11 /* mime hex digit 2 */
+#define S_EATCRNL 12 /* mime eating CRNL */
+#define S_AMP 13 /* seen & */
+#define S_NUMBER 14 /* collecting number */
+#define S_STRING 15 /* collecting string */
+
+#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
+#define xtod(c) (isdigit(c) ? (c - '0') : ((tolower(c) - 'a') + 10))
+#define XTOD(c) (isdigit(c) ? (c - '0') : ((c - 'A') + 10))
+
+/*
+ * RFC 1866
+ */
+static const struct nv {
+ const char name[7];
+ uint8_t value;
+} nv[] = {
+ { "AElig", 198 }, /* capital AE diphthong (ligature) */
+ { "Aacute", 193 }, /* capital A, acute accent */
+ { "Acirc", 194 }, /* capital A, circumflex accent */
+ { "Agrave", 192 }, /* capital A, grave accent */
+ { "Aring", 197 }, /* capital A, ring */
+ { "Atilde", 195 }, /* capital A, tilde */
+ { "Auml", 196 }, /* capital A, dieresis or umlaut mark */
+ { "Ccedil", 199 }, /* capital C, cedilla */
+ { "ETH", 208 }, /* capital Eth, Icelandic */
+ { "Eacute", 201 }, /* capital E, acute accent */
+ { "Ecirc", 202 }, /* capital E, circumflex accent */
+ { "Egrave", 200 }, /* capital E, grave accent */
+ { "Euml", 203 }, /* capital E, dieresis or umlaut mark */
+ { "Iacute", 205 }, /* capital I, acute accent */
+ { "Icirc", 206 }, /* capital I, circumflex accent */
+ { "Igrave", 204 }, /* capital I, grave accent */
+ { "Iuml", 207 }, /* capital I, dieresis or umlaut mark */
+ { "Ntilde", 209 }, /* capital N, tilde */
+ { "Oacute", 211 }, /* capital O, acute accent */
+ { "Ocirc", 212 }, /* capital O, circumflex accent */
+ { "Ograve", 210 }, /* capital O, grave accent */
+ { "Oslash", 216 }, /* capital O, slash */
+ { "Otilde", 213 }, /* capital O, tilde */
+ { "Ouml", 214 }, /* capital O, dieresis or umlaut mark */
+ { "THORN", 222 }, /* capital THORN, Icelandic */
+ { "Uacute", 218 }, /* capital U, acute accent */
+ { "Ucirc", 219 }, /* capital U, circumflex accent */
+ { "Ugrave", 217 }, /* capital U, grave accent */
+ { "Uuml", 220 }, /* capital U, dieresis or umlaut mark */
+ { "Yacute", 221 }, /* capital Y, acute accent */
+ { "aacute", 225 }, /* small a, acute accent */
+ { "acirc", 226 }, /* small a, circumflex accent */
+ { "acute", 180 }, /* acute accent */
+ { "aelig", 230 }, /* small ae diphthong (ligature) */
+ { "agrave", 224 }, /* small a, grave accent */
+ { "amp", 38 }, /* ampersand */
+ { "aring", 229 }, /* small a, ring */
+ { "atilde", 227 }, /* small a, tilde */
+ { "auml", 228 }, /* small a, dieresis or umlaut mark */
+ { "brvbar", 166 }, /* broken (vertical) bar */
+ { "ccedil", 231 }, /* small c, cedilla */
+ { "cedil", 184 }, /* cedilla */
+ { "cent", 162 }, /* cent sign */
+ { "copy", 169 }, /* copyright sign */
+ { "curren", 164 }, /* general currency sign */
+ { "deg", 176 }, /* degree sign */
+ { "divide", 247 }, /* divide sign */
+ { "eacute", 233 }, /* small e, acute accent */
+ { "ecirc", 234 }, /* small e, circumflex accent */
+ { "egrave", 232 }, /* small e, grave accent */
+ { "eth", 240 }, /* small eth, Icelandic */
+ { "euml", 235 }, /* small e, dieresis or umlaut mark */
+ { "frac12", 189 }, /* fraction one-half */
+ { "frac14", 188 }, /* fraction one-quarter */
+ { "frac34", 190 }, /* fraction three-quarters */
+ { "gt", 62 }, /* greater than */
+ { "iacute", 237 }, /* small i, acute accent */
+ { "icirc", 238 }, /* small i, circumflex accent */
+ { "iexcl", 161 }, /* inverted exclamation mark */
+ { "igrave", 236 }, /* small i, grave accent */
+ { "iquest", 191 }, /* inverted question mark */
+ { "iuml", 239 }, /* small i, dieresis or umlaut mark */
+ { "laquo", 171 }, /* angle quotation mark, left */
+ { "lt", 60 }, /* less than */
+ { "macr", 175 }, /* macron */
+ { "micro", 181 }, /* micro sign */
+ { "middot", 183 }, /* middle dot */
+ { "nbsp", 160 }, /* no-break space */
+ { "not", 172 }, /* not sign */
+ { "ntilde", 241 }, /* small n, tilde */
+ { "oacute", 243 }, /* small o, acute accent */
+ { "ocirc", 244 }, /* small o, circumflex accent */
+ { "ograve", 242 }, /* small o, grave accent */
+ { "ordf", 170 }, /* ordinal indicator, feminine */
+ { "ordm", 186 }, /* ordinal indicator, masculine */
+ { "oslash", 248 }, /* small o, slash */
+ { "otilde", 245 }, /* small o, tilde */
+ { "ouml", 246 }, /* small o, dieresis or umlaut mark */
+ { "para", 182 }, /* pilcrow (paragraph sign) */
+ { "plusmn", 177 }, /* plus-or-minus sign */
+ { "pound", 163 }, /* pound sterling sign */
+ { "quot", 34 }, /* double quote */
+ { "raquo", 187 }, /* angle quotation mark, right */
+ { "reg", 174 }, /* registered sign */
+ { "sect", 167 }, /* section sign */
+ { "shy", 173 }, /* soft hyphen */
+ { "sup1", 185 }, /* superscript one */
+ { "sup2", 178 }, /* superscript two */
+ { "sup3", 179 }, /* superscript three */
+ { "szlig", 223 }, /* small sharp s, German (sz ligature) */
+ { "thorn", 254 }, /* small thorn, Icelandic */
+ { "times", 215 }, /* multiply sign */
+ { "uacute", 250 }, /* small u, acute accent */
+ { "ucirc", 251 }, /* small u, circumflex accent */
+ { "ugrave", 249 }, /* small u, grave accent */
+ { "uml", 168 }, /* umlaut (dieresis) */
+ { "uuml", 252 }, /* small u, dieresis or umlaut mark */
+ { "yacute", 253 }, /* small y, acute accent */
+ { "yen", 165 }, /* yen sign */
+ { "yuml", 255 }, /* small y, dieresis or umlaut mark */
+};
+
+/*
+ * unvis - decode characters previously encoded by vis
+ */
+int
+unvis(char *cp, int c, int *astate, int flag)
+{
+ unsigned char uc = (unsigned char)c;
+ unsigned char st, ia, is, lc;
+
+/*
+ * Bottom 8 bits of astate hold the state machine state.
+ * Top 8 bits hold the current character in the http 1866 nv string decoding
+ */
+#define GS(a) ((a) & 0xff)
+#define SS(a, b) (((uint32_t)(a) << 24) | (b))
+#define GI(a) ((uint32_t)(a) >> 24)
+
+ _DIAGASSERT(cp != NULL);
+ _DIAGASSERT(astate != NULL);
+ st = GS(*astate);
+
+ if (flag & UNVIS_END) {
+ switch (st) {
+ case S_OCTAL2:
+ case S_OCTAL3:
+ case S_HEX2:
+ *astate = SS(0, S_GROUND);
+ return UNVIS_VALID;
+ case S_GROUND:
+ return UNVIS_NOCHAR;
+ default:
+ return UNVIS_SYNBAD;
+ }
+ }
+
+ switch (st) {
+
+ case S_GROUND:
+ *cp = 0;
+ if ((flag & VIS_NOESCAPE) == 0 && c == '\\') {
+ *astate = SS(0, S_START);
+ return UNVIS_NOCHAR;
+ }
+ if ((flag & VIS_HTTP1808) && c == '%') {
+ *astate = SS(0, S_HEX1);
+ return UNVIS_NOCHAR;
+ }
+ if ((flag & VIS_HTTP1866) && c == '&') {
+ *astate = SS(0, S_AMP);
+ return UNVIS_NOCHAR;
+ }
+ if ((flag & VIS_MIMESTYLE) && c == '=') {
+ *astate = SS(0, S_MIME1);
+ return UNVIS_NOCHAR;
+ }
+ *cp = c;
+ return UNVIS_VALID;
+
+ case S_START:
+ switch(c) {
+ case '\\':
+ *cp = c;
+ *astate = SS(0, S_GROUND);
+ return UNVIS_VALID;
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ *cp = (c - '0');
+ *astate = SS(0, S_OCTAL2);
+ return UNVIS_NOCHAR;
+ case 'M':
+ *cp = (char)0200;
+ *astate = SS(0, S_META);
+ return UNVIS_NOCHAR;
+ case '^':
+ *astate = SS(0, S_CTRL);
+ return UNVIS_NOCHAR;
+ case 'n':
+ *cp = '\n';
+ *astate = SS(0, S_GROUND);
+ return UNVIS_VALID;
+ case 'r':
+ *cp = '\r';
+ *astate = SS(0, S_GROUND);
+ return UNVIS_VALID;
+ case 'b':
+ *cp = '\b';
+ *astate = SS(0, S_GROUND);
+ return UNVIS_VALID;
+ case 'a':
+ *cp = '\007';
+ *astate = SS(0, S_GROUND);
+ return UNVIS_VALID;
+ case 'v':
+ *cp = '\v';
+ *astate = SS(0, S_GROUND);
+ return UNVIS_VALID;
+ case 't':
+ *cp = '\t';
+ *astate = SS(0, S_GROUND);
+ return UNVIS_VALID;
+ case 'f':
+ *cp = '\f';
+ *astate = SS(0, S_GROUND);
+ return UNVIS_VALID;
+ case 's':
+ *cp = ' ';
+ *astate = SS(0, S_GROUND);
+ return UNVIS_VALID;
+ case 'E':
+ *cp = '\033';
+ *astate = SS(0, S_GROUND);
+ return UNVIS_VALID;
+ case 'x':
+ *astate = SS(0, S_HEX);
+ return UNVIS_NOCHAR;
+ case '\n':
+ /*
+ * hidden newline
+ */
+ *astate = SS(0, S_GROUND);
+ return UNVIS_NOCHAR;
+ case '$':
+ /*
+ * hidden marker
+ */
+ *astate = SS(0, S_GROUND);
+ return UNVIS_NOCHAR;
+ }
+ goto bad;
+
+ case S_META:
+ if (c == '-')
+ *astate = SS(0, S_META1);
+ else if (c == '^')
+ *astate = SS(0, S_CTRL);
+ else
+ goto bad;
+ return UNVIS_NOCHAR;
+
+ case S_META1:
+ *astate = SS(0, S_GROUND);
+ *cp |= c;
+ return UNVIS_VALID;
+
+ case S_CTRL:
+ if (c == '?')
+ *cp |= 0177;
+ else
+ *cp |= c & 037;
+ *astate = SS(0, S_GROUND);
+ return UNVIS_VALID;
+
+ case S_OCTAL2: /* second possible octal digit */
+ if (isoctal(uc)) {
+ /*
+ * yes - and maybe a third
+ */
+ *cp = (*cp << 3) + (c - '0');
+ *astate = SS(0, S_OCTAL3);
+ return UNVIS_NOCHAR;
+ }
+ /*
+ * no - done with current sequence, push back passed char
+ */
+ *astate = SS(0, S_GROUND);
+ return UNVIS_VALIDPUSH;
+
+ case S_OCTAL3: /* third possible octal digit */
+ *astate = SS(0, S_GROUND);
+ if (isoctal(uc)) {
+ *cp = (*cp << 3) + (c - '0');
+ return UNVIS_VALID;
+ }
+ /*
+ * we were done, push back passed char
+ */
+ return UNVIS_VALIDPUSH;
+
+ case S_HEX:
+ if (!isxdigit(uc))
+ goto bad;
+ /*FALLTHROUGH*/
+ case S_HEX1:
+ if (isxdigit(uc)) {
+ *cp = xtod(uc);
+ *astate = SS(0, S_HEX2);
+ return UNVIS_NOCHAR;
+ }
+ /*
+ * no - done with current sequence, push back passed char
+ */
+ *astate = SS(0, S_GROUND);
+ return UNVIS_VALIDPUSH;
+
+ case S_HEX2:
+ *astate = S_GROUND;
+ if (isxdigit(uc)) {
+ *cp = xtod(uc) | (*cp << 4);
+ return UNVIS_VALID;
+ }
+ return UNVIS_VALIDPUSH;
+
+ case S_MIME1:
+ if (uc == '\n' || uc == '\r') {
+ *astate = SS(0, S_EATCRNL);
+ return UNVIS_NOCHAR;
+ }
+ if (isxdigit(uc) && (isdigit(uc) || isupper(uc))) {
+ *cp = XTOD(uc);
+ *astate = SS(0, S_MIME2);
+ return UNVIS_NOCHAR;
+ }
+ goto bad;
+
+ case S_MIME2:
+ if (isxdigit(uc) && (isdigit(uc) || isupper(uc))) {
+ *astate = SS(0, S_GROUND);
+ *cp = XTOD(uc) | (*cp << 4);
+ return UNVIS_VALID;
+ }
+ goto bad;
+
+ case S_EATCRNL:
+ switch (uc) {
+ case '\r':
+ case '\n':
+ return UNVIS_NOCHAR;
+ case '=':
+ *astate = SS(0, S_MIME1);
+ return UNVIS_NOCHAR;
+ default:
+ *cp = uc;
+ *astate = SS(0, S_GROUND);
+ return UNVIS_VALID;
+ }
+
+ case S_AMP:
+ *cp = 0;
+ if (uc == '#') {
+ *astate = SS(0, S_NUMBER);
+ return UNVIS_NOCHAR;
+ }
+ *astate = SS(0, S_STRING);
+ /*FALLTHROUGH*/
+
+ case S_STRING:
+ ia = *cp; /* index in the array */
+ is = GI(*astate); /* index in the string */
+ lc = is == 0 ? 0 : nv[ia].name[is - 1]; /* last character */
+
+ if (uc == ';')
+ uc = '\0';
+
+ for (; ia < __arraycount(nv); ia++) {
+ if (is != 0 && nv[ia].name[is - 1] != lc)
+ goto bad;
+ if (nv[ia].name[is] == uc)
+ break;
+ }
+
+ if (ia == __arraycount(nv))
+ goto bad;
+
+ if (uc != 0) {
+ *cp = ia;
+ *astate = SS(is + 1, S_STRING);
+ return UNVIS_NOCHAR;
+ }
+
+ *cp = nv[ia].value;
+ *astate = SS(0, S_GROUND);
+ return UNVIS_VALID;
+
+ case S_NUMBER:
+ if (uc == ';')
+ return UNVIS_VALID;
+ if (!isdigit(uc))
+ goto bad;
+ *cp += (*cp * 10) + uc - '0';
+ return UNVIS_NOCHAR;
+
+ default:
+ bad:
+ /*
+ * decoder in unknown state - (probably uninitialized)
+ */
+ *astate = SS(0, S_GROUND);
+ return UNVIS_SYNBAD;
+ }
+}
+
+/*
+ * strnunvisx - decode src into dst
+ *
+ * Number of chars decoded into dst is returned, -1 on error.
+ * Dst is null terminated.
+ */
+
+int
+strnunvisx(char *dst, size_t dlen, const char *src, int flag)
+{
+ char c;
+ char t = '\0', *start = dst;
+ int state = 0;
+
+ _DIAGASSERT(src != NULL);
+ _DIAGASSERT(dst != NULL);
+#define CHECKSPACE() \
+ do { \
+ if (dlen-- == 0) { \
+ errno = ENOSPC; \
+ return -1; \
+ } \
+ } while (/*CONSTCOND*/0)
+
+ while ((c = *src++) != '\0') {
+ again:
+ switch (unvis(&t, c, &state, flag)) {
+ case UNVIS_VALID:
+ CHECKSPACE();
+ *dst++ = t;
+ break;
+ case UNVIS_VALIDPUSH:
+ CHECKSPACE();
+ *dst++ = t;
+ goto again;
+ case 0:
+ case UNVIS_NOCHAR:
+ break;
+ case UNVIS_SYNBAD:
+ errno = EINVAL;
+ return -1;
+ default:
+ _DIAGASSERT(/*CONSTCOND*/0);
+ errno = EINVAL;
+ return -1;
+ }
+ }
+ if (unvis(&t, c, &state, UNVIS_END) == UNVIS_VALID) {
+ CHECKSPACE();
+ *dst++ = t;
+ }
+ CHECKSPACE();
+ *dst = '\0';
+ return (int)(dst - start);
+}
+
+int
+strunvisx(char *dst, const char *src, int flag)
+{
+ return strnunvisx(dst, (size_t)~0, src, flag);
+}
+
+int
+strunvis(char *dst, const char *src)
+{
+ return strnunvisx(dst, (size_t)~0, src, 0);
+}
+
+int
+strnunvis(char *dst, size_t dlen, const char *src)
+{
+ return strnunvisx(dst, dlen, src, 0);
+}
+#endif
diff --git a/lib/libc/gen/vis.3 b/contrib/libc-vis/vis.3
index 8ec16eb..6f5b15f 100644
--- a/lib/libc/gen/vis.3
+++ b/contrib/libc-vis/vis.3
@@ -1,3 +1,6 @@
+.\" $NetBSD: vis.3,v 1.29 2012/12/14 22:55:59 christos Exp $
+.\" $FreeBSD$
+.\"
.\" Copyright (c) 1989, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -9,7 +12,7 @@
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
-.\" 4. Neither the name of the University nor the names of its contributors
+.\" 3. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
@@ -25,14 +28,24 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" From: @(#)vis.3 8.1 (Berkeley) 6/9/93
-.\" $FreeBSD$
+.\" @(#)vis.3 8.1 (Berkeley) 6/9/93
.\"
-.Dd April 9, 2006
+.Dd December 14, 2012
.Dt VIS 3
.Os
.Sh NAME
-.Nm vis
+.Nm vis ,
+.Nm nvis ,
+.Nm strvis ,
+.Nm strnvis ,
+.Nm strvisx ,
+.Nm strnvisx ,
+.Nm svis ,
+.Nm snvis ,
+.Nm strsvis ,
+.Nm strsnvis ,
+.Nm strsvisx
+.Nm strsnvisx
.Nd visually encode characters
.Sh LIBRARY
.Lb libc
@@ -40,10 +53,28 @@
.In vis.h
.Ft char *
.Fn vis "char *dst" "int c" "int flag" "int nextc"
+.Ft char *
+.Fn nvis "char *dst" "size_t dlen" "int c" "int flag" "int nextc"
.Ft int
.Fn strvis "char *dst" "const char *src" "int flag"
.Ft int
+.Fn strnvis "char *dst" "size_t dlen" "const char *src" "int flag"
+.Ft int
.Fn strvisx "char *dst" "const char *src" "size_t len" "int flag"
+.Ft int
+.Fn strnvisx "char *dst" "size_t dlen" "const char *src" "size_t len" "int flag"
+.Ft char *
+.Fn svis "char *dst" "int c" "int flag" "int nextc" "const char *extra"
+.Ft char *
+.Fn snvis "char *dst" "size_t dlen" "int c" "int flag" "int nextc" "const char *extra"
+.Ft int
+.Fn strsvis "char *dst" "const char *src" "int flag" "const char *extra"
+.Ft int
+.Fn strsnvis "char *dst" "size_t dlen" "const char *src" "int flag" "const char *extra"
+.Ft int
+.Fn strsvisx "char *dst" "const char *src" "size_t len" "int flag" "const char *extra"
+.Ft int
+.Fn strsnvisx "char *dst" "size_t dlen" "const char *src" "size_t len" "int flag" "const char *extra"
.Sh DESCRIPTION
The
.Fn vis
@@ -55,8 +86,7 @@ a string which represents the character
If
.Fa c
needs no encoding, it is copied in unaltered.
-The string is
-null terminated, and a pointer to the end of the string is
+The string is null terminated, and a pointer to the end of the string is
returned.
The maximum length of any encoding is four
characters (not including the trailing
@@ -65,9 +95,7 @@ thus, when
encoding a set of characters into a buffer, the size of the buffer should
be four times the number of characters encoded, plus one for the trailing
.Dv NUL .
-The
-.Fa flag
-argument is used for altering the default range of
+The flag parameter is used for altering the default range of
characters considered for encoding and for altering the visual
representation.
The additional character,
@@ -77,9 +105,11 @@ is only used when selecting the
encoding format (explained below).
.Pp
The
-.Fn strvis
+.Fn strvis ,
+.Fn strnvis ,
+.Fn strvisx ,
and
-.Fn strvisx
+.Fn strnvisx
functions copy into
.Fa dst
a visual representation of
@@ -87,14 +117,18 @@ the string
.Fa src .
The
.Fn strvis
-function encodes characters from
+and
+.Fn strnvis
+functions encode characters from
.Fa src
up to the
first
.Dv NUL .
The
.Fn strvisx
-function encodes exactly
+and
+.Fn strnvisx
+functions encode exactly
.Fa len
characters from
.Fa src
@@ -116,19 +150,70 @@ Both
forms return the number of characters in dst (not including
the trailing
.Dv NUL ) .
+The
+.Dq n
+versions of the functions also take an additional argument
+.Fa dlen
+that indicates the length of the
+.Fa dst
+buffer.
+If
+.Fa dlen
+is not large enough to fix the converted string then the
+.Fn strnvis
+and
+.Fn strnvisx
+functions return \-1 and set
+.Va errno
+to
+.Dv ENOSPC .
+.Pp
+The functions
+.Fn svis ,
+.Fn snvis ,
+.Fn strsvis ,
+.Fn strsnvis ,
+.Fn strsvisx ,
+and
+.Fn strsnvisx
+correspond to
+.Fn vis ,
+.Fn nvis ,
+.Fn strvis ,
+.Fn strnvis ,
+.Fn strvisx ,
+and
+.Fn strnvisx
+but have an additional argument
+.Fa extra ,
+pointing to a
+.Dv NUL
+terminated list of characters.
+These characters will be copied encoded or backslash-escaped into
+.Fa dst .
+These functions are useful e.g. to remove the special meaning
+of certain characters to shells.
.Pp
The encoding is a unique, invertible representation composed entirely of
graphic characters; it can be decoded back into the original form using
the
-.Xr unvis 3
-or
+.Xr unvis 3 ,
.Xr strunvis 3
+or
+.Xr strnunvis 3
functions.
.Pp
There are two parameters that can be controlled: the range of
-characters that are encoded, and the type
-of representation used.
-By default, all non-graphic characters
+characters that are encoded (applies only to
+.Fn vis ,
+.Fn nvis ,
+.Fn strvis ,
+.Fn strnvis ,
+.Fn strvisx ,
+and
+.Fn strnvisx ) ,
+and the type of representation used.
+By default, all non-graphic characters,
except space, tab, and newline are encoded.
(See
.Xr isgraph 3 . )
@@ -159,21 +244,43 @@ Synonym for
.Dv VIS_NL .
.It Dv VIS_SAFE
Only encode "unsafe" characters.
-Unsafe means control
-characters which may cause common terminals to perform
+Unsafe means control characters which may cause common terminals to perform
unexpected functions.
-Currently this form allows space,
-tab, newline, backspace, bell, and return - in addition
-to all graphic characters - unencoded.
+Currently this form allows space, tab, newline, backspace, bell, and
+return - in addition to all graphic characters - unencoded.
.El
.Pp
+(The above flags have no effect for
+.Fn svis ,
+.Fn snvis ,
+.Fn strsvis ,
+.Fn strsnvis ,
+.Fn strsvisx ,
+and
+.Fn strsnvisx .
+When using these functions, place all graphic characters to be
+encoded in an array pointed to by
+.Fa extra .
+In general, the backslash character should be included in this array, see the
+warning on the use of the
+.Dv VIS_NOSLASH
+flag below).
+.Pp
There are four forms of encoding.
-Most forms use the backslash character
+All forms use the backslash character
.Ql \e
to introduce a special
-sequence; two backslashes are used to represent a real backslash.
+sequence; two backslashes are used to represent a real backslash,
+except
+.Dv VIS_HTTPSTYLE
+that uses
+.Ql % ,
+or
+.Dv VIS_MIMESTYLE
+that uses
+.Ql = .
These are the visual formats:
-.Bl -tag -width VIS_HTTPSTYLE
+.Bl -tag -width VIS_CSTYLE
.It (default)
Use an
.Ql M
@@ -227,31 +334,19 @@ Represents Meta-space.
Use C-style backslash sequences to represent standard non-printable
characters.
The following sequences are used to represent the indicated characters:
+.Bd -unfilled -offset indent
+.Li \ea Tn - BEL No (007)
+.Li \eb Tn - BS No (010)
+.Li \ef Tn - NP No (014)
+.Li \en Tn - NL No (012)
+.Li \er Tn - CR No (015)
+.Li \es Tn - SP No (040)
+.Li \et Tn - HT No (011)
+.Li \ev Tn - VT No (013)
+.Li \e0 Tn - NUL No (000)
+.Ed
.Pp
-.Bl -tag -width ".Li \e0" -offset indent -compact
-.It Li \ea
-.Dv BEL No (007)
-.It Li \eb
-.Dv BS No (010)
-.It Li \ef
-.Dv NP No (014)
-.It Li \en
-.Dv NL No (012)
-.It Li \er
-.Dv CR No (015)
-.It Li \es
-.Dv SP No (040)
-.It Li \et
-.Dv HT No (011)
-.It Li \ev
-.Dv VT No (013)
-.It Li \e0
-.Dv NUL No (000)
-.El
-.Pp
-When using this format, the
-.Fa nextc
-argument is looked at to determine
+When using this format, the nextc parameter is looked at to determine
if a
.Dv NUL
character can be encoded as
@@ -262,20 +357,28 @@ If
.Fa nextc
is an octal digit, the latter representation is used to
avoid ambiguity.
-.It Dv VIS_HTTPSTYLE
-Use URI encoding as described in RFC 1808.
-The form is
-.Ql %dd
-where
-.Ar d
-represents a hexadecimal digit.
.It Dv VIS_OCTAL
Use a three digit octal sequence.
The form is
.Ql \eddd
where
-.Ar d
+.Em d
represents an octal digit.
+.It Dv VIS_HTTPSTYLE
+Use URI encoding as described in RFC 1738.
+The form is
+.Ql %xx
+where
+.Em x
+represents a lower case hexadecimal digit.
+.It Dv VIS_MIMESTYLE
+Use MIME Quoted-Printable encoding as described in RFC 2045, only don't
+break lines and don't handle CRLF.
+The form is:
+.Ql %XX
+where
+.Em X
+represents an upper case hexadecimal digit.
.El
.Pp
There is one additional flag,
@@ -289,20 +392,65 @@ meta characters as
.Ql M-C ) .
With this flag set, the encoding is
ambiguous and non-invertible.
+.Sh ERRORS
+The functions
+.Fn nvis
+and
+.Fn snvis
+will return
+.Dv NULL
+and the functions
+.Fn strnvis ,
+.Fn strnvisx ,
+.Fn strsnvis ,
+and
+.Fn strsnvisx ,
+will return \-1 when the
+.Fa dlen
+destination buffer length size is not enough to perform the conversion while
+setting
+.Va errno
+to:
+.Bl -tag -width Er
+.It Bq Er ENOSPC
+The destination buffer size is not large enough to perform the conversion.
+.El
.Sh SEE ALSO
.Xr unvis 1 ,
+.Xr vis 1 ,
+.Xr glob 3 ,
.Xr unvis 3
.Rs
-.%A R. Fielding
-.%T Relative Uniform Resource Locators
-.%O RFC1808
+.%A T. Berners-Lee
+.%T Uniform Resource Locators (URL)
+.%O RFC1738
.Re
.Sh HISTORY
-These functions first appeared in
+The
+.Fn vis ,
+.Fn strvis ,
+and
+.Fa strvisx
+functions first appeared in
.Bx 4.4 .
-.Sh BUGS
The
-.Nm
-family of functions do not recognize multibyte characters, and thus
-may consider them to be non-printable when they are in fact printable
-(and vice versa.)
+.Fn svis ,
+.Fn strsvis ,
+and
+.Fn strsvisx
+functions appeared in
+.Nx 1.5
+and
+.Fx 10.0 .
+The buffer size limited versions of the functions
+.Po Fn nvis ,
+.Fn strnvis ,
+.Fn strnvisx ,
+.Fn snvis ,
+.Fn strsnvis ,
+and
+.Fn strsnvisx Pc
+appeared in
+.Nx 6.0
+and
+.Fx 10.0 .
diff --git a/contrib/libc-vis/vis.c b/contrib/libc-vis/vis.c
new file mode 100644
index 0000000..040c28c
--- /dev/null
+++ b/contrib/libc-vis/vis.c
@@ -0,0 +1,583 @@
+/* $NetBSD: vis.c,v 1.45 2012/12/14 21:38:18 christos Exp $ */
+
+/*-
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*-
+ * Copyright (c) 1999, 2005 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+#if defined(LIBC_SCCS) && !defined(lint)
+__RCSID("$NetBSD: vis.c,v 1.45 2012/12/14 21:38:18 christos Exp $");
+#endif /* LIBC_SCCS and not lint */
+__FBSDID("$FreeBSD$");
+
+#include "namespace.h"
+#include <sys/types.h>
+
+#include <assert.h>
+#include <vis.h>
+#include <errno.h>
+#include <stdlib.h>
+
+#define _DIAGASSERT(x) assert(x)
+
+#ifdef __weak_alias
+__weak_alias(strvisx,_strvisx)
+#endif
+
+#if !HAVE_VIS || !HAVE_SVIS
+#include <ctype.h>
+#include <limits.h>
+#include <stdio.h>
+#include <string.h>
+
+static char *do_svis(char *, size_t *, int, int, int, const char *);
+
+#undef BELL
+#define BELL '\a'
+
+#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
+#define iswhite(c) (c == ' ' || c == '\t' || c == '\n')
+#define issafe(c) (c == '\b' || c == BELL || c == '\r')
+#define xtoa(c) "0123456789abcdef"[c]
+#define XTOA(c) "0123456789ABCDEF"[c]
+
+#define MAXEXTRAS 9
+
+#define MAKEEXTRALIST(flag, extra, orig_str) \
+do { \
+ const char *orig = orig_str; \
+ const char *o = orig; \
+ char *e; \
+ while (*o++) \
+ continue; \
+ extra = malloc((size_t)((o - orig) + MAXEXTRAS)); \
+ if (!extra) break; \
+ for (o = orig, e = extra; (*e++ = *o++) != '\0';) \
+ continue; \
+ e--; \
+ if (flag & VIS_GLOB) { \
+ *e++ = '*'; \
+ *e++ = '?'; \
+ *e++ = '['; \
+ *e++ = '#'; \
+ } \
+ if (flag & VIS_SP) *e++ = ' '; \
+ if (flag & VIS_TAB) *e++ = '\t'; \
+ if (flag & VIS_NL) *e++ = '\n'; \
+ if ((flag & VIS_NOSLASH) == 0) *e++ = '\\'; \
+ *e = '\0'; \
+} while (/*CONSTCOND*/0)
+
+/*
+ * This is do_hvis, for HTTP style (RFC 1808)
+ */
+static char *
+do_hvis(char *dst, size_t *dlen, int c, int flag, int nextc, const char *extra)
+{
+
+ if ((isascii(c) && isalnum(c))
+ /* safe */
+ || c == '$' || c == '-' || c == '_' || c == '.' || c == '+'
+ /* extra */
+ || c == '!' || c == '*' || c == '\'' || c == '(' || c == ')'
+ || c == ',') {
+ dst = do_svis(dst, dlen, c, flag, nextc, extra);
+ } else {
+ if (dlen) {
+ if (*dlen < 3)
+ return NULL;
+ *dlen -= 3;
+ }
+ *dst++ = '%';
+ *dst++ = xtoa(((unsigned int)c >> 4) & 0xf);
+ *dst++ = xtoa((unsigned int)c & 0xf);
+ }
+
+ return dst;
+}
+
+/*
+ * This is do_mvis, for Quoted-Printable MIME (RFC 2045)
+ * NB: No handling of long lines or CRLF.
+ */
+static char *
+do_mvis(char *dst, size_t *dlen, int c, int flag, int nextc, const char *extra)
+{
+ if ((c != '\n') &&
+ /* Space at the end of the line */
+ ((isspace(c) && (nextc == '\r' || nextc == '\n')) ||
+ /* Out of range */
+ (!isspace(c) && (c < 33 || (c > 60 && c < 62) || c > 126)) ||
+ /* Specific char to be escaped */
+ strchr("#$@[\\]^`{|}~", c) != NULL)) {
+ if (dlen) {
+ if (*dlen < 3)
+ return NULL;
+ *dlen -= 3;
+ }
+ *dst++ = '=';
+ *dst++ = XTOA(((unsigned int)c >> 4) & 0xf);
+ *dst++ = XTOA((unsigned int)c & 0xf);
+ } else {
+ dst = do_svis(dst, dlen, c, flag, nextc, extra);
+ }
+ return dst;
+}
+
+/*
+ * This is do_vis, the central code of vis.
+ * dst: Pointer to the destination buffer
+ * c: Character to encode
+ * flag: Flag word
+ * nextc: The character following 'c'
+ * extra: Pointer to the list of extra characters to be
+ * backslash-protected.
+ */
+static char *
+do_svis(char *dst, size_t *dlen, int c, int flag, int nextc, const char *extra)
+{
+ int isextra;
+ size_t odlen = dlen ? *dlen : 0;
+
+ isextra = strchr(extra, c) != NULL;
+#define HAVE(x) \
+ do { \
+ if (dlen) { \
+ if (*dlen < (x)) \
+ goto out; \
+ *dlen -= (x); \
+ } \
+ } while (/*CONSTCOND*/0)
+ if (!isextra && isascii(c) && (isgraph(c) || iswhite(c) ||
+ ((flag & VIS_SAFE) && issafe(c)))) {
+ HAVE(1);
+ *dst++ = c;
+ return dst;
+ }
+ if (flag & VIS_CSTYLE) {
+ HAVE(2);
+ switch (c) {
+ case '\n':
+ *dst++ = '\\'; *dst++ = 'n';
+ return dst;
+ case '\r':
+ *dst++ = '\\'; *dst++ = 'r';
+ return dst;
+ case '\b':
+ *dst++ = '\\'; *dst++ = 'b';
+ return dst;
+ case BELL:
+ *dst++ = '\\'; *dst++ = 'a';
+ return dst;
+ case '\v':
+ *dst++ = '\\'; *dst++ = 'v';
+ return dst;
+ case '\t':
+ *dst++ = '\\'; *dst++ = 't';
+ return dst;
+ case '\f':
+ *dst++ = '\\'; *dst++ = 'f';
+ return dst;
+ case ' ':
+ *dst++ = '\\'; *dst++ = 's';
+ return dst;
+ case '\0':
+ *dst++ = '\\'; *dst++ = '0';
+ if (isoctal(nextc)) {
+ HAVE(2);
+ *dst++ = '0';
+ *dst++ = '0';
+ }
+ return dst;
+ default:
+ if (isgraph(c)) {
+ *dst++ = '\\'; *dst++ = c;
+ return dst;
+ }
+ if (dlen)
+ *dlen = odlen;
+ }
+ }
+ if (isextra || ((c & 0177) == ' ') || (flag & VIS_OCTAL)) {
+ HAVE(4);
+ *dst++ = '\\';
+ *dst++ = (u_char)(((u_int32_t)(u_char)c >> 6) & 03) + '0';
+ *dst++ = (u_char)(((u_int32_t)(u_char)c >> 3) & 07) + '0';
+ *dst++ = (c & 07) + '0';
+ } else {
+ if ((flag & VIS_NOSLASH) == 0) {
+ HAVE(1);
+ *dst++ = '\\';
+ }
+
+ if (c & 0200) {
+ HAVE(1);
+ c &= 0177; *dst++ = 'M';
+ }
+
+ if (iscntrl(c)) {
+ HAVE(2);
+ *dst++ = '^';
+ if (c == 0177)
+ *dst++ = '?';
+ else
+ *dst++ = c + '@';
+ } else {
+ HAVE(2);
+ *dst++ = '-'; *dst++ = c;
+ }
+ }
+ return dst;
+out:
+ *dlen = odlen;
+ return NULL;
+}
+
+typedef char *(*visfun_t)(char *, size_t *, int, int, int, const char *);
+
+/*
+ * Return the appropriate encoding function depending on the flags given.
+ */
+static visfun_t
+getvisfun(int flag)
+{
+ if (flag & VIS_HTTPSTYLE)
+ return do_hvis;
+ if (flag & VIS_MIMESTYLE)
+ return do_mvis;
+ return do_svis;
+}
+
+/*
+ * isnvis - visually encode characters, also encoding the characters
+ * pointed to by `extra'
+ */
+static char *
+isnvis(char *dst, size_t *dlen, int c, int flag, int nextc, const char *extra)
+{
+ char *nextra = NULL;
+ visfun_t f;
+
+ _DIAGASSERT(dst != NULL);
+ _DIAGASSERT(extra != NULL);
+ MAKEEXTRALIST(flag, nextra, extra);
+ if (!nextra) {
+ if (dlen && *dlen == 0) {
+ errno = ENOSPC;
+ return NULL;
+ }
+ *dst = '\0'; /* can't create nextra, return "" */
+ return dst;
+ }
+ f = getvisfun(flag);
+ dst = (*f)(dst, dlen, c, flag, nextc, nextra);
+ free(nextra);
+ if (dst == NULL || (dlen && *dlen == 0)) {
+ errno = ENOSPC;
+ return NULL;
+ }
+ *dst = '\0';
+ return dst;
+}
+
+char *
+svis(char *dst, int c, int flag, int nextc, const char *extra)
+{
+ return isnvis(dst, NULL, c, flag, nextc, extra);
+}
+
+char *
+snvis(char *dst, size_t dlen, int c, int flag, int nextc, const char *extra)
+{
+ return isnvis(dst, &dlen, c, flag, nextc, extra);
+}
+
+
+/*
+ * strsvis, strsvisx - visually encode characters from src into dst
+ *
+ * Extra is a pointer to a \0-terminated list of characters to
+ * be encoded, too. These functions are useful e. g. to
+ * encode strings in such a way so that they are not interpreted
+ * by a shell.
+ *
+ * Dst must be 4 times the size of src to account for possible
+ * expansion. The length of dst, not including the trailing NULL,
+ * is returned.
+ *
+ * Strsvisx encodes exactly len bytes from src into dst.
+ * This is useful for encoding a block of data.
+ */
+static int
+istrsnvis(char *dst, size_t *dlen, const char *csrc, int flag, const char *extra)
+{
+ int c;
+ char *start;
+ char *nextra = NULL;
+ const unsigned char *src = (const unsigned char *)csrc;
+ visfun_t f;
+
+ _DIAGASSERT(dst != NULL);
+ _DIAGASSERT(src != NULL);
+ _DIAGASSERT(extra != NULL);
+ MAKEEXTRALIST(flag, nextra, extra);
+ if (!nextra) {
+ *dst = '\0'; /* can't create nextra, return "" */
+ return 0;
+ }
+ f = getvisfun(flag);
+ for (start = dst; (c = *src++) != '\0'; /* empty */) {
+ dst = (*f)(dst, dlen, c, flag, *src, nextra);
+ if (dst == NULL) {
+ errno = ENOSPC;
+ return -1;
+ }
+ }
+ free(nextra);
+ if (dlen && *dlen == 0) {
+ errno = ENOSPC;
+ return -1;
+ }
+ *dst = '\0';
+ return (int)(dst - start);
+}
+
+int
+strsvis(char *dst, const char *csrc, int flag, const char *extra)
+{
+ return istrsnvis(dst, NULL, csrc, flag, extra);
+}
+
+int
+strsnvis(char *dst, size_t dlen, const char *csrc, int flag, const char *extra)
+{
+ return istrsnvis(dst, &dlen, csrc, flag, extra);
+}
+
+static int
+istrsnvisx(char *dst, size_t *dlen, const char *csrc, size_t len, int flag,
+ const char *extra)
+{
+ unsigned char c;
+ char *start;
+ char *nextra = NULL;
+ const unsigned char *src = (const unsigned char *)csrc;
+ visfun_t f;
+
+ _DIAGASSERT(dst != NULL);
+ _DIAGASSERT(src != NULL);
+ _DIAGASSERT(extra != NULL);
+ MAKEEXTRALIST(flag, nextra, extra);
+ if (! nextra) {
+ if (dlen && *dlen == 0) {
+ errno = ENOSPC;
+ return -1;
+ }
+ *dst = '\0'; /* can't create nextra, return "" */
+ return 0;
+ }
+
+ f = getvisfun(flag);
+ for (start = dst; len > 0; len--) {
+ c = *src++;
+ dst = (*f)(dst, dlen, c, flag, len > 1 ? *src : '\0', nextra);
+ if (dst == NULL) {
+ errno = ENOSPC;
+ return -1;
+ }
+ }
+ free(nextra);
+ if (dlen && *dlen == 0) {
+ errno = ENOSPC;
+ return -1;
+ }
+ *dst = '\0';
+ return (int)(dst - start);
+}
+
+int
+strsvisx(char *dst, const char *csrc, size_t len, int flag, const char *extra)
+{
+ return istrsnvisx(dst, NULL, csrc, len, flag, extra);
+}
+
+int
+strsnvisx(char *dst, size_t dlen, const char *csrc, size_t len, int flag,
+ const char *extra)
+{
+ return istrsnvisx(dst, &dlen, csrc, len, flag, extra);
+}
+#endif
+
+#if !HAVE_VIS
+/*
+ * vis - visually encode characters
+ */
+static char *
+invis(char *dst, size_t *dlen, int c, int flag, int nextc)
+{
+ char *extra = NULL;
+ unsigned char uc = (unsigned char)c;
+ visfun_t f;
+
+ _DIAGASSERT(dst != NULL);
+
+ MAKEEXTRALIST(flag, extra, "");
+ if (! extra) {
+ if (dlen && *dlen == 0) {
+ errno = ENOSPC;
+ return NULL;
+ }
+ *dst = '\0'; /* can't create extra, return "" */
+ return dst;
+ }
+ f = getvisfun(flag);
+ dst = (*f)(dst, dlen, uc, flag, nextc, extra);
+ free(extra);
+ if (dst == NULL || (dlen && *dlen == 0)) {
+ errno = ENOSPC;
+ return NULL;
+ }
+ *dst = '\0';
+ return dst;
+}
+
+char *
+vis(char *dst, int c, int flag, int nextc)
+{
+ return invis(dst, NULL, c, flag, nextc);
+}
+
+char *
+nvis(char *dst, size_t dlen, int c, int flag, int nextc)
+{
+ return invis(dst, &dlen, c, flag, nextc);
+}
+
+
+/*
+ * strvis, strvisx - visually encode characters from src into dst
+ *
+ * Dst must be 4 times the size of src to account for possible
+ * expansion. The length of dst, not including the trailing NULL,
+ * is returned.
+ *
+ * Strvisx encodes exactly len bytes from src into dst.
+ * This is useful for encoding a block of data.
+ */
+static int
+istrnvis(char *dst, size_t *dlen, const char *src, int flag)
+{
+ char *extra = NULL;
+ int rv;
+
+ MAKEEXTRALIST(flag, extra, "");
+ if (!extra) {
+ if (dlen && *dlen == 0) {
+ errno = ENOSPC;
+ return -1;
+ }
+ *dst = '\0'; /* can't create extra, return "" */
+ return 0;
+ }
+ rv = istrsnvis(dst, dlen, src, flag, extra);
+ free(extra);
+ return rv;
+}
+
+int
+strvis(char *dst, const char *src, int flag)
+{
+ return istrnvis(dst, NULL, src, flag);
+}
+
+int
+strnvis(char *dst, size_t dlen, const char *src, int flag)
+{
+ return istrnvis(dst, &dlen, src, flag);
+}
+
+static int
+istrnvisx(char *dst, size_t *dlen, const char *src, size_t len, int flag)
+{
+ char *extra = NULL;
+ int rv;
+
+ MAKEEXTRALIST(flag, extra, "");
+ if (!extra) {
+ if (dlen && *dlen == 0) {
+ errno = ENOSPC;
+ return -1;
+ }
+ *dst = '\0'; /* can't create extra, return "" */
+ return 0;
+ }
+ rv = istrsnvisx(dst, dlen, src, len, flag, extra);
+ free(extra);
+ return rv;
+}
+
+int
+strvisx(char *dst, const char *src, size_t len, int flag)
+{
+ return istrnvisx(dst, NULL, src, len, flag);
+}
+
+int
+strnvisx(char *dst, size_t dlen, const char *src, size_t len, int flag)
+{
+ return istrnvisx(dst, &dlen, src, len, flag);
+}
+
+#endif
diff --git a/include/vis.h b/contrib/libc-vis/vis.h
index f388954..cd7680e 100644
--- a/include/vis.h
+++ b/contrib/libc-vis/vis.h
@@ -1,3 +1,6 @@
+/* $NetBSD: vis.h,v 1.20 2012/12/14 21:36:59 christos Exp $ */
+/* $FreeBSD$ */
+
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -27,41 +30,40 @@
* SUCH DAMAGE.
*
* @(#)vis.h 8.1 (Berkeley) 6/2/93
- * $FreeBSD$
*/
#ifndef _VIS_H_
#define _VIS_H_
-#include <sys/_types.h>
-
-#ifndef _SIZE_T_DECLARED
-typedef __size_t size_t;
-#define _SIZE_T_DECLARED
-#endif
+#include <sys/types.h>
/*
* to select alternate encoding format
*/
-#define VIS_OCTAL 0x01 /* use octal \ddd format */
-#define VIS_CSTYLE 0x02 /* use \[nrft0..] where appropriate */
+#define VIS_OCTAL 0x0001 /* use octal \ddd format */
+#define VIS_CSTYLE 0x0002 /* use \[nrft0..] where appropiate */
/*
* to alter set of characters encoded (default is to encode all
* non-graphic except space, tab, and newline).
*/
-#define VIS_SP 0x04 /* also encode space */
-#define VIS_TAB 0x08 /* also encode tab */
-#define VIS_NL 0x10 /* also encode newline */
+#define VIS_SP 0x0004 /* also encode space */
+#define VIS_TAB 0x0008 /* also encode tab */
+#define VIS_NL 0x0010 /* also encode newline */
#define VIS_WHITE (VIS_SP | VIS_TAB | VIS_NL)
-#define VIS_SAFE 0x20 /* only encode "unsafe" characters */
+#define VIS_SAFE 0x0020 /* only encode "unsafe" characters */
/*
* other
*/
-#define VIS_NOSLASH 0x40 /* inhibit printing '\' */
-#define VIS_HTTPSTYLE 0x80 /* http-style escape % HEX HEX */
-#define VIS_GLOB 0x100 /* encode glob(3) magics */
+#define VIS_NOSLASH 0x0040 /* inhibit printing '\' */
+#define VIS_HTTP1808 0x0080 /* http-style escape % hex hex */
+#define VIS_HTTPSTYLE 0x0080 /* http-style escape % hex hex */
+#define VIS_GLOB 0x0100 /* encode glob(3) magic characters */
+#define VIS_MIMESTYLE 0x0200 /* mime-style escape = HEX HEX */
+#define VIS_HTTP1866 0x0400 /* http-style &#num; or &string; */
+#define VIS_NOESCAPE 0x0800 /* don't decode `\' */
+#define _VIS_END 0x1000 /* for unvis */
/*
* unvis return codes
@@ -75,17 +77,38 @@ typedef __size_t size_t;
/*
* unvis flags
*/
-#define UNVIS_END 1 /* no more characters */
+#define UNVIS_END _VIS_END /* no more characters */
#include <sys/cdefs.h>
__BEGIN_DECLS
char *vis(char *, int, int, int);
+char *nvis(char *, size_t, int, int, int);
+
+char *svis(char *, int, int, int, const char *);
+char *snvis(char *, size_t, int, int, int, const char *);
+
int strvis(char *, const char *, int);
+int strnvis(char *, size_t, const char *, int);
+
+int strsvis(char *, const char *, int, const char *);
+int strsnvis(char *, size_t, const char *, int, const char *);
+
int strvisx(char *, const char *, size_t, int);
+int strnvisx(char *, size_t, const char *, size_t, int);
+
+int strsvisx(char *, const char *, size_t, int, const char *);
+int strsnvisx(char *, size_t, const char *, size_t, int, const char *);
+
int strunvis(char *, const char *);
+int strnunvis(char *, size_t, const char *);
+
int strunvisx(char *, const char *, int);
+int strnunvisx(char *, size_t, const char *, int);
+
+#ifndef __LIBC12_SOURCE__
int unvis(char *, int, int *, int);
+#endif
__END_DECLS
#endif /* !_VIS_H_ */
diff --git a/contrib/libstdc++/include/std/std_limits.h b/contrib/libstdc++/include/std/std_limits.h
index d1211fd..c4cfcb9 100644
--- a/contrib/libstdc++/include/std/std_limits.h
+++ b/contrib/libstdc++/include/std/std_limits.h
@@ -134,10 +134,11 @@
#define __glibcxx_signed(T) ((T)(-1) < 0)
#define __glibcxx_min(T) \
- (__glibcxx_signed (T) ? (T)1 << __glibcxx_digits (T) : (T)0)
+ (__glibcxx_signed (T) ? (((T)1 << (__glibcxx_digits (T) - 1)) << 1) : (T)0)
#define __glibcxx_max(T) \
- (__glibcxx_signed (T) ? ((T)1 << __glibcxx_digits (T)) - 1 : ~(T)0)
+ (__glibcxx_signed (T) ? \
+ (((((T)1 << (__glibcxx_digits (T) - 1)) - 1) << 1) + 1) : ~(T)0)
#define __glibcxx_digits(T) \
(sizeof(T) * __CHAR_BIT__ - __glibcxx_signed (T))
diff --git a/contrib/llvm/include/llvm/MC/MCExpr.h b/contrib/llvm/include/llvm/MC/MCExpr.h
index 00eef27..1007aa5 100644
--- a/contrib/llvm/include/llvm/MC/MCExpr.h
+++ b/contrib/llvm/include/llvm/MC/MCExpr.h
@@ -197,7 +197,11 @@ public:
VK_Mips_GOT_PAGE,
VK_Mips_GOT_OFST,
VK_Mips_HIGHER,
- VK_Mips_HIGHEST
+ VK_Mips_HIGHEST,
+ VK_Mips_GOT_HI16,
+ VK_Mips_GOT_LO16,
+ VK_Mips_CALL_HI16,
+ VK_Mips_CALL_LO16
};
private:
diff --git a/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
index f6dccb1..a180e36 100644
--- a/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ b/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
@@ -346,7 +346,7 @@ uint8_t *RuntimeDyldImpl::createStubFunction(uint8_t *Addr) {
uint32_t *StubAddr = (uint32_t*)Addr;
*StubAddr = 0xe51ff004; // ldr pc,<label>
return (uint8_t*)++StubAddr;
- } else if (Arch == Triple::mipsel) {
+ } else if (Arch == Triple::mipsel || Arch == Triple::mips) {
uint32_t *StubAddr = (uint32_t*)Addr;
// 0: 3c190000 lui t9,%hi(addr).
// 4: 27390000 addiu t9,t9,%lo(addr).
diff --git a/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
index 1ebcaf7..f7015cd 100644
--- a/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
+++ b/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
@@ -676,7 +676,8 @@ void RuntimeDyldELF::processRelocationRef(const ObjRelocationInfo &Rel,
RelType, 0);
Section.StubOffset += getMaxStubSize();
}
- } else if (Arch == Triple::mipsel && RelType == ELF::R_MIPS_26) {
+ } else if ((Arch == Triple::mipsel || Arch == Triple::mips) &&
+ RelType == ELF::R_MIPS_26) {
// This is an Mips branch relocation, need to use a stub function.
DEBUG(dbgs() << "\t\tThis is a Mips branch relocation.");
SectionEntry &Section = Sections[Rel.SectionID];
diff --git a/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h b/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
index 829fd6c..a292ee1 100644
--- a/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
+++ b/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
@@ -168,7 +168,7 @@ protected:
inline unsigned getMaxStubSize() {
if (Arch == Triple::arm || Arch == Triple::thumb)
return 8; // 32-bit instruction and 32-bit address
- else if (Arch == Triple::mipsel)
+ else if (Arch == Triple::mipsel || Arch == Triple::mips)
return 16;
else if (Arch == Triple::ppc64)
return 44;
diff --git a/contrib/llvm/lib/MC/MCExpr.cpp b/contrib/llvm/lib/MC/MCExpr.cpp
index e033634..de2f375 100644
--- a/contrib/llvm/lib/MC/MCExpr.cpp
+++ b/contrib/llvm/lib/MC/MCExpr.cpp
@@ -229,6 +229,10 @@ StringRef MCSymbolRefExpr::getVariantKindName(VariantKind Kind) {
case VK_Mips_GOT_OFST: return "GOT_OFST";
case VK_Mips_HIGHER: return "HIGHER";
case VK_Mips_HIGHEST: return "HIGHEST";
+ case VK_Mips_GOT_HI16: return "GOT_HI16";
+ case VK_Mips_GOT_LO16: return "GOT_LO16";
+ case VK_Mips_CALL_HI16: return "CALL_HI16";
+ case VK_Mips_CALL_LO16: return "CALL_LO16";
}
llvm_unreachable("Invalid variant kind");
}
diff --git a/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp b/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp
index b38463d..68d3ac5 100644
--- a/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp
+++ b/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp
@@ -128,6 +128,10 @@ static void printExpr(const MCExpr *Expr, raw_ostream &OS) {
case MCSymbolRefExpr::VK_Mips_GOT_OFST: OS << "%got_ofst("; break;
case MCSymbolRefExpr::VK_Mips_HIGHER: OS << "%higher("; break;
case MCSymbolRefExpr::VK_Mips_HIGHEST: OS << "%highest("; break;
+ case MCSymbolRefExpr::VK_Mips_GOT_HI16: OS << "%got_hi("; break;
+ case MCSymbolRefExpr::VK_Mips_GOT_LO16: OS << "%got_lo("; break;
+ case MCSymbolRefExpr::VK_Mips_CALL_HI16: OS << "%call_hi("; break;
+ case MCSymbolRefExpr::VK_Mips_CALL_LO16: OS << "%call_lo("; break;
}
OS << SRE->getSymbol();
diff --git a/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp b/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
index 9a35bb6..c078794 100644
--- a/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
+++ b/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
@@ -42,6 +42,8 @@ static unsigned adjustFixupValue(unsigned Kind, uint64_t Value) {
case Mips::fixup_Mips_GOT_PAGE:
case Mips::fixup_Mips_GOT_OFST:
case Mips::fixup_Mips_GOT_DISP:
+ case Mips::fixup_Mips_GOT_LO16:
+ case Mips::fixup_Mips_CALL_LO16:
break;
case Mips::fixup_Mips_PC16:
// So far we are only using this type for branches.
@@ -60,6 +62,8 @@ static unsigned adjustFixupValue(unsigned Kind, uint64_t Value) {
break;
case Mips::fixup_Mips_HI16:
case Mips::fixup_Mips_GOT_Local:
+ case Mips::fixup_Mips_GOT_HI16:
+ case Mips::fixup_Mips_CALL_HI16:
// Get the 2nd 16-bits. Also add 1 if bit 15 is 1.
Value = ((Value + 0x8000) >> 16) & 0xffff;
break;
@@ -179,7 +183,11 @@ public:
{ "fixup_Mips_GOT_OFST", 0, 16, 0 },
{ "fixup_Mips_GOT_DISP", 0, 16, 0 },
{ "fixup_Mips_HIGHER", 0, 16, 0 },
- { "fixup_Mips_HIGHEST", 0, 16, 0 }
+ { "fixup_Mips_HIGHEST", 0, 16, 0 },
+ { "fixup_Mips_GOT_HI16", 0, 16, 0 },
+ { "fixup_Mips_GOT_LO16", 0, 16, 0 },
+ { "fixup_Mips_CALL_HI16", 0, 16, 0 },
+ { "fixup_Mips_CALL_LO16", 0, 16, 0 }
};
if (Kind < FirstTargetFixupKind)
diff --git a/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h b/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h
index 233214b..94e0d20 100644
--- a/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h
+++ b/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h
@@ -84,7 +84,13 @@ namespace MipsII {
/// MO_HIGHER/HIGHEST - Represents the highest or higher half word of a
/// 64-bit symbol address.
MO_HIGHER,
- MO_HIGHEST
+ MO_HIGHEST,
+
+ /// MO_GOT_HI16/LO16, MO_CALL_HI16/LO16 - Relocations used for large GOTs.
+ MO_GOT_HI16,
+ MO_GOT_LO16,
+ MO_CALL_HI16,
+ MO_CALL_LO16
};
enum {
diff --git a/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp b/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
index 5d240fe..f82e203 100644
--- a/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
+++ b/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
@@ -179,6 +179,18 @@ unsigned MipsELFObjectWriter::GetRelocType(const MCValue &Target,
case Mips::fixup_Mips_HIGHEST:
Type = ELF::R_MIPS_HIGHEST;
break;
+ case Mips::fixup_Mips_GOT_HI16:
+ Type = ELF::R_MIPS_GOT_HI16;
+ break;
+ case Mips::fixup_Mips_GOT_LO16:
+ Type = ELF::R_MIPS_GOT_LO16;
+ break;
+ case Mips::fixup_Mips_CALL_HI16:
+ Type = ELF::R_MIPS_CALL_HI16;
+ break;
+ case Mips::fixup_Mips_CALL_LO16:
+ Type = ELF::R_MIPS_CALL_LO16;
+ break;
}
return Type;
}
diff --git a/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h b/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h
index 77faec5..f963900 100644
--- a/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h
+++ b/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h
@@ -116,6 +116,18 @@ namespace Mips {
// resulting in - R_MIPS_HIGHEST
fixup_Mips_HIGHEST,
+ // resulting in - R_MIPS_GOT_HI16
+ fixup_Mips_GOT_HI16,
+
+ // resulting in - R_MIPS_GOT_LO16
+ fixup_Mips_GOT_LO16,
+
+ // resulting in - R_MIPS_CALL_HI16
+ fixup_Mips_CALL_HI16,
+
+ // resulting in - R_MIPS_CALL_LO16
+ fixup_Mips_CALL_LO16,
+
// Marker
LastTargetFixupKind,
NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind
diff --git a/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp b/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp
index 7fbdae0..da1e455 100644
--- a/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp
+++ b/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp
@@ -287,6 +287,18 @@ getMachineOpValue(const MCInst &MI, const MCOperand &MO,
case MCSymbolRefExpr::VK_Mips_HIGHEST:
FixupKind = Mips::fixup_Mips_HIGHEST;
break;
+ case MCSymbolRefExpr::VK_Mips_GOT_HI16:
+ FixupKind = Mips::fixup_Mips_GOT_HI16;
+ break;
+ case MCSymbolRefExpr::VK_Mips_GOT_LO16:
+ FixupKind = Mips::fixup_Mips_GOT_LO16;
+ break;
+ case MCSymbolRefExpr::VK_Mips_CALL_HI16:
+ FixupKind = Mips::fixup_Mips_CALL_HI16;
+ break;
+ case MCSymbolRefExpr::VK_Mips_CALL_LO16:
+ FixupKind = Mips::fixup_Mips_CALL_LO16;
+ break;
} // switch
Fixups.push_back(MCFixup::Create(0, MO.getExpr(), MCFixupKind(FixupKind)));
diff --git a/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td b/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td
index a611168..83322ea 100644
--- a/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td
+++ b/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td
@@ -255,6 +255,7 @@ def : MipsPat<(MipsHi tblockaddress:$in), (LUi64 tblockaddress:$in)>;
def : MipsPat<(MipsHi tjumptable:$in), (LUi64 tjumptable:$in)>;
def : MipsPat<(MipsHi tconstpool:$in), (LUi64 tconstpool:$in)>;
def : MipsPat<(MipsHi tglobaltlsaddr:$in), (LUi64 tglobaltlsaddr:$in)>;
+def : MipsPat<(MipsHi texternalsym:$in), (LUi64 texternalsym:$in)>;
def : MipsPat<(MipsLo tglobaladdr:$in), (DADDiu ZERO_64, tglobaladdr:$in)>;
def : MipsPat<(MipsLo tblockaddress:$in), (DADDiu ZERO_64, tblockaddress:$in)>;
@@ -262,6 +263,7 @@ def : MipsPat<(MipsLo tjumptable:$in), (DADDiu ZERO_64, tjumptable:$in)>;
def : MipsPat<(MipsLo tconstpool:$in), (DADDiu ZERO_64, tconstpool:$in)>;
def : MipsPat<(MipsLo tglobaltlsaddr:$in),
(DADDiu ZERO_64, tglobaltlsaddr:$in)>;
+def : MipsPat<(MipsLo texternalsym:$in), (DADDiu ZERO_64, texternalsym:$in)>;
def : MipsPat<(add CPU64Regs:$hi, (MipsLo tglobaladdr:$lo)),
(DADDiu CPU64Regs:$hi, tglobaladdr:$lo)>;
diff --git a/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp b/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp
index 4bfccd8..05090b8 100644
--- a/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp
+++ b/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp
@@ -85,7 +85,7 @@ class MipsCodeEmitter : public MachineFunctionPass {
private:
- void emitWordLE(unsigned Word);
+ void emitWord(unsigned Word);
/// Routines that handle operands which add machine relocations which are
/// fixed up by the relocation stage.
@@ -112,12 +112,6 @@ class MipsCodeEmitter : public MachineFunctionPass {
unsigned getSizeExtEncoding(const MachineInstr &MI, unsigned OpNo) const;
unsigned getSizeInsEncoding(const MachineInstr &MI, unsigned OpNo) const;
- int emitULW(const MachineInstr &MI);
- int emitUSW(const MachineInstr &MI);
- int emitULH(const MachineInstr &MI);
- int emitULHu(const MachineInstr &MI);
- int emitUSH(const MachineInstr &MI);
-
void emitGlobalAddressUnaligned(const GlobalValue *GV, unsigned Reloc,
int Offset) const;
};
@@ -133,7 +127,7 @@ bool MipsCodeEmitter::runOnMachineFunction(MachineFunction &MF) {
MCPEs = &MF.getConstantPool()->getConstants();
MJTEs = 0;
if (MF.getJumpTableInfo()) MJTEs = &MF.getJumpTableInfo()->getJumpTables();
- JTI->Initialize(MF, IsPIC);
+ JTI->Initialize(MF, IsPIC, Subtarget->isLittle());
MCE.setModuleInfo(&getAnalysis<MachineModuleInfo> ());
do {
@@ -271,103 +265,6 @@ void MipsCodeEmitter::emitMachineBasicBlock(MachineBasicBlock *BB,
Reloc, BB));
}
-int MipsCodeEmitter::emitUSW(const MachineInstr &MI) {
- unsigned src = getMachineOpValue(MI, MI.getOperand(0));
- unsigned base = getMachineOpValue(MI, MI.getOperand(1));
- unsigned offset = getMachineOpValue(MI, MI.getOperand(2));
- // swr src, offset(base)
- // swl src, offset+3(base)
- MCE.emitWordLE(
- (0x2e << 26) | (base << 21) | (src << 16) | (offset & 0xffff));
- MCE.emitWordLE(
- (0x2a << 26) | (base << 21) | (src << 16) | ((offset+3) & 0xffff));
- return 2;
-}
-
-int MipsCodeEmitter::emitULW(const MachineInstr &MI) {
- unsigned dst = getMachineOpValue(MI, MI.getOperand(0));
- unsigned base = getMachineOpValue(MI, MI.getOperand(1));
- unsigned offset = getMachineOpValue(MI, MI.getOperand(2));
- unsigned at = 1;
- if (dst != base) {
- // lwr dst, offset(base)
- // lwl dst, offset+3(base)
- MCE.emitWordLE(
- (0x26 << 26) | (base << 21) | (dst << 16) | (offset & 0xffff));
- MCE.emitWordLE(
- (0x22 << 26) | (base << 21) | (dst << 16) | ((offset+3) & 0xffff));
- return 2;
- } else {
- // lwr at, offset(base)
- // lwl at, offset+3(base)
- // addu dst, at, $zero
- MCE.emitWordLE(
- (0x26 << 26) | (base << 21) | (at << 16) | (offset & 0xffff));
- MCE.emitWordLE(
- (0x22 << 26) | (base << 21) | (at << 16) | ((offset+3) & 0xffff));
- MCE.emitWordLE(
- (0x0 << 26) | (at << 21) | (0x0 << 16) | (dst << 11) | (0x0 << 6) | 0x21);
- return 3;
- }
-}
-
-int MipsCodeEmitter::emitUSH(const MachineInstr &MI) {
- unsigned src = getMachineOpValue(MI, MI.getOperand(0));
- unsigned base = getMachineOpValue(MI, MI.getOperand(1));
- unsigned offset = getMachineOpValue(MI, MI.getOperand(2));
- unsigned at = 1;
- // sb src, offset(base)
- // srl at,src,8
- // sb at, offset+1(base)
- MCE.emitWordLE(
- (0x28 << 26) | (base << 21) | (src << 16) | (offset & 0xffff));
- MCE.emitWordLE(
- (0x0 << 26) | (0x0 << 21) | (src << 16) | (at << 11) | (0x8 << 6) | 0x2);
- MCE.emitWordLE(
- (0x28 << 26) | (base << 21) | (at << 16) | ((offset+1) & 0xffff));
- return 3;
-}
-
-int MipsCodeEmitter::emitULH(const MachineInstr &MI) {
- unsigned dst = getMachineOpValue(MI, MI.getOperand(0));
- unsigned base = getMachineOpValue(MI, MI.getOperand(1));
- unsigned offset = getMachineOpValue(MI, MI.getOperand(2));
- unsigned at = 1;
- // lbu at, offset(base)
- // lb dst, offset+1(base)
- // sll dst,dst,8
- // or dst,dst,at
- MCE.emitWordLE(
- (0x24 << 26) | (base << 21) | (at << 16) | (offset & 0xffff));
- MCE.emitWordLE(
- (0x20 << 26) | (base << 21) | (dst << 16) | ((offset+1) & 0xffff));
- MCE.emitWordLE(
- (0x0 << 26) | (0x0 << 21) | (dst << 16) | (dst << 11) | (0x8 << 6) | 0x0);
- MCE.emitWordLE(
- (0x0 << 26) | (dst << 21) | (at << 16) | (dst << 11) | (0x0 << 6) | 0x25);
- return 4;
-}
-
-int MipsCodeEmitter::emitULHu(const MachineInstr &MI) {
- unsigned dst = getMachineOpValue(MI, MI.getOperand(0));
- unsigned base = getMachineOpValue(MI, MI.getOperand(1));
- unsigned offset = getMachineOpValue(MI, MI.getOperand(2));
- unsigned at = 1;
- // lbu at, offset(base)
- // lbu dst, offset+1(base)
- // sll dst,dst,8
- // or dst,dst,at
- MCE.emitWordLE(
- (0x24 << 26) | (base << 21) | (at << 16) | (offset & 0xffff));
- MCE.emitWordLE(
- (0x24 << 26) | (base << 21) | (dst << 16) | ((offset+1) & 0xffff));
- MCE.emitWordLE(
- (0x0 << 26) | (0x0 << 21) | (dst << 16) | (dst << 11) | (0x8 << 6) | 0x0);
- MCE.emitWordLE(
- (0x0 << 26) | (dst << 21) | (at << 16) | (dst << 11) | (0x0 << 6) | 0x25);
- return 4;
-}
-
void MipsCodeEmitter::emitInstruction(const MachineInstr &MI) {
DEBUG(errs() << "JIT: " << (void*)MCE.getCurrentPCValue() << ":\t" << MI);
@@ -377,16 +274,19 @@ void MipsCodeEmitter::emitInstruction(const MachineInstr &MI) {
if ((MI.getDesc().TSFlags & MipsII::FormMask) == MipsII::Pseudo)
return;
- emitWordLE(getBinaryCodeForInstr(MI));
+ emitWord(getBinaryCodeForInstr(MI));
++NumEmitted; // Keep track of the # of mi's emitted
MCE.processDebugLoc(MI.getDebugLoc(), false);
}
-void MipsCodeEmitter::emitWordLE(unsigned Word) {
+void MipsCodeEmitter::emitWord(unsigned Word) {
DEBUG(errs() << " 0x";
errs().write_hex(Word) << "\n");
- MCE.emitWordLE(Word);
+ if (Subtarget->isLittle())
+ MCE.emitWordLE(Word);
+ else
+ MCE.emitWordBE(Word);
}
/// createMipsJITCodeEmitterPass - Return a pass that emits the collected Mips
diff --git a/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp b/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp
index e225b6c..b0dd0a7 100644
--- a/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp
+++ b/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp
@@ -46,6 +46,10 @@ static cl::opt<bool>
EnableMipsTailCalls("enable-mips-tail-calls", cl::Hidden,
cl::desc("MIPS: Enable tail calls."), cl::init(false));
+static cl::opt<bool>
+LargeGOT("mxgot", cl::Hidden,
+ cl::desc("MIPS: Enable GOT larger than 64k."), cl::init(false));
+
static const uint16_t O32IntRegs[4] = {
Mips::A0, Mips::A1, Mips::A2, Mips::A3
};
@@ -77,6 +81,71 @@ static SDValue GetGlobalReg(SelectionDAG &DAG, EVT Ty) {
return DAG.getRegister(FI->getGlobalBaseReg(), Ty);
}
+static SDValue getTargetNode(SDValue Op, SelectionDAG &DAG, unsigned Flag) {
+ EVT Ty = Op.getValueType();
+
+ if (GlobalAddressSDNode *N = dyn_cast<GlobalAddressSDNode>(Op))
+ return DAG.getTargetGlobalAddress(N->getGlobal(), Op.getDebugLoc(), Ty, 0,
+ Flag);
+ if (ExternalSymbolSDNode *N = dyn_cast<ExternalSymbolSDNode>(Op))
+ return DAG.getTargetExternalSymbol(N->getSymbol(), Ty, Flag);
+ if (BlockAddressSDNode *N = dyn_cast<BlockAddressSDNode>(Op))
+ return DAG.getTargetBlockAddress(N->getBlockAddress(), Ty, 0, Flag);
+ if (JumpTableSDNode *N = dyn_cast<JumpTableSDNode>(Op))
+ return DAG.getTargetJumpTable(N->getIndex(), Ty, Flag);
+ if (ConstantPoolSDNode *N = dyn_cast<ConstantPoolSDNode>(Op))
+ return DAG.getTargetConstantPool(N->getConstVal(), Ty, N->getAlignment(),
+ N->getOffset(), Flag);
+
+ llvm_unreachable("Unexpected node type.");
+ return SDValue();
+}
+
+static SDValue getAddrNonPIC(SDValue Op, SelectionDAG &DAG) {
+ DebugLoc DL = Op.getDebugLoc();
+ EVT Ty = Op.getValueType();
+ SDValue Hi = getTargetNode(Op, DAG, MipsII::MO_ABS_HI);
+ SDValue Lo = getTargetNode(Op, DAG, MipsII::MO_ABS_LO);
+ return DAG.getNode(ISD::ADD, DL, Ty,
+ DAG.getNode(MipsISD::Hi, DL, Ty, Hi),
+ DAG.getNode(MipsISD::Lo, DL, Ty, Lo));
+}
+
+static SDValue getAddrLocal(SDValue Op, SelectionDAG &DAG, bool HasMips64) {
+ DebugLoc DL = Op.getDebugLoc();
+ EVT Ty = Op.getValueType();
+ unsigned GOTFlag = HasMips64 ? MipsII::MO_GOT_PAGE : MipsII::MO_GOT;
+ SDValue GOT = DAG.getNode(MipsISD::Wrapper, DL, Ty, GetGlobalReg(DAG, Ty),
+ getTargetNode(Op, DAG, GOTFlag));
+ SDValue Load = DAG.getLoad(Ty, DL, DAG.getEntryNode(), GOT,
+ MachinePointerInfo::getGOT(), false, false, false,
+ 0);
+ unsigned LoFlag = HasMips64 ? MipsII::MO_GOT_OFST : MipsII::MO_ABS_LO;
+ SDValue Lo = DAG.getNode(MipsISD::Lo, DL, Ty, getTargetNode(Op, DAG, LoFlag));
+ return DAG.getNode(ISD::ADD, DL, Ty, Load, Lo);
+}
+
+static SDValue getAddrGlobal(SDValue Op, SelectionDAG &DAG, unsigned Flag) {
+ DebugLoc DL = Op.getDebugLoc();
+ EVT Ty = Op.getValueType();
+ SDValue Tgt = DAG.getNode(MipsISD::Wrapper, DL, Ty, GetGlobalReg(DAG, Ty),
+ getTargetNode(Op, DAG, Flag));
+ return DAG.getLoad(Ty, DL, DAG.getEntryNode(), Tgt,
+ MachinePointerInfo::getGOT(), false, false, false, 0);
+}
+
+static SDValue getAddrGlobalLargeGOT(SDValue Op, SelectionDAG &DAG,
+ unsigned HiFlag, unsigned LoFlag) {
+ DebugLoc DL = Op.getDebugLoc();
+ EVT Ty = Op.getValueType();
+ SDValue Hi = DAG.getNode(MipsISD::Hi, DL, Ty, getTargetNode(Op, DAG, HiFlag));
+ Hi = DAG.getNode(ISD::ADD, DL, Ty, Hi, GetGlobalReg(DAG, Ty));
+ SDValue Wrapper = DAG.getNode(MipsISD::Wrapper, DL, Ty, Hi,
+ getTargetNode(Op, DAG, LoFlag));
+ return DAG.getLoad(Ty, DL, DAG.getEntryNode(), Wrapper,
+ MachinePointerInfo::getGOT(), false, false, false, 0);
+}
+
const char *MipsTargetLowering::getTargetNodeName(unsigned Opcode) const {
switch (Opcode) {
case MipsISD::JmpLink: return "MipsISD::JmpLink";
@@ -1743,8 +1812,6 @@ SDValue MipsTargetLowering::LowerGlobalAddress(SDValue Op,
const GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
if (getTargetMachine().getRelocationModel() != Reloc::PIC_ && !IsN64) {
- SDVTList VTs = DAG.getVTList(MVT::i32);
-
const MipsTargetObjectFile &TLOF =
(const MipsTargetObjectFile&)getObjFileLowering();
@@ -1752,69 +1819,33 @@ SDValue MipsTargetLowering::LowerGlobalAddress(SDValue Op,
if (TLOF.IsGlobalInSmallSection(GV, getTargetMachine())) {
SDValue GA = DAG.getTargetGlobalAddress(GV, dl, MVT::i32, 0,
MipsII::MO_GPREL);
- SDValue GPRelNode = DAG.getNode(MipsISD::GPRel, dl, VTs, &GA, 1);
+ SDValue GPRelNode = DAG.getNode(MipsISD::GPRel, dl,
+ DAG.getVTList(MVT::i32), &GA, 1);
SDValue GPReg = DAG.getRegister(Mips::GP, MVT::i32);
return DAG.getNode(ISD::ADD, dl, MVT::i32, GPReg, GPRelNode);
}
+
// %hi/%lo relocation
- SDValue GAHi = DAG.getTargetGlobalAddress(GV, dl, MVT::i32, 0,
- MipsII::MO_ABS_HI);
- SDValue GALo = DAG.getTargetGlobalAddress(GV, dl, MVT::i32, 0,
- MipsII::MO_ABS_LO);
- SDValue HiPart = DAG.getNode(MipsISD::Hi, dl, VTs, &GAHi, 1);
- SDValue Lo = DAG.getNode(MipsISD::Lo, dl, MVT::i32, GALo);
- return DAG.getNode(ISD::ADD, dl, MVT::i32, HiPart, Lo);
- }
-
- EVT ValTy = Op.getValueType();
- bool HasGotOfst = (GV->hasInternalLinkage() ||
- (GV->hasLocalLinkage() && !isa<Function>(GV)));
- unsigned GotFlag = HasMips64 ?
- (HasGotOfst ? MipsII::MO_GOT_PAGE : MipsII::MO_GOT_DISP) :
- (HasGotOfst ? MipsII::MO_GOT : MipsII::MO_GOT16);
- SDValue GA = DAG.getTargetGlobalAddress(GV, dl, ValTy, 0, GotFlag);
- GA = DAG.getNode(MipsISD::Wrapper, dl, ValTy, GetGlobalReg(DAG, ValTy), GA);
- SDValue ResNode = DAG.getLoad(ValTy, dl, DAG.getEntryNode(), GA,
- MachinePointerInfo(), false, false, false, 0);
- // On functions and global targets not internal linked only
- // a load from got/GP is necessary for PIC to work.
- if (!HasGotOfst)
- return ResNode;
- SDValue GALo = DAG.getTargetGlobalAddress(GV, dl, ValTy, 0,
- HasMips64 ? MipsII::MO_GOT_OFST :
- MipsII::MO_ABS_LO);
- SDValue Lo = DAG.getNode(MipsISD::Lo, dl, ValTy, GALo);
- return DAG.getNode(ISD::ADD, dl, ValTy, ResNode, Lo);
+ return getAddrNonPIC(Op, DAG);
+ }
+
+ if (GV->hasInternalLinkage() || (GV->hasLocalLinkage() && !isa<Function>(GV)))
+ return getAddrLocal(Op, DAG, HasMips64);
+
+ if (LargeGOT)
+ return getAddrGlobalLargeGOT(Op, DAG, MipsII::MO_GOT_HI16,
+ MipsII::MO_GOT_LO16);
+
+ return getAddrGlobal(Op, DAG,
+ HasMips64 ? MipsII::MO_GOT_DISP : MipsII::MO_GOT16);
}
SDValue MipsTargetLowering::LowerBlockAddress(SDValue Op,
SelectionDAG &DAG) const {
- const BlockAddress *BA = cast<BlockAddressSDNode>(Op)->getBlockAddress();
- // FIXME there isn't actually debug info here
- DebugLoc dl = Op.getDebugLoc();
+ if (getTargetMachine().getRelocationModel() != Reloc::PIC_ && !IsN64)
+ return getAddrNonPIC(Op, DAG);
- if (getTargetMachine().getRelocationModel() != Reloc::PIC_ && !IsN64) {
- // %hi/%lo relocation
- SDValue BAHi =
- DAG.getTargetBlockAddress(BA, MVT::i32, 0, MipsII::MO_ABS_HI);
- SDValue BALo =
- DAG.getTargetBlockAddress(BA, MVT::i32, 0, MipsII::MO_ABS_LO);
- SDValue Hi = DAG.getNode(MipsISD::Hi, dl, MVT::i32, BAHi);
- SDValue Lo = DAG.getNode(MipsISD::Lo, dl, MVT::i32, BALo);
- return DAG.getNode(ISD::ADD, dl, MVT::i32, Hi, Lo);
- }
-
- EVT ValTy = Op.getValueType();
- unsigned GOTFlag = HasMips64 ? MipsII::MO_GOT_PAGE : MipsII::MO_GOT;
- unsigned OFSTFlag = HasMips64 ? MipsII::MO_GOT_OFST : MipsII::MO_ABS_LO;
- SDValue BAGOTOffset = DAG.getTargetBlockAddress(BA, ValTy, 0, GOTFlag);
- BAGOTOffset = DAG.getNode(MipsISD::Wrapper, dl, ValTy,
- GetGlobalReg(DAG, ValTy), BAGOTOffset);
- SDValue BALOOffset = DAG.getTargetBlockAddress(BA, ValTy, 0, OFSTFlag);
- SDValue Load = DAG.getLoad(ValTy, dl, DAG.getEntryNode(), BAGOTOffset,
- MachinePointerInfo(), false, false, false, 0);
- SDValue Lo = DAG.getNode(MipsISD::Lo, dl, ValTy, BALOOffset);
- return DAG.getNode(ISD::ADD, dl, ValTy, Load, Lo);
+ return getAddrLocal(Op, DAG, HasMips64);
}
SDValue MipsTargetLowering::
@@ -1901,41 +1932,15 @@ LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const
SDValue MipsTargetLowering::
LowerJumpTable(SDValue Op, SelectionDAG &DAG) const
{
- SDValue HiPart, JTI, JTILo;
- // FIXME there isn't actually debug info here
- DebugLoc dl = Op.getDebugLoc();
- bool IsPIC = getTargetMachine().getRelocationModel() == Reloc::PIC_;
- EVT PtrVT = Op.getValueType();
- JumpTableSDNode *JT = cast<JumpTableSDNode>(Op);
-
- if (!IsPIC && !IsN64) {
- JTI = DAG.getTargetJumpTable(JT->getIndex(), PtrVT, MipsII::MO_ABS_HI);
- HiPart = DAG.getNode(MipsISD::Hi, dl, PtrVT, JTI);
- JTILo = DAG.getTargetJumpTable(JT->getIndex(), PtrVT, MipsII::MO_ABS_LO);
- } else {// Emit Load from Global Pointer
- unsigned GOTFlag = HasMips64 ? MipsII::MO_GOT_PAGE : MipsII::MO_GOT;
- unsigned OfstFlag = HasMips64 ? MipsII::MO_GOT_OFST : MipsII::MO_ABS_LO;
- JTI = DAG.getTargetJumpTable(JT->getIndex(), PtrVT, GOTFlag);
- JTI = DAG.getNode(MipsISD::Wrapper, dl, PtrVT, GetGlobalReg(DAG, PtrVT),
- JTI);
- HiPart = DAG.getLoad(PtrVT, dl, DAG.getEntryNode(), JTI,
- MachinePointerInfo(), false, false, false, 0);
- JTILo = DAG.getTargetJumpTable(JT->getIndex(), PtrVT, OfstFlag);
- }
+ if (getTargetMachine().getRelocationModel() != Reloc::PIC_ && !IsN64)
+ return getAddrNonPIC(Op, DAG);
- SDValue Lo = DAG.getNode(MipsISD::Lo, dl, PtrVT, JTILo);
- return DAG.getNode(ISD::ADD, dl, PtrVT, HiPart, Lo);
+ return getAddrLocal(Op, DAG, HasMips64);
}
SDValue MipsTargetLowering::
LowerConstantPool(SDValue Op, SelectionDAG &DAG) const
{
- SDValue ResNode;
- ConstantPoolSDNode *N = cast<ConstantPoolSDNode>(Op);
- const Constant *C = N->getConstVal();
- // FIXME there isn't actually debug info here
- DebugLoc dl = Op.getDebugLoc();
-
// gp_rel relocation
// FIXME: we should reference the constant pool using small data sections,
// but the asm printer currently doesn't support this feature without
@@ -1946,31 +1951,10 @@ LowerConstantPool(SDValue Op, SelectionDAG &DAG) const
// SDValue GOT = DAG.getGLOBAL_OFFSET_TABLE(MVT::i32);
// ResNode = DAG.getNode(ISD::ADD, MVT::i32, GOT, GPRelNode);
- if (getTargetMachine().getRelocationModel() != Reloc::PIC_ && !IsN64) {
- SDValue CPHi = DAG.getTargetConstantPool(C, MVT::i32, N->getAlignment(),
- N->getOffset(), MipsII::MO_ABS_HI);
- SDValue CPLo = DAG.getTargetConstantPool(C, MVT::i32, N->getAlignment(),
- N->getOffset(), MipsII::MO_ABS_LO);
- SDValue HiPart = DAG.getNode(MipsISD::Hi, dl, MVT::i32, CPHi);
- SDValue Lo = DAG.getNode(MipsISD::Lo, dl, MVT::i32, CPLo);
- ResNode = DAG.getNode(ISD::ADD, dl, MVT::i32, HiPart, Lo);
- } else {
- EVT ValTy = Op.getValueType();
- unsigned GOTFlag = HasMips64 ? MipsII::MO_GOT_PAGE : MipsII::MO_GOT;
- unsigned OFSTFlag = HasMips64 ? MipsII::MO_GOT_OFST : MipsII::MO_ABS_LO;
- SDValue CP = DAG.getTargetConstantPool(C, ValTy, N->getAlignment(),
- N->getOffset(), GOTFlag);
- CP = DAG.getNode(MipsISD::Wrapper, dl, ValTy, GetGlobalReg(DAG, ValTy), CP);
- SDValue Load = DAG.getLoad(ValTy, dl, DAG.getEntryNode(), CP,
- MachinePointerInfo::getConstantPool(), false,
- false, false, 0);
- SDValue CPLo = DAG.getTargetConstantPool(C, ValTy, N->getAlignment(),
- N->getOffset(), OFSTFlag);
- SDValue Lo = DAG.getNode(MipsISD::Lo, dl, ValTy, CPLo);
- ResNode = DAG.getNode(ISD::ADD, dl, ValTy, Load, Lo);
- }
+ if (getTargetMachine().getRelocationModel() != Reloc::PIC_ && !IsN64)
+ return getAddrNonPIC(Op, DAG);
- return ResNode;
+ return getAddrLocal(Op, DAG, HasMips64);
}
SDValue MipsTargetLowering::LowerVASTART(SDValue Op, SelectionDAG &DAG) const {
@@ -2862,60 +2846,41 @@ MipsTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
// If the callee is a GlobalAddress/ExternalSymbol node (quite common, every
// direct call is) turn it into a TargetGlobalAddress/TargetExternalSymbol
// node so that legalize doesn't hack it.
- unsigned char OpFlag;
bool IsPICCall = (IsN64 || IsPIC); // true if calls are translated to jalr $25
bool GlobalOrExternal = false;
SDValue CalleeLo;
if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee)) {
- if (IsPICCall && G->getGlobal()->hasInternalLinkage()) {
- OpFlag = IsO32 ? MipsII::MO_GOT : MipsII::MO_GOT_PAGE;
- unsigned char LoFlag = IsO32 ? MipsII::MO_ABS_LO : MipsII::MO_GOT_OFST;
+ if (IsPICCall) {
+ if (G->getGlobal()->hasInternalLinkage())
+ Callee = getAddrLocal(Callee, DAG, HasMips64);
+ else if (LargeGOT)
+ Callee = getAddrGlobalLargeGOT(Callee, DAG, MipsII::MO_CALL_HI16,
+ MipsII::MO_CALL_LO16);
+ else
+ Callee = getAddrGlobal(Callee, DAG, MipsII::MO_GOT_CALL);
+ } else
Callee = DAG.getTargetGlobalAddress(G->getGlobal(), dl, getPointerTy(), 0,
- OpFlag);
- CalleeLo = DAG.getTargetGlobalAddress(G->getGlobal(), dl, getPointerTy(),
- 0, LoFlag);
- } else {
- OpFlag = IsPICCall ? MipsII::MO_GOT_CALL : MipsII::MO_NO_FLAG;
- Callee = DAG.getTargetGlobalAddress(G->getGlobal(), dl,
- getPointerTy(), 0, OpFlag);
- }
-
+ MipsII::MO_NO_FLAG);
GlobalOrExternal = true;
}
else if (ExternalSymbolSDNode *S = dyn_cast<ExternalSymbolSDNode>(Callee)) {
- if (IsN64 || (!IsO32 && IsPIC))
- OpFlag = MipsII::MO_GOT_DISP;
- else if (!IsPIC) // !N64 && static
- OpFlag = MipsII::MO_NO_FLAG;
+ if (!IsN64 && !IsPIC) // !N64 && static
+ Callee = DAG.getTargetExternalSymbol(S->getSymbol(), getPointerTy(),
+ MipsII::MO_NO_FLAG);
+ else if (LargeGOT)
+ Callee = getAddrGlobalLargeGOT(Callee, DAG, MipsII::MO_CALL_HI16,
+ MipsII::MO_CALL_LO16);
+ else if (HasMips64)
+ Callee = getAddrGlobal(Callee, DAG, MipsII::MO_GOT_DISP);
else // O32 & PIC
- OpFlag = MipsII::MO_GOT_CALL;
- Callee = DAG.getTargetExternalSymbol(S->getSymbol(), getPointerTy(),
- OpFlag);
+ Callee = getAddrGlobal(Callee, DAG, MipsII::MO_GOT_CALL);
+
GlobalOrExternal = true;
}
SDValue InFlag;
- // Create nodes that load address of callee and copy it to T9
- if (IsPICCall) {
- if (GlobalOrExternal) {
- // Load callee address
- Callee = DAG.getNode(MipsISD::Wrapper, dl, getPointerTy(),
- GetGlobalReg(DAG, getPointerTy()), Callee);
- SDValue LoadValue = DAG.getLoad(getPointerTy(), dl, DAG.getEntryNode(),
- Callee, MachinePointerInfo::getGOT(),
- false, false, false, 0);
-
- // Use GOT+LO if callee has internal linkage.
- if (CalleeLo.getNode()) {
- SDValue Lo = DAG.getNode(MipsISD::Lo, dl, getPointerTy(), CalleeLo);
- Callee = DAG.getNode(ISD::ADD, dl, getPointerTy(), LoadValue, Lo);
- } else
- Callee = LoadValue;
- }
- }
-
// T9 register operand.
SDValue T9;
diff --git a/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td b/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td
index f16b5f9..aa88819 100644
--- a/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td
+++ b/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td
@@ -1154,12 +1154,14 @@ def : MipsPat<(MipsHi tblockaddress:$in), (LUi tblockaddress:$in)>;
def : MipsPat<(MipsHi tjumptable:$in), (LUi tjumptable:$in)>;
def : MipsPat<(MipsHi tconstpool:$in), (LUi tconstpool:$in)>;
def : MipsPat<(MipsHi tglobaltlsaddr:$in), (LUi tglobaltlsaddr:$in)>;
+def : MipsPat<(MipsHi texternalsym:$in), (LUi texternalsym:$in)>;
def : MipsPat<(MipsLo tglobaladdr:$in), (ADDiu ZERO, tglobaladdr:$in)>;
def : MipsPat<(MipsLo tblockaddress:$in), (ADDiu ZERO, tblockaddress:$in)>;
def : MipsPat<(MipsLo tjumptable:$in), (ADDiu ZERO, tjumptable:$in)>;
def : MipsPat<(MipsLo tconstpool:$in), (ADDiu ZERO, tconstpool:$in)>;
def : MipsPat<(MipsLo tglobaltlsaddr:$in), (ADDiu ZERO, tglobaltlsaddr:$in)>;
+def : MipsPat<(MipsLo texternalsym:$in), (ADDiu ZERO, texternalsym:$in)>;
def : MipsPat<(add CPURegs:$hi, (MipsLo tglobaladdr:$lo)),
(ADDiu CPURegs:$hi, tglobaladdr:$lo)>;
diff --git a/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp b/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp
index 052046a..da1119d 100644
--- a/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp
+++ b/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp
@@ -222,10 +222,17 @@ void *MipsJITInfo::emitFunctionStub(const Function *F, void *Fn,
// addiu t9, t9, %lo(EmittedAddr)
// jalr t8, t9
// nop
- JCE.emitWordLE(0xf << 26 | 25 << 16 | Hi);
- JCE.emitWordLE(9 << 26 | 25 << 21 | 25 << 16 | Lo);
- JCE.emitWordLE(25 << 21 | 24 << 11 | 9);
- JCE.emitWordLE(0);
+ if (IsLittleEndian) {
+ JCE.emitWordLE(0xf << 26 | 25 << 16 | Hi);
+ JCE.emitWordLE(9 << 26 | 25 << 21 | 25 << 16 | Lo);
+ JCE.emitWordLE(25 << 21 | 24 << 11 | 9);
+ JCE.emitWordLE(0);
+ } else {
+ JCE.emitWordBE(0xf << 26 | 25 << 16 | Hi);
+ JCE.emitWordBE(9 << 26 | 25 << 21 | 25 << 16 | Lo);
+ JCE.emitWordBE(25 << 21 | 24 << 11 | 9);
+ JCE.emitWordBE(0);
+ }
sys::Memory::InvalidateInstructionCache(Addr, 16);
if (!sys::Memory::setRangeExecutable(Addr, 16))
diff --git a/contrib/llvm/lib/Target/Mips/MipsJITInfo.h b/contrib/llvm/lib/Target/Mips/MipsJITInfo.h
index 637a318..ecda310 100644
--- a/contrib/llvm/lib/Target/Mips/MipsJITInfo.h
+++ b/contrib/llvm/lib/Target/Mips/MipsJITInfo.h
@@ -26,10 +26,11 @@ class MipsTargetMachine;
class MipsJITInfo : public TargetJITInfo {
bool IsPIC;
+ bool IsLittleEndian;
public:
explicit MipsJITInfo() :
- IsPIC(false) {}
+ IsPIC(false), IsLittleEndian(true) {}
/// replaceMachineCodeForFunction - Make it so that calling the function
/// whose machine code is at OLD turns into a call to NEW, perhaps by
@@ -58,8 +59,10 @@ class MipsJITInfo : public TargetJITInfo {
unsigned NumRelocs, unsigned char *GOTBase);
/// Initialize - Initialize internal stage for the function being JITted.
- void Initialize(const MachineFunction &MF, bool isPIC) {
+ void Initialize(const MachineFunction &MF, bool isPIC,
+ bool isLittleEndian) {
IsPIC = isPIC;
+ IsLittleEndian = isLittleEndian;
}
};
diff --git a/contrib/llvm/lib/Target/Mips/MipsMCInstLower.cpp b/contrib/llvm/lib/Target/Mips/MipsMCInstLower.cpp
index 5fa6339..4162f98 100644
--- a/contrib/llvm/lib/Target/Mips/MipsMCInstLower.cpp
+++ b/contrib/llvm/lib/Target/Mips/MipsMCInstLower.cpp
@@ -62,6 +62,10 @@ MCOperand MipsMCInstLower::LowerSymbolOperand(const MachineOperand &MO,
case MipsII::MO_GOT_OFST: Kind = MCSymbolRefExpr::VK_Mips_GOT_OFST; break;
case MipsII::MO_HIGHER: Kind = MCSymbolRefExpr::VK_Mips_HIGHER; break;
case MipsII::MO_HIGHEST: Kind = MCSymbolRefExpr::VK_Mips_HIGHEST; break;
+ case MipsII::MO_GOT_HI16: Kind = MCSymbolRefExpr::VK_Mips_GOT_HI16; break;
+ case MipsII::MO_GOT_LO16: Kind = MCSymbolRefExpr::VK_Mips_GOT_LO16; break;
+ case MipsII::MO_CALL_HI16: Kind = MCSymbolRefExpr::VK_Mips_CALL_HI16; break;
+ case MipsII::MO_CALL_LO16: Kind = MCSymbolRefExpr::VK_Mips_CALL_LO16; break;
}
switch (MOTy) {
diff --git a/contrib/llvm/lib/Transforms/Scalar/SROA.cpp b/contrib/llvm/lib/Transforms/Scalar/SROA.cpp
index ccc2f7a..640ea31 100644
--- a/contrib/llvm/lib/Transforms/Scalar/SROA.cpp
+++ b/contrib/llvm/lib/Transforms/Scalar/SROA.cpp
@@ -2160,6 +2160,9 @@ static bool isIntegerWideningViable(const DataLayout &TD,
AllocaPartitioning::const_use_iterator I,
AllocaPartitioning::const_use_iterator E) {
uint64_t SizeInBits = TD.getTypeSizeInBits(AllocaTy);
+ // Don't create integer types larger than the maximum bitwidth.
+ if (SizeInBits > IntegerType::MAX_INT_BITS)
+ return false;
// Don't try to handle allocas with bit-padding.
if (SizeInBits != TD.getTypeStoreSizeInBits(AllocaTy))
@@ -2198,7 +2201,7 @@ static bool isIntegerWideningViable(const DataLayout &TD,
if (RelBegin == 0 && RelEnd == Size)
WholeAllocaOp = true;
if (IntegerType *ITy = dyn_cast<IntegerType>(LI->getType())) {
- if (ITy->getBitWidth() < TD.getTypeStoreSize(ITy))
+ if (ITy->getBitWidth() < TD.getTypeStoreSizeInBits(ITy))
return false;
continue;
}
@@ -2214,7 +2217,7 @@ static bool isIntegerWideningViable(const DataLayout &TD,
if (RelBegin == 0 && RelEnd == Size)
WholeAllocaOp = true;
if (IntegerType *ITy = dyn_cast<IntegerType>(ValueTy)) {
- if (ITy->getBitWidth() < TD.getTypeStoreSize(ITy))
+ if (ITy->getBitWidth() < TD.getTypeStoreSizeInBits(ITy))
return false;
continue;
}
@@ -2224,7 +2227,7 @@ static bool isIntegerWideningViable(const DataLayout &TD,
!canConvertValue(TD, ValueTy, AllocaTy))
return false;
} else if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(I->U->getUser())) {
- if (MI->isVolatile())
+ if (MI->isVolatile() || !isa<Constant>(MI->getLength()))
return false;
if (MemTransferInst *MTI = dyn_cast<MemTransferInst>(I->U->getUser())) {
const AllocaPartitioning::MemTransferOffsets &MTO
diff --git a/contrib/llvm/tools/clang/include/clang/Sema/Scope.h b/contrib/llvm/tools/clang/include/clang/Sema/Scope.h
index fa508cf..1329f97 100644
--- a/contrib/llvm/tools/clang/include/clang/Sema/Scope.h
+++ b/contrib/llvm/tools/clang/include/clang/Sema/Scope.h
@@ -84,11 +84,18 @@ public:
/// TryScope - This is the scope of a C++ try statement.
TryScope = 0x1000,
+ /// CatchScope - This is the scope of a C++ catch statement.
+ CatchScope = 0x2000,
+
+ /// FnTryCatchScope - This is the scope for a function-level C++ try or
+ /// catch scope.
+ FnTryCatchScope = 0x4000,
+
/// FnTryScope - This is the scope of a function-level C++ try scope.
- FnTryScope = 0x3000,
+ FnTryScope = TryScope | FnTryCatchScope,
/// FnCatchScope - This is the scope of a function-level C++ catch scope.
- FnCatchScope = 0x4000
+ FnCatchScope = CatchScope | FnTryCatchScope
};
private:
/// The parent scope for this scope. This is null for the translation-unit
diff --git a/contrib/llvm/tools/clang/lib/Basic/Targets.cpp b/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
index f36ef82..84a6daf 100644
--- a/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
+++ b/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
@@ -3078,7 +3078,9 @@ public:
// name.
if (Name == "apcs-gnu") {
DoubleAlign = LongLongAlign = LongDoubleAlign = SuitableAlign = 32;
- SizeType = UnsignedLong;
+ // size_t is unsigned int on FreeBSD.
+ if (getTriple().getOS() != llvm::Triple::FreeBSD)
+ SizeType = UnsignedLong;
// Revert to using SignedInt on apcs-gnu to comply with existing behaviour.
WCharType = SignedInt;
diff --git a/contrib/llvm/tools/clang/lib/Basic/Version.cpp b/contrib/llvm/tools/clang/lib/Basic/Version.cpp
index a04ab93..990bd0b 100644
--- a/contrib/llvm/tools/clang/lib/Basic/Version.cpp
+++ b/contrib/llvm/tools/clang/lib/Basic/Version.cpp
@@ -32,7 +32,7 @@ std::string getClangRepositoryPath() {
// If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us
// pick up a tag in an SVN export, for example.
- static StringRef SVNRepository("$URL: http://llvm.org/svn/llvm-project/cfe/branches/release_32/lib/Basic/Version.cpp $");
+ static StringRef SVNRepository("$URL: http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_32/final/lib/Basic/Version.cpp $");
if (URL.empty()) {
URL = SVNRepository.slice(SVNRepository.find(':'),
SVNRepository.find("/lib/Basic"));
diff --git a/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp b/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp
index a2ccb35..c5460b2 100644
--- a/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp
+++ b/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp
@@ -1667,6 +1667,19 @@ Tool &FreeBSD::SelectTool(const Compilation &C, const JobAction &JA,
return *T;
}
+bool FreeBSD::UseSjLjExceptions() const {
+ // FreeBSD uses SjLj exceptions on ARM oabi.
+ switch (getTriple().getEnvironment()) {
+ case llvm::Triple::GNUEABI:
+ case llvm::Triple::EABI:
+ return false;
+
+ default:
+ return (getTriple().getArch() == llvm::Triple::arm ||
+ getTriple().getArch() == llvm::Triple::thumb);
+ }
+}
+
/// NetBSD - NetBSD tool chain which can call as(1) and ld(1) directly.
NetBSD::NetBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Args)
@@ -1855,6 +1868,8 @@ enum LinuxDistro {
UbuntuNatty,
UbuntuOneiric,
UbuntuPrecise,
+ UbuntuQuantal,
+ UbuntuRaring,
UnknownDistro
};
@@ -1872,7 +1887,7 @@ static bool IsDebian(enum LinuxDistro Distro) {
}
static bool IsUbuntu(enum LinuxDistro Distro) {
- return Distro >= UbuntuHardy && Distro <= UbuntuPrecise;
+ return Distro >= UbuntuHardy && Distro <= UbuntuRaring;
}
static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) {
@@ -1894,6 +1909,8 @@ static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) {
.Case("natty", UbuntuNatty)
.Case("oneiric", UbuntuOneiric)
.Case("precise", UbuntuPrecise)
+ .Case("quantal", UbuntuQuantal)
+ .Case("raring", UbuntuRaring)
.Default(UnknownDistro);
return Version;
}
diff --git a/contrib/llvm/tools/clang/lib/Driver/ToolChains.h b/contrib/llvm/tools/clang/lib/Driver/ToolChains.h
index 4c267e8..6f0ca83 100644
--- a/contrib/llvm/tools/clang/lib/Driver/ToolChains.h
+++ b/contrib/llvm/tools/clang/lib/Driver/ToolChains.h
@@ -468,6 +468,7 @@ public:
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA,
const ActionList &Inputs) const;
+ virtual bool UseSjLjExceptions() const;
};
class LLVM_LIBRARY_VISIBILITY NetBSD : public Generic_ELF {
diff --git a/contrib/llvm/tools/clang/lib/Driver/Tools.cpp b/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
index 927ffe0..1dff318 100644
--- a/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
+++ b/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
@@ -665,6 +665,11 @@ static StringRef getARMFloatABI(const Driver &D,
break;
}
+ case llvm::Triple::FreeBSD:
+ // FreeBSD defaults to soft float
+ FloatABI = "soft";
+ break;
+
default:
switch(Triple.getEnvironment()) {
case llvm::Triple::GNUEABIHF:
@@ -5422,6 +5427,17 @@ void freebsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
LastPICArg->getOption().matches(options::OPT_fpie))) {
CmdArgs.push_back("-KPIC");
}
+ } else if (getToolChain().getArch() == llvm::Triple::arm ||
+ getToolChain().getArch() == llvm::Triple::thumb) {
+ CmdArgs.push_back("-mfpu=softvfp");
+ switch(getToolChain().getTriple().getEnvironment()) {
+ case llvm::Triple::GNUEABI:
+ case llvm::Triple::EABI:
+ break;
+
+ default:
+ CmdArgs.push_back("-matpcs");
+ }
}
Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
diff --git a/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp b/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp
index 4cb14e2..f11a9d1 100644
--- a/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp
+++ b/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp
@@ -706,8 +706,7 @@ SourceLocation Parser::ParseDecltypeSpecifier(DeclSpec &DS) {
if (SkipUntil(tok::r_paren, /*StopAtSemi=*/true, /*DontConsume=*/true)) {
EndLoc = ConsumeParen();
} else {
- assert(Tok.is(tok::semi));
- if (PP.isBacktrackEnabled()) {
+ if (PP.isBacktrackEnabled() && Tok.is(tok::semi)) {
// Backtrack to get the location of the last token before the semi.
PP.RevertCachedTokens(2);
ConsumeToken(); // the semi.
diff --git a/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp b/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp
index f604e03..5883115 100644
--- a/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp
+++ b/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp
@@ -2197,7 +2197,7 @@ StmtResult Parser::ParseCXXCatchBlock(bool FnCatch) {
// The name in a catch exception-declaration is local to the handler and
// shall not be redeclared in the outermost block of the handler.
ParseScope CatchScope(this, Scope::DeclScope | Scope::ControlScope |
- (FnCatch ? Scope::FnCatchScope : 0));
+ (FnCatch ? Scope::FnCatchScope : Scope::CatchScope));
// exception-declaration is equivalent to '...' or a parameter-declaration
// without default arguments.
diff --git a/contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp b/contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp
index 0093915..7d55304 100644
--- a/contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp
+++ b/contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp
@@ -135,16 +135,13 @@ bool IdentifierResolver::isDeclInScope(Decl *D, DeclContext *Ctx,
// of the controlled statement.
//
assert(S->getParent() && "No TUScope?");
- if (S->getFlags() & Scope::FnTryScope)
- return S->getParent()->isDeclScope(D);
if (S->getParent()->getFlags() & Scope::ControlScope) {
- if (S->getParent()->getFlags() & Scope::FnCatchScope) {
- S = S->getParent();
- if (S->isDeclScope(D))
- return true;
- }
- return S->getParent()->isDeclScope(D);
+ S = S->getParent();
+ if (S->isDeclScope(D))
+ return true;
}
+ if (S->getFlags() & Scope::FnTryCatchScope)
+ return S->getParent()->isDeclScope(D);
}
return false;
}
diff --git a/contrib/mknod/pack_dev.c b/contrib/mknod/pack_dev.c
new file mode 100644
index 0000000..800a56c
--- /dev/null
+++ b/contrib/mknod/pack_dev.c
@@ -0,0 +1,290 @@
+/* $NetBSD: pack_dev.c,v 1.11 2011/08/27 18:37:41 joerg Exp $ */
+
+/*-
+ * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Charles M. Hannum.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
+#include <sys/cdefs.h>
+#if !defined(lint)
+__RCSID("$NetBSD: pack_dev.c,v 1.11 2011/08/27 18:37:41 joerg Exp $");
+#endif /* not lint */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "pack_dev.h"
+
+static pack_t pack_netbsd;
+static pack_t pack_freebsd;
+static pack_t pack_8_8;
+static pack_t pack_12_20;
+static pack_t pack_14_18;
+static pack_t pack_8_24;
+static pack_t pack_bsdos;
+static int compare_format(const void *, const void *);
+
+static const char iMajorError[] = "invalid major number";
+static const char iMinorError[] = "invalid minor number";
+static const char tooManyFields[] = "too many fields for format";
+
+ /* exported */
+portdev_t
+pack_native(int n, u_long numbers[], const char **error)
+{
+ portdev_t dev = 0;
+
+ if (n == 2) {
+ dev = makedev(numbers[0], numbers[1]);
+ if ((u_long)major(dev) != numbers[0])
+ *error = iMajorError;
+ else if ((u_long)minor(dev) != numbers[1])
+ *error = iMinorError;
+ } else
+ *error = tooManyFields;
+ return (dev);
+}
+
+
+static portdev_t
+pack_netbsd(int n, u_long numbers[], const char **error)
+{
+ portdev_t dev = 0;
+
+ if (n == 2) {
+ dev = makedev_netbsd(numbers[0], numbers[1]);
+ if ((u_long)major_netbsd(dev) != numbers[0])
+ *error = iMajorError;
+ else if ((u_long)minor_netbsd(dev) != numbers[1])
+ *error = iMinorError;
+ } else
+ *error = tooManyFields;
+ return (dev);
+}
+
+
+#define major_freebsd(x) ((int32_t)(((x) & 0x0000ff00) >> 8))
+#define minor_freebsd(x) ((int32_t)(((x) & 0xffff00ff) >> 0))
+#define makedev_freebsd(x,y) ((portdev_t)((((x) << 8) & 0x0000ff00) | \
+ (((y) << 0) & 0xffff00ff)))
+
+static portdev_t
+pack_freebsd(int n, u_long numbers[], const char **error)
+{
+ portdev_t dev = 0;
+
+ if (n == 2) {
+ dev = makedev_freebsd(numbers[0], numbers[1]);
+ if ((u_long)major_freebsd(dev) != numbers[0])
+ *error = iMajorError;
+ if ((u_long)minor_freebsd(dev) != numbers[1])
+ *error = iMinorError;
+ } else
+ *error = tooManyFields;
+ return (dev);
+}
+
+
+#define major_8_8(x) ((int32_t)(((x) & 0x0000ff00) >> 8))
+#define minor_8_8(x) ((int32_t)(((x) & 0x000000ff) >> 0))
+#define makedev_8_8(x,y) ((portdev_t)((((x) << 8) & 0x0000ff00) | \
+ (((y) << 0) & 0x000000ff)))
+
+static portdev_t
+pack_8_8(int n, u_long numbers[], const char **error)
+{
+ portdev_t dev = 0;
+
+ if (n == 2) {
+ dev = makedev_8_8(numbers[0], numbers[1]);
+ if ((u_long)major_8_8(dev) != numbers[0])
+ *error = iMajorError;
+ if ((u_long)minor_8_8(dev) != numbers[1])
+ *error = iMinorError;
+ } else
+ *error = tooManyFields;
+ return (dev);
+}
+
+
+#define major_12_20(x) ((int32_t)(((x) & 0xfff00000) >> 20))
+#define minor_12_20(x) ((int32_t)(((x) & 0x000fffff) >> 0))
+#define makedev_12_20(x,y) ((portdev_t)((((x) << 20) & 0xfff00000) | \
+ (((y) << 0) & 0x000fffff)))
+
+static portdev_t
+pack_12_20(int n, u_long numbers[], const char **error)
+{
+ portdev_t dev = 0;
+
+ if (n == 2) {
+ dev = makedev_12_20(numbers[0], numbers[1]);
+ if ((u_long)major_12_20(dev) != numbers[0])
+ *error = iMajorError;
+ if ((u_long)minor_12_20(dev) != numbers[1])
+ *error = iMinorError;
+ } else
+ *error = tooManyFields;
+ return (dev);
+}
+
+
+#define major_14_18(x) ((int32_t)(((x) & 0xfffc0000) >> 18))
+#define minor_14_18(x) ((int32_t)(((x) & 0x0003ffff) >> 0))
+#define makedev_14_18(x,y) ((portdev_t)((((x) << 18) & 0xfffc0000) | \
+ (((y) << 0) & 0x0003ffff)))
+
+static portdev_t
+pack_14_18(int n, u_long numbers[], const char **error)
+{
+ portdev_t dev = 0;
+
+ if (n == 2) {
+ dev = makedev_14_18(numbers[0], numbers[1]);
+ if ((u_long)major_14_18(dev) != numbers[0])
+ *error = iMajorError;
+ if ((u_long)minor_14_18(dev) != numbers[1])
+ *error = iMinorError;
+ } else
+ *error = tooManyFields;
+ return (dev);
+}
+
+
+#define major_8_24(x) ((int32_t)(((x) & 0xff000000) >> 24))
+#define minor_8_24(x) ((int32_t)(((x) & 0x00ffffff) >> 0))
+#define makedev_8_24(x,y) ((portdev_t)((((x) << 24) & 0xff000000) | \
+ (((y) << 0) & 0x00ffffff)))
+
+static portdev_t
+pack_8_24(int n, u_long numbers[], const char **error)
+{
+ portdev_t dev = 0;
+
+ if (n == 2) {
+ dev = makedev_8_24(numbers[0], numbers[1]);
+ if ((u_long)major_8_24(dev) != numbers[0])
+ *error = iMajorError;
+ if ((u_long)minor_8_24(dev) != numbers[1])
+ *error = iMinorError;
+ } else
+ *error = tooManyFields;
+ return (dev);
+}
+
+
+#define major_12_12_8(x) ((int32_t)(((x) & 0xfff00000) >> 20))
+#define unit_12_12_8(x) ((int32_t)(((x) & 0x000fff00) >> 8))
+#define subunit_12_12_8(x) ((int32_t)(((x) & 0x000000ff) >> 0))
+#define makedev_12_12_8(x,y,z) ((portdev_t)((((x) << 20) & 0xfff00000) | \
+ (((y) << 8) & 0x000fff00) | \
+ (((z) << 0) & 0x000000ff)))
+
+static portdev_t
+pack_bsdos(int n, u_long numbers[], const char **error)
+{
+ portdev_t dev = 0;
+
+ if (n == 2) {
+ dev = makedev_12_20(numbers[0], numbers[1]);
+ if ((u_long)major_12_20(dev) != numbers[0])
+ *error = iMajorError;
+ if ((u_long)minor_12_20(dev) != numbers[1])
+ *error = iMinorError;
+ } else if (n == 3) {
+ dev = makedev_12_12_8(numbers[0], numbers[1], numbers[2]);
+ if ((u_long)major_12_12_8(dev) != numbers[0])
+ *error = iMajorError;
+ if ((u_long)unit_12_12_8(dev) != numbers[1])
+ *error = "invalid unit number";
+ if ((u_long)subunit_12_12_8(dev) != numbers[2])
+ *error = "invalid subunit number";
+ } else
+ *error = tooManyFields;
+ return (dev);
+}
+
+
+ /* list of formats and pack functions */
+ /* this list must be sorted lexically */
+static struct format {
+ const char *name;
+ pack_t *pack;
+} formats[] = {
+ {"386bsd", pack_8_8},
+ {"4bsd", pack_8_8},
+ {"bsdos", pack_bsdos},
+ {"freebsd", pack_freebsd},
+ {"hpux", pack_8_24},
+ {"isc", pack_8_8},
+ {"linux", pack_8_8},
+ {"native", pack_native},
+ {"netbsd", pack_netbsd},
+ {"osf1", pack_12_20},
+ {"sco", pack_8_8},
+ {"solaris", pack_14_18},
+ {"sunos", pack_8_8},
+ {"svr3", pack_8_8},
+ {"svr4", pack_14_18},
+ {"ultrix", pack_8_8},
+};
+
+static int
+compare_format(const void *key, const void *element)
+{
+ const char *name;
+ const struct format *format;
+
+ name = key;
+ format = element;
+
+ return (strcmp(name, format->name));
+}
+
+
+pack_t *
+pack_find(const char *name)
+{
+ struct format *format;
+
+ format = bsearch(name, formats,
+ sizeof(formats)/sizeof(formats[0]),
+ sizeof(formats[0]), compare_format);
+ if (format == 0)
+ return (NULL);
+ return (format->pack);
+}
diff --git a/contrib/mknod/pack_dev.h b/contrib/mknod/pack_dev.h
new file mode 100644
index 0000000..d909df4
--- /dev/null
+++ b/contrib/mknod/pack_dev.h
@@ -0,0 +1,52 @@
+/* $NetBSD: pack_dev.h,v 1.7 2008/04/28 20:23:09 martin Exp $ */
+
+/*-
+ * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Charles M. Hannum.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _PACK_DEV_H
+#define _PACK_DEV_H
+
+#ifdef __CYGWIN__
+typedef __dev32_t portdev_t;
+#else
+typedef dev_t portdev_t;
+#endif
+typedef portdev_t pack_t(int, u_long [], const char **);
+
+pack_t *pack_find(const char *);
+pack_t pack_native;
+
+#define major_netbsd(x) ((int32_t)((((x) & 0x000fff00) >> 8)))
+#define minor_netbsd(x) ((int32_t)((((x) & 0xfff00000) >> 12) | \
+ (((x) & 0x000000ff) >> 0)))
+#define makedev_netbsd(x,y) ((dev_t)((((x) << 8) & 0x000fff00) | \
+ (((y) << 12) & 0xfff00000) | \
+ (((y) << 0) & 0x000000ff)))
+
+#endif /* _PACK_DEV_H */
diff --git a/contrib/mtree/Makefile b/contrib/mtree/Makefile
new file mode 100644
index 0000000..b14a73f
--- /dev/null
+++ b/contrib/mtree/Makefile
@@ -0,0 +1,20 @@
+# $NetBSD: Makefile,v 1.33 2012/10/05 01:26:56 christos Exp $
+# from: @(#)Makefile 8.2 (Berkeley) 4/27/95
+
+.include <bsd.own.mk>
+
+PROG= mtree
+#CPPFLAGS+=-DDEBUG
+CPPFLAGS+= -DMTREE
+MAN= mtree.8
+SRCS= compare.c crc.c create.c excludes.c misc.c mtree.c spec.c specspec.c \
+ verify.c getid.c pack_dev.c
+.if (${HOSTPROG:U} == "")
+DPADD+= ${LIBUTIL}
+LDADD+= -lutil
+.endif
+
+CPPFLAGS+= -I${NETBSDSRCDIR}/sbin/mknod
+.PATH: ${NETBSDSRCDIR}/sbin/mknod
+
+.include <bsd.prog.mk>
diff --git a/contrib/mtree/compare.c b/contrib/mtree/compare.c
new file mode 100644
index 0000000..d2389e6
--- /dev/null
+++ b/contrib/mtree/compare.c
@@ -0,0 +1,528 @@
+/* $NetBSD: compare.c,v 1.55 2012/10/05 00:59:35 christos Exp $ */
+
+/*-
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
+#include <sys/cdefs.h>
+#if defined(__RCSID) && !defined(lint)
+#if 0
+static char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93";
+#else
+__RCSID("$NetBSD: compare.c,v 1.55 2012/10/05 00:59:35 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <sys/param.h>
+#include <sys/stat.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+
+#ifndef NO_MD5
+#include <md5.h>
+#endif
+#ifndef NO_RMD160
+#include <rmd160.h>
+#endif
+#ifndef NO_SHA1
+#include <sha1.h>
+#endif
+#ifndef NO_SHA2
+#include <sha2.h>
+#endif
+
+#include "extern.h"
+
+#define INDENTNAMELEN 8
+#define MARK \
+do { \
+ len = printf("%s: ", RP(p)); \
+ if (len > INDENTNAMELEN) { \
+ tab = "\t"; \
+ printf("\n"); \
+ } else { \
+ tab = ""; \
+ printf("%*s", INDENTNAMELEN - (int)len, ""); \
+ } \
+} while (0)
+#define LABEL if (!label++) MARK
+
+#if HAVE_STRUCT_STAT_ST_FLAGS
+
+
+#define CHANGEFLAGS \
+ if (flags != p->fts_statp->st_flags) { \
+ char *sf; \
+ if (!label) { \
+ MARK; \
+ sf = flags_to_string(p->fts_statp->st_flags, "none"); \
+ printf("%sflags (\"%s\"", tab, sf); \
+ free(sf); \
+ } \
+ if (lchflags(p->fts_accpath, flags)) { \
+ label++; \
+ printf(", not modified: %s)\n", \
+ strerror(errno)); \
+ } else { \
+ sf = flags_to_string(flags, "none"); \
+ printf(", modified to \"%s\")\n", sf); \
+ free(sf); \
+ } \
+ }
+
+/* SETFLAGS:
+ * given pflags, additionally set those flags specified in s->st_flags and
+ * selected by mask (the other flags are left unchanged).
+ */
+#define SETFLAGS(pflags, mask) \
+do { \
+ flags = (s->st_flags & (mask)) | (pflags); \
+ CHANGEFLAGS; \
+} while (0)
+
+/* CLEARFLAGS:
+ * given pflags, reset the flags specified in s->st_flags and selected by mask
+ * (the other flags are left unchanged).
+ */
+#define CLEARFLAGS(pflags, mask) \
+do { \
+ flags = (~(s->st_flags & (mask)) & CH_MASK) & (pflags); \
+ CHANGEFLAGS; \
+} while (0)
+#endif /* HAVE_STRUCT_STAT_ST_FLAGS */
+
+int
+compare(NODE *s, FTSENT *p)
+{
+ u_int32_t len, val, flags;
+ int fd, label;
+ const char *cp, *tab;
+#if !defined(NO_MD5) || !defined(NO_RMD160) || !defined(NO_SHA1) || !defined(NO_SHA2)
+ char *digestbuf;
+#endif
+
+ tab = NULL;
+ label = 0;
+ switch(s->type) {
+ case F_BLOCK:
+ if (!S_ISBLK(p->fts_statp->st_mode))
+ goto typeerr;
+ break;
+ case F_CHAR:
+ if (!S_ISCHR(p->fts_statp->st_mode))
+ goto typeerr;
+ break;
+ case F_DIR:
+ if (!S_ISDIR(p->fts_statp->st_mode))
+ goto typeerr;
+ break;
+ case F_FIFO:
+ if (!S_ISFIFO(p->fts_statp->st_mode))
+ goto typeerr;
+ break;
+ case F_FILE:
+ if (!S_ISREG(p->fts_statp->st_mode))
+ goto typeerr;
+ break;
+ case F_LINK:
+ if (!S_ISLNK(p->fts_statp->st_mode))
+ goto typeerr;
+ break;
+#ifdef S_ISSOCK
+ case F_SOCK:
+ if (!S_ISSOCK(p->fts_statp->st_mode))
+ goto typeerr;
+ break;
+#endif
+typeerr: LABEL;
+ printf("\ttype (%s, %s)\n",
+ nodetype(s->type), inotype(p->fts_statp->st_mode));
+ return (label);
+ }
+ if (mtree_Wflag)
+ goto afterpermwhack;
+#if HAVE_STRUCT_STAT_ST_FLAGS
+ if (iflag && !uflag) {
+ if (s->flags & F_FLAGS)
+ SETFLAGS(p->fts_statp->st_flags, SP_FLGS);
+ return (label);
+ }
+ if (mflag && !uflag) {
+ if (s->flags & F_FLAGS)
+ CLEARFLAGS(p->fts_statp->st_flags, SP_FLGS);
+ return (label);
+ }
+#endif
+ if (s->flags & F_DEV &&
+ (s->type == F_BLOCK || s->type == F_CHAR) &&
+ s->st_rdev != p->fts_statp->st_rdev) {
+ LABEL;
+ printf("%sdevice (%#llx, %#llx",
+ tab, (long long)s->st_rdev,
+ (long long)p->fts_statp->st_rdev);
+ if (uflag) {
+ if ((unlink(p->fts_accpath) == -1) ||
+ (mknod(p->fts_accpath,
+ s->st_mode | nodetoino(s->type),
+ s->st_rdev) == -1) ||
+ (lchown(p->fts_accpath, p->fts_statp->st_uid,
+ p->fts_statp->st_gid) == -1) )
+ printf(", not modified: %s)\n",
+ strerror(errno));
+ else
+ printf(", modified)\n");
+ } else
+ printf(")\n");
+ tab = "\t";
+ }
+ /* Set the uid/gid first, then set the mode. */
+ if (s->flags & (F_UID | F_UNAME) && s->st_uid != p->fts_statp->st_uid) {
+ LABEL;
+ printf("%suser (%lu, %lu",
+ tab, (u_long)s->st_uid, (u_long)p->fts_statp->st_uid);
+ if (uflag) {
+ if (lchown(p->fts_accpath, s->st_uid, -1))
+ printf(", not modified: %s)\n",
+ strerror(errno));
+ else
+ printf(", modified)\n");
+ } else
+ printf(")\n");
+ tab = "\t";
+ }
+ if (s->flags & (F_GID | F_GNAME) && s->st_gid != p->fts_statp->st_gid) {
+ LABEL;
+ printf("%sgid (%lu, %lu",
+ tab, (u_long)s->st_gid, (u_long)p->fts_statp->st_gid);
+ if (uflag) {
+ if (lchown(p->fts_accpath, -1, s->st_gid))
+ printf(", not modified: %s)\n",
+ strerror(errno));
+ else
+ printf(", modified)\n");
+ }
+ else
+ printf(")\n");
+ tab = "\t";
+ }
+ if (s->flags & F_MODE &&
+ s->st_mode != (p->fts_statp->st_mode & MBITS)) {
+ if (lflag) {
+ mode_t tmode, mode;
+
+ tmode = s->st_mode;
+ mode = p->fts_statp->st_mode & MBITS;
+ /*
+ * if none of the suid/sgid/etc bits are set,
+ * then if the mode is a subset of the target,
+ * skip.
+ */
+ if (!((tmode & ~(S_IRWXU|S_IRWXG|S_IRWXO)) ||
+ (mode & ~(S_IRWXU|S_IRWXG|S_IRWXO))))
+ if ((mode | tmode) == tmode)
+ goto skip;
+ }
+
+ LABEL;
+ printf("%spermissions (%#lo, %#lo",
+ tab, (u_long)s->st_mode,
+ (u_long)p->fts_statp->st_mode & MBITS);
+ if (uflag) {
+ if (lchmod(p->fts_accpath, s->st_mode))
+ printf(", not modified: %s)\n",
+ strerror(errno));
+ else
+ printf(", modified)\n");
+ }
+ else
+ printf(")\n");
+ tab = "\t";
+ skip: ;
+ }
+ if (s->flags & F_NLINK && s->type != F_DIR &&
+ s->st_nlink != p->fts_statp->st_nlink) {
+ LABEL;
+ printf("%slink count (%lu, %lu)\n",
+ tab, (u_long)s->st_nlink, (u_long)p->fts_statp->st_nlink);
+ tab = "\t";
+ }
+ if (s->flags & F_SIZE && s->st_size != p->fts_statp->st_size) {
+ LABEL;
+ printf("%ssize (%lld, %lld)\n",
+ tab, (long long)s->st_size,
+ (long long)p->fts_statp->st_size);
+ tab = "\t";
+ }
+ /*
+ * XXX
+ * Since utimes(2) only takes a timeval, there's no point in
+ * comparing the low bits of the timespec nanosecond field. This
+ * will only result in mismatches that we can never fix.
+ *
+ * Doesn't display microsecond differences.
+ */
+ if (s->flags & F_TIME) {
+ struct timeval tv[2];
+ struct stat *ps = p->fts_statp;
+ time_t smtime = s->st_mtimespec.tv_sec;
+
+#if defined(BSD4_4) && !defined(HAVE_NBTOOL_CONFIG_H)
+ time_t pmtime = ps->st_mtimespec.tv_sec;
+
+ TIMESPEC_TO_TIMEVAL(&tv[0], &s->st_mtimespec);
+ TIMESPEC_TO_TIMEVAL(&tv[1], &ps->st_mtimespec);
+#else
+ time_t pmtime = (time_t)ps->st_mtime;
+
+ tv[0].tv_sec = smtime;
+ tv[0].tv_usec = 0;
+ tv[1].tv_sec = pmtime;
+ tv[1].tv_usec = 0;
+#endif
+
+ if (tv[0].tv_sec != tv[1].tv_sec ||
+ tv[0].tv_usec != tv[1].tv_usec) {
+ LABEL;
+ printf("%smodification time (%.24s, ",
+ tab, ctime(&smtime));
+ printf("%.24s", ctime(&pmtime));
+ if (tflag) {
+ tv[1] = tv[0];
+ if (utimes(p->fts_accpath, tv))
+ printf(", not modified: %s)\n",
+ strerror(errno));
+ else
+ printf(", modified)\n");
+ } else
+ printf(")\n");
+ tab = "\t";
+ }
+ }
+#if HAVE_STRUCT_STAT_ST_FLAGS
+ /*
+ * XXX
+ * since lchflags(2) will reset file times, the utimes() above
+ * may have been useless! oh well, we'd rather have correct
+ * flags, rather than times?
+ */
+ if ((s->flags & F_FLAGS) && ((s->st_flags != p->fts_statp->st_flags)
+ || mflag || iflag)) {
+ if (s->st_flags != p->fts_statp->st_flags) {
+ char *f_s;
+ LABEL;
+ f_s = flags_to_string(s->st_flags, "none");
+ printf("%sflags (\"%s\" is not ", tab, f_s);
+ free(f_s);
+ f_s = flags_to_string(p->fts_statp->st_flags, "none");
+ printf("\"%s\"", f_s);
+ free(f_s);
+ }
+ if (uflag) {
+ if (iflag)
+ SETFLAGS(0, CH_MASK);
+ else if (mflag)
+ CLEARFLAGS(0, SP_FLGS);
+ else
+ SETFLAGS(0, (~SP_FLGS & CH_MASK));
+ } else
+ printf(")\n");
+ tab = "\t";
+ }
+#endif /* HAVE_STRUCT_STAT_ST_FLAGS */
+
+ /*
+ * from this point, no more permission checking or whacking
+ * occurs, only checking of stuff like checksums and symlinks.
+ */
+ afterpermwhack:
+ if (s->flags & F_CKSUM) {
+ if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0) {
+ LABEL;
+ printf("%scksum: %s: %s\n",
+ tab, p->fts_accpath, strerror(errno));
+ tab = "\t";
+ } else if (crc(fd, &val, &len)) {
+ close(fd);
+ LABEL;
+ printf("%scksum: %s: %s\n",
+ tab, p->fts_accpath, strerror(errno));
+ tab = "\t";
+ } else {
+ close(fd);
+ if (s->cksum != val) {
+ LABEL;
+ printf("%scksum (%lu, %lu)\n",
+ tab, s->cksum, (unsigned long)val);
+ }
+ tab = "\t";
+ }
+ }
+#ifndef NO_MD5
+ if (s->flags & F_MD5) {
+ if ((digestbuf = MD5File(p->fts_accpath, NULL)) == NULL) {
+ LABEL;
+ printf("%s%s: %s: %s\n",
+ tab, MD5KEY, p->fts_accpath, strerror(errno));
+ tab = "\t";
+ } else {
+ if (strcmp(s->md5digest, digestbuf)) {
+ LABEL;
+ printf("%s%s (0x%s, 0x%s)\n",
+ tab, MD5KEY, s->md5digest, digestbuf);
+ }
+ tab = "\t";
+ free(digestbuf);
+ }
+ }
+#endif /* ! NO_MD5 */
+#ifndef NO_RMD160
+ if (s->flags & F_RMD160) {
+ if ((digestbuf = RMD160File(p->fts_accpath, NULL)) == NULL) {
+ LABEL;
+ printf("%s%s: %s: %s\n",
+ tab, RMD160KEY, p->fts_accpath, strerror(errno));
+ tab = "\t";
+ } else {
+ if (strcmp(s->rmd160digest, digestbuf)) {
+ LABEL;
+ printf("%s%s (0x%s, 0x%s)\n",
+ tab, RMD160KEY, s->rmd160digest, digestbuf);
+ }
+ tab = "\t";
+ free(digestbuf);
+ }
+ }
+#endif /* ! NO_RMD160 */
+#ifndef NO_SHA1
+ if (s->flags & F_SHA1) {
+ if ((digestbuf = SHA1File(p->fts_accpath, NULL)) == NULL) {
+ LABEL;
+ printf("%s%s: %s: %s\n",
+ tab, SHA1KEY, p->fts_accpath, strerror(errno));
+ tab = "\t";
+ } else {
+ if (strcmp(s->sha1digest, digestbuf)) {
+ LABEL;
+ printf("%s%s (0x%s, 0x%s)\n",
+ tab, SHA1KEY, s->sha1digest, digestbuf);
+ }
+ tab = "\t";
+ free(digestbuf);
+ }
+ }
+#endif /* ! NO_SHA1 */
+#ifndef NO_SHA2
+ if (s->flags & F_SHA256) {
+ if ((digestbuf = SHA256_File(p->fts_accpath, NULL)) == NULL) {
+ LABEL;
+ printf("%s%s: %s: %s\n",
+ tab, SHA256KEY, p->fts_accpath, strerror(errno));
+ tab = "\t";
+ } else {
+ if (strcmp(s->sha256digest, digestbuf)) {
+ LABEL;
+ printf("%s%s (0x%s, 0x%s)\n",
+ tab, SHA256KEY, s->sha256digest, digestbuf);
+ }
+ tab = "\t";
+ free(digestbuf);
+ }
+ }
+#ifdef SHA384_BLOCK_LENGTH
+ if (s->flags & F_SHA384) {
+ if ((digestbuf = SHA384_File(p->fts_accpath, NULL)) == NULL) {
+ LABEL;
+ printf("%s%s: %s: %s\n",
+ tab, SHA384KEY, p->fts_accpath, strerror(errno));
+ tab = "\t";
+ } else {
+ if (strcmp(s->sha384digest, digestbuf)) {
+ LABEL;
+ printf("%s%s (0x%s, 0x%s)\n",
+ tab, SHA384KEY, s->sha384digest, digestbuf);
+ }
+ tab = "\t";
+ free(digestbuf);
+ }
+ }
+#endif
+ if (s->flags & F_SHA512) {
+ if ((digestbuf = SHA512_File(p->fts_accpath, NULL)) == NULL) {
+ LABEL;
+ printf("%s%s: %s: %s\n",
+ tab, SHA512KEY, p->fts_accpath, strerror(errno));
+ tab = "\t";
+ } else {
+ if (strcmp(s->sha512digest, digestbuf)) {
+ LABEL;
+ printf("%s%s (0x%s, 0x%s)\n",
+ tab, SHA512KEY, s->sha512digest, digestbuf);
+ }
+ tab = "\t";
+ free(digestbuf);
+ }
+ }
+#endif /* ! NO_SHA2 */
+ if (s->flags & F_SLINK &&
+ strcmp(cp = rlink(p->fts_accpath), s->slink)) {
+ LABEL;
+ printf("%slink ref (%s, %s", tab, cp, s->slink);
+ if (uflag) {
+ if ((unlink(p->fts_accpath) == -1) ||
+ (symlink(s->slink, p->fts_accpath) == -1) )
+ printf(", not modified: %s)\n",
+ strerror(errno));
+ else
+ printf(", modified)\n");
+ } else
+ printf(")\n");
+ }
+ return (label);
+}
+
+const char *
+rlink(const char *name)
+{
+ static char lbuf[MAXPATHLEN];
+ int len;
+
+ if ((len = readlink(name, lbuf, sizeof(lbuf) - 1)) == -1)
+ mtree_err("%s: %s", name, strerror(errno));
+ lbuf[len] = '\0';
+ return (lbuf);
+}
diff --git a/contrib/mtree/crc.c b/contrib/mtree/crc.c
new file mode 100644
index 0000000..4eac66e
--- /dev/null
+++ b/contrib/mtree/crc.c
@@ -0,0 +1,163 @@
+/* $NetBSD: crc.c,v 1.9 2012/10/05 00:40:51 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * James W. Williams of NASA Goddard Space Flight Center.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
+#include <sys/cdefs.h>
+#if defined(__RCSID) && !defined(lint)
+#if 0
+static char sccsid[] = "@(#)crc.c 8.1 (Berkeley) 6/17/93";
+#else
+__RCSID("$NetBSD: crc.c,v 1.9 2012/10/05 00:40:51 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <sys/types.h>
+
+#include <stdio.h>
+#include <time.h>
+#include <unistd.h>
+
+#include "extern.h"
+
+static const u_int32_t crctab[] = {
+ 0x0,
+ 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
+ 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6,
+ 0x2b4bcb61, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
+ 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, 0x5f15adac,
+ 0x5bd4b01b, 0x569796c2, 0x52568b75, 0x6a1936c8, 0x6ed82b7f,
+ 0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3, 0x709f7b7a,
+ 0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
+ 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58,
+ 0xbaea46ef, 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033,
+ 0xa4ad16ea, 0xa06c0b5d, 0xd4326d90, 0xd0f37027, 0xddb056fe,
+ 0xd9714b49, 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95,
+ 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, 0xe13ef6f4,
+ 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0,
+ 0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5,
+ 0x2ac12072, 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16,
+ 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, 0x7897ab07,
+ 0x7c56b6b0, 0x71159069, 0x75d48dde, 0x6b93dddb, 0x6f52c06c,
+ 0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1,
+ 0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
+ 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b,
+ 0xbb60adfc, 0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698,
+ 0x832f1041, 0x87ee0df6, 0x99a95df3, 0x9d684044, 0x902b669d,
+ 0x94ea7b2a, 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e,
+ 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, 0xc6bcf05f,
+ 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34,
+ 0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80,
+ 0x644fc637, 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb,
+ 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, 0x5c007b8a,
+ 0x58c1663d, 0x558240e4, 0x51435d53, 0x251d3b9e, 0x21dc2629,
+ 0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5, 0x3f9b762c,
+ 0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
+ 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e,
+ 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65,
+ 0xeba91bbc, 0xef68060b, 0xd727bbb6, 0xd3e6a601, 0xdea580d8,
+ 0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3,
+ 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, 0xae3afba2,
+ 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71,
+ 0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74,
+ 0x857130c3, 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640,
+ 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, 0x7b827d21,
+ 0x7f436096, 0x7200464f, 0x76c15bf8, 0x68860bfd, 0x6c47164a,
+ 0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e, 0x18197087,
+ 0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
+ 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d,
+ 0x2056cd3a, 0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce,
+ 0xcc2b1d17, 0xc8ea00a0, 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb,
+ 0xdbee767c, 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18,
+ 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, 0x89b8fd09,
+ 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662,
+ 0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf,
+ 0xa2f33668, 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
+};
+
+/*
+ * Compute a POSIX 1003.2 checksum. This routine has been broken out so that
+ * other programs can use it. It takes a file descriptor to read from and
+ * locations to store the crc and the number of bytes read. It returns 0 on
+ * success and 1 on failure. Errno is set on failure.
+ */
+u_int32_t crc_total = ~0; /* The crc over a number of files. */
+
+int
+crc(int fd, u_int32_t *cval, u_int32_t *clen)
+{
+ u_char *p;
+ int nr;
+ u_int32_t thecrc, len;
+ u_int32_t crctot;
+ u_char buf[16 * 1024];
+
+#define COMPUTE(var, ch) (var) = (var) << 8 ^ crctab[(var) >> 24 ^ (ch)]
+
+ thecrc = len = crctot = 0;
+ if (sflag)
+ crctot = ~crc_total;
+ while ((nr = read(fd, buf, sizeof(buf))) > 0)
+ if (sflag) {
+ for (len += nr, p = buf; nr--; ++p) {
+ COMPUTE(thecrc, *p);
+ COMPUTE(crctot, *p);
+ }
+ } else {
+ for (len += nr, p = buf; nr--; ++p)
+ COMPUTE(thecrc, *p);
+ }
+ if (nr < 0)
+ return 1;
+
+ *clen = len;
+
+ /* Include the length of the file. */
+ if (sflag) {
+ for (; len != 0; len >>= 8) {
+ COMPUTE(thecrc, len & 0xff);
+ COMPUTE(crctot, len & 0xff);
+ }
+ } else {
+ for (; len != 0; len >>= 8)
+ COMPUTE(thecrc, len & 0xff);
+ }
+
+ *cval = ~thecrc;
+ if (sflag)
+ crc_total = ~crctot;
+ return 0;
+}
diff --git a/contrib/mtree/create.c b/contrib/mtree/create.c
new file mode 100644
index 0000000..a08b680
--- /dev/null
+++ b/contrib/mtree/create.c
@@ -0,0 +1,467 @@
+/* $NetBSD: create.c,v 1.68 2012/12/20 16:43:16 christos Exp $ */
+
+/*-
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
+#include <sys/cdefs.h>
+#if defined(__RCSID) && !defined(lint)
+#if 0
+static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93";
+#else
+__RCSID("$NetBSD: create.c,v 1.68 2012/12/20 16:43:16 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <sys/param.h>
+#include <sys/stat.h>
+
+#if ! HAVE_NBTOOL_CONFIG_H
+#include <dirent.h>
+#endif
+
+#include <errno.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+
+#ifndef NO_MD5
+#include <md5.h>
+#endif
+#ifndef NO_RMD160
+#include <rmd160.h>
+#endif
+#ifndef NO_SHA1
+#include <sha1.h>
+#endif
+#ifndef NO_SHA2
+#include <sha2.h>
+#endif
+
+#include "extern.h"
+
+#define INDENTNAMELEN 15
+#define MAXLINELEN 80
+
+static gid_t gid;
+static uid_t uid;
+static mode_t mode;
+static u_long flags;
+
+#ifdef __FreeBSD__
+#define FTS_CONST const
+#else
+#define FTS_CONST
+#endif
+
+static int dcmp(const FTSENT *FTS_CONST *, const FTSENT *FTS_CONST *);
+static void output(int, int *, const char *, ...)
+ __attribute__((__format__(__printf__, 3, 4)));
+static int statd(FTS *, FTSENT *, uid_t *, gid_t *, mode_t *, u_long *);
+static void statf(int, FTSENT *);
+
+void
+cwalk(void)
+{
+ FTS *t;
+ FTSENT *p;
+ time_t clocktime;
+ char host[MAXHOSTNAMELEN + 1];
+ const char *user;
+ char *argv[2];
+ char dot[] = ".";
+ int indent = 0;
+
+ argv[0] = dot;
+ argv[1] = NULL;
+
+ time(&clocktime);
+ gethostname(host, sizeof(host));
+ host[sizeof(host) - 1] = '\0';
+ if ((user = getlogin()) == NULL) {
+ struct passwd *pw;
+ user = (pw = getpwuid(getuid())) == NULL ? pw->pw_name :
+ "<unknown>";
+ }
+
+ if (!nflag)
+ printf(
+ "#\t user: %s\n#\tmachine: %s\n#\t tree: %s\n"
+ "#\t date: %s",
+ user, host, fullpath, ctime(&clocktime));
+
+ if ((t = fts_open(argv, ftsoptions, dcmp)) == NULL)
+ mtree_err("fts_open: %s", strerror(errno));
+ while ((p = fts_read(t)) != NULL) {
+ if (jflag)
+ indent = p->fts_level * 4;
+ if (check_excludes(p->fts_name, p->fts_path)) {
+ fts_set(t, p, FTS_SKIP);
+ continue;
+ }
+ switch(p->fts_info) {
+ case FTS_D:
+ if (!bflag)
+ printf("\n");
+ if (!nflag)
+ printf("# %s\n", p->fts_path);
+ statd(t, p, &uid, &gid, &mode, &flags);
+ statf(indent, p);
+ break;
+ case FTS_DP:
+ if (p->fts_level > 0)
+ if (!nflag)
+ printf("%*s# %s\n", indent, "",
+ p->fts_path);
+ if (p->fts_level > 0 || flavor == F_FREEBSD9) {
+ printf("%*s..\n", indent, "");
+ if (!bflag)
+ printf("\n");
+ }
+ break;
+ case FTS_DNR:
+ case FTS_ERR:
+ case FTS_NS:
+ mtree_err("%s: %s",
+ p->fts_path, strerror(p->fts_errno));
+ break;
+ default:
+ if (!dflag)
+ statf(indent, p);
+ break;
+
+ }
+ }
+ fts_close(t);
+ if (sflag && keys & F_CKSUM)
+ mtree_err("%s checksum: %u", fullpath, crc_total);
+}
+
+static void
+statf(int indent, FTSENT *p)
+{
+ u_int32_t len, val;
+ int fd, offset;
+ const char *name = NULL;
+#if !defined(NO_MD5) || !defined(NO_RMD160) || !defined(NO_SHA1) || !defined(NO_SHA2)
+ char *digestbuf;
+#endif
+
+ offset = printf("%*s%s%s", indent, "",
+ S_ISDIR(p->fts_statp->st_mode) ? "" : " ", vispath(p->fts_name));
+
+ if (offset > (INDENTNAMELEN + indent))
+ offset = MAXLINELEN;
+ else
+ offset += printf("%*s", (INDENTNAMELEN + indent) - offset, "");
+
+ if (!S_ISREG(p->fts_statp->st_mode) && (flavor == F_NETBSD6 || !dflag))
+ output(indent, &offset, "type=%s",
+ inotype(p->fts_statp->st_mode));
+ if (keys & (F_UID | F_UNAME) && p->fts_statp->st_uid != uid) {
+ if (keys & F_UNAME &&
+ (name = user_from_uid(p->fts_statp->st_uid, 1)) != NULL)
+ output(indent, &offset, "uname=%s", name);
+ if (keys & F_UID || (keys & F_UNAME && name == NULL))
+ output(indent, &offset, "uid=%u", p->fts_statp->st_uid);
+ }
+ if (keys & (F_GID | F_GNAME) && p->fts_statp->st_gid != gid) {
+ if (keys & F_GNAME &&
+ (name = group_from_gid(p->fts_statp->st_gid, 1)) != NULL)
+ output(indent, &offset, "gname=%s", name);
+ if (keys & F_GID || (keys & F_GNAME && name == NULL))
+ output(indent, &offset, "gid=%u", p->fts_statp->st_gid);
+ }
+ if (keys & F_MODE && (p->fts_statp->st_mode & MBITS) != mode)
+ output(indent, &offset, "mode=%#o",
+ p->fts_statp->st_mode & MBITS);
+ if (keys & F_DEV &&
+ (S_ISBLK(p->fts_statp->st_mode) || S_ISCHR(p->fts_statp->st_mode)))
+ output(indent, &offset, "device=%#llx",
+ (long long)p->fts_statp->st_rdev);
+ if (keys & F_NLINK && p->fts_statp->st_nlink != 1)
+ output(indent, &offset, "nlink=%u", p->fts_statp->st_nlink);
+ if (keys & F_SIZE &&
+ (flavor != F_NETBSD6 || S_ISREG(p->fts_statp->st_mode)))
+ output(indent, &offset, "size=%lld",
+ (long long)p->fts_statp->st_size);
+ if (keys & F_TIME)
+#if defined(BSD4_4) && !defined(HAVE_NBTOOL_CONFIG_H)
+ output(indent, &offset, "time=%ld.%09ld",
+ (long)p->fts_statp->st_mtimespec.tv_sec,
+ p->fts_statp->st_mtimespec.tv_nsec);
+#else
+ output(indent, &offset, "time=%ld.%09ld",
+ (long)p->fts_statp->st_mtime, (long)0);
+#endif
+ if (keys & F_CKSUM && S_ISREG(p->fts_statp->st_mode)) {
+ if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0 ||
+ crc(fd, &val, &len))
+ mtree_err("%s: %s", p->fts_accpath, strerror(errno));
+ close(fd);
+ output(indent, &offset, "cksum=%lu", (long)val);
+ }
+#ifndef NO_MD5
+ if (keys & F_MD5 && S_ISREG(p->fts_statp->st_mode)) {
+ if ((digestbuf = MD5File(p->fts_accpath, NULL)) == NULL)
+ mtree_err("%s: MD5File failed: %s", p->fts_accpath,
+ strerror(errno));
+ output(indent, &offset, "%s=%s", MD5KEY, digestbuf);
+ free(digestbuf);
+ }
+#endif /* ! NO_MD5 */
+#ifndef NO_RMD160
+ if (keys & F_RMD160 && S_ISREG(p->fts_statp->st_mode)) {
+ if ((digestbuf = RMD160File(p->fts_accpath, NULL)) == NULL)
+ mtree_err("%s: RMD160File failed: %s", p->fts_accpath,
+ strerror(errno));
+ output(indent, &offset, "%s=%s", RMD160KEY, digestbuf);
+ free(digestbuf);
+ }
+#endif /* ! NO_RMD160 */
+#ifndef NO_SHA1
+ if (keys & F_SHA1 && S_ISREG(p->fts_statp->st_mode)) {
+ if ((digestbuf = SHA1File(p->fts_accpath, NULL)) == NULL)
+ mtree_err("%s: SHA1File failed: %s", p->fts_accpath,
+ strerror(errno));
+ output(indent, &offset, "%s=%s", SHA1KEY, digestbuf);
+ free(digestbuf);
+ }
+#endif /* ! NO_SHA1 */
+#ifndef NO_SHA2
+ if (keys & F_SHA256 && S_ISREG(p->fts_statp->st_mode)) {
+ if ((digestbuf = SHA256_File(p->fts_accpath, NULL)) == NULL)
+ mtree_err("%s: SHA256_File failed: %s", p->fts_accpath,
+ strerror(errno));
+ output(indent, &offset, "%s=%s", SHA256KEY, digestbuf);
+ free(digestbuf);
+ }
+#ifdef SHA384_BLOCK_LENGTH
+ if (keys & F_SHA384 && S_ISREG(p->fts_statp->st_mode)) {
+ if ((digestbuf = SHA384_File(p->fts_accpath, NULL)) == NULL)
+ mtree_err("%s: SHA384_File failed: %s", p->fts_accpath,
+ strerror(errno));
+ output(indent, &offset, "%s=%s", SHA384KEY, digestbuf);
+ free(digestbuf);
+ }
+#endif
+ if (keys & F_SHA512 && S_ISREG(p->fts_statp->st_mode)) {
+ if ((digestbuf = SHA512_File(p->fts_accpath, NULL)) == NULL)
+ mtree_err("%s: SHA512_File failed: %s", p->fts_accpath,
+ strerror(errno));
+ output(indent, &offset, "%s=%s", SHA512KEY, digestbuf);
+ free(digestbuf);
+ }
+#endif /* ! NO_SHA2 */
+ if (keys & F_SLINK &&
+ (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE))
+ output(indent, &offset, "link=%s",
+ vispath(rlink(p->fts_accpath)));
+#if HAVE_STRUCT_STAT_ST_FLAGS
+ if (keys & F_FLAGS && p->fts_statp->st_flags != flags) {
+ char *str = flags_to_string(p->fts_statp->st_flags, "none");
+ output(indent, &offset, "flags=%s", str);
+ free(str);
+ }
+#endif
+ putchar('\n');
+}
+
+/* XXX
+ * FLAGS2INDEX will fail once the user and system settable bits need more
+ * than one byte, respectively.
+ */
+#define FLAGS2INDEX(x) (((x >> 8) & 0x0000ff00) | (x & 0x000000ff))
+
+#define MTREE_MAXGID 5000
+#define MTREE_MAXUID 5000
+#define MTREE_MAXMODE (MBITS + 1)
+#if HAVE_STRUCT_STAT_ST_FLAGS
+#define MTREE_MAXFLAGS (FLAGS2INDEX(CH_MASK) + 1) /* 1808 */
+#else
+#define MTREE_MAXFLAGS 1
+#endif
+#define MTREE_MAXS 16
+
+static int
+statd(FTS *t, FTSENT *parent, uid_t *puid, gid_t *pgid, mode_t *pmode,
+ u_long *pflags)
+{
+ FTSENT *p;
+ gid_t sgid;
+ uid_t suid;
+ mode_t smode;
+ u_long sflags = 0;
+ const char *name = NULL;
+ gid_t savegid;
+ uid_t saveuid;
+ mode_t savemode;
+ u_long saveflags;
+ u_short maxgid, maxuid, maxmode, maxflags;
+ u_short g[MTREE_MAXGID], u[MTREE_MAXUID],
+ m[MTREE_MAXMODE], f[MTREE_MAXFLAGS];
+ static int first = 1;
+
+ savegid = *pgid;
+ saveuid = *puid;
+ savemode = *pmode;
+ saveflags = *pflags;
+ if ((p = fts_children(t, 0)) == NULL) {
+ if (errno)
+ mtree_err("%s: %s", RP(parent), strerror(errno));
+ return (1);
+ }
+
+ memset(g, 0, sizeof(g));
+ memset(u, 0, sizeof(u));
+ memset(m, 0, sizeof(m));
+ memset(f, 0, sizeof(f));
+
+ maxuid = maxgid = maxmode = maxflags = 0;
+ for (; p; p = p->fts_link) {
+ if (flavor == F_NETBSD6 || !dflag ||
+ (dflag && S_ISDIR(p->fts_statp->st_mode))) {
+ smode = p->fts_statp->st_mode & MBITS;
+ if (smode < MTREE_MAXMODE && ++m[smode] > maxmode) {
+ savemode = smode;
+ maxmode = m[smode];
+ }
+ sgid = p->fts_statp->st_gid;
+ if (sgid < MTREE_MAXGID && ++g[sgid] > maxgid) {
+ savegid = sgid;
+ maxgid = g[sgid];
+ }
+ suid = p->fts_statp->st_uid;
+ if (suid < MTREE_MAXUID && ++u[suid] > maxuid) {
+ saveuid = suid;
+ maxuid = u[suid];
+ }
+
+#if HAVE_STRUCT_STAT_ST_FLAGS
+ sflags = FLAGS2INDEX(p->fts_statp->st_flags);
+ if (sflags < MTREE_MAXFLAGS && ++f[sflags] > maxflags) {
+ saveflags = p->fts_statp->st_flags;
+ maxflags = f[sflags];
+ }
+#endif
+ }
+ }
+ /*
+ * If the /set record is the same as the last one we do not need to
+ * output a new one. So first we check to see if anything changed.
+ * Note that we always output a /set record for the first directory.
+ */
+ if (((keys & (F_UNAME | F_UID)) && (*puid != saveuid)) ||
+ ((keys & (F_GNAME | F_GID)) && (*pgid != savegid)) ||
+ ((keys & F_MODE) && (*pmode != savemode)) ||
+ ((keys & F_FLAGS) && (*pflags != saveflags)) ||
+ first) {
+ first = 0;
+ if (flavor != F_NETBSD6 && dflag)
+ printf("/set type=dir");
+ else
+ printf("/set type=file");
+ if (keys & (F_UID | F_UNAME)) {
+ if (keys & F_UNAME &&
+ (name = user_from_uid(saveuid, 1)) != NULL)
+ printf(" uname=%s", name);
+ if (keys & F_UID || (keys & F_UNAME && name == NULL))
+ printf(" uid=%lu", (u_long)saveuid);
+ }
+ if (keys & (F_GID | F_GNAME)) {
+ if (keys & F_GNAME &&
+ (name = group_from_gid(savegid, 1)) != NULL)
+ printf(" gname=%s", name);
+ if (keys & F_GID || (keys & F_GNAME && name == NULL))
+ printf(" gid=%lu", (u_long)savegid);
+ }
+ if (keys & F_MODE)
+ printf(" mode=%#lo", (u_long)savemode);
+ if (keys & F_NLINK)
+ printf(" nlink=1");
+ if (keys & F_FLAGS) {
+ char *str = flags_to_string(saveflags, "none");
+ printf(" flags=%s", str);
+ free(str);
+ }
+ printf("\n");
+ *puid = saveuid;
+ *pgid = savegid;
+ *pmode = savemode;
+ *pflags = saveflags;
+ }
+ return (0);
+}
+
+/*
+ * dcmp --
+ * used as a comparison function passed to fts_open() to control
+ * the order in which fts_read() returns results. We make
+ * directories sort after non-directories, but otherwise sort in
+ * strcmp() order.
+ *
+ * Keep this in sync with nodecmp() in spec.c.
+ */
+static int
+dcmp(const FTSENT *FTS_CONST *a, const FTSENT *FTS_CONST *b)
+{
+
+ if (S_ISDIR((*a)->fts_statp->st_mode)) {
+ if (!S_ISDIR((*b)->fts_statp->st_mode))
+ return (1);
+ } else if (S_ISDIR((*b)->fts_statp->st_mode))
+ return (-1);
+ return (strcmp((*a)->fts_name, (*b)->fts_name));
+}
+
+void
+output(int indent, int *offset, const char *fmt, ...)
+{
+ va_list ap;
+ char buf[1024];
+
+ va_start(ap, fmt);
+ vsnprintf(buf, sizeof(buf), fmt, ap);
+ va_end(ap);
+
+ if (*offset + strlen(buf) > MAXLINELEN - 3) {
+ printf(" \\\n%*s", INDENTNAMELEN + indent, "");
+ *offset = INDENTNAMELEN + indent;
+ }
+ *offset += printf(" %s", buf) + 1;
+}
diff --git a/contrib/mtree/excludes.c b/contrib/mtree/excludes.c
new file mode 100644
index 0000000..4b46b89
--- /dev/null
+++ b/contrib/mtree/excludes.c
@@ -0,0 +1,121 @@
+/* $NetBSD: excludes.c,v 1.13 2004/06/20 22:20:18 jmc Exp $ */
+
+/*
+ * Copyright 2000 Massachusetts Institute of Technology
+ *
+ * Permission to use, copy, modify, and distribute this software and
+ * its documentation for any purpose and without fee is hereby
+ * granted, provided that both the above copyright notice and this
+ * permission notice appear in all copies, that both the above
+ * copyright notice and this permission notice appear in all
+ * supporting documentation, and that the name of M.I.T. not be used
+ * in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. M.I.T. makes
+ * no representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied
+ * warranty.
+ *
+ * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
+ * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
+#include <sys/cdefs.h>
+
+#if defined(__RCSID) && !defined(lint)
+__RCSID("$NetBSD: excludes.c,v 1.13 2004/06/20 22:20:18 jmc Exp $");
+#endif
+
+#include <sys/types.h>
+#include <sys/queue.h>
+
+#include <fnmatch.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <util.h>
+
+#include "extern.h"
+
+
+/*
+ * We're assuming that there won't be a whole lot of excludes,
+ * so it's OK to use a stupid algorithm.
+ */
+struct exclude {
+ LIST_ENTRY(exclude) link;
+ const char *glob;
+ int pathname;
+};
+static LIST_HEAD(, exclude) excludes;
+
+
+void
+init_excludes(void)
+{
+
+ LIST_INIT(&excludes);
+}
+
+void
+read_excludes_file(const char *name)
+{
+ FILE *fp;
+ char *line;
+ struct exclude *e;
+
+ fp = fopen(name, "r");
+ if (fp == 0)
+ err(1, "%s", name);
+
+ while ((line = fparseln(fp, NULL, NULL, NULL,
+ FPARSELN_UNESCCOMM | FPARSELN_UNESCCONT | FPARSELN_UNESCESC))
+ != NULL) {
+ if (line[0] == '\0')
+ continue;
+
+ if ((e = malloc(sizeof *e)) == NULL)
+ mtree_err("memory allocation error");
+
+ e->glob = line;
+ if (strchr(e->glob, '/') != NULL)
+ e->pathname = 1;
+ else
+ e->pathname = 0;
+ LIST_INSERT_HEAD(&excludes, e, link);
+ }
+ fclose(fp);
+}
+
+int
+check_excludes(const char *fname, const char *path)
+{
+ struct exclude *e;
+
+ /* fnmatch(3) has a funny return value convention... */
+#define MATCH(g, n) (fnmatch((g), (n), FNM_PATHNAME) == 0)
+
+ e = LIST_FIRST(&excludes);
+ while (e) {
+ if ((e->pathname && MATCH(e->glob, path))
+ || MATCH(e->glob, fname)) {
+ return (1);
+ }
+ e = LIST_NEXT(e, link);
+ }
+ return (0);
+}
diff --git a/contrib/mtree/extern.h b/contrib/mtree/extern.h
new file mode 100644
index 0000000..0a12ad2
--- /dev/null
+++ b/contrib/mtree/extern.h
@@ -0,0 +1,87 @@
+/* $NetBSD: extern.h,v 1.37 2012/12/20 16:43:16 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)extern.h 8.1 (Berkeley) 6/6/93
+ */
+
+#include "mtree.h"
+
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#else
+#define HAVE_STRUCT_STAT_ST_FLAGS 1
+#endif
+
+#include <err.h>
+#include <fts.h>
+#include <util.h>
+
+#if HAVE_NETDB_H
+/* For MAXHOSTNAMELEN on some platforms. */
+#include <netdb.h>
+#endif
+
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN 256
+#endif
+
+enum flavor {
+ F_MTREE,
+ F_FREEBSD9,
+ F_NETBSD6
+};
+
+void addtag(slist_t *, char *);
+int check_excludes(const char *, const char *);
+int compare(NODE *, FTSENT *);
+int crc(int, u_int32_t *, u_int32_t *);
+void cwalk(void);
+void dump_nodes(const char *, NODE *, int);
+void init_excludes(void);
+int matchtags(NODE *);
+__dead __printflike(1,2) void mtree_err(const char *, ...);
+const char *nodetype(u_int);
+u_int parsekey(const char *, int *);
+void parsetags(slist_t *, char *);
+u_int parsetype(const char *);
+void read_excludes_file(const char *);
+const char *rlink(const char *);
+int verify(FILE *);
+
+extern int bflag, dflag, eflag, iflag, jflag, lflag, mflag,
+ nflag, qflag, rflag, sflag, tflag, uflag;
+extern int mtree_Mflag, mtree_Sflag, mtree_Wflag;
+extern size_t mtree_lineno;
+extern enum flavor flavor;
+extern u_int32_t crc_total;
+extern int ftsoptions, keys;
+extern char fullpath[];
+extern slist_t includetags, excludetags;
+
diff --git a/contrib/mtree/getid.c b/contrib/mtree/getid.c
new file mode 100644
index 0000000..64eef27
--- /dev/null
+++ b/contrib/mtree/getid.c
@@ -0,0 +1,431 @@
+/* $NetBSD: getid.c,v 1.7 2008/04/28 20:24:17 martin Exp $ */
+/* from: NetBSD: getpwent.c,v 1.48 2000/10/03 03:22:26 enami Exp */
+/* from: NetBSD: getgrent.c,v 1.41 2002/01/12 23:51:30 lukem Exp */
+
+/*
+ * Copyright (c) 1987, 1988, 1989, 1993, 1994, 1995
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*-
+ * Copyright (c) 2002 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Luke Mewburn of Wasabi Systems.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: getid.c,v 1.7 2008/04/28 20:24:17 martin Exp $");
+
+#include <sys/param.h>
+
+#include <grp.h>
+#include <limits.h>
+#include <pwd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+
+#include "extern.h"
+
+static struct group * gi_getgrnam(const char *);
+static struct group * gi_getgrgid(gid_t);
+static int gi_setgroupent(int);
+static void gi_endgrent(void);
+static int grstart(void);
+static int grscan(int, gid_t, const char *);
+static int grmatchline(int, gid_t, const char *);
+
+static struct passwd * gi_getpwnam(const char *);
+static struct passwd * gi_getpwuid(uid_t);
+static int gi_setpassent(int);
+static void gi_endpwent(void);
+static int pwstart(void);
+static int pwscan(int, uid_t, const char *);
+static int pwmatchline(int, uid_t, const char *);
+
+#define MAXGRP 200
+#define MAXLINELENGTH 1024
+
+static FILE *_gr_fp;
+static struct group _gr_group;
+static int _gr_stayopen;
+static int _gr_filesdone;
+static FILE *_pw_fp;
+static struct passwd _pw_passwd; /* password structure */
+static int _pw_stayopen; /* keep fd's open */
+static int _pw_filesdone;
+
+static char grfile[MAXPATHLEN];
+static char pwfile[MAXPATHLEN];
+
+static char *members[MAXGRP];
+static char grline[MAXLINELENGTH];
+static char pwline[MAXLINELENGTH];
+
+int
+setup_getid(const char *dir)
+{
+ if (dir == NULL)
+ return (0);
+
+ /* close existing databases */
+ gi_endgrent();
+ gi_endpwent();
+
+ /* build paths to new databases */
+ snprintf(grfile, sizeof(grfile), "%s/group", dir);
+ snprintf(pwfile, sizeof(pwfile), "%s/master.passwd", dir);
+
+ /* try to open new databases */
+ if (!grstart() || !pwstart())
+ return (0);
+
+ /* switch pwcache(3) lookup functions */
+ if (pwcache_groupdb(gi_setgroupent, gi_endgrent,
+ gi_getgrnam, gi_getgrgid) == -1
+ || pwcache_userdb(gi_setpassent, gi_endpwent,
+ gi_getpwnam, gi_getpwuid) == -1)
+ return (0);
+
+ return (1);
+}
+
+
+/*
+ * group lookup functions
+ */
+
+static struct group *
+gi_getgrnam(const char *name)
+{
+ int rval;
+
+ if (!grstart())
+ return NULL;
+ rval = grscan(1, 0, name);
+ if (!_gr_stayopen)
+ endgrent();
+ return (rval) ? &_gr_group : NULL;
+}
+
+static struct group *
+gi_getgrgid(gid_t gid)
+{
+ int rval;
+
+ if (!grstart())
+ return NULL;
+ rval = grscan(1, gid, NULL);
+ if (!_gr_stayopen)
+ endgrent();
+ return (rval) ? &_gr_group : NULL;
+}
+
+static int
+gi_setgroupent(int stayopen)
+{
+
+ if (!grstart())
+ return 0;
+ _gr_stayopen = stayopen;
+ return 1;
+}
+
+static void
+gi_endgrent(void)
+{
+
+ _gr_filesdone = 0;
+ if (_gr_fp) {
+ (void)fclose(_gr_fp);
+ _gr_fp = NULL;
+ }
+}
+
+static int
+grstart(void)
+{
+
+ _gr_filesdone = 0;
+ if (_gr_fp) {
+ rewind(_gr_fp);
+ return 1;
+ }
+ if (grfile[0] == '\0') /* sanity check */
+ return 0;
+ return (_gr_fp = fopen(grfile, "r")) ? 1 : 0;
+}
+
+
+static int
+grscan(int search, gid_t gid, const char *name)
+{
+
+ if (_gr_filesdone)
+ return 0;
+ for (;;) {
+ if (!fgets(grline, sizeof(grline), _gr_fp)) {
+ if (!search)
+ _gr_filesdone = 1;
+ return 0;
+ }
+ /* skip lines that are too big */
+ if (!strchr(grline, '\n')) {
+ int ch;
+
+ while ((ch = getc(_gr_fp)) != '\n' && ch != EOF)
+ ;
+ continue;
+ }
+ if (grmatchline(search, gid, name))
+ return 1;
+ }
+ /* NOTREACHED */
+}
+
+static int
+grmatchline(int search, gid_t gid, const char *name)
+{
+ unsigned long id;
+ char **m;
+ char *cp, *bp, *ep;
+
+ /* name may be NULL if search is nonzero */
+
+ bp = grline;
+ memset(&_gr_group, 0, sizeof(_gr_group));
+ _gr_group.gr_name = strsep(&bp, ":\n");
+ if (search && name && strcmp(_gr_group.gr_name, name))
+ return 0;
+ _gr_group.gr_passwd = strsep(&bp, ":\n");
+ if (!(cp = strsep(&bp, ":\n")))
+ return 0;
+ id = strtoul(cp, &ep, 10);
+ if (id > GID_MAX || *ep != '\0')
+ return 0;
+ _gr_group.gr_gid = (gid_t)id;
+ if (search && name == NULL && _gr_group.gr_gid != gid)
+ return 0;
+ cp = NULL;
+ if (bp == NULL)
+ return 0;
+ for (_gr_group.gr_mem = m = members;; bp++) {
+ if (m == &members[MAXGRP - 1])
+ break;
+ if (*bp == ',') {
+ if (cp) {
+ *bp = '\0';
+ *m++ = cp;
+ cp = NULL;
+ }
+ } else if (*bp == '\0' || *bp == '\n' || *bp == ' ') {
+ if (cp) {
+ *bp = '\0';
+ *m++ = cp;
+ }
+ break;
+ } else if (cp == NULL)
+ cp = bp;
+ }
+ *m = NULL;
+ return 1;
+}
+
+
+/*
+ * user lookup functions
+ */
+
+static struct passwd *
+gi_getpwnam(const char *name)
+{
+ int rval;
+
+ if (!pwstart())
+ return NULL;
+ rval = pwscan(1, 0, name);
+ if (!_pw_stayopen)
+ endpwent();
+ return (rval) ? &_pw_passwd : NULL;
+}
+
+static struct passwd *
+gi_getpwuid(uid_t uid)
+{
+ int rval;
+
+ if (!pwstart())
+ return NULL;
+ rval = pwscan(1, uid, NULL);
+ if (!_pw_stayopen)
+ endpwent();
+ return (rval) ? &_pw_passwd : NULL;
+}
+
+static int
+gi_setpassent(int stayopen)
+{
+
+ if (!pwstart())
+ return 0;
+ _pw_stayopen = stayopen;
+ return 1;
+}
+
+static void
+gi_endpwent(void)
+{
+
+ _pw_filesdone = 0;
+ if (_pw_fp) {
+ (void)fclose(_pw_fp);
+ _pw_fp = NULL;
+ }
+}
+
+static int
+pwstart(void)
+{
+
+ _pw_filesdone = 0;
+ if (_pw_fp) {
+ rewind(_pw_fp);
+ return 1;
+ }
+ if (pwfile[0] == '\0') /* sanity check */
+ return 0;
+ return (_pw_fp = fopen(pwfile, "r")) ? 1 : 0;
+}
+
+
+static int
+pwscan(int search, uid_t uid, const char *name)
+{
+
+ if (_pw_filesdone)
+ return 0;
+ for (;;) {
+ if (!fgets(pwline, sizeof(pwline), _pw_fp)) {
+ if (!search)
+ _pw_filesdone = 1;
+ return 0;
+ }
+ /* skip lines that are too big */
+ if (!strchr(pwline, '\n')) {
+ int ch;
+
+ while ((ch = getc(_pw_fp)) != '\n' && ch != EOF)
+ ;
+ continue;
+ }
+ if (pwmatchline(search, uid, name))
+ return 1;
+ }
+ /* NOTREACHED */
+}
+
+static int
+pwmatchline(int search, uid_t uid, const char *name)
+{
+ unsigned long id;
+ char *cp, *bp, *ep;
+
+ /* name may be NULL if search is nonzero */
+
+ bp = pwline;
+ memset(&_pw_passwd, 0, sizeof(_pw_passwd));
+ _pw_passwd.pw_name = strsep(&bp, ":\n"); /* name */
+ if (search && name && strcmp(_pw_passwd.pw_name, name))
+ return 0;
+
+ _pw_passwd.pw_passwd = strsep(&bp, ":\n"); /* passwd */
+
+ if (!(cp = strsep(&bp, ":\n"))) /* uid */
+ return 0;
+ id = strtoul(cp, &ep, 10);
+ if (id > UID_MAX || *ep != '\0')
+ return 0;
+ _pw_passwd.pw_uid = (uid_t)id;
+ if (search && name == NULL && _pw_passwd.pw_uid != uid)
+ return 0;
+
+ if (!(cp = strsep(&bp, ":\n"))) /* gid */
+ return 0;
+ id = strtoul(cp, &ep, 10);
+ if (id > GID_MAX || *ep != '\0')
+ return 0;
+ _pw_passwd.pw_gid = (gid_t)id;
+
+ if (!(ep = strsep(&bp, ":"))) /* class */
+ return 0;
+ if (!(ep = strsep(&bp, ":"))) /* change */
+ return 0;
+ if (!(ep = strsep(&bp, ":"))) /* expire */
+ return 0;
+
+ if (!(_pw_passwd.pw_gecos = strsep(&bp, ":\n"))) /* gecos */
+ return 0;
+ if (!(_pw_passwd.pw_dir = strsep(&bp, ":\n"))) /* directory */
+ return 0;
+ if (!(_pw_passwd.pw_shell = strsep(&bp, ":\n"))) /* shell */
+ return 0;
+
+ if (strchr(bp, ':') != NULL)
+ return 0;
+
+ return 1;
+}
+
diff --git a/contrib/mtree/misc.c b/contrib/mtree/misc.c
new file mode 100644
index 0000000..b99f1ce
--- /dev/null
+++ b/contrib/mtree/misc.c
@@ -0,0 +1,312 @@
+/* $NetBSD: misc.c,v 1.34 2012/12/20 19:09:25 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)misc.c 8.1 (Berkeley) 6/6/93
+ */
+
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
+#include <sys/cdefs.h>
+#if defined(__RCSID) && !defined(lint)
+__RCSID("$NetBSD: misc.c,v 1.34 2012/12/20 19:09:25 christos Exp $");
+#endif /* not lint */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "extern.h"
+
+enum flavor flavor = F_MTREE;
+
+typedef struct _key {
+ const char *name; /* key name */
+ u_int val; /* value */
+
+#define NEEDVALUE 0x01
+ u_int flags;
+} KEY;
+
+/* NB: the following tables must be sorted lexically. */
+static KEY keylist[] = {
+ {"cksum", F_CKSUM, NEEDVALUE},
+ {"device", F_DEV, NEEDVALUE},
+ {"flags", F_FLAGS, NEEDVALUE},
+ {"gid", F_GID, NEEDVALUE},
+ {"gname", F_GNAME, NEEDVALUE},
+ {"ignore", F_IGN, 0},
+ {"link", F_SLINK, NEEDVALUE},
+ {"md5", F_MD5, NEEDVALUE},
+ {"md5digest", F_MD5, NEEDVALUE},
+ {"mode", F_MODE, NEEDVALUE},
+ {"nlink", F_NLINK, NEEDVALUE},
+ {"nochange", F_NOCHANGE, 0},
+ {"optional", F_OPT, 0},
+ {"ripemd160digest", F_RMD160, NEEDVALUE},
+ {"rmd160", F_RMD160, NEEDVALUE},
+ {"rmd160digest",F_RMD160, NEEDVALUE},
+ {"sha1", F_SHA1, NEEDVALUE},
+ {"sha1digest", F_SHA1, NEEDVALUE},
+ {"sha256", F_SHA256, NEEDVALUE},
+ {"sha256digest",F_SHA256, NEEDVALUE},
+ {"sha384", F_SHA384, NEEDVALUE},
+ {"sha384digest",F_SHA384, NEEDVALUE},
+ {"sha512", F_SHA512, NEEDVALUE},
+ {"sha512digest",F_SHA512, NEEDVALUE},
+ {"size", F_SIZE, NEEDVALUE},
+ {"tags", F_TAGS, NEEDVALUE},
+ {"time", F_TIME, NEEDVALUE},
+ {"type", F_TYPE, NEEDVALUE},
+ {"uid", F_UID, NEEDVALUE},
+ {"uname", F_UNAME, NEEDVALUE}
+};
+
+static KEY typelist[] = {
+ {"block", F_BLOCK, 0},
+ {"char", F_CHAR, 0},
+ {"dir", F_DIR, 0},
+#ifdef S_IFDOOR
+ {"door", F_DOOR, 0},
+#endif
+ {"fifo", F_FIFO, 0},
+ {"file", F_FILE, 0},
+ {"link", F_LINK, 0},
+ {"socket", F_SOCK, 0},
+};
+
+slist_t excludetags, includetags;
+int keys = KEYDEFAULT;
+
+
+int keycompare(const void *, const void *);
+
+u_int
+parsekey(const char *name, int *needvaluep)
+{
+ static int allbits;
+ KEY *k, tmp;
+
+ if (allbits == 0) {
+ size_t i;
+
+ for (i = 0; i < sizeof(keylist) / sizeof(KEY); i++)
+ allbits |= keylist[i].val;
+ }
+ tmp.name = name;
+ if (strcmp(name, "all") == 0)
+ return (allbits);
+ k = (KEY *)bsearch(&tmp, keylist, sizeof(keylist) / sizeof(KEY),
+ sizeof(KEY), keycompare);
+ if (k == NULL)
+ mtree_err("unknown keyword `%s'", name);
+
+ if (needvaluep)
+ *needvaluep = k->flags & NEEDVALUE ? 1 : 0;
+
+ return (k->val);
+}
+
+u_int
+parsetype(const char *name)
+{
+ KEY *k, tmp;
+
+ tmp.name = name;
+ k = (KEY *)bsearch(&tmp, typelist, sizeof(typelist) / sizeof(KEY),
+ sizeof(KEY), keycompare);
+ if (k == NULL)
+ mtree_err("unknown file type `%s'", name);
+
+ return (k->val);
+}
+
+int
+keycompare(const void *a, const void *b)
+{
+
+ return (strcmp(((const KEY *)a)->name, ((const KEY *)b)->name));
+}
+
+void
+mtree_err(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vwarnx(fmt, ap);
+ va_end(ap);
+ if (mtree_lineno)
+ warnx("failed at line %lu of the specification",
+ (u_long) mtree_lineno);
+ exit(1);
+ /* NOTREACHED */
+}
+
+void
+addtag(slist_t *list, char *elem)
+{
+
+#define TAG_CHUNK 20
+
+ if ((list->count % TAG_CHUNK) == 0) {
+ char **new;
+
+ new = (char **)realloc(list->list, (list->count + TAG_CHUNK)
+ * sizeof(char *));
+ if (new == NULL)
+ mtree_err("memory allocation error");
+ list->list = new;
+ }
+ list->list[list->count] = elem;
+ list->count++;
+}
+
+void
+parsetags(slist_t *list, char *args)
+{
+ char *p, *e;
+ int len;
+
+ if (args == NULL) {
+ addtag(list, NULL);
+ return;
+ }
+ while ((p = strsep(&args, ",")) != NULL) {
+ if (*p == '\0')
+ continue;
+ len = strlen(p) + 3; /* "," + p + ",\0" */
+ if ((e = malloc(len)) == NULL)
+ mtree_err("memory allocation error");
+ snprintf(e, len, ",%s,", p);
+ addtag(list, e);
+ }
+}
+
+/*
+ * matchtags
+ * returns 0 if there's a match from the exclude list in the node's tags,
+ * or there's an include list and no match.
+ * return 1 otherwise.
+ */
+int
+matchtags(NODE *node)
+{
+ int i;
+
+ if (node->tags) {
+ for (i = 0; i < excludetags.count; i++)
+ if (strstr(node->tags, excludetags.list[i]))
+ break;
+ if (i < excludetags.count)
+ return (0);
+
+ for (i = 0; i < includetags.count; i++)
+ if (strstr(node->tags, includetags.list[i]))
+ break;
+ if (i > 0 && i == includetags.count)
+ return (0);
+ } else if (includetags.count > 0) {
+ return (0);
+ }
+ return (1);
+}
+
+u_int
+nodetoino(u_int type)
+{
+
+ switch (type) {
+ case F_BLOCK:
+ return S_IFBLK;
+ case F_CHAR:
+ return S_IFCHR;
+ case F_DIR:
+ return S_IFDIR;
+ case F_FIFO:
+ return S_IFIFO;
+ case F_FILE:
+ return S_IFREG;
+ case F_LINK:
+ return S_IFLNK;
+#ifdef S_IFSOCK
+ case F_SOCK:
+ return S_IFSOCK;
+#endif
+ default:
+ printf("unknown type %d", type);
+ abort();
+ }
+ /* NOTREACHED */
+}
+
+const char *
+nodetype(u_int type)
+{
+
+ return (inotype(nodetoino(type)));
+}
+
+
+const char *
+inotype(u_int type)
+{
+
+ switch (type & S_IFMT) {
+ case S_IFBLK:
+ return ("block");
+ case S_IFCHR:
+ return ("char");
+ case S_IFDIR:
+ return ("dir");
+ case S_IFIFO:
+ return ("fifo");
+ case S_IFREG:
+ return ("file");
+ case S_IFLNK:
+ return ("link");
+#ifdef S_IFSOCK
+ case S_IFSOCK:
+ return ("socket");
+#endif
+#ifdef S_IFDOOR
+ case S_IFDOOR:
+ return ("door");
+#endif
+ default:
+ return ("unknown");
+ }
+ /* NOTREACHED */
+}
diff --git a/contrib/mtree/mtree.8 b/contrib/mtree/mtree.8
new file mode 100644
index 0000000..6df19c7
--- /dev/null
+++ b/contrib/mtree/mtree.8
@@ -0,0 +1,805 @@
+.\" $NetBSD: mtree.8,v 1.67 2012/12/20 20:31:01 wiz Exp $
+.\"
+.\" Copyright (c) 1989, 1990, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" Copyright (c) 2001-2004 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Luke Mewburn of Wasabi Systems.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" @(#)mtree.8 8.2 (Berkeley) 12/11/93
+.\"
+.Dd December 20, 2012
+.Dt MTREE 8
+.Os
+.Sh NAME
+.Nm mtree
+.Nd map a directory hierarchy
+.Sh SYNOPSIS
+.Nm
+.Op Fl bCcDdejLlMnPqrStUuWx
+.Op Fl i | Fl m
+.Op Fl E Ar tags
+.Op Fl F Ar flavor
+.Op Fl f Ar spec
+.Op Fl I Ar tags
+.Op Fl K Ar keywords
+.Op Fl k Ar keywords
+.Op Fl N Ar dbdir
+.Op Fl p Ar path
+.Op Fl R Ar keywords
+.Op Fl s Ar seed
+.Op Fl X Ar exclude-file
+.Sh DESCRIPTION
+The
+.Nm
+utility compares a file hierarchy against a specification,
+creates a specification for a file hierarchy, or modifies
+a specification.
+.Pp
+The default action, if not overridden by command line options,
+is to compare the file hierarchy rooted in the current directory
+against a specification read from the standard input.
+Messages are written to the standard output for any files whose
+characteristics do not match the specification, or which are
+missing from either the file hierarchy or the specification.
+.Pp
+The options are as follows:
+.Bl -tag -width Xxxexcludexfilexx
+.It Fl b
+Suppress blank lines before entering and after exiting directories.
+.It Fl C
+Convert a specification into
+a format that's easier to parse with various tools.
+The input specification is read from standard input or
+from the file given by
+.Fl f Ar spec .
+In the output, each file or directory is represented using a single line
+(which might be very long).
+The full path name
+(beginning with
+.Dq \&./ )
+is always printed as the first field;
+.Fl K ,
+.Fl k ,
+and
+.Fl R
+can be used to control which other keywords are printed;
+.Fl E
+and
+.Fl I
+can be used to control which files are printed;
+and the
+.Fl S
+option can be used to sort the output.
+.It Fl c
+Print a specification for the file hierarchy originating at
+the current working directory (or the directory provided by
+.Fl p Ar path )
+to the standard output.
+The output is in a style using relative path names.
+.It Fl D
+As per
+.Fl C ,
+except that the path name is always printed as the last field instead of
+the first.
+.It Fl d
+Ignore everything except directory type files.
+.It Fl E Ar tags
+Add the comma separated tags to the
+.Dq exclusion
+list.
+Non-directories with tags which are in the exclusion list are not printed with
+.Fl C
+and
+.Fl D .
+.It Fl e
+Don't complain about files that are in the file hierarchy, but not in the
+specification.
+.It Fl F Ar flavor
+Set the compatibility flavor of the
+.Nm
+utility.
+The
+.Ar flavor
+can be one of
+.Sy mtree ,
+.Sy freebsd9 ,
+or
+.Sy netbsd6 .
+The default is
+.Sy mtree .
+The
+.Sy freebsd9
+and
+.Sy netbsd6
+flavors attempt to preserve output compatiblity and command line option
+backward compatibility with
+.Fx 9.0
+and
+.Nx 6.0
+respectively.
+.It Fl f Ar spec
+Read the specification from
+.Ar file ,
+instead of from the standard input.
+.Pp
+If this option is specified twice, the two specifications are compared
+to each other rather than to the file hierarchy.
+The specifications will be sorted like output generated using
+.Fl c .
+The output format in this case is somewhat reminiscent of
+.Xr comm 1 ,
+having "in first spec only", "in second spec only", and "different"
+columns, prefixed by zero, one and two TAB characters respectively.
+Each entry in the "different" column occupies two lines, one from each
+specification.
+.It Fl I Ar tags
+Add the comma separated tags to the
+.Dq inclusion
+list.
+Non-directories with tags which are in the inclusion list are printed with
+.Fl C
+and
+.Fl D .
+If no inclusion list is provided, the default is to display all files.
+.It Fl i
+If specified, set the schg and/or sappnd flags.
+.It Fl j
+Indent the output 4 spaces each time a directory level is descended when
+creating a specification with the
+.Fl c
+option.
+This does not affect either the /set statements or the comment before each
+directory.
+It does however affect the comment before the close of each directory.
+This is the equivalent of the
+.Fl i
+option in the
+.Fx
+version of
+.Nm .
+.It Fl K Ar keywords
+Add the specified (whitespace or comma separated) keywords to the current
+set of keywords.
+If
+.Ql all
+is specified, add all of the other keywords.
+.It Fl k Ar keywords
+Use the
+.Sy type
+keyword plus the specified (whitespace or comma separated)
+keywords instead of the current set of keywords.
+If
+.Ql all
+is specified, use all of the other keywords.
+If the
+.Sy type
+keyword is not desired, suppress it with
+.Fl R Ar type .
+.It Fl L
+Follow all symbolic links in the file hierarchy.
+.It Fl l
+Do
+.Dq loose
+permissions checks, in which more stringent permissions
+will match less stringent ones.
+For example, a file marked mode 0444
+will pass a check for mode 0644.
+.Dq Loose
+checks apply only to read, write and execute permissions -- in
+particular, if other bits like the sticky bit or suid/sgid bits are
+set either in the specification or the file, exact checking will be
+performed.
+This option may not be set at the same time as the
+.Fl U
+or
+.Fl u
+option.
+.It Fl M
+Permit merging of specification entries with different types,
+with the last entry taking precedence.
+.It Fl m
+If the schg and/or sappnd flags are specified, reset these flags.
+Note that this is only possible with securelevel less than 1 (i.e.,
+in single user mode or while the system is running in insecure
+mode).
+See
+.Xr init 8
+for information on security levels.
+.It Fl n
+Do not emit pathname comments when creating a specification.
+Normally
+a comment is emitted before each directory and before the close of that
+directory when using the
+.Fl c
+option.
+.It Fl N Ar dbdir
+Use the user database text file
+.Pa master.passwd
+and group database text file
+.Pa group
+from
+.Ar dbdir ,
+rather than using the results from the system's
+.Xr getpwnam 3
+and
+.Xr getgrnam 3
+(and related) library calls.
+.It Fl P
+Don't follow symbolic links in the file hierarchy, instead consider
+the symbolic link itself in any comparisons.
+This is the default.
+.It Fl p Ar path
+Use the file hierarchy rooted in
+.Ar path ,
+instead of the current directory.
+.It Fl q
+Quiet mode.
+Do not complain when a
+.Dq missing
+directory cannot be created because it already exists.
+This occurs when the directory is a symbolic link.
+.It Fl R Ar keywords
+Remove the specified (whitespace or comma separated) keywords from the current
+set of keywords.
+If
+.Ql all
+is specified, remove all of the other keywords.
+.It Fl r
+Remove any files in the file hierarchy that are not described in the
+specification.
+.It Fl S
+When reading a specification into an internal data structure,
+sort the entries.
+Sorting will affect the order of the output produced by the
+.Fl C
+or
+.Fl D
+options, and will also affect the order in which
+missing entries are created or reported when a directory tree is checked
+against a specification.
+.Pp
+The sort order is the same as that used by the
+.Fl c
+option, which is that entries within the same directory are
+sorted in the order used by
+.Xr strcmp 3 ,
+except that entries for subdirectories sort after other entries.
+By default, if the
+.Fl S
+option is not used, entries within the same directory are collected
+together (separated from entries for other directories), but not sorted.
+.It Fl s Ar seed
+Display a single checksum to the standard error output that represents all
+of the files for which the keyword
+.Sy cksum
+was specified.
+The checksum is seeded with the specified value.
+.It Fl t
+Modify the modified time of existing files, the device type of devices, and
+symbolic link targets, to match the specification.
+.It Fl U
+Same as
+.Fl u
+except that a mismatch is not considered to be an error if it was corrected.
+.It Fl u
+Modify the owner, group, permissions, and flags of existing files,
+the device type of devices, and symbolic link targets,
+to match the specification.
+Create any missing directories, devices or symbolic links.
+User, group, and permissions must all be specified for missing directories
+to be created.
+Note that unless the
+.Fl i
+option is given, the schg and sappnd flags will not be set, even if
+specified.
+If
+.Fl m
+is given, these flags will be reset.
+Exit with a status of 0 on success,
+2 if the file hierarchy did not match the specification, and
+1 if any other error occurred.
+.It Fl W
+Don't attempt to set various file attributes such as the
+ownership, mode, flags, or time
+when creating new directories or changing existing entries.
+This option will be most useful when used in conjunction with
+.Fl U
+or
+.Fl u .
+.It Fl X Ar exclude-file
+The specified file contains
+.Xr fnmatch 3
+patterns matching files to be excluded from
+the specification, one to a line.
+If the pattern contains a
+.Ql \&/
+character, it will be matched against entire pathnames (relative to
+the starting directory); otherwise,
+it will be matched against basenames only.
+Comments are permitted in
+the
+.Ar exclude-list
+file.
+.It Fl x
+Don't descend below mount points in the file hierarchy.
+.El
+.Pp
+Specifications are mostly composed of
+.Dq keywords ,
+i.e. strings that
+that specify values relating to files.
+No keywords have default values, and if a keyword has no value set, no
+checks based on it are performed.
+.Pp
+Currently supported keywords are as follows:
+.Bl -tag -width sha384digestxx
+.It Sy cksum
+The checksum of the file using the default algorithm specified by
+the
+.Xr cksum 1
+utility.
+.It Sy device
+The device number to use for
+.Sy block
+or
+.Sy char
+file types.
+The argument must be one of the following forms:
+.Bl -tag -width 4n
+.It Ar format , Ns Ar major , Ns Ar minor
+A device with
+.Ar major
+and
+.Ar minor
+fields, for an operating system specified with
+.Ar format .
+See below for valid formats.
+.It Ar format , Ns Ar major , Ns Ar unit , Ns Ar subunit
+A device with
+.Ar major ,
+.Ar unit ,
+and
+.Ar subunit
+fields, for an operating system specified with
+.Ar format .
+(Currently this is only supported by the
+.Sy bsdos
+format.)
+.It Ar number
+Opaque number (as stored on the file system).
+.El
+.Pp
+The following values for
+.Ar format
+are recognized:
+.Sy native ,
+.Sy 386bsd ,
+.Sy 4bsd ,
+.Sy bsdos ,
+.Sy freebsd ,
+.Sy hpux ,
+.Sy isc ,
+.Sy linux ,
+.Sy netbsd ,
+.Sy osf1 ,
+.Sy sco ,
+.Sy solaris ,
+.Sy sunos ,
+.Sy svr3 ,
+.Sy svr4 ,
+and
+.Sy ultrix .
+.Pp
+See
+.Xr mknod 8
+for more details.
+.It Sy flags
+The file flags as a symbolic name.
+See
+.Xr chflags 1
+for information on these names.
+If no flags are to be set the string
+.Ql none
+may be used to override the current default.
+Note that the schg and sappnd flags are treated specially (see the
+.Fl i
+and
+.Fl m
+options).
+.It Sy ignore
+Ignore any file hierarchy below this file.
+.It Sy gid
+The file group as a numeric value.
+.It Sy gname
+The file group as a symbolic name.
+.It Sy link
+The file the symbolic link is expected to reference.
+.It Sy md5
+The
+.Tn MD5
+cryptographic message digest of the file.
+.It Sy md5digest
+Synonym for
+.Sy md5 .
+.It Sy mode
+The current file's permissions as a numeric (octal) or symbolic
+value.
+.It Sy nlink
+The number of hard links the file is expected to have.
+.It Sy nochange
+Make sure this file or directory exists but otherwise ignore all attributes.
+.It Sy optional
+The file is optional; don't complain about the file if it's
+not in the file hierarchy.
+.It Sy ripemd160digest
+Synonym for
+.Sy rmd160 .
+.It Sy rmd160
+The
+.Tn RMD-160
+cryptographic message digest of the file.
+.It Sy rmd160digest
+Synonym for
+.Sy rmd160 .
+.It Sy sha1
+The
+.Tn SHA-1
+cryptographic message digest of the file.
+.It Sy sha1digest
+Synonym for
+.Sy sha1 .
+.It Sy sha256
+The 256-bits
+.Tn SHA-2
+cryptographic message digest of the file.
+.It Sy sha256digest
+Synonym for
+.Sy sha256 .
+.It Sy sha384
+The 384-bits
+.Tn SHA-2
+cryptographic message digest of the file.
+.It Sy sha384digest
+Synonym for
+.Sy sha384 .
+.It Sy sha512
+The 512-bits
+.Tn SHA-2
+cryptographic message digest of the file.
+.It Sy sha512digest
+Synonym for
+.Sy sha512 .
+.It Sy size
+The size, in bytes, of the file.
+.It Sy tags
+Comma delimited tags to be matched with
+.Fl E
+and
+.Fl I .
+These may be specified without leading or trailing commas, but will be
+stored internally with them.
+.It Sy time
+The last modification time of the file,
+in second and nanoseconds.
+The value should include a period character and exactly nine digits after
+the period.
+.It Sy type
+The type of the file; may be set to any one of the following:
+.Pp
+.Bl -tag -width Sy -compact
+.It Sy block
+block special device
+.It Sy char
+character special device
+.It Sy dir
+directory
+.It Sy fifo
+fifo
+.It Sy file
+regular file
+.It Sy link
+symbolic link
+.It Sy socket
+socket
+.El
+.It Sy uid
+The file owner as a numeric value.
+.It Sy uname
+The file owner as a symbolic name.
+.El
+.Pp
+The default set of keywords are
+.Sy flags ,
+.Sy gid ,
+.Sy link ,
+.Sy mode ,
+.Sy nlink ,
+.Sy size ,
+.Sy time ,
+.Sy type ,
+and
+.Sy uid .
+.Pp
+There are four types of lines in a specification:
+.Bl -enum
+.It
+Set global values for a keyword.
+This consists of the string
+.Ql /set
+followed by whitespace, followed by sets of keyword/value
+pairs, separated by whitespace.
+Keyword/value pairs consist of a keyword, followed by an equals sign
+.Pq Ql = ,
+followed by a value, without whitespace characters.
+Once a keyword has been set, its value remains unchanged until either
+reset or unset.
+.It
+Unset global values for a keyword.
+This consists of the string
+.Ql /unset ,
+followed by whitespace, followed by one or more keywords,
+separated by whitespace.
+If
+.Ql all
+is specified, unset all of the keywords.
+.It
+A file specification, consisting of a path name, followed by whitespace,
+followed by zero or more whitespace separated keyword/value pairs.
+.Pp
+The path name may be preceded by whitespace characters.
+The path name may contain any of the standard path name matching
+characters
+.Po
+.Ql \&[ ,
+.Ql \&] ,
+.Ql \&?
+or
+.Ql *
+.Pc ,
+in which case files
+in the hierarchy will be associated with the first pattern that
+they match.
+.Nm
+uses
+.Xr strsvis 3
+(in VIS_CSTYLE format) to encode path names containing
+non-printable characters.
+Whitespace characters are encoded as
+.Ql \es
+(space),
+.Ql \et
+(tab), and
+.Ql \en
+(new line).
+.Ql #
+characters in path names are escaped by a preceding backslash
+.Ql \e
+to distinguish them from comments.
+.Pp
+Each of the keyword/value pairs consist of a keyword, followed by an
+equals sign
+.Pq Ql = ,
+followed by the keyword's value, without
+whitespace characters.
+These values override, without changing, the global value of the
+corresponding keyword.
+.Pp
+The first path name entry listed must be a directory named
+.Ql \&. ,
+as this ensures that intermixing full and relative path names will
+work consistently and correctly.
+Multiple entries for a directory named
+.Ql \&.
+are permitted; the settings for the last such entry override those
+of the existing entry.
+.Pp
+A path name that contains a slash
+.Pq Ql /
+that is not the first character will be treated as a full path
+(relative to the root of the tree).
+All parent directories referenced in the path name must exist.
+The current directory path used by relative path names will be updated
+appropriately.
+Multiple entries for the same full path are permitted if the types
+are the same (unless
+.Fl M
+is given, in which case the types may differ);
+in this case the settings for the last entry take precedence.
+.Pp
+A path name that does not contain a slash will be treated as a relative path.
+Specifying a directory will cause subsequent files to be searched
+for in that directory hierarchy.
+.It
+A line containing only the string
+.Ql \&..
+which causes the current directory path (used by relative paths)
+to ascend one level.
+.El
+.Pp
+Empty lines and lines whose first non-whitespace character is a hash
+mark
+.Pq Ql #
+are ignored.
+.Pp
+The
+.Nm
+utility exits with a status of 0 on success, 1 if any error occurred,
+and 2 if the file hierarchy did not match the specification.
+.Sh FILES
+.Bl -tag -width /etc/mtree -compact
+.It Pa /etc/mtree
+system specification directory
+.El
+.Sh EXAMPLES
+To detect system binaries that have been
+.Dq trojan horsed ,
+it is recommended that
+.Nm
+be run on the file systems, and a copy of the results stored on a different
+machine, or, at least, in encrypted form.
+The seed for the
+.Fl s
+option should not be an obvious value and the final checksum should not be
+stored on-line under any circumstances!
+Then, periodically,
+.Nm
+should be run against the on-line specifications and the final checksum
+compared with the previous value.
+While it is possible for the bad guys to change the on-line specifications
+to conform to their modified binaries, it shouldn't be possible for them
+to make it produce the same final checksum value.
+If the final checksum value changes, the off-line copies of the specification
+can be used to detect which of the binaries have actually been modified.
+.Pp
+The
+.Fl d
+option can be used in combination with
+.Fl U
+or
+.Fl u
+to create directory hierarchies for, for example, distributions.
+.Sh COMPATIBILITY
+The compatibility shims provided by the
+.Fl F
+option are incomplete by design.
+Known limitations are described below.
+.Pp
+The
+.Sy freebsd9
+flavor retains the default handling of lookup failures for the
+.Sy uname
+and
+.Sy group
+keywords by replacing them with appropriate
+.Sy uid
+and
+.Sy gid
+keywords rather than failing and reporting an error.
+The related
+.Fl w
+flag is a no-op rather than causing a warning to be printed and no
+keyword to be emitted.
+The latter behavior is not emulated as it is potentially dangerous in
+the face of /set statements.
+.Pp
+The
+.Sy netbsd6
+flavor does not replicate the historical bug that reported time as
+seconds.nanoseconds without zero padding nanosecond values less than
+100000000.
+.Sh SEE ALSO
+.Xr chflags 1 ,
+.Xr chgrp 1 ,
+.Xr chmod 1 ,
+.Xr cksum 1 ,
+.Xr stat 2 ,
+.Xr fnmatch 3 ,
+.Xr fts 3 ,
+.Xr strsvis 3 ,
+.Xr chown 8 ,
+.Xr mknod 8
+.Sh HISTORY
+The
+.Nm
+utility appeared in
+.Bx 4.3 Reno .
+The
+.Sy optional
+keyword appeared in
+.Nx 1.2 .
+The
+.Fl U
+option appeared in
+.Nx 1.3 .
+The
+.Sy flags
+and
+.Sy md5
+keywords, and
+.Fl i
+and
+.Fl m
+options
+appeared in
+.Nx 1.4 .
+The
+.Sy device ,
+.Sy rmd160 ,
+.Sy sha1 ,
+.Sy tags ,
+and
+.Sy all
+keywords,
+.Fl D ,
+.Fl E ,
+.Fl I ,
+.Fl L ,
+.Fl l ,
+.Fl N ,
+.Fl P ,
+.Fl R ,
+.Fl W ,
+and
+.Fl X
+options, and support for full paths appeared in
+.Nx 1.6 .
+The
+.Sy sha256 ,
+.Sy sha384 ,
+and
+.Sy sha512
+keywords appeared in
+.Nx 3.0 .
+The
+.Fl S
+option appeared in
+.Nx 6.0 .
diff --git a/contrib/mtree/mtree.c b/contrib/mtree/mtree.c
new file mode 100644
index 0000000..78b50dc
--- /dev/null
+++ b/contrib/mtree/mtree.c
@@ -0,0 +1,327 @@
+/* $NetBSD: mtree.c,v 1.46 2012/12/20 19:09:25 christos Exp $ */
+
+/*-
+ * Copyright (c) 1989, 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
+#include <sys/cdefs.h>
+#if defined(__COPYRIGHT) && !defined(lint)
+__COPYRIGHT("@(#) Copyright (c) 1989, 1990, 1993\
+ The Regents of the University of California. All rights reserved.");
+#endif /* not lint */
+
+#if defined(__RCSID) && !defined(lint)
+#if 0
+static char sccsid[] = "@(#)mtree.c 8.1 (Berkeley) 6/6/93";
+#else
+__RCSID("$NetBSD: mtree.c,v 1.46 2012/12/20 19:09:25 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <sys/param.h>
+#include <sys/stat.h>
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "extern.h"
+
+int ftsoptions = FTS_PHYSICAL;
+int bflag, cflag, Cflag, dflag, Dflag, eflag, iflag, jflag, lflag, mflag,
+ nflag, qflag, rflag, sflag, tflag, uflag, Uflag, wflag;
+char fullpath[MAXPATHLEN];
+
+static struct {
+ enum flavor flavor;
+ const char name[9];
+} flavors[] = {
+ {F_MTREE, "mtree"},
+ {F_FREEBSD9, "freebsd9"},
+ {F_NETBSD6, "netbsd6"},
+};
+
+__dead static void usage(void);
+
+int
+main(int argc, char **argv)
+{
+ int ch, status;
+ unsigned int i;
+ char *dir, *p;
+ FILE *spec1, *spec2;
+
+ setprogname(argv[0]);
+
+ dir = NULL;
+ init_excludes();
+ spec1 = stdin;
+ spec2 = NULL;
+
+ while ((ch = getopt(argc, argv,
+ "bcCdDeE:f:F:I:ijk:K:lLmMnN:p:PqrR:s:StuUwWxX:"))
+ != -1) {
+ switch((char)ch) {
+ case 'b':
+ bflag = 1;
+ break;
+ case 'c':
+ cflag = 1;
+ break;
+ case 'C':
+ Cflag = 1;
+ break;
+ case 'd':
+ dflag = 1;
+ break;
+ case 'D':
+ Dflag = 1;
+ break;
+ case 'E':
+ parsetags(&excludetags, optarg);
+ break;
+ case 'e':
+ eflag = 1;
+ break;
+ case 'f':
+ if (spec1 == stdin) {
+ spec1 = fopen(optarg, "r");
+ if (spec1 == NULL)
+ mtree_err("%s: %s", optarg,
+ strerror(errno));
+ } else if (spec2 == NULL) {
+ spec2 = fopen(optarg, "r");
+ if (spec2 == NULL)
+ mtree_err("%s: %s", optarg,
+ strerror(errno));
+ } else
+ usage();
+ break;
+ case 'F':
+ for (i = 0; i < __arraycount(flavors); i++)
+ if (strcmp(optarg, flavors[i].name) == 0) {
+ flavor = flavors[i].flavor;
+ break;
+ }
+ if (i == __arraycount(flavors))
+ usage();
+ break;
+ case 'i':
+ iflag = 1;
+ break;
+ case 'I':
+ parsetags(&includetags, optarg);
+ break;
+ case 'j':
+ jflag = 1;
+ break;
+ case 'k':
+ keys = F_TYPE;
+ while ((p = strsep(&optarg, " \t,")) != NULL)
+ if (*p != '\0')
+ keys |= parsekey(p, NULL);
+ break;
+ case 'K':
+ while ((p = strsep(&optarg, " \t,")) != NULL)
+ if (*p != '\0')
+ keys |= parsekey(p, NULL);
+ break;
+ case 'l':
+ lflag = 1;
+ break;
+ case 'L':
+ ftsoptions &= ~FTS_PHYSICAL;
+ ftsoptions |= FTS_LOGICAL;
+ break;
+ case 'm':
+ mflag = 1;
+ break;
+ case 'M':
+ mtree_Mflag = 1;
+ break;
+ case 'n':
+ nflag = 1;
+ break;
+ case 'N':
+ if (! setup_getid(optarg))
+ mtree_err(
+ "Unable to use user and group databases in `%s'",
+ optarg);
+ break;
+ case 'p':
+ dir = optarg;
+ break;
+ case 'P':
+ ftsoptions &= ~FTS_LOGICAL;
+ ftsoptions |= FTS_PHYSICAL;
+ break;
+ case 'q':
+ qflag = 1;
+ break;
+ case 'r':
+ rflag = 1;
+ break;
+ case 'R':
+ while ((p = strsep(&optarg, " \t,")) != NULL)
+ if (*p != '\0')
+ keys &= ~parsekey(p, NULL);
+ break;
+ case 's':
+ sflag = 1;
+ crc_total = ~strtol(optarg, &p, 0);
+ if (*p)
+ mtree_err("illegal seed value -- %s", optarg);
+ break;
+ case 'S':
+ mtree_Sflag = 1;
+ break;
+ case 't':
+ tflag = 1;
+ break;
+ case 'u':
+ uflag = 1;
+ break;
+ case 'U':
+ Uflag = uflag = 1;
+ break;
+ case 'w':
+ wflag = 1;
+ break;
+ case 'W':
+ mtree_Wflag = 1;
+ break;
+ case 'x':
+ ftsoptions |= FTS_XDEV;
+ break;
+ case 'X':
+ read_excludes_file(optarg);
+ break;
+ case '?':
+ default:
+ usage();
+ }
+ }
+ argc -= optind;
+ argv += optind;
+
+ if (argc)
+ usage();
+
+ switch (flavor) {
+ case F_FREEBSD9:
+ if (cflag && iflag) {
+ warnx("-c and -i passed, replacing -i with -j for "
+ "FreeBSD compatibility");
+ iflag = 0;
+ jflag = 1;
+ }
+ if (dflag && !bflag) {
+ warnx("Adding -b to -d for FreeBSD compatibility");
+ bflag = 1;
+ }
+ if (uflag && !iflag) {
+ warnx("Adding -i to -%c for FreeBSD compatibility",
+ Uflag ? 'U' : 'u');
+ iflag = 1;
+ }
+ if (uflag && !tflag) {
+ warnx("Adding -t to -%c for FreeBSD compatibility",
+ Uflag ? 'U' : 'u');
+ tflag = 1;
+ }
+ if (wflag)
+ warnx("The -w flag is a no-op");
+ break;
+ default:
+ if (wflag)
+ usage();
+ }
+
+ if (spec2 && (cflag || Cflag || Dflag))
+ mtree_err("Double -f, -c, -C and -D flags are mutually "
+ "exclusive");
+
+ if (dir && spec2)
+ mtree_err("Double -f and -p flags are mutually exclusive");
+
+ if (dir && chdir(dir))
+ mtree_err("%s: %s", dir, strerror(errno));
+
+ if ((cflag || sflag) && !getcwd(fullpath, sizeof(fullpath)))
+ mtree_err("%s", strerror(errno));
+
+ if ((cflag && Cflag) || (cflag && Dflag) || (Cflag && Dflag))
+ mtree_err("-c, -C and -D flags are mutually exclusive");
+
+ if (iflag && mflag)
+ mtree_err("-i and -m flags are mutually exclusive");
+
+ if (lflag && uflag)
+ mtree_err("-l and -u flags are mutually exclusive");
+
+ if (cflag) {
+ cwalk();
+ exit(0);
+ }
+ if (Cflag || Dflag) {
+ dump_nodes("", spec(spec1), Dflag);
+ exit(0);
+ }
+ if (spec2 != NULL)
+ status = mtree_specspec(spec1, spec2);
+ else
+ status = verify(spec1);
+ if (Uflag && (status == MISMATCHEXIT))
+ status = 0;
+ exit(status);
+}
+
+static void
+usage(void)
+{
+ unsigned int i;
+
+ fprintf(stderr,
+ "usage: %s [-bCcDdejLlMnPqrStUuWx] [-i|-m] [-E tags]\n"
+ "\t\t[-f spec] [-f spec]\n"
+ "\t\t[-I tags] [-K keywords] [-k keywords] [-N dbdir] [-p path]\n"
+ "\t\t[-R keywords] [-s seed] [-X exclude-file]\n"
+ "\t\t[-F flavor]\n",
+ getprogname());
+ fprintf(stderr, "\nflavors:");
+ for (i = 0; i < __arraycount(flavors); i++)
+ fprintf(stderr, " %s", flavors[i].name);
+ fprintf(stderr, "\n");
+ exit(1);
+}
diff --git a/contrib/mtree/mtree.h b/contrib/mtree/mtree.h
new file mode 100644
index 0000000..93d6cdf
--- /dev/null
+++ b/contrib/mtree/mtree.h
@@ -0,0 +1,158 @@
+/* $NetBSD: mtree.h,v 1.31 2012/10/05 09:17:29 wiz Exp $ */
+
+/*-
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)mtree.h 8.1 (Berkeley) 6/6/93
+ */
+
+#ifndef _MTREE_H_
+#define _MTREE_H_
+
+#define KEYDEFAULT (F_GID | F_MODE | F_NLINK | F_SIZE | F_SLINK | \
+ F_TIME | F_TYPE | F_UID | F_FLAGS)
+
+#define MISMATCHEXIT 2
+
+typedef struct _node {
+ struct _node *parent, *child; /* up, down */
+ struct _node *prev, *next; /* left, right */
+ off_t st_size; /* size */
+ struct timespec st_mtimespec; /* last modification time */
+ char *slink; /* symbolic link reference */
+ uid_t st_uid; /* uid */
+ gid_t st_gid; /* gid */
+#define MBITS (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO)
+ mode_t st_mode; /* mode */
+ dev_t st_rdev; /* device type */
+ u_long st_flags; /* flags */
+ nlink_t st_nlink; /* link count */
+ u_long cksum; /* check sum */
+ char *md5digest; /* MD5 digest */
+ char *rmd160digest; /* RMD-160 digest */
+ char *sha1digest; /* SHA1 digest */
+ char *sha256digest; /* SHA256 digest */
+ char *sha384digest; /* SHA384 digest */
+ char *sha512digest; /* SHA512 digest */
+ char *tags; /* tags, comma delimited,
+ * also with leading and
+ * trailing commas */
+ size_t lineno; /* line # entry came from */
+
+#define F_CKSUM 0x00000001 /* cksum(1) check sum */
+#define F_DEV 0x00000002 /* device type */
+#define F_DONE 0x00000004 /* directory done */
+#define F_FLAGS 0x00000008 /* file flags */
+#define F_GID 0x00000010 /* gid */
+#define F_GNAME 0x00000020 /* group name */
+#define F_IGN 0x00000040 /* ignore */
+#define F_MAGIC 0x00000080 /* name has magic chars */
+#define F_MD5 0x00000100 /* MD5 digest */
+#define F_MODE 0x00000200 /* mode */
+#define F_NLINK 0x00000400 /* number of links */
+#define F_OPT 0x00000800 /* existence optional */
+#define F_RMD160 0x00001000 /* RMD-160 digest */
+#define F_SHA1 0x00002000 /* SHA1 digest */
+#define F_SIZE 0x00004000 /* size */
+#define F_SLINK 0x00008000 /* symbolic link */
+#define F_TAGS 0x00010000 /* tags */
+#define F_TIME 0x00020000 /* modification time */
+#define F_TYPE 0x00040000 /* file type */
+#define F_UID 0x00080000 /* uid */
+#define F_UNAME 0x00100000 /* user name */
+#define F_VISIT 0x00200000 /* file visited */
+#define F_NOCHANGE 0x00400000 /* check existence, but not */
+ /* other properties */
+#define F_SHA256 0x00800000 /* SHA256 digest */
+#define F_SHA384 0x01000000 /* SHA384 digest */
+#define F_SHA512 0x02000000 /* SHA512 digest */
+
+ int flags; /* items set */
+
+#define F_BLOCK 0x001 /* block special */
+#define F_CHAR 0x002 /* char special */
+#define F_DIR 0x004 /* directory */
+#define F_FIFO 0x008 /* fifo */
+#define F_FILE 0x010 /* regular file */
+#define F_LINK 0x020 /* symbolic link */
+#define F_SOCK 0x040 /* socket */
+#define F_DOOR 0x080 /* door */
+ int type; /* file type */
+
+ char name[1]; /* file name (must be last) */
+} NODE;
+
+
+typedef struct {
+ char **list;
+ int count;
+} slist_t;
+
+
+/*
+ * prototypes for functions published to other programs which want to use
+ * the specfile parser but don't want to pull in all of "extern.h"
+ */
+const char *inotype(u_int);
+u_int nodetoino(u_int);
+int setup_getid(const char *);
+NODE *spec(FILE *);
+int mtree_specspec(FILE *, FILE *);
+void free_nodes(NODE *);
+char *vispath(const char *);
+
+#ifdef __FreeBSD__
+#define KEY_DIGEST "digest"
+#else
+#define KEY_DIGEST
+#endif
+
+#define MD5KEY "md5" KEY_DIGEST
+#ifdef __FreeBSD__
+#define RMD160KEY "ripemd160" KEY_DIGEST
+#else
+#define RMD160KEY "rmd160" KEY_DIGEST
+#endif
+#define SHA1KEY "sha1" KEY_DIGEST
+#define SHA256KEY "sha256" KEY_DIGEST
+#define SHA384KEY "sha384"
+#define SHA512KEY "sha512"
+
+#define RP(p) \
+ ((p)->fts_path[0] == '.' && (p)->fts_path[1] == '/' ? \
+ (p)->fts_path + 2 : (p)->fts_path)
+
+#define UF_MASK ((UF_NODUMP | UF_IMMUTABLE | \
+ UF_APPEND | UF_OPAQUE) \
+ & UF_SETTABLE) /* user settable flags */
+#define SF_MASK ((SF_ARCHIVED | SF_IMMUTABLE | \
+ SF_APPEND) & SF_SETTABLE) /* root settable flags */
+#define CH_MASK (UF_MASK | SF_MASK) /* all settable flags */
+#define SP_FLGS (SF_IMMUTABLE | SF_APPEND) /* special flags */
+
+#endif /* _MTREE_H_ */
diff --git a/contrib/mtree/spec.c b/contrib/mtree/spec.c
new file mode 100644
index 0000000..3500b2f
--- /dev/null
+++ b/contrib/mtree/spec.c
@@ -0,0 +1,838 @@
+/* $NetBSD: spec.c,v 1.85 2012/12/20 16:43:16 christos Exp $ */
+
+/*-
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*-
+ * Copyright (c) 2001-2004 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Luke Mewburn of Wasabi Systems.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
+#include <sys/cdefs.h>
+#if defined(__RCSID) && !defined(lint)
+#if 0
+static char sccsid[] = "@(#)spec.c 8.2 (Berkeley) 4/28/95";
+#else
+__RCSID("$NetBSD: spec.c,v 1.85 2012/12/20 16:43:16 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <sys/param.h>
+#include <sys/stat.h>
+
+#include <assert.h>
+#include <ctype.h>
+#include <errno.h>
+#include <grp.h>
+#include <pwd.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <vis.h>
+#include <util.h>
+
+#include "extern.h"
+#include "pack_dev.h"
+
+size_t mtree_lineno; /* Current spec line number */
+int mtree_Mflag; /* Merge duplicate entries */
+int mtree_Wflag; /* Don't "whack" permissions */
+int mtree_Sflag; /* Sort entries */
+
+static dev_t parsedev(char *);
+static void replacenode(NODE *, NODE *);
+static void set(char *, NODE *);
+static void unset(char *, NODE *);
+static void addchild(NODE *, NODE *);
+static int nodecmp(const NODE *, const NODE *);
+static int appendfield(int, const char *, ...) __printflike(2, 3);
+
+#define REPLACEPTR(x,v) do { if ((x)) free((x)); (x) = (v); } while (0)
+
+NODE *
+spec(FILE *fp)
+{
+ NODE *centry, *last, *pathparent, *cur;
+ char *p, *e, *next;
+ NODE ginfo, *root;
+ char *buf, *tname, *ntname;
+ size_t tnamelen, plen;
+
+ root = NULL;
+ centry = last = NULL;
+ tname = NULL;
+ tnamelen = 0;
+ memset(&ginfo, 0, sizeof(ginfo));
+ for (mtree_lineno = 0;
+ (buf = fparseln(fp, NULL, &mtree_lineno, NULL,
+ FPARSELN_UNESCCOMM));
+ free(buf)) {
+ /* Skip leading whitespace. */
+ for (p = buf; *p && isspace((unsigned char)*p); ++p)
+ continue;
+
+ /* If nothing but whitespace, continue. */
+ if (!*p)
+ continue;
+
+#ifdef DEBUG
+ fprintf(stderr, "line %lu: {%s}\n",
+ (u_long)mtree_lineno, p);
+#endif
+ /* Grab file name, "$", "set", or "unset". */
+ next = buf;
+ while ((p = strsep(&next, " \t")) != NULL && *p == '\0')
+ continue;
+ if (p == NULL)
+ mtree_err("missing field");
+
+ if (p[0] == '/') {
+ if (strcmp(p + 1, "set") == 0)
+ set(next, &ginfo);
+ else if (strcmp(p + 1, "unset") == 0)
+ unset(next, &ginfo);
+ else
+ mtree_err("invalid specification `%s'", p);
+ continue;
+ }
+
+ if (strcmp(p, "..") == 0) {
+ /* Don't go up, if haven't gone down. */
+ if (root == NULL)
+ goto noparent;
+ if (last->type != F_DIR || last->flags & F_DONE) {
+ if (last == root)
+ goto noparent;
+ last = last->parent;
+ }
+ last->flags |= F_DONE;
+ continue;
+
+noparent: mtree_err("no parent node");
+ }
+
+ plen = strlen(p) + 1;
+ if (plen > tnamelen) {
+ if ((ntname = realloc(tname, plen)) == NULL)
+ mtree_err("realloc: %s", strerror(errno));
+ tname = ntname;
+ tnamelen = plen;
+ }
+ if (strunvis(tname, p) == -1)
+ mtree_err("strunvis failed on `%s'", p);
+ p = tname;
+
+ pathparent = NULL;
+ if (strchr(p, '/') != NULL) {
+ cur = root;
+ for (; (e = strchr(p, '/')) != NULL; p = e+1) {
+ if (p == e)
+ continue; /* handle // */
+ *e = '\0';
+ if (strcmp(p, ".") != 0) {
+ while (cur &&
+ strcmp(cur->name, p) != 0) {
+ cur = cur->next;
+ }
+ }
+ if (cur == NULL || cur->type != F_DIR) {
+ mtree_err("%s: %s", tname,
+ "missing directory in specification");
+ }
+ *e = '/';
+ pathparent = cur;
+ cur = cur->child;
+ }
+ if (*p == '\0')
+ mtree_err("%s: empty leaf element", tname);
+ }
+
+ if ((centry = calloc(1, sizeof(NODE) + strlen(p))) == NULL)
+ mtree_err("%s", strerror(errno));
+ *centry = ginfo;
+ centry->lineno = mtree_lineno;
+ strcpy(centry->name, p);
+#define MAGIC "?*["
+ if (strpbrk(p, MAGIC))
+ centry->flags |= F_MAGIC;
+ set(next, centry);
+
+ if (root == NULL) {
+ /*
+ * empty tree
+ */
+ if (strcmp(centry->name, ".") != 0 ||
+ centry->type != F_DIR)
+ mtree_err(
+ "root node must be the directory `.'");
+ last = root = centry;
+ root->parent = root;
+ } else if (pathparent != NULL) {
+ /*
+ * full path entry; add or replace
+ */
+ centry->parent = pathparent;
+ addchild(pathparent, centry);
+ last = centry;
+ } else if (strcmp(centry->name, ".") == 0) {
+ /*
+ * duplicate "." entry; always replace
+ */
+ replacenode(root, centry);
+ } else if (last->type == F_DIR && !(last->flags & F_DONE)) {
+ /*
+ * new relative child in current dir;
+ * add or replace
+ */
+ centry->parent = last;
+ addchild(last, centry);
+ last = centry;
+ } else {
+ /*
+ * new relative child in parent dir
+ * (after encountering ".." entry);
+ * add or replace
+ */
+ centry->parent = last->parent;
+ addchild(last->parent, centry);
+ last = centry;
+ }
+ }
+ return (root);
+}
+
+void
+free_nodes(NODE *root)
+{
+ NODE *cur, *next;
+
+ if (root == NULL)
+ return;
+
+ next = NULL;
+ for (cur = root; cur != NULL; cur = next) {
+ next = cur->next;
+ free_nodes(cur->child);
+ REPLACEPTR(cur->slink, NULL);
+ REPLACEPTR(cur->md5digest, NULL);
+ REPLACEPTR(cur->rmd160digest, NULL);
+ REPLACEPTR(cur->sha1digest, NULL);
+ REPLACEPTR(cur->sha256digest, NULL);
+ REPLACEPTR(cur->sha384digest, NULL);
+ REPLACEPTR(cur->sha512digest, NULL);
+ REPLACEPTR(cur->tags, NULL);
+ REPLACEPTR(cur, NULL);
+ }
+}
+
+/*
+ * appendfield --
+ * Like printf(), but output a space either before or after
+ * the regular output, according to the pathlast flag.
+ */
+static int
+appendfield(int pathlast, const char *fmt, ...)
+{
+ va_list ap;
+ int result;
+
+ va_start(ap, fmt);
+ if (!pathlast)
+ printf(" ");
+ result = vprintf(fmt, ap);
+ if (pathlast)
+ printf(" ");
+ va_end(ap);
+ return result;
+}
+
+/*
+ * dump_nodes --
+ * dump the NODEs from `cur', based in the directory `dir'.
+ * if pathlast is none zero, print the path last, otherwise print
+ * it first.
+ */
+void
+dump_nodes(const char *dir, NODE *root, int pathlast)
+{
+ NODE *cur;
+ char path[MAXPATHLEN];
+ const char *name;
+ char *str;
+ char *p, *q;
+
+ for (cur = root; cur != NULL; cur = cur->next) {
+ if (cur->type != F_DIR && !matchtags(cur))
+ continue;
+
+ if (snprintf(path, sizeof(path), "%s%s%s",
+ dir, *dir ? "/" : "", cur->name)
+ >= (int)sizeof(path))
+ mtree_err("Pathname too long.");
+
+ if (!pathlast)
+ printf("%s", vispath(path));
+
+#define MATCHFLAG(f) ((keys & (f)) && (cur->flags & (f)))
+ if (MATCHFLAG(F_TYPE))
+ appendfield(pathlast, "type=%s", nodetype(cur->type));
+ if (MATCHFLAG(F_UID | F_UNAME)) {
+ if (keys & F_UNAME &&
+ (name = user_from_uid(cur->st_uid, 1)) != NULL)
+ appendfield(pathlast, "uname=%s", name);
+ else
+ appendfield(pathlast, "uid=%u", cur->st_uid);
+ }
+ if (MATCHFLAG(F_GID | F_GNAME)) {
+ if (keys & F_GNAME &&
+ (name = group_from_gid(cur->st_gid, 1)) != NULL)
+ appendfield(pathlast, "gname=%s", name);
+ else
+ appendfield(pathlast, "gid=%u", cur->st_gid);
+ }
+ if (MATCHFLAG(F_MODE))
+ appendfield(pathlast, "mode=%#o", cur->st_mode);
+ if (MATCHFLAG(F_DEV) &&
+ (cur->type == F_BLOCK || cur->type == F_CHAR))
+ appendfield(pathlast, "device=%#llx", (long long)cur->st_rdev);
+ if (MATCHFLAG(F_NLINK))
+ appendfield(pathlast, "nlink=%d", cur->st_nlink);
+ if (MATCHFLAG(F_SLINK))
+ appendfield(pathlast, "link=%s", vispath(cur->slink));
+ if (MATCHFLAG(F_SIZE))
+ appendfield(pathlast, "size=%lld", (long long)cur->st_size);
+ if (MATCHFLAG(F_TIME))
+ appendfield(pathlast, "time=%lld.%09ld",
+ (long long)cur->st_mtimespec.tv_sec,
+ cur->st_mtimespec.tv_nsec);
+ if (MATCHFLAG(F_CKSUM))
+ appendfield(pathlast, "cksum=%lu", cur->cksum);
+ if (MATCHFLAG(F_MD5))
+ appendfield(pathlast, "%s=%s", MD5KEY, cur->md5digest);
+ if (MATCHFLAG(F_RMD160))
+ appendfield(pathlast, "%s=%s", RMD160KEY,
+ cur->rmd160digest);
+ if (MATCHFLAG(F_SHA1))
+ appendfield(pathlast, "%s=%s", SHA1KEY,
+ cur->sha1digest);
+ if (MATCHFLAG(F_SHA256))
+ appendfield(pathlast, "%s=%s", SHA256KEY,
+ cur->sha256digest);
+ if (MATCHFLAG(F_SHA384))
+ appendfield(pathlast, "%s=%s", SHA384KEY,
+ cur->sha384digest);
+ if (MATCHFLAG(F_SHA512))
+ appendfield(pathlast, "%s=%s", SHA512KEY,
+ cur->sha512digest);
+ if (MATCHFLAG(F_FLAGS)) {
+ str = flags_to_string(cur->st_flags, "none");
+ appendfield(pathlast, "flags=%s", str);
+ free(str);
+ }
+ if (MATCHFLAG(F_IGN))
+ appendfield(pathlast, "ignore");
+ if (MATCHFLAG(F_OPT))
+ appendfield(pathlast, "optional");
+ if (MATCHFLAG(F_TAGS)) {
+ /* don't output leading or trailing commas */
+ p = cur->tags;
+ while (*p == ',')
+ p++;
+ q = p + strlen(p);
+ while(q > p && q[-1] == ',')
+ q--;
+ appendfield(pathlast, "tags=%.*s", (int)(q - p), p);
+ }
+ puts(pathlast ? vispath(path) : "");
+
+ if (cur->child)
+ dump_nodes(path, cur->child, pathlast);
+ }
+}
+
+/*
+ * vispath --
+ * strsvis(3) encodes path, which must not be longer than MAXPATHLEN
+ * characters long, and returns a pointer to a static buffer containing
+ * the result.
+ */
+char *
+vispath(const char *path)
+{
+ static const char extra[] = { ' ', '\t', '\n', '\\', '#', '\0' };
+ static const char extra_glob[] = { ' ', '\t', '\n', '\\', '#', '*',
+ '?', '[', '\0' };
+ static char pathbuf[4*MAXPATHLEN + 1];
+
+ if (flavor == F_NETBSD6)
+ strsvis(pathbuf, path, VIS_CSTYLE, extra);
+ else
+ strsvis(pathbuf, path, VIS_OCTAL, extra_glob);
+ return pathbuf;
+}
+
+
+static dev_t
+parsedev(char *arg)
+{
+#define MAX_PACK_ARGS 3
+ u_long numbers[MAX_PACK_ARGS];
+ char *p, *ep, *dev;
+ int argc;
+ pack_t *pack;
+ dev_t result;
+ const char *error = NULL;
+
+ if ((dev = strchr(arg, ',')) != NULL) {
+ *dev++='\0';
+ if ((pack = pack_find(arg)) == NULL)
+ mtree_err("unknown format `%s'", arg);
+ argc = 0;
+ while ((p = strsep(&dev, ",")) != NULL) {
+ if (*p == '\0')
+ mtree_err("missing number");
+ numbers[argc++] = strtoul(p, &ep, 0);
+ if (*ep != '\0')
+ mtree_err("invalid number `%s'",
+ p);
+ if (argc > MAX_PACK_ARGS)
+ mtree_err("too many arguments");
+ }
+ if (argc < 2)
+ mtree_err("not enough arguments");
+ result = (*pack)(argc, numbers, &error);
+ if (error != NULL)
+ mtree_err("%s", error);
+ } else {
+ result = (dev_t)strtoul(arg, &ep, 0);
+ if (*ep != '\0')
+ mtree_err("invalid device `%s'", arg);
+ }
+ return (result);
+}
+
+static void
+replacenode(NODE *cur, NODE *new)
+{
+
+#define REPLACE(x) cur->x = new->x
+#define REPLACESTR(x) REPLACEPTR(cur->x,new->x)
+
+ if (cur->type != new->type) {
+ if (mtree_Mflag) {
+ /*
+ * merge entries with different types; we
+ * don't want children retained in this case.
+ */
+ REPLACE(type);
+ free_nodes(cur->child);
+ cur->child = NULL;
+ } else {
+ mtree_err(
+ "existing entry for `%s', type `%s'"
+ " does not match type `%s'",
+ cur->name, nodetype(cur->type),
+ nodetype(new->type));
+ }
+ }
+
+ REPLACE(st_size);
+ REPLACE(st_mtimespec);
+ REPLACESTR(slink);
+ if (cur->slink != NULL) {
+ if ((cur->slink = strdup(new->slink)) == NULL)
+ mtree_err("memory allocation error");
+ if (strunvis(cur->slink, new->slink) == -1)
+ mtree_err("strunvis failed on `%s'", new->slink);
+ free(new->slink);
+ }
+ REPLACE(st_uid);
+ REPLACE(st_gid);
+ REPLACE(st_mode);
+ REPLACE(st_rdev);
+ REPLACE(st_flags);
+ REPLACE(st_nlink);
+ REPLACE(cksum);
+ REPLACESTR(md5digest);
+ REPLACESTR(rmd160digest);
+ REPLACESTR(sha1digest);
+ REPLACESTR(sha256digest);
+ REPLACESTR(sha384digest);
+ REPLACESTR(sha512digest);
+ REPLACESTR(tags);
+ REPLACE(lineno);
+ REPLACE(flags);
+ free(new);
+}
+
+static void
+set(char *t, NODE *ip)
+{
+ int type, value, len;
+ gid_t gid;
+ uid_t uid;
+ char *kw, *val, *md, *ep;
+ void *m;
+
+ while ((kw = strsep(&t, "= \t")) != NULL) {
+ if (*kw == '\0')
+ continue;
+ if (strcmp(kw, "all") == 0)
+ mtree_err("invalid keyword `all'");
+ ip->flags |= type = parsekey(kw, &value);
+ if (!value)
+ /* Just set flag bit (F_IGN and F_OPT) */
+ continue;
+ while ((val = strsep(&t, " \t")) != NULL && *val == '\0')
+ continue;
+ if (val == NULL)
+ mtree_err("missing value");
+ switch (type) {
+ case F_CKSUM:
+ ip->cksum = strtoul(val, &ep, 10);
+ if (*ep)
+ mtree_err("invalid checksum `%s'", val);
+ break;
+ case F_DEV:
+ ip->st_rdev = parsedev(val);
+ break;
+ case F_FLAGS:
+ if (strcmp("none", val) == 0)
+ ip->st_flags = 0;
+ else if (string_to_flags(&val, &ip->st_flags, NULL)
+ != 0)
+ mtree_err("invalid flag `%s'", val);
+ break;
+ case F_GID:
+ ip->st_gid = (gid_t)strtoul(val, &ep, 10);
+ if (*ep)
+ mtree_err("invalid gid `%s'", val);
+ break;
+ case F_GNAME:
+ if (mtree_Wflag) /* don't parse if whacking */
+ break;
+ if (gid_from_group(val, &gid) == -1)
+ mtree_err("unknown group `%s'", val);
+ ip->st_gid = gid;
+ break;
+ case F_MD5:
+ if (val[0]=='0' && val[1]=='x')
+ md=&val[2];
+ else
+ md=val;
+ if ((ip->md5digest = strdup(md)) == NULL)
+ mtree_err("memory allocation error");
+ break;
+ case F_MODE:
+ if ((m = setmode(val)) == NULL)
+ mtree_err("cannot set file mode `%s' (%s)",
+ val, strerror(errno));
+ ip->st_mode = getmode(m, 0);
+ free(m);
+ break;
+ case F_NLINK:
+ ip->st_nlink = (nlink_t)strtoul(val, &ep, 10);
+ if (*ep)
+ mtree_err("invalid link count `%s'", val);
+ break;
+ case F_RMD160:
+ if (val[0]=='0' && val[1]=='x')
+ md=&val[2];
+ else
+ md=val;
+ if ((ip->rmd160digest = strdup(md)) == NULL)
+ mtree_err("memory allocation error");
+ break;
+ case F_SHA1:
+ if (val[0]=='0' && val[1]=='x')
+ md=&val[2];
+ else
+ md=val;
+ if ((ip->sha1digest = strdup(md)) == NULL)
+ mtree_err("memory allocation error");
+ break;
+ case F_SIZE:
+ ip->st_size = (off_t)strtoll(val, &ep, 10);
+ if (*ep)
+ mtree_err("invalid size `%s'", val);
+ break;
+ case F_SLINK:
+ if ((ip->slink = strdup(val)) == NULL)
+ mtree_err("memory allocation error");
+ if (strunvis(ip->slink, val) == -1)
+ mtree_err("strunvis failed on `%s'", val);
+ break;
+ case F_TAGS:
+ len = strlen(val) + 3; /* "," + str + ",\0" */
+ if ((ip->tags = malloc(len)) == NULL)
+ mtree_err("memory allocation error");
+ snprintf(ip->tags, len, ",%s,", val);
+ break;
+ case F_TIME:
+ ip->st_mtimespec.tv_sec =
+ (time_t)strtoll(val, &ep, 10);
+ if (*ep != '.')
+ mtree_err("invalid time `%s'", val);
+ val = ep + 1;
+ ip->st_mtimespec.tv_nsec = strtol(val, &ep, 10);
+ if (*ep)
+ mtree_err("invalid time `%s'", val);
+ break;
+ case F_TYPE:
+ ip->type = parsetype(val);
+ break;
+ case F_UID:
+ ip->st_uid = (uid_t)strtoul(val, &ep, 10);
+ if (*ep)
+ mtree_err("invalid uid `%s'", val);
+ break;
+ case F_UNAME:
+ if (mtree_Wflag) /* don't parse if whacking */
+ break;
+ if (uid_from_user(val, &uid) == -1)
+ mtree_err("unknown user `%s'", val);
+ ip->st_uid = uid;
+ break;
+ case F_SHA256:
+ if (val[0]=='0' && val[1]=='x')
+ md=&val[2];
+ else
+ md=val;
+ if ((ip->sha256digest = strdup(md)) == NULL)
+ mtree_err("memory allocation error");
+ break;
+ case F_SHA384:
+ if (val[0]=='0' && val[1]=='x')
+ md=&val[2];
+ else
+ md=val;
+ if ((ip->sha384digest = strdup(md)) == NULL)
+ mtree_err("memory allocation error");
+ break;
+ case F_SHA512:
+ if (val[0]=='0' && val[1]=='x')
+ md=&val[2];
+ else
+ md=val;
+ if ((ip->sha512digest = strdup(md)) == NULL)
+ mtree_err("memory allocation error");
+ break;
+ default:
+ mtree_err(
+ "set(): unsupported key type 0x%x (INTERNAL ERROR)",
+ type);
+ /* NOTREACHED */
+ }
+ }
+}
+
+static void
+unset(char *t, NODE *ip)
+{
+ char *p;
+
+ while ((p = strsep(&t, " \t")) != NULL) {
+ if (*p == '\0')
+ continue;
+ ip->flags &= ~parsekey(p, NULL);
+ }
+}
+
+/*
+ * addchild --
+ * Add the centry node as a child of the pathparent node. If
+ * centry is a duplicate, call replacenode(). If centry is not
+ * a duplicate, insert it into the linked list referenced by
+ * pathparent->child. Keep the list sorted if Sflag is set.
+ */
+static void
+addchild(NODE *pathparent, NODE *centry)
+{
+ NODE *samename; /* node with the same name as centry */
+ NODE *replacepos; /* if non-NULL, centry should replace this node */
+ NODE *insertpos; /* if non-NULL, centry should be inserted
+ * after this node */
+ NODE *cur; /* for stepping through the list */
+ NODE *last; /* the last node in the list */
+ int cmp;
+
+ samename = NULL;
+ replacepos = NULL;
+ insertpos = NULL;
+ last = NULL;
+ cur = pathparent->child;
+ if (cur == NULL) {
+ /* centry is pathparent's first and only child node so far */
+ pathparent->child = centry;
+ return;
+ }
+
+ /*
+ * pathparent already has at least one other child, so add the
+ * centry node to the list.
+ *
+ * We first scan through the list looking for an existing node
+ * with the same name (setting samename), and also looking
+ * for the correct position to replace or insert the new node
+ * (setting replacepos and/or insertpos).
+ */
+ for (; cur != NULL; last = cur, cur = cur->next) {
+ if (strcmp(centry->name, cur->name) == 0) {
+ samename = cur;
+ }
+ if (mtree_Sflag) {
+ cmp = nodecmp(centry, cur);
+ if (cmp == 0) {
+ replacepos = cur;
+ } else if (cmp > 0) {
+ insertpos = cur;
+ }
+ }
+ }
+ if (! mtree_Sflag) {
+ if (samename != NULL) {
+ /* replace node with same name */
+ replacepos = samename;
+ } else {
+ /* add new node at end of list */
+ insertpos = last;
+ }
+ }
+
+ if (samename != NULL) {
+ /*
+ * We found a node with the same name above. Call
+ * replacenode(), which will either exit with an error,
+ * or replace the information in the samename node and
+ * free the information in the centry node.
+ */
+ replacenode(samename, centry);
+ if (samename == replacepos) {
+ /* The just-replaced node was in the correct position */
+ return;
+ }
+ if (samename == insertpos || samename->prev == insertpos) {
+ /*
+ * We thought the new node should be just before
+ * or just after the replaced node, but that would
+ * be equivalent to just retaining the replaced node.
+ */
+ return;
+ }
+
+ /*
+ * The just-replaced node is in the wrong position in
+ * the list. This can happen if sort order depends on
+ * criteria other than the node name.
+ *
+ * Make centry point to the just-replaced node. Unlink
+ * the just-replaced node from the list, and allow it to
+ * be insterted in the correct position later.
+ */
+ centry = samename;
+ if (centry->prev)
+ centry->prev->next = centry->next;
+ else {
+ /* centry->next is the new head of the list */
+ pathparent->child = centry->next;
+ assert(centry->next != NULL);
+ }
+ if (centry->next)
+ centry->next->prev = centry->prev;
+ centry->prev = NULL;
+ centry->next = NULL;
+ }
+
+ if (insertpos == NULL) {
+ /* insert centry at the beginning of the list */
+ pathparent->child->prev = centry;
+ centry->next = pathparent->child;
+ centry->prev = NULL;
+ pathparent->child = centry;
+ } else {
+ /* insert centry into the list just after insertpos */
+ centry->next = insertpos->next;
+ insertpos->next = centry;
+ centry->prev = insertpos;
+ if (centry->next)
+ centry->next->prev = centry;
+ }
+ return;
+}
+
+/*
+ * nodecmp --
+ * used as a comparison function by addchild() to control the order
+ * in which entries appear within a list of sibling nodes. We make
+ * directories sort after non-directories, but otherwise sort in
+ * strcmp() order.
+ *
+ * Keep this in sync with dcmp() in create.c.
+ */
+static int
+nodecmp(const NODE *a, const NODE *b)
+{
+
+ if ((a->type & F_DIR) != 0) {
+ if ((b->type & F_DIR) == 0)
+ return 1;
+ } else if ((b->type & F_DIR) != 0)
+ return -1;
+ return strcmp(a->name, b->name);
+}
diff --git a/contrib/mtree/specspec.c b/contrib/mtree/specspec.c
new file mode 100644
index 0000000..2821fd1
--- /dev/null
+++ b/contrib/mtree/specspec.c
@@ -0,0 +1,273 @@
+/* $NetBSD: specspec.c,v 1.2 2012/10/05 01:27:29 christos Exp $ */
+
+/*-
+ * Copyright (c) 2003 Poul-Henning Kamp
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: specspec.c,v 1.2 2012/10/05 01:27:29 christos Exp $");
+
+#include <err.h>
+#include <grp.h>
+#include <pwd.h>
+#include <time.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include "mtree.h"
+#include "extern.h"
+
+#define FF(a, b, c, d) \
+ (((a)->flags & (c)) && ((b)->flags & (c)) && ((a)->d) != ((b)->d))
+#define FS(a, b, c, d) \
+ (((a)->flags & (c)) && ((b)->flags & (c)) && strcmp((a)->d,(b)->d))
+#define FM(a, b, c, d) \
+ (((a)->flags & (c)) && ((b)->flags & (c)) && memcmp(&(a)->d,&(b)->d, sizeof (a)->d))
+
+static void
+shownode(NODE *n, int f, char const *path)
+{
+ struct group *gr;
+ struct passwd *pw;
+
+ printf("%s%s %s", path, n->name, inotype(nodetoino(n->type)));
+ if (f & F_CKSUM)
+ printf(" cksum=%lu", n->cksum);
+ if (f & F_GID)
+ printf(" gid=%d", n->st_gid);
+ if (f & F_GNAME) {
+ gr = getgrgid(n->st_gid);
+ if (gr == NULL)
+ printf(" gid=%d", n->st_gid);
+ else
+ printf(" gname=%s", gr->gr_name);
+ }
+ if (f & F_MODE)
+ printf(" mode=%o", n->st_mode);
+ if (f & F_NLINK)
+ printf(" nlink=%d", n->st_nlink);
+ if (f & F_SIZE)
+ printf(" size=%jd", (intmax_t)n->st_size);
+ if (f & F_UID)
+ printf(" uid=%d", n->st_uid);
+ if (f & F_UNAME) {
+ pw = getpwuid(n->st_uid);
+ if (pw == NULL)
+ printf(" uid=%d", n->st_uid);
+ else
+ printf(" uname=%s", pw->pw_name);
+ }
+ if (f & F_MD5)
+ printf(" %s=%s", MD5KEY, n->md5digest);
+ if (f & F_SHA1)
+ printf(" %s=%s", SHA1KEY, n->sha1digest);
+ if (f & F_RMD160)
+ printf(" %s=%s", RMD160KEY, n->rmd160digest);
+ if (f & F_SHA256)
+ printf(" %s=%s", SHA256KEY, n->sha256digest);
+ if (f & F_SHA384)
+ printf(" %s=%s", SHA384KEY, n->sha384digest);
+ if (f & F_SHA512)
+ printf(" %s=%s", SHA512KEY, n->sha512digest);
+ if (f & F_FLAGS)
+ printf(" flags=%s", flags_to_string(n->st_flags, "none"));
+ printf("\n");
+}
+
+static int
+mismatch(NODE *n1, NODE *n2, int differ, char const *path)
+{
+
+ if (n2 == NULL) {
+ shownode(n1, differ, path);
+ return (1);
+ }
+ if (n1 == NULL) {
+ printf("\t");
+ shownode(n2, differ, path);
+ return (1);
+ }
+ if (!(differ & keys))
+ return(0);
+ printf("\t\t");
+ shownode(n1, differ, path);
+ printf("\t\t");
+ shownode(n2, differ, path);
+ return (1);
+}
+
+static int
+compare_nodes(NODE *n1, NODE *n2, char const *path)
+{
+ int differs;
+
+ if (n1 != NULL && n1->type == F_LINK)
+ n1->flags &= ~F_MODE;
+ if (n2 != NULL && n2->type == F_LINK)
+ n2->flags &= ~F_MODE;
+ differs = 0;
+ if (n1 == NULL && n2 != NULL) {
+ differs = n2->flags;
+ mismatch(n1, n2, differs, path);
+ return (1);
+ }
+ if (n1 != NULL && n2 == NULL) {
+ differs = n1->flags;
+ mismatch(n1, n2, differs, path);
+ return (1);
+ }
+ if (n1->type != n2->type) {
+ differs = 0;
+ mismatch(n1, n2, differs, path);
+ return (1);
+ }
+ if (FF(n1, n2, F_CKSUM, cksum))
+ differs |= F_CKSUM;
+ if (FF(n1, n2, F_GID, st_gid))
+ differs |= F_GID;
+ if (FF(n1, n2, F_GNAME, st_gid))
+ differs |= F_GNAME;
+ if (FF(n1, n2, F_MODE, st_mode))
+ differs |= F_MODE;
+ if (FF(n1, n2, F_NLINK, st_nlink))
+ differs |= F_NLINK;
+ if (FF(n1, n2, F_SIZE, st_size))
+ differs |= F_SIZE;
+ if (FS(n1, n2, F_SLINK, slink))
+ differs |= F_SLINK;
+ if (FM(n1, n2, F_TIME, st_mtimespec))
+ differs |= F_TIME;
+ if (FF(n1, n2, F_UID, st_uid))
+ differs |= F_UID;
+ if (FF(n1, n2, F_UNAME, st_uid))
+ differs |= F_UNAME;
+ if (FS(n1, n2, F_MD5, md5digest))
+ differs |= F_MD5;
+ if (FS(n1, n2, F_SHA1, sha1digest))
+ differs |= F_SHA1;
+ if (FS(n1, n2, F_RMD160, rmd160digest))
+ differs |= F_RMD160;
+ if (FS(n1, n2, F_SHA256, sha256digest))
+ differs |= F_SHA256;
+ if (FS(n1, n2, F_SHA384, sha384digest))
+ differs |= F_SHA384;
+ if (FS(n1, n2, F_SHA512, sha512digest))
+ differs |= F_SHA512;
+ if (FF(n1, n2, F_FLAGS, st_flags))
+ differs |= F_FLAGS;
+ if (differs) {
+ mismatch(n1, n2, differs, path);
+ return (1);
+ }
+ return (0);
+}
+static int
+walk_in_the_forest(NODE *t1, NODE *t2, char const *path)
+{
+ int r, i;
+ NODE *c1, *c2, *n1, *n2;
+ char *np;
+
+ r = 0;
+
+ if (t1 != NULL)
+ c1 = t1->child;
+ else
+ c1 = NULL;
+ if (t2 != NULL)
+ c2 = t2->child;
+ else
+ c2 = NULL;
+ while (c1 != NULL || c2 != NULL) {
+ n1 = n2 = NULL;
+ if (c1 != NULL)
+ n1 = c1->next;
+ if (c2 != NULL)
+ n2 = c2->next;
+ if (c1 != NULL && c2 != NULL) {
+ if (c1->type != F_DIR && c2->type == F_DIR) {
+ n2 = c2;
+ c2 = NULL;
+ } else if (c1->type == F_DIR && c2->type != F_DIR) {
+ n1 = c1;
+ c1 = NULL;
+ } else {
+ i = strcmp(c1->name, c2->name);
+ if (i > 0) {
+ n1 = c1;
+ c1 = NULL;
+ } else if (i < 0) {
+ n2 = c2;
+ c2 = NULL;
+ }
+ }
+ }
+ if (c1 == NULL && c2->type == F_DIR) {
+ asprintf(&np, "%s%s/", path, c2->name);
+ i = walk_in_the_forest(c1, c2, np);
+ free(np);
+ i += compare_nodes(c1, c2, path);
+ } else if (c2 == NULL && c1->type == F_DIR) {
+ asprintf(&np, "%s%s/", path, c1->name);
+ i = walk_in_the_forest(c1, c2, np);
+ free(np);
+ i += compare_nodes(c1, c2, path);
+ } else if (c1 == NULL || c2 == NULL) {
+ i = compare_nodes(c1, c2, path);
+ } else if (c1->type == F_DIR && c2->type == F_DIR) {
+ asprintf(&np, "%s%s/", path, c1->name);
+ i = walk_in_the_forest(c1, c2, np);
+ free(np);
+ i += compare_nodes(c1, c2, path);
+ } else {
+ i = compare_nodes(c1, c2, path);
+ }
+ r += i;
+ c1 = n1;
+ c2 = n2;
+ }
+ return (r);
+}
+
+int
+mtree_specspec(FILE *fi, FILE *fj)
+{
+ int rval;
+ NODE *root1, *root2;
+
+ root1 = spec(fi);
+ root2 = spec(fj);
+ rval = walk_in_the_forest(root1, root2, "");
+ rval += compare_nodes(root1, root2, "");
+ if (rval > 0)
+ return (MISMATCHEXIT);
+ return (0);
+}
diff --git a/contrib/mtree/verify.c b/contrib/mtree/verify.c
new file mode 100644
index 0000000..54b704c
--- /dev/null
+++ b/contrib/mtree/verify.c
@@ -0,0 +1,303 @@
+/* $NetBSD: verify.c,v 1.43 2012/10/05 01:31:05 christos Exp $ */
+
+/*-
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
+#include <sys/cdefs.h>
+#if defined(__RCSID) && !defined(lint)
+#if 0
+static char sccsid[] = "@(#)verify.c 8.1 (Berkeley) 6/6/93";
+#else
+__RCSID("$NetBSD: verify.c,v 1.43 2012/10/05 01:31:05 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <sys/param.h>
+#include <sys/stat.h>
+
+#if ! HAVE_NBTOOL_CONFIG_H
+#include <dirent.h>
+#endif
+
+#include <errno.h>
+#include <fnmatch.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "extern.h"
+
+static NODE *root;
+static char path[MAXPATHLEN];
+
+static void miss(NODE *, char *);
+static int vwalk(void);
+
+int
+verify(FILE *fi)
+{
+ int rval;
+
+ root = spec(fi);
+ rval = vwalk();
+ miss(root, path);
+ return (rval);
+}
+
+static int
+vwalk(void)
+{
+ FTS *t;
+ FTSENT *p;
+ NODE *ep, *level;
+ int specdepth, rval;
+ char *argv[2];
+ char dot[] = ".";
+ argv[0] = dot;
+ argv[1] = NULL;
+
+ if ((t = fts_open(argv, ftsoptions, NULL)) == NULL)
+ mtree_err("fts_open: %s", strerror(errno));
+ level = root;
+ specdepth = rval = 0;
+ while ((p = fts_read(t)) != NULL) {
+ if (check_excludes(p->fts_name, p->fts_path)) {
+ fts_set(t, p, FTS_SKIP);
+ continue;
+ }
+ switch(p->fts_info) {
+ case FTS_D:
+ case FTS_SL:
+ break;
+ case FTS_DP:
+ if (specdepth > p->fts_level) {
+ for (level = level->parent; level->prev;
+ level = level->prev)
+ continue;
+ --specdepth;
+ }
+ continue;
+ case FTS_DNR:
+ case FTS_ERR:
+ case FTS_NS:
+ warnx("%s: %s", RP(p), strerror(p->fts_errno));
+ continue;
+ default:
+ if (dflag)
+ continue;
+ }
+
+ if (specdepth != p->fts_level)
+ goto extra;
+ for (ep = level; ep; ep = ep->next)
+ if ((ep->flags & F_MAGIC &&
+ !fnmatch(ep->name, p->fts_name, FNM_PATHNAME)) ||
+ !strcmp(ep->name, p->fts_name)) {
+ ep->flags |= F_VISIT;
+ if ((ep->flags & F_NOCHANGE) == 0 &&
+ compare(ep, p))
+ rval = MISMATCHEXIT;
+ if (!(ep->flags & F_IGN) &&
+ ep->type == F_DIR &&
+ p->fts_info == FTS_D) {
+ if (ep->child) {
+ level = ep->child;
+ ++specdepth;
+ }
+ } else
+ fts_set(t, p, FTS_SKIP);
+ break;
+ }
+
+ if (ep)
+ continue;
+ extra:
+ if (!eflag && !(dflag && p->fts_info == FTS_SL)) {
+ printf("extra: %s", RP(p));
+ if (rflag) {
+ if ((S_ISDIR(p->fts_statp->st_mode)
+ ? rmdir : unlink)(p->fts_accpath)) {
+ printf(", not removed: %s",
+ strerror(errno));
+ } else
+ printf(", removed");
+ }
+ putchar('\n');
+ }
+ fts_set(t, p, FTS_SKIP);
+ }
+ fts_close(t);
+ if (sflag)
+ warnx("%s checksum: %u", fullpath, crc_total);
+ return (rval);
+}
+
+static void
+miss(NODE *p, char *tail)
+{
+ int create;
+ char *tp;
+ const char *type;
+ u_int32_t flags;
+
+ for (; p; p = p->next) {
+ if (p->flags & F_OPT && !(p->flags & F_VISIT))
+ continue;
+ if (p->type != F_DIR && (dflag || p->flags & F_VISIT))
+ continue;
+ strcpy(tail, p->name);
+ if (!(p->flags & F_VISIT)) {
+ /* Don't print missing message if file exists as a
+ symbolic link and the -q flag is set. */
+ struct stat statbuf;
+
+ if (qflag && stat(path, &statbuf) == 0 &&
+ S_ISDIR(statbuf.st_mode))
+ p->flags |= F_VISIT;
+ else
+ (void)printf("%s missing", path);
+ }
+ switch (p->type) {
+ case F_BLOCK:
+ case F_CHAR:
+ type = "device";
+ break;
+ case F_DIR:
+ type = "directory";
+ break;
+ case F_LINK:
+ type = "symlink";
+ break;
+ default:
+ putchar('\n');
+ continue;
+ }
+
+ create = 0;
+ if (!(p->flags & F_VISIT) && uflag) {
+ if (mtree_Wflag || p->type == F_LINK)
+ goto createit;
+ if (!(p->flags & (F_UID | F_UNAME)))
+ printf(
+ " (%s not created: user not specified)", type);
+ else if (!(p->flags & (F_GID | F_GNAME)))
+ printf(
+ " (%s not created: group not specified)", type);
+ else if (!(p->flags & F_MODE))
+ printf(
+ " (%s not created: mode not specified)", type);
+ else
+ createit:
+ switch (p->type) {
+ case F_BLOCK:
+ case F_CHAR:
+ if (mtree_Wflag)
+ continue;
+ if (!(p->flags & F_DEV))
+ printf(
+ " (%s not created: device not specified)",
+ type);
+ else if (mknod(path,
+ p->st_mode | nodetoino(p->type),
+ p->st_rdev) == -1)
+ printf(" (%s not created: %s)\n",
+ type, strerror(errno));
+ else
+ create = 1;
+ break;
+ case F_LINK:
+ if (!(p->flags & F_SLINK))
+ printf(
+ " (%s not created: link not specified)\n",
+ type);
+ else if (symlink(p->slink, path))
+ printf(
+ " (%s not created: %s)\n",
+ type, strerror(errno));
+ else
+ create = 1;
+ break;
+ case F_DIR:
+ if (mkdir(path, S_IRWXU|S_IRWXG|S_IRWXO))
+ printf(" (not created: %s)",
+ strerror(errno));
+ else
+ create = 1;
+ break;
+ default:
+ mtree_err("can't create create %s",
+ nodetype(p->type));
+ }
+ }
+ if (create)
+ printf(" (created)");
+ if (p->type == F_DIR) {
+ if (!(p->flags & F_VISIT))
+ putchar('\n');
+ for (tp = tail; *tp; ++tp)
+ continue;
+ *tp = '/';
+ miss(p->child, tp + 1);
+ *tp = '\0';
+ } else
+ putchar('\n');
+
+ if (!create || mtree_Wflag)
+ continue;
+ if ((p->flags & (F_UID | F_UNAME)) &&
+ (p->flags & (F_GID | F_GNAME)) &&
+ (lchown(path, p->st_uid, p->st_gid))) {
+ printf("%s: user/group/mode not modified: %s\n",
+ path, strerror(errno));
+ printf("%s: warning: file mode %snot set\n", path,
+ (p->flags & F_FLAGS) ? "and file flags " : "");
+ continue;
+ }
+ if (p->flags & F_MODE) {
+ if (lchmod(path, p->st_mode))
+ printf("%s: permissions not set: %s\n",
+ path, strerror(errno));
+ }
+#if HAVE_STRUCT_STAT_ST_FLAGS
+ if ((p->flags & F_FLAGS) && p->st_flags) {
+ if (iflag)
+ flags = p->st_flags;
+ else
+ flags = p->st_flags & ~SP_FLGS;
+ if (lchflags(path, flags))
+ printf("%s: file flags not set: %s\n",
+ path, strerror(errno));
+ }
+#endif /* HAVE_STRUCT_STAT_ST_FLAGS */
+ }
+}
diff --git a/contrib/ntp/arlib/Makefile.in b/contrib/ntp/arlib/Makefile.in
index 590880f..b4f665c 100644
--- a/contrib/ntp/arlib/Makefile.in
+++ b/contrib/ntp/arlib/Makefile.in
@@ -50,8 +50,8 @@ mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
-AR = ar
-ARFLAGS = cru
+AR = @AR@
+ARFLAGS = @ARFLAGS@
libares_a_AR = $(AR) $(ARFLAGS)
libares_a_LIBADD =
am_libares_a_OBJECTS = arlib.$(OBJEXT)
diff --git a/contrib/ntp/libntp/Makefile.in b/contrib/ntp/libntp/Makefile.in
index e91e0a3..6b6c3367 100644
--- a/contrib/ntp/libntp/Makefile.in
+++ b/contrib/ntp/libntp/Makefile.in
@@ -52,7 +52,7 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
-ARFLAGS = cru
+ARFLAGS = @ARFLAGS@
libntp_a_AR = $(AR) $(ARFLAGS)
libntp_a_LIBADD =
am__objects_1 = a_md5encrypt$U.$(OBJEXT) adjtime$U.$(OBJEXT) \
diff --git a/contrib/ntp/libparse/Makefile.in b/contrib/ntp/libparse/Makefile.in
index 4b42f74..7307c15 100644
--- a/contrib/ntp/libparse/Makefile.in
+++ b/contrib/ntp/libparse/Makefile.in
@@ -52,7 +52,7 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
-ARFLAGS = cru
+ARFLAGS ?= cru
libparse_a_AR = $(AR) $(ARFLAGS)
libparse_a_LIBADD =
am_libparse_a_OBJECTS = parse$U.$(OBJEXT) parse_conf$U.$(OBJEXT) \
diff --git a/contrib/ntp/ntpd/Makefile.in b/contrib/ntp/ntpd/Makefile.in
index f92b31f..6ccb13b 100644
--- a/contrib/ntp/ntpd/Makefile.in
+++ b/contrib/ntp/ntpd/Makefile.in
@@ -58,7 +58,7 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
-ARFLAGS = cru
+ARFLAGS = @ARFLAGS@
libntpd_a_AR = $(AR) $(ARFLAGS)
libntpd_a_LIBADD =
am_libntpd_a_OBJECTS = ntp_control$U.$(OBJEXT) ntp_crypto$U.$(OBJEXT) \
diff --git a/contrib/openbsm/INSTALL b/contrib/openbsm/INSTALL
index a28665d..9e52b0d 100644
--- a/contrib/openbsm/INSTALL
+++ b/contrib/openbsm/INSTALL
@@ -9,8 +9,8 @@ suppport is found. Typical builds will be performed using:
make
If doing development work on OpenBSM with gcc, the following invocation of
-configure may be preferred in order to generate full compiler warnings and
-force the compile to fail if a warning is found:
+configure is preferred in order to generate full compiler warnings and force
+the compile to fail if a warning is found:
CFLAGS="-Wall -Werror" ./configure
diff --git a/contrib/openbsm/NEWS b/contrib/openbsm/NEWS
index 86f5163..a55fabb 100644
--- a/contrib/openbsm/NEWS
+++ b/contrib/openbsm/NEWS
@@ -1,5 +1,11 @@
OpenBSM Version History
+OpenBSM 1.2 alpha 3
+
+- Various minor tweaks to the auditdistd build to make it fit the FreeBSD
+ build environment better.
+- AUE_WAIT6 merged from FreeBSD 9.
+
OpenBSM 1.2 alpha 2
- auditdistd, a distributed audit trail management daemon, has now been
@@ -489,4 +495,4 @@ OpenBSM 1.0 alpha 1
to support reloading of kernel event table.
- Allow comments in /etc/security configuration files.
-$P4: //depot/projects/trustedbsd/openbsm/NEWS#53 $
+$P4: //depot/projects/trustedbsd/openbsm/NEWS#55 $
diff --git a/contrib/openbsm/VERSION b/contrib/openbsm/VERSION
index 5b87628..b3ea4dc 100644
--- a/contrib/openbsm/VERSION
+++ b/contrib/openbsm/VERSION
@@ -1 +1 @@
-OPENBSM_1_2alpha2
+OPENBSM_1_2_alpha3
diff --git a/contrib/openbsm/bin/auditdistd/auditdistd.conf.5 b/contrib/openbsm/bin/auditdistd/auditdistd.conf.5
index 46356df..13abb5a 100644
--- a/contrib/openbsm/bin/auditdistd/auditdistd.conf.5
+++ b/contrib/openbsm/bin/auditdistd/auditdistd.conf.5
@@ -355,7 +355,7 @@ receiver {
.Xr auditdistd 8 .
.Sh AUTHORS
The
-.Nm
-was written by
+.Nm auditdistd
+was developed by
.An Pawel Jakub Dawidek Aq pawel@dawidek.net
under sponsorship of the FreeBSD Foundation.
diff --git a/contrib/openbsm/config/config.h b/contrib/openbsm/config/config.h
index a1eded9..f900b3f 100644
--- a/contrib/openbsm/config/config.h
+++ b/contrib/openbsm/config/config.h
@@ -235,7 +235,7 @@
#define PACKAGE_NAME "OpenBSM"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "OpenBSM 1.2alpha2"
+#define PACKAGE_STRING "OpenBSM 1.2-alpha3"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "openbsm"
@@ -244,7 +244,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.2alpha2"
+#define PACKAGE_VERSION "1.2-alpha3"
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
@@ -280,7 +280,7 @@
#define USE_SYS_ENDIAN_H /**/
/* Version number of package */
-#define VERSION "1.2alpha2"
+#define VERSION "1.2-alpha3"
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
`char[]'. */
diff --git a/contrib/openbsm/configure b/contrib/openbsm/configure
index f1a473e..197a9be 100755
--- a/contrib/openbsm/configure
+++ b/contrib/openbsm/configure
@@ -1,7 +1,7 @@
#! /bin/sh
-# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#62 .
+# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#65 .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for OpenBSM 1.2alpha2.
+# Generated by GNU Autoconf 2.69 for OpenBSM 1.2-alpha3.
#
# Report bugs to <trustedbsd-audit@TrustesdBSD.org>.
#
@@ -591,8 +591,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='OpenBSM'
PACKAGE_TARNAME='openbsm'
-PACKAGE_VERSION='1.2alpha2'
-PACKAGE_STRING='OpenBSM 1.2alpha2'
+PACKAGE_VERSION='1.2-alpha3'
+PACKAGE_STRING='OpenBSM 1.2-alpha3'
PACKAGE_BUGREPORT='trustedbsd-audit@TrustesdBSD.org'
PACKAGE_URL=''
@@ -1327,7 +1327,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures OpenBSM 1.2alpha2 to adapt to many kinds of systems.
+\`configure' configures OpenBSM 1.2-alpha3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1397,7 +1397,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of OpenBSM 1.2alpha2:";;
+ short | recursive ) echo "Configuration of OpenBSM 1.2-alpha3:";;
esac
cat <<\_ACEOF
@@ -1511,7 +1511,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-OpenBSM configure 1.2alpha2
+OpenBSM configure 1.2-alpha3
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1991,7 +1991,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by OpenBSM $as_me 1.2alpha2, which was
+It was created by OpenBSM $as_me 1.2-alpha3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -11552,7 +11552,7 @@ fi
# Define the identity of the package.
PACKAGE=OpenBSM
- VERSION=1.2alpha2
+ VERSION=1.2-alpha3
cat >>confdefs.h <<_ACEOF
@@ -13559,12 +13559,14 @@ int
main ()
{
- bswap16(0);
- bswap32(0);
- bswap64(0);
+ int i;
+
+ i = bswap16(0);
+ i = bswap32(0);
+ i = bswap64(0);
be32enc(NULL, 0);
- htole64(0);
- le64toh(0);
+ i = htole64(0);
+ i = le64toh(0);
;
return 0;
@@ -14172,7 +14174,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by OpenBSM $as_me 1.2alpha2, which was
+This file was extended by OpenBSM $as_me 1.2-alpha3, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14238,7 +14240,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-OpenBSM config.status 1.2alpha2
+OpenBSM config.status 1.2-alpha3
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/contrib/openbsm/configure.ac b/contrib/openbsm/configure.ac
index c8d2d69..d176487 100644
--- a/contrib/openbsm/configure.ac
+++ b/contrib/openbsm/configure.ac
@@ -2,8 +2,8 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([OpenBSM], [1.2alpha2], [trustedbsd-audit@TrustesdBSD.org],[openbsm])
-AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#63 $])
+AC_INIT([OpenBSM], [1.2-alpha3], [trustedbsd-audit@TrustesdBSD.org],[openbsm])
+AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#66 $])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([bin/auditreduce/auditreduce.c])
AC_CONFIG_AUX_DIR(config)
@@ -217,12 +217,14 @@ AC_TRY_LINK([
#endif
#include <stdlib.h>
], [
- bswap16(0);
- bswap32(0);
- bswap64(0);
+ int i;
+
+ i = bswap16(0);
+ i = bswap32(0);
+ i = bswap64(0);
be32enc(NULL, 0);
- htole64(0);
- le64toh(0);
+ i = htole64(0);
+ i = le64toh(0);
], [], [
AC_DEFINE(USE_COMPAT_ENDIAN_ENC_H,, Define if compat/endian_enc.h is required)
AC_MSG_RESULT([using compat/endian_enc.h])
diff --git a/contrib/openbsm/etc/audit_event b/contrib/openbsm/etc/audit_event
index 8b48d66..0350389 100644
--- a/contrib/openbsm/etc/audit_event
+++ b/contrib/openbsm/etc/audit_event
@@ -1,5 +1,5 @@
#
-# $P4: //depot/projects/trustedbsd/openbsm/etc/audit_event#42 $
+# $P4: //depot/projects/trustedbsd/openbsm/etc/audit_event#43 $
# $FreeBSD$
#
# The mapping between event identifiers and values is also hard-coded in
@@ -562,6 +562,7 @@
43198:AUE_PDKILL:pdkill(2):pc
43199:AUE_PDGETPID:pdgetpid(2):pc
43200:AUE_PDWAIT:pdwait(2):pc
+43201:AUE_WAIT6:wait6(2):pc
#
# Solaris userspace events.
#
diff --git a/contrib/openbsm/sys/bsm/audit_kevents.h b/contrib/openbsm/sys/bsm/audit_kevents.h
index db7fc94..94e42ab 100644
--- a/contrib/openbsm/sys/bsm/audit_kevents.h
+++ b/contrib/openbsm/sys/bsm/audit_kevents.h
@@ -26,7 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_kevents.h#9 $
+ * $P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_kevents.h#10 $
*/
#ifndef _BSM_AUDIT_KEVENTS_H_
@@ -601,6 +601,7 @@
#define AUE_PDKILL 43198 /* FreeBSD. */
#define AUE_PDGETPID 43199 /* FreeBSD. */
#define AUE_PDWAIT 43200 /* FreeBSD. */
+#define AUE_WAIT6 43201 /* FreeBSD. */
/*
* Darwin BSM uses a number of AUE_O_* definitions, which are aliased to the
diff --git a/contrib/openbsm/sys/bsm/audit_record.h b/contrib/openbsm/sys/bsm/audit_record.h
index f8dced8..2a49cdc 100644
--- a/contrib/openbsm/sys/bsm/audit_record.h
+++ b/contrib/openbsm/sys/bsm/audit_record.h
@@ -26,7 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_record.h#10 $
+ * $P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_record.h#12 $
*/
#ifndef _BSM_AUDIT_RECORD_H_
@@ -233,6 +233,7 @@ token_t *au_to_ipc_perm(struct ipc_perm *perm);
token_t *au_to_iport(uint16_t iport);
token_t *au_to_opaque(const char *data, uint16_t bytes);
token_t *au_to_path(const char *path);
+token_t *au_to_privset(char *privtypestr, char *privstr);
token_t *au_to_process(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid,
gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid);
token_t *au_to_process32(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid,
@@ -278,6 +279,7 @@ token_t *au_to_exec_env(char **envp);
token_t *au_to_text(const char *text);
token_t *au_to_kevent(struct kevent *kev);
token_t *au_to_trailer(int rec_size);
+token_t *au_to_upriv(char sorf, char *priv);
token_t *au_to_zonename(const char *zonename);
/*
diff --git a/contrib/opie/libmissing/Makefile.in b/contrib/opie/libmissing/Makefile.in
index e4759da..fb3d5b2 100644
--- a/contrib/opie/libmissing/Makefile.in
+++ b/contrib/opie/libmissing/Makefile.in
@@ -22,7 +22,7 @@ TARGET=libmissing.a
all: $(TARGET)
$(TARGET): $(OBJS)
- ar cr $(TARGET) $(OBJS)
+ @AR@ @ARFLAGS@ $(TARGET) $(OBJS)
@RANLIB@ $(TARGET)
clean:
diff --git a/contrib/opie/libopie/Makefile.in b/contrib/opie/libopie/Makefile.in
index dfc1c6f..d35af20 100644
--- a/contrib/opie/libopie/Makefile.in
+++ b/contrib/opie/libopie/Makefile.in
@@ -23,7 +23,7 @@ TARGET=libopie.a
all: $(TARGET)
$(TARGET): $(OBJS)
- ar cr $(TARGET) $(OBJS)
+ @AR@ @ARFLAGS@ $(TARGET) $(OBJS)
@RANLIB@ $(TARGET)
clean:
diff --git a/contrib/sendmail/FREEBSD-upgrade b/contrib/sendmail/FREEBSD-upgrade
index cabeb2e..092148b 100644
--- a/contrib/sendmail/FREEBSD-upgrade
+++ b/contrib/sendmail/FREEBSD-upgrade
@@ -1,24 +1,12 @@
$FreeBSD$
-sendmail 8.14.5
+sendmail 8.14.6
originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/
For the import of sendmail, the following directories were renamed:
sendmail -> src
-For the merge of sendmail, the following files were removed:
-
- Build
- cf/cf/Build
- cf/cf/generic-*.cf
- devtools/*
- doc/op/op.ps
- */Build
- [e-v]*/*.0
- sendmail/makesendmail
- sendmail/sysexits.h
-
Imported using the instructions at:
http://wiki.freebsd.org/SubversionPrimer/VendorImports
@@ -39,9 +27,8 @@ Then merged using:
% svn commit
After importing, bump the version of src/etc/sendmail/freebsd*mc
-so mergemaster will merge /etc/mail/freebsd*cf:
-
- (svn command TBD) cvs commit -f src/etc/sendmail/freebsd*mc
+so mergemaster will merge /etc/mail/freebsd*cf by making a minor
+change and committing.
To make local changes to sendmail, simply patch and commit to the head.
Never make local changes in the vendor area (/vendor/sendmail/).
@@ -57,7 +44,7 @@ infrastructure in FreeBSD:
bin/rmail/Makefile
contrib/sendmail/
etc/Makefile
- etc/defaults/make.conf (RELENG_4)
+ etc/defaults/make.conf (obsolete)
etc/defaults/periodic.conf
etc/defaults/rc.conf
etc/mail/Makefile
@@ -90,7 +77,7 @@ infrastructure in FreeBSD:
share/Makefile
share/doc/smm/Makefile
share/doc/smm/08.sendmailop/Makefile
- share/examples/etc/make.conf (HEAD)
+ share/examples/etc/make.conf
share/man/man5/make.conf.5
share/man/man5/periodic.conf.5
share/man/man5/rc.conf.5
@@ -110,4 +97,4 @@ infrastructure in FreeBSD:
usr.sbin/mailwrapper/Makefile
gshapiro@FreeBSD.org
-13-June-2011
+29-December-2012
diff --git a/contrib/sendmail/LICENSE b/contrib/sendmail/LICENSE
index a0ad124..21e83e5 100644
--- a/contrib/sendmail/LICENSE
+++ b/contrib/sendmail/LICENSE
@@ -35,7 +35,7 @@ each of the following conditions is met:
forth as paragraph 6 below, in the documentation and/or other materials
provided with the distribution. For the purposes of binary distribution
the "Copyright Notice" refers to the following language:
- "Copyright (c) 1998-2010 Sendmail, Inc. All rights reserved."
+ "Copyright (c) 1998-2012 Sendmail, Inc. All rights reserved."
4. Neither the name of Sendmail, Inc. nor the University of California nor
names of their contributors may be used to endorse or promote
@@ -78,4 +78,4 @@ each of the following conditions is met:
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-$Revision: 8.17 $, Last updated $Date: 2010/12/03 01:10:00 $, Document 139848.1
+$Revision: 8.18 $, Last updated $Date: 2012/05/15 21:49:03 $, Document 139848.1
diff --git a/contrib/sendmail/PGPKEYS b/contrib/sendmail/PGPKEYS
index fd6daf8..10bd809 100644
--- a/contrib/sendmail/PGPKEYS
+++ b/contrib/sendmail/PGPKEYS
@@ -142,7 +142,149 @@ gpExpdV7qPrw9k01j5rod5PjZlG8zV0=
-----END PGP PUBLIC KEY BLOCK-----
Type Bits KeyID Created Expires Algorithm Use
-pub 2048 A97884B0 2011-01-04 ------- RSA Sign & Encrypt
+pub 2048 CEEEF43B 2011-12-14 ------- RSA Sign & Encrypt
+fingerprint: CA7A 8F39 A241 9FFF B0A9 AB27 8E5A E9FB CEEE F43B
+uid Sendmail Signing Key/2012 <sendmail@Sendmail.ORG>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.9 (OpenBSD)
+
+mQENBE7pIE8BCACutGAvfg9rwfaVBRb6EKjcWABZUFsLt1yF+hzrhR6llVVAv/P9
+aYiSwJHYUSu/GfZ53HL12NhowhhmjkFt4MeIo67gmVmxlTkMVXrb+TROqr67f3H8
+pM/vCKMnc9iCBNXgv0QjeM4qr8gz+TIroxq3ip3RNcZXOMvSOEmflK3Ts56vhnMK
+nzWMlfIhKXmXG6o57Qb6pwYLcT9Sp1rrJaal/GnkwEScDmFv90jBIk/RWVao1NAG
+8sJruv4kLUTRwwddvd954/cC6S/3F3VNxisVXNEagNTaedTc+pBVXWv9yn2P4Jvm
+gSYzrvq3QP8PH8hJdtiWvgOnm2YkrZ+Xz37TABEBAAG0MVNlbmRtYWlsIFNpZ25p
+bmcgS2V5LzIwMTIgPHNlbmRtYWlsQFNlbmRtYWlsLk9SRz6JATkEEwECACMFAk7p
+IE8CGwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRCOWun7zu70O4MSCACN
+dAjK+prDB6YdIQZdjn1rV0Ba8pWX0PSv2HY7wlduBlec5HOV1s0Yram6yOQwv6Uj
+Ns/3t/7+ikA5/HpvSHo5uuxKLjL+duprCUSQko8XlLVZCiKjpFyD/ZFsCBlbaVCc
+u2OjjJ2Kg1FRwijIJdZfers4fbm9Aa+gLcMqdtmSa+gI7mkpEJJWIz3rPHbIcYPe
+Hy2wMSSpk3eSQtU5JzA18vUhdVujzwcRvs925JOT6g3VZ7Qhf53QSo7IaoPPPEVT
+g3BW3iQKaXz94k4EDhODBL3g2Q7zYOhxceNnL23vNxs+yWPcyg645nrcsfcK9osM
+sHxlsh0zLl8dm6HnkUAxiQEcBBABAgAGBQJO6SCWAAoJEDmkx32peISwEUkH+wXg
+N4/NlcKJwRgmXRqiiADEI8L3otyWI/v2Yp/8nFCyxzhSH8p+4ggDNDgngPHJuV5l
+WGQuGr+UbqDAicIOPeyKD2/EAUFm41aN8ATN/KlAhxeW7iK4LxPWUlPLkfQu1Gng
+dj0vzaYMR7v5B8y3bg0yJCo3PlHIkWmYhEJmv5xajKLMpz3+K6igrjH8GzUfoMp3
+Q6VrIdvVd+E6/wm/qZw3xu0bXclip/YYDxOLvKF/vpVfiHiLpI3lBoGQig1keHOw
+0TD0ol3WwifqarwlMWdaLQCH41CnjMT01mkHd2ew78dAlfNkW4OiHxJd0AcQrqAO
+WgxFMOX9JowFlIeCjoSJARwEEAECAAYFAk7pIK8ACgkQYE378oVBCr4dwAf9GOKz
+d1CAGJgKtu3crfUvS6xBd66pFpsnGOm6xwjG+QSTIIRayev5i50LcYUr2LU0unnS
+ZsSwYQiZ27wC2l3Y4WFVSrViif1x4CoDSM9CGleh8FBdctzeUU9huQmBHftq0Q3j
+WzZSBoiDJBGT/Ug1rKiyN5J5eAufGIkSS/WQGvJaBirL0QtGBWSeHhTjpMKGp/ox
+dJ+zvT2ZsHxsCROaA64jceNQOt+jrTGt043ABxdUaF2Pqr4CC7myRIhrVWlkPfs0
+V1N3SSQJsx8MgWUD5OeJLuQ10HjZ0GgYvofOo+ysG8/SEz3ltwvDwJwkrGsjM8y0
+DFcqosySncFHOcijC4icBBABAgAGBQJO6SC0AAoJEBKJbpunfyQpqX0EAJH2pzz0
+Vp5gGBVhyuJ5NKQe8rC7m6oj4p/2OAVee/+6/3YEA8v6J43iuuoIMhNH8nHGJxhJ
+Xmh5Ho3RVgZE+G/Vyr63JwMZ/tMwaUX+Deh5czKW60A/bpX+CFAU7caqBZhbjNoq
+yVdN/3f356xIJk0CXgCfkYywRg+h+KtwD1xciJwEEAECAAYFAk7pILgACgkQ2Krw
+yvazBykUTAP/R4bhldibVY/6Q8ctxCA3DEnBK0d6qeA1kFydee3cu0fgBqrh70C0
+XFJIhuHW/bdkJdh41XYVWACANBY+1Uvt4GyoE+DB9Z779i2P4JG/bpl67D7/bjLg
+gLuO8zze0NiKlylEWPtO5o1CFGi0O13HbzjF1UxY16OdnKPK1KJA2ZOInAQQAQIA
+BgUCTukguwAKCRCXQwEYcJO4QctmA/0RRMOn5GA88kp70hF29HLMgB5zAw3ZjMC2
+p/pC/SiuPSzh9n8Fkode3qCeQ8Fm7z3UVrywV3373litYMcl+TG6Q3c14qo0BDIT
+H6EZUjP4Msoo2fAkMM6XrBdyLYSCKilJGsqDS25Ox2BuJGKIbMHFnJy4SR5rrIAB
+J1c/PIqNO4icBBABAgAGBQJO6SC/AAoJEB57s8ivlZYlILcD/j9DxcUcJbDeFDxj
+KsuQpN2cWU+KItF6hPWgP+n4VXokPzCWQOxKZ72BoERukQB0zVuogUbFrDwPIVjp
+bNK+n9A/CC+FvfBkm4nMBpnZRFRRaafcT3IwiqmWa21/hzvDqZI50NwBn7ev57sM
+rCtg4n5uiNejGwwTQCgff48bd7aZiJwEEAECAAYFAk7pIMQACgkQcKAkTR75klE/
+8gP9G7BjyxYUDg+2F+GrLQGZEq8ijpMK930o3Vc8O33zhZFQqqCuUX3RRvHSDzqL
+JI/7J5xIiAjWVo/8QyP7HKScLTiBV0r1iB6JTjVy/Y73GvInTi6y6jrlfpqg4lTw
+b375/8ijdG9uCH6go5F0PH1vPI+ibrwgLVgpx552edzRbkaInAQQAQIABgUCTukg
+xwAKCRDI1e0plfYXcVQYA/4svozwEiTmCvNGr22IOMqL1vr12sgzymIeISzjAXeR
+9/kxwyi9Ah5UX4orLwQqXzOB7IZ+SEN4WRo6dCO8QzMG6alx2A+gU/14j0jvPhxk
+jCtO+CBMoMc9lQ0yEpz0XIcO/FGJX3RUex8L4/mYyP4LTijseU8D8F3kqry/Iaxc
+qYicBBABAgAGBQJO6SDKAAoJECGD4bE5bweJAhoEAJYXG6BkWixVK8XZw6oNIs/b
+48oumiCgHxErlaT64QLQ/7qknzmJ+nF3VvkqHqxk0u+zQRf2+oOQlgAnFxwTBvAm
+E5Zf3bzqOGcq2aKyQpyaOi40+lIZTV3mpjB4fRtWCiF52TVdh8dtZ156CkjpOupb
+g7sKqV0h79X+x1FhiukYiJwEEAECAAYFAk7pINYACgkQiWliuGeMCgOx7wP9GXqz
+C9Q2JhgNA/jig8SqtIn2EVHqtvNv5OYuxrgh6Xiy/5ZoBfghDfZP46cffsSUFrI6
+QI17QEg9t0rUIdipXRn7S7sUfz99lKGqKMszCqvECdnfuwnsYBO73XF89MDgIAH8
+Clm06seRjSPwqxOY2BU9egBHsWg7sIEqbQCGY1iInAQQAQIABgUCTukg2QAKCRA4
+IttHzDdPLfRuA/40Mk8Q6uw8IfWxNZh9q/tOMIo2Qzy0QIpTx5CyuuzlA9qUgZ8f
+NpT9S7z78WLj+TuWoHrtFVRZaDkbMafT9VLDMPdveI62FI2z2mCaBHFGr3kOPo04
+xrRvwgdMCgbm/63fJl5264xfjS3b/iuNGAgOOcMPnV4WWdhBTmtTUXHVMoicBBAB
+AgAGBQJO6SDcAAoJEJwcveLjXFY1bVsD/1FkSDWMeet7ZGjLplUHbyudbTqqq2Lk
+tpBhOHANXvffJSLHVIcPiEIkUCtyCW1jsAWbNH5th/e08aNjNuHnA9sfoG+stlNc
+9pAyd2c8MMXpe4DP1osggEKLSCJf7u3xU7SUsM86n5r9s4pNiZldWmMqYKkWOtyk
+6HOWyaVeK7k4iJwEEAECAAYFAk7pIN8ACgkQb1KT2KObplUSQAQAqcAwuZnx+uZW
+pKiT/FYUs/vCC3XFrnJ0iK/Sv6ScQiDZ8cdTk96ipCSEpV1i7iaTDK5PhpNhP9p6
+HQgyWme/w0I3s4g//3SYH9fmSAjm9m/U8v3tJjs/mRQIr3HUXck3K7oC71jANnhH
+A0xlM2eT76EvN0ShnuZ0Ph5GL4umk/aInAQQAQIABgUCTukg4wAKCRDvWJZk1DLh
+nSDQA/9pE5yzmw/S5hPN2n1u8CpWtyi1cDT0rmEe5Oc2cmcgNj++rMi6hOtUKnoM
+y1A3GTkLiVnx9BhOAW4xGANRBTsuPfM7QOxBZKmDSsiH4Mgy+olbfW55Kgj1R4jF
+bFOj8vDrS6toBUeFDA0WB6kHCjhhkE+xLypYN+xTQGrTeLsMKoicBBABAgAGBQJO
+6SDmAAoJEMGcHSUS00YdIqYD/2mady6csrrS2myjDkom+r5P/LvA8fsGI5MyCRhQ
+Rv1eRL0QFgbnl0dWw4Q1AKAl3XB9GTYssWk7orbgxrO+4ciWIjC2Btnkq1hZtc5C
+boXvQXbX5vzW7xat7twh2lkhUi46x+qrIHrQ3vR3D9EbsuPDlxDqTg4v/u39xmFo
+yFabiJwEEAECAAYFAk7pIOkACgkQwCnKQBb0zOlxWwP/SNfpUlVER1Rj2uoy24J/
+7k26lBxc84uqVRq+fowz7EYB/knQ+aL40AUsypXpSnJesDjAmx2Eyuz2nBuFjws7
+UZt8v6ALFJbLP3MFrfeM/mD2hijGOeVuGsord4OaAZ/9isuToMZijcOW2Fgdyc7c
+HYPikO6FtNswXuKea2e4numIRgQQEQIABgUCTuo/DwAKCRAY9QOAJMJ4Amt/AKDv
+QsB9bhJOfhCzMonD4LYq3bpmHgCgoW9RYrPyb7iSD1tHx0hM4n0sA6CInAQQAQIA
+BgUCTuo/FgAKCRB8S2dtoA4VY0gwA/9LI9Kf/eXItmItIoCO51KmeG3w+twehwUp
+Mgc3RI5hxF0J11nSRInuwKS5hC6jO8QnpWMjrL57JmwK+VTjJje+zjigt3tJVO+Q
+rFdOE5Atla4yChjsXn++ffEI92ZFIhalYEEs5bWzOrBjcOQOkkZz84G3rHRbG49d
+m2N8iY9ndoicBBABAgAGBQJO6j8aAAoJENbgof5PvirdNqgEAK2oImfkowMelxfb
+WTLvHx2yX0vN56fpLgjAsZIcLKUJ8N9fm95vpG0Zz2J/KyXphTlcsJO/Hm+oHeos
+7mx/9MjXsO+tmDmU7kI+0PFxWmucZR6wBoMbPmZtuC/GqIk9wFeKGtkEgr2+En10
+hChgGqIvE5LsmlVfaD2R8jFNs2jOiEYEEBECAAYFAk7qPx8ACgkQIfnFvPdqm/U5
+AgCgxe+sFly6JTaO1N2EwjLVxI8ErvYAnAj8lhOAkBEqnzVpeSt8mNw+sywFiEYE
+EBECAAYFAk7qTvMACgkQCaeiStHlggd6IgCcCK5KjbY2e72mtDMne6VQwr2F/sAA
+n3hBsophnhJjLGxEfblJc0XihWcriJwEEAECAAYFAk7qXhgACgkQzx61AyIyegE+
++gP/blnJpgybp/4Swsrfqw5jnBzFzyvyOkQ2stAtmyCiEYJLhDQDZIYIc5viy4ay
+i5D6f4yAUUaA5/V4dWGv1aEDiO27GU5tzUuUnBmzz6KJcAN0kmkiSG4eMwdAcspI
+zZbGI16OpZVhO2N762Qfhf9yi6VQy7v5/b7FCqoHP1uAG3iInAQQAQIABgUCTutf
+5gAKCRBfHshviAyeVTu8A/9rWm+tqZTM2Nb5lWh4H8XAYXH24TdXY3dWpEIFYy8r
+vudLF/RhIx6UzMwMDiN7NEnb93ota78HQf6uRVIHBkCR8oHzhR7TCrSEC59IKGXL
+IONCbF9IQOR+Yc0rT/Gz3lN53flSorhs6LIfXDLiiGmlOi13BIEhDbJ2f1ZZyiR5
+gYkCHAQQAQIABgUCTuyeYAAKCRBQg+yIQOhvcUvTD/9RagF2zavJM9PX2aQ6C/s7
+BcjF77n1Vt++H4NJ6wpAkVxlfY1v+y8b21F668R9DhFYNLepSvrasDgc8XAdnn9H
+l/Mn66YVFyUDOYoTr96b/zk+GnBYPcFso/XkIBgmSOfNNs6n0WweR8QfDY4q0yHT
+2nUSUGre0Hxs4awA1/dMHlAumSS4p7nqc7+q3b7LXKaxqGUVoShsokoYF+bsj1X+
+dI7c9R3kt2LmVtof0POn1P9sNf/FZrE/eKDYP8wYyJhhonMZAnlbWHxxMJJevXdQ
+Bk6HF9UMx7R7a0cctZJQ013BIejGLZmR7kPZhLAyQabp6ILqJzNO3W+ckk+y6Z6/
+sqnC9bSEw21TDgk3q4+1wD/0Dqt+pddRtNyag1Ru3zFRYS6ok6g6smlrp/RVbpVg
+cdXWps39LX7+UI8XoUyNQgxIYQ2xd0eMpFtFrgLAllIU7cCpD6w7Q7B+/C4ZwjCn
+/Yt5jAtMsOJ121kfuUIAC4vnNwRYn0iGmkN86Ti7PSdR4rbn/5SpIU/FUUYwFNln
+Jwy0As/+DhuBXmtEdb/AMvI2n3P1rrTvcEYycfCqAXGNO98i8jCSVOzjml3PTQfz
+chhe8F74q/L3iOzFaS7FC2t/bZ9FaCWYJzMH6blSZ+yPK5x5KxedfQJo32c1oXnM
+N7BO+MXyq4iTddCaRuIIYohGBBARAgAGBQJO6l4HAAoJEDEZgFHPGk0sYBMAoPhW
+UodY6dFC+jbfua4wCm0SDxibAJ9cH0ocPU84mrTJUls6/05f5wKhiYkCHAQQAQIA
+BgUCTvCQGAAKCRBvD514lfyZ1JLkEACODPksw2LebOLPjzqnEihvaf4FUHwSKYQ6
+VSn6ojZdNz2L1FJK1qTBEsFXfmqe5GiweVKk1N+AeTHFYXKoSmBfU4SgAOT3Q6ti
+UHtyKuJhhzANUe0RjFT/LA1c2fOZrJYWkavqusA1nmOy6/AeCMjg44QIiSEF5ALJ
+UYZp4npkU8nzAatdzMMVseKEDqKrUfSe+YC9N/P6yCxLdYYidlyg4MYsNBT+f4kl
+mpJJk+RVi3AHKH5a+QShFJZMfHD6/rd2yOEq2DFAIO/wPIi4Emq1O96g4FBfwD9r
+6FyTqiNcz8Y1SJsVa+1ScSDBlM5JcOWKj+JCoox6a5qjyr34i4o/TNOesEVtXVVw
+bvSoikA2sQb5aVVTw0r0rGTy2V5ksN8rTXD8n5mGOKSVwQ88crHUI2JZkXapvWp3
+/jmwHUhjCZxBnOUUtnsILV7gB8ohCxLaTu2pt1obbHH8DPZ3kHBA6rrmyvyBM22U
+Xmx92/XjbtrTHGUzdzGrxrxZHISwaFtneVCCAHhTYgESzwNZr61rA6DrCn3mRR9N
+JuwZvhC0u42kGkC2ulEoAu/OgFjarmu/6dbgwYfvLAi3y7BAL+otrjjq5cJB8oQj
+C80N1LqLuWfsatMOlgk1annhh/i5RdXiOmlg1WbW9zh9jRM1Sha7d7BlkoJ2LJzQ
+ySc/sELhHIkBIgQTAQIADAUCTwWTigWDB4YfgAAKCRDvHmkz/z+rnHJyCACaELza
+3TxkZtLhZlJxxorWt/AHZS2Uui5BRU36+A7plALIdgIqH7cah47EK/kG/AJH9uiX
+Zd0cBM/QaigfSBVPdk+s9WBn1A9c7zAbUG5/VbR975g5txMhA5SC4LTVRIsw0Lau
+tFHnlWSXs3ga/11oxEsOvplayFeNDDlZHo7bqNsKmL7PjbAqKola3zSy+/ARIQ4P
+UpDEyAgUp/OAP0qZarzCQnZY884dzXcXMbaoyyYa8D2cDrrHFDAh5nlcv0jpRvGK
+ze6i1ONwoW77QajoaJaRE3DPSG3LahFSeZassN4540cA7r6oS3q1fUkL6yfbFbN2
+8tTIWWWkYsFtZT0TuQENBE7pIE8BCADSaPflswYkibLPKss2XiKNpvBF66rDLuv7
+Y2dIRic38H0gVjBeFbGowesobgnKgTIe+zFtAzS1tw170Gp5osZNg1fLhXZezA02
+wbBuPZ7QIh1/Kxum9mP1uiB7ZYx3cu48zB3Ajf3GjGdsn7o92gXx1P+y71N6QZ1g
+PtK2Wi871zT+J236LZUPhHfdG9zxsYKcGbPHWDI7iVlIl3/IU1kmQAjX74hbdLMN
+erE5kEHfYqwQRBXUx299e4kjYWmPQcQqCOiWve016KwyJ19FzYcJM3PbRf/UO0aX
++KoYEkQqDqj4UHJpL9V5/8I6evI5Bx6I+e0GC4RxXyYN+2XL+MHFABEBAAGJAR8E
+GAECAAkFAk7pIE8CGwwACgkQjlrp+87u9DsU7ggAkJ24CSgtqc2pWnQFGHAiyFHS
+iYfaGQbg1evtI7nLtk4Wyskabu3FRQRyFGxOUSoBx9H6MlBlbxjRrQljKU7b6WCy
+DSUcKW6IfcvKP5NXqArDnnBf1J454DRzip33CW3vKUROvgWPcxi+2wdj2yXcqM23
+nG/2klg4JJHEsvKH89fuu5wMf/gE/7opVpxm3G2tQw51rb0oNyCrReDHUnlvnWsZ
++7BKywQ6vFb9LrCWmnwuqOLkFqNQo4XB0HcHjGa3AY4+y/RXNuWNcL886FwD6R5G
+qrpfZZmSAqWA5sdTeBXeJTOCvPrRgvDQod1kpyVNQHn0VFR4dT8XDGk2TBgmtA==
+=qHzF
+-----END PGP PUBLIC KEY BLOCK-----
+
+Type Bits KeyID Created Expires Algorithm Use
+pub 2048 A97884B0 2011-01-04 ------- RSA Sign & Encrypt
fingerprint: 5872 6218 A913 400D E660 3601 39A4 C77D A978 84B0
uid Sendmail Signing Key/2011 <sendmail@Sendmail.ORG>
@@ -251,7 +393,7 @@ KH6d5q94eHcPD56A4cYD275DIZzAYqRpwzmB9O845HrHAPmQ
-----END PGP PUBLIC KEY BLOCK-----
Type Bits KeyID Created Expires Algorithm Use
-pub 2048 85410ABE 2010-02-19 ------- RSA Sign
+pub 2048 85410ABE 2010-02-19 ------- RSA Sign
fingerprint: B175 9644 5303 5DCE DD7B E919 604D FBF2 8541 0ABE
uid Sendmail Signing Key/2010 <sendmail@Sendmail.ORG>
@@ -1453,13 +1595,79 @@ aBteGdu18ACeNXYmxUhQN/ogZuSaBhd/51aBD8SIRgQQEQIABgUCP9X7SwAKCRCk
-----END PGP PUBLIC KEY BLOCK-----
Type Bits KeyID Created Expires Algorithm Use
+pub 2048 0x0C8B8333 2011-12-14 ---------- RSA Sign & Encrypt
+f20 Fingerprint20 = B080 979F 4D04 3E19 D05A 369C 629E F8EE 0C8B 8333
+sub 2048 0x6763ED11 2011-12-14 ---------- RSA
+uid Sendmail, Inc. Security Officer <security-officer@sendmail.com>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.11 (Darwin)
+
+mQENBE7o89QBCADOc3//yYNlUk1zTEPaiskclluwz6o+kkKp+k2x/rGYm+UYHMl1
+w5B1sLs3greR7eGNBmE3Eftr94v/YZrDqcq4mBzQL4qoS+4Bvrjl9GEbAc7Ke08s
+ZG0QC5en6mdn0QY3ZSb98GTlImPjiGC0tVCBylJLeyvBSgUTSkkLmp4lsmH6aa2G
+IhTatCIV7I/mAB2lM/KyfwmTf2/q8GsyszC4dwVRUSwfkQDfS+dxc60Krf8GNDsj
+bPolwAQi+YWMb6renYV2pNA7n9A5nKAE0oq9pe43fv9Pvek+07JJ3YnP0nS2yS4P
+PVewsRhEYllEYSmYmEwwCb0682A3HIVZWkalABEBAAG0P1NlbmRtYWlsLCBJbmMu
+IFNlY3VyaXR5IE9mZmljZXIgPHNlY3VyaXR5LW9mZmljZXJAc2VuZG1haWwuY29t
+PokBOQQTAQIAIwUCTujz1AIbAwcLCQgHAwIBBhUIAgkKCwQWAgMBAh4BAheAAAoJ
+EGKe+O4Mi4Mz80MH/0h6qv/sca1mTjy8vYSRYZiIWyYXpuHFUlr31+wF3cBmwCI1
+4qHoRI6MWj4JBnwQq2bAzglgY7GvXXn6TYEFju3gCs6hlvlE8/1z7+Ku/LVsyiCh
+3T8tVAxBVeEandnJJgmOP7/dbLBq22/WI7tNi4UOmnqx9n2e2HpBSKk82a2+Z2Mi
+9yI6StgTn1osKWTXxyauVJkNKnsoOm/pfH0aR2BbK4K+XtW8B55diGmgKn7o5dN+
+2A+tHqPeioTRgTnzywoSniQ2qOkODKjpNr8UVPVOUFHcO4upT6CQa2hijp3f57ns
+GAJs9m/JJDSd8l98nbQZP7G4nZY6RK/NIEkWhECInAQQAQIABgUCTuj0XAAKCRDA
+KcpAFvTM6fG9A/9Z9GL5OlfyBYP7XKzFadtg7MReYdcA67DiYpkmiIKnJPSN0X4v
+H6Qr/mIjisAGm16UIMQTAIUPJCOm2et+55AA5INWiWrU4TKuCfOUJABMbdyvh5vI
+HmBmXdmVartyZj99fCDWOwai1cpm+KQMWvO6FDopPAN+3xJiumIQ6KfO0YkBHAQQ
+AQIABgUCTuj0fwAKCRA5pMd9qXiEsL51B/0QR4xgoCCaTzTYKTDYwNanLBa+J+Gm
+wO7qU6jK6nnLT1TNyMoElCziVh+rGLELD3Nfw64p0ZG8F4bIJhVLTCpipmXsXnGj
+86FrPXV2l/jglNIRv7CD12dBKuYN9AkGJz1Wt6NnaENu9GBciUyIkpVCpSEYTgD2
+jRhkyCqqOSGVj93ze39VPzw6xAGUEQl7+uVUm09lkONDHq4TDr3QcdpyfwntYKib
+DfbwmamVwYias6cMxjxT9GPH2Fu0LF9564CGxW3/AUbr9s/Ze85cysAo9JrIHzAL
+M9akedEg9Y/VVKH3d634OOXqRuddPjajDcohRZSg9PSrXRquvONR7LjIiJwEEAEC
+AAYFAk7pOe0ACgkQzx61AyIyegG9DgQAs6RL4lY2LGaSWrMIHMmsHXEkUT4SNP9n
+J8YFAqzhR88dEMC7s6OeCVGniAPnou07pHAez+hNqOvvqJ0HSsJAMaH7IaQKGvCM
+6+/VDTBnOJz56r2yVlWqbeTwGKuwwK+nIn4Pdm1DogsN3YMsdfbP4gCcK86mCMef
+aEbs75MGJOKIRgQQEQIABgUCTuo+sQAKCRAY9QOAJMJ4Ap/6AJ0W+lZpo0/ttlwI
+CCfzyaABwLCRggCg3lKOKjbw52dM/fGQkuVv6VX/OrGInAQQAQIABgUCTuo+uwAK
+CRB8S2dtoA4VYwPBA/9A7rXUPQep6yGORpF6KbIGUMNeotPkZp0FES5XbnGFAPJl
+P6qUDbM9sPyupk3b+askqHanusmMXQsyKcbTsFzLgoRPU8gjkquEhrwnpWAOz85N
+vvHNCNSo7U6Qnyo8B42wXOtumaOTWpko2PC/SkGh4dYA6J2LEftmkVRqZgA6xIic
+BBABAgAGBQJO6j7CAAoJENbgof5PvirdnkQD/i8GBLaY97zgOXuoilxq3mQK0cn6
+TWIorrG2J9f1JZGZX6K3mv2G3KsjGs4cXzaFkp2hgD9yqTO/+BBQg0+OiCNxvs+l
+zrkP7yIXk7uiUxMMHkXaKwxDUuQbf4V72LJqr5eLZiWNwuWJ2VdsVYoS9/gT4enw
+YkZr2hdH/07k4TpDiEYEEBECAAYFAk7qPsgACgkQIfnFvPdqm/XkBQCgjDEuvinF
+5lcGIWrERV4wqrgF+JMAoNbS0PaMoXJrVZYHIHhKxHABLP1ZiQEcBBABAgAGBQJO
+6j7NAAoJEI5a6fvO7vQ7g8QIAI9j2FkhUN7J6Wk42i/z9vSXCcbXwOnntq8awUz+
+se7Bw1eSLmJs3oxWlL2vhHJVEbvNejh1lReRKDHb6vXZ+YkN/f8TXsj/q+mbCHe9
+NisN5a3BTawAgzVE/E3XvGneQVY1cgC8As8ZoYfRRTdtsEHdicYoCjHWMw1LXfo3
++hBMsQNvsU1tuPQXjU/qsalfP9qRJe9OVNLo3fkxFSAcalNibB5PS86tyAes+T0k
+/5LT30nbeX6ZfY98qDIoRGj7dBWpu73oi4aS713iy0AIyy/Kip5AERtGv+B0llTC
+Y21AY0K2JXJGAS7IfVw2BrvbBZevzXe0AursqiLGMZ9Nokm5AQ0ETujz1AEIAM++
+iXuJkoVVvgEb7gxUbJurVDaedOjKVM2pHLuOorQBYI+gQYOZh+r7ZX3PpIGyoLWZ
+dlpwEhrEsd/2+TY3nMPzkcfW1D+wkP6MIuD+Y8y1efNeBC7IzNnS5gG3+IItgzEX
+Fuql/MMkwQ2xOybYvjzFB5I5cWEkGv1S2xp6uQvIhlD5bWT9R8/1A+9ZZYcP2Ozq
+IWQKeBljDEolz7rTd04UgfQK6ROMNYQghTwWZxmBjsdBa7jtWlfjssqngLiuxP5N
+XQVwN/vUEbryMfNNS4Stz7/ZrbCwtu9bHfx7sLn7fpcgJso14e42+PAXfnuoXtGm
+32o4yUdJPMqwFIMnLS8AEQEAAYkBHwQYAQIACQUCTujz1AIbDAAKCRBinvjuDIuD
+MxdPB/91RSXgG8IQDsOroKYNiZbeEHC75vxP3Rl0XOxU3IsN0mzz4ZjS7khLC1Pa
+ATCIkx3GwNTjvJkiePpc4knc3ZlKx9fKJz0a+pt0ideMmzYwdcX3enG+Z6z0hEL3
+GJzNC6v7WnV0DsSp7hcT8l9hnqY6HkV497jJG8ztGK3KH943/6YL90RlXqaoRTgq
++bSXhbxHueImhjyYUrmJFTZ0ElSAcuVtJpCHnAEouTQAtshzyUnDXwgoQk9extth
+Sn/xUlHB9VGWBAXlq6qJcx2jqWGrmRfz8gMBAwfLTUyNNeixt3TReTtos/HaZK3X
+G09zJuZGoDdC9KhhogEVj4Ow+ydV
+=qF87
+-----END PGP PUBLIC KEY BLOCK-----
+
+Type Bits KeyID Created Expires Algorithm Use
pub 1024 0xA0F8AA0C 2006-03-17 ---------- DSA Sign & Encrypt
f20 Fingerprint20 = 770E 4AC8 8A97 B69E 6E75 0605 1043 2518 A0F8 AA0C
sub 2048 0x6E613854 2006-03-17 ---------- Diffie-Hellman
-uid Sendmail, Inc. Security Officer <security-officer@sendmail.com>
+uid Sendmail, Inc. Security Officer <security-officer@sendmail.com> [REVOKED]
-----BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.2.4 (Darwin)
+Version: GnuPG v1.4.11 (Darwin)
mQGiBEQbQzgRBAC7QmIW2r0oJ9Ixk1ewPxfwN1CU15k2ORBzRVIcO1UcLm6I5t3Z
Gorbj22J8xNyY67yQ3pi5O+pffl5LujEKTco3D3sHhHnpz8vIaBiLyVUG3dCHZwU
@@ -1469,42 +1677,50 @@ LuhwZsvHbzie42JoroT/WI713JU3z1LrcwBYPxQGgVXlsyQi1ilJmd/JCsp9SpFN
kqbog8zz7lZKD7PwRIduicPlXVft063DbABwTIi7YGv8xFnLt9vIix2gSco766KY
rjPOA/9dlGIXq2HP6BGqYtZE6A6RwL2ujAXfene8hYLaMg8t52XyHvJDeay3siKy
EhXt2tn+CyheTzKHXE7WdYGVIZq8OUBoJy/6eaL/paVbzw0SlhCuXNEP6J8SQClA
-rXDAwbl2SODl9T9eVUUbm7bQxdD942qCv+jhvBzAJrrHmZ0KPbQ/U2VuZG1haWws
-IEluYy4gU2VjdXJpdHkgT2ZmaWNlciA8c2VjdXJpdHktb2ZmaWNlckBzZW5kbWFp
-bC5jb20+iGEEExECACEFAkQbQzgCGwMHCwkIBwMCAQQVAggDBBYCAwECHgECF4AA
-CgkQEEMlGKD4qgwt0QCdHD2sFnc1cKILKClUR2Ad3x+OyysAoMTKNOPxq/burquo
-qt0rN8QnPkctiEYEEBECAAYFAkQbS9wACgkQGPUDgCTCeAKDiwCfae3NkBOnjSBa
-6E6ftmrDbzQYC9YAoN2Z8jaq1kM2pXmC0s/QTIIsPc3iiJwEEAECAAYFAkQbS+sA
-CgkQfEtnbaAOFWNKEQQAgIKzIX/EvAj4BaG13i3EYdvcSG0mfYsV4NVIdrDPnV3U
-mgbGBskgjkUyWHlUTJZ/AExcYyuTQNuivkH8pQKsXNUpm020PXvJg7t0/ZKTTv0t
-Xyz2OT3OLKhw1O+qUOOrkxgSpfg7UgQLTbZ0Ol1faP8iSTM5649rAOpqbPi8tneI
-nAQQAQIABgUCRBtL9QAKCRDAKcpAFvTM6cCsA/45MgCAYIr08/GKnFlBTZhAXQ6p
-ZvV4OCdtgMIwcJXJtB2E+HSjOsn9Ismyy9n19Z5j961oGwyfZ/uYoRp1Q5rMEs/s
-DmFyq0TAl3vRoblwuOKtOp2bvGah/TzdkMztMrftErM9MhddQDEIoS3PQ0QkSODR
-Ci/m8eMtGLPX/m+Fu4icBBABAgAGBQJEG0wEAAoJENbgof5PvirdmR0EAJNHIszZ
-ZnGx7jqUB2+tRLCsLctrm8Hpeltc2XkMeT0nx3K8XSDs/cigdQqTHq5oD2P/6Vp9
-e8X2UE/RfEhCDre9ADnSWzqASRtXktDVnFZZHuYnXl1d74bqS5RlWpbQUJ5VjAFu
-ZaB1nhFRcRWuhl8UIqN9OKygtUAgzlR/FfiziEYEEBECAAYFAkQbTBwACgkQIfnF
-vPdqm/XFxgCg8x357MlaxcLbnsbKZFN26nLDBqQAnAxqbkNoRKqF+IRV9aMBz0vS
-t+baiJwEEAECAAYFAkQbTCgACgkQHnuzyK+VliXMAAP+NGQ+3rPnGHUyT02C5K9k
-suqWt+7q0ZWHR3NP66H1XQCqrEUXqmcWtZpd0xTY8XWcyEzYntXje3epQMnA6/52
-ohFNehiGQG4FENsusTzu7+GNdpSqYTPcdUrUp6zOc3o5C30q+Y1tvBtyYlfeQSvH
-3x47Ai8PrnVmHjJCltkGtgiIRgQTEQIABgUCRBtU7QAKCRAxGYBRzxpNLE6WAKCA
-CCj678P/8pn+vG9JpgQWQgV7zgCfQ5409UHS5itySiyQ/atuUOAG0Qi5Ag0ERBtD
-ThAIALL0nX9pRt5NDqi0wk1RIXAGPJCahPJ8h52CgAJUm/FAsmXdCIVHavpDKkHg
-vcF7dixtm+8Jo4vhakQol7XZZgU5BETcSgBjNcwBJhFxAuB+Km/TtiXMK5U+36NG
-SUS5EqR89vBiChth33KMvQZgQ/OfpmWk05lMhI0//o1sX+0QAGTbO9q7RGMf77V4
-CHJxLTU5ZYguSa+ILV9Gg4+KSLGHqk03LROn13K0cTEeWHWKRcoFtLrokmYqDd+F
-qYaATa+SVCeS8PYDQ45R1ZaXJ7N15fRg0XM4pKsY4KAEUH5Y1ZfadPFd0LyDf1vh
-yseogJQpJczvstUARjOQx7yD8J8AAwUH/19Tgj/HYEyBXKX9Awnb3nZWYGap3m25
-iA/bW//uUWKjYrc5oIT/qJ5QMcSBmyOAuclrf/VGSYQIRAOlpXmZQcjdnUuVDliS
-wP77T4duMkfNiNgq8RAnM7cVUEJplbtGI5EapHFO8q88yq2ol8/urZIz5Qc3Va6H
-LelvW1zhFAcp7lJRfuLAWq8Qa6f3Pm2uzScdaQIYrS+vmXXwbOqlygucnI8bBh0L
-YTAjQqsG8YHklvXlrjfEjSas3l5UO45a48DWiSTXGyr5TsevSgfR6yabSHa8nUKO
-gbGF4UU1f1Nn2xaasMRMiZER2uIo2Gs1zPwLleRwwVAjaUOWwRupx/6ISQQYEQIA
-CQUCRBtDTgIbDAAKCRAQQyUYoPiqDP5SAJ4i92Z+F9bPVoX27UZS8xcmFOaxwQCg
-3plWjAkK4jGDVnkcVv2eMGfTP20=
-=Ylc5
+rXDAwbl2SODl9T9eVUUbm7bQxdD942qCv+jhvBzAJrrHmZ0KPYhJBCARAgAJBQJE
+G1GyAh0DAAoJEBBDJRig+KoM86gAmgNUdUqrkiyji3OrzgzJOvvvGgPJAJ9mbH/M
+PYHevtf0D4/YGAWDKIEkNrQ/U2VuZG1haWwsIEluYy4gU2VjdXJpdHkgT2ZmaWNl
+ciA8c2VjdXJpdHktb2ZmaWNlckBzZW5kbWFpbC5jb20+iGEEExECACEFAkQbQzgC
+GwMHCwkIBwMCAQQVAggDBBYCAwECHgECF4AACgkQEEMlGKD4qgwt0QCdHD2sFnc1
+cKILKClUR2Ad3x+OyysAoMTKNOPxq/burquoqt0rN8QnPkctiEYEEBECAAYFAkQb
+S9wACgkQGPUDgCTCeAKDiwCfae3NkBOnjSBa6E6ftmrDbzQYC9YAoN2Z8jaq1kM2
+pXmC0s/QTIIsPc3iiJwEEAECAAYFAkQbS+sACgkQfEtnbaAOFWNKEQQAgIKzIX/E
+vAj4BaG13i3EYdvcSG0mfYsV4NVIdrDPnV3UmgbGBskgjkUyWHlUTJZ/AExcYyuT
+QNuivkH8pQKsXNUpm020PXvJg7t0/ZKTTv0tXyz2OT3OLKhw1O+qUOOrkxgSpfg7
+UgQLTbZ0Ol1faP8iSTM5649rAOpqbPi8tneInAQQAQIABgUCRBtL9QAKCRDAKcpA
+FvTM6cCsA/45MgCAYIr08/GKnFlBTZhAXQ6pZvV4OCdtgMIwcJXJtB2E+HSjOsn9
+Ismyy9n19Z5j961oGwyfZ/uYoRp1Q5rMEs/sDmFyq0TAl3vRoblwuOKtOp2bvGah
+/TzdkMztMrftErM9MhddQDEIoS3PQ0QkSODRCi/m8eMtGLPX/m+Fu4icBBABAgAG
+BQJEG0wEAAoJENbgof5PvirdmR0EAJNHIszZZnGx7jqUB2+tRLCsLctrm8Hpeltc
+2XkMeT0nx3K8XSDs/cigdQqTHq5oD2P/6Vp9e8X2UE/RfEhCDre9ADnSWzqASRtX
+ktDVnFZZHuYnXl1d74bqS5RlWpbQUJ5VjAFuZaB1nhFRcRWuhl8UIqN9OKygtUAg
+zlR/FfiziEYEEBECAAYFAkQbTBwACgkQIfnFvPdqm/XFxgCg8x357MlaxcLbnsbK
+ZFN26nLDBqQAnAxqbkNoRKqF+IRV9aMBz0vSt+baiJwEEAECAAYFAkQbTCgACgkQ
+HnuzyK+VliXMAAP+NGQ+3rPnGHUyT02C5K9ksuqWt+7q0ZWHR3NP66H1XQCqrEUX
+qmcWtZpd0xTY8XWcyEzYntXje3epQMnA6/52ohFNehiGQG4FENsusTzu7+GNdpSq
+YTPcdUrUp6zOc3o5C30q+Y1tvBtyYlfeQSvH3x47Ai8PrnVmHjJCltkGtgiIRgQT
+EQIABgUCRBtU7QAKCRAxGYBRzxpNLE6WAKCACCj678P/8pn+vG9JpgQWQgV7zgCf
+Q5409UHS5itySiyQ/atuUOAG0QiJASIEEAECAAwFAko7qxAFAwASdQAACgkQlxC4
+m8pXrXxfsAf+LBylo0S6W+hExP3s9jso7TJTM4hJGrVjRKZpVF/zj5Qk0Nocxo4D
+YitmT08e+iBZerO7OcYvy16uiaTBQ2PCSYoLhen2AMjkKp7EPG+TF1VBrp7jj5aZ
+GYROu8NZTKr28rCL8a2Ge+KrohjEeIJ80IZo7gSZRprQnO5LzDtBMp2T4HV6Gj4d
+g2aa4tDhTj2EiU3ZOQ/A9AbOYBKAqipxXdBR20HdeJU8looTv5p7jZloawgblXqv
+bvvSBXYGT7uJjx7tOl6yxPrjuu82PyauHI6bUUbrJcvuk9zd3mrvyS9OL9pTeR2A
+VDK3PfX3g9z0OzR7owHZT627T36Jogult7kCDQREG0NOEAgAsvSdf2lG3k0OqLTC
+TVEhcAY8kJqE8nyHnYKAAlSb8UCyZd0IhUdq+kMqQeC9wXt2LG2b7wmji+FqRCiX
+tdlmBTkERNxKAGM1zAEmEXEC4H4qb9O2JcwrlT7fo0ZJRLkSpHz28GIKG2Hfcoy9
+BmBD85+mZaTTmUyEjT/+jWxf7RAAZNs72rtEYx/vtXgIcnEtNTlliC5Jr4gtX0aD
+j4pIsYeqTTctE6fXcrRxMR5YdYpFygW0uuiSZioN34WphoBNr5JUJ5Lw9gNDjlHV
+lpcns3Xl9GDRczikqxjgoARQfljVl9p08V3QvIN/W+HKx6iAlCklzO+y1QBGM5DH
+vIPwnwADBQf/X1OCP8dgTIFcpf0DCdvedlZgZqnebbmID9tb/+5RYqNitzmghP+o
+nlAxxIGbI4C5yWt/9UZJhAhEA6WleZlByN2dS5UOWJLA/vtPh24yR82I2CrxECcz
+txVQQmmVu0YjkRqkcU7yrzzKraiXz+6tkjPlBzdVroct6W9bXOEUBynuUlF+4sBa
+rxBrp/c+ba7NJx1pAhitL6+ZdfBs6qXKC5ycjxsGHQthMCNCqwbxgeSW9eWuN8SN
+JqzeXlQ7jlrjwNaJJNcbKvlOx69KB9HrJptIdrydQo6BsYXhRTV/U2fbFpqwxEyJ
+kRHa4ijYazXM/AuV5HDBUCNpQ5bBG6nH/ohJBBgRAgAJBQJEG0NOAhsMAAoJEBBD
+JRig+KoM/lIAniL3Zn4X1s9WhfbtRlLzFyYU5rHBAKDemVaMCQriMYNWeRxW/Z4w
+Z9M/bQ==
+=nJIt
-----END PGP PUBLIC KEY BLOCK-----
Type Bits KeyID Created Expires Algorithm Use
@@ -2082,4 +2298,4 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJCyc=
=nES8
-----END PGP PUBLIC KEY BLOCK-----
-$Revision: 8.36 $, Last updated $Date: 2011/01/28 21:17:54 $
+$Revision: 8.40 $, Last updated $Date: 2012/01/09 04:44:59 $
diff --git a/contrib/sendmail/RELEASE_NOTES b/contrib/sendmail/RELEASE_NOTES
index f96f8cf..1ded392 100644
--- a/contrib/sendmail/RELEASE_NOTES
+++ b/contrib/sendmail/RELEASE_NOTES
@@ -1,11 +1,60 @@
SENDMAIL RELEASE NOTES
- $Id: RELEASE_NOTES,v 8.1991 2011/05/15 04:28:16 ca Exp $
+ $Id: RELEASE_NOTES,v 8.2011 2012/12/21 18:42:16 ca Exp $
This listing shows the version of the sendmail binary, the version
of the sendmail configuration files, the date of release, and a
summary of the changes in that release.
+8.14.6/8.14.6 2012/12/23
+ Fix a regression introduced in 8.14.5: if a server offers
+ two AUTH lines, the MTA would not read them after
+ STARTTLS has been used and hence SMTP AUTH for
+ the client side would fail. Problem noted by Lena.
+ Do not cache hostnames internally in a non case sensitive way
+ as that may cause addresses to change from lower case
+ to upper case or vice versa. These header modifications
+ can cause problems with milters that rely on receiving
+ headers in the same way as they are being sent out such
+ as a DKIM signing milter.
+ If MaxQueueChildren is set then it was possible that new queue
+ runners could not be started anymore because an
+ internal counter was subject to a race condition.
+ If a milter decreases the timeout it waits for a communication
+ with the MTA, the MTA might experience a write() timeout.
+ In some situations, the resulting error might have been
+ ignored. Problem noted by Werner Wiethege.
+ Note: decreasing the communication timeout in a milter
+ should not be done without considering the potential
+ problems.
+ smfi_setsymlist() now properly sets the list of macros for
+ the milter which invoked it, instead of a global
+ list for all milters. Problem reported by
+ David Shrimpton of the University of Queensland.
+ If Timeout.resolver.retrans is set to a value larger than 20,
+ then resolver.retry was temporarily set to 0 for
+ gethostbyaddr() lookups. Now it is set to 1 instead.
+ Patch from Peter.
+ If sendmail could not lock the statistics file due to a system
+ error, and sendmail later sends a DSN for a mail that
+ triggered such an error, then sendmail tried to access
+ memory that was freed before (causing a crash on some
+ systems). Problem reported by Ryan Stone.
+ Do not log negative values for size= nor pri= to avoid confusing
+ log parsers, instead limit the values to LONG_MAX.
+ Account for an API change in newer versions of Cyrus-SASL.
+ Patch from Hajimu UMEMOTO from FreeBSD.
+ Do not try to resolve link-local addresses for IPv4 (just as it
+ is done for IPv6). Patch from John Beck of Oracle.
+ Improve logging of client and server STARTTLS connection failures
+ that may be due to incompatible cipher lists by including
+ the reason for the failure in a single log line. Suggested
+ by James Carey of Boeing.
+ Portability:
+ Add support for Darwin 11.x and 12.x (Mac OS X 10.7 and 10.8).
+ Add support for SunOS 5.12 (aka Solaris 12). Patch from
+ John Beck of Oracle.
+
8.14.5/8.14.5 2011/05/17
Do not cache SMTP extensions across connections as the cache
is based on hostname which may not be a unique identifier
diff --git a/contrib/sendmail/cf/README b/contrib/sendmail/cf/README
index e3496e9..6d34ac6 100644
--- a/contrib/sendmail/cf/README
+++ b/contrib/sendmail/cf/README
@@ -1144,7 +1144,7 @@ relay_hosts_only
For example, if you specify ``foo.com'', then mail to or
from foo.com, abc.foo.com, or a.very.deep.domain.foo.com
will all be accepted for relaying. This feature changes
- the behaviour to lookup individual host names only.
+ the behaviour to look up individual host names only.
relay_based_on_MX
Turns on the ability to allow relaying based on the MX
@@ -2230,9 +2230,9 @@ command:
FEATURE(`ldap_routing', <mailHost>, <mailRoutingAddress>, <bounce>,
<detail>, <nodomain>, <tempfail>)
-where <mailHost> is a map definition describing how to lookup an alternative
+where <mailHost> is a map definition describing how to look up an alternative
mail host for a particular address; <mailRoutingAddress> is a map definition
-describing how to lookup an alternative address for a particular address;
+describing how to look up an alternative address for a particular address;
the <bounce> argument, if present and not the word "passthru", dictates
that mail should be bounced if neither a mailHost nor mailRoutingAddress
is found, if set to "sendertoo", the sender will be rejected if not
@@ -4701,4 +4701,4 @@ M4 DIVERSIONS
8 DNS based blacklists
9 special local rulesets (1 and 2)
-$Revision: 8.727 $, Last updated $Date: 2009/05/07 23:46:17 $
+$Revision: 8.728 $, Last updated $Date: 2012/09/07 16:29:13 $
diff --git a/contrib/sendmail/cf/cf/submit.cf b/contrib/sendmail/cf/cf/submit.cf
index 6cc386a..62c05e9 100644
--- a/contrib/sendmail/cf/cf/submit.cf
+++ b/contrib/sendmail/cf/cf/submit.cf
@@ -16,8 +16,8 @@
#####
##### SENDMAIL CONFIGURATION FILE
#####
-##### built by ca@wiz.smi.sendmail.com on Sat May 14 21:31:14 PDT 2011
-##### in /extra/home/ca/sm-8.14.5/OpenSource/sendmail-8.14.5/cf/cf
+##### built by ca@wiz.smi.sendmail.com on Fri Dec 21 10:45:15 PST 2012
+##### in /extra/home/ca/sm-8.14.6/OpenSource/sendmail-8.14.6/cf/cf
##### using ../ as configuration include directory
#####
######################################################################
@@ -35,7 +35,7 @@
##### $Id: no_default_msa.m4,v 8.2 2001/02/14 05:03:22 gshapiro Exp $ #####
-##### $Id: proto.m4,v 8.744 2010/11/23 20:29:47 guenther Exp $ #####
+##### $Id: proto.m4,v 8.760 2012/09/07 16:30:15 ca Exp $ #####
# level 10 config file format
V10/Berkeley
@@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1]
# Configuration version number
-DZ8.14.5/Submit
+DZ8.14.6/Submit
###############
@@ -926,6 +926,8 @@ SParseLocal=98
+
+
######################################################################
### CanonAddr -- Convert an address into a standard form for
### relay checking. Route address syntax is
diff --git a/contrib/sendmail/cf/feature/ldap_routing.m4 b/contrib/sendmail/cf/feature/ldap_routing.m4
index e9b4880..8959e20 100644
--- a/contrib/sendmail/cf/feature/ldap_routing.m4
+++ b/contrib/sendmail/cf/feature/ldap_routing.m4
@@ -10,7 +10,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`$Id: ldap_routing.m4,v 8.18 2010/01/05 00:57:27 ca Exp $')
+VERSIONID(`$Id: ldap_routing.m4,v 8.20 2012/01/18 22:27:06 ca Exp $')
divert(-1)
# Check first two arguments. If they aren't set, may need to warn in proto.m4
diff --git a/contrib/sendmail/cf/m4/proto.m4 b/contrib/sendmail/cf/m4/proto.m4
index 8bfd9de..9eae488 100644
--- a/contrib/sendmail/cf/m4/proto.m4
+++ b/contrib/sendmail/cf/m4/proto.m4
@@ -13,7 +13,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`$Id: proto.m4,v 8.744 2010/11/23 20:29:47 guenther Exp $')
+VERSIONID(`$Id: proto.m4,v 8.760 2012/09/07 16:30:15 ca Exp $')
# level CF_LEVEL config file format
V`'CF_LEVEL`'ifdef(`NO_VENDOR',`', `/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley')')
@@ -1532,8 +1532,9 @@ R<?> <e s> <$+> $#error $@ nouser $: "550 User unknown"')
R<?> <$*> <$+> $@ $2',
`dnl
# return the original address
-R<> <> <$+> <@ $+> <$*> $@ $1')',
-`dnl')
+R<> <> <$+> <@ $+> <$*> $@ $1')
+')
+
ifelse(substr(confDELIVERY_MODE,0,1), `d', `errprint(`WARNING: Antispam rules not available in deferred delivery mode.
')')
diff --git a/contrib/sendmail/cf/m4/version.m4 b/contrib/sendmail/cf/m4/version.m4
index 566c3a5..ae084d1 100644
--- a/contrib/sendmail/cf/m4/version.m4
+++ b/contrib/sendmail/cf/m4/version.m4
@@ -1,6 +1,6 @@
divert(-1)
#
-# Copyright (c) 1998-2011 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2012 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@@ -11,8 +11,8 @@ divert(-1)
# the sendmail distribution.
#
#
-VERSIONID(`$Id: version.m4,v 8.214 2011/04/26 23:02:36 ca Exp $')
+VERSIONID(`$Id: version.m4,v 8.222 2012/12/19 05:11:43 ca Exp $')
#
divert(0)
# Configuration version number
-DZ8.14.5`'ifdef(`confCF_VERSION', `/confCF_VERSION')
+DZ8.14.6`'ifdef(`confCF_VERSION', `/confCF_VERSION')
diff --git a/contrib/sendmail/doc/op/op.me b/contrib/sendmail/doc/op/op.me
index 1e7d370..270d4cf 100644
--- a/contrib/sendmail/doc/op/op.me
+++ b/contrib/sendmail/doc/op/op.me
@@ -9,7 +9,7 @@
.\" the sendmail distribution.
.\"
.\"
-.\" $Id: op.me,v 8.747 2010/05/08 04:18:27 ca Exp $
+.\" $Id: op.me,v 8.749 2012/03/02 22:37:11 ca Exp $
.\"
.\" eqn op.me | pic | troff -me
.\"
@@ -90,7 +90,7 @@ Sendmail, Inc.
.de Ve
Version \\$2
..
-.Ve $Revision: 8.747 $
+.Ve $Revision: 8.749 $
.rm Ve
.sp
For Sendmail Version 8.14
@@ -5999,7 +5999,7 @@ mailer.
.ip @
Look up addresses in the user database.
.ip %
-Do not attempt delivery on initial recipient of a message
+Do not attempt delivery on initial receipt of a message
or on queue runs
unless the queued message is selected
using one of the -qI/-qR/-qS queue run modifiers
@@ -7540,6 +7540,10 @@ This is intended to allow you to get responsiveness
by processing the queue fairly frequently
without thrashing your system by trying jobs too often.
The default units are minutes.
+Note:
+This option is ignored for queue runs that select a subset
+of the queue, i.e.,
+.q \-q[!][I|R|S|Q][string]
.ip MustQuoteChars=\fIs\fP
[no short name]
Sets the list of characters that must be quoted if used in a full name
@@ -11467,7 +11471,7 @@ replace it with a blank sheet for double-sided output.
.\".sz 10
.\"Eric Allman
.\".sp
-.\"Version $Revision: 8.747 $
+.\"Version $Revision: 8.749 $
.\".ce 0
.bp 3
.ce
diff --git a/contrib/sendmail/include/libmilter/mfapi.h b/contrib/sendmail/include/libmilter/mfapi.h
index f56992f..3b8e7d7 100644
--- a/contrib/sendmail/include/libmilter/mfapi.h
+++ b/contrib/sendmail/include/libmilter/mfapi.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999-2004, 2006, 2008 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2004, 2006, 2008, 2012 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -7,7 +7,7 @@
* the sendmail distribution.
*
*
- * $Id: mfapi.h,v 8.80 2009/11/06 00:57:08 ca Exp $
+ * $Id: mfapi.h,v 8.82 2012/11/16 20:25:04 ca Exp $
*/
/*
@@ -206,6 +206,7 @@ LIBMILTER_API int smfi_version __P((unsigned int *, unsigned int *, unsigned int
** (hence the list is not sorted by the SMT protocol steps).
*/
+#define SMFIM_NOMACROS (-1) /* Do NOT use, internal only */
#define SMFIM_FIRST 0 /* Do NOT use, internal marker only */
#define SMFIM_CONNECT 0 /* connect */
#define SMFIM_HELO 1 /* HELO/EHLO */
diff --git a/contrib/sendmail/include/sm/clock.h b/contrib/sendmail/include/sm/clock.h
index ba7fd68..22ed171 100644
--- a/contrib/sendmail/include/sm/clock.h
+++ b/contrib/sendmail/include/sm/clock.h
@@ -9,7 +9,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
- * $Id: clock.h,v 1.12 2004/08/03 19:57:21 ca Exp $
+ * $Id: clock.h,v 1.13 2011/11/03 03:13:24 ca Exp $
*/
/*
@@ -59,7 +59,7 @@ extern SIGFUNC_DECL sm_tick __P((int));
/*
** SM_SETEVENT -- set an event to happen at a specific time in seconds.
**
-** Translates the seconds into millseconds and calls sm_seteventm()
+** Translates the seconds into milliseconds and calls sm_seteventm()
** to get a specific event to happen in the future at a specific time.
**
** Parameters:
diff --git a/contrib/sendmail/include/sm/tailq.h b/contrib/sendmail/include/sm/tailq.h
index c8eeec4..ef67a97 100644
--- a/contrib/sendmail/include/sm/tailq.h
+++ b/contrib/sendmail/include/sm/tailq.h
@@ -36,7 +36,7 @@
#define SM_TAILQ_H_
/*
- * $Id: tailq.h,v 1.2 2007/06/29 23:09:57 ca Exp $
+ * $Id: tailq.h,v 1.3 2012/01/21 00:12:14 ashish Exp $
*
* This file is a modified copy of queue.h from a BSD system:
* we only need tail queues here.
@@ -69,8 +69,8 @@ struct { \
struct type **tqe_prev; /* address of previous next element */ \
}
-/*
- * tail queue access methods
+/*
+ * tail queue access methods
*/
#define SM_TAILQ_FIRST(head) ((head)->tqh_first)
#define SM_TAILQ_END(head) NULL
diff --git a/contrib/sendmail/libmilter/Makefile.m4 b/contrib/sendmail/libmilter/Makefile.m4
index bc9bc66..8f5da7d 100644
--- a/contrib/sendmail/libmilter/Makefile.m4
+++ b/contrib/sendmail/libmilter/Makefile.m4
@@ -1,4 +1,4 @@
-dnl $Id: Makefile.m4,v 8.85 2009/11/24 21:59:33 ca Exp $
+dnl $Id: Makefile.m4,v 8.88 2012/09/25 17:40:32 ca Exp $
include(confBUILDTOOLSDIR`/M4/switch.m4')
dnl only required for compilation of EXTRAS
diff --git a/contrib/sendmail/libmilter/docs/api.html b/contrib/sendmail/libmilter/docs/api.html
index 578e0ca..3c56746 100644
--- a/contrib/sendmail/libmilter/docs/api.html
+++ b/contrib/sendmail/libmilter/docs/api.html
@@ -2,7 +2,7 @@
<HEAD><TITLE>Milter API</TITLE></HEAD>
<BODY>
<!--
-$Id: api.html,v 1.37 2009/05/19 00:40:52 ca Exp $
+$Id: api.html,v 1.38 2012/03/29 03:18:37 ca Exp $
-->
<H1>Milter API</H1>
@@ -214,7 +214,6 @@ other callbacks are message-oriented.
<TD>SMFIS_REJECT</TD>
<TD>For a connection-oriented routine, reject this connection; call <A HREF="xxfi_close.html">xxfi_close</A>.<BR>
For a message-oriented routine (except
- <A HREF="xxfi_eom.html">xxfi_eom</A> or
<A HREF="xxfi_abort.html">xxfi_abort</A>), reject this message.<BR>
For a recipient-oriented routine, reject the current recipient (but continue processing the current message).
</TD>
diff --git a/contrib/sendmail/libmilter/docs/smfi_setsymlist.html b/contrib/sendmail/libmilter/docs/smfi_setsymlist.html
index 7e8edff..80793f0 100644
--- a/contrib/sendmail/libmilter/docs/smfi_setsymlist.html
+++ b/contrib/sendmail/libmilter/docs/smfi_setsymlist.html
@@ -2,7 +2,7 @@
<HEAD><TITLE>smfi_setsymlist</TITLE></HEAD>
<BODY>
<!--
-$Id: smfi_setsymlist.html,v 1.5 2006/12/21 18:30:35 ca Exp $
+$Id: smfi_setsymlist.html,v 1.6 2012/05/11 17:34:23 ca Exp $
-->
<H1>smfi_setsymlist</H1>
@@ -86,8 +86,10 @@ Otherwise MI_SUCCESS is returned.
<!----------- Notes ---------->
<TR align="left" valign=top>
<TH>NOTES</TH>
-<TD>There is an internal limit on the number of macros that can be
-set (currently 5),
+<TD>There is an internal limit on the number of macros
+that can be set
+<!-- XREF: MAXFILTERMACROS -->
+(currently 50),
however, this limit is not enforced by libmilter, only by the MTA,
but a possible violation of this restriction is not communicated back to
the milter.</TD>
@@ -97,7 +99,7 @@ the milter.</TD>
<HR size="1">
<FONT size="-1">
-Copyright (c) 2006 Sendmail, Inc. and its suppliers.
+Copyright (c) 2006, 2012 Sendmail, Inc. and its suppliers.
All rights reserved.
<BR>
By using this file, you agree to the terms and conditions set
diff --git a/contrib/sendmail/libmilter/docs/smfi_settimeout.html b/contrib/sendmail/libmilter/docs/smfi_settimeout.html
index 97d41cb..5631499 100644
--- a/contrib/sendmail/libmilter/docs/smfi_settimeout.html
+++ b/contrib/sendmail/libmilter/docs/smfi_settimeout.html
@@ -2,7 +2,7 @@
<HEAD><TITLE>smfi_settimeout</TITLE></HEAD>
<BODY>
<!--
-$Id: smfi_settimeout.html,v 1.14 2006/12/21 18:30:35 ca Exp $
+$Id: smfi_settimeout.html,v 1.15 2011/10/03 16:21:33 ca Exp $
-->
<H1>smfi_settimeout</H1>
@@ -52,11 +52,24 @@ If smfi_settimeout is not called, a default timeout of 7210 seconds is used.
<TD>smfi_settimeout always returns MI_SUCCESS.</TD>
</TR>
+<!----------- Notes ---------->
+<TR>
+<TH valign="top" align=left>NOTES</TH>
+<TD>
+Decreasing the timeout is strongly discouraged
+and may break the communication with the MTA.
+Do <EM>not</EM> decrease this value without making sure that
+the MTA also uses lower timeouts for communication
+(with the milter and with the SMTP client).
+</TR>
+</TABLE>
+
+
</TABLE>
<HR size="1">
<FONT size="-1">
-Copyright (c) 2000, 2002-2003, 2006 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2002-2003, 2006, 2011 Sendmail, Inc. and its suppliers.
All rights reserved.
<BR>
By using this file, you agree to the terms and conditions set
diff --git a/contrib/sendmail/libmilter/worker.c b/contrib/sendmail/libmilter/worker.c
index aa1bd57..50e8107 100644
--- a/contrib/sendmail/libmilter/worker.c
+++ b/contrib/sendmail/libmilter/worker.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2004, 2007, 2009-2011 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2003-2004, 2007, 2009-2012 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -11,7 +11,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Id: worker.c,v 8.19 2011/02/14 23:33:48 ca Exp $")
+SM_RCSID("@(#)$Id: worker.c,v 8.24 2012/03/13 15:37:46 ca Exp $")
#include "libmilter.h"
@@ -141,7 +141,8 @@ static int mi_list_del_ctx __P((SMFICTX_PTR));
#if POOL_DEBUG
# define POOL_LEV_DPRINTF(lev, x) \
- do { \
+ do \
+ { \
if ((lev) < ctx->ctx_dbg) \
sm_dprintf x; \
} while (0)
@@ -377,7 +378,7 @@ mi_pool_controller(arg)
for (;;)
{
SMFICTX_PTR ctx;
- int nfd, rfd, i;
+ int nfd, r, i;
time_t now;
POOL_LEV_DPRINTF(4, ("Let's %s again...", WAITFN));
@@ -498,19 +499,19 @@ mi_pool_controller(arg)
TASKMGR_UNLOCK();
/* Everything is ready, let's wait for an event */
- rfd = poll(pfd, nfd, POLL_TIMEOUT);
+ r = poll(pfd, nfd, POLL_TIMEOUT);
POOL_LEV_DPRINTF(4, ("%s returned: at epoch %d value %d",
WAITFN, now, nfd));
/* timeout */
- if (rfd == 0)
+ if (r == 0)
continue;
rebuild_set = true;
/* error */
- if (rfd < 0)
+ if (r < 0)
{
if (errno == EINTR)
continue;
@@ -522,6 +523,7 @@ mi_pool_controller(arg)
if (pcnt >= MAX_FAILS_S)
goto err;
+ continue;
}
pcnt = 0;
@@ -535,7 +537,7 @@ mi_pool_controller(arg)
WAITFN, i, nfd,
WAIT_FD(i)));
- /* has a worker signaled an end of task ? */
+ /* has a worker signaled an end of task? */
if (WAIT_FD(i) == RD_PIPE)
{
char evts[256];
@@ -563,7 +565,12 @@ mi_pool_controller(arg)
continue;
}
- /* no ! sendmail wants to send a command */
+ /*
+ ** Not the pipe for workers waking us,
+ ** so must be something on an MTA connection.
+ */
+
+ TASKMGR_LOCK();
SM_TAILQ_FOREACH(ctx, &WRK_CTX_HEAD, ctx_link)
{
if (ctx->ctx_wstate != WKST_WAITING)
@@ -575,7 +582,6 @@ mi_pool_controller(arg)
if (ctx->ctx_sd == pfd[i].fd)
{
- TASKMGR_LOCK();
POOL_LEV_DPRINTF(4,
("TASK: found %d for fd[%d]=%d",
@@ -591,10 +597,10 @@ mi_pool_controller(arg)
ctx->ctx_wstate = WKST_RUNNING;
LAUNCH_WORKER(ctx);
}
- TASKMGR_UNLOCK();
break;
}
}
+ TASKMGR_UNLOCK();
POOL_LEV_DPRINTF(4,
("TASK %s FOUND - Checking PIPE for fd[%d]",
@@ -607,6 +613,14 @@ mi_pool_controller(arg)
free(pfd);
Tskmgr.tm_signature = 0;
+#if 0
+ /*
+ ** Do not clean up ctx -- it can cause double-free()s.
+ ** The program is shutting down anyway, so it's not worth the trouble.
+ ** There is a more complex solution that prevents race conditions
+ ** while accessing ctx, but that's maybe for a later version.
+ */
+
for (;;)
{
SMFICTX_PTR ctx;
@@ -616,6 +630,7 @@ mi_pool_controller(arg)
break;
mi_close_session(ctx);
}
+#endif
(void) smutex_destroy(&Tskmgr.tm_w_mutex);
(void) scond_destroy(&Tskmgr.tm_w_cond);
diff --git a/contrib/sendmail/src/Makefile.m4 b/contrib/sendmail/src/Makefile.m4
index 7bcd24d..5908b97 100644
--- a/contrib/sendmail/src/Makefile.m4
+++ b/contrib/sendmail/src/Makefile.m4
@@ -1,4 +1,4 @@
-dnl $Id: Makefile.m4,v 8.126 2010/11/24 19:59:54 gshapiro Exp $
+dnl $Id: Makefile.m4,v 8.132 2012/09/11 20:02:44 ca Exp $
include(confBUILDTOOLSDIR`/M4/switch.m4')
define(`confREQUIRE_LIBSM', `true')
diff --git a/contrib/sendmail/src/TRACEFLAGS b/contrib/sendmail/src/TRACEFLAGS
index 6fdfdd9..c3f0266 100644
--- a/contrib/sendmail/src/TRACEFLAGS
+++ b/contrib/sendmail/src/TRACEFLAGS
@@ -1,4 +1,4 @@
-# $Id: TRACEFLAGS,v 8.48 2008/11/03 21:09:26 gshapiro Exp $
+# $Id: TRACEFLAGS,v 8.52 2012/03/03 00:10:42 ca Exp $
0, 4 main.c main canonical name, UUCP node name, a.k.a.s
0, 15 main.c main print configuration
0, 44 util.c printav print address of each string
@@ -77,12 +77,12 @@
63 queue.c runqueue process watching
64 multiple Milter
65 main.c permission checks
-#if _FFR_ADAPTIVE_EOL
-66 srvrsmtp.c conformance checks
-#endif /* _FFR_ADAPTIVE_EOL */
-#if _FFR_QUEUE_SCHED_DBG
-69 queue.c scheduling
-#endif /* _FFR_QUEUE_SCHED_DBG */
+#if _FFR_ADAPTIVE_EOL
+66 srvrsmtp.c conformance checks
+#endif /* _FFR_ADAPTIVE_EOL */
+#if _FFR_QUEUE_SCHED_DBG
+69 queue.c scheduling
+#endif /* _FFR_QUEUE_SCHED_DBG */
70 queue.c quarantining
71,>99 milter.c quarantine on errors
73 queue.c shared memory updates
@@ -92,6 +92,7 @@
83 collect.c timeout
84 deliver.c timeout
85 map.c dprintf map
+89 conf.c >=8 use sm_dprintf() instead of syslog()
91 mci.c syslogging of MCI cache information
93,>99 * Prevent daemon connection fork for profiling/debugging
94,>99 srvrsmtp.c cause commands to fail (for protocol testing)
diff --git a/contrib/sendmail/src/collect.c b/contrib/sendmail/src/collect.c
index f5d7247..c8dcb8a 100644
--- a/contrib/sendmail/src/collect.c
+++ b/contrib/sendmail/src/collect.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Id: collect.c,v 8.284 2008/08/06 05:26:24 ca Exp $")
+SM_RCSID("@(#)$Id: collect.c,v 8.285 2012/06/14 23:54:02 ca Exp $")
static void eatfrom __P((char *volatile, ENVELOPE *));
static void collect_doheader __P((ENVELOPE *));
@@ -869,7 +869,8 @@ readerr:
if (LogLevel > 6)
sm_syslog(LOG_NOTICE, e->e_id,
"message size (%ld) exceeds maximum (%ld)",
- e->e_msgsize, MaxMessageSize);
+ PRT_NONNEGL(e->e_msgsize),
+ MaxMessageSize);
}
}
diff --git a/contrib/sendmail/src/conf.c b/contrib/sendmail/src/conf.c
index ffc6f20..9130455 100644
--- a/contrib/sendmail/src/conf.c
+++ b/contrib/sendmail/src/conf.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2010 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2012 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Id: conf.c,v 8.1168 2011/01/25 18:31:30 ca Exp $")
+SM_RCSID("@(#)$Id: conf.c,v 8.1176 2012/12/07 03:59:54 ca Exp $")
#include <sm/sendmail.h>
#include <sendmail/pathnames.h>
@@ -53,7 +53,7 @@ static int add_hostnames __P((SOCKADDR *));
static struct hostent *sm_getipnodebyname __P((const char *, int, int, int *));
static struct hostent *sm_getipnodebyaddr __P((const void *, size_t, int, int *));
#else /* NETINET6 && NEEDSGETIPNODE */
-#define sm_getipnodebyname getipnodebyname
+#define sm_getipnodebyname getipnodebyname
#define sm_getipnodebyaddr getipnodebyaddr
#endif /* NETINET6 && NEEDSGETIPNODE */
@@ -4602,6 +4602,10 @@ add_hostnames(sa)
int save_errno = errno;
if (LogLevel > 3 &&
+#if NETINET && defined(IN_LINKLOCAL)
+ !(sa->sa.sa_family == AF_INET &&
+ IN_LINKLOCAL(ntohl(sa->sin.sin_addr.s_addr))) &&
+#endif /* NETINET && defined(IN_LINKLOCAL) */
#if NETINET6
!(sa->sa.sa_family == AF_INET6 &&
IN6_IS_ADDR_LINKLOCAL(&sa->sin6.sin6_addr)) &&
@@ -5374,14 +5378,30 @@ sm_syslog(level, id, fmt, va_alist)
#if LOG
if (*id == '\0')
{
- if (tTd(89, 8))
+ if (tTd(89, 10))
+ {
+ struct timeval tv;
+
+ gettimeofday(&tv, NULL);
+ sm_dprintf("%ld.%06ld %s\n", (long) tv.tv_sec,
+ (long) tv.tv_usec, newstring);
+ }
+ else if (tTd(89, 8))
sm_dprintf("%s\n", newstring);
else
syslog(level, "%s", newstring);
}
else
{
- if (tTd(89, 8))
+ if (tTd(89, 10))
+ {
+ struct timeval tv;
+
+ gettimeofday(&tv, NULL);
+ sm_dprintf("%ld.%06ld %s: %s\n", (long) tv.tv_sec,
+ (long) tv.tv_usec, id, newstring);
+ }
+ else if (tTd(89, 8))
sm_dprintf("%s: %s\n", id, newstring);
else
syslog(level, "%s: %s", id, newstring);
diff --git a/contrib/sendmail/src/daemon.c b/contrib/sendmail/src/daemon.c
index a1dcbe85..498f8c2 100644
--- a/contrib/sendmail/src/daemon.c
+++ b/contrib/sendmail/src/daemon.c
@@ -14,7 +14,7 @@
#include <sendmail.h>
#include "map.h"
-SM_RCSID("@(#)$Id: daemon.c,v 8.691 2011/01/25 18:31:30 ca Exp $")
+SM_RCSID("@(#)$Id: daemon.c,v 8.694 2012/03/03 00:10:42 ca Exp $")
#if defined(SOCK_STREAM) || defined(__GNU_LIBRARY__)
# define USE_SOCK_STREAM 1
@@ -827,6 +827,7 @@ getrequests(e)
OutChannel = outchannel;
DisConnected = false;
+
#if XLA
if (!xla_host_ok(RealHostName))
{
@@ -4405,6 +4406,8 @@ hostnamebyanyaddr(sap)
saveretry = _res.retry;
if (_res.retry * _res.retrans > 20)
_res.retry = 20 / _res.retrans;
+ if (_res.retry == 0)
+ _res.retry = 1;
# endif /* NAMED_BIND */
switch (sap->sa.sa_family)
diff --git a/contrib/sendmail/src/deliver.c b/contrib/sendmail/src/deliver.c
index bb1d60e..581a98d 100644
--- a/contrib/sendmail/src/deliver.c
+++ b/contrib/sendmail/src/deliver.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2010 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2010, 2012 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@@ -14,7 +14,7 @@
#include <sendmail.h>
#include <sm/time.h>
-SM_RCSID("@(#)$Id: deliver.c,v 8.1024 2011/01/12 23:52:59 ca Exp $")
+SM_RCSID("@(#)$Id: deliver.c,v 8.1027 2012/12/19 02:49:21 ca Exp $")
#if HASSETUSERCONTEXT
# include <login_cap.h>
@@ -37,6 +37,7 @@ static void sendenvelope __P((ENVELOPE *, int));
static int coloncmp __P((const char *, const char *));
#if STARTTLS
+# include <openssl/err.h>
static int starttls __P((MAILER *, MCI *, ENVELOPE *));
static int endtlsclt __P((MCI *));
#endif /* STARTTLS */
@@ -4277,7 +4278,7 @@ logdelivery(m, mci, dsn, status, ctladdr, xstart, e)
/* pri: changes with each delivery attempt */
(void) sm_snprintf(bp, SPACELEFT(buf, bp), ", pri=%ld",
- e->e_msgpriority);
+ PRT_NONNEGL(e->e_msgpriority));
bp += strlen(bp);
/* relay: max 66 bytes for IPv4 addresses */
@@ -6197,10 +6198,16 @@ ssl_retry:
if (LogLevel > 5)
{
+ unsigned long l;
+ const char *sr;
+
+ l = ERR_peek_error();
+ sr = ERR_reason_error_string(l);
sm_syslog(LOG_WARNING, NOQID,
- "STARTTLS=client, error: connect failed=%d, SSL_error=%d, errno=%d, retry=%d",
- result, ssl_err, errno, i);
- if (LogLevel > 8)
+ "STARTTLS=client, error: connect failed=%d, reason=%s, SSL_error=%d, errno=%d, retry=%d",
+ result, sr == NULL ? "unknown" : sr, ssl_err,
+ errno, i);
+ if (LogLevel > 9)
tlslogerr("client");
}
diff --git a/contrib/sendmail/src/headers.c b/contrib/sendmail/src/headers.c
index c4bdc87..02f9663 100644
--- a/contrib/sendmail/src/headers.c
+++ b/contrib/sendmail/src/headers.c
@@ -14,7 +14,7 @@
#include <sendmail.h>
#include <sm/sendmail.h>
-SM_RCSID("@(#)$Id: headers.c,v 8.317 2008/08/27 20:11:55 gshapiro Exp $")
+SM_RCSID("@(#)$Id: headers.c,v 8.318 2012/06/14 23:54:02 ca Exp $")
static HDR *allocheader __P((char *, char *, int, SM_RPOOL_T *, bool));
static size_t fix_mime_header __P((HDR *, ENVELOPE *));
@@ -1152,7 +1152,7 @@ logsender(e, msgid)
(void) sm_snprintf(sbp, SPACELEFT(sbuf, sbp),
"from=%.200s, size=%ld, class=%d, nrcpts=%d",
e->e_from.q_paddr == NULL ? "<NONE>" : e->e_from.q_paddr,
- e->e_msgsize, e->e_class, e->e_nrcpts);
+ PRT_NONNEGL(e->e_msgsize), e->e_class, e->e_nrcpts);
sbp += strlen(sbp);
if (msgid != NULL)
{
@@ -1191,7 +1191,7 @@ logsender(e, msgid)
83));
sm_syslog(LOG_INFO, e->e_id,
"size=%ld, class=%ld, nrcpts=%d",
- e->e_msgsize, e->e_class, e->e_nrcpts);
+ PRT_NONNEGL(e->e_msgsize), e->e_class, e->e_nrcpts);
if (msgid != NULL)
sm_syslog(LOG_INFO, e->e_id,
"msgid=%s",
diff --git a/contrib/sendmail/src/main.c b/contrib/sendmail/src/main.c
index e14ffa0..2294063 100644
--- a/contrib/sendmail/src/main.c
+++ b/contrib/sendmail/src/main.c
@@ -26,7 +26,7 @@ SM_UNUSED(static char copyright[]) =
The Regents of the University of California. All rights reserved.\n";
#endif /* ! lint */
-SM_RCSID("@(#)$Id: main.c,v 8.976 2011/03/15 23:14:36 ca Exp $")
+SM_RCSID("@(#)$Id: main.c,v 8.981 2012/06/14 23:54:02 ca Exp $")
#if NETINET || NETINET6
@@ -2561,6 +2561,10 @@ main(argc, argv, envp)
authinfo = getauthinfo(sm_io_getinfo(InChannel, SM_IO_WHAT_FD,
NULL), &forged);
macdefine(&BlankEnvelope.e_macro, A_TEMP, '_', authinfo);
+ if (tTd(75, 9))
+ sm_syslog(LOG_INFO, NOQID,
+ "main: where=after_getauthinfo, RealHostAddr=%s",
+ anynet_ntoa(&RealHostAddr));
/* at this point we are in a child: reset state */
sm_rpool_free(MainEnvelope.e_rpool);
@@ -2827,7 +2831,7 @@ main(argc, argv, envp)
/* set message size */
(void) sm_snprintf(buf, sizeof(buf), "%ld",
- MainEnvelope.e_msgsize);
+ PRT_NONNEGL(MainEnvelope.e_msgsize));
macdefine(&MainEnvelope.e_macro, A_TEMP,
macid("{msg_size}"), buf);
diff --git a/contrib/sendmail/src/map.c b/contrib/sendmail/src/map.c
index 2eb6958..01d79ff 100644
--- a/contrib/sendmail/src/map.c
+++ b/contrib/sendmail/src/map.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Id: map.c,v 8.706 2010/07/27 03:35:42 ca Exp $")
+SM_RCSID("@(#)$Id: map.c,v 8.709 2012/04/20 18:47:09 ca Exp $")
#if LDAPMAP
# include <sm/ldap.h>
@@ -3434,7 +3434,7 @@ ldapmap_open(map, mode)
{
if (LogLevel > 1)
sm_syslog(LOG_NOTICE, CurEnv->e_id,
- "timeout conning to LDAP server %.100s",
+ "timeout connecting to LDAP server %.100s",
id);
}
@@ -3763,11 +3763,11 @@ ldapmap_lookup(map, name, av, statp)
if (!bitset(MF_OPTIONAL, map->map_mflags))
{
if (bitset(MF_NODEFER, map->map_mflags))
- syserr("Error getting LDAP results in map %s",
- map->map_mname);
+ syserr("Error getting LDAP results, map=%s, name=%s",
+ map->map_mname, name);
else
- syserr("451 4.3.5 Error getting LDAP results in map %s",
- map->map_mname);
+ syserr("451 4.3.5 Error getting LDAP results, map=%s, name=%s",
+ map->map_mname, name);
}
errno = save_errno;
return NULL;
@@ -3781,7 +3781,7 @@ ldapmap_lookup(map, name, av, statp)
{
if (LogLevel > 9)
sm_syslog(LOG_INFO, CurEnv->e_id,
- "ldap %.100s => %s", name,
+ "ldap=%s, %.100s=>%s", map->map_mname, name,
vp == NULL ? "<NULL>" : vp);
if (bitset(MF_MATCHONLY, map->map_mflags))
result = map_rewrite(map, name, strlen(name), NULL);
diff --git a/contrib/sendmail/src/milter.c b/contrib/sendmail/src/milter.c
index 773dfa8..9774a91 100644
--- a/contrib/sendmail/src/milter.c
+++ b/contrib/sendmail/src/milter.c
@@ -10,7 +10,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Id: milter.c,v 8.277 2009/11/06 00:57:06 ca Exp $")
+SM_RCSID("@(#)$Id: milter.c,v 8.279 2012/11/16 20:25:03 ca Exp $")
#if MILTER
# include <sm/sendmail.h>
@@ -42,7 +42,7 @@ static char *milter_write __P((struct milter *, int, char *, ssize_t,
time_t, ENVELOPE *, const char *));
static char *milter_send_command __P((struct milter *, int, void *,
ssize_t, ENVELOPE *, char *, const char *));
-static char *milter_command __P((int, void *, ssize_t, char **,
+static char *milter_command __P((int, void *, ssize_t, int,
ENVELOPE *, char *, const char *, bool));
static char *milter_body __P((struct milter *, ENVELOPE *, char *));
static int milter_reopen_df __P((ENVELOPE *));
@@ -79,13 +79,13 @@ static int milter_set_macros __P((char *, char **, char *, int));
# define SMFS_READY 'R' /* ready for action */
# define SMFS_SKIP 'S' /* skip body */
-static char *MilterConnectMacros[MAXFILTERMACROS + 1];
-static char *MilterHeloMacros[MAXFILTERMACROS + 1];
-static char *MilterEnvFromMacros[MAXFILTERMACROS + 1];
-static char *MilterEnvRcptMacros[MAXFILTERMACROS + 1];
-static char *MilterDataMacros[MAXFILTERMACROS + 1];
-static char *MilterEOMMacros[MAXFILTERMACROS + 1];
-static char *MilterEOHMacros[MAXFILTERMACROS + 1];
+/*
+** MilterMacros contains the milter macros for each milter and each stage.
+** indices are (in order): stages, milter-index, macro
+** milter-index == 0: "global" macros (not for a specific milter).
+*/
+
+static char *MilterMacros[SMFIM_LAST + 1][MAXFILTERS + 1][MAXFILTERMACROS + 1];
static size_t MilterMaxDataSize = MILTER_MAX_DATA_SIZE;
# define MILTER_CHECK_DONE_MSG() \
@@ -98,6 +98,16 @@ static size_t MilterMaxDataSize = MILTER_MAX_DATA_SIZE;
milter_abort(e); \
}
+/* set state in case of an error */
+# define MILTER_SET_STATE \
+ if (bitnset(SMF_TEMPFAIL, m->mf_flags)) \
+ *state = SMFIR_TEMPFAIL; \
+ else if (bitnset(SMF_TEMPDROP, m->mf_flags)) \
+ *state = SMFIR_SHUTDOWN; \
+ else if (bitnset(SMF_REJECT, m->mf_flags)) \
+ *state = SMFIR_REJECT
+
+/* flow through code maybe using continue; don't wrap in do {} while */
# define MILTER_CHECK_ERROR(initial, action) \
if (!initial && tTd(71, 100)) \
{ \
@@ -119,12 +129,7 @@ static size_t MilterMaxDataSize = MILTER_MAX_DATA_SIZE;
e->e_quarmsg); \
} \
} \
- else if (bitnset(SMF_TEMPFAIL, m->mf_flags)) \
- *state = SMFIR_TEMPFAIL; \
- else if (bitnset(SMF_TEMPDROP, m->mf_flags)) \
- *state = SMFIR_SHUTDOWN; \
- else if (bitnset(SMF_REJECT, m->mf_flags)) \
- *state = SMFIR_REJECT; \
+ else MILTER_SET_STATE; \
else \
action;
@@ -1221,6 +1226,7 @@ milter_setup(line)
char *p;
struct milter *m;
STAB *s;
+ static int idx = 0;
/* collect the filter name */
for (p = line;
@@ -1323,7 +1329,10 @@ milter_setup(line)
if (s->s_milter != NULL)
syserr("X%s: duplicate filter definition", m->mf_name);
else
+ {
s->s_milter = m;
+ m->mf_idx = ++idx;
+ }
}
/*
@@ -1555,20 +1564,13 @@ static struct milteropt
unsigned char mo_code; /* code for option */
} MilterOptTab[] =
{
-# define MO_MACROS_CONNECT SMFIM_CONNECT
- { "macros.connect", MO_MACROS_CONNECT },
-# define MO_MACROS_HELO SMFIM_HELO
- { "macros.helo", MO_MACROS_HELO },
-# define MO_MACROS_ENVFROM SMFIM_ENVFROM
- { "macros.envfrom", MO_MACROS_ENVFROM },
-# define MO_MACROS_ENVRCPT SMFIM_ENVRCPT
- { "macros.envrcpt", MO_MACROS_ENVRCPT },
-# define MO_MACROS_DATA SMFIM_DATA
- { "macros.data", MO_MACROS_DATA },
-# define MO_MACROS_EOM SMFIM_EOM
- { "macros.eom", MO_MACROS_EOM },
-# define MO_MACROS_EOH SMFIM_EOH
- { "macros.eoh", MO_MACROS_EOH },
+ { "macros.connect", SMFIM_CONNECT },
+ { "macros.helo", SMFIM_HELO },
+ { "macros.envfrom", SMFIM_ENVFROM },
+ { "macros.envrcpt", SMFIM_ENVRCPT },
+ { "macros.data", SMFIM_DATA },
+ { "macros.eom", SMFIM_EOM },
+ { "macros.eoh", SMFIM_EOH },
# define MO_LOGLEVEL 0x07
{ "loglevel", MO_LOGLEVEL },
@@ -1655,39 +1657,14 @@ milter_set_option(name, val, sticky)
break;
# endif /* _FFR_MAXDATASIZE || _FFR_MDS_NEGOTIATE */
- case MO_MACROS_CONNECT:
- if (macros == NULL)
- macros = MilterConnectMacros;
- /* FALLTHROUGH */
-
- case MO_MACROS_HELO:
- if (macros == NULL)
- macros = MilterHeloMacros;
- /* FALLTHROUGH */
-
- case MO_MACROS_ENVFROM:
- if (macros == NULL)
- macros = MilterEnvFromMacros;
- /* FALLTHROUGH */
-
- case MO_MACROS_ENVRCPT:
- if (macros == NULL)
- macros = MilterEnvRcptMacros;
- /* FALLTHROUGH */
-
- case MO_MACROS_EOH:
- if (macros == NULL)
- macros = MilterEOHMacros;
- /* FALLTHROUGH */
-
- case MO_MACROS_EOM:
- if (macros == NULL)
- macros = MilterEOMMacros;
- /* FALLTHROUGH */
-
- case MO_MACROS_DATA:
- if (macros == NULL)
- macros = MilterDataMacros;
+ case SMFIM_CONNECT:
+ case SMFIM_HELO:
+ case SMFIM_ENVFROM:
+ case SMFIM_ENVRCPT:
+ case SMFIM_EOH:
+ case SMFIM_EOM:
+ case SMFIM_DATA:
+ macros = MilterMacros[mo->mo_code][0];
r = milter_set_macros(name, macros, val, nummac);
if (r >= 0)
@@ -2188,7 +2165,7 @@ milter_send_command(m, cmd, data, sz, e, state, where)
sm_syslog(LOG_ERR, e->e_id,
"milter_send_command(%s): action=%s returned bogus response %c",
m->mf_name, action, rcmd);
- milter_error(m, e);
+ milter_error(m, e); /* NO ERROR CHECK? */
break;
}
@@ -2218,11 +2195,11 @@ milter_send_command(m, cmd, data, sz, e, state, where)
*/
static char *
-milter_command(cmd, data, sz, macros, e, state, where, cmd_error)
+milter_command(cmd, data, sz, stage, e, state, where, cmd_error)
int cmd;
void *data;
ssize_t sz;
- char **macros;
+ int stage;
ENVELOPE *e;
char *state;
const char *where;
@@ -2254,14 +2231,27 @@ milter_command(cmd, data, sz, macros, e, state, where, cmd_error)
(m->mf_state != SMFS_OPEN && m->mf_state != SMFS_INMSG))
continue;
- /* send macros (regardless of whether we send command) */
- if (macros != NULL && macros[0] != NULL)
+ if (stage >= SMFIM_FIRST && stage <= SMFIM_LAST)
{
- milter_send_macros(m, macros, command, e);
- if (m->mf_state == SMFS_ERROR)
+ int idx;
+ char **macros;
+
+ if ((m->mf_lflags & MI_LFLAGS_SYM(stage)) != 0)
+ idx = m->mf_idx;
+ else
+ idx = 0;
+ SM_ASSERT(idx >= 0 && idx <= MAXFILTERS);
+ macros = MilterMacros[stage][idx];
+
+ /* send macros (regardless of whether we send cmd) */
+ if (macros != NULL && macros[0] != NULL)
{
- MILTER_CHECK_ERROR(false, continue);
- break;
+ milter_send_macros(m, macros, command, e);
+ if (m->mf_state == SMFS_ERROR)
+ {
+ MILTER_CHECK_ERROR(false, continue);
+ break;
+ }
}
}
@@ -2329,40 +2319,17 @@ milter_getsymlist(m, buf, rlen, offset)
switch (i)
{
- case MO_MACROS_CONNECT:
- if (macros == NULL)
- macros = MilterConnectMacros;
- /* FALLTHROUGH */
-
- case MO_MACROS_HELO:
- if (macros == NULL)
- macros = MilterHeloMacros;
- /* FALLTHROUGH */
-
- case MO_MACROS_ENVFROM:
- if (macros == NULL)
- macros = MilterEnvFromMacros;
- /* FALLTHROUGH */
-
- case MO_MACROS_ENVRCPT:
- if (macros == NULL)
- macros = MilterEnvRcptMacros;
- /* FALLTHROUGH */
-
- case MO_MACROS_EOM:
- if (macros == NULL)
- macros = MilterEOMMacros;
- /* FALLTHROUGH */
-
- case MO_MACROS_EOH:
- if (macros == NULL)
- macros = MilterEOHMacros;
- /* FALLTHROUGH */
-
- case MO_MACROS_DATA:
- if (macros == NULL)
- macros = MilterDataMacros;
-
+ case SMFIM_CONNECT:
+ case SMFIM_HELO:
+ case SMFIM_ENVFROM:
+ case SMFIM_ENVRCPT:
+ case SMFIM_EOH:
+ case SMFIM_EOM:
+ case SMFIM_DATA:
+ SM_ASSERT(m->mf_idx > 0 && m->mf_idx < MAXFILTERS);
+ macros = MilterMacros[i][m->mf_idx];
+
+ m->mf_lflags |= MI_LFLAGS_SYM(i);
len = strlen(buf + offset);
if (len > 0)
{
@@ -2370,6 +2337,9 @@ milter_getsymlist(m, buf, rlen, offset)
buf + offset, nummac);
if (r >= 0)
nummac = r;
+ if (tTd(64, 5))
+ sm_dprintf("milter_getsymlist(%s, %s)=%d\n",
+ m->mf_name, buf + offset, r);
}
break;
@@ -3989,7 +3959,7 @@ milter_connect(hostname, addr, e, state)
(void) memcpy(bp, sockinfo, strlen(sockinfo) + 1);
}
- response = milter_command(SMFIC_CONNECT, buf, s, MilterConnectMacros,
+ response = milter_command(SMFIC_CONNECT, buf, s, SMFIM_CONNECT,
e, state, "connect", false);
sm_free(buf); /* XXX */
@@ -4078,7 +4048,7 @@ milter_helo(helo, e, state)
}
response = milter_command(SMFIC_HELO, helo, strlen(helo) + 1,
- MilterHeloMacros, e, state, "helo", false);
+ SMFIM_EOH, e, state, "helo", false);
milter_per_connection_check(e);
return response;
}
@@ -4166,7 +4136,7 @@ milter_envfrom(args, e, state)
sm_syslog(LOG_INFO, e->e_id, "Milter: sender: %s", buf);
/* send it over */
- response = milter_command(SMFIC_MAIL, buf, s, MilterEnvFromMacros,
+ response = milter_command(SMFIC_MAIL, buf, s, SMFIM_ENVFROM,
e, state, "mail", false);
sm_free(buf); /* XXX */
@@ -4247,7 +4217,7 @@ milter_envrcpt(args, e, state, rcpt_error)
sm_syslog(LOG_INFO, e->e_id, "Milter: rcpts: %s", buf);
/* send it over */
- response = milter_command(SMFIC_RCPT, buf, s, MilterEnvRcptMacros,
+ response = milter_command(SMFIC_RCPT, buf, s, SMFIM_ENVRCPT,
e, state, "rcpt", rcpt_error);
sm_free(buf); /* XXX */
return response;
@@ -4273,8 +4243,8 @@ milter_data_cmd(e, state)
sm_dprintf("milter_data_cmd\n");
/* send it over */
- return milter_command(SMFIC_DATA, NULL, 0, MilterDataMacros, e, state,
- "data", false);
+ return milter_command(SMFIC_DATA, NULL, 0, SMFIM_DATA,
+ e, state, "data", false);
}
/*
@@ -4293,7 +4263,12 @@ milter_data_cmd(e, state)
** modify the envelope or message.
*/
+/* flow through code using continue; don't wrap in do {} while */
# define MILTER_CHECK_RESULTS() \
+ if (m->mf_state == SMFS_ERROR && *state == SMFIR_CONTINUE) \
+ { \
+ MILTER_SET_STATE; \
+ } \
if (*state == SMFIR_ACCEPT || \
m->mf_state == SMFS_DONE || \
m->mf_state == SMFS_ERROR) \
@@ -4339,6 +4314,8 @@ milter_data(e, state)
for (i = 0; InputFilters[i] != NULL; i++)
{
+ int idx;
+ char **macros;
struct milter *m = InputFilters[i];
if (*state != SMFIR_CONTINUE &&
@@ -4383,10 +4360,16 @@ milter_data(e, state)
if (tTd(64, 10))
sm_dprintf("milter_data: eoh\n");
- if (MilterEOHMacros[0] != NULL)
+ if ((m->mf_lflags & MI_LFLAGS_SYM(SMFIM_EOH)) != 0)
+ idx = m->mf_idx;
+ else
+ idx = 0;
+ SM_ASSERT(idx >= 0 && idx <= MAXFILTERS);
+ macros = MilterMacros[SMFIM_EOH][idx];
+
+ if (macros != NULL)
{
- milter_send_macros(m, MilterEOHMacros,
- SMFIC_EOH, e);
+ milter_send_macros(m, macros, SMFIC_EOH, e);
MILTER_CHECK_RESULTS();
}
@@ -4405,10 +4388,15 @@ milter_data(e, state)
MILTER_CHECK_RESULTS();
}
- if (MilterEOMMacros[0] != NULL)
+ if ((m->mf_lflags & MI_LFLAGS_SYM(SMFIM_EOH)) != 0)
+ idx = m->mf_idx;
+ else
+ idx = 0;
+ SM_ASSERT(idx >= 0 && idx <= MAXFILTERS);
+ macros = MilterMacros[SMFIM_EOM][idx];
+ if (macros != NULL)
{
- milter_send_macros(m, MilterEOMMacros,
- SMFIC_BODYEOB, e);
+ milter_send_macros(m, macros, SMFIC_BODYEOB, e);
MILTER_CHECK_RESULTS();
}
@@ -4734,7 +4722,7 @@ milter_unknown(smtpcmd, e, state)
sm_dprintf("milter_unknown(%s)\n", smtpcmd);
return milter_command(SMFIC_UNKNOWN, smtpcmd, strlen(smtpcmd) + 1,
- NULL, e, state, "unknown", false);
+ SMFIM_NOMACROS, e, state, "unknown", false);
}
/*
diff --git a/contrib/sendmail/src/parseaddr.c b/contrib/sendmail/src/parseaddr.c
index 9135c22..930f61d 100644
--- a/contrib/sendmail/src/parseaddr.c
+++ b/contrib/sendmail/src/parseaddr.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Id: parseaddr.c,v 8.404 2010/07/27 03:35:42 ca Exp $")
+SM_RCSID("@(#)$Id: parseaddr.c,v 8.405 2012/02/27 22:49:08 ca Exp $")
#include <sm/sendmail.h>
#include "map.h"
@@ -242,6 +242,7 @@ parseaddr(addr, a, flags, delim, delimptr, e, isrcpt)
**
** Parameters:
** addr -- the address to check.
+** note: this is the complete address (including display part)
** delimptr -- if non-NULL: end of address to check, i.e.,
** a pointer in the address string.
** isrcpt -- true iff the address is for a recipient.
diff --git a/contrib/sendmail/src/queue.c b/contrib/sendmail/src/queue.c
index 16142d9..70b2965 100644
--- a/contrib/sendmail/src/queue.c
+++ b/contrib/sendmail/src/queue.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2009, 2011 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2009, 2011, 2012 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@@ -14,7 +14,7 @@
#include <sendmail.h>
#include <sm/sem.h>
-SM_RCSID("@(#)$Id: queue.c,v 8.991 2011/03/15 23:14:36 ca Exp $")
+SM_RCSID("@(#)$Id: queue.c,v 8.997 2012/06/14 23:54:03 ca Exp $")
#include <dirent.h>
@@ -1493,6 +1493,7 @@ runqueue(forkflag, verbose, persistent, runall)
for (i = 0; i < NumWorkGroups && !NoMoreRunners; i++)
{
int rwgflags = RWG_NONE;
+ int wasblocked;
/*
** If MaxQueueChildren active then test whether the start
@@ -1529,7 +1530,11 @@ runqueue(forkflag, verbose, persistent, runall)
** increase if some queue runners "hang" for a long time.
*/
+ /* don't let proc_list_drop() change CurRunners */
+ wasblocked = sm_blocksignal(SIGCHLD);
CurRunners += WorkGrp[curnum].wg_maxact;
+ if (wasblocked == 0)
+ (void) sm_releasesignal(SIGCHLD);
if (forkflag)
rwgflags |= RWG_FORK;
if (verbose)
@@ -1549,7 +1554,13 @@ runqueue(forkflag, verbose, persistent, runall)
if (!ret)
{
+ /* don't let proc_list_drop() change CurRunners */
+ wasblocked = sm_blocksignal(SIGCHLD);
CurRunners -= WorkGrp[curnum].wg_maxact;
+ CHK_CUR_RUNNERS("runqueue", curnum,
+ WorkGrp[curnum].wg_maxact);
+ if (wasblocked == 0)
+ (void) sm_releasesignal(SIGCHLD);
break;
}
@@ -2031,6 +2042,9 @@ run_work_group(wgrp, flags)
{
IgnoreHostStatus = true;
MinQueueAge = 0;
+#if _FFR_EXPDELAY
+ MaxQueueAge = 0;
+#endif /* _FFR_EXPDELAY */
}
/*
@@ -2300,7 +2314,7 @@ run_work_group(wgrp, flags)
if (bitset(RWG_PERSISTENT, flags))
{
sequenceno = 1;
- sm_setproctitle(true, CurEnv, "running queue: %s",
+ sm_setproctitle(true, NULL, "running queue: %s",
qid_printqueue(qgrp, qdir));
/*
@@ -2860,7 +2874,7 @@ gatherq(qgrp, qdir, doall, full, more, pnentries)
#if _FFR_EXPDELAY
if (MaxQueueAge > 0)
{
- time_t lasttry, delay;
+ time_t lasttry, delay;
lasttry = (time_t) atol(&lbuf[1]);
delay = MIN(lasttry - w->w_ctime,
@@ -3704,6 +3718,7 @@ dowork(qgrp, qdir, id, forkflag, requeueflag, e)
(void) dropenvelope(e, true, false);
sm_rpool_free(rpool);
e->e_rpool = NULL;
+ e->e_message = NULL;
}
}
e->e_id = NULL;
@@ -4577,7 +4592,7 @@ readqf(e, openonly)
e->e_dfdev = st.st_dev;
e->e_dfino = ST_INODE(st);
(void) sm_snprintf(buf, sizeof(buf), "%ld",
- e->e_msgsize);
+ PRT_NONNEGL(e->e_msgsize));
macdefine(&e->e_macro, A_TEMP, macid("{msg_size}"),
buf);
}
diff --git a/contrib/sendmail/src/sasl.c b/contrib/sendmail/src/sasl.c
index c3f561d..0e4e8e1 100644
--- a/contrib/sendmail/src/sasl.c
+++ b/contrib/sendmail/src/sasl.c
@@ -9,7 +9,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Id: sasl.c,v 8.22 2006/08/15 23:24:57 ca Exp $")
+SM_RCSID("@(#)$Id: sasl.c,v 8.23 2012/11/27 18:53:13 gshapiro Exp $")
#if SASL
# include <stdlib.h>
@@ -20,15 +20,15 @@ SM_RCSID("@(#)$Id: sasl.c,v 8.22 2006/08/15 23:24:57 ca Exp $")
** In order to ensure that storage leaks are tracked, and to prevent
** conflicts between the sm_heap package and sasl, we tell sasl to
** use the following heap allocation functions. Unfortunately,
-** the sasl package incorrectly specifies the size of a block
+** older sasl packages incorrectly specifies the size of a block
** using unsigned long: for portability, it should be size_t.
*/
-#if defined(SASL_VERSION_FULL) && SASL_VERSION_FULL >= 0x02011a
-#define SM_SASL_SIZE_T size_t
-#else /* defined(SASL_VERSION_FULL) && SASL_VERSION_FULL >= 0x02011a */
-#define SM_SASL_SIZE_T unsigned long
-#endif /* defined(SASL_VERSION_FULL) && SASL_VERSION_FULL >= 0x02011a */
+# if defined(SASL_VERSION_FULL) && SASL_VERSION_FULL >= 0x02011a
+# define SM_SASL_SIZE_T size_t
+# else /* defined(SASL_VERSION_FULL) && SASL_VERSION_FULL >= 0x02011a */
+# define SM_SASL_SIZE_T unsigned long
+# endif /* defined(SASL_VERSION_FULL) && SASL_VERSION_FULL >= 0x02011a */
void *sm_sasl_malloc __P((SM_SASL_SIZE_T));
static void *sm_sasl_calloc __P((SM_SASL_SIZE_T, SM_SASL_SIZE_T));
diff --git a/contrib/sendmail/src/savemail.c b/contrib/sendmail/src/savemail.c
index 4178245..2413281 100644
--- a/contrib/sendmail/src/savemail.c
+++ b/contrib/sendmail/src/savemail.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Id: savemail.c,v 8.314 2009/12/18 17:08:01 ca Exp $")
+SM_RCSID("@(#)$Id: savemail.c,v 8.315 2012/02/27 17:43:03 gshapiro Exp $")
static bool errbody __P((MCI *, ENVELOPE *, char *));
static bool pruneroute __P((char *));
@@ -506,6 +506,7 @@ returntosender(msg, returnq, flags, e)
int flags;
register ENVELOPE *e;
{
+ int ret;
register ENVELOPE *ee;
ENVELOPE *oldcur = CurEnv;
ENVELOPE errenvelope;
@@ -703,24 +704,35 @@ returntosender(msg, returnq, flags, e)
/* actually deliver the error message */
sendall(ee, SM_DELIVER);
-
- /* restore state */
(void) dropenvelope(ee, true, false);
- sm_rpool_free(ee->e_rpool);
- CurEnv = oldcur;
- returndepth--;
/* check for delivery errors */
+ ret = -1;
if (ee->e_parent == NULL ||
!bitset(EF_RESPONSE, ee->e_parent->e_flags))
- return 0;
- for (q = ee->e_sendqueue; q != NULL; q = q->q_next)
{
- if (QS_IS_ATTEMPTED(q->q_state))
- return 0;
+ ret = 0;
}
- return -1;
+ else
+ {
+ for (q = ee->e_sendqueue; q != NULL; q = q->q_next)
+ {
+ if (QS_IS_ATTEMPTED(q->q_state))
+ {
+ ret = 0;
+ break;
+ }
+ }
+ }
+
+ /* restore state */
+ sm_rpool_free(ee->e_rpool);
+ CurEnv = oldcur;
+ returndepth--;
+
+ return ret;
}
+
/*
** ERRBODY -- output the body of an error message.
**
diff --git a/contrib/sendmail/src/sendmail.h b/contrib/sendmail/src/sendmail.h
index ecb3fa3..e114019 100644
--- a/contrib/sendmail/src/sendmail.h
+++ b/contrib/sendmail/src/sendmail.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2011 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2012 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@@ -52,7 +52,7 @@
#ifdef _DEFINE
# ifndef lint
-SM_UNUSED(static char SmailId[]) = "@(#)$Id: sendmail.h,v 8.1089 2011/03/15 23:14:36 ca Exp $";
+SM_UNUSED(static char SmailId[]) = "@(#)$Id: sendmail.h,v 8.1096 2012/11/16 20:25:03 ca Exp $";
# endif /* ! lint */
#endif /* _DEFINE */
@@ -946,6 +946,8 @@ struct envelope
#endif /* _FFR_MILTER_ENHSC */
};
+#define PRT_NONNEGL(v) ((v) < 0 ? LONG_MAX : (v))
+
/* values for e_flags */
#define EF_OLDSTYLE 0x00000001L /* use spaces (not commas) in hdrs */
#define EF_INQUEUE 0x00000002L /* this message is fully queued */
@@ -1486,7 +1488,6 @@ struct symtab
union
{
BITMAP256 sv_class; /* bit-map of word classes */
- ADDRESS *sv_addr; /* pointer to address header */
MAILER *sv_mailer; /* pointer to mailer */
char *sv_alias; /* alias */
MAPCLASS sv_mapclass; /* mapping function class */
@@ -1516,7 +1517,7 @@ typedef struct symtab STAB;
/* symbol types */
#define ST_UNDEF 0 /* undefined type */
#define ST_CLASS 1 /* class map */
-#define ST_ADDRESS 2 /* an address in parsed format */
+/* #define ST_unused 2 UNUSED */
#define ST_MAILER 3 /* a mailer header */
#define ST_ALIAS 4 /* an alias */
#define ST_MAPCLASS 5 /* mapping function class */
@@ -1543,7 +1544,6 @@ typedef struct symtab STAB;
#define ST_MCI 17 /* mailer connection info (offset) */
#define s_class s_value.sv_class
-#define s_address s_value.sv_addr
#define s_mailer s_value.sv_mailer
#define s_alias s_value.sv_alias
#define s_mci s_value.sv_mci
@@ -1785,6 +1785,8 @@ struct milter
char *mf_conn; /* connection info */
int mf_sock; /* connected socket */
char mf_state; /* state of filter */
+ char mf_lflags; /* "local" flags */
+ int mf_idx; /* milter number (index) */
time_t mf_timeout[SMFTO_NUM_TO]; /* timeouts */
#if _FFR_MILTER_CHECK
/* for testing only */
@@ -1794,6 +1796,9 @@ struct milter
#endif /* _FFR_MILTER_CHECK */
};
+#define MI_LFL_NONE 0x00000000
+#define MI_LFLAGS_SYM(st) (1 << (st)) /* has its own symlist for stage st */
+
struct milters
{
mi_int32 mis_flags; /* filter flags */
@@ -2241,6 +2246,19 @@ extern unsigned char tTdvect[100]; /* trace vector */
# define CHECK_RESTART _CHECK_RESTART
+#define CHK_CUR_RUNNERS(fct, idx, count) \
+ do \
+ { \
+ if (CurRunners < 0) \
+ { \
+ if (LogLevel > 3) \
+ sm_syslog(LOG_ERR, NOQID, \
+ "%s: CurRunners=%d, i=%d, count=%d, status=should not happen", \
+ fct, CurRunners, idx, count); \
+ CurRunners = 0; \
+ } \
+ } while (0)
+
/* reply types (text in SmtpMsgBuffer) */
#define XS_DEFAULT 0
#define XS_STARTTLS 1
diff --git a/contrib/sendmail/src/srvrsmtp.c b/contrib/sendmail/src/srvrsmtp.c
index 1e6a5d2..c4c045b 100644
--- a/contrib/sendmail/src/srvrsmtp.c
+++ b/contrib/sendmail/src/srvrsmtp.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2010 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2010, 2012 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@@ -17,7 +17,7 @@
# include <libmilter/mfdef.h>
#endif /* MILTER */
-SM_RCSID("@(#)$Id: srvrsmtp.c,v 8.1008 2011/01/12 23:52:59 ca Exp $")
+SM_RCSID("@(#)$Id: srvrsmtp.c,v 8.1011 2012/12/19 02:49:21 ca Exp $")
#include <sm/time.h>
#include <sm/fdset.h>
@@ -30,6 +30,7 @@ SM_RCSID("@(#)$Id: srvrsmtp.c,v 8.1008 2011/01/12 23:52:59 ca Exp $")
static int saslmechs __P((sasl_conn_t *, char **));
#endif /* SASL */
#if STARTTLS
+# include <openssl/err.h>
# include <sysexits.h>
static SSL_CTX *srv_ctx = NULL; /* TLS server context */
@@ -1914,11 +1915,18 @@ smtp(nullserver, d_flags, e)
if (LogLevel > 5)
{
+ unsigned long l;
+ const char *sr;
+
+ l = ERR_peek_error();
+ sr = ERR_reason_error_string(l);
sm_syslog(LOG_WARNING, NOQID,
- "STARTTLS=server, error: accept failed=%d, SSL_error=%d, errno=%d, retry=%d, relay=%.100s",
- r, ssl_err, errno, i,
+ "STARTTLS=server, error: accept failed=%d, reason=%s, SSL_error=%d, errno=%d, retry=%d, relay=%.100s",
+ r, sr == NULL ? "unknown"
+ : sr,
+ ssl_err, errno, i,
CurSmtpClient);
- if (LogLevel > 8)
+ if (LogLevel > 9)
tlslogerr("server");
}
tls_ok_srv = false;
@@ -3481,7 +3489,7 @@ smtp_data(smtp, e)
collect(InChannel, true, NULL, e, true);
/* redefine message size */
- (void) sm_snprintf(buf, sizeof(buf), "%ld", e->e_msgsize);
+ (void) sm_snprintf(buf, sizeof(buf), "%ld", PRT_NONNEGL(e->e_msgsize));
macdefine(&e->e_macro, A_TEMP, macid("{msg_size}"), buf);
/* rscheck() will set Errors or EF_DISCARD if it trips */
@@ -3559,7 +3567,7 @@ smtp_data(smtp, e)
}
/* Milter may have changed message size */
- (void) sm_snprintf(buf, sizeof(buf), "%ld", e->e_msgsize);
+ (void) sm_snprintf(buf, sizeof(buf), "%ld", PRT_NONNEGL(e->e_msgsize));
macdefine(&e->e_macro, A_TEMP, macid("{msg_size}"), buf);
/* abort message filters that didn't get the body & log msg is OK */
diff --git a/contrib/sendmail/src/stab.c b/contrib/sendmail/src/stab.c
index 6dacdfa..1c4c0c1 100644
--- a/contrib/sendmail/src/stab.c
+++ b/contrib/sendmail/src/stab.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Id: stab.c,v 8.89 2006/08/15 23:24:58 ca Exp $")
+SM_RCSID("@(#)$Id: stab.c,v 8.91 2011/08/08 17:33:34 ca Exp $")
/*
** STAB -- manage the symbol table
@@ -65,7 +65,7 @@ stab(name, type, op)
sm_dprintf("(hfunc=%d) ", hfunc);
ps = &SymTab[hfunc];
- if (type == ST_MACRO || type == ST_RULESET)
+ if (type == ST_MACRO || type == ST_RULESET || type == ST_NAMECANON)
{
while ((s = *ps) != NULL &&
(s->s_symtype != type || strcmp(name, s->s_name)))
@@ -113,10 +113,6 @@ stab(name, type, op)
len = sizeof(s->s_class);
break;
- case ST_ADDRESS:
- len = sizeof(s->s_address);
- break;
-
case ST_MAILER:
len = sizeof(s->s_mailer);
break;
diff --git a/contrib/sendmail/src/util.c b/contrib/sendmail/src/util.c
index ab491fb..9bc28ec 100644
--- a/contrib/sendmail/src/util.c
+++ b/contrib/sendmail/src/util.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Id: util.c,v 8.416 2009/12/18 17:05:26 ca Exp $")
+SM_RCSID("@(#)$Id: util.c,v 8.425 2012/03/03 00:10:43 ca Exp $")
#include <sm/sendmail.h>
#include <sysexits.h>
@@ -2638,7 +2638,13 @@ proc_list_drop(pid, st, other)
mark_work_group_restart(ProcListVec[i].proc_other, st);
}
else if (type == PROC_QUEUE)
+ {
CurRunners -= ProcListVec[i].proc_count;
+
+ /* CHK_CUR_RUNNERS() can't be used here: uses syslog() */
+ if (CurRunners < 0)
+ CurRunners = 0;
+ }
}
/*
@@ -2702,6 +2708,14 @@ proc_list_probe()
(int) ProcListVec[i].proc_pid);
ProcListVec[i].proc_pid = NO_PID;
SM_FREE_CLR(ProcListVec[i].proc_task);
+
+ if (ProcListVec[i].proc_type == PROC_QUEUE)
+ {
+ CurRunners -= ProcListVec[i].proc_count;
+ CHK_CUR_RUNNERS("proc_list_probe", i,
+ ProcListVec[i].proc_count);
+ }
+
CurChildren--;
}
else
@@ -2852,3 +2866,4 @@ count_open_connections(hostaddr)
}
return n;
}
+
diff --git a/contrib/sendmail/src/version.c b/contrib/sendmail/src/version.c
index 4f156c2..2e9fe48 100644
--- a/contrib/sendmail/src/version.c
+++ b/contrib/sendmail/src/version.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2011 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2012 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@@ -13,6 +13,6 @@
#include <sm/gen.h>
-SM_RCSID("@(#)$Id: version.c,v 8.227 2011/04/26 23:02:35 ca Exp $")
+SM_RCSID("@(#)$Id: version.c,v 8.235 2012/12/19 05:11:44 ca Exp $")
-char Version[] = "8.14.5";
+char Version[] = "8.14.6";
diff --git a/contrib/tcp_wrappers/Makefile b/contrib/tcp_wrappers/Makefile
index 10ede81..e697396 100644
--- a/contrib/tcp_wrappers/Makefile
+++ b/contrib/tcp_wrappers/Makefile
@@ -139,7 +139,7 @@ epix:
freebsd:
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
- RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP=-DNETGROUP TLI= \
+ RANLIB=ranlib ARFLAGS=$(ARFLAGS) AUX_OBJ= NETGROUP=-DNETGROUP TLI= \
EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DINET6 -DUSE_GETIPNODEBY" \
VSYSLOG= all
@@ -401,7 +401,7 @@ machten:
RANLIB = ranlib # have ranlib (BSD-ish UNIX)
#RANLIB = echo # no ranlib (SYSV-ish UNIX)
-ARFLAGS = rv # most systems
+ARFLAGS ?= rv # most systems
#ARFLAGS= rvs # IRIX 4.0.x
AR = ar
diff --git a/contrib/tcpdump/Makefile.in b/contrib/tcpdump/Makefile.in
index 3b589dc..f3bafd2 100644
--- a/contrib/tcpdump/Makefile.in
+++ b/contrib/tcpdump/Makefile.in
@@ -366,7 +366,7 @@ $(PROG): $(OBJ) @V_PCAPDEP@
$(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
@rm -f $@
- $(AR) cr $@ $(LIBNETDISSECT_OBJ)
+ $(AR) $(ARFLAGS) $@ $(LIBNETDISSECT_OBJ)
$(RANLIB) $@
datalinks.o: $(srcdir)/missing/datalinks.c
diff --git a/contrib/top/top.h b/contrib/top/top.h
index a281957..c51485a 100644
--- a/contrib/top/top.h
+++ b/contrib/top/top.h
@@ -14,7 +14,7 @@
extern int Header_lines; /* 7 */
/* Maximum number of columns allowed for display */
-#define MAX_COLS 128
+#define MAX_COLS 512
/* Log base 2 of 1024 is 10 (2^10 == 1024) */
#define LOG1024 10
diff --git a/contrib/xz/AUTHORS b/contrib/xz/AUTHORS
index 63a9815..bda8797 100644
--- a/contrib/xz/AUTHORS
+++ b/contrib/xz/AUTHORS
@@ -16,11 +16,11 @@ Authors of XZ Utils
Some scripts have been adapted from gzip. The original versions
were written by Jean-loup Gailly, Charles Levert, and Paul Eggert.
- Andrew Dudman helped adapting the script and their man pages for
+ Andrew Dudman helped adapting the scripts and their man pages for
XZ Utils.
- The GNU Autotools based build system contains files from many authors,
- which I'm not trying list here.
+ The GNU Autotools-based build system contains files from many authors,
+ which I'm not trying to list here.
Several people have contributed fixes or reported bugs. Most of them
are mentioned in the file THANKS.
diff --git a/contrib/xz/ChangeLog b/contrib/xz/ChangeLog
index 0746422..140106e 100644
--- a/contrib/xz/ChangeLog
+++ b/contrib/xz/ChangeLog
@@ -1,3 +1,335 @@
+commit 20778053a07eb90c159c1377ca8dc05a90fd530b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Fri Jun 22 14:36:16 2012 +0300
+
+ xz: Update man page date to match the latest update.
+
+commit 2cefa84af676da37d7e9c466d55d46c67ab00c22
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Fri Jun 22 10:25:43 2012 +0300
+
+ Bump version and soname for 5.0.4.
+
+commit 433fec191a17e45690809e54146ea7a773f54cff
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Fri Jun 22 10:25:09 2012 +0300
+
+ Update NEWS for 5.0.4.
+
+commit 711fa680f552a4003df73b37e6dc4d6e00b47bcd
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Mon Jun 18 21:27:47 2012 +0300
+
+ Docs: Language fix to 01_compress_easy.c.
+
+ Thanks to Jonathan Nieder.
+
+commit 3d7ab1dc61a75c560828be5df96598388b771456
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Thu Jun 14 20:15:30 2012 +0300
+
+ Fix the top-level Makefile.am for the new example programs.
+
+commit ef8b8e5f111469b5bc005975f7abb9abbd372b25
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Thu Jun 14 10:52:33 2012 +0300
+
+ Docs: Add new example programs.
+
+ These have more comments than the old examples and
+ human-readable error messages. More tutorial-like examples
+ are needed but these are a start.
+
+commit 75c149bc8045a26f8bc719cb8ed20668dab79091
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Thu Jun 14 10:33:27 2012 +0300
+
+ Docs: Move xz_pipe_comp.c and xz_pipe_decomp.c to doc/examples_old.
+
+ It is good to keep these around to so that if someone has
+ copied the decompressor bug from xz_pipe_decomp.c he has
+ an example how to easily fix it.
+
+commit 456307ebf947a5f50bd995d617b99c1215572308
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Thu Jun 14 10:33:01 2012 +0300
+
+ Docs: Fix a bug in xz_pipe_decomp.c example program.
+
+commit 4c310b8a29bc257e6ccbd2310f12f258678f3fef
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Thu May 31 15:53:25 2012 +0300
+
+ Translations: Update the Italian translation.
+
+ Thanks to Milo Casagrande.
+
+commit ec32b79366dc47a55ea877589df9e8509ba113a7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Wed May 30 23:15:07 2012 +0300
+
+ Translations: Update the French translation.
+
+ Thanks to Adrien Nader.
+
+commit dd06f40e4dd7649525e4f28d890dc238a3aa37e5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Tue May 29 22:26:27 2012 +0300
+
+ Translations: Update the German translation.
+
+commit c66808d1f55d0149ed57c536cc9b52e9c8b583bc
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Tue May 29 22:12:57 2012 +0300
+
+ Translations: Update Polish translation.
+
+commit 556c22dfed195c1466b298183b850d6c28544900
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Tue May 29 13:10:36 2012 +0300
+
+ Preliminary NEWS for 5.0.4.
+
+commit dd13b66bf582f49d3aec36e3410ff8541b7506da
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Mon May 28 20:42:11 2012 +0300
+
+ liblzma: Fix possibility of incorrect LZMA_BUF_ERROR.
+
+ lzma_code() could incorrectly return LZMA_BUF_ERROR if
+ all of the following was true:
+
+ - The caller knows how many bytes of output to expect
+ and only provides that much output space.
+
+ - When the last output bytes are decoded, the
+ caller-provided input buffer ends right before
+ the LZMA2 end of payload marker. So LZMA2 won't
+ provide more output anymore, but it won't know it
+ yet and thus won't return LZMA_STREAM_END yet.
+
+ - A BCJ filter is in use and it hasn't left any
+ unfiltered bytes in the temp buffer. This can happen
+ with any BCJ filter, but in practice it's more likely
+ with filters other than the x86 BCJ.
+
+ Another situation where the bug can be triggered happens
+ if the uncompressed size is zero bytes and no output space
+ is provided. In this case the decompression can fail even
+ if the whole input file is given to lzma_code().
+
+ A similar bug was fixed in XZ Embedded on 2011-09-19.
+
+commit a0223bf796fdaad51a11ad02c4195c694849cc78
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Mon May 28 15:38:32 2012 +0300
+
+ Update THANKS.
+
+commit 86e57e4bfefe3fd8e13615c41604165bb2359501
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Mon May 28 15:37:43 2012 +0300
+
+ xz: Don't show a huge number in -vv when memory limit is disabled.
+
+commit 13e44a94da19d1ef14832ff12d3877a6fd2c54c0
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Sun May 27 22:30:17 2012 +0300
+
+ xz: Document the "summary" lines of --robot -lvv.
+
+ This documents only the columns that are in v5.0.
+ The new columns added in the master branch aren't
+ necessarily stable yet.
+
+commit 2f90345e13ab8fea4de45a4f1caa73ebc63a62e7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Sun May 27 21:53:20 2012 +0300
+
+ xz: Fix output of verbose --robot --list modes.
+
+ It printed the filename in "filename (x/y)" format
+ which it obviously shouldn't do in robot mode.
+
+commit 8d4864f53ffae5d862c691a0b334a6b69bc5366e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Thu May 10 21:15:17 2012 +0300
+
+ Update THANKS.
+
+commit 35e9c58abb0ce3993da844aaeaa3e7231cd2be8f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Thu May 10 21:14:16 2012 +0300
+
+ Docs: Cleanup line wrapping a bit.
+
+commit 532b3e4c568a228309b56f95c13435fd078dbe02
+Author: Benno Schulenberg <bensberg@justemail.net>
+Date: Tue Mar 13 22:04:04 2012 +0100
+
+ Fix a few typos and add some missing articles in some documents.
+
+ Also hyphenate several compound adjectives.
+
+ Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
+
+commit afb6ce8c82ffef8f2505a3759da72a733c7b0b8f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Sun Apr 29 11:51:25 2012 +0300
+
+ Windows: Update notes about static linking with MSVC.
+
+commit 7c3ba2ed5c3c878d4a14ca549b46dbff60c6d565
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Thu Apr 19 15:25:26 2012 +0300
+
+ liblzma: Remove outdated comments.
+
+commit f55db9c187651094f43881c49db2b2d9ffee6b80
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Thu Apr 19 14:17:52 2012 +0300
+
+ DOS: Link against DJGPP's libemu to support FPU emulation.
+
+ This way xz should work on 386SX and 486SX. Floating point
+ only is needed for verbose output in xz.
+
+commit 203edff4c761dbd7cac76ea66e4eed501c23e7a3
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Thu Apr 19 13:58:55 2012 +0300
+
+ Docs: Update MINIX 3 information in INSTALL.
+
+commit f0a8f95c215628967b7cf9bd9b0a9e4172f50bb4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Wed Feb 22 14:23:13 2012 +0200
+
+ Update THANKS.
+
+commit b7ad23fa78646036c0290cd91eada939c9a31526
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Wed Feb 22 14:02:34 2012 +0200
+
+ Fix exit status of xzgrep when grepping binary files.
+
+ When grepping binary files, grep may exit before it has
+ read all the input. In this case, gzip -q returns 2 (eating
+ SIGPIPE), but xz and bzip2 show SIGPIPE as the exit status
+ (e.g. 141). This causes wrong exit status when grepping
+ xz- or bzip2-compressed binary files.
+
+ The fix checks for the special exit status that indicates SIGPIPE.
+ It uses kill -l which should be supported everywhere since it
+ is in both SUSv2 (1997) and POSIX.1-2008.
+
+ Thanks to James Buren for the bug report.
+
+commit 4e19fbb04a0035030406482319e264426459eb24
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Wed Feb 22 12:08:43 2012 +0200
+
+ Update THANKS.
+
+commit c6fa03a427e3d1320794102cee3ff4f5ae00eb36
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Thu May 24 18:47:52 2012 +0300
+
+ Fix compiling with IBM XL C on AIX.
+
+commit 7b6ffc98645e1b3b302b6680be0a901d1ebf7358
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Thu May 24 18:37:08 2012 +0300
+
+ Build: Upgrade m4/acx_pthread.m4 to the latest version.
+
+ It was renamed to ax_pthread.m4 in Autoconf Archive.
+
+commit bfac2be5023994fcc53de2844e7dd3af61910dc2
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Tue Jan 10 17:13:03 2012 +0200
+
+ Tests: Fix a compiler warning with _FORTIFY_SOURCE.
+
+ Reported here:
+ http://sourceforge.net/projects/lzmautils/forums/forum/708858/topic/4927385
+
+commit df85e156716a4eecb7e2978691f03f729444d998
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Mon Dec 19 21:21:29 2011 +0200
+
+ Docs: Explain the stable releases better in README.
+
+commit d06d32f108c8278c25c24b2e8666bda7b2ec23b5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Fri Nov 4 17:57:16 2011 +0200
+
+ xz: Fix a typo in a comment.
+
+ Thanks to Bela Lubkin.
+
+commit 636fdcfbf542f1e84db2c4736004d84be4b12c84
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Thu Nov 3 17:08:02 2011 +0200
+
+ Update THANKS.
+
+commit 55fd02f83ecd6cbd6925a3e8a3d43b8d4ef2a17c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Thu Nov 3 17:07:22 2011 +0200
+
+ xz: Fix xz on EBCDIC systems.
+
+ Thanks to Chris Donawa.
+
+commit 4052f36053b931bad847a36aabf1a07d0034e297
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Tue Sep 6 12:03:41 2011 +0300
+
+ Build: Fix "make check" on Windows.
+
+commit 0f25758459c74c366a73f35d47ee12b75890bb79
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Tue Aug 9 21:19:13 2011 +0300
+
+ Update THANKS.
+
+commit 70f03b51ffcb783646b20de8d97b6986c4280eec
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Tue Aug 9 21:16:44 2011 +0300
+
+ Workaround unusual SIZE_MAX on SCO OpenServer.
+
+commit f138bdf76a70029e8360062a0b227936b83b24c9
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Sat Aug 6 20:37:28 2011 +0300
+
+ Run the scripts with the correct shell in test_scripts.sh.
+
+ The scripts are now made executable in the build tree.
+ This way the scripts can be run like programs in
+ test_scripts.sh. Previously test_scripts.sh always
+ used sh but it's not correct if @POSIX_SHELL@ is set
+ to something else by configure.
+
+ Thanks to Jonathan Nieder for the patch.
+
+commit 2c144a0365c84dbf1b6722466746d42f2563a319
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: Sun Jul 31 11:01:47 2011 +0300
+
+ Fix exit status of "xzdiff foo.xz bar.xz".
+
+ xzdiff was clobbering the exit status from diff in a case
+ statement used to analyze the exit statuses from "xz" when
+ its operands were two compressed files. Save and restore
+ diff's exit status to fix this.
+
+ The bug is inherited from zdiff in GNU gzip and was fixed
+ there on 2009-10-09.
+
+ Thanks to Jonathan Nieder for the patch and
+ to Peter Pallinger for reporting the bug.
+
commit edf339227a966f24aebe1845fcca9429b8f6e318
Author: Anders F Bjorklund <afb@users.sourceforge.net>
Date: Fri Nov 5 12:56:11 2010 +0100
diff --git a/contrib/xz/README b/contrib/xz/README
index d6cfda7..1b02f05 100644
--- a/contrib/xz/README
+++ b/contrib/xz/README
@@ -5,7 +5,7 @@ XZ Utils
0. Overview
1. Documentation
1.1. Overall documentation
- 1.2. Documentation for command line tools
+ 1.2. Documentation for command-line tools
1.3. Documentation for liblzma
2. Version numbering
3. Reporting bugs
@@ -17,21 +17,21 @@ XZ Utils
0. Overview
-----------
- XZ Utils provide a general-purpose data compression library and
- command line tools. The native file format is the .xz format, but
+ XZ Utils provide a general-purpose data-compression library plus
+ command-line tools. The native file format is the .xz format, but
also the legacy .lzma format is supported. The .xz format supports
- multiple compression algorithms, which are called "filters" in
+ multiple compression algorithms, which are called "filters" in the
context of XZ Utils. The primary filter is currently LZMA2. With
typical files, XZ Utils create about 30 % smaller files than gzip.
To ease adapting support for the .xz format into existing applications
and scripts, the API of liblzma is somewhat similar to the API of the
- popular zlib library. For the same reason, the command line tool xz
- has similar command line syntax than that of gzip.
+ popular zlib library. For the same reason, the command-line tool xz
+ has a command-line syntax similar to that of gzip.
- When aiming for the highest compression ratio, LZMA2 encoder uses
+ When aiming for the highest compression ratio, the LZMA2 encoder uses
a lot of CPU time and may use, depending on the settings, even
- hundreds of megabytes of RAM. However, in fast modes, LZMA2 encoder
+ hundreds of megabytes of RAM. However, in fast modes, the LZMA2 encoder
competes with bzip2 in compression speed, RAM usage, and compression
ratio.
@@ -44,8 +44,8 @@ XZ Utils
since that needs to be done only once to benefit many people.
With some file types, combining (or "chaining") LZMA2 with an
- additional filter can improve compression ratio. A filter chain may
- contain up to four filters, although usually only one two is used.
+ additional filter can improve the compression ratio. A filter chain may
+ contain up to four filters, although usually only one or two are used.
For example, putting a BCJ (Branch/Call/Jump) filter before LZMA2
in the filter chain can improve compression ratio of executable files.
@@ -88,9 +88,9 @@ XZ Utils
packages.
-1.2. Documentation for command line tools
+1.2. Documentation for command-line tools
- The command line tools are documented as man pages. In source code
+ The command-line tools are documented as man pages. In source code
releases (and possibly also in some binary packages), the man pages
are also provided in plain text (ASCII only) and PDF formats in the
directory "doc/man" to make the man pages more accessible to those
@@ -109,8 +109,8 @@ XZ Utils
written yet.
For now, if you have never used liblzma, libbzip2, or zlib, I
- recommend learning *basics* of zlib API. Once you know that, it
- should be easier to learn liblzma.
+ recommend learning the *basics* of the zlib API. Once you know that,
+ it should be easier to learn liblzma.
http://zlib.net/manual.html
http://zlib.net/zlib_how.html
@@ -124,23 +124,27 @@ XZ Utils
- X is the major version. When this is incremented, the library
API and ABI break.
- - Y is the minor version. It is incremented when new features are
- added without breaking existing API or ABI. Even Y indicates
- stable release and odd Y indicates unstable (alpha or beta
- version).
+ - Y is the minor version. It is incremented when new features
+ are added without breaking the existing API or ABI. An even Y
+ indicates a stable release and an odd Y indicates unstable
+ (alpha or beta version).
- - Z is the revision. This has different meaning for stable and
+ - Z is the revision. This has a different meaning for stable and
unstable releases:
+
* Stable: Z is incremented when bugs get fixed without adding
- any new features.
+ any new features. This is intended to be convenient for
+ downstream distributors that want bug fixes but don't want
+ any new features to minimize the risk of introducing new bugs.
+
* Unstable: Z is just a counter. API or ABI of features added
in earlier unstable releases having the same X.Y may break.
- S indicates stability of the release. It is missing from the
- stable releases where Y is an even number. When Y is odd, S
+ stable releases, where Y is an even number. When Y is odd, S
is either "alpha" or "beta" to make it very clear that such
versions are not stable releases. The same X.Y.Z combination is
- not used for more than one stability level i.e. after X.Y.Zalpha,
+ not used for more than one stability level, i.e. after X.Y.Zalpha,
the next version can be X.Y.(Z+1)beta but not X.Y.Zbeta.
@@ -176,7 +180,7 @@ XZ Utils
Don't send core dump files or any executables. If you have a small
example file(s) (total size less than 256 KiB), please include
it/them as an attachment. If you have bigger test files, put them
- online somewhere and include an URL to the file(s) in the bug report.
+ online somewhere and include a URL to the file(s) in the bug report.
Always include the exact version number of XZ Utils in the bug report.
If you are using a snapshot from the git repository, use "git describe"
@@ -193,7 +197,7 @@ XZ Utils
The messages from the xz tool have been translated into a few
languages. Before starting to translate into a new language, ask
- the author that someone else hasn't already started working on it.
+ the author whether someone else hasn't already started working on it.
Test your translation. Testing includes comparing the translated
output to the original English version by running the same commands
@@ -214,7 +218,7 @@ XZ Utils
Note especially the following:
- The output of --help and --long-help must look nice on
- a 80-column terminal. It's OK to add extra lines if needed.
+ an 80-column terminal. It's OK to add extra lines if needed.
- In contrast, don't add extra lines to error messages and such.
They are often preceded with e.g. a filename on the same line,
diff --git a/contrib/xz/THANKS b/contrib/xz/THANKS
index 70303e0..b13503e 100644
--- a/contrib/xz/THANKS
+++ b/contrib/xz/THANKS
@@ -14,16 +14,19 @@ has been important. :-) In alphabetical order:
- Jakub Bogusz
- Maarten Bosmans
- Trent W. Buck
+ - James Buren
- David Burklund
- Daniel Mealha Cabrita
- Milo Casagrande
- Marek Černocký
+ - Chris Donawa
- Andrew Dudman
- Markus Duft
- İsmail Dönmez
- Robert Elz
- Gilles Espinasse
- Denis Excoffier
+ - Michael Felt
- Mike Frysinger
- Jason Gorski
- Juan Manuel Guerrero
@@ -38,8 +41,10 @@ has been important. :-) In alphabetical order:
- Peter Lawler
- Hin-Tak Leung
- Andraž 'ruskie' Levstik
+ - Cary Lewis
- Wim Lewis
- Lorenzo De Liso
+ - Bela Lubkin
- Gregory Margo
- Jim Meyering
- Rafał Mużyło
@@ -48,6 +53,7 @@ has been important. :-) In alphabetical order:
- Jonathan Nieder
- Andre Noll
- Peter O'Gorman
+ - Peter Pallinger
- Igor Pavlov
- Diego Elio Pettenò
- Elbert Pol
@@ -58,6 +64,7 @@ has been important. :-) In alphabetical order:
- Christian von Roques
- Jukka Salmi
- Alexandre Sauvé
+ - Benno Schulenberg
- Andreas Schwab
- Dan Shechter
- Stuart Shelton
diff --git a/contrib/xz/po/de.po b/contrib/xz/po/de.po
index d88b8cd..2427814 100644
--- a/contrib/xz/po/de.po
+++ b/contrib/xz/po/de.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: XZ Utils 4.999.9beta\n"
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
-"POT-Creation-Date: 2010-09-11 17:07+0200\n"
+"POT-Creation-Date: 2012-05-29 17:20+0200\n"
"PO-Revision-Date: 2010-09-07 20:27+0200\n"
"Last-Translator: <maan@systemlinux.org>\n"
"Language-Team: German\n"
@@ -96,7 +96,7 @@ msgid "%s: File seems to have been moved, not removing"
msgstr ""
"%s: Datei scheint umbenannt worden zu sein, daher wird sie nicht gelöscht"
-#: src/xz/file_io.c:144 src/xz/file_io.c:590
+#: src/xz/file_io.c:144 src/xz/file_io.c:589
#, c-format
msgid "%s: Cannot remove: %s"
msgstr "%s: Kann nicht löschen: %s"
@@ -126,59 +126,59 @@ msgstr "%s: Ãœberspringe symbolischen Verweis"
msgid "%s: Is a directory, skipping"
msgstr "%s: Ãœberspringe Verzeichnis"
-#: src/xz/file_io.c:462
+#: src/xz/file_io.c:461
#, c-format
msgid "%s: Not a regular file, skipping"
msgstr "%s: Keine reguläre Datei, überspringe"
-#: src/xz/file_io.c:479
+#: src/xz/file_io.c:478
#, c-format
msgid "%s: File has setuid or setgid bit set, skipping"
msgstr "%s: Datei hat das setuid oder setgid Bit gesetzt, überspringe"
-#: src/xz/file_io.c:486
+#: src/xz/file_io.c:485
#, c-format
msgid "%s: File has sticky bit set, skipping"
msgstr "%s: Datei hat sticky Bit gesetzt, überspringe"
-#: src/xz/file_io.c:493
+#: src/xz/file_io.c:492
#, c-format
msgid "%s: Input file has more than one hard link, skipping"
msgstr "%s: Eingabedatei hat mehr als einen hard link, überspringe"
-#: src/xz/file_io.c:714
+#: src/xz/file_io.c:713
#, c-format
msgid "Error restoring the O_APPEND flag to standard output: %s"
msgstr ""
"Fehler beim Wiederherstellen des O_APPEND flags bei Standard Output: %s"
-#: src/xz/file_io.c:726
+#: src/xz/file_io.c:725
#, c-format
msgid "%s: Closing the file failed: %s"
msgstr "%s: Fehler beim Schießen der Datei: %s"
-#: src/xz/file_io.c:762 src/xz/file_io.c:946
+#: src/xz/file_io.c:761 src/xz/file_io.c:945
#, c-format
msgid "%s: Seeking failed when trying to create a sparse file: %s"
msgstr ""
"%s: Positionierungsfehler beim Versuch eine sparse Datei zu erzeugen: %s"
-#: src/xz/file_io.c:821
+#: src/xz/file_io.c:820
#, c-format
msgid "%s: Read error: %s"
msgstr "%s: Lesefehler: %s"
-#: src/xz/file_io.c:844
+#: src/xz/file_io.c:843
#, c-format
msgid "%s: Error seeking the file: %s"
msgstr "%s: Fehler beim Lesen der Dateinamen: %s"
-#: src/xz/file_io.c:854
+#: src/xz/file_io.c:853
#, c-format
msgid "%s: Unexpected end of file"
msgstr "%s: Unerwartetes Ende der Datei"
-#: src/xz/file_io.c:904
+#: src/xz/file_io.c:903
#, c-format
msgid "%s: Write error: %s"
msgstr "%s: Schreibfehler: %s"
@@ -212,7 +212,7 @@ msgstr "Kein"
#. but the Check ID is known (here 2). This and other "Unknown-N"
#. strings are used in tables, so the width must not exceed ten
#. columns with a fixed-width font. It's OK to omit the dash if
-#. you need space for one extra letter.
+#. you need space for one extra letter, but don't use spaces.
#: src/xz/list.c:69
msgid "Unknown-2"
msgstr "Unbek.2"
@@ -275,41 +275,41 @@ msgstr "%s: Zu klein um ein gültiges .xz file zu sein"
#. to Ratio, the columns are right aligned. Check and Filename
#. are left aligned. If you need longer words, it's OK to
#. use two lines here. Test with "xz -l foo.xz".
-#: src/xz/list.c:612
+#: src/xz/list.c:603
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
msgstr " Str. Blöcke Kompr. Unkompr. Verh. Check Dateiname"
-#: src/xz/list.c:652
+#: src/xz/list.c:643
#, c-format
msgid " Streams: %s\n"
msgstr " Ströme: %s\n"
-#: src/xz/list.c:654
+#: src/xz/list.c:645
#, c-format
msgid " Blocks: %s\n"
msgstr " Blöcke: %s\n"
-#: src/xz/list.c:656
+#: src/xz/list.c:647
#, c-format
msgid " Compressed size: %s\n"
msgstr " Größe komprimiert: %s\n"
-#: src/xz/list.c:659
+#: src/xz/list.c:650
#, c-format
msgid " Uncompressed size: %s\n"
msgstr " Größe unkomprimiert: %s\n"
-#: src/xz/list.c:662
+#: src/xz/list.c:653
#, c-format
msgid " Ratio: %s\n"
msgstr " Verhältnis: %s\n"
-#: src/xz/list.c:664
+#: src/xz/list.c:655
#, c-format
msgid " Check: %s\n"
msgstr " Check: %s\n"
-#: src/xz/list.c:665
+#: src/xz/list.c:656
#, c-format
msgid " Stream padding: %s\n"
msgstr " Strom Auffüllung: %s\n"
@@ -317,7 +317,7 @@ msgstr " Strom Auffüllung: %s\n"
#. TRANSLATORS: The second line is column headings. All except
#. Check are right aligned; Check is left aligned. Test with
#. "xz -lv foo.xz".
-#: src/xz/list.c:693
+#: src/xz/list.c:684
msgid ""
" Streams:\n"
" Stream Blocks CompOffset UncompOffset CompSize "
@@ -329,7 +329,7 @@ msgstr ""
#. TRANSLATORS: The second line is column headings. All
#. except Check are right aligned; Check is left aligned.
-#: src/xz/list.c:748
+#: src/xz/list.c:739
#, c-format
msgid ""
" Blocks:\n"
@@ -347,53 +347,53 @@ msgstr ""
#. are right aligned. %*s is replaced with 0-120
#. spaces to make the CheckVal column wide enough.
#. Test with "xz -lvv foo.xz".
-#: src/xz/list.c:760
+#: src/xz/list.c:751
#, c-format
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
msgstr " CheckWert %*s Kopf Schalter KompGröße Speicher Filter"
-#: src/xz/list.c:838 src/xz/list.c:1007
+#: src/xz/list.c:829 src/xz/list.c:998
#, c-format
msgid " Memory needed: %s MiB\n"
msgstr " Benötigter Speicher: %s MiB\n"
-#: src/xz/list.c:840 src/xz/list.c:1009
+#: src/xz/list.c:831 src/xz/list.c:1000
#, c-format
msgid " Sizes in headers: %s\n"
msgstr " Größe in Köpfen: %s\n"
-#: src/xz/list.c:841 src/xz/list.c:1010
+#: src/xz/list.c:832 src/xz/list.c:1001
msgid "Yes"
msgstr "Ja"
-#: src/xz/list.c:841 src/xz/list.c:1010
+#: src/xz/list.c:832 src/xz/list.c:1001
msgid "No"
msgstr "Nein"
#. TRANSLATORS: %s is an integer. Only the plural form of this
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
-#: src/xz/list.c:986
+#: src/xz/list.c:977
#, c-format
msgid "%s file\n"
msgid_plural "%s files\n"
msgstr[0] "%s Datei\n"
msgstr[1] "%s Dateien\n"
-#: src/xz/list.c:999
+#: src/xz/list.c:990
msgid "Totals:"
msgstr "Gesamt:"
-#: src/xz/list.c:1000
+#: src/xz/list.c:991
#, c-format
msgid " Number of files: %s\n"
msgstr " Anzahl Dateien: %s\n"
-#: src/xz/list.c:1072
+#: src/xz/list.c:1063
msgid "--list works only on .xz files (--format=xz or --format=auto)"
msgstr ""
"--list funktioniert nur mit .xz Dateien (--format=xz oder --format=auto)"
-#: src/xz/list.c:1078
+#: src/xz/list.c:1069
msgid "--list does not support reading from standard input"
msgstr "--list unterstützt kein Lesen der Standardeingabe"
@@ -428,60 +428,73 @@ msgstr ""
"Lesen der Standardeingabe ist nicht möglich, wenn die Dateinamen auch von "
"der Standardeingabe gelesen werden"
-#: src/xz/message.c:800 src/xz/message.c:844
+#. TRANSLATORS: This is the program name in the beginning
+#. of the line in messages. Usually it becomes "xz: ".
+#. This is a translatable string because French needs
+#. a space before a colon.
+#: src/xz/message.c:733
+#, c-format
+msgid "%s: "
+msgstr ""
+
+#: src/xz/message.c:796 src/xz/message.c:846
msgid "Internal error (bug)"
msgstr "Interner Fehler (Bug)"
-#: src/xz/message.c:807
+#: src/xz/message.c:803
msgid "Cannot establish signal handlers"
msgstr "Kann Signal Routine nicht setzen"
-#: src/xz/message.c:816
+#: src/xz/message.c:812
msgid "No integrity check; not verifying file integrity"
msgstr "Kein Integritäts-Check; werde Datei-Integrität nicht überprüfen"
-#: src/xz/message.c:819
+#: src/xz/message.c:815
msgid "Unsupported type of integrity check; not verifying file integrity"
msgstr ""
"Typ des Integritäts-Checks nicht unterstützt; werde Datei-Integrität nicht "
"überprüfen"
-#: src/xz/message.c:826
+#: src/xz/message.c:822
msgid "Memory usage limit reached"
msgstr "Speicher-Limit erreicht"
-#: src/xz/message.c:829
+#: src/xz/message.c:825
msgid "File format not recognized"
msgstr "Datei Format nicht erkannt"
-#: src/xz/message.c:832
+#: src/xz/message.c:828
msgid "Unsupported options"
msgstr "Optionen nicht unterstützt"
-#: src/xz/message.c:835
+#: src/xz/message.c:831
msgid "Compressed data is corrupt"
msgstr "Komprimierte Daten sind korrupt"
-#: src/xz/message.c:838
+#: src/xz/message.c:834
msgid "Unexpected end of input"
msgstr "Unerwartetes Eingabe Ende"
-#: src/xz/message.c:886
+#: src/xz/message.c:867
+msgid "%s MiB of memory is required. The limiter is disabled."
+msgstr "%s MiB Speicher wird benötigt. Der Begrenzer ist deaktiviert."
+
+#: src/xz/message.c:895
#, c-format
msgid "%s MiB of memory is required. The limit is %s."
msgstr "%s MiB Speicher wird benötigt. Limit ist %s."
-#: src/xz/message.c:1053
+#: src/xz/message.c:1062
#, c-format
msgid "%s: Filter chain: %s\n"
msgstr "%s: Filter Kette: %s\n"
-#: src/xz/message.c:1063
+#: src/xz/message.c:1072
#, c-format
msgid "Try `%s --help' for more information."
msgstr "Versuchen Sie `%s --help' für mehr Informationen."
-#: src/xz/message.c:1089
+#: src/xz/message.c:1098
#, c-format
msgid ""
"Usage: %s [OPTION]... [FILE]...\n"
@@ -492,18 +505,18 @@ msgstr ""
"Komprimiert oder dekomprimiert .xz DATEI(EN).\n"
"\n"
-#: src/xz/message.c:1096
+#: src/xz/message.c:1105
msgid ""
"Mandatory arguments to long options are mandatory for short options too.\n"
msgstr ""
"Obligatorische Argumente für lange Optionen sind auch für kurze Optionen\n"
"zwingend.\n"
-#: src/xz/message.c:1100
+#: src/xz/message.c:1109
msgid " Operation mode:\n"
msgstr " Operationsmodus:\n"
-#: src/xz/message.c:1103
+#: src/xz/message.c:1112
msgid ""
" -z, --compress force compression\n"
" -d, --decompress force decompression\n"
@@ -515,7 +528,7 @@ msgstr ""
" -t, --test überprüfe Datei Integrität\n"
" -l, --list liste Datei Informationen"
-#: src/xz/message.c:1109
+#: src/xz/message.c:1118
msgid ""
"\n"
" Operation modifiers:\n"
@@ -523,7 +536,7 @@ msgstr ""
"\n"
" Operationsmodifikatoren:\n"
-#: src/xz/message.c:1112
+#: src/xz/message.c:1121
msgid ""
" -k, --keep keep (don't delete) input files\n"
" -f, --force force overwrite of output file and (de)compress links\n"
@@ -535,7 +548,7 @@ msgstr ""
" -c, --stdout schreibe nach Standard Output und lösche nicht die\n"
" Eingabedateien"
-#: src/xz/message.c:1118
+#: src/xz/message.c:1127
msgid ""
" --no-sparse do not create sparse files when decompressing\n"
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
@@ -554,7 +567,7 @@ msgstr ""
" --files0=[DATEI] wie --files, aber benutze den Null Charakter als "
"Trenner"
-#: src/xz/message.c:1126
+#: src/xz/message.c:1135
msgid ""
"\n"
" Basic file format and compression options:\n"
@@ -562,7 +575,7 @@ msgstr ""
"\n"
" Grundlegende Optionen für Dateiformat und Kompression:\n"
-#: src/xz/message.c:1128
+#: src/xz/message.c:1137
msgid ""
" -F, --format=FMT file format to encode or decode; possible values are\n"
" `auto' (default), `xz', `lzma', and `raw'\n"
@@ -578,7 +591,7 @@ msgstr ""
"`crc32',\n"
" `crc64' (Voreinstellung), oder `sha256'"
-#: src/xz/message.c:1135
+#: src/xz/message.c:1144
msgid ""
" -0 ... -9 compression preset; default is 6; take compressor "
"*and*\n"
@@ -591,7 +604,7 @@ msgstr ""
"des\n"
" Dekomprimierers, wenn Sie 7-9 benutzen!"
-#: src/xz/message.c:1139
+#: src/xz/message.c:1148
msgid ""
" -e, --extreme try to improve compression ratio by using more CPU "
"time;\n"
@@ -602,7 +615,7 @@ msgstr ""
" verhältnis zu verbessern. Das beeinflusst nicht den\n"
" Speicherbedarf des Dekomprimierers."
-#: src/xz/message.c:1144
+#: src/xz/message.c:1153
#, no-c-format
msgid ""
" --memlimit-compress=LIMIT\n"
@@ -619,7 +632,7 @@ msgstr ""
"RAM,\n"
" oder 0 für Grundeinstellungen."
-#: src/xz/message.c:1151
+#: src/xz/message.c:1160
msgid ""
" --no-adjust if compression settings exceed the memory usage "
"limit,\n"
@@ -631,7 +644,7 @@ msgstr ""
"statt\n"
" die Einstellungen nach unten anzupassen."
-#: src/xz/message.c:1157
+#: src/xz/message.c:1166
msgid ""
"\n"
" Custom filter chain for compression (alternative for using presets):"
@@ -639,7 +652,7 @@ msgstr ""
"\n"
" User-definierte Filter Kette für Kompression (alternativ zu Voreinstellung):"
-#: src/xz/message.c:1166
+#: src/xz/message.c:1175
msgid ""
"\n"
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero "
@@ -683,7 +696,7 @@ msgstr ""
" depth=NUM Maximale Suchtiefe; 0=automatisch\n"
" (Voreinstellung)"
-#: src/xz/message.c:1181
+#: src/xz/message.c:1190
msgid ""
"\n"
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
@@ -706,7 +719,7 @@ msgstr ""
" start=NUM Start-Offset für Konversion\n"
" (Voreinstellung=0)"
-#: src/xz/message.c:1193
+#: src/xz/message.c:1202
msgid ""
"\n"
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
@@ -720,7 +733,7 @@ msgstr ""
"voneinander\n"
" subtrahiert werden (1-256; 1)"
-#: src/xz/message.c:1201
+#: src/xz/message.c:1210
msgid ""
"\n"
" Other options:\n"
@@ -728,7 +741,7 @@ msgstr ""
"\n"
" Andere Optionen:\n"
-#: src/xz/message.c:1204
+#: src/xz/message.c:1213
msgid ""
" -q, --quiet suppress warnings; specify twice to suppress errors "
"too\n"
@@ -740,25 +753,25 @@ msgstr ""
"noch\n"
" gesprächiger zu sein"
-#: src/xz/message.c:1209
+#: src/xz/message.c:1218
msgid " -Q, --no-warn make warnings not affect the exit status"
msgstr " -Q, --no-warn Warnungen verändern nicht den exit status"
-#: src/xz/message.c:1211
+#: src/xz/message.c:1220
msgid ""
" --robot use machine-parsable messages (useful for scripts)"
msgstr ""
" --robot benutze Maschinen-lesbare Meldungen (nützlich für\n"
" Skripte)"
-#: src/xz/message.c:1214
+#: src/xz/message.c:1223
msgid ""
" --info-memory display the total amount of RAM and the currently "
"active\n"
" memory usage limits, and exit"
msgstr " --info-memory zeige Speicherlimit an und terminiere"
-#: src/xz/message.c:1217
+#: src/xz/message.c:1226
msgid ""
" -h, --help display the short help (lists only the basic options)\n"
" -H, --long-help display this long help and exit"
@@ -767,7 +780,7 @@ msgstr ""
" Optionen)\n"
" -H, --long-help zeige diese lange Hilfe an und terminiere"
-#: src/xz/message.c:1221
+#: src/xz/message.c:1230
msgid ""
" -h, --help display this short help and exit\n"
" -H, --long-help display the long help (lists also the advanced options)"
@@ -777,11 +790,11 @@ msgstr ""
"fortgeschrittene\n"
" Optionen an)"
-#: src/xz/message.c:1226
+#: src/xz/message.c:1235
msgid " -V, --version display the version number and exit"
msgstr " -V, --version zeige Versionsnummer an und terminiere"
-#: src/xz/message.c:1228
+#: src/xz/message.c:1237
msgid ""
"\n"
"With no FILE, or when FILE is -, read standard input.\n"
@@ -794,7 +807,7 @@ msgstr ""
#. for this package. Please add _another line_ saying
#. "Report translation bugs to <...>\n" with the email or WWW
#. address for translation bugs. Thanks.
-#: src/xz/message.c:1234
+#: src/xz/message.c:1243
#, c-format
msgid "Report bugs to <%s> (in English or Finnish).\n"
msgstr ""
@@ -802,7 +815,7 @@ msgstr ""
"Melde Ãœbersetzungsfehler an <maan@systemlinux.org> (in englisch oder "
"deutsch).\n"
-#: src/xz/message.c:1236
+#: src/xz/message.c:1245
#, c-format
msgid "%s home page: <%s>\n"
msgstr "%s Homepage: <%s>\n"
@@ -840,7 +853,7 @@ msgstr ""
"Der ausgewählte Algorithmus zum Auffinden von Übereinstimmungen braucht "
"mindestens nice=%<PRIu32>"
-#: src/xz/suffix.c:79 src/xz/suffix.c:164
+#: src/xz/suffix.c:101 src/xz/suffix.c:194
#, c-format
msgid ""
"%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
@@ -848,17 +861,17 @@ msgstr ""
"%s: Mit --format=raw ist --sufix=.SUF notwendig, falls nicht nach stdout "
"geschrieben wird"
-#: src/xz/suffix.c:99
+#: src/xz/suffix.c:121
#, c-format
msgid "%s: Filename has an unknown suffix, skipping"
msgstr "%s: Dateiname hat unbekannte Endung, überspringe"
-#: src/xz/suffix.c:154
+#: src/xz/suffix.c:175 src/xz/suffix.c:184
#, c-format
msgid "%s: File already has `%s' suffix, skipping"
msgstr "%s: Datei hat bereits `%s' Endung, überspringe"
-#: src/xz/suffix.c:205
+#: src/xz/suffix.c:235
#, c-format
msgid "%s: Invalid filename suffix"
msgstr "%s: Ungültige Datei Endung"
diff --git a/contrib/xz/po/fr.po b/contrib/xz/po/fr.po
index 2d95411..d066576 100644
--- a/contrib/xz/po/fr.po
+++ b/contrib/xz/po/fr.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: xz-utils\n"
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
-"POT-Creation-Date: 2011-05-21 14:35+0200\n"
+"POT-Creation-Date: 2012-05-30 22:10+0200\n"
"PO-Revision-Date: 2010-09-24 21;12+0200\n"
"Last-Translator: Adrien Nader <camaradetux@gmail.com>\n"
"Language-Team: None\n"
@@ -16,69 +16,59 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n==1) ? 0 : 1;\n"
-#: src/xz/args.c:338
+#: src/xz/args.c:333
#, c-format
msgid "%s: Unknown file format type"
msgstr "%s : Format de fichier inconnu"
-#: src/xz/args.c:361 src/xz/args.c:369
+#: src/xz/args.c:356 src/xz/args.c:364
#, c-format
msgid "%s: Unsupported integrity check type"
msgstr "%s : Type de vérification d'intégrité inconnu"
-#: src/xz/args.c:396
+#: src/xz/args.c:382
msgid "Only one file can be specified with `--files' or `--files0'."
msgstr "Un seul fichier peut être spécifié avec `--files' ou `--files0'."
-#: src/xz/args.c:459
+#: src/xz/args.c:445
#, c-format
msgid "The environment variable %s contains too many arguments"
msgstr "La variable d'environnement %s contient trop d'arguments"
-#: src/xz/coder.c:105
+#: src/xz/coder.c:95
msgid "Maximum number of filters is four"
msgstr "Le nombre maximal de filtres est quatre"
-#: src/xz/coder.c:118
+#: src/xz/coder.c:108
msgid "Memory usage limit is too low for the given filter setup."
msgstr "La limite d'utilisation mémoire est trop basse pour la configuration de filtres donnée."
-#: src/xz/coder.c:148
+#: src/xz/coder.c:129
msgid "Using a preset in raw mode is discouraged."
msgstr "Utiliser un préréglage en mode `raw' est déconseillé."
-#: src/xz/coder.c:150
+#: src/xz/coder.c:131
msgid "The exact options of the presets may vary between software versions."
msgstr "Le détail des préréglages peut varier entre différentes versions du logiciel."
-#: src/xz/coder.c:176
+#: src/xz/coder.c:157
msgid "The .lzma format supports only the LZMA1 filter"
msgstr "Le format .lzma ne prend en charge que le filtre LZMA1"
-#: src/xz/coder.c:184
+#: src/xz/coder.c:165
msgid "LZMA1 cannot be used with the .xz format"
msgstr "Le filtre LZMA1 ne peut être utilisé avec le format .xz"
-#: src/xz/coder.c:203
-#, c-format
-msgid "Using up to %<PRIu32> threads."
-msgstr "Jusqu'à %<PRIu32> threads seront utilisés."
-
-#: src/xz/coder.c:216
+#: src/xz/coder.c:182
msgid "Unsupported filter chain or filter options"
msgstr "Enchaînement ou options de filtres non pris en charge"
-#: src/xz/coder.c:224
+#: src/xz/coder.c:190
#, c-format
msgid "Decompression will need %s MiB of memory."
msgstr "La décompression nécessitera %s MiB de mémoire."
-#: src/xz/coder.c:259
-#, c-format
-msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
-msgstr "Nombre de threads réduit de %s à %s pour ne pas dépasser la limite d'utilisation mémoire de %s MiB"
-
-#: src/xz/coder.c:313
+#: src/xz/coder.c:247
#, c-format
msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
msgstr "Taille du dictionnaire LZMA%c réduite de %s MiB à %s MiB pour ne pas dépasser la limite d'utilisation mémoire de %s MiB"
@@ -93,111 +83,111 @@ msgstr "Taille du dictionnaire LZMA%c réduite de %s MiB à %s MiB pour ne pas d
#. it is possible that the user has put a new file in place
#. of the original file, and in that case it obviously
#. shouldn't be removed.
-#: src/xz/file_io.c:136
+#: src/xz/file_io.c:137
#, c-format
msgid "%s: File seems to have been moved, not removing"
msgstr "%s : Le fichier a apparemment été déplacé, suppression annulée"
-#: src/xz/file_io.c:143 src/xz/file_io.c:635
+#: src/xz/file_io.c:144 src/xz/file_io.c:589
#, c-format
msgid "%s: Cannot remove: %s"
msgstr "%s : Impossible de supprimer : %s"
-#: src/xz/file_io.c:168
+#: src/xz/file_io.c:169
#, c-format
msgid "%s: Cannot set the file owner: %s"
msgstr "%s : Impossible de modifier le propriétaire du fichier : %s"
-#: src/xz/file_io.c:174
+#: src/xz/file_io.c:175
#, c-format
msgid "%s: Cannot set the file group: %s"
msgstr "%s : Impossible de modifier le groupe propriétaire du fichier : %s"
-#: src/xz/file_io.c:193
+#: src/xz/file_io.c:194
#, c-format
msgid "%s: Cannot set the file permissions: %s"
msgstr "%s : Impossible de modifier les permissions du fichier : %s"
-#: src/xz/file_io.c:340 src/xz/file_io.c:423
+#: src/xz/file_io.c:337 src/xz/file_io.c:420
#, c-format
msgid "%s: Is a symbolic link, skipping"
msgstr "%s est un lien symbolique : ignoré"
-#: src/xz/file_io.c:468
+#: src/xz/file_io.c:455
#, c-format
msgid "%s: Is a directory, skipping"
msgstr "%s est un répertoire : ignoré"
-#: src/xz/file_io.c:474
+#: src/xz/file_io.c:461
#, c-format
msgid "%s: Not a regular file, skipping"
msgstr "%s n'est pas un fichier régulier : ignoré"
-#: src/xz/file_io.c:491
+#: src/xz/file_io.c:478
#, c-format
msgid "%s: File has setuid or setgid bit set, skipping"
msgstr "%s : Le fichier possède les bits `setuid' ou `setgid' : ignoré"
-#: src/xz/file_io.c:498
+#: src/xz/file_io.c:485
#, c-format
msgid "%s: File has sticky bit set, skipping"
msgstr "%s : Le fichier possède le bit `sticky' : ignoré"
-#: src/xz/file_io.c:505
+#: src/xz/file_io.c:492
#, c-format
msgid "%s: Input file has more than one hard link, skipping"
msgstr "%s : Le fichier d'entrée a plus d'un lien matériel : ignoré"
-#: src/xz/file_io.c:761
+#: src/xz/file_io.c:713
#, c-format
msgid "Error restoring the O_APPEND flag to standard output: %s"
msgstr "Impossible de rétablir le drapeau O_APPEND sur la sortie standard : %s"
-#: src/xz/file_io.c:773
+#: src/xz/file_io.c:725
#, c-format
msgid "%s: Closing the file failed: %s"
msgstr "%s : Impossible de fermer le fichier : %s"
-#: src/xz/file_io.c:809 src/xz/file_io.c:1008
+#: src/xz/file_io.c:761 src/xz/file_io.c:945
#, c-format
msgid "%s: Seeking failed when trying to create a sparse file: %s"
msgstr "%s : Impossible de se déplacer dans le fichier pour créer un 'sparse file' : %s"
-#: src/xz/file_io.c:883
+#: src/xz/file_io.c:820
#, c-format
msgid "%s: Read error: %s"
msgstr "%s : Erreur d'écriture : %s"
-#: src/xz/file_io.c:906
+#: src/xz/file_io.c:843
#, c-format
msgid "%s: Error seeking the file: %s"
msgstr "%s : Impossible de se déplacer dans le fichier : %s"
-#: src/xz/file_io.c:916
+#: src/xz/file_io.c:853
#, c-format
msgid "%s: Unexpected end of file"
msgstr "%s : Fin de fichier inattendue"
-#: src/xz/file_io.c:966
+#: src/xz/file_io.c:903
#, c-format
msgid "%s: Write error: %s"
msgstr "%s : Erreur d'écriture : %s"
-#: src/xz/hardware.c:101
+#: src/xz/hardware.c:100
msgid "Disabled"
msgstr "Désactivé"
#. TRANSLATORS: Test with "xz --info-memory" to see if
#. the alignment looks nice.
-#: src/xz/hardware.c:120
+#: src/xz/hardware.c:119
msgid "Total amount of physical memory (RAM): "
msgstr "Quantité totale de mémoire physique (RAM) : "
-#: src/xz/hardware.c:122
+#: src/xz/hardware.c:121
msgid "Memory usage limit for compression: "
msgstr "Limite d'utilisation pour la compression : "
-#: src/xz/hardware.c:124
+#: src/xz/hardware.c:123
msgid "Memory usage limit for decompression: "
msgstr "Limite d'utilisation pour la décompression : "
@@ -275,41 +265,41 @@ msgstr "%s : Trop petit pour être un fichier xz valide."
#. to Ratio, the columns are right aligned. Check and Filename
#. are left aligned. If you need longer words, it's OK to
#. use two lines here. Test with "xz -l foo.xz".
-#: src/xz/list.c:612
+#: src/xz/list.c:603
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
msgstr "Flux Blocs Compressé Décompressé Ratio Vérif Nom de fichier"
-#: src/xz/list.c:652
+#: src/xz/list.c:643
#, c-format
msgid " Streams: %s\n"
msgstr " Flux : %s\n"
-#: src/xz/list.c:654
+#: src/xz/list.c:645
#, c-format
msgid " Blocks: %s\n"
msgstr " Blocs : %s\n"
-#: src/xz/list.c:656
+#: src/xz/list.c:647
#, c-format
msgid " Compressed size: %s\n"
msgstr " Taille compressé : %s\n"
-#: src/xz/list.c:659
+#: src/xz/list.c:650
#, c-format
msgid " Uncompressed size: %s\n"
msgstr " Taille décompressé : %s\n"
-#: src/xz/list.c:662
+#: src/xz/list.c:653
#, c-format
msgid " Ratio: %s\n"
msgstr " Ratio : %s\n"
-#: src/xz/list.c:664
+#: src/xz/list.c:655
#, c-format
msgid " Check: %s\n"
msgstr " Vérification : %s\n"
-#: src/xz/list.c:665
+#: src/xz/list.c:656
#, c-format
msgid " Stream padding: %s\n"
msgstr " Octets de rembourrage du flux : %s\n"
@@ -317,7 +307,7 @@ msgstr " Octets de rembourrage du flux : %s\n"
#. TRANSLATORS: The second line is column headings. All except
#. Check are right aligned; Check is left aligned. Test with
#. "xz -lv foo.xz".
-#: src/xz/list.c:693
+#: src/xz/list.c:684
msgid ""
" Streams:\n"
" Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
@@ -327,7 +317,7 @@ msgstr ""
#. TRANSLATORS: The second line is column headings. All
#. except Check are right aligned; Check is left aligned.
-#: src/xz/list.c:748
+#: src/xz/list.c:739
#, c-format
msgid ""
" Blocks:\n"
@@ -343,52 +333,52 @@ msgstr ""
#. are right aligned. %*s is replaced with 0-120
#. spaces to make the CheckVal column wide enough.
#. Test with "xz -lvv foo.xz".
-#: src/xz/list.c:760
+#: src/xz/list.c:751
#, c-format
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
msgstr " ValVérif %*sEn-tête Drapeaux TailleComp UtilMém Filtres"
-#: src/xz/list.c:838 src/xz/list.c:1007
+#: src/xz/list.c:829 src/xz/list.c:998
#, c-format
msgid " Memory needed: %s MiB\n"
msgstr " Mémoire nécessaire : %s MiB\n"
-#: src/xz/list.c:840 src/xz/list.c:1009
+#: src/xz/list.c:831 src/xz/list.c:1000
#, c-format
msgid " Sizes in headers: %s\n"
msgstr " Tailles stockées dans l'en-tête : %s\n"
-#: src/xz/list.c:841 src/xz/list.c:1010
+#: src/xz/list.c:832 src/xz/list.c:1001
msgid "Yes"
msgstr "Oui"
-#: src/xz/list.c:841 src/xz/list.c:1010
+#: src/xz/list.c:832 src/xz/list.c:1001
msgid "No"
msgstr "Non"
#. TRANSLATORS: %s is an integer. Only the plural form of this
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
-#: src/xz/list.c:986
+#: src/xz/list.c:977
#, c-format
msgid "%s file\n"
msgid_plural "%s files\n"
msgstr[0] "%s fichier\n"
msgstr[1] "%s fichiers\n"
-#: src/xz/list.c:999
+#: src/xz/list.c:990
msgid "Totals:"
msgstr "Totaux :"
-#: src/xz/list.c:1000
+#: src/xz/list.c:991
#, c-format
msgid " Number of files: %s\n"
msgstr " Nombre de fichiers : %s\n"
-#: src/xz/list.c:1072
+#: src/xz/list.c:1063
msgid "--list works only on .xz files (--format=xz or --format=auto)"
msgstr "--list ne marche que sur les fichiers .xz (--format=xz ou --format=auto)"
-#: src/xz/list.c:1078
+#: src/xz/list.c:1069
msgid "--list does not support reading from standard input"
msgstr "--list est incompatible avec la lecture sur l'entrée standard"
@@ -460,22 +450,27 @@ msgstr "Les données compressées sont corrompues"
msgid "Unexpected end of input"
msgstr "Fin des données inattendue "
-#: src/xz/message.c:885
+#: src/xz/message.c:867
+#, c-format
+msgid "%s MiB of memory is required. The limiter is disabled."
+msgstr "%s MiB de mémoire sont nécessaires. La limite est désactivée."
+
+#: src/xz/message.c:895
#, c-format
msgid "%s MiB of memory is required. The limit is %s."
msgstr "%s MiB de mémoire sont nécessaires, la limite étant %s."
-#: src/xz/message.c:1052
+#: src/xz/message.c:1062
#, c-format
msgid "%s: Filter chain: %s\n"
msgstr "%s : Enchaînement de filtres : %s\n"
-#: src/xz/message.c:1062
+#: src/xz/message.c:1072
#, c-format
msgid "Try `%s --help' for more information."
msgstr "Utilisez `%s --help' pour plus d'informations."
-#: src/xz/message.c:1088
+#: src/xz/message.c:1098
#, c-format
msgid ""
"Usage: %s [OPTION]... [FILE]...\n"
@@ -486,17 +481,17 @@ msgstr ""
"Compresse ou decompresse FICHIER(s) au format .xz.\n"
"\n"
-#: src/xz/message.c:1095
+#: src/xz/message.c:1105
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
msgstr ""
"Les arguments obligatoires pour les options longues le sont aussi pour les\n"
"options courtes.\n"
-#: src/xz/message.c:1099
+#: src/xz/message.c:1109
msgid " Operation mode:\n"
msgstr " Mode d'opération :\n"
-#: src/xz/message.c:1102
+#: src/xz/message.c:1112
msgid ""
" -z, --compress force compression\n"
" -d, --decompress force decompression\n"
@@ -508,7 +503,7 @@ msgstr ""
" -t, --test tester l'intégrité du fichier compressé\n"
" -l, --list lister les informations à propos des fichiers .xz"
-#: src/xz/message.c:1108
+#: src/xz/message.c:1118
msgid ""
"\n"
" Operation modifiers:\n"
@@ -516,7 +511,7 @@ msgstr ""
"\n"
" Modifictauers :\n"
-#: src/xz/message.c:1111
+#: src/xz/message.c:1121
msgid ""
" -k, --keep keep (don't delete) input files\n"
" -f, --force force overwrite of output file and (de)compress links\n"
@@ -528,15 +523,7 @@ msgstr ""
" -c, --stdout écrire sur la sortie standard et ne pas supprimer les\n"
" fichiers d'entrée"
-#: src/xz/message.c:1117
-msgid ""
-" --single-stream decompress only the first stream, and silently\n"
-" ignore possible remaining input data"
-msgstr ""
-" --single-stream décompresser uniquement le premier flux et ignorer\n"
-" silenciseusement les données éventuellement restantes"
-
-#: src/xz/message.c:1120
+#: src/xz/message.c:1127
msgid ""
" --no-sparse do not create sparse files when decompressing\n"
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
@@ -552,7 +539,7 @@ msgstr ""
" et doivent être suivis d'un caractère de retour à la ligne\n"
" --files0[=FILE] comme --files mais avec un caractère null comme séparateur"
-#: src/xz/message.c:1129
+#: src/xz/message.c:1135
msgid ""
"\n"
" Basic file format and compression options:\n"
@@ -560,7 +547,7 @@ msgstr ""
"\n"
" Options basiques de format de fichier et de compression :\n"
-#: src/xz/message.c:1131
+#: src/xz/message.c:1137
msgid ""
" -F, --format=FMT file format to encode or decode; possible values are\n"
" `auto' (default), `xz', `lzma', and `raw'\n"
@@ -572,7 +559,7 @@ msgstr ""
" -C, --check=CHECK type de vérification d'intégrité : `none' (à utiliser avec\n"
" précaution), `crc32', `crc64' (par défaut) ou `sha256'"
-#: src/xz/message.c:1138
+#: src/xz/message.c:1144
msgid ""
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
" decompressor memory usage into account before using 7-9!"
@@ -581,7 +568,7 @@ msgstr ""
" l'utilisation mémoire du compresseur *et* du décompresseur\n"
" avant d'utiliser 7, 8 ou 9 !"
-#: src/xz/message.c:1142
+#: src/xz/message.c:1148
msgid ""
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
" does not affect decompressor memory requirements"
@@ -590,17 +577,7 @@ msgstr ""
" de temps processeur sans affecter les besoins mémoire du\n"
" décompresseur"
-#: src/xz/message.c:1147
-msgid ""
-" --block-size=SIZE\n"
-" when compressing to the .xz format, start a new block\n"
-" after every SIZE bytes of input; 0=disabled (default)"
-msgstr ""
-" --block-size=SIZE\n"
-" pour une compression au format .xz, entamer un nouveau\n"
-" bloc après SIZE octets d'entrée ; 0=désactivé (par défaut)"
-
-#: src/xz/message.c:1151
+#: src/xz/message.c:1153
#, no-c-format
msgid ""
" --memlimit-compress=LIMIT\n"
@@ -616,7 +593,7 @@ msgstr ""
" décompression ou les deux ; LIMIT est en octets, % de\n"
" RAM, ou 0 pour les valeurs par défaut"
-#: src/xz/message.c:1158
+#: src/xz/message.c:1160
msgid ""
" --no-adjust if compression settings exceed the memory usage limit,\n"
" give an error instead of adjusting the settings downwards"
@@ -625,7 +602,7 @@ msgstr ""
" d'utilisation mémoire, renvoyer une erreur plutôt que de\n"
" diminuer les réglages"
-#: src/xz/message.c:1164
+#: src/xz/message.c:1166
msgid ""
"\n"
" Custom filter chain for compression (alternative for using presets):"
@@ -633,7 +610,7 @@ msgstr ""
"\n"
" Enchaînement de filtres de compression personnalisé (au lieu des préréglages) :"
-#: src/xz/message.c:1173
+#: src/xz/message.c:1175
msgid ""
"\n"
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
@@ -662,7 +639,7 @@ msgstr ""
" depth=NUM profondeur de recherche maximale ;\n"
" 0=automatique (par défaut)"
-#: src/xz/message.c:1188
+#: src/xz/message.c:1190
msgid ""
"\n"
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
@@ -684,7 +661,7 @@ msgstr ""
" OPTS valides pour tous les filtres BCJ :\n"
" start=NUM start offset for conversions (default=0)"
-#: src/xz/message.c:1200
+#: src/xz/message.c:1202
msgid ""
"\n"
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
@@ -696,7 +673,7 @@ msgstr ""
" dist=NUM distance entre les octets soustraits\n"
" les uns aux autres (1-256 ; 1)"
-#: src/xz/message.c:1208
+#: src/xz/message.c:1210
msgid ""
"\n"
" Other options:\n"
@@ -704,7 +681,7 @@ msgstr ""
"\n"
" Autres options :\n"
-#: src/xz/message.c:1211
+#: src/xz/message.c:1213
msgid ""
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
" -v, --verbose be verbose; specify twice for even more verbose"
@@ -713,17 +690,17 @@ msgstr ""
" aussi supprimer les erreur\n"
" -v, --verbose être bavard ; spécifier deux fois pour l'être davantage"
-#: src/xz/message.c:1216
+#: src/xz/message.c:1218
msgid " -Q, --no-warn make warnings not affect the exit status"
msgstr " -Q, --no-warn les avertissements ne modifient pas le code de sortie"
-#: src/xz/message.c:1218
+#: src/xz/message.c:1220
msgid " --robot use machine-parsable messages (useful for scripts)"
msgstr ""
" --robot utiliser des messages lisibles par un programme\n"
" (utile pour les scripts)"
-#: src/xz/message.c:1221
+#: src/xz/message.c:1223
msgid ""
" --info-memory display the total amount of RAM and the currently active\n"
" memory usage limits, and exit"
@@ -731,7 +708,7 @@ msgstr ""
" --info-memory affiche la quantité totale de RAM et la limite actuelle\n"
" en mémoire puis quitte"
-#: src/xz/message.c:1224
+#: src/xz/message.c:1226
msgid ""
" -h, --help display the short help (lists only the basic options)\n"
" -H, --long-help display this long help and exit"
@@ -739,7 +716,7 @@ msgstr ""
" -h, --help affiche l'aide courte (ne liste que les options de base)\n"
" -H, --long-help affiche l'aide longue (ceci) puis quitte"
-#: src/xz/message.c:1228
+#: src/xz/message.c:1230
msgid ""
" -h, --help display this short help and exit\n"
" -H, --long-help display the long help (lists also the advanced options)"
@@ -747,11 +724,11 @@ msgstr ""
" -h, --help affiche l'aide courte (ceci) puis quitte\n"
" -H, --long-help affiche l'aide longue (liste aussi les options avancées)"
-#: src/xz/message.c:1233
+#: src/xz/message.c:1235
msgid " -V, --version display the version number and exit"
msgstr " -V, --version affiche le numéro de version puis quitte"
-#: src/xz/message.c:1235
+#: src/xz/message.c:1237
msgid ""
"\n"
"With no FILE, or when FILE is -, read standard input.\n"
@@ -763,14 +740,14 @@ msgstr ""
#. for this package. Please add _another line_ saying
#. "Report translation bugs to <...>\n" with the email or WWW
#. address for translation bugs. Thanks.
-#: src/xz/message.c:1241
+#: src/xz/message.c:1243
#, c-format
msgid "Report bugs to <%s> (in English or Finnish).\n"
msgstr ""
"Signaler les bogues à <%s> (en anglais ou en finlandais).\n"
"Signaler les bogues de traduction à <camaradetux@gmail.com>.\n"
-#: src/xz/message.c:1243
+#: src/xz/message.c:1245
#, c-format
msgid "%s home page: <%s>\n"
msgstr "%s page du projet : <%s>\n"
@@ -804,22 +781,22 @@ msgstr "La somme de lc et lp ne doit pas dépasser 4"
msgid "The selected match finder requires at least nice=%<PRIu32>"
msgstr "Le `match finder' choisi nécessite au moins nice=%<PRIu32>"
-#: src/xz/suffix.c:133 src/xz/suffix.c:258
+#: src/xz/suffix.c:101 src/xz/suffix.c:194
#, c-format
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
msgstr "%s : Avec --format=raw, --suffix=.SUF est nécessaire sauf lors de l'écriture vers stdout"
-#: src/xz/suffix.c:164
+#: src/xz/suffix.c:121
#, c-format
msgid "%s: Filename has an unknown suffix, skipping"
msgstr "%s : Le fichier a un suffixe inconnu, ignoré"
-#: src/xz/suffix.c:185
+#: src/xz/suffix.c:175 src/xz/suffix.c:184
#, c-format
msgid "%s: File already has `%s' suffix, skipping"
msgstr "%s : Le fichier a déjà le suffixe '%s', ignoré"
-#: src/xz/suffix.c:393
+#: src/xz/suffix.c:235
#, c-format
msgid "%s: Invalid filename suffix"
msgstr "%s: Suffixe de nom de fichier invalide"
@@ -862,3 +839,25 @@ msgstr "Impossible d'écrire vers la sortie standard"
#: src/common/tuklib_exit.c:42
msgid "Unknown error"
msgstr "Erreur inconnue"
+
+#~ msgid "Using up to %<PRIu32> threads."
+#~ msgstr "Jusqu'à %<PRIu32> threads seront utilisés."
+
+#~ msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
+#~ msgstr "Nombre de threads réduit de %s à %s pour ne pas dépasser la limite d'utilisation mémoire de %s MiB"
+
+#~ msgid ""
+#~ " --single-stream decompress only the first stream, and silently\n"
+#~ " ignore possible remaining input data"
+#~ msgstr ""
+#~ " --single-stream décompresser uniquement le premier flux et ignorer\n"
+#~ " silenciseusement les données éventuellement restantes"
+
+#~ msgid ""
+#~ " --block-size=SIZE\n"
+#~ " when compressing to the .xz format, start a new block\n"
+#~ " after every SIZE bytes of input; 0=disabled (default)"
+#~ msgstr ""
+#~ " --block-size=SIZE\n"
+#~ " pour une compression au format .xz, entamer un nouveau\n"
+#~ " bloc après SIZE octets d'entrée ; 0=désactivé (par défaut)"
diff --git a/contrib/xz/po/it.po b/contrib/xz/po/it.po
index ea6f858..2d5da57 100644
--- a/contrib/xz/po/it.po
+++ b/contrib/xz/po/it.po
@@ -2,83 +2,80 @@
# This file is in the public domain
# Gruppo traduzione italiano di Ubuntu-it <gruppo-traduzione@ubuntu-it.org>, 2009, 2010
# Lorenzo De Liso <blackz@ubuntu.com>, 2010.
-# Milo Casagrande <milo@ubuntu.com>, 2009, 2010, 2011.
+# Milo Casagrande <milo@ubuntu.com>, 2009, 2010, 2011, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: xz-utils\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-05-27 11:42+0200\n"
-"PO-Revision-Date: 2011-05-27 11:43+0200\n"
+"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
+"POT-Creation-Date: 2012-05-29 13:50+0300\n"
+"PO-Revision-Date: 2012-05-31 09:57+0800\n"
"Last-Translator: Milo Casagrande <milo@ubuntu.com>\n"
"Language-Team: Italian <tp@lists.linux.it>\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
+"Content-Transfer-Encoding: 8-bit\n"
"X-Launchpad-Export-Date: 2010-08-16 19:16+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"Plural-Forms: nplurals=2; plural=(n!=1);\n"
-#: ../src/xz/args.c:333
+#: src/xz/args.c:333
#, c-format
msgid "%s: Unknown file format type"
msgstr "%s: tipo di formato del file sconosciuto"
-#: ../src/xz/args.c:356 ../src/xz/args.c:364
+#: src/xz/args.c:356 src/xz/args.c:364
#, c-format
msgid "%s: Unsupported integrity check type"
msgstr "%s: tipo di controllo integrità non supportato"
-#: ../src/xz/args.c:382
+#: src/xz/args.c:382
msgid "Only one file can be specified with `--files' or `--files0'."
msgstr "Solo un file può essere specificato con \"--files\" o \"--files0\"."
-#: ../src/xz/args.c:445
+#: src/xz/args.c:445
#, c-format
msgid "The environment variable %s contains too many arguments"
msgstr "La variabile d'ambiente %s contiene troppi argomenti"
-#: ../src/xz/coder.c:95
+#: src/xz/coder.c:95
msgid "Maximum number of filters is four"
msgstr "Il numero massimo di filtri è quattro"
-#: ../src/xz/coder.c:108
+#: src/xz/coder.c:108
msgid "Memory usage limit is too low for the given filter setup."
msgstr ""
"Il limite dell'uso della memoria è troppo basso per l'impostazione del "
"filtro dato."
-#. The message is shown only if warnings are allowed
-#. but the exit status isn't changed.
-#: ../src/xz/coder.c:129
+#: src/xz/coder.c:129
msgid "Using a preset in raw mode is discouraged."
msgstr "Non è consigliato usare un preset nella modalità raw."
-#: ../src/xz/coder.c:131
+#: src/xz/coder.c:131
msgid "The exact options of the presets may vary between software versions."
msgstr ""
"Le opzioni esatte per i preset possono variare tra le versioni del software."
-#: ../src/xz/coder.c:157
+#: src/xz/coder.c:157
msgid "The .lzma format supports only the LZMA1 filter"
msgstr "Il formato .lzma supporta solo il filtro LZMA1"
-#: ../src/xz/coder.c:165
+#: src/xz/coder.c:165
msgid "LZMA1 cannot be used with the .xz format"
msgstr "LZMA1 non può essere usato con il formato .xz"
-#: ../src/xz/coder.c:182
+#: src/xz/coder.c:182
msgid "Unsupported filter chain or filter options"
msgstr "Catena di filtri od opzioni del filtro non supportata"
-#: ../src/xz/coder.c:190
+#: src/xz/coder.c:190
#, c-format
msgid "Decompression will need %s MiB of memory."
msgstr "L'estrazione necessita di %s MiB di memoria."
-#. Tell the user that we decreased the dictionary size.
-#: ../src/xz/coder.c:247
+#: src/xz/coder.c:247
#, c-format
msgid ""
"Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the "
@@ -97,128 +94,119 @@ msgstr ""
#. it is possible that the user has put a new file in place
#. of the original file, and in that case it obviously
#. shouldn't be removed.
-#: ../src/xz/file_io.c:137
+#: src/xz/file_io.c:137
#, c-format
msgid "%s: File seems to have been moved, not removing"
msgstr "%s: sembra che il file sia stato spostato, non viene rimosso"
-#: ../src/xz/file_io.c:144 ../src/xz/file_io.c:589
+#: src/xz/file_io.c:144 src/xz/file_io.c:589
#, c-format
msgid "%s: Cannot remove: %s"
msgstr "%s: impossibile rimuovere: %s"
-#: ../src/xz/file_io.c:169
+#: src/xz/file_io.c:169
#, c-format
msgid "%s: Cannot set the file owner: %s"
msgstr "%s: impossibile impostare il proprietario del file: %s"
-#: ../src/xz/file_io.c:175
+#: src/xz/file_io.c:175
#, c-format
msgid "%s: Cannot set the file group: %s"
msgstr "%s: impossibile impostare il gruppo del file: %s"
-#: ../src/xz/file_io.c:194
+#: src/xz/file_io.c:194
#, c-format
msgid "%s: Cannot set the file permissions: %s"
msgstr "%s: impossibile impostare i permessi del file: %s"
-#: ../src/xz/file_io.c:337 ../src/xz/file_io.c:420
+#: src/xz/file_io.c:337 src/xz/file_io.c:420
#, c-format
msgid "%s: Is a symbolic link, skipping"
msgstr "%s: è un collegamento simbolico, viene saltato"
-#: ../src/xz/file_io.c:455
+#: src/xz/file_io.c:455
#, c-format
msgid "%s: Is a directory, skipping"
msgstr "%s: è una directory, viene saltata"
-#: ../src/xz/file_io.c:461
+#: src/xz/file_io.c:461
#, c-format
msgid "%s: Not a regular file, skipping"
msgstr "%s: non è un file regolare, viene saltato"
-#. gzip rejects setuid and setgid files even
-#. when --force was used. bzip2 doesn't check
-#. for them, but calls fchown() after fchmod(),
-#. and many systems automatically drop setuid
-#. and setgid bits there.
-#.
-#. We accept setuid and setgid files if
-#. --force was used. We drop these bits
-#. explicitly in io_copy_attr().
-#: ../src/xz/file_io.c:478
+#: src/xz/file_io.c:478
#, c-format
msgid "%s: File has setuid or setgid bit set, skipping"
msgstr "%s: il file ha il bit setuid o setgid impostato, viene saltato"
-#: ../src/xz/file_io.c:485
+#: src/xz/file_io.c:485
#, c-format
msgid "%s: File has sticky bit set, skipping"
msgstr "%s: il file ha lo sticky bit impostato, viene saltato"
-#: ../src/xz/file_io.c:492
+#: src/xz/file_io.c:492
#, c-format
msgid "%s: Input file has more than one hard link, skipping"
msgstr "%s: il file di input ha più di un collegamento fisico, viene saltato"
-#: ../src/xz/file_io.c:713
+#: src/xz/file_io.c:713
#, c-format
msgid "Error restoring the O_APPEND flag to standard output: %s"
msgstr "Errore nel ripristinare la flag O_APPEND sullo standard output: %s"
-#: ../src/xz/file_io.c:725
+#: src/xz/file_io.c:725
#, c-format
msgid "%s: Closing the file failed: %s"
msgstr "%s: chiusura del file non riuscita: %s"
-#: ../src/xz/file_io.c:761 ../src/xz/file_io.c:945
+#: src/xz/file_io.c:761 src/xz/file_io.c:945
#, c-format
msgid "%s: Seeking failed when trying to create a sparse file: %s"
msgstr ""
"%s: posizionamento non riuscito nel tentativo di creare un file sparso: %s"
-#: ../src/xz/file_io.c:820
+#: src/xz/file_io.c:820
#, c-format
msgid "%s: Read error: %s"
msgstr "%s: errore di lettura: %s"
-#: ../src/xz/file_io.c:843
+#: src/xz/file_io.c:843
#, c-format
msgid "%s: Error seeking the file: %s"
msgstr "%s: errore nel cercare il file: %s"
-#: ../src/xz/file_io.c:853
+#: src/xz/file_io.c:853
#, c-format
msgid "%s: Unexpected end of file"
msgstr "%s: fine del file inaspettata"
-#: ../src/xz/file_io.c:903
+#: src/xz/file_io.c:903
#, c-format
msgid "%s: Write error: %s"
msgstr "%s: errore di scrittura: %s"
-#: ../src/xz/hardware.c:100
+#: src/xz/hardware.c:100
msgid "Disabled"
msgstr "Disabilitato"
#. TRANSLATORS: Test with "xz --info-memory" to see if
#. the alignment looks nice.
-#: ../src/xz/hardware.c:119
+#: src/xz/hardware.c:119
msgid "Total amount of physical memory (RAM): "
msgstr "Quantità totale di memoria fisica (RAM): "
-#: ../src/xz/hardware.c:121
+#: src/xz/hardware.c:121
msgid "Memory usage limit for compression: "
msgstr "Limite utilizzo memoria per la compressione: "
-#: ../src/xz/hardware.c:123
+#: src/xz/hardware.c:123
msgid "Memory usage limit for decompression: "
msgstr "Limite utilizzo memoria per l'estrazione: "
#. TRANSLATORS: Indicates that there is no integrity check.
#. This string is used in tables, so the width must not
#. exceed ten columns with a fixed-width font.
-#: ../src/xz/list.c:62
+#: src/xz/list.c:62
msgid "None"
msgstr "Nessuno"
@@ -227,60 +215,60 @@ msgstr "Nessuno"
#. strings are used in tables, so the width must not exceed ten
#. columns with a fixed-width font. It's OK to omit the dash if
#. you need space for one extra letter, but don't use spaces.
-#: ../src/xz/list.c:69
+#: src/xz/list.c:69
msgid "Unknown-2"
msgstr "Sconosc2"
-#: ../src/xz/list.c:70
+#: src/xz/list.c:70
msgid "Unknown-3"
msgstr "Sconosc3"
-#: ../src/xz/list.c:72
+#: src/xz/list.c:72
msgid "Unknown-5"
msgstr "Sconosc5"
-#: ../src/xz/list.c:73
+#: src/xz/list.c:73
msgid "Unknown-6"
msgstr "Sconosc6"
-#: ../src/xz/list.c:74
+#: src/xz/list.c:74
msgid "Unknown-7"
msgstr "Sconosc7"
-#: ../src/xz/list.c:75
+#: src/xz/list.c:75
msgid "Unknown-8"
msgstr "Sconosc8"
-#: ../src/xz/list.c:76
+#: src/xz/list.c:76
msgid "Unknown-9"
msgstr "Sconosc9"
-#: ../src/xz/list.c:78
+#: src/xz/list.c:78
msgid "Unknown-11"
msgstr "Sconosc11"
-#: ../src/xz/list.c:79
+#: src/xz/list.c:79
msgid "Unknown-12"
msgstr "Sconosc12"
-#: ../src/xz/list.c:80
+#: src/xz/list.c:80
msgid "Unknown-13"
msgstr "Sconosc13"
-#: ../src/xz/list.c:81
+#: src/xz/list.c:81
msgid "Unknown-14"
msgstr "Sconosc14"
-#: ../src/xz/list.c:82
+#: src/xz/list.c:82
msgid "Unknown-15"
msgstr "Sconosc15"
-#: ../src/xz/list.c:126
+#: src/xz/list.c:126
#, c-format
msgid "%s: File is empty"
msgstr "%s: il file è vuoto"
-#: ../src/xz/list.c:131
+#: src/xz/list.c:131
#, c-format
msgid "%s: Too small to be a valid .xz file"
msgstr "%s: troppo piccolo per essere un file .xz valido"
@@ -289,51 +277,49 @@ msgstr "%s: troppo piccolo per essere un file .xz valido"
#. to Ratio, the columns are right aligned. Check and Filename
#. are left aligned. If you need longer words, it's OK to
#. use two lines here. Test with "xz -l foo.xz".
-#: ../src/xz/list.c:612
+#: src/xz/list.c:603
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
msgstr " Strm Blocc. Compresso Estratto Rapp. Contr Nome file"
-#: ../src/xz/list.c:652
+#: src/xz/list.c:643
#, c-format
msgid " Streams: %s\n"
msgstr " Stream: %s\n"
-#: ../src/xz/list.c:654
+#: src/xz/list.c:645
#, c-format
msgid " Blocks: %s\n"
msgstr " Blocchi: %s\n"
-#: ../src/xz/list.c:656
+#: src/xz/list.c:647
#, c-format
msgid " Compressed size: %s\n"
msgstr " Dim. compresso: %s\n"
-#: ../src/xz/list.c:659
+#: src/xz/list.c:650
#, c-format
msgid " Uncompressed size: %s\n"
msgstr " Dim. estratto: %s\n"
-#: ../src/xz/list.c:662
+#: src/xz/list.c:653
#, c-format
msgid " Ratio: %s\n"
msgstr " Rapporto: %s\n"
-#: ../src/xz/list.c:664
+#: src/xz/list.c:655
#, c-format
msgid " Check: %s\n"
msgstr " Controllo: %s\n"
-#: ../src/xz/list.c:665
+#: src/xz/list.c:656
#, c-format
msgid " Stream padding: %s\n"
msgstr " Padding dello stream: %s\n"
-#. Print information about the Streams.
-#.
#. TRANSLATORS: The second line is column headings. All except
#. Check are right aligned; Check is left aligned. Test with
#. "xz -lv foo.xz".
-#: ../src/xz/list.c:693
+#: src/xz/list.c:684
msgid ""
" Streams:\n"
" Stream Blocks CompOffset UncompOffset CompSize "
@@ -345,7 +331,7 @@ msgstr ""
#. TRANSLATORS: The second line is column headings. All
#. except Check are right aligned; Check is left aligned.
-#: ../src/xz/list.c:748
+#: src/xz/list.c:739
#, c-format
msgid ""
" Blocks:\n"
@@ -363,74 +349,66 @@ msgstr ""
#. are right aligned. %*s is replaced with 0-120
#. spaces to make the CheckVal column wide enough.
#. Test with "xz -lvv foo.xz".
-#: ../src/xz/list.c:760
+#: src/xz/list.c:751
#, c-format
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
msgstr " Val.cont %*s Header Flag Dim.compr. Uso mem. Filtri"
-#: ../src/xz/list.c:838 ../src/xz/list.c:1007
+#: src/xz/list.c:829 src/xz/list.c:998
#, c-format
msgid " Memory needed: %s MiB\n"
msgstr " Memoria necessaria: %s MiB\n"
-#: ../src/xz/list.c:840 ../src/xz/list.c:1009
+#: src/xz/list.c:831 src/xz/list.c:1000
#, c-format
msgid " Sizes in headers: %s\n"
msgstr " Dim. negli header: %s\n"
-#: ../src/xz/list.c:841 ../src/xz/list.c:1010
+#: src/xz/list.c:832 src/xz/list.c:1001
msgid "Yes"
msgstr "Sì"
-#: ../src/xz/list.c:841 ../src/xz/list.c:1010
+#: src/xz/list.c:832 src/xz/list.c:1001
msgid "No"
msgstr "No"
-#. Since we print totals only when there are at least two files,
-#. the English message will always use "%s files". But some other
-#. languages need different forms for different plurals so we
-#. have to translate this with ngettext().
-#.
#. TRANSLATORS: %s is an integer. Only the plural form of this
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
-#: ../src/xz/list.c:986
+#: src/xz/list.c:977
#, c-format
msgid "%s file\n"
msgid_plural "%s files\n"
msgstr[0] "%s file\n"
msgstr[1] "%s file\n"
-#: ../src/xz/list.c:999
+#: src/xz/list.c:990
msgid "Totals:"
msgstr "Totali:"
-#: ../src/xz/list.c:1000
+#: src/xz/list.c:991
#, c-format
msgid " Number of files: %s\n"
msgstr " Numero di file: %s\n"
-#: ../src/xz/list.c:1072
+#: src/xz/list.c:1063
msgid "--list works only on .xz files (--format=xz or --format=auto)"
msgstr "--list funziona solamente con file .xz (--format=xz o --format=auto)"
-#: ../src/xz/list.c:1078
+#: src/xz/list.c:1069
msgid "--list does not support reading from standard input"
msgstr "--list non è in grado di leggere dallo standard input"
-#: ../src/xz/main.c:89
+#: src/xz/main.c:89
#, c-format
msgid "%s: Error reading filenames: %s"
msgstr "%s: errore nel leggere i nomi dei file: %s"
-#: ../src/xz/main.c:96
+#: src/xz/main.c:96
#, c-format
msgid "%s: Unexpected end of input when reading filenames"
msgstr "%s: fine dell'input durante la lettura dei nomi dei file non attesa"
-#. A null character was found when using --files,
-#. which expects plain text input separated with
-#. newlines.
-#: ../src/xz/main.c:120
+#: src/xz/main.c:120
#, c-format
msgid ""
"%s: Null character found when reading filenames; maybe you meant to use `--"
@@ -439,11 +417,11 @@ msgstr ""
"%s: nessun carattere trovato durante la lettura dei nomi dei file; forse si "
"intendeva usare \"--files0\" invece di \"--files\"?"
-#: ../src/xz/main.c:174
+#: src/xz/main.c:174
msgid "Compression and decompression with --robot are not supported yet."
msgstr "La compressione e l'estrazione con --robot non sono ancora supportate."
-#: ../src/xz/main.c:231
+#: src/xz/main.c:231
msgid ""
"Cannot read data from standard input when reading filenames from standard "
"input"
@@ -455,68 +433,71 @@ msgstr ""
#. of the line in messages. Usually it becomes "xz: ".
#. This is a translatable string because French needs
#. a space before a colon.
-#: ../src/xz/message.c:733
+#: src/xz/message.c:733
#, c-format
msgid "%s: "
msgstr "%s: "
-#: ../src/xz/message.c:796 ../src/xz/message.c:846
+#: src/xz/message.c:796 src/xz/message.c:846
msgid "Internal error (bug)"
msgstr "Errore interno (bug)"
-#: ../src/xz/message.c:803
+#: src/xz/message.c:803
msgid "Cannot establish signal handlers"
msgstr "Impossibile stabilire i gestori dei segnali"
-#: ../src/xz/message.c:812
+#: src/xz/message.c:812
msgid "No integrity check; not verifying file integrity"
msgstr ""
"Nessun controllo d'integrità; l'integrità del file non viene verificata"
-#: ../src/xz/message.c:815
+#: src/xz/message.c:815
msgid "Unsupported type of integrity check; not verifying file integrity"
msgstr ""
"Tipo di controllo di integrità non supportato; l'integrità del file non "
"viene verificata"
-#: ../src/xz/message.c:822
+#: src/xz/message.c:822
msgid "Memory usage limit reached"
msgstr "Limite di utilizzo della memoria raggiunto"
-#: ../src/xz/message.c:825
+#: src/xz/message.c:825
msgid "File format not recognized"
msgstr "Formato di file non riconosciuto"
-#: ../src/xz/message.c:828
+#: src/xz/message.c:828
msgid "Unsupported options"
msgstr "Opzioni non supportate"
-#: ../src/xz/message.c:831
+#: src/xz/message.c:831
msgid "Compressed data is corrupt"
msgstr "I dati compressi sono danneggiati"
-#: ../src/xz/message.c:834
+#: src/xz/message.c:834
msgid "Unexpected end of input"
msgstr "Fine dell'input non attesa"
-#: ../src/xz/message.c:885
+#: src/xz/message.c:867
+#, c-format
+msgid "%s MiB of memory is required. The limiter is disabled."
+msgstr "%s MiB di memoria sono richiesti. Alcun limite impostato."
+
+#: src/xz/message.c:895
#, c-format
msgid "%s MiB of memory is required. The limit is %s."
msgstr "%s MiB di memoria sono richiesti. Il limite è %s."
-#: ../src/xz/message.c:1052
+#: src/xz/message.c:1062
#, c-format
msgid "%s: Filter chain: %s\n"
msgstr "%s: catena di filtri: %s\n"
-#. Print this with V_WARNING instead of V_ERROR to prevent it from
-#. showing up when --quiet has been specified.
-#: ../src/xz/message.c:1062
+#: src/xz/message.c:1072
#, c-format
msgid "Try `%s --help' for more information."
msgstr "Provare \"%s --help\" per maggiori informazioni."
-#: ../src/xz/message.c:1088
+#: src/xz/message.c:1098
#, c-format
msgid ""
"Usage: %s [OPTION]... [FILE]...\n"
@@ -527,18 +508,18 @@ msgstr ""
"Comprime o estrae i FILE nel formato .xz.\n"
"\n"
-#: ../src/xz/message.c:1095
+#: src/xz/message.c:1105
msgid ""
"Mandatory arguments to long options are mandatory for short options too.\n"
msgstr ""
"Gli argomenti obbligatori per le opzioni lunghe lo sono anche per quelle "
"brevi.\n"
-#: ../src/xz/message.c:1099
+#: src/xz/message.c:1109
msgid " Operation mode:\n"
msgstr " Modalità di operazione:\n"
-#: ../src/xz/message.c:1102
+#: src/xz/message.c:1112
msgid ""
" -z, --compress force compression\n"
" -d, --decompress force decompression\n"
@@ -550,7 +531,7 @@ msgstr ""
" -t, --test Verifica l'integrità dei file compressi\n"
" -l, --list Elenca informazioni sui file .xz"
-#: ../src/xz/message.c:1108
+#: src/xz/message.c:1118
msgid ""
"\n"
" Operation modifiers:\n"
@@ -558,7 +539,7 @@ msgstr ""
"\n"
" Modificatori di operazioni:\n"
-#: ../src/xz/message.c:1111
+#: src/xz/message.c:1121
msgid ""
" -k, --keep keep (don't delete) input files\n"
" -f, --force force overwrite of output file and (de)compress links\n"
@@ -571,7 +552,7 @@ msgstr ""
" -c, --stdout Scrive sullo standard output e non elimina i file di "
"input"
-#: ../src/xz/message.c:1117
+#: src/xz/message.c:1127
msgid ""
" --no-sparse do not create sparse files when decompressing\n"
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
@@ -591,7 +572,7 @@ msgstr ""
" di newline\n"
" --files0=[FILE] Come --files ma usa il carattere null come terminatore"
-#: ../src/xz/message.c:1125
+#: src/xz/message.c:1135
msgid ""
"\n"
" Basic file format and compression options:\n"
@@ -599,7 +580,7 @@ msgstr ""
"\n"
" Formato file di base e opzioni di compressione:\n"
-#: ../src/xz/message.c:1127
+#: src/xz/message.c:1137
msgid ""
" -F, --format=FMT file format to encode or decode; possible values are\n"
" `auto' (default), `xz', `lzma', and `raw'\n"
@@ -614,7 +595,7 @@ msgstr ""
"attenzione),\n"
" \"crc32\", \"crc64\" (predefinito) o \"sha256\""
-#: ../src/xz/message.c:1134
+#: src/xz/message.c:1144
msgid ""
" -0 ... -9 compression preset; default is 6; take compressor "
"*and*\n"
@@ -627,7 +608,7 @@ msgstr ""
"prima\n"
" di usare 7-9"
-#: ../src/xz/message.c:1138
+#: src/xz/message.c:1148
msgid ""
" -e, --extreme try to improve compression ratio by using more CPU "
"time;\n"
@@ -638,7 +619,7 @@ msgstr ""
"di\n"
" memoria in fase di estrazione"
-#: ../src/xz/message.c:1143
+#: src/xz/message.c:1153
#, no-c-format
msgid ""
" --memlimit-compress=LIMIT\n"
@@ -656,7 +637,7 @@ msgstr ""
"byte,\n"
" % della memoria RAM oppure 0 per il valore predefinito"
-#: ../src/xz/message.c:1150
+#: src/xz/message.c:1160
msgid ""
" --no-adjust if compression settings exceed the memory usage "
"limit,\n"
@@ -668,7 +649,7 @@ msgstr ""
" utilizzo della memoria, lancia un errore invece di\n"
" utilizzare valori più piccoli"
-#: ../src/xz/message.c:1156
+#: src/xz/message.c:1166
msgid ""
"\n"
" Custom filter chain for compression (alternative for using presets):"
@@ -677,7 +658,7 @@ msgstr ""
" Catena di filtri personalizzati per la compressione (alternative per\n"
" l'utilizzo di preset):"
-#: ../src/xz/message.c:1165
+#: src/xz/message.c:1175
msgid ""
"\n"
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero "
@@ -720,7 +701,7 @@ msgstr ""
"0=automatica\n"
" (predefinito)"
-#: ../src/xz/message.c:1180
+#: src/xz/message.c:1190
msgid ""
"\n"
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
@@ -743,7 +724,7 @@ msgstr ""
" start=NUM Offset iniziale per le conversioni\n"
" (predefinito=0)"
-#: ../src/xz/message.c:1192
+#: src/xz/message.c:1202
msgid ""
"\n"
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
@@ -755,7 +736,7 @@ msgstr ""
" dist=NUM Distanza tra byte sottratti\n"
" gli uni dagli altri (1-256; 1)"
-#: ../src/xz/message.c:1200
+#: src/xz/message.c:1210
msgid ""
"\n"
" Other options:\n"
@@ -763,7 +744,7 @@ msgstr ""
"\n"
" Altre opzioni:\n"
-#: ../src/xz/message.c:1203
+#: src/xz/message.c:1213
msgid ""
" -q, --quiet suppress warnings; specify twice to suppress errors "
"too\n"
@@ -776,16 +757,16 @@ msgstr ""
"ancora\n"
" più prolisso"
-#: ../src/xz/message.c:1208
+#: src/xz/message.c:1218
msgid " -Q, --no-warn make warnings not affect the exit status"
msgstr " -Q, --no-warn Gli avvisi non influenzano lo stato d'uscita"
-#: ../src/xz/message.c:1210
+#: src/xz/message.c:1220
msgid ""
" --robot use machine-parsable messages (useful for scripts)"
msgstr " --robot Usa messaggi analizzabili (utile per gli script)"
-#: ../src/xz/message.c:1213
+#: src/xz/message.c:1223
msgid ""
" --info-memory display the total amount of RAM and the currently "
"active\n"
@@ -795,7 +776,7 @@ msgstr ""
"attuale\n"
" attivo di utilizzo della memore ed esce"
-#: ../src/xz/message.c:1216
+#: src/xz/message.c:1226
msgid ""
" -h, --help display the short help (lists only the basic options)\n"
" -H, --long-help display this long help and exit"
@@ -803,7 +784,7 @@ msgstr ""
" -h, --help Stampa l'aiuto breve (elenca solo le opzioni di base)\n"
" -H, --long-help Stampa questo lungo aiuto ed esce"
-#: ../src/xz/message.c:1220
+#: src/xz/message.c:1230
msgid ""
" -h, --help display this short help and exit\n"
" -H, --long-help display the long help (lists also the advanced options)"
@@ -811,11 +792,11 @@ msgstr ""
" -h, --help Stampa questo breve aiuto ed esce\n"
" -H, --long-help Stampa l'aiuto lungo (elenca anche le opzioni avanzate)"
-#: ../src/xz/message.c:1225
+#: src/xz/message.c:1235
msgid " -V, --version display the version number and exit"
msgstr " -V, --version Stampa il numero della versione ed esce"
-#: ../src/xz/message.c:1227
+#: src/xz/message.c:1237
msgid ""
"\n"
"With no FILE, or when FILE is -, read standard input.\n"
@@ -827,51 +808,51 @@ msgstr ""
#. for this package. Please add _another line_ saying
#. "Report translation bugs to <...>\n" with the email or WWW
#. address for translation bugs. Thanks.
-#: ../src/xz/message.c:1233
+#: src/xz/message.c:1243
#, c-format
msgid "Report bugs to <%s> (in English or Finnish).\n"
msgstr ""
"Segnalare i bug a <%s> (in inglese o finlandese).\n"
"Segnalare i bug di traduzione a <tp@lists.linux.it>.\n"
-#: ../src/xz/message.c:1235
+#: src/xz/message.c:1245
#, c-format
msgid "%s home page: <%s>\n"
msgstr "Sito web di %s: <%s>\n"
-#: ../src/xz/options.c:86
+#: src/xz/options.c:86
#, c-format
msgid "%s: Options must be `name=value' pairs separated with commas"
msgstr ""
"%s: le opzioni devono essere coppie \"nome=valore\" separate da virgole"
-#: ../src/xz/options.c:93
+#: src/xz/options.c:93
#, c-format
msgid "%s: Invalid option name"
msgstr "%s: nome opzione non valido"
-#: ../src/xz/options.c:113
+#: src/xz/options.c:113
#, c-format
msgid "%s: Invalid option value"
msgstr "%s: valore dell'opzione non valido"
-#: ../src/xz/options.c:247
+#: src/xz/options.c:247
#, c-format
msgid "Unsupported LZMA1/LZMA2 preset: %s"
msgstr "Preset LZMA/LZMA2 non supportato: %s"
-#: ../src/xz/options.c:355
+#: src/xz/options.c:355
msgid "The sum of lc and lp must not exceed 4"
msgstr "La somma di lc e lp non deve superare 4"
-#: ../src/xz/options.c:359
+#: src/xz/options.c:359
#, c-format
msgid "The selected match finder requires at least nice=%<PRIu32>"
msgstr ""
"Lo strumento per cercare corrispondenze selezionato richiede almeno nice="
"%<PRIu32>"
-#: ../src/xz/suffix.c:101 ../src/xz/suffix.c:194
+#: src/xz/suffix.c:101 src/xz/suffix.c:194
#, c-format
msgid ""
"%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
@@ -879,59 +860,59 @@ msgstr ""
"%s: con --format=raw, --suffix=.SUF è richiesto a meno che non si scriva "
"sullo stdout"
-#: ../src/xz/suffix.c:121
+#: src/xz/suffix.c:121
#, c-format
msgid "%s: Filename has an unknown suffix, skipping"
msgstr "%s: il nome del file ha un suffisso sconosciuto, viene saltato"
-#: ../src/xz/suffix.c:175 ../src/xz/suffix.c:184
+#: src/xz/suffix.c:175 src/xz/suffix.c:184
#, c-format
msgid "%s: File already has `%s' suffix, skipping"
msgstr "%s: il file ha già il suffisso \"%s\", viene saltato"
-#: ../src/xz/suffix.c:235
+#: src/xz/suffix.c:235
#, c-format
msgid "%s: Invalid filename suffix"
msgstr "%s: suffisso del nome del file non valido"
-#: ../src/xz/util.c:61
+#: src/xz/util.c:61
#, c-format
msgid "%s: Value is not a non-negative decimal integer"
msgstr "%s: il valore non è un numero intero decimale non-negativo"
-#: ../src/xz/util.c:103
+#: src/xz/util.c:103
#, c-format
msgid "%s: Invalid multiplier suffix"
msgstr "%s: suffisso del moltiplicatore non valido"
-#: ../src/xz/util.c:105
+#: src/xz/util.c:105
msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
msgstr ""
"I suffissi validi sono \"KiB\" (2^10), \"MiB\" (2^20), e \"GiB\" (2^30)."
-#: ../src/xz/util.c:122
+#: src/xz/util.c:122
#, c-format
msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
msgstr ""
"Il valore dell'opzione \"%s\" deve essere nell'intervallo [%<PRIu64>, "
"%<PRIu64>]"
-#: ../src/xz/util.c:247
+#: src/xz/util.c:247
msgid "Empty filename, skipping"
msgstr "Nome file vuoto, viene saltato"
-#: ../src/xz/util.c:261
+#: src/xz/util.c:261
msgid "Compressed data cannot be read from a terminal"
msgstr "I dati compressi non possono essere letti da un terminale"
-#: ../src/xz/util.c:274
+#: src/xz/util.c:274
msgid "Compressed data cannot be written to a terminal"
msgstr "I dati compressi non possono essere scritti ad un terminale"
-#: ../src/common/tuklib_exit.c:39
+#: src/common/tuklib_exit.c:39
msgid "Writing to standard output failed"
msgstr "Scrittura sullo standard ouput non riuscita"
-#: ../src/common/tuklib_exit.c:42
+#: src/common/tuklib_exit.c:42
msgid "Unknown error"
msgstr "Errore sconosciuto"
diff --git a/contrib/xz/po/pl.po b/contrib/xz/po/pl.po
index f359fae..c1056a7 100644
--- a/contrib/xz/po/pl.po
+++ b/contrib/xz/po/pl.po
@@ -1,13 +1,13 @@
# Polish translation for xz.
# This file is in the public domain.
-# Jakub Bogusz <qboosh@pld-linux.org>, 2011.
+# Jakub Bogusz <qboosh@pld-linux.org>, 2011-2012.
#
msgid ""
msgstr ""
-"Project-Id-Version: xz 5.0.1\n"
+"Project-Id-Version: xz 5.0.2\n"
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
-"POT-Creation-Date: 2011-01-28 20:01+0200\n"
-"PO-Revision-Date: 2011-02-02 16:51+0100\n"
+"POT-Creation-Date: 2012-05-29 13:50+0300\n"
+"PO-Revision-Date: 2012-05-29 18:15+0200\n"
"Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n"
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
"Language: pl\n"
@@ -265,41 +265,41 @@ msgstr "%s: Za mały na poprawny plik .xz"
#. to Ratio, the columns are right aligned. Check and Filename
#. are left aligned. If you need longer words, it's OK to
#. use two lines here. Test with "xz -l foo.xz".
-#: src/xz/list.c:612
+#: src/xz/list.c:603
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
msgstr "Strum. Bloki Spakowany Rozpakowany Wsp. Kontrola Nazwa pliku"
-#: src/xz/list.c:652
+#: src/xz/list.c:643
#, c-format
msgid " Streams: %s\n"
msgstr " Strumienie: %s\n"
-#: src/xz/list.c:654
+#: src/xz/list.c:645
#, c-format
msgid " Blocks: %s\n"
msgstr " Bloki: %s\n"
-#: src/xz/list.c:656
+#: src/xz/list.c:647
#, c-format
msgid " Compressed size: %s\n"
msgstr " Rozmiar spakowany: %s\n"
-#: src/xz/list.c:659
+#: src/xz/list.c:650
#, c-format
msgid " Uncompressed size: %s\n"
msgstr " Rozmiar rozpakowany: %s\n"
-#: src/xz/list.c:662
+#: src/xz/list.c:653
#, c-format
msgid " Ratio: %s\n"
msgstr " Współczynnik: %s\n"
-#: src/xz/list.c:664
+#: src/xz/list.c:655
#, c-format
msgid " Check: %s\n"
msgstr " Kontrola spójności: %s\n"
-#: src/xz/list.c:665
+#: src/xz/list.c:656
#, c-format
msgid " Stream padding: %s\n"
msgstr " Wyrównanie strumienia: %s\n"
@@ -307,7 +307,7 @@ msgstr " Wyrównanie strumienia: %s\n"
#. TRANSLATORS: The second line is column headings. All except
#. Check are right aligned; Check is left aligned. Test with
#. "xz -lv foo.xz".
-#: src/xz/list.c:693
+#: src/xz/list.c:684
msgid ""
" Streams:\n"
" Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
@@ -317,7 +317,7 @@ msgstr ""
#. TRANSLATORS: The second line is column headings. All
#. except Check are right aligned; Check is left aligned.
-#: src/xz/list.c:748
+#: src/xz/list.c:739
#, c-format
msgid ""
" Blocks:\n"
@@ -333,32 +333,32 @@ msgstr ""
#. are right aligned. %*s is replaced with 0-120
#. spaces to make the CheckVal column wide enough.
#. Test with "xz -lvv foo.xz".
-#: src/xz/list.c:760
+#: src/xz/list.c:751
#, c-format
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
msgstr " S.kontr. %*sNagłówek Flagi Rozm. spak. Uż.pamięci Filtry"
-#: src/xz/list.c:838 src/xz/list.c:1007
+#: src/xz/list.c:829 src/xz/list.c:998
#, c-format
msgid " Memory needed: %s MiB\n"
msgstr " Wymagana pamięć: %s MiB\n"
-#: src/xz/list.c:840 src/xz/list.c:1009
+#: src/xz/list.c:831 src/xz/list.c:1000
#, c-format
msgid " Sizes in headers: %s\n"
msgstr " Rozmiar w nagłówkach: %s\n"
-#: src/xz/list.c:841 src/xz/list.c:1010
+#: src/xz/list.c:832 src/xz/list.c:1001
msgid "Yes"
msgstr "Tak"
-#: src/xz/list.c:841 src/xz/list.c:1010
+#: src/xz/list.c:832 src/xz/list.c:1001
msgid "No"
msgstr "Nie"
#. TRANSLATORS: %s is an integer. Only the plural form of this
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
-#: src/xz/list.c:986
+#: src/xz/list.c:977
#, c-format
msgid "%s file\n"
msgid_plural "%s files\n"
@@ -366,20 +366,20 @@ msgstr[0] "%s plik\n"
msgstr[1] "%s pliki\n"
msgstr[2] "%s plików\n"
-#: src/xz/list.c:999
+#: src/xz/list.c:990
msgid "Totals:"
msgstr "Sumarycznie:"
-#: src/xz/list.c:1000
+#: src/xz/list.c:991
#, c-format
msgid " Number of files: %s\n"
msgstr " Liczba plików: %s\n"
-#: src/xz/list.c:1072
+#: src/xz/list.c:1063
msgid "--list works only on .xz files (--format=xz or --format=auto)"
msgstr "--list działa tylko z plikami .xz (--format=xz lub --format=auto)"
-#: src/xz/list.c:1078
+#: src/xz/list.c:1069
msgid "--list does not support reading from standard input"
msgstr "--list nie obsługuje odczytu ze standardowego wejścia"
@@ -406,58 +406,72 @@ msgstr "Kompresja i dekompresja z opcją --robot nie jest jeszcze obsługiwana."
msgid "Cannot read data from standard input when reading filenames from standard input"
msgstr "Nie można odczytać danych ze standardowego wejścia przy czytaniu nazw plików ze standardowego wejścia"
-#: src/xz/message.c:792 src/xz/message.c:842
+#. TRANSLATORS: This is the program name in the beginning
+#. of the line in messages. Usually it becomes "xz: ".
+#. This is a translatable string because French needs
+#. a space before a colon.
+#: src/xz/message.c:733
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:796 src/xz/message.c:846
msgid "Internal error (bug)"
msgstr "Błąd wewnętrzny"
-#: src/xz/message.c:799
+#: src/xz/message.c:803
msgid "Cannot establish signal handlers"
msgstr "Nie można ustawić obsługi sygnałów"
-#: src/xz/message.c:808
+#: src/xz/message.c:812
msgid "No integrity check; not verifying file integrity"
msgstr "Brak kontroli spójności; poprawność plików nie będzie weryfikowana"
-#: src/xz/message.c:811
+#: src/xz/message.c:815
msgid "Unsupported type of integrity check; not verifying file integrity"
msgstr "Nieobsługiwany typ kontroli spójności; poprawność plików nie będzie weryfikowana"
-#: src/xz/message.c:818
+#: src/xz/message.c:822
msgid "Memory usage limit reached"
msgstr "Osiągnięto limit użycia pamięci"
-#: src/xz/message.c:821
+#: src/xz/message.c:825
msgid "File format not recognized"
msgstr "Nie rozpoznany format pliku"
-#: src/xz/message.c:824
+#: src/xz/message.c:828
msgid "Unsupported options"
msgstr "Nieobsługiwane opcje"
-#: src/xz/message.c:827
+#: src/xz/message.c:831
msgid "Compressed data is corrupt"
msgstr "Dane skompresowane sÄ… uszkodzone"
-#: src/xz/message.c:830
+#: src/xz/message.c:834
msgid "Unexpected end of input"
msgstr "Nieoczekiwany koniec wejścia"
-#: src/xz/message.c:881
+#: src/xz/message.c:867
+#, c-format
+msgid "%s MiB of memory is required. The limiter is disabled."
+msgstr "Wymagane jest %s MiB pamięci. Limit jest wyłączony."
+
+#: src/xz/message.c:895
#, c-format
msgid "%s MiB of memory is required. The limit is %s."
msgstr "Wymagane jest %s MiB pamięci. Limit to %s."
-#: src/xz/message.c:1048
+#: src/xz/message.c:1062
#, c-format
msgid "%s: Filter chain: %s\n"
msgstr "%s: ÅaÅ„cuch filtrów: %s\n"
-#: src/xz/message.c:1058
+#: src/xz/message.c:1072
#, c-format
msgid "Try `%s --help' for more information."
msgstr "Polecenie `%s --help' pokaże więcej informacji."
-#: src/xz/message.c:1084
+#: src/xz/message.c:1098
#, c-format
msgid ""
"Usage: %s [OPTION]... [FILE]...\n"
@@ -468,17 +482,17 @@ msgstr ""
"Kompresja lub dekompresja PLIKÓW w formacie .xz.\n"
"\n"
-#: src/xz/message.c:1091
+#: src/xz/message.c:1105
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
msgstr ""
"Argumenty obowiązkowe dla opcji długich są obowiązkowe również dla opcji\n"
"krótkich.\n"
-#: src/xz/message.c:1095
+#: src/xz/message.c:1109
msgid " Operation mode:\n"
msgstr " Tryb pracy:\n"
-#: src/xz/message.c:1098
+#: src/xz/message.c:1112
msgid ""
" -z, --compress force compression\n"
" -d, --decompress force decompression\n"
@@ -490,7 +504,7 @@ msgstr ""
" -t, --test sprawdzenie spójności plików skompresowanych\n"
" -l, --list wypisanie informacji o plikach .xz"
-#: src/xz/message.c:1104
+#: src/xz/message.c:1118
msgid ""
"\n"
" Operation modifiers:\n"
@@ -498,7 +512,7 @@ msgstr ""
"\n"
" Modyfikatory operacji:\n"
-#: src/xz/message.c:1107
+#: src/xz/message.c:1121
msgid ""
" -k, --keep keep (don't delete) input files\n"
" -f, --force force overwrite of output file and (de)compress links\n"
@@ -508,7 +522,7 @@ msgstr ""
" -f, --force nadpisywanie plików wyjściowych i (de)kompresja dowiązań\n"
" -c, --stdout zapis na standardowe wyjście, nieusuwanie plików wej."
-#: src/xz/message.c:1113
+#: src/xz/message.c:1127
msgid ""
" --no-sparse do not create sparse files when decompressing\n"
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
@@ -524,7 +538,7 @@ msgstr ""
" wejścia; muszą być zakończone znakiem nowej linii\n"
" --files0[=PLIK] podobnie do --files, ale znakiem kończącym musi być NUL"
-#: src/xz/message.c:1121
+#: src/xz/message.c:1135
msgid ""
"\n"
" Basic file format and compression options:\n"
@@ -532,7 +546,7 @@ msgstr ""
"\n"
" Podstawowe opcje formatu pliku i kompresji:\n"
-#: src/xz/message.c:1123
+#: src/xz/message.c:1137
msgid ""
" -F, --format=FMT file format to encode or decode; possible values are\n"
" `auto' (default), `xz', `lzma', and `raw'\n"
@@ -544,7 +558,7 @@ msgstr ""
" -C, --check=TEST typ kontroli spójności: `none' (ostrożnie!),\n"
" `crc32', `crc64' (domyślny) lub `sha256'"
-#: src/xz/message.c:1130
+#: src/xz/message.c:1144
msgid ""
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
" decompressor memory usage into account before using 7-9!"
@@ -553,7 +567,7 @@ msgstr ""
" użyciem wartości 7-9 należy wziąć pod uwagę wykorzystanie\n"
" pamięci przy kompresji *oraz* dekompresji!"
-#: src/xz/message.c:1134
+#: src/xz/message.c:1148
msgid ""
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
" does not affect decompressor memory requirements"
@@ -562,7 +576,7 @@ msgstr ""
" ilości czasu procesora; nie wpływa na wymagania\n"
" pamięciowe dekompresora"
-#: src/xz/message.c:1139
+#: src/xz/message.c:1153
#, no-c-format
msgid ""
" --memlimit-compress=LIMIT\n"
@@ -578,7 +592,7 @@ msgstr ""
" dekompresji lub obu; LIMIT jest w bajtach, % RAM lub 0\n"
" dla limitów domyślnych"
-#: src/xz/message.c:1146
+#: src/xz/message.c:1160
msgid ""
" --no-adjust if compression settings exceed the memory usage limit,\n"
" give an error instead of adjusting the settings downwards"
@@ -587,7 +601,7 @@ msgstr ""
" pamięci, zostanie zgłoszony błąd zamiast zmniejszania\n"
" ustawień"
-#: src/xz/message.c:1152
+#: src/xz/message.c:1166
msgid ""
"\n"
" Custom filter chain for compression (alternative for using presets):"
@@ -595,7 +609,7 @@ msgstr ""
"\n"
" ÅaÅ„cuch wÅ‚asnych filtrów do kompresji (alternatywa do używania -0 .. -9):"
-#: src/xz/message.c:1161
+#: src/xz/message.c:1175
msgid ""
"\n"
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
@@ -624,7 +638,7 @@ msgstr ""
" mf=NAZWA dopasowywacz (hc3, hc4, bt2, bt3, bt4; bt4)\n"
" depth=ILE maks. głębokość szukania; 0=auto (domyślne)"
-#: src/xz/message.c:1176
+#: src/xz/message.c:1190
msgid ""
"\n"
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
@@ -646,7 +660,7 @@ msgstr ""
" Poprawne OPCJE dla wszystkich filtrów BCJ:\n"
" start=ILE offset początku konwersji (domyślnie=0)"
-#: src/xz/message.c:1188
+#: src/xz/message.c:1202
msgid ""
"\n"
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
@@ -658,7 +672,7 @@ msgstr ""
" dist=ILE odległość między bajtami odejmowanymi od\n"
" siebie (1-256; 1)"
-#: src/xz/message.c:1196
+#: src/xz/message.c:1210
msgid ""
"\n"
" Other options:\n"
@@ -666,7 +680,7 @@ msgstr ""
"\n"
" Inne opcje:\n"
-#: src/xz/message.c:1199
+#: src/xz/message.c:1213
msgid ""
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
" -v, --verbose be verbose; specify twice for even more verbose"
@@ -674,15 +688,15 @@ msgstr ""
" -q, --quiet pominięcie ostrzeżeń; dwukrotne podanie pomija też błędy\n"
" -v, --verbose więcej informacji; dwukrotne podanie to jeszcze więcej"
-#: src/xz/message.c:1204
+#: src/xz/message.c:1218
msgid " -Q, --no-warn make warnings not affect the exit status"
msgstr " -Q, --no-warn ostrzeżenia nie mają wpływu na status zakończenia"
-#: src/xz/message.c:1206
+#: src/xz/message.c:1220
msgid " --robot use machine-parsable messages (useful for scripts)"
msgstr " --robot komunikaty w formacie dla maszyny (do skryptów)"
-#: src/xz/message.c:1209
+#: src/xz/message.c:1223
msgid ""
" --info-memory display the total amount of RAM and the currently active\n"
" memory usage limits, and exit"
@@ -690,7 +704,7 @@ msgstr ""
" --info-memory wyświetlenie całkowitej ilości pamięci RAM oraz aktualnie\n"
" aktywnych limitów pamięci i zakończenie pracy"
-#: src/xz/message.c:1212
+#: src/xz/message.c:1226
msgid ""
" -h, --help display the short help (lists only the basic options)\n"
" -H, --long-help display this long help and exit"
@@ -698,7 +712,7 @@ msgstr ""
" -h, --help wyświetlenie krótkiego opisu (tylko podstawowe opcje)\n"
" -H, --long-help wyświetlenie tego długiego opisu i zakończenie"
-#: src/xz/message.c:1216
+#: src/xz/message.c:1230
msgid ""
" -h, --help display this short help and exit\n"
" -H, --long-help display the long help (lists also the advanced options)"
@@ -706,11 +720,11 @@ msgstr ""
" -h, --help wyświetlenie tego krótkiego opisu i zakończenie\n"
" -H, --long-help wyświetlenie długiego opisu (także opcje zaawansowane)"
-#: src/xz/message.c:1221
+#: src/xz/message.c:1235
msgid " -V, --version display the version number and exit"
msgstr " -V, --version wyświetlenie informacji o wersji i zakończenie"
-#: src/xz/message.c:1223
+#: src/xz/message.c:1237
msgid ""
"\n"
"With no FILE, or when FILE is -, read standard input.\n"
@@ -722,7 +736,7 @@ msgstr ""
#. for this package. Please add _another line_ saying
#. "Report translation bugs to <...>\n" with the email or WWW
#. address for translation bugs. Thanks.
-#: src/xz/message.c:1229
+#: src/xz/message.c:1243
#, c-format
msgid "Report bugs to <%s> (in English or Finnish).\n"
msgstr ""
@@ -731,7 +745,7 @@ msgstr ""
"Błędy w tłumaczeniu prosimy zgłaszać na adres\n"
"<translation-team-pl@lists.sourceforge.net>.\n"
-#: src/xz/message.c:1231
+#: src/xz/message.c:1245
#, c-format
msgid "%s home page: <%s>\n"
msgstr "Strona domowa %s: <%s>\n"
@@ -765,22 +779,22 @@ msgstr "Suma lc i lp nie może przekroczyć 4"
msgid "The selected match finder requires at least nice=%<PRIu32>"
msgstr "Wybrany dopasowywacz wymaga przynajmniej nice=%<PRIu32>"
-#: src/xz/suffix.c:104 src/xz/suffix.c:189
+#: src/xz/suffix.c:101 src/xz/suffix.c:194
#, c-format
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
msgstr "%s: Przy --format=raw i zapisie do pliku wymagana jest opcja --suffix=.ROZ"
-#: src/xz/suffix.c:124
+#: src/xz/suffix.c:121
#, c-format
msgid "%s: Filename has an unknown suffix, skipping"
msgstr "%s: Nazwa pliku ma nieznane rozszerzenie, pominięto"
-#: src/xz/suffix.c:179
+#: src/xz/suffix.c:175 src/xz/suffix.c:184
#, c-format
msgid "%s: File already has `%s' suffix, skipping"
msgstr "%s: Plik już ma rozszerzenie `%s', pominięto"
-#: src/xz/suffix.c:230
+#: src/xz/suffix.c:235
#, c-format
msgid "%s: Invalid filename suffix"
msgstr "%s: Błędne rozszerzenie nazwy pliku"
diff --git a/contrib/xz/src/common/sysdefs.h b/contrib/xz/src/common/sysdefs.h
index 69370ba..5ea6bda 100644
--- a/contrib/xz/src/common/sysdefs.h
+++ b/contrib/xz/src/common/sysdefs.h
@@ -103,9 +103,12 @@
# define UINT64_MAX UINT64_C(18446744073709551615)
#endif
-// Interix has broken header files, which typedef size_t to unsigned long,
-// but a few lines later define SIZE_MAX to INT32_MAX.
-#ifdef __INTERIX
+// Incorrect(?) SIZE_MAX:
+// - Interix headers typedef size_t to unsigned long,
+// but a few lines later define SIZE_MAX to INT32_MAX.
+// - SCO OpenServer (x86) headers typedef size_t to unsigned int
+// but define SIZE_MAX to INT32_MAX.
+#if defined(__INTERIX) || defined(_SCO_DS)
# undef SIZE_MAX
#endif
diff --git a/contrib/xz/src/liblzma/api/lzma/version.h b/contrib/xz/src/liblzma/api/lzma/version.h
index 9226663..629e8e1 100644
--- a/contrib/xz/src/liblzma/api/lzma/version.h
+++ b/contrib/xz/src/liblzma/api/lzma/version.h
@@ -22,7 +22,7 @@
*/
#define LZMA_VERSION_MAJOR 5
#define LZMA_VERSION_MINOR 0
-#define LZMA_VERSION_PATCH 3
+#define LZMA_VERSION_PATCH 4
#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE
#ifndef LZMA_VERSION_COMMIT
diff --git a/contrib/xz/src/liblzma/simple/simple_coder.c b/contrib/xz/src/liblzma/simple/simple_coder.c
index 37de7fa..a02b039 100644
--- a/contrib/xz/src/liblzma/simple/simple_coder.c
+++ b/contrib/xz/src/liblzma/simple/simple_coder.c
@@ -35,9 +35,6 @@ copy_or_code(lzma_coder *coder, lzma_allocator *allocator,
} else {
// Call the next coder in the chain to provide us some data.
- // We don't care about uncompressed_size here, because
- // the next filter in the chain will do it for us (since
- // we don't change the size of the data).
const lzma_ret ret = coder->next.code(
coder->next.coder, allocator,
in, in_pos, in_size,
@@ -110,7 +107,7 @@ simple_code(lzma_coder *coder, lzma_allocator *allocator,
// filtered if the buffer sizes used by the application are reasonable.
const size_t out_avail = out_size - *out_pos;
const size_t buf_avail = coder->size - coder->pos;
- if (out_avail > buf_avail) {
+ if (out_avail > buf_avail || buf_avail == 0) {
// Store the old position so that we know from which byte
// to start filtering.
const size_t out_start = *out_pos;
diff --git a/contrib/xz/src/liblzma/simple/simple_private.h b/contrib/xz/src/liblzma/simple/simple_private.h
index a69f827..fcf9f7c 100644
--- a/contrib/xz/src/liblzma/simple/simple_private.h
+++ b/contrib/xz/src/liblzma/simple/simple_private.h
@@ -22,8 +22,7 @@ struct lzma_coder_s {
/// Next filter in the chain
lzma_next_coder next;
- /// True if the next coder in the chain has returned LZMA_STREAM_END
- /// or if we have processed uncompressed_size bytes.
+ /// True if the next coder in the chain has returned LZMA_STREAM_END.
bool end_was_reached;
/// True if filter() should encode the data; false to decode.
diff --git a/contrib/xz/src/xz/args.c b/contrib/xz/src/xz/args.c
index 4bd84a0..34761d4 100644
--- a/contrib/xz/src/xz/args.c
+++ b/contrib/xz/src/xz/args.c
@@ -438,7 +438,7 @@ parse_environment(args_info *args, char *argv0, const char *varname)
} else if (prev_was_space) {
prev_was_space = false;
- // Keep argc small enough to fit into a singed int
+ // Keep argc small enough to fit into a signed int
// and to keep it usable for memory allocation.
if (++argc == my_min(
INT_MAX, SIZE_MAX / sizeof(char *)))
diff --git a/contrib/xz/src/xz/coder.c b/contrib/xz/src/xz/coder.c
index b123ec5..69b1225 100644
--- a/contrib/xz/src/xz/coder.c
+++ b/contrib/xz/src/xz/coder.c
@@ -284,7 +284,10 @@ coder_set_compression_settings(void)
static bool
is_format_xz(void)
{
- return strm.avail_in >= 6 && memcmp(in_buf.u8, "\3757zXZ", 6) == 0;
+ // Specify the magic as hex to be compatible with EBCDIC systems.
+ static const uint8_t magic[6] = { 0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00 };
+ return strm.avail_in >= sizeof(magic)
+ && memcmp(in_buf.u8, magic, sizeof(magic)) == 0;
}
diff --git a/contrib/xz/src/xz/message.c b/contrib/xz/src/xz/message.c
index 80c86a4..0a7a522 100644
--- a/contrib/xz/src/xz/message.c
+++ b/contrib/xz/src/xz/message.c
@@ -211,7 +211,7 @@ message_set_files(unsigned int files)
static void
print_filename(void)
{
- if (files_total != 1 || filename != stdin_filename) {
+ if (!opt_robot && (files_total != 1 || filename != stdin_filename)) {
signals_block();
FILE *file = opt_mode == MODE_LIST ? stdout : stderr;
@@ -859,6 +859,17 @@ message_mem_needed(enum message_verbosity v, uint64_t memusage)
// the user might need to +1 MiB to get high enough limit.)
memusage = round_up_to_mib(memusage);
+ uint64_t memlimit = hardware_memlimit_get(opt_mode);
+
+ // Handle the case when there is no memory usage limit.
+ // This way we don't print a weird message with a huge number.
+ if (memlimit == UINT64_MAX) {
+ message(v, _("%s MiB of memory is required. "
+ "The limiter is disabled."),
+ uint64_to_str(memusage, 0));
+ return;
+ }
+
// With US-ASCII:
// 2^64 with thousand separators + " MiB" suffix + '\0' = 26 + 4 + 1
// But there may be multibyte chars so reserve enough space.
@@ -867,7 +878,6 @@ message_mem_needed(enum message_verbosity v, uint64_t memusage)
// Show the memory usage limit as MiB unless it is less than 1 MiB.
// This way it's easy to notice errors where one has typed
// --memory=123 instead of --memory=123MiB.
- uint64_t memlimit = hardware_memlimit_get(opt_mode);
if (memlimit < (UINT32_C(1) << 20)) {
snprintf(memlimitstr, sizeof(memlimitstr), "%s B",
uint64_to_str(memlimit, 1));
diff --git a/contrib/xz/src/xz/xz.1 b/contrib/xz/src/xz/xz.1
index f1c9135..8edc456 100644
--- a/contrib/xz/src/xz/xz.1
+++ b/contrib/xz/src/xz/xz.1
@@ -5,7 +5,7 @@
.\" This file has been put into the public domain.
.\" You can do whatever you want with this file.
.\"
-.TH XZ 1 "2010-10-04" "Tukaani" "XZ Utils"
+.TH XZ 1 "2012-05-27" "Tukaani" "XZ Utils"
.
.SH NAME
xz, unxz, xzcat, lzma, unlzma, lzcat \- Compress or decompress .xz and .lzma files
@@ -1836,6 +1836,25 @@ headers.
.PD
.PP
The columns of the
+.B summary
+lines:
+.PD 0
+.RS
+.IP 2. 4
+Amount of memory (in bytes) required to decompress
+this file with this
+.B xz
+version
+.IP 3. 4
+.B yes
+or
+.B no
+indicating if all block headers have both compressed size and
+uncompressed size stored in them
+.RE
+.PD
+.PP
+The columns of the
.B totals
line:
.PD 0
diff --git a/crypto/heimdal/appl/ftp/common/Makefile.in b/crypto/heimdal/appl/ftp/common/Makefile.in
index f3ec619..c225821 100644
--- a/crypto/heimdal/appl/ftp/common/Makefile.in
+++ b/crypto/heimdal/appl/ftp/common/Makefile.in
@@ -96,7 +96,7 @@ CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
-ARFLAGS = cru
+ARFLAGS ?= cru
libcommon_a_AR = $(AR) $(ARFLAGS)
libcommon_a_LIBADD =
am_libcommon_a_OBJECTS = sockbuf.$(OBJEXT) buffer.$(OBJEXT)
diff --git a/crypto/heimdal/appl/telnet/libtelnet/Makefile.in b/crypto/heimdal/appl/telnet/libtelnet/Makefile.in
index 37a2296..33254f3 100644
--- a/crypto/heimdal/appl/telnet/libtelnet/Makefile.in
+++ b/crypto/heimdal/appl/telnet/libtelnet/Makefile.in
@@ -96,7 +96,7 @@ CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
-ARFLAGS = cru
+ARFLAGS ?= cru
libtelnet_a_AR = $(AR) $(ARFLAGS)
libtelnet_a_LIBADD =
am_libtelnet_a_OBJECTS = auth.$(OBJEXT) enc_des.$(OBJEXT) \
diff --git a/crypto/openssl/Makefile.org b/crypto/openssl/Makefile.org
index 55273ea..87153b8 100644
--- a/crypto/openssl/Makefile.org
+++ b/crypto/openssl/Makefile.org
@@ -63,8 +63,8 @@ DEPFLAG=
PEX_LIBS=
EX_LIBS=
EXE_EXT=
-ARFLAGS=
-AR=ar $(ARFLAGS) r
+ARFLAGS?= r
+AR=ar $(ARFLAGS)
RANLIB= ranlib
NM= nm
PERL= perl
diff --git a/crypto/openssl/crypto/Makefile b/crypto/openssl/crypto/Makefile
index 947dd5d..03b708b 100644
--- a/crypto/openssl/crypto/Makefile
+++ b/crypto/openssl/crypto/Makefile
@@ -13,7 +13,8 @@ MAKEDEPPROG= makedepend
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
MAKEFILE= Makefile
RM= rm -f
-AR= ar r
+ARFLAGS?= r
+AR= ar ${ARFLAGS}
RECURSIVE_MAKE= [ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \
(cd $$i && echo "making $$target in $(DIR)/$$i..." && \
diff --git a/crypto/openssl/crypto/bn/bn_word.c b/crypto/openssl/crypto/bn/bn_word.c
index ee7b87c..de83a15 100644
--- a/crypto/openssl/crypto/bn/bn_word.c
+++ b/crypto/openssl/crypto/bn/bn_word.c
@@ -144,26 +144,17 @@ int BN_add_word(BIGNUM *a, BN_ULONG w)
a->neg=!(a->neg);
return(i);
}
- /* Only expand (and risk failing) if it's possibly necessary */
- if (((BN_ULONG)(a->d[a->top - 1] + 1) == 0) &&
- (bn_wexpand(a,a->top+1) == NULL))
- return(0);
- i=0;
- for (;;)
+ for (i=0;w!=0 && i<a->top;i++)
{
- if (i >= a->top)
- l=w;
- else
- l=(a->d[i]+w)&BN_MASK2;
- a->d[i]=l;
- if (w > l)
- w=1;
- else
- break;
- i++;
+ a->d[i] = l = (a->d[i]+w)&BN_MASK2;
+ w = (w>l)?1:0;
}
- if (i >= a->top)
+ if (w && i==a->top)
+ {
+ if (bn_wexpand(a,a->top+1) == NULL) return 0;
a->top++;
+ a->d[i]=w;
+ }
bn_check_top(a);
return(1);
}
diff --git a/crypto/openssl/crypto/opensslv.h b/crypto/openssl/crypto/opensslv.h
index ec87545..6f412b6 100644
--- a/crypto/openssl/crypto/opensslv.h
+++ b/crypto/openssl/crypto/opensslv.h
@@ -29,7 +29,7 @@
#ifdef OPENSSL_FIPS
#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1c-fips 10 May 2012"
#else
-#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1c 10 May 2012"
+#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1c-freebsd 10 May 2012"
#endif
#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index cc3e623..3760fc0 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -605,7 +605,9 @@ chkprintcap_enable="NO" # Run chkprintcap(8) before running lpd.
chkprintcap_flags="-d" # Create missing directories by default.
dumpdev="AUTO" # Device to crashdump to (device name, AUTO, or NO).
dumpdir="/var/crash" # Directory where crash dumps are to be stored
-savecore_flags="" # Used if dumpdev is enabled above, and present.
+savecore_flags="-m 10" # Used if dumpdev is enabled above, and present.
+ # By default, only the 10 most recent kernel dumps
+ # are saved.
crashinfo_enable="YES" # Automatically generate crash dump summary.
crashinfo_program="/usr/sbin/crashinfo" # Script to generate crash dump summary.
quota_enable="NO" # turn on quotas on startup (or NO).
diff --git a/etc/devd/usb.conf b/etc/devd/usb.conf
index c1357a9..d3090ab 100644
--- a/etc/devd/usb.conf
+++ b/etc/devd/usb.conf
@@ -423,6 +423,14 @@ nomatch 32 {
nomatch 32 {
match "bus" "uhub[0-9]+";
match "mode" "host";
+ match "vendor" "0x0499";
+ match "product" "(0x1000|0x1001|0x1002|0x1003|0x1004|0x1005|0x1006|0x1007|0x1008|0x1009|0x100a|0x100c|0x100d|0x100e|0x100f|0x1010|0x1011|0x1012|0x1013|0x1014|0x1015|0x1016|0x1017|0x1018|0x1019|0x101a|0x101b|0x101c|0x101d|0x101e|0x101f|0x1020|0x1021|0x1022|0x1023|0x1024|0x1025|0x1026|0x1027|0x1028|0x1029|0x102a|0x102b|0x102e|0x1030|0x1031|0x1032|0x1033|0x1034|0x1035|0x1036|0x1037|0x1038|0x1039|0x103a|0x103b|0x103c|0x103d|0x103e|0x103f|0x1040|0x1041|0x1042|0x1043|0x1044|0x1045|0x104e|0x104f|0x1050|0x1051|0x1052|0x1053|0x1054|0x1055|0x1056|0x1057|0x1058|0x1059|0x105a|0x105b|0x105c|0x105d|0x1503|0x2000|0x2001|0x2002|0x2003|0x5000|0x5001|0x5002|0x5003|0x5004|0x5005|0x5006|0x5007|0x5008|0x5009|0x500a|0x500b|0x500c|0x500d|0x500e|0x500f|0x7000|0x7010)";
+ action "kldload -n snd_uaudio";
+};
+
+nomatch 32 {
+ match "bus" "uhub[0-9]+";
+ match "mode" "host";
match "vendor" "0x049f";
match "product" "(0x0003|0x0032)";
action "kldload -n uipaq";
@@ -2647,6 +2655,14 @@ nomatch 32 {
nomatch 32 {
match "bus" "uhub[0-9]+";
match "mode" "host";
+ match "vendor" "0x0f3d";
+ match "product" "0x68aa";
+ action "kldload -n u3g";
+};
+
+nomatch 32 {
+ match "bus" "uhub[0-9]+";
+ match "mode" "host";
match "vendor" "0x0f4e";
match "product" "0x0200";
action "kldload -n uipaq";
@@ -4199,6 +4215,14 @@ nomatch 32 {
nomatch 32 {
match "bus" "uhub[0-9]+";
match "mode" "host";
+ match "vendor" "0x22de";
+ match "product" "0x6801";
+ action "kldload -n u3g";
+};
+
+nomatch 32 {
+ match "bus" "uhub[0-9]+";
+ match "mode" "host";
match "vendor" "0x2478";
match "product" "0x2008";
action "kldload -n uplcom";
@@ -4611,5 +4635,5 @@ nomatch 32 {
action "kldload -n umass";
};
-# 2279 USB entries processed
+# 2386 USB entries processed
diff --git a/etc/login.conf b/etc/login.conf
index c62687a..92826c4 100644
--- a/etc/login.conf
+++ b/etc/login.conf
@@ -32,7 +32,7 @@ default:\
:cputime=unlimited:\
:datasize=unlimited:\
:stacksize=unlimited:\
- :memorylocked=unlimited:\
+ :memorylocked=64K:\
:memoryuse=unlimited:\
:filesize=unlimited:\
:coredumpsize=unlimited:\
@@ -59,6 +59,7 @@ xuser:\
staff:\
:tc=default:
daemon:\
+ :memorylocked=64M:\
:tc=default:
news:\
:tc=default:
@@ -72,6 +73,7 @@ dialer:\
# in preference to 'default'.
root:\
:ignorenologin:\
+ :memorylocked=unlimited:\
:tc=default:
#
diff --git a/etc/mtree/BSD.var.dist b/etc/mtree/BSD.var.dist
index 30b901d..6a9a7f4 100644
--- a/etc/mtree/BSD.var.dist
+++ b/etc/mtree/BSD.var.dist
@@ -18,11 +18,11 @@
/set mode=0750
/set gname=audit
audit
- ..
dist uname=auditdistd gname=audit mode=0770
..
remote uname=auditdistd gname=wheel mode=0700
..
+ ..
/set gname=wheel
backups
..
diff --git a/etc/newsyslog.conf b/etc/newsyslog.conf
index b9ac1a8..76e0707 100644
--- a/etc/newsyslog.conf
+++ b/etc/newsyslog.conf
@@ -33,7 +33,7 @@
/var/log/pflog 600 3 100 * JB /var/run/pflogd.pid
/var/log/ppp.log root:network 640 3 100 * JC
/var/log/security 600 10 100 * JC
-/var/log/sendmail.st 640 10 * 168 B
+/var/log/sendmail.st 640 10 * 168 BN
/var/log/utx.log 644 3 * @01T05 B
/var/log/weekly.log 640 5 * $W6D0 JN
/var/log/xferlog 600 7 100 * JC
diff --git a/etc/periodic/daily/Makefile b/etc/periodic/daily/Makefile
index b324f70..9c7f4d7 100644
--- a/etc/periodic/daily/Makefile
+++ b/etc/periodic/daily/Makefile
@@ -6,7 +6,6 @@ FILES= 100.clean-disks \
110.clean-tmps \
120.clean-preserve \
200.backup-passwd \
- 220.backup-pkgdb \
330.news \
400.status-disks \
405.status-ata-raid \
@@ -41,7 +40,8 @@ FILES+= 480.status-ntpd
.endif
.if ${MK_PKGTOOLS} != "no"
-FILES+= 490.status-pkg-changes
+FILES+= 220.backup-pkgdb \
+ 490.status-pkg-changes
.endif
.if ${MK_RCMDS} != "no"
diff --git a/etc/pf.os b/etc/pf.os
index 00873a7..699f19a 100644
--- a/etc/pf.os
+++ b/etc/pf.os
@@ -1,5 +1,5 @@
# $FreeBSD$
-# $OpenBSD: pf.os,v 1.25 2010/10/18 15:55:27 deraadt Exp $
+# $OpenBSD: pf.os,v 1.26 2012/08/03 12:25:16 jsg Exp $
# passive OS fingerprinting
# -------------------------
#
@@ -226,7 +226,13 @@ S2:64:1:60:M*,S,T,N,W0: Linux:2.4::Linux 2.4 (big boy)
S3:64:1:60:M*,S,T,N,W0: Linux:2.4:.18-21:Linux 2.4.18 and newer
S4:64:1:60:M*,S,T,N,W0: Linux:2.4::Linux 2.4/2.6 <= 2.6.7
S4:64:1:60:M*,S,T,N,W0: Linux:2.6:.1-7:Linux 2.4/2.6 <= 2.6.7
-S4:64:1:60:M*,S,T,N,W7: Linux:2.6:8:Linux 2.6.8 and newer (?)
+
+S4:64:1:60:M*,S,T,N,W5: Linux:2.6::Linux 2.6 (newer, 1)
+S4:64:1:60:M*,S,T,N,W6: Linux:2.6::Linux 2.6 (newer, 2)
+S4:64:1:60:M*,S,T,N,W7: Linux:2.6::Linux 2.6 (newer, 3)
+T4:64:1:60:M*,S,T,N,W7: Linux:2.6::Linux 2.6 (newer, 4)
+
+S10:64:1:60:M*,S,T,N,W4: Linux:3.0::Linux 3.0
S3:64:1:60:M*,S,T,N,W1: Linux:2.5::Linux 2.5 (sometimes 2.4)
S4:64:1:60:M*,S,T,N,W1: Linux:2.5-2.6::Linux 2.5/2.6
@@ -429,6 +435,8 @@ S44:128:1:48:M*,N,N,S: Windows:XP:SP1:Windows Pro SP1, 2000 SP3
32767:128:1:48:M*,N,N,S: Windows:2000:SP4:Windows SP1, 2000 SP4
32767:128:1:48:M*,N,N,S: Windows:XP:SP1:Windows SP1, 2000 SP4
+8192:128:1:52:M*,N,W2,N,N,S: Windows:Vista::Windows Vista/7
+
# Odds, ends, mods:
S52:128:1:48:M1260,N,N,S: Windows:2000:cisco:Windows XP/2000 via Cisco
diff --git a/etc/rc.d/auditdistd b/etc/rc.d/auditdistd
index 0aa62e8..f8c8195 100644
--- a/etc/rc.d/auditdistd
+++ b/etc/rc.d/auditdistd
@@ -14,7 +14,7 @@ name="auditdistd"
rcvar="${name}_enable"
pidfile="/var/run/${name}.pid"
command="/usr/sbin/${name}"
-required_files="/etc/${name}.conf"
+required_files="/etc/security/${name}.conf"
extra_commands="reload"
load_rc_config $name
diff --git a/etc/rc.d/savecore b/etc/rc.d/savecore
index 4efb7db..3e61adc 100755
--- a/etc/rc.d/savecore
+++ b/etc/rc.d/savecore
@@ -62,7 +62,7 @@ savecore_start()
;;
esac
- if savecore -C "${dumpdir}" "${dev}" >/dev/null; then
+ if savecore -C "${dev}" >/dev/null; then
savecore ${savecore_flags} ${dumpdir} ${dumpdev}
if checkyesno crashinfo_enable; then
${crashinfo_program} -d ${dumpdir}
diff --git a/etc/rc.d/sysctl b/etc/rc.d/sysctl
index 34fb3b5..cc3e801 100755
--- a/etc/rc.d/sysctl
+++ b/etc/rc.d/sysctl
@@ -8,51 +8,27 @@
. /etc/rc.subr
name="sysctl"
+command="/sbin/sysctl"
stop_cmd=":"
start_cmd="sysctl_start"
reload_cmd="sysctl_start"
lastload_cmd="sysctl_start last"
extra_commands="reload lastload"
-#
-# Read in a file containing sysctl settings and set things accordingly.
-#
-parse_file()
-{
- if [ -f $1 ]; then
- while read var comments
- do
- case ${var} in
- \#*|'')
- ;;
- *)
- mib=${var%=*}
- val=${var#*=}
-
- if current_value=`${SYSCTL} -n ${mib} 2>/dev/null`; then
- case ${current_value} in
- ${val})
- ;;
- *)
- if ! sysctl "${var}" >/dev/null 2>&1; then
- warn "unable to set ${var}"
- fi
- ;;
- esac
- elif [ "$2" = "last" ]; then
- warn "sysctl ${mib} does not exist."
- fi
- ;;
- esac
- done < $1
- fi
-}
-
sysctl_start()
{
-
- parse_file /etc/sysctl.conf $1
- parse_file /etc/sysctl.conf.local $1
+ case $1 in
+ last)
+ command_args="-i -f"
+ ;;
+ *)
+ command_args="-f"
+ ;;
+ esac
+
+ for _f in /etc/sysctl.conf /etc/sysctl.conf.local; do
+ [ -r ${_f} ] && ${command} ${command_args} ${_f} > /dev/null
+ done
}
load_rc_config $name
diff --git a/etc/regdomain.xml b/etc/regdomain.xml
index ff57113..126f03a 100644
--- a/etc/regdomain.xml
+++ b/etc/regdomain.xml
@@ -1303,6 +1303,29 @@
</band>
</netband>
</rd>
+
+<rd id="xc900m">
+ <name>XC900M</name>
+ <sku>0x29b</sku>
+ <netband mode="11g">
+ <band>
+ <freqband ref="S1_905_925_5"/>
+ <maxpower>30</maxpower>
+ <flags>IEEE80211_CHAN_G</flags>
+ </band>
+ <band>
+ <freqband ref="S1_910_920_10"/>
+ <maxpower>30</maxpower>
+ <flags>IEEE80211_CHAN_G</flags>
+ </band>
+ <band>
+ <freqband ref="S1_915_915"/>
+ <maxpower>30</maxpower>
+ <flags>IEEE80211_CHAN_G</flags>
+ </band>
+ </netband>
+</rd>
+
</regulatory-domains>
<country-codes>
@@ -1896,6 +1919,25 @@
<flags>IEEE80211_CHAN_GSM</flags>
</freqband>
+<freqband id="S1_905_925_5">
+ <freqstart>905</freqstart> <freqend>925</freqend>
+ <chanwidth>5</chanwidth> <chansep>5</chansep>
+ <flags>IEEE80211_CHAN_GSM</flags>
+ <flags>IEEE80211_CHAN_QUARTER</flags>
+</freqband>
+<freqband id="S1_910_920_10">
+ <freqstart>910</freqstart> <freqend>920</freqend>
+ <chanwidth>10</chanwidth> <chansep>5</chansep>
+ <flags>IEEE80211_CHAN_GSM</flags>
+ <flags>IEEE80211_CHAN_HALF</flags>
+</freqband>
+<freqband id="S1_915_915">
+ <freqstart>915</freqstart> <freqend>915</freqend>
+ <chanwidth>20</chanwidth> <chansep>5</chansep>
+ <flags>IEEE80211_CHAN_GSM</flags>
+</freqband>
+
+
</shared-frequency-bands>
</regulatory-data>
diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc
index 5ce3e36..3e94371 100644
--- a/etc/root/dot.cshrc
+++ b/etc/root/dot.cshrc
@@ -23,10 +23,7 @@ setenv BLOCKSIZE K
if ($?prompt) then
# An interactive shell -- set some stuff up
- if ($uid == 0) then
- set user = root
- endif
- set prompt = "%n@%m:%~ %# "
+ set prompt = "%N@%m:%~ %# "
set promptchars = "%#"
set filec
diff --git a/etc/sendmail/freebsd.mc b/etc/sendmail/freebsd.mc
index 1e28c47..92efee1 100644
--- a/etc/sendmail/freebsd.mc
+++ b/etc/sendmail/freebsd.mc
@@ -63,13 +63,13 @@ dnl DNS based black hole lists
dnl --------------------------------
dnl DNS based black hole lists come and go on a regular basis
dnl so this file will not serve as a database of the available servers.
-dnl For that, visit
-dnl http://www.google.com/Top/Computers/Internet/E-mail/Spam/Blacklists/
+dnl For more information, visit
+dnl http://en.wikipedia.org/wiki/DNSBL
dnl Uncomment to activate your chosen DNS based blacklist
dnl FEATURE(dnsbl, `dnsbl.example.com')
dnl Alternatively, you can provide your own server and rejection message:
-dnl FEATURE(dnsbl, `dnsbl.example.com', ``"550 Mail from " $&{client_addr} " rejected'')
+dnl FEATURE(dnsbl, `dnsbl.example.com', ``"550 Mail from " $&{client_addr} " rejected"'')
dnl Dialup users should uncomment and define this appropriately
dnl define(`SMART_HOST', `your.isp.mail.server')
diff --git a/etc/sendmail/freebsd.submit.mc b/etc/sendmail/freebsd.submit.mc
index c6ec655..fbb036c 100644
--- a/etc/sendmail/freebsd.submit.mc
+++ b/etc/sendmail/freebsd.submit.mc
@@ -9,6 +9,7 @@ divert(-1)
#
#
+
#
# This is the FreeBSD configuration for a set-group-ID sm-msp sendmail
# that acts as a initial mail submission program.
diff --git a/games/fortune/datfiles/fortunes b/games/fortune/datfiles/fortunes
index e9edb26..c6928a8 100644
--- a/games/fortune/datfiles/fortunes
+++ b/games/fortune/datfiles/fortunes
@@ -35766,8 +35766,8 @@ the code over again, since I also removed the source.
%
Old age and treachery will overcome youth and skill.
%
-Old age is always fifteen years old than I am.
- -- B. Baruch
+Old age is always fifteen years older than I am.
+ -- Bernard Baruch
%
Old age is the harbor of all ills.
-- Bion
diff --git a/gnu/lib/libdialog/dlg_config.h b/gnu/lib/libdialog/dlg_config.h
index 3c73213..4dd6ab4 100644
--- a/gnu/lib/libdialog/dlg_config.h
+++ b/gnu/lib/libdialog/dlg_config.h
@@ -5,11 +5,9 @@
* $FreeBSD$
*/
-#define CURSES_WACS_ARRAY _nc_wacs
-#define DIALOG_PATCHDATE 20120706
+#define DIALOG_PATCHDATE 20100428
#define DIALOG_VERSION "1.1"
#define HAVE_ALLOCA 1
-#define HAVE_BTOWC 1
#define HAVE_COLOR 1
#define HAVE_DIRENT_H 1
#define HAVE_DLG_FORMBOX 1
@@ -20,7 +18,6 @@
#define HAVE_FEOF_UNLOCKED 1
#define HAVE_FLUSHINP 1
#define HAVE_FSEEKO 1
-#define HAVE_GETATTRS 1
#define HAVE_GETBEGX 1
#define HAVE_GETBEGY 1
#define HAVE_GETBEGYX 1
@@ -42,18 +39,14 @@
#define HAVE_INTTYPES_H 1
#define HAVE_LANGINFO_CODESET 1
#define HAVE_LC_MESSAGES 1
+#define HAVE_LIBNCURSESW 1
#define HAVE_LIMITS_H 1
#define HAVE_LOCALE_H 1
-#define HAVE_MBLEN 1
-#define HAVE_MBRLEN 1
-#define HAVE_MBRTOWC 1
#define HAVE_MBSTATE_T 1
-#define HAVE_MBTOWC 1
#define HAVE_MEMORY_H 1
#define HAVE_MIXEDGAUGE 1
#define HAVE_MMAP 1
#define HAVE_MUNMAP 1
-#define HAVE_NCURSES_H 1
#define HAVE_NL_TYPES_H 1
#define HAVE_PUTENV 1
#define HAVE_RC_FILE 1
@@ -82,12 +75,7 @@
#define HAVE_UNISTD_H 1
#define HAVE_USE_DEFAULT_COLORS 1
#define HAVE_WAITPID 1
-#define HAVE_WCHGAT 1
-#define HAVE_WCSRTOMBS 1
-#define HAVE_WCSTOMBS 1
-#define HAVE_WCTOB 1
-#define HAVE_WCTOMB 1
-#define HAVE_WGETPARENT 1
+#define HAVE_WGET_WCH 1
#define HAVE_XDIALOG 1
#define HAVE__NC_FREE_AND_EXIT 1
#define ICONV_CONST const
@@ -97,6 +85,7 @@
#define PACKAGE "dialog"
#define RETSIGTYPE void
#define STDC_HEADERS 1
-#define SYSTEM_NAME "freebsd10.0"
+#define SYSTEM_NAME "freebsd9.0"
#define TIME_WITH_SYS_TIME 1
#define TYPE_CHTYPE_IS_SCALAR 1
+#define USE_WIDE_CURSES 1
diff --git a/gnu/lib/libgcc/Makefile b/gnu/lib/libgcc/Makefile
index 9c54377..c07ae87 100644
--- a/gnu/lib/libgcc/Makefile
+++ b/gnu/lib/libgcc/Makefile
@@ -38,13 +38,16 @@ OBJS= # added to below in various ways depending on TARGET_CPUARCH
#
# Library members defined in libgcc2.c.
LIB2FUNCS= _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 \
- _cmpdi2 _ucmpdi2 _clear_cache \
+ _cmpdi2 _ucmpdi2 \
_enable_execute_stack _trampoline __main _absvsi2 _absvdi2 _addvsi3 \
_addvdi3 _subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 _ctors \
_ffssi2 _ffsdi2 _clz _clzsi2 _clzdi2 _ctzsi2 _ctzdi2 _popcount_tab \
_popcountsi2 _popcountdi2 _paritysi2 _paritydi2 _powisf2 _powidf2 \
_powixf2 _powitf2 _mulsc3 _muldc3 _mulxc3 _multc3 _divsc3 _divdc3 \
_divxc3 _divtc3
+.if ${COMPILER_TYPE} != "clang" || ${TARGET_CPUARCH} != "arm"
+LIB2FUNCS+= _clear_cache
+.endif
# The floating-point conversion routines that involve a single-word integer.
.for mode in sf df xf
@@ -106,6 +109,10 @@ LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
.if ${TARGET_CPUARCH} == "arm"
# from config/arm/t-strongarm-elf
CFLAGS+= -Dinhibit_libc -fno-inline
+.if ${COMPILER_TYPE} == "clang"
+CFLAGS+= -fheinous-gnu-extensions
+.endif
+
LIB1ASMSRC = lib1funcs.asm
LIB1ASMFUNCS = _dvmd_tls _bb_init_func
LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c
@@ -341,7 +348,7 @@ CLEANFILES += libgcc.map
libgcc_eh.a: ${EH_OBJS_T}
@${ECHO} building static gcc_eh library
@rm -f ${.TARGET}
- @${AR} cq ${.TARGET} `lorder ${EH_OBJS_T} | tsort -q`
+ @${AR} ${ARFLAGS} ${.TARGET} `lorder ${EH_OBJS_T} | tsort -q`
${RANLIB} ${.TARGET}
all: libgcc_eh.a
@@ -350,7 +357,7 @@ all: libgcc_eh.a
libgcc_eh_p.a: ${EH_OBJS_P}
@${ECHO} building profiled gcc_eh library
@rm -f ${.TARGET}
- @${AR} cq ${.TARGET} `lorder ${EH_OBJS_P} | tsort -q`
+ @${AR} ${ARFLAGS} ${.TARGET} `lorder ${EH_OBJS_P} | tsort -q`
${RANLIB} ${.TARGET}
all: libgcc_eh_p.a
.endif
diff --git a/gnu/usr.bin/binutils/as/Makefile b/gnu/usr.bin/binutils/as/Makefile
index 1543bfb..4436394 100644
--- a/gnu/usr.bin/binutils/as/Makefile
+++ b/gnu/usr.bin/binutils/as/Makefile
@@ -8,7 +8,7 @@
.PATH: ${SRCDIR}/gas ${SRCDIR}/gas/config
-.if ${TARGET_ARCH} == "powerpc64"
+.if ${TARGET_ARCH:Marm*} || ${TARGET_ARCH} == "powerpc64"
NO_WERROR.clang=
.endif
diff --git a/gnu/usr.bin/cc/cc_tools/Makefile b/gnu/usr.bin/cc/cc_tools/Makefile
index 3cedd69..c697dd3 100644
--- a/gnu/usr.bin/cc/cc_tools/Makefile
+++ b/gnu/usr.bin/cc/cc_tools/Makefile
@@ -512,7 +512,7 @@ ${_src:R:S/$/.o/}: ${_src}
${LIBIBERTY}: ${LIBIBERTY_OBJS}
@rm -f ${.TARGET}
- @${AR} cq ${.TARGET} `lorder ${LIBIBERTY_OBJS} | tsort -q`
+ @${AR} ${ARFLAGS} ${.TARGET} `lorder ${LIBIBERTY_OBJS} | tsort -q`
${RANLIB} ${.TARGET}
CLEANFILES+= ${LIBIBERTY} ${LIBIBERTY_OBJS}
diff --git a/gnu/usr.bin/dialog/Makefile b/gnu/usr.bin/dialog/Makefile
index 9b60974..e945b22 100644
--- a/gnu/usr.bin/dialog/Makefile
+++ b/gnu/usr.bin/dialog/Makefile
@@ -3,7 +3,7 @@
DIALOG= ${.CURDIR}/../../../contrib/dialog
PROG= dialog
-DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBM}
+DPADD= ${LIBDIALOG} ${LIBNCURSESW} ${LIBM}
LDADD= -ldialog -lncursesw -lm
CFLAGS+= -I${.CURDIR} -I${DIALOG}
.PATH: ${DIALOG}
diff --git a/include/Makefile b/include/Makefile
index 161dcf0..3366339 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -23,9 +23,12 @@ INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \
stdnoreturn.h stdio.h stdlib.h string.h stringlist.h \
strings.h sysexits.h tar.h termios.h tgmath.h \
time.h timeconv.h timers.h ttyent.h \
- ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h vis.h \
+ ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h \
wchar.h wctype.h wordexp.h xlocale.h
+.PATH: ${.CURDIR}/../contrib/libc-vis
+INCS+= vis.h
+
MHDRS= float.h floatingpoint.h stdarg.h
PHDRS= sched.h _semaphore.h
diff --git a/lib/Makefile b/lib/Makefile
index d587574..132302e 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -69,7 +69,6 @@ SUBDIR= ${SUBDIR_ORDERED} \
libcompat \
libdevinfo \
libdevstat \
- libdisk \
libdwarf \
libedit \
${_libefi} \
@@ -90,6 +89,7 @@ SUBDIR= ${SUBDIR_ORDERED} \
${_libmilter} \
${_libmp} \
${_libnandfs} \
+ libnetbsd \
${_libngatm} \
libopie \
libpam \
diff --git a/lib/bind/config.h b/lib/bind/config.h
index 22d76bc..5e9d74b 100644
--- a/lib/bind/config.h
+++ b/lib/bind/config.h
@@ -3,7 +3,7 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.in by autoheader. */
/*
- * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2008, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -141,6 +141,9 @@ int sigwait(const unsigned int *set, int *sig);
/* Define if OpenSSL includes DSA support */
#define HAVE_OPENSSL_DSA 1
+/* Define if OpenSSL includes ECDSA support */
+#define HAVE_OPENSSL_ECDSA 1
+
/* Define to the length type used by the socket API (socklen_t, size_t, int). */
#define ISC_SOCKADDR_LEN_T socklen_t
@@ -202,6 +205,9 @@ int sigwait(const unsigned int *set, int *sig);
/* Define to 1 if you have the `EVP_sha256' function. */
#define HAVE_EVP_SHA256 1
+/* Define to 1 if you have the `EVP_sha384' function. */
+#define HAVE_EVP_SHA384 1
+
/* Define to 1 if you have the `EVP_sha512' function. */
#define HAVE_EVP_SHA512 1
diff --git a/lib/bind/dns/Makefile b/lib/bind/dns/Makefile
index 159de00..89dfd40 100644
--- a/lib/bind/dns/Makefile
+++ b/lib/bind/dns/Makefile
@@ -26,6 +26,7 @@ SRCS+= acache.c acl.c adb.c byaddr.c \
name.c ncache.c nsec.c nsec3.c \
openssl_link.c openssldh_link.c \
openssldsa_link.c opensslgost_link.c opensslrsa_link.c \
+ opensslecdsa_link.c \
order.c peer.c portlist.c private.c \
rbt.c rbtdb.c rbtdb64.c rcode.c rdata.c rdatalist.c \
rdataset.c rdatasetiter.c rdataslab.c request.c \
diff --git a/lib/bind/isc/isc/platform.h b/lib/bind/isc/isc/platform.h
index 7dab495..61630f4 100644
--- a/lib/bind/isc/isc/platform.h
+++ b/lib/bind/isc/isc/platform.h
@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: platform.h.in,v 1.56 2010-12-18 01:56:23 each Exp $ */
+/* $Id: platform.h.in,v 1.56 2010/12/18 01:56:23 each Exp $ */
#ifndef ISC_PLATFORM_H
#define ISC_PLATFORM_H 1
@@ -219,19 +219,19 @@
* Defined to <gssapi.h> or <gssapi/gssapi.h> for how to include
* the GSSAPI header.
*/
-
+#define ISC_PLATFORM_GSSAPIHEADER <gssapi/gssapi.h>
/*
* Defined to <gssapi_krb5.h> or <gssapi/gssapi_krb5.h> for how to
* include the GSSAPI KRB5 header.
*/
-
+#define ISC_PLATFORM_GSSAPI_KRB5_HEADER <gssapi/gssapi_krb5.h>
/*
* Defined to <krb5.h> or <krb5/krb5.h> for how to include
* the KRB5 header.
*/
-
+#define ISC_PLATFORM_KRB5HEADER <krb5.h>
/*
* Type used for resource limits.
diff --git a/lib/clang/Makefile b/lib/clang/Makefile
index 1d993cd..cfc1554 100644
--- a/lib/clang/Makefile
+++ b/lib/clang/Makefile
@@ -71,15 +71,12 @@ SUBDIR= libclanganalysis \
libllvmx86utils
.if ${MK_CLANG_EXTRAS} != "no"
-SUBDIR+=libllvmarchive \
- libllvmdebuginfo \
+SUBDIR+=libllvmdebuginfo \
libllvmexecutionengine \
libllvminterpreter \
libllvmjit \
- libllvmlinker \
libllvmmcdisassembler \
libllvmmcjit \
- libllvmobject \
libllvmruntimedyld
.endif
.endif
diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc
index d912900..84a96a6 100644
--- a/lib/clang/include/clang/Basic/Version.inc
+++ b/lib/clang/include/clang/Basic/Version.inc
@@ -5,6 +5,6 @@
#define CLANG_VERSION_MINOR 2
#define CLANG_VENDOR "FreeBSD "
-#define CLANG_VENDOR_SUFFIX " 20121130"
+#define CLANG_VENDOR_SUFFIX " 20121221"
-#define SVN_REVISION "168974"
+#define SVN_REVISION "170710"
diff --git a/lib/libbsnmp/libbsnmp/Makefile b/lib/libbsnmp/libbsnmp/Makefile
index f21f1d3..20015b9 100644
--- a/lib/libbsnmp/libbsnmp/Makefile
+++ b/lib/libbsnmp/libbsnmp/Makefile
@@ -15,6 +15,7 @@ CFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DQUADFMT='"llu"' -DQUADXFMT='"llx"'
.if ${MK_OPENSSL} != "no"
CFLAGS+= -DHAVE_LIBCRYPTO
+DPADD+= ${LIBCRYPTO}
LDADD+= -lcrypto
.endif
diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc
index 906f4ce..abface8 100644
--- a/lib/libc/gen/Makefile.inc
+++ b/lib/libc/gen/Makefile.inc
@@ -32,13 +32,16 @@ SRCS+= __getosreldate.c __xuname.c \
sigsetops.c sleep.c srand48.c statvfs.c stringlist.c strtofflags.c \
sysconf.c sysctl.c sysctlbyname.c sysctlnametomib.c \
syslog.c telldir.c termios.c time.c times.c timezone.c tls.c \
- ttyname.c ttyslot.c ualarm.c ulimit.c uname.c unvis.c \
- usleep.c utime.c utxdb.c valloc.c vis.c wait.c wait3.c waitpid.c \
+ ttyname.c ttyslot.c ualarm.c ulimit.c uname.c unvis-compat.c \
+ usleep.c utime.c utxdb.c valloc.c wait.c wait3.c waitpid.c \
waitid.c wordexp.c
.PATH: ${.CURDIR}/../../contrib/libc-pwcache
SRCS+= pwcache.c pwcache.h
+.PATH: ${.CURDIR}/../../contrib/libc-vis
+SRCS+= unvis.c vis.c
+
MISRCS+=modf.c
CANCELPOINTS_SRCS=sem.c sem_new.c
diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map
index f5d4f71..0c6f48e 100644
--- a/lib/libc/gen/Symbol.map
+++ b/lib/libc/gen/Symbol.map
@@ -298,9 +298,6 @@ FBSD_1.0 {
ualarm;
ulimit;
uname;
- unvis;
- strunvis;
- strunvisx;
usleep;
utime;
valloc;
@@ -388,9 +385,23 @@ FBSD_1.3 {
__FreeBSD_libc_enter_restricted_mode;
getcontextx;
gid_from_group;
+ nvis;
pwcache_userdb;
pwcache_groupdb;
+ snvis;
+ strnunvis;
+ strnunvisx;
+ strunvis;
+ strunvisx;
+ strnvis;
+ strnvisx;
+ strsnvis;
+ strsnvisx;
+ strsvis;
+ strsvisx;
+ svis;
uid_from_user;
+ unvis;
waitid;
};
diff --git a/lib/libc/gen/check_utility_compat.c b/lib/libc/gen/check_utility_compat.c
index 0ccdec1..04c594b 100644
--- a/lib/libc/gen/check_utility_compat.c
+++ b/lib/libc/gen/check_utility_compat.c
@@ -35,32 +35,28 @@ __FBSDID("$FreeBSD$");
* are threaded, so I'm not concerned about cancellation points or other
* niceties.
*/
+#include <sys/limits.h>
+
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#ifndef LINE_MAX
-#define LINE_MAX _POSIX2_LINE_MAX
-#endif
-
#define _PATH_UTIL_COMPAT "/etc/compat-FreeBSD-4-util"
#define _ENV_UTIL_COMPAT "_COMPAT_FreeBSD_4"
int
check_utility_compat(const char *utility)
{
- char buf[LINE_MAX];
+ char buf[PATH_MAX];
char *p, *bp;
int len;
if ((p = getenv(_ENV_UTIL_COMPAT)) != NULL) {
strlcpy(buf, p, sizeof buf);
} else {
- if ((len = readlink(_PATH_UTIL_COMPAT, buf, sizeof buf)) < 0)
+ if ((len = readlink(_PATH_UTIL_COMPAT, buf, sizeof(buf) - 1)) < 0)
return 0;
- if (len > sizeof buf)
- len = sizeof buf;
buf[len] = '\0';
}
if (buf[0] == '\0')
diff --git a/lib/libc/gen/fmtmsg.c b/lib/libc/gen/fmtmsg.c
index c6ecbd5..d2c67a6 100644
--- a/lib/libc/gen/fmtmsg.c
+++ b/lib/libc/gen/fmtmsg.c
@@ -83,7 +83,7 @@ def:
if (output == NULL)
return (MM_NOCON);
if (*output != '\0') {
- if ((fp = fopen("/dev/console", "a")) == NULL) {
+ if ((fp = fopen("/dev/console", "ae")) == NULL) {
free(output);
return (MM_NOCON);
}
diff --git a/lib/libc/gen/fstab.c b/lib/libc/gen/fstab.c
index b68db2e..6a77abd 100644
--- a/lib/libc/gen/fstab.c
+++ b/lib/libc/gen/fstab.c
@@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
#include <sys/stat.h>
#include <errno.h>
-#include <fcntl.h>
#include <fstab.h>
#include <paths.h>
#include <stdio.h>
@@ -255,8 +254,6 @@ getfsfile(const char *name)
int
setfsent(void)
{
- int fd;
-
if (_fs_fp) {
rewind(_fs_fp);
LineNo = 0;
@@ -268,18 +265,11 @@ setfsent(void)
else
setfstab(getenv("PATH_FSTAB"));
}
- fd = _open(path_fstab, O_RDONLY | O_CLOEXEC);
- if (fd == -1) {
- error(errno);
- return (0);
- }
- _fs_fp = fdopen(fd, "r");
- if (_fs_fp != NULL) {
+ if ((_fs_fp = fopen(path_fstab, "re")) != NULL) {
LineNo = 0;
return (1);
}
error(errno);
- _close(fd);
return (0);
}
diff --git a/lib/libc/gen/getcap.c b/lib/libc/gen/getcap.c
index c321d12..f2f3777 100644
--- a/lib/libc/gen/getcap.c
+++ b/lib/libc/gen/getcap.c
@@ -654,7 +654,7 @@ cgetnext(char **bp, char **db_array)
if (dbp == NULL)
dbp = db_array;
- if (pfp == NULL && (pfp = fopen(*dbp, "r")) == NULL) {
+ if (pfp == NULL && (pfp = fopen(*dbp, "re")) == NULL) {
(void)cgetclose();
return (-1);
}
@@ -679,7 +679,7 @@ cgetnext(char **bp, char **db_array)
(void)cgetclose();
return (0);
} else if ((pfp =
- fopen(*dbp, "r")) == NULL) {
+ fopen(*dbp, "re")) == NULL) {
(void)cgetclose();
return (-1);
} else
diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c
index 18f64a8..f9480c3 100644
--- a/lib/libc/gen/getgrent.c
+++ b/lib/libc/gen/getgrent.c
@@ -810,7 +810,7 @@ files_setgrent(void *retval, void *mdata, va_list ap)
if (st->fp != NULL)
rewind(st->fp);
else if (stayopen)
- st->fp = fopen(_PATH_GROUP, "r");
+ st->fp = fopen(_PATH_GROUP, "re");
break;
case ENDGRENT:
if (st->fp != NULL) {
@@ -861,7 +861,7 @@ files_group(void *retval, void *mdata, va_list ap)
if (*errnop != 0)
return (NS_UNAVAIL);
if (st->fp == NULL &&
- ((st->fp = fopen(_PATH_GROUP, "r")) == NULL)) {
+ ((st->fp = fopen(_PATH_GROUP, "re")) == NULL)) {
*errnop = errno;
return (NS_UNAVAIL);
}
@@ -1251,7 +1251,7 @@ compat_setgrent(void *retval, void *mdata, va_list ap)
if (st->fp != NULL)
rewind(st->fp);
else if (stayopen)
- st->fp = fopen(_PATH_GROUP, "r");
+ st->fp = fopen(_PATH_GROUP, "re");
set_setent(dtab, mdata);
(void)_nsdispatch(NULL, dtab, NSDB_GROUP_COMPAT, "setgrent",
compatsrc, 0);
@@ -1335,7 +1335,7 @@ compat_group(void *retval, void *mdata, va_list ap)
if (*errnop != 0)
return (NS_UNAVAIL);
if (st->fp == NULL &&
- ((st->fp = fopen(_PATH_GROUP, "r")) == NULL)) {
+ ((st->fp = fopen(_PATH_GROUP, "re")) == NULL)) {
*errnop = errno;
rv = NS_UNAVAIL;
goto fin;
diff --git a/lib/libc/gen/getnetgrent.c b/lib/libc/gen/getnetgrent.c
index 51b3e37..4c56461 100644
--- a/lib/libc/gen/getnetgrent.c
+++ b/lib/libc/gen/getnetgrent.c
@@ -173,7 +173,7 @@ setnetgrent(const char *group)
if (((stat(_PATH_NETGROUP, &_yp_statp) < 0) &&
errno == ENOENT) || _yp_statp.st_size == 0)
_use_only_yp = _netgr_yp_enabled = 1;
- if ((netf = fopen(_PATH_NETGROUP,"r")) != NULL ||_use_only_yp){
+ if ((netf = fopen(_PATH_NETGROUP,"re")) != NULL ||_use_only_yp){
/*
* Icky: grab the first character of the netgroup file
* and turn on NIS if it's a '+'. rewind the stream
@@ -197,7 +197,7 @@ setnetgrent(const char *group)
return;
}
#else
- if ((netf = fopen(_PATH_NETGROUP, "r"))) {
+ if ((netf = fopen(_PATH_NETGROUP, "re"))) {
#endif
if (parse_netgrp(group))
endnetgrent();
diff --git a/lib/libc/gen/getttyent.c b/lib/libc/gen/getttyent.c
index f2fc298..b82c30a 100644
--- a/lib/libc/gen/getttyent.c
+++ b/lib/libc/gen/getttyent.c
@@ -211,7 +211,7 @@ setttyent(void)
if (tf) {
rewind(tf);
return (1);
- } else if ( (tf = fopen(_PATH_TTYS, "r")) )
+ } else if ( (tf = fopen(_PATH_TTYS, "re")) )
return (1);
return (0);
}
diff --git a/lib/libc/gen/getusershell.c b/lib/libc/gen/getusershell.c
index ce50069..53536e1 100644
--- a/lib/libc/gen/getusershell.c
+++ b/lib/libc/gen/getusershell.c
@@ -115,7 +115,7 @@ _local_initshells(rv, cb_data, ap)
sl_free(sl, 1);
sl = sl_init();
- if ((fp = fopen(_PATH_SHELLS, "r")) == NULL)
+ if ((fp = fopen(_PATH_SHELLS, "re")) == NULL)
return NS_UNAVAIL;
cp = line;
diff --git a/lib/libc/gen/getutxent.c b/lib/libc/gen/getutxent.c
index a2e938a..20e8859 100644
--- a/lib/libc/gen/getutxent.c
+++ b/lib/libc/gen/getutxent.c
@@ -71,7 +71,7 @@ setutxdb(int db, const char *file)
if (uf != NULL)
fclose(uf);
- uf = fopen(file, "r");
+ uf = fopen(file, "re");
if (uf == NULL)
return (-1);
diff --git a/lib/libc/gen/sysctlbyname.c b/lib/libc/gen/sysctlbyname.c
index a2e0d5f..88b860d 100644
--- a/lib/libc/gen/sysctlbyname.c
+++ b/lib/libc/gen/sysctlbyname.c
@@ -19,13 +19,10 @@ sysctlbyname(const char *name, void *oldp, size_t *oldlenp,
const void *newp, size_t newlen)
{
int real_oid[CTL_MAXNAME+2];
- int error;
size_t oidlen;
oidlen = sizeof(real_oid) / sizeof(int);
- error = sysctlnametomib(name, real_oid, &oidlen);
- if (error < 0)
- return (error);
- error = sysctl(real_oid, oidlen, oldp, oldlenp, newp, newlen);
- return (error);
+ if (sysctlnametomib(name, real_oid, &oidlen) < 0)
+ return (-1);
+ return (sysctl(real_oid, oidlen, oldp, oldlenp, newp, newlen));
}
diff --git a/usr.sbin/sade/list.h b/lib/libc/gen/unvis-compat.c
index 8c5cf2a..080143e 100644
--- a/usr.sbin/sade/list.h
+++ b/lib/libc/gen/unvis-compat.c
@@ -1,55 +1,46 @@
-/*
- * $FreeBSD$
- *
- * Copyright (c) 1997 FreeBSD, Inc.
+/*-
+ * Copyright (c) 2012 SRI International
* All rights reserved.
*
+ * This software was developed by SRI International and the University of
+ * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
+ * ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * verbatim and that no modifications are made prior to this
- * point in the file.
+ * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * THIS SOFTWARE IS PROVIDED BY PAUL TRAINA ``AS IS'' AND
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL PAUL TRAINA OR HIS KILLER RATS BE LIABLE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * $FreeBSD$
*/
-/* The structure */
-typedef struct _qelement {
- struct _qelement *q_forw;
- struct _qelement *q_back;
-} qelement;
+#include <vis.h>
-#define INITQUE(Xhead) { \
- (Xhead).q_forw = &(Xhead); \
- (Xhead).q_back = &(Xhead); \
-}
+#define _UNVIS_END 1
-#define EMPTYQUE(Xhead) \
- ((Xhead).q_forw == &(Xhead))
+int
+__unvis_44bsd(char *cp, int c, int *astate, int flag)
+{
-#define INSQUEUE(elem, pred) { \
- register qelement *Xe = (qelement *) (elem); \
- register qelement *Xp = (qelement *) (pred); \
- Xp->q_forw = (Xe->q_forw = (Xe->q_back = Xp)->q_forw)->q_back = Xe; \
+ if (flag & _UNVIS_END)
+ flag = (flag & ~_UNVIS_END) ^ UNVIS_END;
+ return unvis(cp, c, astate, flag);
}
-#define REMQUE(elem) { \
- register qelement *Xe = (qelement *) (elem); \
- (Xe->q_back->q_forw = Xe->q_forw)->q_back = Xe->q_back; \
-}
+__sym_compat(unvis, __vis_44bsd, FBSD_1.0);
diff --git a/lib/libc/gen/unvis.c b/lib/libc/gen/unvis.c
deleted file mode 100644
index 9069e55..0000000
--- a/lib/libc/gen/unvis.c
+++ /dev/null
@@ -1,293 +0,0 @@
-/*-
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/types.h>
-#include <ctype.h>
-#include <vis.h>
-
-/*
- * decode driven by state machine
- */
-#define S_GROUND 0 /* haven't seen escape char */
-#define S_START 1 /* start decoding special sequence */
-#define S_META 2 /* metachar started (M) */
-#define S_META1 3 /* metachar more, regular char (-) */
-#define S_CTRL 4 /* control char started (^) */
-#define S_OCTAL2 5 /* octal digit 2 */
-#define S_OCTAL3 6 /* octal digit 3 */
-#define S_HEX2 7 /* hex digit 2 */
-
-#define S_HTTP 0x080 /* %HEXHEX escape */
-
-#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
-#define ishex(c) ((((u_char)(c)) >= '0' && ((u_char)(c)) <= '9') || (((u_char)(c)) >= 'a' && ((u_char)(c)) <= 'f'))
-
-/*
- * unvis - decode characters previously encoded by vis
- */
-int
-unvis(char *cp, int c, int *astate, int flag)
-{
-
- if (flag & UNVIS_END) {
- if (*astate == S_OCTAL2 || *astate == S_OCTAL3) {
- *astate = S_GROUND;
- return (UNVIS_VALID);
- }
- return (*astate == S_GROUND ? UNVIS_NOCHAR : UNVIS_SYNBAD);
- }
-
- switch (*astate & ~S_HTTP) {
-
- case S_GROUND:
- *cp = 0;
- if (c == '\\') {
- *astate = S_START;
- return (0);
- }
- if (flag & VIS_HTTPSTYLE && c == '%') {
- *astate = S_START | S_HTTP;
- return (0);
- }
- *cp = c;
- return (UNVIS_VALID);
-
- case S_START:
- if (*astate & S_HTTP) {
- if (ishex(tolower(c))) {
- *cp = isdigit(c) ? (c - '0') : (tolower(c) - 'a');
- *astate = S_HEX2;
- return (0);
- }
- }
- switch(c) {
- case '\\':
- *cp = c;
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- *cp = (c - '0');
- *astate = S_OCTAL2;
- return (0);
- case 'M':
- *cp = 0200;
- *astate = S_META;
- return (0);
- case '^':
- *astate = S_CTRL;
- return (0);
- case 'n':
- *cp = '\n';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 'r':
- *cp = '\r';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 'b':
- *cp = '\b';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 'a':
- *cp = '\007';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 'v':
- *cp = '\v';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 't':
- *cp = '\t';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 'f':
- *cp = '\f';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 's':
- *cp = ' ';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 'E':
- *cp = '\033';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case '\n':
- /*
- * hidden newline
- */
- *astate = S_GROUND;
- return (UNVIS_NOCHAR);
- case '$':
- /*
- * hidden marker
- */
- *astate = S_GROUND;
- return (UNVIS_NOCHAR);
- }
- *astate = S_GROUND;
- return (UNVIS_SYNBAD);
-
- case S_META:
- if (c == '-')
- *astate = S_META1;
- else if (c == '^')
- *astate = S_CTRL;
- else {
- *astate = S_GROUND;
- return (UNVIS_SYNBAD);
- }
- return (0);
-
- case S_META1:
- *astate = S_GROUND;
- *cp |= c;
- return (UNVIS_VALID);
-
- case S_CTRL:
- if (c == '?')
- *cp |= 0177;
- else
- *cp |= c & 037;
- *astate = S_GROUND;
- return (UNVIS_VALID);
-
- case S_OCTAL2: /* second possible octal digit */
- if (isoctal(c)) {
- /*
- * yes - and maybe a third
- */
- *cp = (*cp << 3) + (c - '0');
- *astate = S_OCTAL3;
- return (0);
- }
- /*
- * no - done with current sequence, push back passed char
- */
- *astate = S_GROUND;
- return (UNVIS_VALIDPUSH);
-
- case S_OCTAL3: /* third possible octal digit */
- *astate = S_GROUND;
- if (isoctal(c)) {
- *cp = (*cp << 3) + (c - '0');
- return (UNVIS_VALID);
- }
- /*
- * we were done, push back passed char
- */
- return (UNVIS_VALIDPUSH);
-
- case S_HEX2: /* second mandatory hex digit */
- if (ishex(tolower(c))) {
- *cp = (isdigit(c) ? (*cp << 4) + (c - '0') : (*cp << 4) + (tolower(c) - 'a' + 10));
- }
- *astate = S_GROUND;
- return (UNVIS_VALID);
-
- default:
- /*
- * decoder in unknown state - (probably uninitialized)
- */
- *astate = S_GROUND;
- return (UNVIS_SYNBAD);
- }
-}
-
-/*
- * strunvis - decode src into dst
- *
- * Number of chars decoded into dst is returned, -1 on error.
- * Dst is null terminated.
- */
-
-int
-strunvis(char *dst, const char *src)
-{
- char c;
- char *start = dst;
- int state = 0;
-
- while ( (c = *src++) ) {
- again:
- switch (unvis(dst, c, &state, 0)) {
- case UNVIS_VALID:
- dst++;
- break;
- case UNVIS_VALIDPUSH:
- dst++;
- goto again;
- case 0:
- case UNVIS_NOCHAR:
- break;
- default:
- return (-1);
- }
- }
- if (unvis(dst, c, &state, UNVIS_END) == UNVIS_VALID)
- dst++;
- *dst = '\0';
- return (dst - start);
-}
-
-int
-strunvisx(char *dst, const char *src, int flag)
-{
- char c;
- char *start = dst;
- int state = 0;
-
- while ( (c = *src++) ) {
- again:
- switch (unvis(dst, c, &state, flag)) {
- case UNVIS_VALID:
- dst++;
- break;
- case UNVIS_VALIDPUSH:
- dst++;
- goto again;
- case 0:
- case UNVIS_NOCHAR:
- break;
- default:
- return (-1);
- }
- }
- if (unvis(dst, c, &state, UNVIS_END) == UNVIS_VALID)
- dst++;
- *dst = '\0';
- return (dst - start);
-}
diff --git a/lib/libc/gen/vis.c b/lib/libc/gen/vis.c
deleted file mode 100644
index 362f4dc..0000000
--- a/lib/libc/gen/vis.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/*-
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)vis.c 8.1 (Berkeley) 7/19/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/types.h>
-#include <limits.h>
-#include <ctype.h>
-#include <stdio.h>
-#include <vis.h>
-
-#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
-
-/*
- * vis - visually encode characters
- */
-char *
-vis(dst, c, flag, nextc)
- char *dst;
- int c, nextc;
- int flag;
-{
- c = (unsigned char)c;
-
- if (flag & VIS_HTTPSTYLE) {
- /* Described in RFC 1808 */
- if (!(isalnum(c) /* alpha-numeric */
- /* safe */
- || c == '$' || c == '-' || c == '_' || c == '.' || c == '+'
- /* extra */
- || c == '!' || c == '*' || c == '\'' || c == '('
- || c == ')' || c == ',')) {
- *dst++ = '%';
- snprintf(dst, 4, (c < 16 ? "0%X" : "%X"), c);
- dst += 2;
- goto done;
- }
- }
-
- if ((flag & VIS_GLOB) &&
- (c == '*' || c == '?' || c == '[' || c == '#'))
- ;
- else if (isgraph(c) ||
- ((flag & VIS_SP) == 0 && c == ' ') ||
- ((flag & VIS_TAB) == 0 && c == '\t') ||
- ((flag & VIS_NL) == 0 && c == '\n') ||
- ((flag & VIS_SAFE) && (c == '\b' || c == '\007' || c == '\r'))) {
- *dst++ = c;
- if (c == '\\' && (flag & VIS_NOSLASH) == 0)
- *dst++ = '\\';
- *dst = '\0';
- return (dst);
- }
-
- if (flag & VIS_CSTYLE) {
- switch(c) {
- case '\n':
- *dst++ = '\\';
- *dst++ = 'n';
- goto done;
- case '\r':
- *dst++ = '\\';
- *dst++ = 'r';
- goto done;
- case '\b':
- *dst++ = '\\';
- *dst++ = 'b';
- goto done;
- case '\a':
- *dst++ = '\\';
- *dst++ = 'a';
- goto done;
- case '\v':
- *dst++ = '\\';
- *dst++ = 'v';
- goto done;
- case '\t':
- *dst++ = '\\';
- *dst++ = 't';
- goto done;
- case '\f':
- *dst++ = '\\';
- *dst++ = 'f';
- goto done;
- case ' ':
- *dst++ = '\\';
- *dst++ = 's';
- goto done;
- case '\0':
- *dst++ = '\\';
- *dst++ = '0';
- if (isoctal(nextc)) {
- *dst++ = '0';
- *dst++ = '0';
- }
- goto done;
- }
- }
- if (((c & 0177) == ' ') || isgraph(c) || (flag & VIS_OCTAL)) {
- *dst++ = '\\';
- *dst++ = ((u_char)c >> 6 & 07) + '0';
- *dst++ = ((u_char)c >> 3 & 07) + '0';
- *dst++ = ((u_char)c & 07) + '0';
- goto done;
- }
- if ((flag & VIS_NOSLASH) == 0)
- *dst++ = '\\';
- if (c & 0200) {
- c &= 0177;
- *dst++ = 'M';
- }
- if (iscntrl(c)) {
- *dst++ = '^';
- if (c == 0177)
- *dst++ = '?';
- else
- *dst++ = c + '@';
- } else {
- *dst++ = '-';
- *dst++ = c;
- }
-done:
- *dst = '\0';
- return (dst);
-}
-
-/*
- * strvis, strvisx - visually encode characters from src into dst
- *
- * Dst must be 4 times the size of src to account for possible
- * expansion. The length of dst, not including the trailing NUL,
- * is returned.
- *
- * Strvisx encodes exactly len bytes from src into dst.
- * This is useful for encoding a block of data.
- */
-int
-strvis(dst, src, flag)
- char *dst;
- const char *src;
- int flag;
-{
- char c;
- char *start;
-
- for (start = dst; (c = *src); )
- dst = vis(dst, c, flag, *++src);
- *dst = '\0';
- return (dst - start);
-}
-
-int
-strvisx(dst, src, len, flag)
- char *dst;
- const char *src;
- size_t len;
- int flag;
-{
- int c;
- char *start;
-
- for (start = dst; len > 1; len--) {
- c = *src;
- dst = vis(dst, c, flag, *++src);
- }
- if (len)
- dst = vis(dst, *src, flag, '\0');
- *dst = '\0';
-
- return (dst - start);
-}
diff --git a/lib/libc/iconv/citrus_mmap.c b/lib/libc/iconv/citrus_mmap.c
index dd5d059..2aaf73c 100644
--- a/lib/libc/iconv/citrus_mmap.c
+++ b/lib/libc/iconv/citrus_mmap.c
@@ -57,12 +57,8 @@ _citrus_map_file(struct _citrus_region * __restrict r,
_region_init(r, NULL, 0);
- if ((fd = open(path, O_RDONLY)) == -1)
+ if ((fd = open(path, O_RDONLY | O_CLOEXEC)) == -1)
return (errno);
- if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) {
- ret = errno;
- goto error;
- }
if (fstat(fd, &st) == -1) {
ret = errno;
diff --git a/lib/libc/locale/collate.c b/lib/libc/locale/collate.c
index 676d41c..56513f4 100644
--- a/lib/libc/locale/collate.c
+++ b/lib/libc/locale/collate.c
@@ -135,7 +135,7 @@ __collate_load_tables_l(const char *encoding, struct xlocale_collate *table)
(void)strcat(buf, "/");
(void)strcat(buf, encoding);
(void)strcat(buf, "/LC_COLLATE");
- if ((fp = fopen(buf, "r")) == NULL)
+ if ((fp = fopen(buf, "re")) == NULL)
return (_LDP_ERROR);
if (fread(strbuf, sizeof(strbuf), 1, fp) != 1) {
diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c
index 3ffb649..49e6f6e 100644
--- a/lib/libc/locale/setrunelocale.c
+++ b/lib/libc/locale/setrunelocale.c
@@ -73,9 +73,11 @@ static int __setrunelocale(struct xlocale_ctype *l, const char *);
#define __collate_chain_pri_table (table->__collate_chain_pri_table)
-static void destruct_ctype(void *v)
+static void
+destruct_ctype(void *v)
{
struct xlocale_ctype *l = v;
+
if (strcmp(l->runes->__encoding, "EUC") == 0)
free(l->runes->__variable);
if (&_DefaultRuneLocale != l->runes)
@@ -83,13 +85,17 @@ static void destruct_ctype(void *v)
free(l);
}
-const _RuneLocale *__getCurrentRuneLocale(void)
+const _RuneLocale *
+__getCurrentRuneLocale(void)
{
+
return XLOCALE_CTYPE(__get_locale())->runes;
}
-static void free_runes(_RuneLocale *rl)
+static void
+free_runes(_RuneLocale *rl)
{
+
/* FIXME: The "EUC" check here is a hideous abstraction violation. */
if ((rl != &_DefaultRuneLocale) && (rl)) {
if (strcmp(rl->__encoding, "EUC") == 0) {
@@ -123,7 +129,7 @@ __setrunelocale(struct xlocale_ctype *l, const char *encoding)
(void) strcat(name, encoding);
(void) strcat(name, "/LC_CTYPE");
- if ((fp = fopen(name, "r")) == NULL)
+ if ((fp = fopen(name, "re")) == NULL)
return (errno == 0 ? ENOENT : errno);
if ((rl = _Read_RuneMagi(fp)) == NULL) {
@@ -191,7 +197,8 @@ __wrap_setrunelocale(const char *locale)
#ifndef __NO_TLS
void
-__set_thread_rune_locale(locale_t loc) {
+__set_thread_rune_locale(locale_t loc)
+{
if (loc == NULL) {
_ThreadRuneLocale = &_DefaultRuneLocale;
@@ -205,6 +212,7 @@ void *
__ctype_load(const char *locale, locale_t unused)
{
struct xlocale_ctype *l = calloc(sizeof(struct xlocale_ctype), 1);
+
l->header.header.destructor = destruct_ctype;
if (__setrunelocale(l, locale))
{
diff --git a/lib/libc/nls/Makefile.inc b/lib/libc/nls/Makefile.inc
index f5c6885..962d16b 100644
--- a/lib/libc/nls/Makefile.inc
+++ b/lib/libc/nls/Makefile.inc
@@ -36,3 +36,6 @@ NLS+= ru_RU.KOI8-R
NLS+= sk_SK.ISO8859-2
NLS+= sv_SE.ISO8859-1
NLS+= uk_UA.UTF-8
+NLS+= zh_CN.GB18030
+NLS+= zh_CN.GB2312
+NLS+= zh_CN.UTF-8
diff --git a/lib/libc/nls/msgcat.c b/lib/libc/nls/msgcat.c
index 44b1440..2859916 100644
--- a/lib/libc/nls/msgcat.c
+++ b/lib/libc/nls/msgcat.c
@@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$");
if (np != NULL) { \
np->name = strdup(n); \
np->path = NULL; \
+ np->catd = NLERR; \
np->lang = (l == NULL) ? NULL : \
strdup(l); \
np->caterrno = e; \
diff --git a/lib/libc/nls/zh_CN.GB18030.msg b/lib/libc/nls/zh_CN.GB18030.msg
new file mode 100644
index 0000000..0e35d7e
--- /dev/null
+++ b/lib/libc/nls/zh_CN.GB18030.msg
@@ -0,0 +1,297 @@
+$ $FreeBSD$
+$
+$ Message catalog for zh_CN.GB18030 locale
+$
+$ Derived from FreeBSD: head/lib/libc/nls/zh_CN.UTF-8.msg 244756 2012-12-28 01:09:30Z delphij
+$
+$ strerror() support catalog
+$
+$set 1
+$ EPERM
+1 ²»ÔÊÐíµÄ²Ù×÷
+$ ENOENT
+2 Îļþ»òĿ¼²»´æÔÚ
+$ ESRCH
+3 ½ø³Ì²»´æÔÚ
+$ EINTR
+4 ϵͳµ÷ÓÃÖÐÖ¹
+$ EIO
+5 ÊäÈë/Êä³ö´íÎó
+$ ENXIO
+6 δÅäÖõÄÉ豸
+$ E2BIG
+7 ²ÎÊý±í¹ý³¤
+$ ENOEXEC
+8 ¿ÉÖ´ÐÐÎļþ¸ñʽ´íÎó
+$ EBADF
+9 ÎļþÃèÊö·ûÎÞЧ
+$ ECHILD
+10 Ö¸¶¨×Ó½ø³Ì²»´æÔÚ
+$ EDEADLK
+11 ´Ë²Ù×÷»áµ¼ÖÂËÀËø
+$ ENOMEM
+12 ÎÞ·¨·ÖÅäÄÚ´æ
+$ EACCES
+13 ¾Ü¾ø·ÃÎÊ
+$ EFAULT
+14 ÎÞЧµØÖ·
+$ ENOTBLK
+15 ¸Ã²Ù×÷ÐèÒª¿éÉ豸
+$ EBUSY
+16 É豸ʹÓÃÖÐ
+$ EEXIST
+17 ÎļþÒÑ´æÔÚ
+$ EXDEV
+18 Á´½Ó¿çÉ豸
+$ ENODEV
+19 É豸²»Ö§³Ö´Ë²Ù×÷
+$ ENOTDIR
+20 ¶ÔÏó·ÇĿ¼
+$ EISDIR
+21 ¶ÔÏóΪĿ¼
+$ EINVAL
+22 ²ÎÊýÎÞЧ
+$ ENFILE
+23 ϵͳ´ò¿ªÎļþ¹ý¶à
+$ EMFILE
+24 ½ø³Ì´ò¿ªÎļþ¹ý¶à
+$ ENOTTY
+25 ÎÞЧÉ豸 ioctl
+$ ETXTBSY
+26 ¿ÉÖ´ÐÐÎļþæ
+$ EFBIG
+27 Îļþ¹ý´ó
+$ ENOSPC
+28 É豸ÎÞ¿ÉÓÿռä
+$ ESPIPE
+29 ²»ÔÊÐíÖ´ÐÐ seek ²Ù×÷
+$ EROFS
+30 Îļþϵͳֻ¶Á
+$ EMLINK
+31 ÎļþÁ´½Ó¹ý¶à
+$ EPIPE
+32 ¹ÜµÀÒÑÖÐÖ¹
+$ EDOM
+33 ÊýÖµ²ÎÊýÔ½½ç
+$ ERANGE
+34 ½á¹û¹ý´ó
+$ EAGAIN, EWOULDBLOCK
+35 ×ÊÔ´ÔÝʱ²»¿ÉÓÃ
+$ EINPROGRESS
+36 ²Ù×÷½øÐÐÖÐ
+$ EALREADY
+37 ²Ù×÷ÒÑ¿ªÊ¼
+$ ENOTSOCK
+38 ³¢ÊÔÔÚ·Ç socket ÉÏÖ´ÐÐ socket ²Ù×÷
+$ EDESTADDRREQ
+39 ÐèҪĿµÄµØÖ·
+$ EMSGSIZE
+40 ÏûÏ¢¹ý³¤
+$ EPROTOTYPE
+41 socketЭÒéÀàÐÍ´íÎó
+$ ENOPROTOOPT
+42 ЭÒé²»¿ÉÓÃ
+$ EPROTONOSUPPORT
+43 ²»Ö§³ÖµÄЭÒé
+$ ESOCKTNOSUPPORT
+44 ²»Ö§³ÖµÄ socket ÀàÐÍ
+$ EOPNOTSUPP
+45 ²»Ö§³ÖµÄ²Ù×÷
+$ EPFNOSUPPORT
+46 ²»Ö§³ÖµÄЭÒé×å
+$ EAFNOSUPPORT
+47 ЭÒé×å²»Ö§³ÖµÄµØÖ·×å
+$ EADDRINUSE
+48 µØÖ·Òѱ»Õ¼ÓÃ
+$ EADDRNOTAVAIL
+49 ÎÞ·¨Ö¸¶¨ÇëÇóµÄµØÖ·
+$ ENETDOWN
+50 ÍøÂçÒѹرÕ
+$ ENETUNREACH
+51 ÍøÂç²»¿É´ï
+$ ENETRESET
+52 ¸´Î»µ¼ÖÂÍøÂçÁ¬½Ó¶ªÊ§
+$ ECONNABORTED
+53 Èí¼þµ¼ÖµÄÁ¬½ÓÖÐÖ¹
+$ ECONNRESET
+54 ¶Ô·½¸´Î»ÁËÁ¬½Ó
+$ ENOBUFS
+55 »º³åÇø¿Õ¼ä²»×ã
+$ EISCONN
+56 socket ÒÑÁ¬½Ó
+$ ENOTCONN
+57 socket δÁ¬½Ó
+$ ESHUTDOWN
+58 socket shutdown Ö®ºóÎÞ·¨·¢ËÍÊý¾Ý
+$ ETOOMANYREFS
+59 ÒýÓÃÊý¹ý¶à£ºÎÞ·¨Æ´½Ó
+$ ETIMEDOUT
+60 ²Ù×÷³¬Ê±
+$ ECONNREFUSED
+61 ¾Ü¾øÁ¬½Ó
+$ ELOOP
+62 ·ûºÅÁ´½Ó²ãÊý¹ý¶à
+$ ENAMETOOLONG
+63 ÎļþÃû¹ý³¤
+$ EHOSTDOWN
+64 Ö÷»úÒѹرÕ
+$ EHOSTUNREACH
+65 ûÓе½Ö÷»úµÄ·ÓÉ
+$ ENOTEMPTY
+66 Ŀ¼·Ç¿Õ
+$ EPROCLIM
+67 ½ø³ÌÊý³¬ÏÞ
+$ EUSERS
+68 Óû§Êý³¬ÏÞ
+$ EDQUOT
+69 ´ÅÅÌ¿Õ¼äÅä¶î³¬ÏÞ
+$ ESTALE
+70 NFS Îļþ¾ä±úÒÑʧЧ
+$ EREMOTE
+71 Ô¶³ÌĿ¼²ãÊý¹ý¶à
+$ EBADRPC
+72 RPC ½á¹¹ÎÞЧ
+$ ERPCMISMATCH
+73 RPC °æ±¾´íÎó
+$ EPROGUNAVAIL
+74 RPC ³ÌÐò²»¿ÉÓÃ
+$ EPROGMISMATCH
+75 ³ÌÐò°æ±¾´íÎó
+$ EPROCUNAVAIL
+76 δÌṩµÄÔ¶³Ìº¯Êý
+$ ENOLCK
+77 ²»Ö§³ÖËø
+$ ENOSYS
+78 ¹¦ÄÜδʵÏÖ
+$ EFTYPE
+79 ÎļþÀàÐÍ»ò¸ñʽÎÞЧ
+$ EAUTH
+80 Éí·ÝÎÞЧ
+$ ENEEDAUTH
+81 ÎÞÐÅÈÎƾ¾Ý
+$ EIDRM
+82 ÎÞ±êʶ·û
+$ ENOMSG
+83 ÎÞÏûÏ¢ÀàÐÍ
+$ EOVERFLOW
+84 ÊýÖµÒç³ö
+$ ECANCELED
+85 ²Ù×÷ÒÑÈ¡Ïû
+$ EILSEQ
+86 ÎÞЧ×Ö·ûÐòÁÐ
+$ ENOATTR
+87 ÎÞÀ©Õ¹ÊôÐÔ
+$ EDOOFUS
+88 ³ÌÐòÉè¼Æ´íÎó
+$ EBADMSG
+89 ÎÞЧÏûÏ¢
+$ EMULTIHOP
+90 Multihop attempted
+$ ENOLINK
+91 Link has been severed
+$ EPROTO
+92 ЭÒé´íÎó
+$ ENOTCAPABLE
+93 ȨÄܲ»×ã
+$
+$ strsignal() support catalog
+$
+$set 2
+$ SIGHUP
+1 ÖÕ¶ËÏß·¹Ò¶Ï
+$ SIGINT
+2 ÖжÏ
+$ SIGQUIT
+3 Í˳ö
+$ SIGILL
+4 ÎÞЧָÁî
+$ SIGTRAP
+5 ¸ú×Ù/BPT ÏÝÚå
+$ SIGABRT
+6 ÖÕÖ¹ÏÝÚå
+$ SIGEMT
+7 EMT ÏÝÚå
+$ SIGFPE
+8 ¸¡µãÒì³£
+$ SIGKILL
+9 Ç¿ÖÆÖÕÖ¹½ø³Ì
+$ SIGBUS
+10 ϵͳÄÚ´æ·ÃÎÊÔ½½ç
+$ SIGSEGV
+11 ÄÚ´æ·ÃÎÊÔ½½ç
+$ SIGSYS
+12 ÎÞЧϵͳµ÷ÓÃ
+$ SIGPIPE
+13 д¹ÜµÀʱ¶ÁÈ¡Õß²»´æÔÚ
+$ SIGALRM
+14 ʵʱµ¹¼Æʱµ½ÆÚ
+$ SIGTERM
+15 ÖÕÖ¹
+$ SIGURG
+16 ÐèÁ¢¼´´¦ÀíµÄ I/O ½ô¼±×´¿ö
+$ SIGSTOP
+17 ¹ÒÆð (ÐźÅ)
+$ SIGTSTP
+18 ¹ÒÆð
+$ SIGCONT
+19 ¼ÌÐøÔËÐÐ
+$ SIGCHLD
+20 ×Ó½ø³ÌÖÕÖ¹
+$ SIGTTIN
+21 TTY ÊäÈë×èÈû
+$ SIGTTOU
+22 TTY Êä³ö×èÈû
+$ SIGIO
+23 I/O ¾ÍÐ÷
+$ SIGXCPU
+24 CPU ʹÓÃʱ¼ä¹ý³¤
+$ SIGXFSZ
+25 Îļþ³ß´ç¹ý´ó
+$ SIGVTALRM
+26 ÐéÄâµ¹¼Æʱµ½ÆÚ
+$ SIGPROF
+27 ÆÊÎöµ¹¼Æʱµ½ÆÚ
+$ SIGWINCH
+28 ´°¿Ú³ß´ç±ä»¯
+$ SIGINFO
+29 ÇëÇóÐÅÏ¢
+$ SIGUSR1
+30 Óû§×Ô¶¨ÒåÐźŠ1
+$ SIGUSR2
+31 Óû§×Ô¶¨ÒåÐźŠ2
+$
+$ gai_strerror() support catalog
+$
+$set 3
+$ 1 (obsolete)
+1 Ö÷»úÃûʹÓÃÁ˲»Ö§³ÖµÄµØÖ·ÀàÐÍ
+$ EAI_AGAIN
+2 ÔÝʱÎÞ·¨½âÎöÃû³Æ
+$ EAI_BADFLAGS
+3 ÎÞЧµÄ ai_flags Öµ
+$ EAI_FAIL
+4 ½âÎöÃû³Æʱ³öÏÖÎÞ·¨»Ö¸´µÄ´íÎó
+$ EAI_FAMILY
+5 ²»Ö§³ÖµÄµØÖ·ÐÅÏ¢ÀàÐÍ
+$ EAI_MEMORY
+6 ÄÚ´æ·ÖÅäʧ°Ü
+$ 7 (obsolete)
+7 Ö÷»úÃûÎÞÏà¹ØÁªµÄµØÖ·
+$ EAI_NONAME
+8 δ֪µÄÖ÷»úÃû»ò·þÎñÃû
+$ EAI_SERVICE
+9 Ì×½Ó×ÖÀàÐͲ»Ö§³Ö´Ë·þÎñÃû
+$ EAI_SOCKTYPE
+10 ²»Ö§³ÖµÄÌ×½Ó×ÖÀàÐÍ
+$ EAI_SYSTEM
+11 ϵͳµ÷Ó÷µ»ØÁË errno ´íÎó
+$ EAI_BADHINTS
+12 ÎÞЧÌáʾ²ÎÊý
+$ EAI_PROTOCOL
+13 δ֪ЭÒé
+$ EAI_OVERFLOW
+14 ²ÎÊý»º³åÒç³ö
+$ 0
+32766 ³É¹¦
+$ NL_MSGMAX
+32767 δ֪´íÎó
diff --git a/lib/libc/nls/zh_CN.GB2312.msg b/lib/libc/nls/zh_CN.GB2312.msg
new file mode 100644
index 0000000..46ebb42
--- /dev/null
+++ b/lib/libc/nls/zh_CN.GB2312.msg
@@ -0,0 +1,297 @@
+$ $FreeBSD$
+$
+$ Message catalog for zh_CN.GB2312 locale
+$
+$ Derived from FreeBSD: head/lib/libc/nls/zh_CN.UTF-8.msg 244756 2012-12-28 01:09:30Z delphij
+$
+$ strerror() support catalog
+$
+$set 1
+$ EPERM
+1 ²»ÔÊÐíµÄ²Ù×÷
+$ ENOENT
+2 Îļþ»òĿ¼²»´æÔÚ
+$ ESRCH
+3 ½ø³Ì²»´æÔÚ
+$ EINTR
+4 ϵͳµ÷ÓÃÖÐÖ¹
+$ EIO
+5 ÊäÈë/Êä³ö´íÎó
+$ ENXIO
+6 δÅäÖõÄÉ豸
+$ E2BIG
+7 ²ÎÊý±í¹ý³¤
+$ ENOEXEC
+8 ¿ÉÖ´ÐÐÎļþ¸ñʽ´íÎó
+$ EBADF
+9 ÎļþÃèÊö·ûÎÞЧ
+$ ECHILD
+10 Ö¸¶¨×Ó½ø³Ì²»´æÔÚ
+$ EDEADLK
+11 ´Ë²Ù×÷»áµ¼ÖÂËÀËø
+$ ENOMEM
+12 ÎÞ·¨·ÖÅäÄÚ´æ
+$ EACCES
+13 ¾Ü¾ø·ÃÎÊ
+$ EFAULT
+14 ÎÞЧµØÖ·
+$ ENOTBLK
+15 ¸Ã²Ù×÷ÐèÒª¿éÉ豸
+$ EBUSY
+16 É豸ʹÓÃÖÐ
+$ EEXIST
+17 ÎļþÒÑ´æÔÚ
+$ EXDEV
+18 Á´½Ó¿çÉ豸
+$ ENODEV
+19 É豸²»Ö§³Ö´Ë²Ù×÷
+$ ENOTDIR
+20 ¶ÔÏó·ÇĿ¼
+$ EISDIR
+21 ¶ÔÏóΪĿ¼
+$ EINVAL
+22 ²ÎÊýÎÞЧ
+$ ENFILE
+23 ϵͳ´ò¿ªÎļþ¹ý¶à
+$ EMFILE
+24 ½ø³Ì´ò¿ªÎļþ¹ý¶à
+$ ENOTTY
+25 ÎÞЧÉ豸 ioctl
+$ ETXTBSY
+26 ¿ÉÖ´ÐÐÎļþæ
+$ EFBIG
+27 Îļþ¹ý´ó
+$ ENOSPC
+28 É豸ÎÞ¿ÉÓÿռä
+$ ESPIPE
+29 ²»ÔÊÐíÖ´ÐÐ seek ²Ù×÷
+$ EROFS
+30 Îļþϵͳֻ¶Á
+$ EMLINK
+31 ÎļþÁ´½Ó¹ý¶à
+$ EPIPE
+32 ¹ÜµÀÒÑÖÐÖ¹
+$ EDOM
+33 ÊýÖµ²ÎÊýÔ½½ç
+$ ERANGE
+34 ½á¹û¹ý´ó
+$ EAGAIN, EWOULDBLOCK
+35 ×ÊÔ´ÔÝʱ²»¿ÉÓÃ
+$ EINPROGRESS
+36 ²Ù×÷½øÐÐÖÐ
+$ EALREADY
+37 ²Ù×÷ÒÑ¿ªÊ¼
+$ ENOTSOCK
+38 ³¢ÊÔÔÚ·Ç socket ÉÏÖ´ÐÐ socket ²Ù×÷
+$ EDESTADDRREQ
+39 ÐèҪĿµÄµØÖ·
+$ EMSGSIZE
+40 ÏûÏ¢¹ý³¤
+$ EPROTOTYPE
+41 socketЭÒéÀàÐÍ´íÎó
+$ ENOPROTOOPT
+42 ЭÒé²»¿ÉÓÃ
+$ EPROTONOSUPPORT
+43 ²»Ö§³ÖµÄЭÒé
+$ ESOCKTNOSUPPORT
+44 ²»Ö§³ÖµÄ socket ÀàÐÍ
+$ EOPNOTSUPP
+45 ²»Ö§³ÖµÄ²Ù×÷
+$ EPFNOSUPPORT
+46 ²»Ö§³ÖµÄЭÒé×å
+$ EAFNOSUPPORT
+47 ЭÒé×å²»Ö§³ÖµÄµØÖ·×å
+$ EADDRINUSE
+48 µØÖ·Òѱ»Õ¼ÓÃ
+$ EADDRNOTAVAIL
+49 ÎÞ·¨Ö¸¶¨ÇëÇóµÄµØÖ·
+$ ENETDOWN
+50 ÍøÂçÒѹرÕ
+$ ENETUNREACH
+51 ÍøÂç²»¿É´ï
+$ ENETRESET
+52 ¸´Î»µ¼ÖÂÍøÂçÁ¬½Ó¶ªÊ§
+$ ECONNABORTED
+53 Èí¼þµ¼ÖµÄÁ¬½ÓÖÐÖ¹
+$ ECONNRESET
+54 ¶Ô·½¸´Î»ÁËÁ¬½Ó
+$ ENOBUFS
+55 »º³åÇø¿Õ¼ä²»×ã
+$ EISCONN
+56 socket ÒÑÁ¬½Ó
+$ ENOTCONN
+57 socket δÁ¬½Ó
+$ ESHUTDOWN
+58 socket shutdown Ö®ºóÎÞ·¨·¢ËÍÊý¾Ý
+$ ETOOMANYREFS
+59 ÒýÓÃÊý¹ý¶à£ºÎÞ·¨Æ´½Ó
+$ ETIMEDOUT
+60 ²Ù×÷³¬Ê±
+$ ECONNREFUSED
+61 ¾Ü¾øÁ¬½Ó
+$ ELOOP
+62 ·ûºÅÁ´½Ó²ãÊý¹ý¶à
+$ ENAMETOOLONG
+63 ÎļþÃû¹ý³¤
+$ EHOSTDOWN
+64 Ö÷»úÒѹرÕ
+$ EHOSTUNREACH
+65 ûÓе½Ö÷»úµÄ·ÓÉ
+$ ENOTEMPTY
+66 Ŀ¼·Ç¿Õ
+$ EPROCLIM
+67 ½ø³ÌÊý³¬ÏÞ
+$ EUSERS
+68 Óû§Êý³¬ÏÞ
+$ EDQUOT
+69 ´ÅÅÌ¿Õ¼äÅä¶î³¬ÏÞ
+$ ESTALE
+70 NFS Îļþ¾ä±úÒÑʧЧ
+$ EREMOTE
+71 Ô¶³ÌĿ¼²ãÊý¹ý¶à
+$ EBADRPC
+72 RPC ½á¹¹ÎÞЧ
+$ ERPCMISMATCH
+73 RPC °æ±¾´íÎó
+$ EPROGUNAVAIL
+74 RPC ³ÌÐò²»¿ÉÓÃ
+$ EPROGMISMATCH
+75 ³ÌÐò°æ±¾´íÎó
+$ EPROCUNAVAIL
+76 δÌṩµÄÔ¶³Ìº¯Êý
+$ ENOLCK
+77 ²»Ö§³ÖËø
+$ ENOSYS
+78 ¹¦ÄÜδʵÏÖ
+$ EFTYPE
+79 ÎļþÀàÐÍ»ò¸ñʽÎÞЧ
+$ EAUTH
+80 Éí·ÝÎÞЧ
+$ ENEEDAUTH
+81 ÎÞÐÅÈÎƾ¾Ý
+$ EIDRM
+82 ÎÞ±êʶ·û
+$ ENOMSG
+83 ÎÞÏûÏ¢ÀàÐÍ
+$ EOVERFLOW
+84 ÊýÖµÒç³ö
+$ ECANCELED
+85 ²Ù×÷ÒÑÈ¡Ïû
+$ EILSEQ
+86 ÎÞЧ×Ö·ûÐòÁÐ
+$ ENOATTR
+87 ÎÞÀ©Õ¹ÊôÐÔ
+$ EDOOFUS
+88 ³ÌÐòÉè¼Æ´íÎó
+$ EBADMSG
+89 ÎÞЧÏûÏ¢
+$ EMULTIHOP
+90 Multihop attempted
+$ ENOLINK
+91 Link has been severed
+$ EPROTO
+92 ЭÒé´íÎó
+$ ENOTCAPABLE
+93 ȨÄܲ»×ã
+$
+$ strsignal() support catalog
+$
+$set 2
+$ SIGHUP
+1 ÖÕ¶ËÏß·¹Ò¶Ï
+$ SIGINT
+2 ÖжÏ
+$ SIGQUIT
+3 Í˳ö
+$ SIGILL
+4 ÎÞЧָÁî
+$ SIGTRAP
+5 ¸ú×Ù/BPT ÏÝÚå
+$ SIGABRT
+6 ÖÕÖ¹ÏÝÚå
+$ SIGEMT
+7 EMT ÏÝÚå
+$ SIGFPE
+8 ¸¡µãÒì³£
+$ SIGKILL
+9 Ç¿ÖÆÖÕÖ¹½ø³Ì
+$ SIGBUS
+10 ϵͳÄÚ´æ·ÃÎÊÔ½½ç
+$ SIGSEGV
+11 ÄÚ´æ·ÃÎÊÔ½½ç
+$ SIGSYS
+12 ÎÞЧϵͳµ÷ÓÃ
+$ SIGPIPE
+13 д¹ÜµÀʱ¶ÁÈ¡Õß²»´æÔÚ
+$ SIGALRM
+14 ʵʱµ¹¼Æʱµ½ÆÚ
+$ SIGTERM
+15 ÖÕÖ¹
+$ SIGURG
+16 ÐèÁ¢¼´´¦ÀíµÄ I/O ½ô¼±×´¿ö
+$ SIGSTOP
+17 ¹ÒÆð (ÐźÅ)
+$ SIGTSTP
+18 ¹ÒÆð
+$ SIGCONT
+19 ¼ÌÐøÔËÐÐ
+$ SIGCHLD
+20 ×Ó½ø³ÌÖÕÖ¹
+$ SIGTTIN
+21 TTY ÊäÈë×èÈû
+$ SIGTTOU
+22 TTY Êä³ö×èÈû
+$ SIGIO
+23 I/O ¾ÍÐ÷
+$ SIGXCPU
+24 CPU ʹÓÃʱ¼ä¹ý³¤
+$ SIGXFSZ
+25 Îļþ³ß´ç¹ý´ó
+$ SIGVTALRM
+26 ÐéÄâµ¹¼Æʱµ½ÆÚ
+$ SIGPROF
+27 ÆÊÎöµ¹¼Æʱµ½ÆÚ
+$ SIGWINCH
+28 ´°¿Ú³ß´ç±ä»¯
+$ SIGINFO
+29 ÇëÇóÐÅÏ¢
+$ SIGUSR1
+30 Óû§×Ô¶¨ÒåÐźŠ1
+$ SIGUSR2
+31 Óû§×Ô¶¨ÒåÐźŠ2
+$
+$ gai_strerror() support catalog
+$
+$set 3
+$ 1 (obsolete)
+1 Ö÷»úÃûʹÓÃÁ˲»Ö§³ÖµÄµØÖ·ÀàÐÍ
+$ EAI_AGAIN
+2 ÔÝʱÎÞ·¨½âÎöÃû³Æ
+$ EAI_BADFLAGS
+3 ÎÞЧµÄ ai_flags Öµ
+$ EAI_FAIL
+4 ½âÎöÃû³Æʱ³öÏÖÎÞ·¨»Ö¸´µÄ´íÎó
+$ EAI_FAMILY
+5 ²»Ö§³ÖµÄµØÖ·ÐÅÏ¢ÀàÐÍ
+$ EAI_MEMORY
+6 ÄÚ´æ·ÖÅäʧ°Ü
+$ 7 (obsolete)
+7 Ö÷»úÃûÎÞÏà¹ØÁªµÄµØÖ·
+$ EAI_NONAME
+8 δ֪µÄÖ÷»úÃû»ò·þÎñÃû
+$ EAI_SERVICE
+9 Ì×½Ó×ÖÀàÐͲ»Ö§³Ö´Ë·þÎñÃû
+$ EAI_SOCKTYPE
+10 ²»Ö§³ÖµÄÌ×½Ó×ÖÀàÐÍ
+$ EAI_SYSTEM
+11 ϵͳµ÷Ó÷µ»ØÁË errno ´íÎó
+$ EAI_BADHINTS
+12 ÎÞЧÌáʾ²ÎÊý
+$ EAI_PROTOCOL
+13 δ֪ЭÒé
+$ EAI_OVERFLOW
+14 ²ÎÊý»º³åÒç³ö
+$ 0
+32766 ³É¹¦
+$ NL_MSGMAX
+32767 δ֪´íÎó
diff --git a/lib/libc/nls/zh_CN.UTF-8.msg b/lib/libc/nls/zh_CN.UTF-8.msg
new file mode 100644
index 0000000..9475ea8
--- /dev/null
+++ b/lib/libc/nls/zh_CN.UTF-8.msg
@@ -0,0 +1,295 @@
+$ $FreeBSD$
+$
+$ Message catalog for zh_CN.UTF-8 locale
+$
+$ strerror() support catalog
+$
+$set 1
+$ EPERM
+1 ä¸å…许的æ“作
+$ ENOENT
+2 文件或目录ä¸å­˜åœ¨
+$ ESRCH
+3 进程ä¸å­˜åœ¨
+$ EINTR
+4 系统调用中止
+$ EIO
+5 输入/输出错误
+$ ENXIO
+6 未é…置的设备
+$ E2BIG
+7 å‚数表过长
+$ ENOEXEC
+8 å¯æ‰§è¡Œæ–‡ä»¶æ ¼å¼é”™è¯¯
+$ EBADF
+9 文件æ述符无效
+$ ECHILD
+10 指定å­è¿›ç¨‹ä¸å­˜åœ¨
+$ EDEADLK
+11 æ­¤æ“作会导致死é”
+$ ENOMEM
+12 无法分é…内存
+$ EACCES
+13 æ‹’ç»è®¿é—®
+$ EFAULT
+14 无效地å€
+$ ENOTBLK
+15 该æ“作需è¦å—设备
+$ EBUSY
+16 设备使用中
+$ EEXIST
+17 文件已存在
+$ EXDEV
+18 链接跨设备
+$ ENODEV
+19 设备ä¸æ”¯æŒæ­¤æ“作
+$ ENOTDIR
+20 对象éžç›®å½•
+$ EISDIR
+21 对象为目录
+$ EINVAL
+22 å‚数无效
+$ ENFILE
+23 系统打开文件过多
+$ EMFILE
+24 进程打开文件过多
+$ ENOTTY
+25 无效设备 ioctl
+$ ETXTBSY
+26 å¯æ‰§è¡Œæ–‡ä»¶å¿™
+$ EFBIG
+27 文件过大
+$ ENOSPC
+28 设备无å¯ç”¨ç©ºé—´
+$ ESPIPE
+29 ä¸å…许执行 seek æ“作
+$ EROFS
+30 文件系统åªè¯»
+$ EMLINK
+31 文件链接过多
+$ EPIPE
+32 管é“已中止
+$ EDOM
+33 数值å‚数越界
+$ ERANGE
+34 结果过大
+$ EAGAIN, EWOULDBLOCK
+35 资æºæš‚æ—¶ä¸å¯ç”¨
+$ EINPROGRESS
+36 æ“作进行中
+$ EALREADY
+37 æ“作已开始
+$ ENOTSOCK
+38 å°è¯•åœ¨éž socket 上执行 socket æ“作
+$ EDESTADDRREQ
+39 需è¦ç›®çš„地å€
+$ EMSGSIZE
+40 消æ¯è¿‡é•¿
+$ EPROTOTYPE
+41 socketå议类型错误
+$ ENOPROTOOPT
+42 åè®®ä¸å¯ç”¨
+$ EPROTONOSUPPORT
+43 ä¸æ”¯æŒçš„åè®®
+$ ESOCKTNOSUPPORT
+44 ä¸æ”¯æŒçš„ socket 类型
+$ EOPNOTSUPP
+45 ä¸æ”¯æŒçš„æ“作
+$ EPFNOSUPPORT
+46 ä¸æ”¯æŒçš„åè®®æ—
+$ EAFNOSUPPORT
+47 åè®®æ—ä¸æ”¯æŒçš„地å€æ—
+$ EADDRINUSE
+48 地å€å·²è¢«å ç”¨
+$ EADDRNOTAVAIL
+49 无法指定请求的地å€
+$ ENETDOWN
+50 网络已关闭
+$ ENETUNREACH
+51 网络ä¸å¯è¾¾
+$ ENETRESET
+52 å¤ä½å¯¼è‡´ç½‘络连接丢失
+$ ECONNABORTED
+53 软件导致的连接中止
+$ ECONNRESET
+54 对方å¤ä½äº†è¿žæŽ¥
+$ ENOBUFS
+55 缓冲区空间ä¸è¶³
+$ EISCONN
+56 socket 已连接
+$ ENOTCONN
+57 socket 未连接
+$ ESHUTDOWN
+58 socket shutdown 之åŽæ— æ³•å‘é€æ•°æ®
+$ ETOOMANYREFS
+59 引用数过多:无法拼接
+$ ETIMEDOUT
+60 æ“作超时
+$ ECONNREFUSED
+61 æ‹’ç»è¿žæŽ¥
+$ ELOOP
+62 符å·é“¾æŽ¥å±‚数过多
+$ ENAMETOOLONG
+63 文件å过长
+$ EHOSTDOWN
+64 主机已关闭
+$ EHOSTUNREACH
+65 没有到主机的路由
+$ ENOTEMPTY
+66 目录éžç©º
+$ EPROCLIM
+67 进程数超é™
+$ EUSERS
+68 用户数超é™
+$ EDQUOT
+69 ç£ç›˜ç©ºé—´é…é¢è¶…é™
+$ ESTALE
+70 NFS 文件å¥æŸ„已失效
+$ EREMOTE
+71 远程目录层数过多
+$ EBADRPC
+72 RPC 结构无效
+$ ERPCMISMATCH
+73 RPC 版本错误
+$ EPROGUNAVAIL
+74 RPC 程åºä¸å¯ç”¨
+$ EPROGMISMATCH
+75 程åºç‰ˆæœ¬é”™è¯¯
+$ EPROCUNAVAIL
+76 未æ供的远程函数
+$ ENOLCK
+77 ä¸æ”¯æŒé”
+$ ENOSYS
+78 功能未实现
+$ EFTYPE
+79 文件类型或格å¼æ— æ•ˆ
+$ EAUTH
+80 身份无效
+$ ENEEDAUTH
+81 无信任凭æ®
+$ EIDRM
+82 无标识符
+$ ENOMSG
+83 无消æ¯ç±»åž‹
+$ EOVERFLOW
+84 数值溢出
+$ ECANCELED
+85 æ“作已å–消
+$ EILSEQ
+86 无效字符åºåˆ—
+$ ENOATTR
+87 无扩展属性
+$ EDOOFUS
+88 程åºè®¾è®¡é”™è¯¯
+$ EBADMSG
+89 无效消æ¯
+$ EMULTIHOP
+90 Multihop attempted
+$ ENOLINK
+91 Link has been severed
+$ EPROTO
+92 å议错误
+$ ENOTCAPABLE
+93 æƒèƒ½ä¸è¶³
+$
+$ strsignal() support catalog
+$
+$set 2
+$ SIGHUP
+1 终端线路挂断
+$ SIGINT
+2 中断
+$ SIGQUIT
+3 退出
+$ SIGILL
+4 无效指令
+$ SIGTRAP
+5 跟踪/BPT 陷阱
+$ SIGABRT
+6 终止陷阱
+$ SIGEMT
+7 EMT 陷阱
+$ SIGFPE
+8 浮点异常
+$ SIGKILL
+9 强制终止进程
+$ SIGBUS
+10 系统内存访问越界
+$ SIGSEGV
+11 内存访问越界
+$ SIGSYS
+12 无效系统调用
+$ SIGPIPE
+13 写管é“时读å–者ä¸å­˜åœ¨
+$ SIGALRM
+14 实时倒计时到期
+$ SIGTERM
+15 终止
+$ SIGURG
+16 需立å³å¤„ç†çš„ I/O 紧急状况
+$ SIGSTOP
+17 挂起 (ä¿¡å·)
+$ SIGTSTP
+18 挂起
+$ SIGCONT
+19 继续è¿è¡Œ
+$ SIGCHLD
+20 å­è¿›ç¨‹ç»ˆæ­¢
+$ SIGTTIN
+21 TTY 输入阻塞
+$ SIGTTOU
+22 TTY 输出阻塞
+$ SIGIO
+23 I/O 就绪
+$ SIGXCPU
+24 CPU 使用时间过长
+$ SIGXFSZ
+25 文件尺寸过大
+$ SIGVTALRM
+26 虚拟倒计时到期
+$ SIGPROF
+27 剖æžå€’计时到期
+$ SIGWINCH
+28 窗å£å°ºå¯¸å˜åŒ–
+$ SIGINFO
+29 请求信æ¯
+$ SIGUSR1
+30 ç”¨æˆ·è‡ªå®šä¹‰ä¿¡å· 1
+$ SIGUSR2
+31 ç”¨æˆ·è‡ªå®šä¹‰ä¿¡å· 2
+$
+$ gai_strerror() support catalog
+$
+$set 3
+$ 1 (obsolete)
+1 主机å使用了ä¸æ”¯æŒçš„地å€ç±»åž‹
+$ EAI_AGAIN
+2 暂时无法解æžå称
+$ EAI_BADFLAGS
+3 无效的 ai_flags 值
+$ EAI_FAIL
+4 解æžå称时出现无法æ¢å¤çš„错误
+$ EAI_FAMILY
+5 ä¸æ”¯æŒçš„地å€ä¿¡æ¯ç±»åž‹
+$ EAI_MEMORY
+6 内存分é…失败
+$ 7 (obsolete)
+7 主机å无相关è”的地å€
+$ EAI_NONAME
+8 未知的主机å或æœåŠ¡å
+$ EAI_SERVICE
+9 套接字类型ä¸æ”¯æŒæ­¤æœåŠ¡å
+$ EAI_SOCKTYPE
+10 ä¸æ”¯æŒçš„套接字类型
+$ EAI_SYSTEM
+11 系统调用返回了 errno 错误
+$ EAI_BADHINTS
+12 无效æ示å‚æ•°
+$ EAI_PROTOCOL
+13 未知åè®®
+$ EAI_OVERFLOW
+14 å‚数缓冲溢出
+$ 0
+32766 æˆåŠŸ
+$ NL_MSGMAX
+32767 未知错误
diff --git a/lib/libc/sys/bind.2 b/lib/libc/sys/bind.2
index fecc5fa..896b005 100644
--- a/lib/libc/sys/bind.2
+++ b/lib/libc/sys/bind.2
@@ -94,6 +94,8 @@ is not a socket.
The specified address is not available from the local machine.
.It Bq Er EADDRINUSE
The specified address is already in use.
+.It Bq Er EAFNOSUPPORT
+Addresses in the specified address family cannot be used with this socket.
.It Bq Er EACCES
The requested address is protected, and the current user
has inadequate permission to access it.
diff --git a/lib/libc/sys/mlock.2 b/lib/libc/sys/mlock.2
index ed9c15a..0e5fef8 100644
--- a/lib/libc/sys/mlock.2
+++ b/lib/libc/sys/mlock.2
@@ -28,7 +28,7 @@
.\" @(#)mlock.2 8.2 (Berkeley) 12/11/93
.\" $FreeBSD$
.\"
-.Dd July 27, 2010
+.Dd December 25, 2012
.Dt MLOCK 2
.Os
.Sh NAME
@@ -94,12 +94,15 @@ limited in how much they can lock down.
A single process can
.Fn mlock
the minimum of
-a system-wide ``wired pages'' limit and
-the per-process
+a system-wide ``wired pages'' limit
+.Va vm.max_wired
+and the per-process
.Li RLIMIT_MEMLOCK
resource limit.
.Pp
-These calls are only available to the super-user.
+If
+.Va security.bsd.unprivileged_mlock
+is set to 0 these calls are only available to the super-user.
.Sh RETURN VALUES
.Rv -std
.Pp
@@ -112,7 +115,8 @@ system call
will fail if:
.Bl -tag -width Er
.It Bq Er EPERM
-The caller is not the super-user.
+.Va security.bsd.unprivileged_mlock
+is set to 0 and the caller is not the super-user.
.It Bq Er EINVAL
The address given is not page aligned or the length is negative.
.It Bq Er EAGAIN
@@ -129,7 +133,8 @@ system call
will fail if:
.Bl -tag -width Er
.It Bq Er EPERM
-The caller is not the super-user.
+.Va security.bsd.unprivileged_mlock
+is set to 0 and the caller is not the super-user.
.It Bq Er EINVAL
The address given is not page aligned or the length is negative.
.It Bq Er ENOMEM
diff --git a/lib/libc/sys/mlockall.2 b/lib/libc/sys/mlockall.2
index 54ae23e..23c644a 100644
--- a/lib/libc/sys/mlockall.2
+++ b/lib/libc/sys/mlockall.2
@@ -30,7 +30,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 27, 2010
+.Dd December 25, 2012
.Dt MLOCKALL 2
.Os
.Sh NAME
@@ -68,11 +68,22 @@ Since physical memory is a potentially scarce resource, processes are
limited in how much they can lock down.
A single process can lock the minimum of a system-wide
.Dq wired pages
-limit and the per-process
+limit
+.Va vm.max_wired
+and the per-process
.Dv RLIMIT_MEMLOCK
resource limit.
.Pp
-These calls are only available to the super-user.
+If
+.Va security.bsd.unprivileged_mlock
+is set to 0 these calls are only available to the super-user.
+If
+.Va vm.old_mlock
+is set to 1 the per-process
+.Dv RLIMIT_MEMLOCK
+resource limit will not be applied for
+.Fn mlockall
+calls.
.Pp
The
.Fn munlockall
diff --git a/lib/libc/sys/socket.2 b/lib/libc/sys/socket.2
index dae33d0..24e4293 100644
--- a/lib/libc/sys/socket.2
+++ b/lib/libc/sys/socket.2
@@ -28,7 +28,7 @@
.\" From: @(#)socket.2 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd January 5, 2009
+.Dd December 7, 2012
.Dt SOCKET 2
.Os
.Sh NAME
@@ -248,21 +248,26 @@ The
.Fn socket
system call fails if:
.Bl -tag -width Er
-.It Bq Er EPROTONOSUPPORT
-The protocol type or the specified protocol is not supported
-within this domain.
+.It Bq Er EACCES
+Permission to create a socket of the specified type and/or protocol
+is denied.
+.It Bq Er EAFNOSUPPORT
+The address family (domain) is not supported or the
+specified domain is not supported by this protocol family.
.It Bq Er EMFILE
The per-process descriptor table is full.
.It Bq Er ENFILE
The system file table is full.
-.It Bq Er EACCES
-Permission to create a socket of the specified type and/or protocol
-is denied.
.It Bq Er ENOBUFS
Insufficient buffer space is available.
The socket cannot be created until sufficient resources are freed.
.It Bq Er EPERM
User has insufficient privileges to carry out the requested operation.
+.It Bq Er EPROTONOSUPPORT
+The protocol type or the specified protocol is not supported
+within this domain.
+.It Bq Er EPROTOTYPE
+The socket type is not supported by the protocol.
.El
.Sh SEE ALSO
.Xr accept 2 ,
diff --git a/lib/libcompiler_rt/Makefile b/lib/libcompiler_rt/Makefile
index 84f9b36..af1fcb6 100644
--- a/lib/libcompiler_rt/Makefile
+++ b/lib/libcompiler_rt/Makefile
@@ -28,7 +28,6 @@ SRCF= absvdi2 \
ashlti3 \
ashrdi3 \
ashrti3 \
- clear_cache \
clzdi2 \
clzsi2 \
clzti2 \
@@ -126,6 +125,11 @@ SRCF= absvdi2 \
umoddi3 \
umodti3
+# Don't build clear_cache on ARM with clang as it is a builtin there.
+.if ${MACHINE_CPUARCH} != "arm" || ${COMPILER_TYPE} != "clang"
+SRCF+= clear_cache
+.endif
+
# These are already shipped by libc.a on arm and mips
.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
SRCF+= adddf3 \
@@ -148,8 +152,9 @@ SRCF+= adddf3 \
umodsi3
.endif
-# FreeBSD-specific atomic intrinsics.
-.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips"
+# FreeBSD-specific atomic intrinsics. Clang provides them as a builtin.
+.if (${MACHINE_CPUARCH} == "arm" && ${COMPILER_TYPE} != "clang") || \
+ ${MACHINE_CPUARCH} == "mips"
SRCF+= __sync_fetch_and_add_4 \
__sync_fetch_and_and_4 \
__sync_fetch_and_or_4 \
diff --git a/lib/libdevstat/devstat.3 b/lib/libdevstat/devstat.3
index 8d0ce4d..39be6ac 100644
--- a/lib/libdevstat/devstat.3
+++ b/lib/libdevstat/devstat.3
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 18, 2003
+.Dd December 15, 2012
.Dt DEVSTAT 3
.Os
.Sh NAME
@@ -526,6 +526,35 @@ the acquisition of
.Fa previous
and
.Fa current .
+.It Dv DSM_TOTAL_DURATION
+type:
+.Vt "long double *"
+.Pp
+The total duration of transactions, in seconds, between the acquisition of
+.Fa previous
+and
+.Fa current .
+.It Dv DSM_TOTAL_DURATION_OTHER
+.It Dv DSM_TOTAL_DURATION_READ
+.It Dv DSM_TOTAL_DURATION_WRITE
+.It Dv DSM_TOTAL_DURATION_FREE
+type:
+.Vt "long double *"
+.Pp
+The total duration of transactions of the specified type between
+the acquisition of
+.Fa previous
+and
+.Fa current .
+.It Dv DSM_TOTAL_BUSY_TIME
+type:
+.Vt "long double *"
+.Pp
+Total time the device had one or more transactions outstanding
+between the acquisition of
+.Fa previous
+and
+.Fa current .
.It Dv DSM_TOTAL_BLOCKS
type:
.Vt "uint64_t *"
diff --git a/lib/libdevstat/devstat.c b/lib/libdevstat/devstat.c
index ff0767a..0f313fb 100644
--- a/lib/libdevstat/devstat.c
+++ b/lib/libdevstat/devstat.c
@@ -133,6 +133,12 @@ struct devstat_args {
{ DSM_MS_PER_TRANSACTION_FREE, DEVSTAT_ARG_LD },
{ DSM_BUSY_PCT, DEVSTAT_ARG_LD },
{ DSM_QUEUE_LENGTH, DEVSTAT_ARG_UINT64 },
+ { DSM_TOTAL_DURATION, DEVSTAT_ARG_LD },
+ { DSM_TOTAL_DURATION_READ, DEVSTAT_ARG_LD },
+ { DSM_TOTAL_DURATION_WRITE, DEVSTAT_ARG_LD },
+ { DSM_TOTAL_DURATION_FREE, DEVSTAT_ARG_LD },
+ { DSM_TOTAL_DURATION_OTHER, DEVSTAT_ARG_LD },
+ { DSM_TOTAL_BUSY_TIME, DEVSTAT_ARG_LD },
};
static const char *namelist[] = {
@@ -1217,11 +1223,13 @@ devstat_compute_statistics(struct devstat *current, struct devstat *previous,
u_int64_t totaltransfers, totaltransfersread, totaltransferswrite;
u_int64_t totaltransfersother, totalblocks, totalblocksread;
u_int64_t totalblockswrite, totaltransfersfree, totalblocksfree;
+ long double totalduration, totaldurationread, totaldurationwrite;
+ long double totaldurationfree, totaldurationother;
va_list ap;
devstat_metric metric;
u_int64_t *destu64;
long double *destld;
- int retval, i;
+ int retval;
retval = 0;
@@ -1263,6 +1271,13 @@ devstat_compute_statistics(struct devstat *current, struct devstat *previous,
totalblocksfree /= 512;
}
+ totaldurationread = DELTA_T(duration[DEVSTAT_READ]);
+ totaldurationwrite = DELTA_T(duration[DEVSTAT_WRITE]);
+ totaldurationfree = DELTA_T(duration[DEVSTAT_FREE]);
+ totaldurationother = DELTA_T(duration[DEVSTAT_NO_DATA]);
+ totalduration = totaldurationread + totaldurationwrite +
+ totaldurationfree + totaldurationother;
+
va_start(ap, etime);
while ((metric = (devstat_metric)va_arg(ap, devstat_metric)) != 0) {
@@ -1484,9 +1499,7 @@ devstat_compute_statistics(struct devstat *current, struct devstat *previous,
*/
case DSM_MS_PER_TRANSACTION:
if (totaltransfers > 0) {
- *destld = 0;
- for (i = 0; i < DEVSTAT_N_TRANS_FLAGS; i++)
- *destld += DELTA_T(duration[i]);
+ *destld = totalduration;
*destld /= totaltransfers;
*destld *= 1000;
} else
@@ -1499,7 +1512,7 @@ devstat_compute_statistics(struct devstat *current, struct devstat *previous,
*/
case DSM_MS_PER_TRANSACTION_READ:
if (totaltransfersread > 0) {
- *destld = DELTA_T(duration[DEVSTAT_READ]);
+ *destld = totaldurationread;
*destld /= totaltransfersread;
*destld *= 1000;
} else
@@ -1507,7 +1520,7 @@ devstat_compute_statistics(struct devstat *current, struct devstat *previous,
break;
case DSM_MS_PER_TRANSACTION_WRITE:
if (totaltransferswrite > 0) {
- *destld = DELTA_T(duration[DEVSTAT_WRITE]);
+ *destld = totaldurationwrite;
*destld /= totaltransferswrite;
*destld *= 1000;
} else
@@ -1515,7 +1528,7 @@ devstat_compute_statistics(struct devstat *current, struct devstat *previous,
break;
case DSM_MS_PER_TRANSACTION_FREE:
if (totaltransfersfree > 0) {
- *destld = DELTA_T(duration[DEVSTAT_FREE]);
+ *destld = totaldurationfree;
*destld /= totaltransfersfree;
*destld *= 1000;
} else
@@ -1523,7 +1536,7 @@ devstat_compute_statistics(struct devstat *current, struct devstat *previous,
break;
case DSM_MS_PER_TRANSACTION_OTHER:
if (totaltransfersother > 0) {
- *destld = DELTA_T(duration[DEVSTAT_NO_DATA]);
+ *destld = totaldurationother;
*destld /= totaltransfersother;
*destld *= 1000;
} else
@@ -1541,6 +1554,24 @@ devstat_compute_statistics(struct devstat *current, struct devstat *previous,
case DSM_QUEUE_LENGTH:
*destu64 = current->start_count - current->end_count;
break;
+ case DSM_TOTAL_DURATION:
+ *destld = totalduration;
+ break;
+ case DSM_TOTAL_DURATION_READ:
+ *destld = totaldurationread;
+ break;
+ case DSM_TOTAL_DURATION_WRITE:
+ *destld = totaldurationwrite;
+ break;
+ case DSM_TOTAL_DURATION_FREE:
+ *destld = totaldurationfree;
+ break;
+ case DSM_TOTAL_DURATION_OTHER:
+ *destld = totaldurationother;
+ break;
+ case DSM_TOTAL_BUSY_TIME:
+ *destld = DELTA_T(busy_time);
+ break;
/*
* XXX: comment out the default block to see if any case's are missing.
*/
diff --git a/lib/libdevstat/devstat.h b/lib/libdevstat/devstat.h
index 7717cb1..9471f93 100644
--- a/lib/libdevstat/devstat.h
+++ b/lib/libdevstat/devstat.h
@@ -97,6 +97,12 @@ typedef enum {
DSM_MS_PER_TRANSACTION_FREE,
DSM_BUSY_PCT,
DSM_QUEUE_LENGTH,
+ DSM_TOTAL_DURATION,
+ DSM_TOTAL_DURATION_READ,
+ DSM_TOTAL_DURATION_WRITE,
+ DSM_TOTAL_DURATION_FREE,
+ DSM_TOTAL_DURATION_OTHER,
+ DSM_TOTAL_BUSY_TIME,
DSM_MAX
} devstat_metric;
diff --git a/lib/libdisk/Makefile b/lib/libdisk/Makefile
deleted file mode 100644
index 9f3e093..0000000
--- a/lib/libdisk/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-# $FreeBSD$
-
-.if ${MACHINE_CPUARCH} == "ia64"
-_open_disk= open_ia64_disk.c
-.else
-_change = change.c
-_open_disk= open_disk.c
-.endif
-
-LIB= disk
-SRCS= blocks.c ${_change} chunk.c create_chunk.c disk.c ${_open_disk} \
- rules.c write_disk.c
-SRCS+= write_${MACHINE}_disk.c
-
-INCS= libdisk.h
-
-WARNS?= 2
-
-CFLAGS+= -I${.CURDIR}/../../sys/geom
-
-.if ${MACHINE} == "pc98"
-CFLAGS+= -DPC98
-.endif
-
-CLEANFILES+= tmp.c tst01 tst01.o
-NO_PROFILE=
-NO_PIC=
-
-MAN= libdisk.3
-
-.include <bsd.lib.mk>
-
-tst01: tst01.o libdisk.a
- cc ${CFLAGS} -static tst01.o -o tst01 libdisk.a
-
-ad0: all install tst01
- ./tst01 ad0
-
-da0: all install tst01
- ./tst01 da0
-
-da1: all install tst01
- ./tst01 da1
diff --git a/lib/libdisk/blocks.c b/lib/libdisk/blocks.c
deleted file mode 100644
index 313c5cc..0000000
--- a/lib/libdisk/blocks.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include "libdisk.h"
-
-void *
-read_block(int fd, daddr_t block, u_long sector_size)
-{
- void *foo;
- int i;
-
- foo = malloc(sector_size);
- if (foo == NULL)
- return (NULL);
- if (-1 == lseek(fd, (off_t)block * sector_size, SEEK_SET)) {
- free (foo);
- return (NULL);
- }
- i = read(fd, foo, sector_size);
- if ((int)sector_size != i) {
- free (foo);
- return (NULL);
- }
- return foo;
-}
-
-int
-write_block(int fd, daddr_t block, const void *foo, u_long sector_size)
-{
- int i;
-
- if (-1 == lseek(fd, (off_t)block * sector_size, SEEK_SET))
- return (-1);
- i = write(fd, foo, sector_size);
- if ((int)sector_size != i)
- return (-1);
- return 0;
-}
diff --git a/lib/libdisk/change.c b/lib/libdisk/change.c
deleted file mode 100644
index 5f0c9c6..0000000
--- a/lib/libdisk/change.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#include <sys/types.h>
-#include "libdisk.h"
-
-void
-Set_Bios_Geom(struct disk *disk, u_long cyl, u_long hd, u_long sect)
-{
-
- disk->bios_cyl = cyl;
- disk->bios_hd = hd;
- disk->bios_sect = sect;
-}
-
-void
-Sanitize_Bios_Geom(struct disk *disk)
-{
- int sane;
-
- sane = 1;
-
- if (disk->bios_cyl >= 65536)
- sane = 0;
-#ifdef PC98
- if (disk->bios_hd >= 256)
- sane = 0;
- if (disk->bios_sect >= 256)
- sane = 0;
-#else
- if (disk->bios_hd > 256)
- sane = 0;
- if (disk->bios_sect > 63)
- sane = 0;
-#endif
-#if 0 /* Disable a check on a disk size. It's too strict. */
- if (disk->bios_cyl * disk->bios_hd * disk->bios_sect !=
- disk->chunks->size)
- sane = 0;
-#endif
- if (sane)
- return;
-
- /* First try something that IDE can handle */
- disk->bios_sect = 63;
- disk->bios_hd = 16;
- disk->bios_cyl = disk->chunks->size /
- (disk->bios_sect * disk->bios_hd);
-
-#ifdef PC98
- if (disk->bios_cyl < 65536)
-#else
- if (disk->bios_cyl < 1024)
-#endif
- return;
-
- /* Hmm, try harder... */
- /* Assume standard SCSI parameter */
-#ifdef PC98
- disk->bios_sect = 128;
- disk->bios_hd = 8;
-#else
- disk->bios_hd = 255;
-#endif
- disk->bios_cyl = disk->chunks->size /
- (disk->bios_sect * disk->bios_hd);
-
-#ifdef PC98
- if (disk->bios_cyl < 65536)
- return;
-
- /* Assume UIDE-133/98-A Challenger BIOS 0.9821C parameter */
- disk->bios_sect = 255;
- disk->bios_hd = 16;
- disk->bios_cyl = disk->chunks->size /
- (disk->bios_sect * disk->bios_hd);
-
- if (disk->bios_cyl < 65536)
- return;
-
- /* BIG-na-Drive? */
- disk->bios_hd = 255;
- disk->bios_cyl = disk->chunks->size /
- (disk->bios_sect * disk->bios_hd);
-#endif
-}
-
-void
-All_FreeBSD(struct disk *d, int force_all)
-{
- struct chunk *c;
- int type;
-
-#ifdef PC98
- type = 0xc494;
-#else
- type = 0xa5;
-#endif
-
-again:
- for (c = d->chunks->part; c; c = c->next)
- if (c->type != unused) {
- Delete_Chunk(d, c);
- goto again;
- }
- c = d->chunks;
- if (force_all) {
- Sanitize_Bios_Geom(d);
- Create_Chunk(d, c->offset, c->size, freebsd, type,
- CHUNK_FORCE_ALL, "FreeBSD");
- } else {
- Create_Chunk(d, c->offset, c->size, freebsd, type, 0,
- "FreeBSD");
- }
-}
diff --git a/lib/libdisk/chunk.c b/lib/libdisk/chunk.c
deleted file mode 100644
index fb43ef5..0000000
--- a/lib/libdisk/chunk.c
+++ /dev/null
@@ -1,595 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/types.h>
-#include <sys/stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <err.h>
-#include "libdisk.h"
-
-struct chunk *
-New_Chunk(void)
-{
- struct chunk *c;
-
- c = malloc(sizeof *c);
- if (c != NULL)
- memset(c, 0, sizeof *c);
- return (c);
-}
-
-/* Is c2 completely inside c1 ? */
-
-static int
-Chunk_Inside(const struct chunk *c1, const struct chunk *c2)
-{
- /* if c1 ends before c2 do */
- if (c1->end < c2->end)
- return 0;
- /* if c1 starts after c2 do */
- if (c1->offset > c2->offset)
- return 0;
- return 1;
-}
-
-static struct chunk *
-Find_Mother_Chunk(struct chunk *chunks, daddr_t offset, daddr_t end,
- chunk_e type)
-{
- struct chunk *c1, *c2, ct;
-
- ct.offset = offset;
- ct.end = end;
- switch (type) {
- case whole:
- if (Chunk_Inside(chunks, &ct))
- return chunks;
- case extended:
- for (c1 = chunks->part; c1; c1 = c1->next) {
- if (c1->type != type)
- continue;
- if (Chunk_Inside(c1, &ct))
- return c1;
- }
- return 0;
- case freebsd:
- for (c1 = chunks->part; c1; c1 = c1->next) {
- if (c1->type == type)
- if (Chunk_Inside(c1, &ct))
- return c1;
- if (c1->type != extended)
- continue;
- for (c2 = c1->part; c2; c2 = c2->next)
- if (c2->type == type && Chunk_Inside(c2, &ct))
- return c2;
- }
- return 0;
-#ifdef __powerpc__
- case apple:
- for (c1 = chunks->part; c1; c1 = c1->next) {
- if (c1->type == type)
- if (Chunk_Inside(c1, &ct))
- return c1;
- }
- return 0;
-#endif
- default:
- warn("Unsupported mother type in Find_Mother_Chunk");
- return 0;
- }
-}
-
-void
-Free_Chunk(struct chunk *c1)
-{
- if(c1 == NULL)
- return;
- if(c1->private_data && c1->private_free)
- (*c1->private_free)(c1->private_data);
- if(c1->part != NULL)
- Free_Chunk(c1->part);
- if(c1->next != NULL)
- Free_Chunk(c1->next);
- if (c1->name != NULL)
- free(c1->name);
- if (c1->sname != NULL)
- free(c1->sname);
- free(c1);
-}
-
-struct chunk *
-Clone_Chunk(const struct chunk *c1)
-{
- struct chunk *c2;
-
- if(!c1)
- return NULL;
- c2 = New_Chunk();
- if (c2 == NULL)
- return NULL;
- *c2 = *c1;
- if (c1->private_data && c1->private_clone)
- c2->private_data = c2->private_clone(c2->private_data);
- c2->name = strdup(c2->name);
- if (c2->sname != NULL)
- c2->sname = strdup(c2->sname);
- c2->next = Clone_Chunk(c2->next);
- c2->part = Clone_Chunk(c2->part);
- return c2;
-}
-
-int
-Insert_Chunk(struct chunk *c2, daddr_t offset, daddr_t size, const char *name,
- chunk_e type, int subtype, u_long flags, const char *sname)
-{
- struct chunk *ct,*cs;
-
- /* We will only insert into empty spaces */
- if (c2->type != unused)
- return __LINE__;
-
- ct = New_Chunk();
- if (ct == NULL)
- return __LINE__;
- ct->disk = c2->disk;
- ct->offset = offset;
- ct->size = size;
- ct->end = offset + size - 1;
- ct->type = type;
- if (sname != NULL)
- ct->sname = strdup(sname);
- ct->name = strdup(name);
- ct->subtype = subtype;
- ct->flags = flags;
-
- if (!Chunk_Inside(c2, ct)) {
- Free_Chunk(ct);
- return __LINE__;
- }
-
- if ((type == freebsd || type == extended || type == apple)) {
- cs = New_Chunk();
- if (cs == NULL)
- return __LINE__;
- cs->disk = c2->disk;
- cs->offset = offset;
- cs->size = size;
- cs->end = offset + size - 1;
- cs->type = unused;
- if (sname != NULL)
- cs->sname = strdup(sname);
- cs->name = strdup("-");
- ct->part = cs;
- }
-
- /* Make a new chunk for any trailing unused space */
- if (c2->end > ct->end) {
- cs = New_Chunk();
- if (cs == NULL)
- return __LINE__;
- *cs = *c2;
- cs->disk = c2->disk;
- cs->offset = ct->end + 1;
- cs->size = c2->end - ct->end;
- if (c2->sname != NULL)
- cs->sname = strdup(c2->sname);
- if (c2->name)
- cs->name = strdup(c2->name);
- c2->next = cs;
- c2->size -= c2->end - ct->end;
- c2->end = ct->end;
- }
- /* If no leading unused space just occupy the old chunk */
- if (c2->offset == ct->offset) {
- c2->sname = ct->sname;
- c2->name = ct->name;
- c2->type = ct->type;
- c2->part = ct->part;
- c2->subtype = ct->subtype;
- c2->flags = ct->flags;
- ct->sname = NULL;
- ct->name = NULL;
- ct->part = 0;
- Free_Chunk(ct);
- return 0;
- }
- /* else insert new chunk and adjust old one */
- c2->end = ct->offset - 1;
- c2->size -= ct->size;
- ct->next = c2->next;
- c2->next = ct;
- return 0;
-}
-
-int
-Add_Chunk(struct disk *d, daddr_t offset, daddr_t size, const char *name,
- chunk_e type, int subtype, u_long flags, const char *sname)
-{
- struct chunk *c1, *c2, ct;
- daddr_t end = offset + size - 1;
- ct.offset = offset;
- ct.end = end;
- ct.size = size;
-
- if (type == whole) {
- d->chunks = c1 = New_Chunk();
- if (c1 == NULL)
- return __LINE__;
- c2 = c1->part = New_Chunk();
- if (c2 == NULL)
- return __LINE__;
- c2->disk = c1->disk = d;
- c2->offset = c1->offset = offset;
- c2->size = c1->size = size;
- c2->end = c1->end = end;
- c1->sname = strdup(sname);
- c2->sname = strdup("-");
- c1->name = strdup(name);
- c2->name = strdup("-");
- c1->type = type;
- c2->type = unused;
- c1->flags = flags;
- c1->subtype = subtype;
- return 0;
- }
-
- c1 = 0;
- /* PLATFORM POLICY BEGIN ------------------------------------- */
- switch(platform) {
- case p_i386:
- case p_amd64:
- switch (type) {
- case fat:
- case gpt:
- case mbr:
- case extended:
- case freebsd:
- c1 = Find_Mother_Chunk(d->chunks, offset, end, whole);
- break;
- case part:
- c1 = Find_Mother_Chunk(d->chunks, offset, end, freebsd);
- break;
- default:
- return(-1);
- }
- break;
- case p_ia64:
- switch (type) {
- case freebsd:
- subtype = 0xa5;
- /* FALL THROUGH */
- case fat:
- case efi:
- case mbr:
- c1 = Find_Mother_Chunk(d->chunks, offset, end, whole);
- break;
- case part:
- c1 = Find_Mother_Chunk(d->chunks, offset, end,
- freebsd);
- if (!c1)
- c1 = Find_Mother_Chunk(d->chunks, offset, end,
- whole);
- break;
- default:
- return (-1);
- }
- break;
- case p_pc98:
- switch (type) {
- case fat:
- case pc98:
- case freebsd:
- c1 = Find_Mother_Chunk(d->chunks, offset, end, whole);
- break;
- case part:
- c1 = Find_Mother_Chunk(d->chunks, offset, end, freebsd);
- break;
- default:
- return(-1);
- }
- break;
- case p_sparc64:
- case p_alpha:
- switch (type) {
- case freebsd:
- c1 = Find_Mother_Chunk(d->chunks, offset, end, whole);
- break;
- case part:
- c1 = Find_Mother_Chunk(d->chunks, offset, end, freebsd);
- break;
- default:
- return(-1);
- }
- break;
- case p_ppc:
- switch (type) {
- case apple:
- c1 = Find_Mother_Chunk(d->chunks, offset, end, whole);
- break;
- case part:
- c1 = Find_Mother_Chunk(d->chunks, offset, end, apple);
- break;
- default:
- return (-1);
- }
- break;
- default:
- return (-1);
- }
- /* PLATFORM POLICY END ---------------------------------------- */
-
- if(!c1)
- return __LINE__;
- for(c2 = c1->part; c2; c2 = c2->next) {
- if (c2->type != unused)
- continue;
- if(!Chunk_Inside(c2, &ct))
- continue;
-/* PLATFORM POLICY BEGIN ------------------------------------- */
- if (platform == p_sparc64) {
- offset = Prev_Cyl_Aligned(d, offset);
- size = Next_Cyl_Aligned(d, size);
- } else if (platform == p_i386 || platform == p_pc98 ||
- platform == p_amd64) {
- if (type != freebsd)
- break;
- if (!(flags & CHUNK_ALIGN))
- break;
- if (offset == d->chunks->offset &&
- end == d->chunks->end)
- break;
-
- /* Round down to prev cylinder */
- offset = Prev_Cyl_Aligned(d,offset);
- /* Stay inside the parent */
- if (offset < c2->offset)
- offset = c2->offset;
- /* Round up to next cylinder */
- offset = Next_Cyl_Aligned(d, offset);
- /* Keep one track clear in front of parent */
- if (offset == c1->offset)
- offset = Next_Track_Aligned(d, offset + 1);
- /* Work on the (end+1) */
- size += offset;
- /* Round up to cylinder */
- size = Next_Cyl_Aligned(d, size);
- /* Stay inside parent */
- if ((size-1) > c2->end)
- size = c2->end + 1;
- /* Round down to cylinder */
- size = Prev_Cyl_Aligned(d, size);
-
- /* Convert back to size */
- size -= offset;
- }
- break;
-
-/* PLATFORM POLICY END ------------------------------------- */
- }
- if (c2 == NULL)
- return (__LINE__);
- return Insert_Chunk(c2, offset, size, name, type, subtype, flags,
- sname);
-}
-
-char *
-ShowChunkFlags(struct chunk *c)
-{
- static char ret[10];
- int i = 0;
-
- if (c->flags & CHUNK_ACTIVE)
- ret[i++] = 'A';
- if (c->flags & CHUNK_ALIGN)
- ret[i++] = '=';
- if (c->flags & CHUNK_IS_ROOT)
- ret[i++] = 'R';
- ret[i++] = '\0';
-
- return ret;
-}
-
-static void
-Print_Chunk(struct chunk *c1, int offset)
-{
- int i;
-
- if (!c1)
- return;
- for (i = 0; i < offset - 2; i++)
- putchar(' ');
- for (; i < offset; i++)
- putchar('-');
- putchar('>');
- for (; i < 10; i++)
- putchar(' ');
-#ifndef __ia64__
- printf("%p ", c1);
-#endif
- printf("%8jd %8jd %8jd %-8s %-16s %-8s 0x%02x %s",
- (intmax_t)c1->offset, (intmax_t)c1->size, (intmax_t)c1->end,
- c1->name, c1->sname, chunk_name(c1->type), c1->subtype,
- ShowChunkFlags(c1));
- putchar('\n');
- Print_Chunk(c1->part, offset + 2);
- Print_Chunk(c1->next, offset);
-}
-
-void
-Debug_Chunk(struct chunk *c1)
-{
-
- Print_Chunk(c1, 2);
-}
-
-int
-Delete_Chunk(struct disk *d, struct chunk *c)
-{
-
- return (Delete_Chunk2(d, c, 0));
-}
-
-int
-Delete_Chunk2(struct disk *d, struct chunk *c, int rflags)
-{
- struct chunk *c1, *c2, *c3;
- daddr_t offset = c->offset;
-
- switch (c->type) {
- case whole:
- case unused:
- return 1;
- case extended:
- c1 = Find_Mother_Chunk(d->chunks, c->offset, c->end, whole);
- break;
- case part:
- c1 = Find_Mother_Chunk(d->chunks, c->offset, c->end, freebsd);
-#ifdef __ia64__
- if (c1 == NULL)
- c1 = Find_Mother_Chunk(d->chunks, c->offset, c->end,
- whole);
-#endif
-#ifdef __powerpc__
- if (c1 == NULL)
- c1 = Find_Mother_Chunk(d->chunks, c->offset, c->end,
- apple);
-#endif
- break;
- default:
- c1 = Find_Mother_Chunk(d->chunks, c->offset, c->end, extended);
- if (c1 == NULL)
- c1 = Find_Mother_Chunk(d->chunks, c->offset, c->end,
- whole);
- break;
- }
- if (c1 == NULL)
- return 1;
- for (c2 = c1->part; c2; c2 = c2->next) {
- if (c2 == c) {
- c2->type = unused;
- c2->subtype = 0;
- c2->flags = 0;
- if (c2->sname != NULL)
- free(c2->sname);
- c2->sname = strdup("-");
- free(c2->name);
- c2->name = strdup("-");
- Free_Chunk(c2->part);
- c2->part =0;
- goto scan;
- }
- }
- return 1;
-scan:
- /*
- * Collapse multiple unused elements together, and attempt
- * to extend the previous chunk into the freed chunk.
- *
- * We only extend non-unused elements which are marked
- * for newfs (we can't extend working filesystems), and
- * only if we are called with DELCHUNK_RECOVER.
- */
- for (c2 = c1->part; c2; c2 = c2->next) {
- if (c2->type != unused) {
- if (c2->offset + c2->size != offset ||
- (rflags & DELCHUNK_RECOVER) == 0 ||
- (c2->flags & CHUNK_NEWFS) == 0) {
- continue;
- }
- /* else extend into free area */
- }
- if (!c2->next)
- continue;
- if (c2->next->type != unused)
- continue;
- c3 = c2->next;
- c2->size += c3->size;
- c2->end = c3->end;
- c2->next = c3->next;
- c3->next = 0;
- Free_Chunk(c3);
- goto scan;
- }
- Fixup_Names(d);
- return 0;
-}
-
-#if 0
-int
-Collapse_Chunk(struct disk *d, struct chunk *c1)
-{
- struct chunk *c2, *c3;
-
- if (c1->next && Collapse_Chunk(d, c1->next))
- return 1;
-
- if (c1->type == unused && c1->next && c1->next->type == unused) {
- c3 = c1->next;
- c1->size += c3->size;
- c1->end = c3->end;
- c1->next = c3->next;
- c3->next = 0;
- Free_Chunk(c3);
- return 1;
- }
- c3 = c1->part;
- if (!c3)
- return 0;
- if (Collapse_Chunk(d, c1->part))
- return 1;
-
- if (c1->type == whole)
- return 0;
-
- if (c3->type == unused && c3->size == c1->size) {
- Delete_Chunk(d, c1);
- return 1;
- }
- if (c3->type == unused) {
- c2 = New_Chunk();
- if (c2 == NULL)
- barfout(1, "malloc failed");
- *c2 = *c1;
- c1->next = c2;
- c1->disk = d;
- c1->sname = strdup("-");
- c1->name = strdup("-");
- c1->part = 0;
- c1->type = unused;
- c1->flags = 0;
- c1->subtype = 0;
- c1->size = c3->size;
- c1->end = c3->end;
- c2->offset += c1->size;
- c2->size -= c1->size;
- c2->part = c3->next;
- c3->next = 0;
- Free_Chunk(c3);
- return 1;
- }
- for (c2 = c3; c2->next; c2 = c2->next)
- c3 = c2;
- if (c2 && c2->type == unused) {
- c3->next = 0;
- c2->next = c1->next;
- c1->next = c2;
- c1->size -= c2->size;
- c1->end -= c2->size;
- return 1;
- }
-
- return 0;
-}
-#endif
diff --git a/lib/libdisk/create_chunk.c b/lib/libdisk/create_chunk.c
deleted file mode 100644
index 7f1453e..0000000
--- a/lib/libdisk/create_chunk.c
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <stdarg.h>
-#include <sys/param.h>
-#include <sys/disklabel.h>
-#ifdef PC98
-#include <sys/diskpc98.h>
-#else
-#include <sys/diskmbr.h>
-#endif
-#include <sys/mount.h>
-#include <sys/stat.h>
-#include <sys/sysctl.h>
-#include <grp.h>
-#include <paths.h>
-#include <pwd.h>
-#include "libdisk.h"
-
-static int
-Fixup_FreeBSD_Names(struct chunk *c)
-{
- struct chunk *c1, *c3;
- uint j;
-
- if (!strcmp(c->name, "X"))
- return 0;
-
- /* reset all names to "X" */
- for (c1 = c->part; c1; c1 = c1->next) {
- c1->oname = c1->name;
- c1->name = malloc(12);
- if (!c1->name)
- return -1;
- strcpy(c1->name,"X");
- }
-
- /* Allocate the first swap-partition we find */
- for (c1 = c->part; c1; c1 = c1->next) {
- if (c1->type == unused)
- continue;
- if (c1->subtype != FS_SWAP)
- continue;
- sprintf(c1->name, "%s%c", c->name, SWAP_PART + 'a');
- break;
- }
-
- /* Allocate the first root-partition we find */
- for (c1 = c->part; c1; c1 = c1->next) {
- if (c1->type == unused)
- continue;
- if (!(c1->flags & CHUNK_IS_ROOT))
- continue;
- sprintf(c1->name, "%s%c", c->name, 0 + 'a');
- break;
- }
-
- /* Try to give them the same as they had before */
- for (c1 = c->part; c1; c1 = c1->next) {
- if (strcmp(c1->name, "X"))
- continue;
- for (c3 = c->part; c3 ; c3 = c3->next)
- if (c1 != c3 && !strcmp(c3->name, c1->oname))
- goto newname;
- strcpy(c1->name, c1->oname);
- newname:
- ;
- }
-
- /* Allocate the rest sequentially */
- for (c1 = c->part; c1; c1 = c1->next) {
- const char order[] = "defghab";
-
- if (c1->type == unused)
- continue;
- if (strcmp("X", c1->name))
- continue;
-
- for (j = 0; j < strlen(order); j++) {
- sprintf(c1->name, "%s%c", c->name, order[j]);
- for (c3 = c->part; c3 ; c3 = c3->next)
- if (c1 != c3 && !strcmp(c3->name, c1->name))
- goto match;
- break;
- match:
- strcpy(c1->name, "X");
- continue;
- }
- }
- for (c1 = c->part; c1; c1 = c1->next) {
- free(c1->oname);
- c1->oname = 0;
- }
- return 0;
-}
-
-#ifndef PC98
-static int
-Fixup_Extended_Names(struct chunk *c)
-{
- struct chunk *c1;
- int j = 5;
-
- for (c1 = c->part; c1; c1 = c1->next) {
- if (c1->type == unused)
- continue;
- free(c1->name);
- c1->name = malloc(12);
- if (!c1->name)
- return -1;
- sprintf(c1->name, "%ss%d", c->disk->chunks->name, j++);
- if (c1->type == freebsd)
- if (Fixup_FreeBSD_Names(c1) != 0)
- return -1;
- }
- return 0;
-}
-#endif
-
-#ifdef __powerpc__
-static int
-Fixup_Apple_Names(struct chunk *c)
-{
- struct chunk *c1;
-
- for (c1 = c->part; c1; c1 = c1->next) {
- if (c1->type == unused)
- continue;
- free(c1->name);
- c1->name = strdup(c->name);
- if (!c1->name)
- return (-1);
- }
- return 0;
-}
-#endif
-
-int
-Fixup_Names(struct disk *d)
-{
- struct chunk *c1, *c2;
-#if defined(__i386__) || defined(__ia64__) || defined(__amd64__)
- struct chunk *c3;
- int j, max;
-#endif
-
- c1 = d->chunks;
- for (c2 = c1->part; c2 ; c2 = c2->next) {
- if (c2->type == unused)
- continue;
- if (strcmp(c2->name, "X"))
- continue;
-#if defined(__i386__) || defined(__ia64__) || defined(__amd64__)
- c2->oname = malloc(12);
- if (!c2->oname)
- return -1;
-#ifdef __ia64__
- max = d->gpt_size;
-#else
- max = NDOSPART;
-#endif
- for (j = 1; j <= max; j++) {
-#ifdef __ia64__
- sprintf(c2->oname, "%s%c%d", c1->name,
- (c1->type == whole) ? 'p' : 's', j);
-#else
- sprintf(c2->oname, "%ss%d", c1->name, j);
-#endif
- for (c3 = c1->part; c3; c3 = c3->next)
- if (c3 != c2 && !strcmp(c3->name, c2->oname))
- goto match;
- free(c2->name);
- c2->name = c2->oname;
- c2->oname = 0;
- break;
- match:
- continue;
- }
- if (c2->oname)
- free(c2->oname);
-#else
- free(c2->name);
- c2->name = strdup(c1->name);
-#endif /*__i386__*/
- }
- for (c2 = c1->part; c2; c2 = c2->next) {
- if (c2->type == freebsd)
- Fixup_FreeBSD_Names(c2);
-#ifdef __powerpc__
- else if (c2->type == apple)
- Fixup_Apple_Names(c2);
-#endif
-#ifndef PC98
- else if (c2->type == extended)
- Fixup_Extended_Names(c2);
-#endif
- }
- return 0;
-}
-
-int
-Create_Chunk(struct disk *d, daddr_t offset, daddr_t size, chunk_e type,
- int subtype, u_long flags, const char *sname)
-{
- int i;
-
-#ifndef __ia64__
- if (!(flags & CHUNK_FORCE_ALL)) {
- daddr_t l;
-#ifdef PC98
- /* Never use the first cylinder */
- if (!offset) {
- offset += (d->bios_sect * d->bios_hd);
- size -= (d->bios_sect * d->bios_hd);
- }
-#else
- /* Never use the first track */
- if (!offset) {
- offset += d->bios_sect;
- size -= d->bios_sect;
- }
-#endif /* PC98 */
-
- /* Always end on cylinder boundary */
- l = (offset + size) % (d->bios_sect * d->bios_hd);
- size -= l;
- }
-#endif
-
- i = Add_Chunk(d, offset, size, "X", type, subtype, flags, sname);
- Fixup_Names(d);
- return i;
-}
-
-struct chunk *
-Create_Chunk_DWIM(struct disk *d, struct chunk *parent, daddr_t size,
- chunk_e type, int subtype, u_long flags)
-{
- int i;
- struct chunk *c1;
- daddr_t offset;
-
- if (!parent)
- parent = d->chunks;
-
- if ((parent->type == freebsd && type == part && parent->part == NULL)
- || (parent->type == apple && type == part && parent->part == NULL)) {
- c1 = New_Chunk();
- if (c1 == NULL)
- return (NULL);
- c1->disk = parent->disk;
- c1->offset = parent->offset;
- c1->size = parent->size;
- c1->end = parent->offset + parent->size - 1;
- c1->type = unused;
- if (parent->sname != NULL)
- c1->sname = strdup(parent->sname);
- c1->name = strdup("-");
- parent->part = c1;
- }
-
- for (c1 = parent->part; c1; c1 = c1->next) {
- if (c1->type != unused)
- continue;
- if (c1->size < size)
- continue;
- offset = c1->offset;
- goto found;
- }
- return 0;
-found:
- i = Add_Chunk(d, offset, size, "X", type, subtype, flags, "-");
- if (i)
- return 0;
- Fixup_Names(d);
- for (c1 = parent->part; c1; c1 = c1->next)
- if (c1->offset == offset)
- return c1;
- /* barfout(1, "Serious internal trouble"); */
- return 0;
-}
diff --git a/lib/libdisk/disk.c b/lib/libdisk/disk.c
deleted file mode 100644
index c00e0e7..0000000
--- a/lib/libdisk/disk.c
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#include <inttypes.h>
-#include <err.h>
-#include <sys/sysctl.h>
-#include <sys/stdint.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/disklabel.h>
-#include <sys/uuid.h>
-#include <sys/gpt.h>
-#include <paths.h>
-#include "libdisk.h"
-
-#include <ctype.h>
-#include <errno.h>
-#include <assert.h>
-#include <uuid.h>
-
-const enum platform platform =
-#if defined (P_DEBUG)
- P_DEBUG
-#elif defined (PC98)
- p_pc98
-#elif defined(__i386__)
- p_i386
-#elif defined(__alpha__)
- p_alpha
-#elif defined(__sparc64__)
- p_sparc64
-#elif defined(__ia64__)
- p_ia64
-#elif defined(__ppc__)
- p_ppc
-#elif defined(__amd64__)
- p_amd64
-#elif defined(__arm__)
- p_arm
-#elif defined(__mips__)
- p_mips
-#else
- IHAVENOIDEA
-#endif
- ;
-
-const char *
-chunk_name(chunk_e type)
-{
- switch(type) {
- case unused: return ("unused");
- case mbr: return ("mbr");
- case part: return ("part");
- case gpt: return ("gpt");
- case pc98: return ("pc98");
- case sun: return ("sun");
- case freebsd: return ("freebsd");
- case fat: return ("fat");
- case spare: return ("spare");
- case efi: return ("efi");
- case apple: return ("apple");
- default: return ("??");
- }
-}
-
-struct disk *
-Open_Disk(const char *name)
-{
- struct disk *d;
- char *conftxt;
- size_t txtsize;
- int error;
-
- error = sysctlbyname("kern.geom.conftxt", NULL, &txtsize, NULL, 0);
- if (error) {
- warn("kern.geom.conftxt sysctl not available, giving up!");
- return (NULL);
- }
- conftxt = malloc(txtsize+1);
- if (conftxt == NULL) {
- warn("cannot malloc memory for conftxt");
- return (NULL);
- }
- error = sysctlbyname("kern.geom.conftxt", conftxt, &txtsize, NULL, 0);
- if (error) {
- warn("error reading kern.geom.conftxt from the system");
- free(conftxt);
- return (NULL);
- }
- conftxt[txtsize] = '\0'; /* in case kernel bug is still there */
- d = Int_Open_Disk(name, conftxt);
- free(conftxt);
-
- return (d);
-}
-
-void
-Debug_Disk(struct disk *d)
-{
-
- printf("Debug_Disk(%s)", d->name);
-
-#ifndef __ia64__
- printf(" bios_geom=%lu/%lu/%lu = %lu\n",
- d->bios_cyl, d->bios_hd, d->bios_sect,
- d->bios_cyl * d->bios_hd * d->bios_sect);
-#if defined(PC98)
- printf(" boot1=%p, boot2=%p, bootipl=%p, bootmenu=%p\n",
- d->boot1, d->boot2, d->bootipl, d->bootmenu);
-#elif defined(__i386__) || defined(__amd64__)
- printf(" boot1=%p, boot2=%p, bootmgr=%p\n",
- d->boot1, d->boot2, d->bootmgr);
-#elif defined(__alpha__)
- printf(" boot1=%p, bootmgr=%p\n",
- d->boot1, d->bootmgr);
-#else
-/* Should be: error "Debug_Disk: unknown arch"; */
-#endif
-#else /* __ia64__ */
- printf(" media size=%lu, sector size=%lu\n", d->media_size,
- d->sector_size);
-#endif
-
- Debug_Chunk(d->chunks);
-}
-
-void
-Free_Disk(struct disk *d)
-{
- if (d->chunks)
- Free_Chunk(d->chunks);
- if (d->name)
- free(d->name);
-#ifdef PC98
- if (d->bootipl)
- free(d->bootipl);
- if (d->bootmenu)
- free(d->bootmenu);
-#else
-#if !defined(__ia64__)
- if (d->bootmgr)
- free(d->bootmgr);
-#endif
-#endif
-#if !defined(__ia64__)
- if (d->boot1)
- free(d->boot1);
-#endif
-#if defined(__i386__) || defined(__amd64__)
- if (d->boot2)
- free(d->boot2);
-#endif
- free(d);
-}
-
-#if 0
-void
-Collapse_Disk(struct disk *d)
-{
-
- while (Collapse_Chunk(d, d->chunks))
- ;
-}
-#endif
-
-static int
-qstrcmp(const void* a, const void* b)
-{
- const char *str1 = *(char* const*)a;
- const char *str2 = *(char* const*)b;
-
- return strcmp(str1, str2);
-}
-
-char **
-Disk_Names()
-{
- int disk_cnt;
- char **disks;
- int error;
- size_t listsize;
- char *disklist, *disk1, *disk2;
-
- error = sysctlbyname("kern.disks", NULL, &listsize, NULL, 0);
- if (error) {
- warn("kern.disks sysctl not available");
- return NULL;
- }
-
- if (listsize == 0)
- return (NULL);
-
- disks = malloc(sizeof *disks * (1 + MAX_NO_DISKS));
- if (disks == NULL)
- return NULL;
- disk1 = disklist = (char *)malloc(listsize + 1);
- if (disklist == NULL) {
- free(disks);
- return NULL;
- }
- memset(disks,0,sizeof *disks * (1 + MAX_NO_DISKS));
- memset(disklist, 0, listsize + 1);
- error = sysctlbyname("kern.disks", disklist, &listsize, NULL, 0);
- if (error || disklist[0] == 0) {
- free(disklist);
- free(disks);
- return NULL;
- }
- for (disk_cnt = 0; disk_cnt < MAX_NO_DISKS; disk_cnt++) {
- disk2 = strsep(&disk1, " ");
- if (disk2 == NULL)
- break;
- disks[disk_cnt] = strdup(disk2);
- if (disks[disk_cnt] == NULL) {
- for (disk_cnt--; disk_cnt >= 0; disk_cnt--)
- free(disks[disk_cnt]);
- free(disklist);
- free(disks);
- return (NULL);
- }
- }
- qsort(disks, disk_cnt, sizeof(char*), qstrcmp);
- free(disklist);
- return disks;
-}
-
-#ifdef PC98
-void
-Set_Boot_Mgr(struct disk *d, const u_char *bootipl, const size_t bootipl_size,
- const u_char *bootmenu, const size_t bootmenu_size)
-#else
-void
-Set_Boot_Mgr(struct disk *d, const u_char *b, const size_t s)
-#endif
-{
-#if !defined(__ia64__)
-#ifdef PC98
- if (d->sector_size == 0)
- return;
- if (bootipl_size % d->sector_size != 0)
- return;
- if (d->bootipl)
- free(d->bootipl);
- if (!bootipl) {
- d->bootipl = NULL;
- } else {
- d->bootipl_size = bootipl_size;
- d->bootipl = malloc(bootipl_size);
- if (!d->bootipl)
- return;
- memcpy(d->bootipl, bootipl, bootipl_size);
- }
-
- if (bootmenu_size % d->sector_size != 0)
- return;
- if (d->bootmenu)
- free(d->bootmenu);
- if (!bootmenu) {
- d->bootmenu = NULL;
- } else {
- d->bootmenu_size = bootmenu_size;
- d->bootmenu = malloc(bootmenu_size);
- if (!d->bootmenu)
- return;
- memcpy(d->bootmenu, bootmenu, bootmenu_size);
- }
-#else
- if (d->sector_size == 0)
- return;
- if (s % d->sector_size != 0)
- return;
- if (d->bootmgr)
- free(d->bootmgr);
- if (!b) {
- d->bootmgr = NULL;
- } else {
- d->bootmgr_size = s;
- d->bootmgr = malloc(s);
- if (!d->bootmgr)
- return;
- memcpy(d->bootmgr, b, s);
- }
-#endif
-#endif
-}
-
-int
-Set_Boot_Blocks(struct disk *d, const u_char *b1, const u_char *b2)
-{
-#if defined(__i386__) || defined(__amd64__)
- if (d->boot1)
- free(d->boot1);
- d->boot1 = malloc(512);
- if (!d->boot1)
- return -1;
- memcpy(d->boot1, b1, 512);
- if (d->boot2)
- free(d->boot2);
- d->boot2 = malloc(15 * 512);
- if (!d->boot2)
- return -1;
- memcpy(d->boot2, b2, 15 * 512);
-#elif defined(__alpha__)
- if (d->boot1)
- free(d->boot1);
- d->boot1 = malloc(15 * 512);
- if (!d->boot1)
- return -1;
- memcpy(d->boot1, b1, 15 * 512);
-#elif defined(__sparc64__)
- if (d->boot1 != NULL)
- free(d->boot1);
- d->boot1 = malloc(16 * 512);
- if (d->boot1 == NULL)
- return (-1);
- memcpy(d->boot1, b1, 16 * 512);
-#elif defined(__ia64__)
- /* nothing */
-#else
-/* Should be: #error "Set_Boot_Blocks: unknown arch"; */
-#endif
- return 0;
-}
-
-const char *
-slice_type_name( int type, int subtype )
-{
-
- switch (type) {
- case whole:
- return "whole";
- case mbr:
- switch (subtype) {
- case 1: return "fat (12-bit)";
- case 2: return "XENIX /";
- case 3: return "XENIX /usr";
- case 4: return "fat (16-bit,<=32Mb)";
- case 5: return "extended DOS";
- case 6: return "fat (16-bit,>32Mb)";
- case 7: return "NTFS/HPFS/QNX";
- case 8: return "AIX bootable";
- case 9: return "AIX data";
- case 10: return "OS/2 bootmgr";
- case 11: return "fat (32-bit)";
- case 12: return "fat (32-bit,LBA)";
- case 14: return "fat (16-bit,>32Mb,LBA)";
- case 15: return "extended DOS, LBA";
- case 18: return "Compaq Diagnostic";
- case 57: return "Plan 9";
- case 77: return "QNX 4.X";
- case 78: return "QNX 4.X 2nd part";
- case 79: return "QNX 4.X 3rd part";
- case 84: return "OnTrack diskmgr";
- case 100: return "Netware 2.x";
- case 101: return "Netware 3.x";
- case 115: return "SCO UnixWare";
- case 128: return "Minix 1.1";
- case 129: return "Minix 1.5";
- case 130: return "linux_swap";
- case 131: return "ext2fs";
- case 133: return "linux extended";
- case 166: return "OpenBSD FFS"; /* 0xA6 */
- case 168: return "Mac OS-X";
- case 169: return "NetBSD FFS"; /* 0xA9 */
- case 171: return "Mac OS-X Boot";
- case 182: return "OpenBSD"; /* dedicated */
- case 183: return "bsd/os";
- case 184: return "bsd/os swap";
- case 191: return "Solaris (new)";
- case 238: return "EFI GPT";
- case 239: return "EFI Sys. Part.";
- default: return "unknown";
- }
- case fat:
- return "fat";
- case freebsd:
- switch (subtype) {
-#ifdef PC98
- case 0xc494: return "freebsd";
-#else
- case 165: return "freebsd";
-#endif
- default: return "unknown";
- }
- case extended:
- return "extended";
- case part:
- return "part";
- case efi:
- return "efi";
- case unused:
- return "unused";
- default:
- return "unknown";
- }
-}
diff --git a/lib/libdisk/libdisk.3 b/lib/libdisk/libdisk.3
deleted file mode 100644
index 1b436e2..0000000
--- a/lib/libdisk/libdisk.3
+++ /dev/null
@@ -1,341 +0,0 @@
-.\"
-.\" Copyright (c) 1996 Joerg Wunsch
-.\"
-.\" All rights reserved.
-.\"
-.\" This program is free software.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\" "
-.Dd January 30, 2006
-.Dt LIBDISK 3
-.Os
-.Sh NAME
-.Nm Open_Disk ,
-.Nm Free_Disk ,
-.Nm Debug_Disk ,
-.Nm Set_Bios_Geom ,
-.Nm Delete_Chunk ,
-.Nm Collapse_Disk ,
-.Nm Collapse_Chunk ,
-.Nm Create_Chunk ,
-.Nm All_FreeBSD ,
-.Nm CheckRules ,
-.Nm Disk_Names ,
-.Nm Set_Boot_Mgr ,
-.Nm Set_Boot_Blocks ,
-.Nm Write_Disk ,
-.Nm Cyl_Aligned ,
-.Nm Next_Cyl_Aligned ,
-.Nm Prev_Cyl_Aligned ,
-.Nm Track_Aligned ,
-.Nm Next_Track_Aligned ,
-.Nm Prev_Track_Aligned ,
-.Nm Create_Chunk_DWIM ,
-.Nm MakeDev ,
-.Nm MakeDevDisk ,
-.Nm ShowChunkFlags ,
-.Nm chunk_name ,
-.Nm slice_type_name
-.Nd library interface to slice and partition labels
-.Sh LIBRARY
-.Lb libdisk
-.Sh SYNOPSIS
-.In sys/types.h
-.In libdisk.h
-.Pp
-.Ft struct disk *
-.Fn Open_Disk "const char *devname"
-.Ft void
-.Fn Free_Disk "struct disk *disk"
-.Ft void
-.Fn Debug_Disk "struct disk *disk"
-.Ft void
-.Fn Set_Bios_Geom "struct disk *disk" "u_long cyl" "u_long heads" "u_long sects"
-.Ft int
-.Fn Delete_Chunk "struct disk *disk" "struct chunk *"
-.Ft void
-.Fn Collapse_Disk "struct disk *disk"
-.Ft int
-.Fn Collapse_Chunk "struct disk *disk" "struct chunk *chunk"
-.Ft int
-.Fn Create_Chunk "struct disk *disk" "daddr_t offset" "daddr_t size" "chunk_e type" "int subtype" "u_long flags" "const char *sname"
-.Ft void
-.Fn All_FreeBSD "struct disk *d" "int force_all"
-.Ft char *
-.Fn CheckRules "const struct disk *"
-.Ft char **
-.Fn Disk_Names "void"
-.Ft void
-.Fn Set_Boot_Mgr "struct disk *d" "const u_char *bootmgr" "const size_t bootmgr_size"
-.Ft int
-.Fn Set_Boot_Blocks "struct disk *d" "const u_char *boot1" "const u_char *boot2"
-.Ft int
-.Fn Write_Disk "const struct disk *d"
-.Ft int
-.Fn Cyl_Aligned "struct disk *d" "daddr_t offset"
-.Ft daddr_t
-.Fn Next_Cyl_Aligned "const struct disk *d" "daddr_t offset"
-.Ft daddr_t
-.Fn Prev_Cyl_Aligned "const struct disk *d" "daddr_t offset"
-.Ft int
-.Fn Track_Aligned "const struct disk *d" "daddr_t offset"
-.Ft daddr_t
-.Fn Next_Track_Aligned "const struct disk *d" "daddr_t offset"
-.Ft daddr_t
-.Fn Prev_Track_Aligned "const struct disk *d" "daddr_t offset"
-.Ft struct chunk *
-.Fn Create_Chunk_DWIM "struct disk *d" "struct chunk *parent" "daddr_t size" "chunk_e type" "int subtype" "u_long flags"
-.Ft int
-.Fn MakeDev "struct chunk *c" "const char *path"
-.Ft int
-.Fn MakeDevDisk "struct disk *d" "const char *path"
-.Ft char *
-.Fn ShowChunkFlags "struct chunk *c"
-.Ft const char *
-.Fn chunk_name "chunk_e type"
-.Ft const char *
-.Fn slice_type_name "int type" "int subtype"
-.Sh DESCRIPTION
-.Bf Sy
-.Nm libdisk
-is just for the use of
-.Xr sysinstall 8 .
-You should consider using
-.Xr libgeom 3
-instead.
-.Ef
-.Pp
-The
-.Nm libdisk
-library provides an interface to the low-level disk slice and partition labels.
-Most functions operate with arguments of the types
-.Ql struct disk ,
-or
-.Ql struct chunk .
-.Pp
-While both types are mostly opaque to the programmer, the internal
-structure is mentioned below for the sake of completeness.
-.Bd -literal -offset indent
-struct disk {
- char *name;
- u_long flags;
- u_long bios_cyl;
- u_long bios_hd;
- u_long bios_sect;
- u_char *bootmgr;
- u_char *boot1;
- u_char *boot2;
- struct chunk *chunks;
- u_long sector_size;
-};
-.Ed
-The only flag value by now is
-.Ql DISK_ON_TRACK ,
-meaning that this disk is handled by the On-Track Disk Manager.
-.Bd -literal -offset indent
-struct chunk {
- struct chunk *next;
- struct chunk *part;
- struct disk *disk;
- daddr_t offset;
- daddr_t size;
- daddr_t end;
- char *name;
- char *oname;
- chunk_e type;
- int subtype;
- u_long flags;
- void (*private_free)(void*);
- void *(*private_clone)(void*);
- void *private_data;
-};
-.Ed
-The
-.Ql type
-field can be one of the following values:
-.Ql whole, unknown, fat, freebsd, extended, part, unused .
-.Pp
-These are the valid
-.Ql flags
-values for a
-.Ql struct chunk .
-.Bl -tag -offset indent -width CHUNK_AUTO_SIZEXX
-.It CHUNK_ALIGN
-This chunk should be aligned.
-.It CHUNK_IS_ROOT
-This
-.Ql part
-is a rootfs, allocate partition
-.Sq a .
-.It CHUNK_ACTIVE
-This is the active slice in the MBR.
-.It CHUNK_FORCE_ALL
-Force a dedicated disk for
-.Fx ,
-bypassing all BIOS geometry considerations.
-.It CHUNK_AUTO_SIZE
-This chunk was auto-sized and can fill out any deleted following chunks.
-.It CHUNK_NEWFS
-newfs pending, used to enable auto-resizing on delete (along with AUTO_SIZE).
-.El
-.Pp
-The
-.Ql private_data ,
-.Ql private_free ,
-and
-.Ql private_clone
-fields are for data private to the application, and the management
-thereof.
-If the functions are not provided, no storage management is
-done, cloning will just copy the pointer and freeing will just forget
-it.
-.Pp
-.Fn Open_Disk
-will open the named disk, and return populated tree.
-.Pp
-.Fn Free_Disk
-frees a tree made with
-.Fn Open_Disk
-or
-.Fn Clone_Disk .
-.Pp
-.Fn Debug_Disk
-prints the content of the tree to
-.Dv stdout .
-.Pp
-.Fn Set_Bios_Geom
-sets the geometry the bios uses.
-.Pp
-.Fn Delete_Chunk
-frees a chunk of disk_space.
-.Pp
-.Fn Collapse_Disk
-and
-.Fn Collapse_Chunk
-are experimental, do not use.
-.Pp
-.Fn Create_Chunk
-creates a chunk with the specified parameters.
-.Pp
-.Fn All_FreeBSD
-makes one
-.Fx
-chunk covering the entire disk; if
-.Ql force_all
-is set, bypass all BIOS geometry considerations.
-.Pp
-.Fn CheckRules
-returns
-.Ql char*
-to warnings about broken design rules in this disklayout.
-.Pp
-.Fn Disk_Names
-returns
-.Ql char**
-with all disk's names (wd0, wd1 ...).
-You must free each pointer, as
-well as the array by hand.
-.Pp
-.Fn Set_Boot_Mgr
-sets this boot-manager for use on this disk.
-Gets written when
-.Fn Write_Disk
-is called.
-.Pp
-.Fn Set_Boot_Blocks
-sets the boot-blocks for use on this disk.
-Gets written when
-.Fn Write_Disk
-is called.
-.Pp
-.Fn Write_Disk
-writes all the MBRs, disklabels, bootblocks and boot managers.
-.Pp
-.Fn Cyl_Aligned
-checks if
-.Ql offset
-is aligned on a cylinder according to the BIOS geometry.
-.Pp
-.Fn Next_Cyl_Aligned
-rounds
-.Ql offset
-up to next cylinder according to the BIOS geometry.
-.Pp
-.Fn Prev_Cyl_Aligned
-rounds
-.Ql offset
-down to previous cylinder according to the BIOS geometry.
-.Pp
-.Fn Track_Aligned
-checks if
-.Ql offset
-is aligned on a track according to the BIOS geometry.
-.Pp
-.Fn Next_Track_Aligned
-rounds
-.Ql offset
-up to next track according to the BIOS geometry.
-.Pp
-.Fn Prev_Track_Aligned
-rounds
-.Ql offset
-up to previous track according to the BIOS geometry.
-.Pp
-.Fn Create_Chunk_DWIM
-creates a partition inside the given parent of the given size, and
-returns a pointer to it.
-The first unused chunk big enough is used.
-.Pp
-.Fn MakeDev
-makes the device nodes for this chunk.
-.Pp
-.Fn MakeDevDisk
-makes the device nodes for all chunks on this disk.
-.Pp
-.Fn ShowChunkFlags
-returns a string to show flags.
-.Pp
-The
-.Fn chunk_name
-function takes the enumerated chunk type and returns its name.
-.Fn chunk_name
-replaces the old external array
-.Va chunk_n .
-.Pp
-.Fn slice_type_name
-returns the name strings associated with the specified
-.Ql type .
-.Ql subtype .
-If
-.Fn slice_type_name
-returns "unknown" for slices it is not familiar with.
-.Sh AUTHORS
-.An -nosplit
-The
-.Nm libdisk
-library was written by
-.An Poul-Henning Kamp .
-.Pp
-This manual page was written by
-.An J\(:org Wunsch .
diff --git a/lib/libdisk/libdisk.h b/lib/libdisk/libdisk.h
deleted file mode 100644
index a302c64..0000000
--- a/lib/libdisk/libdisk.h
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
-* ----------------------------------------------------------------------------
-* "THE BEER-WARE LICENSE" (Revision 42):
-* <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
-* can do whatever you want with this stuff. If we meet some day, and you think
-* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
-* ----------------------------------------------------------------------------
-*
-* $FreeBSD$
-*
-*/
-
-#ifndef _LIBDISK_H_
-#define _LIBDISK_H_
-
-/* #define DEBUG 1 */
-/* You can define a particular architecture here if you are debugging. */
-/* #define P_DEBUG p_sparc64 */
-
-#define MAX_NO_DISKS 32
-/* Max # of disks Disk_Names() will return */
-
-#define MAX_SEC_SIZE 2048 /* maximum sector size that is supported */
-#define MIN_SEC_SIZE 512 /* the sector size to end sensing at */
-
-enum platform {
- p_any, /* for debugging ! */
- p_alpha,
- p_i386,
- p_pc98,
- p_sparc64,
- p_ia64,
- p_ppc,
- p_amd64,
- p_arm,
- p_mips
-};
-extern const enum platform platform;
-
-typedef enum {
- whole,
- unknown,
-
- sun,
- pc98,
- mbr,
- gpt,
-
- efi,
- fat,
- freebsd,
- extended,
- part,
- spare,
- unused,
-
- apple
-} chunk_e;
-
-__BEGIN_DECLS
-#ifndef __ia64__
-struct disk {
- char *name;
- u_long bios_cyl;
- u_long bios_hd;
- u_long bios_sect;
-#ifdef PC98
- u_char *bootipl;
- size_t bootipl_size;
- u_char *bootmenu;
- size_t bootmenu_size;
-#else
- u_char *bootmgr;
- size_t bootmgr_size;
-#endif
- u_char *boot1;
-#if defined(__i386__) || defined(__amd64__) /* the i386 needs extra help... */
- u_char *boot2;
-#endif
- struct chunk *chunks;
- u_long sector_size; /* media sector size, a power of 2 */
-};
-#else /* !__ia64__ */
-struct disk {
- char *name;
- struct chunk *chunks;
- u_long media_size;
- u_long sector_size;
- u_long lba_start;
- u_long lba_end;
- u_int gpt_size; /* Number of entries */
-};
-#endif
-
-struct chunk {
- struct chunk *next;
- struct chunk *part;
- struct disk *disk;
- daddr_t offset;
- daddr_t size;
- daddr_t end;
- char *sname; /* PC98 field */
- char *name;
- char *oname;
- /* Used during Fixup_Names() to avoid renaming more than
- * absolutely needed.
- */
- chunk_e type;
- int subtype;
- u_long flags;
- void (*private_free)(void*);
- void *(*private_clone)(void*);
- void *private_data;
- /* For data private to the application, and the management
- * thereof. If the functions are not provided, no storage
- * management is done, Cloning will just copy the pointer
- * and freeing will just forget it.
- */
-};
-
-/*
- * flags:
- *
- * ALIGN - This chunk should be aligned
- * IS_ROOT - This 'part' is a rootfs, allocate 'a'
- * ACTIVE - This is the active slice in the MBR
- * FORCE_ALL - Force a dedicated disk for FreeBSD, bypassing
- * all BIOS geometry considerations
- * AUTO_SIZE - This chunk was auto-sized and can fill-out a
- * following chunk if the following chunk is deleted.
- * NEWFS - newfs pending, used to enable auto-resizing on
- * delete (along with AUTO_SIZE).
- */
-
-#define CHUNK_ALIGN 0x0008
-#define CHUNK_IS_ROOT 0x0010
-#define CHUNK_ACTIVE 0x0020
-#define CHUNK_FORCE_ALL 0x0040
-#define CHUNK_AUTO_SIZE 0x0080
-#define CHUNK_NEWFS 0x0100
-#define CHUNK_HAS_INDEX 0x0200
-#define CHUNK_ITOF(i) ((i & 0xFFFF) << 16)
-#define CHUNK_FTOI(f) ((f >> 16) & 0xFFFF)
-
-#define DELCHUNK_NORMAL 0x0000
-#define DELCHUNK_RECOVER 0x0001
-
-const char *chunk_name(chunk_e);
-
-const char *
-slice_type_name(int, int);
-/* "chunk_n" for subtypes too */
-
-struct disk *
-Open_Disk(const char *);
-/* Will open the named disk, and return populated tree. */
-
-void
-Free_Disk(struct disk *);
-/* Free a tree made with Open_Disk() or Clone_Disk() */
-
-void
-Debug_Disk(struct disk *);
-/* Print the content of the tree to stdout */
-
-void
-Set_Bios_Geom(struct disk *, u_long, u_long, u_long);
-/* Set the geometry the bios uses. */
-
-void
-Sanitize_Bios_Geom(struct disk *);
-/* Set the bios geometry to something sane */
-
-int
-Insert_Chunk(struct chunk *, daddr_t, daddr_t, const char *, chunk_e, int,
- u_long, const char *);
-
-int
-Delete_Chunk2(struct disk *, struct chunk *, int);
-/* Free a chunk of disk_space modified by the passed flags. */
-
-int
-Delete_Chunk(struct disk *, struct chunk *);
-/* Free a chunk of disk_space */
-
-void
-Collapse_Disk(struct disk *);
-/* Experimental, do not use. */
-
-int
-Collapse_Chunk(struct disk *, struct chunk *);
-/* Experimental, do not use. */
-
-int
-Create_Chunk(struct disk *, daddr_t, daddr_t, chunk_e, int, u_long, const char *);
-/* Create a chunk with the specified paramters */
-
-void
-All_FreeBSD(struct disk *, int);
-/*
- * Make one FreeBSD chunk covering the entire disk;
- * if force_all is set, bypass all BIOS geometry
- * considerations.
- */
-
-char *
-CheckRules(const struct disk *);
-/* Return char* to warnings about broken design rules in this disklayout */
-
-char **
-Disk_Names(void);
-/*
- * Return char** with all disk's names (wd0, wd1 ...). You must free
- * each pointer, as well as the array by hand
- */
-
-#ifdef PC98
-void
-Set_Boot_Mgr(struct disk *, const u_char *, const size_t, const u_char *,
- const size_t);
-#else
-void
-Set_Boot_Mgr(struct disk *, const u_char *, const size_t);
-#endif
-/*
- * Use this boot-manager on this disk. Gets written when Write_Disk()
- * is called
- */
-
-int
-Set_Boot_Blocks(struct disk *, const u_char *, const u_char *);
-/*
- * Use these boot-blocks on this disk. Gets written when Write_Disk()
- * is called. Returns nonzero upon failure.
- */
-
-int
-Write_Disk(const struct disk *);
-/* Write all the MBRs, disklabels, bootblocks and boot managers */
-
-daddr_t
-Next_Cyl_Aligned(const struct disk *, daddr_t);
-/* Round offset up to next cylinder according to the bios-geometry */
-
-daddr_t
-Prev_Cyl_Aligned(const struct disk *, daddr_t);
-/* Round offset down to previous cylinder according to the bios-geometry */
-
-int
-Track_Aligned(const struct disk *, daddr_t);
-/* Check if offset is aligned on a track according to the bios geometry */
-
-daddr_t
-Next_Track_Aligned(const struct disk *, daddr_t);
-/* Round offset up to next track according to the bios-geometry */
-
-daddr_t
-Prev_Track_Aligned(const struct disk *, daddr_t);
-/* Check if offset is aligned on a track according to the bios geometry */
-
-struct chunk *
-Create_Chunk_DWIM(struct disk *, struct chunk *, daddr_t, chunk_e, int,
- u_long);
-/*
- * This one creates a partition inside the given parent of the given
- * size, and returns a pointer to it. The first unused chunk big
- * enough is used.
- */
-
-char *
-ShowChunkFlags(struct chunk *);
-/* Return string to show flags. */
-
-/*
- * Implementation details >>> DO NOT USE <<<
- */
-
-struct disklabel;
-
-void Fill_Disklabel(struct disklabel *, const struct disk *,
- const struct chunk *);
-void Debug_Chunk(struct chunk *);
-struct chunk *New_Chunk(void);
-void Free_Chunk(struct chunk *);
-struct chunk *Clone_Chunk(const struct chunk *);
-int Add_Chunk(struct disk *, daddr_t, daddr_t, const char *, chunk_e, int,
- u_long, const char *);
-void *read_block(int, daddr_t, u_long);
-int write_block(int, daddr_t, const void *, u_long);
-struct disklabel *read_disklabel(int, daddr_t, u_long);
-struct disk *Int_Open_Disk(const char *, char *);
-int Fixup_Names(struct disk *);
-int MakeDevChunk(const struct chunk *, const char *);
-__END_DECLS
-
-/* TODO
- *
- * Need an error string mechanism from the functions instead of warn()
- *
- * Make sure only FreeBSD start at offset==0
- *
- * Collapse must align.
- *
- * Make Write_Disk(struct disk*)
- *
- * Consider booting from OnTrack'ed disks.
- *
- * Get Bios-geom, ST506 & OnTrack from driver (or otherwise)
- *
- * Make Create_DWIM().
- *
- * Make Is_Unchanged(struct disk *d1, struct chunk *c1)
- *
- * don't rename slices unless we have to
- *
- *Sample output from tst01:
- *
- * Debug_Disk(wd0) flags=0 bios_geom=0/0/0
- * >> 0x3d040 0 1411200 1411199 wd0 0 whole 0 0
- * >>>> 0x3d080 0 960120 960119 wd0s1 3 freebsd 0 8
- * >>>>>> 0x3d100 0 40960 40959 wd0s1a 5 part 0 0
- * >>>>>> 0x3d180 40960 131072 172031 wd0s1b 5 part 0 0
- * >>>>>> 0x3d1c0 172032 409600 581631 wd0s1e 5 part 0 0
- * >>>>>> 0x3d200 581632 378488 960119 wd0s1f 5 part 0 0
- * >>>> 0x3d140 960120 5670 965789 wd0s2 4 extended 0 8
- * >>>>>> 0x3d2c0 960120 63 960182 - 6 unused 0 0
- * >>>>>> 0x3d0c0 960183 5607 965789 wd0s5 2 fat 0 8
- * >>>> 0x3d280 965790 1890 967679 wd0s3 1 foo -2 8
- * >>>> 0x3d300 967680 443520 1411199 wd0s4 3 freebsd 0 8
- * >>>>>> 0x3d340 967680 443520 1411199 wd0s4a 5 part 0 0
- *
- * ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
- * level chunkptr start size end name type subtype flags
- *
- * Underlying data structure:
- *
- * Legend:
- * <struct chunk> --> part
- * |
- * v next
- *
- * <wd0> --> <wd0s1> --> <wd0s1a>
- * | |
- * | v
- * | <wd0s1b>
- * | |
- * | v
- * | <wd0s1e>
- * | |
- * | v
- * | <wd0s1f>
- * |
- * v
- * <wd0s2> --> <unused>
- * | |
- * | v
- * | <wd0s5>
- * |
- * v
- * <wd0s3>
- * |
- * v
- * <wd0s4> --> <wd0s4a>
- *
- *
- */
-
-#endif /* _LIBDISK_H_ */
diff --git a/lib/libdisk/open_disk.c b/lib/libdisk/open_disk.c
deleted file mode 100644
index 6cc9acb..0000000
--- a/lib/libdisk/open_disk.c
+++ /dev/null
@@ -1,311 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#include <inttypes.h>
-#include <err.h>
-#include <sys/sysctl.h>
-#include <sys/stdint.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/disklabel.h>
-#include <sys/gpt.h>
-#include <paths.h>
-#include "libdisk.h"
-
-#include <ctype.h>
-#include <errno.h>
-#include <assert.h>
-
-#ifdef DEBUG
-#define DPRINT(x) warn x
-#define DPRINTX(x) warnx x
-#else
-#define DPRINT(x)
-#define DPRINTX(x)
-#endif
-
-struct disk *
-Int_Open_Disk(const char *name, char *conftxt)
-{
- struct disk *d;
- int i, line = 1;
- char *p, *q, *r, *a, *b, *n, *t, *sn;
- daddr_t o, len, off;
- u_int l, s, ty, sc, hd, alt;
- daddr_t lo[10];
-
- /*
- * Locate the disk (by name) in our sysctl output
- */
- for (p = conftxt; p != NULL && *p; p = strchr(p, '\n'), line++) {
- if (*p == '\n')
- p++;
- a = strsep(&p, " ");
- /* Skip anything not with index 0 */
- if (strcmp(a, "0"))
- continue;
-
- /* Skip anything not a disk */
- a = strsep(&p, " ");
- if (strcmp(a, "DISK"))
- continue;
-
- a = strsep(&p, " ");
- if (strcmp(a, name))
- continue;
- break;
- }
-
- q = strchr(p, '\n');
- if (q != NULL)
- *q++ = '\0';
-
- d = (struct disk *)calloc(sizeof *d, 1);
- if(d == NULL)
- return NULL;
-
- d->name = strdup(name);
-
- a = strsep(&p, " "); /* length in bytes */
- len = strtoimax(a, &r, 0);
- if (*r) {
- printf("libdisk: Int_Open_Disk(%s): can't parse length in line %d (r='%s')\n",
- name, line, r);
- return NULL;
- }
-
- a = strsep(&p, " "); /* sectorsize */
- s = strtoul(a, &r, 0);
- if (*r) {
- printf("libdisk: Int_Open_Disk(%s): can't parse sector size in line %d (r='%s')\n",
- name, line, r);
- return NULL;
- }
-
- if (s == 0)
- return (NULL);
- d->sector_size = s;
- len /= s; /* media size in number of sectors. */
-
- if (Add_Chunk(d, 0, len, name, whole, 0, 0, "-")) {
- DPRINT(("Failed to add 'whole' chunk"));
- }
-
- /* Try to parse any fields after the sector size in the DISK entry line */
- for (;;) {
- a = strsep(&p, " ");
- if (a == NULL)
- break;
- b = strsep(&p, " ");
- o = strtoimax(b, &r, 0);
- if (*r) {
- printf("libdisk: Int_Open_Disk(%s): can't parse parameter '%s' in line %d (r='%s')\n",
- name, a, line, r);
- return NULL;
- }
- if (!strcmp(a, "hd"))
- d->bios_hd = o;
- else if (!strcmp(a, "sc"))
- d->bios_sect = o;
- else
- printf("libdisk: Int_Open_Disk(%s): unknown parameter '%s' with value '%s' in line %d, ignored\n",
- name, a, b, line);
- }
-
- /* Sanitize the parameters. */
- Sanitize_Bios_Geom(d);
-
- /*
- * Calculate the number of cylinders this disk must have. If we have
- * an obvious insanity, we set the number of cylinders to zero.
- */
- o = d->bios_hd * d->bios_sect;
- d->bios_cyl = (o != 0) ? len / o : 0;
-
- p = q; line++; /* p is now the start of the line _after_ the DISK entry */
- lo[0] = 0;
-
- for (; p != NULL && *p; p = q, line++) {
- sn = NULL;
- q = strchr(p, '\n');
- if (q != NULL)
- *q++ = '\0';
- a = strsep(&p, " "); /* Index */
- /*
- * If we find index 0 again, this means we've encountered another disk, so it's safe to assume this disk
- * has been processed.
- */
- if (!strcmp(a, "0"))
- break;
- l = strtoimax(a, &r, 0);
- if (*r) {
- printf("libdisk: Int_Open_Disk(%s): can't parse depth '%s' in line %d (r='%s')\n",
- name, a, line, r);
- return NULL;
-
- }
- t = strsep(&p, " "); /* Type {SUN, BSD, MBR, PC98, GPT} */
- n = strsep(&p, " "); /* name */
- a = strsep(&p, " "); /* len */
- len = strtoimax(a, &r, 0);
- if (*r) {
- printf("libdisk: Int_Open_Disk(%s): can't parse length '%s' in line %d (r='%s')\n",
- name, a, line, r);
- continue;
- }
- a = strsep(&p, " "); /* secsize */
- s = strtoimax(a, &r, 0);
- if (*r) {
- printf("libdisk: Int_Open_Disk(%s): can't parse sector size '%s' in line %d (r='%s')\n",
- name, a, line, r);
- continue;
- }
- for (;;) {
- a = strsep(&p, " ");
- if (a == NULL)
- break;
- /* XXX: Slice name may include a space. */
- if (!strcmp(a, "sn")) {
- sn = p;
- break;
- }
- b = strsep(&p, " ");
- o = strtoimax(b, &r, 0);
- /* APPLE have ty as a string */
- if ((*r) && strcmp(t, "APPLE") &&
- strcmp(t, "GPT") && strcmp(t, "PART")) {
- printf("libdisk: Int_Open_Disk(%s): can't parse parameter '%s' in line %d (r='%s')\n",
- name, a, line, r);
- break;
- }
- if (!strcmp(a, "o"))
- off = o;
- else if (!strcmp(a, "i"))
- i = (!strcmp(t, "PART")) ? o - 1 : o;
- else if (!strcmp(a, "ty"))
- ty = o;
- else if (!strcmp(a, "sc"))
- sc = o;
- else if (!strcmp(a, "hd"))
- hd = o;
- else if (!strcmp(a, "alt"))
- alt = o;
- else if (!strcmp(a, "xs"))
- t = b;
- else if (!strcmp(a, "xt")) {
- if (*r)
- sn = b;
- else
- ty = o;
- }
- }
-
- /* PLATFORM POLICY BEGIN ----------------------------------- */
- if (platform == p_sparc64 && !strcmp(t, "SUN") && i == 2)
- continue;
- if (platform == p_sparc64 && !strcmp(t, "SUN") &&
- d->chunks->part->part == NULL) {
- d->bios_hd = hd;
- d->bios_sect = sc;
- o = d->chunks->size / (hd * sc);
- o *= (hd * sc);
- o -= alt * hd * sc;
- if (Add_Chunk(d, 0, o, name, freebsd, 0, 0, "-")) {
- DPRINT(("Failed to add 'freebsd' chunk"));
- }
- }
- if (platform == p_alpha && !strcmp(t, "BSD") &&
- d->chunks->part->part == NULL) {
- if (Add_Chunk(d, 0, d->chunks->size, name, freebsd,
- 0, 0, "-")) {
- DPRINT(("Failed to add 'freebsd' chunk"));
- }
- }
- if (!strcmp(t, "BSD") && i == RAW_PART)
- continue;
- /* PLATFORM POLICY END ------------------------------------- */
-
- off /= s;
- len /= s;
- off += lo[l - 1];
- lo[l] = off;
- if (!strcmp(t, "SUN"))
- i = Add_Chunk(d, off, len, n, part, 0, 0, 0);
- else if (!strncmp(t, "MBR", 3)) {
- switch (ty) {
- case 0xa5:
- i = Add_Chunk(d, off, len, n, freebsd, ty, 0, 0);
- break;
- case 0x01:
- case 0x04:
- case 0x06:
- case 0x0b:
- case 0x0c:
- case 0x0e:
- i = Add_Chunk(d, off, len, n, fat, ty, 0, 0);
- break;
- case 0xef: /* EFI */
- i = Add_Chunk(d, off, len, n, efi, ty, 0, 0);
- break;
- default:
- i = Add_Chunk(d, off, len, n, mbr, ty, 0, 0);
- break;
- }
- } else if (!strcmp(t, "BSD"))
- i = Add_Chunk(d, off, len, n, part, ty, 0, 0);
- else if (!strcmp(t, "PC98")) {
- switch (ty & 0x7f) {
- case 0x14:
- i = Add_Chunk(d, off, len, n, freebsd, ty, 0,
- sn);
- break;
- case 0x20:
- case 0x21:
- case 0x22:
- case 0x23:
- case 0x24:
- i = Add_Chunk(d, off, len, n, fat, ty, 0, sn);
- break;
- default:
- i = Add_Chunk(d, off, len, n, pc98, ty, 0, sn);
- break;
- }
- } else if (!strcmp(t, "GPT"))
- i = Add_Chunk(d, off, len, n, gpt, 0, 0, b);
- else if (!strcmp(t, "APPLE"))
- i = Add_Chunk(d, off, len, n, apple, 0, 0, sn);
- else
- ; /* Ignore unknown classes. */
- }
- /* PLATFORM POLICY BEGIN ------------------------------------- */
- /* We have a chance to do things on a blank disk here */
- if (platform == p_sparc64 && d->chunks->part->part == NULL) {
- hd = d->bios_hd;
- sc = d->bios_sect;
- o = d->chunks->size / (hd * sc);
- o *= (hd * sc);
- o -= 2 * hd * sc;
- if (Add_Chunk(d, 0, o, name, freebsd, 0, 0, "-")) {
- DPRINT(("Failed to add 'freebsd' chunk"));
- }
- }
- /* PLATFORM POLICY END --------------------------------------- */
-
- return (d);
- i = 0;
-}
diff --git a/lib/libdisk/open_ia64_disk.c b/lib/libdisk/open_ia64_disk.c
deleted file mode 100644
index 287757d..0000000
--- a/lib/libdisk/open_ia64_disk.c
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright (c) 2003 Marcel Moolenaar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/types.h>
-#include <sys/disklabel.h>
-#include <sys/diskmbr.h>
-#include <sys/gpt.h>
-#include <sys/uuid.h>
-
-#include <fcntl.h>
-#include <inttypes.h>
-#include <paths.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "libdisk.h"
-
-static struct disk *
-parse_disk(char *conftxt, const char *name)
-{
- char devname[64];
- struct disk *disk;
- struct dos_partition *part;
- struct gpt_hdr *gpt;
- char *buffer, *p, *q;
- int fd, i;
-
- disk = (struct disk *)calloc(sizeof *disk, 1);
- if (disk == NULL)
- return (NULL);
-
- disk->name = strdup(name);
- p = strsep(&conftxt, " "); /* media size */
- disk->media_size = strtoimax(p, &q, 0);
- if (*q)
- goto fail;
-
- p = strsep(&conftxt, " "); /* sector size */
- disk->sector_size = strtoul(p, &q, 0);
- if (*q)
- goto fail;
-
- if (disk->sector_size == 0)
- disk->sector_size = 512;
-
- if (disk->media_size % disk->sector_size)
- goto fail;
-
- /*
- * We need to read the disk to get GPT specific information.
- */
-
- snprintf(devname, sizeof(devname), "%s%s", _PATH_DEV, name);
- fd = open(devname, O_RDONLY);
- if (fd == -1)
- goto fail;
- buffer = malloc(2 * disk->sector_size);
- if (buffer == NULL) {
- close (fd);
- goto fail;
- }
- if (read(fd, buffer, 2 * disk->sector_size) == -1) {
- free(buffer);
- close(fd);
- goto fail;
- }
- close(fd);
-
- gpt = (struct gpt_hdr *)(buffer + disk->sector_size);
- if (memcmp(gpt->hdr_sig, GPT_HDR_SIG, sizeof(gpt->hdr_sig))) {
- /*
- * No GPT present. Check if the MBR is empty (if present)
- * or is a PMBR before declaring this disk as empty. If
- * the MBR isn't empty, bail out. Let's not risk nuking a
- * disk.
- */
- if (*(u_short *)(buffer + DOSMAGICOFFSET) == DOSMAGIC) {
- for (i = 0; i < 4; i++) {
- part = (struct dos_partition *)
- (buffer + DOSPARTOFF + i * DOSPARTSIZE);
- if (part->dp_typ != 0 &&
- part->dp_typ != DOSPTYP_PMBR)
- break;
- }
- if (i < 4) {
- free(buffer);
- goto fail;
- }
- }
- disk->gpt_size = 128;
- disk->lba_start = (disk->gpt_size * sizeof(struct gpt_ent)) /
- disk->sector_size + 2;
- disk->lba_end = (disk->media_size / disk->sector_size) -
- disk->lba_start;
- } else {
- disk->lba_start = gpt->hdr_lba_start;
- disk->lba_end = gpt->hdr_lba_end;
- disk->gpt_size = gpt->hdr_entries;
- }
- free(buffer);
- Add_Chunk(disk, disk->lba_start, disk->lba_end - disk->lba_start + 1,
- name, whole, 0, 0, "-");
- return (disk);
-
-fail:
- free(disk->name);
- free(disk);
- return (NULL);
-}
-
-struct disk *
-Int_Open_Disk(const char *name, char *conftxt)
-{
- struct chunk chunk;
- struct disk *disk;
- char *p, *q, *r, *s, *sd;
- u_long i;
-
- p = conftxt;
- while (p != NULL && *p != 0) {
- q = strsep(&p, " ");
- if (strcmp(q, "0") == 0) {
- q = strsep(&p, " ");
- if (strcmp(q, "DISK") == 0) {
- q = strsep(&p, " ");
- if (strcmp(q, name) == 0)
- break;
- }
- }
- p = strchr(p, '\n');
- if (p != NULL && *p == '\n')
- p++;
- conftxt = p;
- }
- if (p == NULL || *p == 0)
- return (NULL);
-
- conftxt = strchr(p, '\n');
- if (conftxt != NULL)
- *conftxt++ = '\0';
-
- disk = parse_disk(p, name);
- if (disk == NULL)
- return (NULL);
-
- while (conftxt != NULL && *conftxt != 0) {
- p = conftxt;
- conftxt = strchr(p, '\n');
- if (conftxt != NULL)
- *conftxt++ = '\0';
-
- /*
- * 1 PART da0p4 34359738368 512
- * i 4 o 52063912960 ty freebsd-ufs
- * xs GPT xt 516e7cb6-6ecf-11d6-8ff8-00022d09712b
- */
- sd = strsep(&p, " "); /* depth */
- if (strcmp(sd, "0") == 0)
- break;
-
- q = strsep(&p, " "); /* type */
- if (strcmp(q, "PART") != 0)
- continue;
-
- chunk.name = strsep(&p, " "); /* name */
-
- q = strsep(&p, " "); /* length */
- i = strtoimax(q, &r, 0);
- if (*r)
- abort();
- chunk.end = i / disk->sector_size;
-
- q = strsep(&p, " "); /* sector size */
-
- for (;;) {
- q = strsep(&p, " ");
- if (q == NULL)
- break;
- r = strsep(&p, " ");
- i = strtoimax(r, &s, 0);
- if (strcmp(q, "ty") == 0 && *s != '\0') {
- if (!strcmp(r, "efi"))
- chunk.type = efi;
- else if (!strcmp(r, "freebsd")) {
- chunk.type = freebsd;
- chunk.subtype = 0xa5;
- } else if (!strcmp(r, "freebsd-swap")) {
- chunk.type = part;
- chunk.subtype = FS_SWAP;
- } else if (!strcmp(r, "freebsd-ufs")) {
- chunk.type = part;
- chunk.subtype = FS_BSDFFS;
- } else {
- chunk.type = part;
- chunk.subtype = FS_OTHER;
- }
- } else {
- if (!strcmp(q, "o"))
- chunk.offset = i / disk->sector_size;
- else if (!strcmp(q, "i"))
- chunk.flags = CHUNK_ITOF(i) |
- CHUNK_HAS_INDEX;
- }
- }
-
- Add_Chunk(disk, chunk.offset, chunk.end, chunk.name,
- chunk.type, chunk.subtype, chunk.flags, 0);
- }
-
- return (disk);
-}
diff --git a/lib/libdisk/rules.c b/lib/libdisk/rules.c
deleted file mode 100644
index 1f12f4c..0000000
--- a/lib/libdisk/rules.c
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/types.h>
-#include <sys/stdint.h>
-#include <sys/disklabel.h>
-#ifdef PC98
-#include <sys/diskpc98.h>
-#else
-#include <sys/diskmbr.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include "libdisk.h"
-
-int
-Track_Aligned(const struct disk *d, daddr_t offset)
-{
-#ifndef __ia64__
- if (!d->bios_sect)
- return 1;
- if (offset % d->bios_sect)
- return 0;
-#endif /* __ia64__ */
- return 1;
-}
-
-daddr_t
-Prev_Track_Aligned(const struct disk *d, daddr_t offset)
-{
-#ifndef __ia64__
- if (!d->bios_sect)
- return offset;
- return (offset / d->bios_sect) * d->bios_sect;
-#else
- return 1;
-#endif
-}
-
-daddr_t
-Next_Track_Aligned(const struct disk *d, daddr_t offset)
-{
-#ifndef __ia64__
- if (!d->bios_sect)
- return offset;
- return Prev_Track_Aligned(d, offset + d->bios_sect-1);
-#else
- return 1;
-#endif
-}
-
-static int
-Cyl_Aligned(const struct disk *d, daddr_t offset)
-{
-#ifndef __ia64__
- if (!d->bios_sect || !d->bios_hd)
- return 1;
- if (offset % (d->bios_sect * d->bios_hd))
- return 0;
-#endif
- return 1;
-}
-
-daddr_t
-Prev_Cyl_Aligned(const struct disk *d, daddr_t offset)
-{
-#ifndef __ia64__
- if (!d->bios_sect || !d->bios_hd)
- return offset;
- return (offset / (d->bios_sect * d->bios_hd)) * d->bios_sect *
- d->bios_hd;
-#else
- return 1;
-#endif
-}
-
-daddr_t
-Next_Cyl_Aligned(const struct disk *d, daddr_t offset)
-{
-#ifndef __ia64__
- if (!d->bios_sect || !d->bios_hd)
- return offset;
- return Prev_Cyl_Aligned(d,offset + (d->bios_sect * d->bios_hd) - 1);
-#else
- return 1;
-#endif
-}
-
-/*
- * Rule#0:
- * Chunks of type 'whole' can have max NDOSPART children.
- * Only one of them can have the "active" flag
- */
-static void
-Rule_000(__unused const struct disk *d, const struct chunk *c, char *msg)
-{
-#ifdef PC98
- int i = 0;
-#else
- int i = 0, j = 0;
-#endif
- struct chunk *c1;
-
- if (c->type != whole)
- return;
- for (c1 = c->part; c1; c1 = c1->next) {
- if (c1->type != unused)
- continue;
-#ifndef PC98
- if (c1->flags & CHUNK_ACTIVE)
- j++;
-#endif
- i++;
- }
- if (i > NDOSPART)
- sprintf(msg + strlen(msg),
- "%d is too many children of the 'whole' chunk."
- " Max is %d\n", i, NDOSPART);
-#ifndef PC98
- if (j > 1)
- sprintf(msg + strlen(msg),
- "Too many active children of 'whole'");
-#endif
-}
-
-/*
- * Rule#1:
- * All children of 'whole' and 'extended' must be track-aligned.
- * Exception: the end can be unaligned if it matches the end of 'whole'
- */
-static void
-Rule_001(const struct disk *d, const struct chunk *c, char *msg)
-{
- struct chunk *c1;
-
- if (c->type != whole && c->type != extended)
- return;
- for (c1 = c->part; c1; c1 = c1->next) {
- if (c1->type == unused)
- continue;
- c1->flags |= CHUNK_ALIGN;
-#ifdef PC98
- if (!Cyl_Aligned(d, c1->offset))
-#else
- if (!Track_Aligned(d, c1->offset))
-#endif
- sprintf(msg + strlen(msg),
-#ifdef PC98
- "chunk '%s' [%jd..%jd] does not start"
- " on a cylinder boundary\n",
-#else
- "chunk '%s' [%jd..%jd] does not start"
- " on a track boundary\n",
-#endif
- c1->name, (intmax_t)c1->offset, (intmax_t)c1->end);
- if ((c->type == whole || c->end == c1->end)
- || Cyl_Aligned(d, c1->end + 1))
- ;
- else
- sprintf(msg + strlen(msg),
- "chunk '%s' [%jd..%jd] does not end"
- " on a cylinder boundary\n",
- c1->name, (intmax_t)c1->offset, (intmax_t)c1->end);
- }
-}
-
-/*
- * Rule#2:
- * Max one 'fat' as child of 'whole'
- */
-static void
-Rule_002(__unused const struct disk *d, const struct chunk *c, char *msg)
-{
- int i;
- struct chunk *c1;
-
- if (c->type != whole)
- return;
- for (i = 0, c1 = c->part; c1; c1 = c1->next) {
- if (c1->type != fat)
- continue;
- i++;
- }
- if (i > 1) {
- sprintf(msg + strlen(msg),
- "Max one 'fat' allowed as child of 'whole'\n");
- }
-}
-
-/*
- * Rule#3:
- * Max one extended as child of 'whole'
- */
-static void
-Rule_003(__unused const struct disk *d, const struct chunk *c, char *msg)
-{
- int i;
- struct chunk *c1;
-
- if (c->type != whole)
- return;
- for (i = 0, c1 = c->part; c1; c1 = c1->next) {
- if (c1->type != extended)
- continue;
- i++;
- }
- if (i > 1) {
- sprintf(msg + strlen(msg),
- "Max one 'extended' allowed as child of 'whole'\n");
- }
-}
-
-/*
- * Rule#4:
- * Max seven 'part' as children of 'freebsd'
- * Max one CHUNK_IS_ROOT child per 'freebsd'
- */
-static void
-Rule_004(__unused const struct disk *d, const struct chunk *c, char *msg)
-{
- int i = 0, k = 0;
- struct chunk *c1;
-
- if (c->type != freebsd)
- return;
-
- for (c1 = c->part; c1; c1 = c1->next) {
- if (c1->type != part)
- continue;
- if (c1->flags & CHUNK_IS_ROOT)
- k++;
- i++;
- }
- if (i > 7) {
- sprintf(msg + strlen(msg),
- "Max seven partitions per freebsd slice\n");
- }
- if (k > 1) {
- sprintf(msg + strlen(msg),
- "Max one root partition child per freebsd slice\n");
- }
-}
-
-static void
-Check_Chunk(const struct disk *d, const struct chunk *c, char *msg)
-{
-
- switch (platform) {
- case p_i386:
- case p_amd64:
- Rule_000(d, c, msg);
- Rule_001(d, c, msg);
- Rule_002(d, c, msg);
- Rule_003(d, c, msg);
- Rule_004(d, c, msg);
- if (c->part)
- Check_Chunk(d, c->part, msg);
- if (c->next)
- Check_Chunk(d, c->next, msg);
- break;
- case p_pc98:
- Rule_000(d, c, msg);
- Rule_001(d, c, msg);
- Rule_004(d, c, msg);
- if (c->part)
- Check_Chunk(d, c->part, msg);
- if (c->next)
- Check_Chunk(d, c->next, msg);
- break;
- default:
- break;
- }
-}
-
-char *
-CheckRules(const struct disk *d)
-{
- char msg[BUFSIZ];
-
- *msg = '\0';
- Check_Chunk(d, d->chunks, msg);
- if (*msg)
- return strdup(msg);
- return 0;
-}
diff --git a/lib/libdisk/tst01.c b/lib/libdisk/tst01.c
deleted file mode 100644
index 7bb7579..0000000
--- a/lib/libdisk/tst01.c
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#include <err.h>
-#ifdef READLINE
-#include <readline/readline.h>
-#include <readline/history.h>
-#endif
-#include <sys/types.h>
-#include <paths.h>
-#include "libdisk.h"
-
-#ifndef PC98
-u_char mbrboot[] = {
-250,51,192,142,208,188,0,124,139,244,80,7,80,31,251,252,191,0,6,185,0,1,
-242,165,234,29,6,0,0,190,190,7,179,4,128,60,128,116,14,128,60,0,117,28,
-131,198,16,254,203,117,239,205,24,139,20,139,76,2,139,238,131,198,16,254,
-203,116,26,128,60,0,116,244,190,139,6,172,60,0,116,11,86,187,7,0,180,14,
-205,16,94,235,240,235,254,191,5,0,187,0,124,184,1,2,87,205,19,95,115,12,
-51,192,205,19,79,117,237,190,163,6,235,211,190,194,6,191,254,125,129,61,
-85,170,117,199,139,245,234,0,124,0,0,73,110,118,97,108,105,100,32,112,97,
-114,116,105,116,105,111,110,32,116,97,98,108,101,0,69,114,114,111,114,32,
-108,111,97,100,105,110,103,32,111,112,101,114,97,116,105,110,103,32,115,
-121,115,116,101,109,0,77,105,115,115,105,110,103,32,111,112,101,114,97,
-116,105,110,103,32,115,121,115,116,101,109,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,
-1,1,0,4,15,63,60,63,0,0,0,241,239,0,0,0,0,1,61,5,15,63,243,48,240,0,0,144,
-208,2,0,0,0,1,244,165,15,63,170,192,192,3,0,144,208,2,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,85,170
-};
-
-u_char bteasy17[] = {
-51,192,142,192,142,216,142,208,188,0,124,252,139,244,191,0,6,185,0,1,242,
-165,234,96,6,0,0,139,213,88,162,72,7,60,53,116,28,180,16,246,228,5,174,
-4,150,246,68,4,255,116,62,198,4,128,232,218,0,138,116,1,139,76,2,235,8,
-232,207,0,185,1,0,50,209,187,0,124,184,1,2,205,19,114,30,129,191,254,1,
-85,170,117,22,234,0,124,0,0,128,250,129,116,2,178,128,139,234,66,128,242,
-179,136,22,58,7,191,190,7,185,4,0,198,6,45,7,49,50,246,136,45,138,69,4,
-60,0,116,35,60,5,116,31,254,198,190,42,7,232,113,0,190,72,7,70,70,139,28,
-10,255,116,5,50,125,4,117,243,141,183,114,7,232,90,0,131,199,16,254,6,45,
-7,226,203,128,62,117,4,2,116,11,190,59,7,10,246,117,10,205,24,235,172,190,
-42,7,232,57,0,232,54,0,50,228,205,26,139,218,131,195,96,180,1,205,22,180,
-0,117,11,205,26,59,211,114,242,160,72,7,235,10,205,22,138,196,60,28,116,
-243,4,246,60,49,114,214,60,53,119,210,80,190,40,7,187,27,6,83,252,172,80,
-36,127,180,14,205,16,88,168,128,116,242,195,86,184,1,3,187,0,6,185,1,0,
-50,246,205,19,94,198,6,72,7,63,195,13,138,13,10,70,48,32,46,32,46,32,46,
-160,100,105,115,107,32,49,13,10,10,68,101,102,97,117,108,116,58,32,70,63,
-160,0,1,0,4,0,6,3,7,7,10,10,99,14,100,14,101,20,128,20,129,25,130,30,147,
-36,165,39,159,43,117,47,82,47,219,50,64,55,242,61,0,100,111,243,72,80,70,
-211,79,115,178,85,110,105,248,78,111,118,101,108,236,77,105,110,105,248,
-76,105,110,117,248,65,109,111,101,98,225,66,83,196,66,83,68,233,80,67,73,
-216,67,80,205,86,101,110,105,248,68,111,115,115,101,227,63,191,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,85,170
-};
-#endif
-
-int
-scan_block(int fd, daddr_t block)
-{
- u_char foo[512];
-
- if (-1 == lseek(fd, (off_t)block * 512, SEEK_SET))
- err(1, "lseek");
- if (512 != read(fd, foo, 512))
- return 1;
- return 0;
-}
-
-void
-Scan_Disk(struct disk *d)
-{
- char device[64];
- u_long l;
- int i, j, fd;
-
- strcpy(device, _PATH_DEV);
- strcat(device, d->name);
-
- fd = open(device, O_RDWR);
- if (fd < 0) {
- warn("open(%s) failed", device);
- return;
- }
- for (i = -1, l = 0; ; l++) {
- j = scan_block(fd, l);
- if (j != i) {
- if (i == -1) {
- printf("%c: %lu.",j ? 'B' : 'G', l);
- fflush(stdout);
- } else if (i == 0) {
- printf(".%lu\nB: %lu.", l - 1, l);
- fflush(stdout);
- } else {
- printf(".%lu\nG: %lu.", l - 1, l);
- fflush(stdout);
- }
- i = j;
- }
- }
- close(fd);
-}
-
-int
-main(int argc, char **argv)
-{
- struct disk *d,*db;
- char myprompt[BUFSIZ];
-#ifndef READLINE
- char input[BUFSIZ];
-#endif
- char *p,*q = 0;
- char **cp, *cmds[200];
- int ncmd, i;
-
- if (argc < 2) {
- fprintf(stderr, "Usage:\n\t%s diskname\n", argv[0]);
- exit(1);
- }
- d = Open_Disk(argv[1]);
- if (!d)
- err(1, "Couldn't open disk %s", argv[1]);
-
- sprintf(myprompt, "%s %s> ", argv[0], argv[1]);
- while (1) {
- printf("--==##==--\n");
- p = CheckRules(d);
- Debug_Disk(d);
- if (p) {
- printf("%s",p);
- free(p);
- }
-#ifdef READLINE
- if (q)
- free(q);
- q = p = readline(myprompt);
-#else
- printf("%s", myprompt);
- fflush(stdout);
- q = p = fgets(input, sizeof(input), stdin);
-#endif
- if(!p)
- break;
- for (cp = cmds; (*cp = strsep(&p, " \t\n")) != NULL;)
- if (**cp != '\0')
- cp++;
- ncmd = cp - cmds;
- if (!ncmd)
- continue;
- if (!strcasecmp(*cmds, "quit"))
- break;
- if (!strcasecmp(*cmds, "exit"))
- break;
- if (!strcasecmp(*cmds, "q"))
- break;
- if (!strcasecmp(*cmds, "x"))
- break;
- if (!strcasecmp(*cmds, "dwim") && ncmd == 6) {
- printf("dwim = %p\n",
- Create_Chunk_DWIM(d,
- (struct chunk *)strtol(cmds[1], 0, 0),
- strtol(cmds[2], 0, 0),
- strtol(cmds[3], 0, 0),
- strtol(cmds[4], 0, 0),
- strtol(cmds[5], 0, 0)));
- continue;
- }
- if (!strcasecmp(*cmds, "delete") && ncmd == 2) {
- printf("delete = %d\n",
- Delete_Chunk(d,
- (struct chunk *)strtol(cmds[1], 0, 0)));
- continue;
- }
-#ifndef __ia64__
- if (!strcasecmp(*cmds, "allfreebsd")) {
- All_FreeBSD(d, 0);
- continue;
- }
- if (!strcasecmp(*cmds, "dedicate")) {
- All_FreeBSD(d, 1);
- continue;
- }
- if (!strcasecmp(*cmds, "sanitize")) {
- Sanitize_Bios_Geom(d);
- continue;
- }
- if (!strcasecmp(*cmds, "bios") && ncmd == 4) {
- Set_Bios_Geom(d, strtol(cmds[1], 0, 0),
- strtol(cmds[2], 0, 0),
- strtol(cmds[3], 0, 0));
- continue;
- }
-#endif
- if (!strcasecmp(*cmds, "list")) {
- cp = Disk_Names();
- printf("Disks:");
- for (i = 0; cp[i]; i++) {
- printf(" %s", cp[i]);
- free(cp[i]);
- }
- free(cp);
- continue;
- }
-#ifdef PC98
- if (!strcasecmp(*cmds, "create") && ncmd == 7) {
-#else
- if (!strcasecmp(*cmds,"create") && ncmd == 6) {
-#endif
-
- printf("Create=%d\n",
- Create_Chunk(d,
- strtol(cmds[1], 0, 0),
- strtol(cmds[2], 0, 0),
- strtol(cmds[3], 0, 0),
- strtol(cmds[4], 0, 0),
-#ifdef PC98
- strtol(cmds[5], 0, 0), cmds[6]));
-#else
- strtol(cmds[5], 0, 0), NULL));
-#endif
- continue;
- }
- if (!strcasecmp(*cmds,"read")) {
- db = d;
- if (ncmd > 1)
- d = Open_Disk(cmds[1]);
- else
- d = Open_Disk(argv[1]);
- if (d)
- Free_Disk(db);
- else
- d = db;
- continue;
- }
- if (!strcasecmp(*cmds,"scan")) {
- Scan_Disk(d);
- continue;
- }
-#ifndef PC98
- if (!strcasecmp(*cmds,"bteasy")) {
- Set_Boot_Mgr(d, bteasy17, sizeof (bteasy17));
- continue;
- }
- if (!strcasecmp(*cmds, "mbr")) {
- Set_Boot_Mgr(d, mbrboot, sizeof (mbrboot));
- continue;
- }
-#endif
-#if 0 /* XXX boot1 undefined, fix me */
- if (!strcasecmp(*cmds, "boot")) {
- Set_Boot_Blocks(d, boot1, boot2);
- continue;
- }
-#endif
- if (!strcasecmp(*cmds, "write")) {
- printf("Write=%d\n",
- Write_Disk(d));
- Free_Disk(d);
- d = Open_Disk(argv[1]);
- continue;
- }
- if (strcasecmp(*cmds, "help"))
- printf("\007ERROR\n");
- printf("CMDS:\n");
- printf("\tallfreebsd\n");
- printf("\tdedicate\n");
- printf("\tbios cyl hd sect\n");
- printf("\tboot\n");
-#ifndef PC98
- printf("\tbteasy17\n");
-#endif
-#if 0
- printf("\tcollapse [pointer]\n");
-#endif
-#ifdef PC98
- printf("\tcreate offset size enum subtype flags name\n");
-#else
- printf("\tcreate offset size enum subtype flags\n");
-#endif
- printf("\t\tsubtype(part): swap=1, ffs=7\n");
- printf("\tdelete pointer\n");
- printf("\tlist\n");
-#ifndef PC98
- printf("\tmbr\n");
-#endif
-#if 0
- printf("\tphys cyl hd sect\n");
-#endif
- printf("\tquit\n");
- printf("\tread [disk]\n");
- printf("\tscan\n");
- printf("\twrite\n");
- printf("\nENUM:\n\t");
-#if 0
- for (i = 0; chunk_n[i]; i++)
- printf("%d = %s%s", i, chunk_n[i],
- i == 4 ? "\n\t" : " ");
-#endif
- printf("\n");
-
- }
- exit (0);
-}
diff --git a/lib/libdisk/write_amd64_disk.c b/lib/libdisk/write_amd64_disk.c
deleted file mode 100644
index 9899258..0000000
--- a/lib/libdisk/write_amd64_disk.c
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/disklabel.h>
-#include <sys/diskmbr.h>
-#include <paths.h>
-#include "libdisk.h"
-
-/*
- * XXX: A lot of hardcoded 512s probably should be foo->sector_size;
- * I'm not sure which, so I leave it like it worked before. --schweikh
- */
-static int
-Write_FreeBSD(int fd, const struct disk *new, const struct chunk *c1)
-{
- struct disklabel *dl;
- int i;
- void *p;
- u_char buf[BBSIZE];
-
- for (i = 0; i < BBSIZE/512; i++) {
- if (!(p = read_block(fd, i + c1->offset, 512)))
- return (1);
- memcpy(buf + 512 * i, p, 512);
- free(p);
- }
- if (new->boot1)
- memcpy(buf, new->boot1, 512);
-
- if (new->boot2)
- memcpy(buf + 512, new->boot2, BBSIZE - 512);
-
- dl = (struct disklabel *)(buf + 512 * LABELSECTOR + LABELOFFSET);
- Fill_Disklabel(dl, new, c1);
-
- for (i = 0; i < BBSIZE / 512; i++)
- write_block(fd, i + c1->offset, buf + 512 * i, 512);
-
- return 0;
-}
-
-static void
-Write_Int32(u_int32_t *p, u_int32_t v)
-{
- u_int8_t *bp = (u_int8_t *)p;
-
- bp[0] = (v >> 0) & 0xff;
- bp[1] = (v >> 8) & 0xff;
- bp[2] = (v >> 16) & 0xff;
- bp[3] = (v >> 24) & 0xff;
-}
-
-/*
- * Special install-time configuration for the i386 boot0 boot manager.
- */
-static void
-Cfg_Boot_Mgr(u_char *mbr, int edd)
-{
-
- if (mbr[0x1b0] == 0x66 && mbr[0x1b1] == 0xbb) {
- if (edd)
- mbr[0x1bb] |= 0x80; /* Packet mode on */
- else
- mbr[0x1bb] &= 0x7f; /* Packet mode off */
- }
-}
-
-int
-Write_Disk(const struct disk *d1)
-{
- int fd, j;
- uint i;
- struct chunk *c1;
- int ret = 0;
- char device[64];
- u_char *mbr;
- struct dos_partition *dp,work[NDOSPART];
- int s[4];
- int need_edd = 0; /* Need EDD (packet interface) */
-
- strcpy(device, _PATH_DEV);
- strcat(device, d1->name);
-
- fd = open(device, O_RDWR);
- if (fd < 0)
- return 1;
-
- memset(s, 0, sizeof s);
- if (!(mbr = read_block(fd, 0, d1->sector_size))) {
- close (fd);
- return (1);
- }
- dp = (struct dos_partition *)(mbr + DOSPARTOFF);
- memcpy(work, dp, sizeof work);
- dp = work;
- free(mbr);
- for (c1 = d1->chunks->part; c1; c1 = c1->next) {
- if (c1->type == unused)
- continue;
- if (!strcmp(c1->name, "X"))
- continue;
- j = c1->name[strlen(d1->name) + 1] - '1';
- if (j < 0 || j > 3)
- continue;
- s[j]++;
- if (c1->type == freebsd)
- ret += Write_FreeBSD(fd, d1, c1);
-
- Write_Int32(&dp[j].dp_start, c1->offset);
- Write_Int32(&dp[j].dp_size, c1->size);
-
- i = c1->offset;
- if (i >= 1024 * d1->bios_sect * d1->bios_hd) {
- dp[j].dp_ssect = 0xff;
- dp[j].dp_shd = 0xff;
- dp[j].dp_scyl = 0xff;
- need_edd++;
- } else {
- dp[j].dp_ssect = i % d1->bios_sect;
- i -= dp[j].dp_ssect++;
- i /= d1->bios_sect;
- dp[j].dp_shd = i % d1->bios_hd;
- i -= dp[j].dp_shd;
- i /= d1->bios_hd;
- dp[j].dp_scyl = i;
- i -= dp[j].dp_scyl;
- dp[j].dp_ssect |= i >> 2;
- }
-#ifdef DEBUG
- printf("S:%lu = (%x/%x/%x)", c1->offset,
- dp[j].dp_scyl, dp[j].dp_shd, dp[j].dp_ssect);
-#endif
-
- i = c1->end;
- dp[j].dp_esect = i % d1->bios_sect;
- i -= dp[j].dp_esect++;
- i /= d1->bios_sect;
- dp[j].dp_ehd = i % d1->bios_hd;
- i -= dp[j].dp_ehd;
- i /= d1->bios_hd;
- if (i > 1023)
- i = 1023;
- dp[j].dp_ecyl = i;
- i -= dp[j].dp_ecyl;
- dp[j].dp_esect |= i >> 2;
-#ifdef DEBUG
- printf(" E:%lu = (%x/%x/%x)\n", c1->end,
- dp[j].dp_ecyl, dp[j].dp_ehd, dp[j].dp_esect);
-#endif
-
- dp[j].dp_typ = c1->subtype;
- if (c1->flags & CHUNK_ACTIVE)
- dp[j].dp_flag = 0x80;
- else
- dp[j].dp_flag = 0;
- }
- j = 0;
- for (i = 0; i < NDOSPART; i++) {
- if (!s[i])
- memset(dp + i, 0, sizeof *dp);
- if (dp[i].dp_flag)
- j++;
- }
- if (!j)
- for(i = 0; i < NDOSPART; i++)
- if (dp[i].dp_typ == 0xa5)
- dp[i].dp_flag = 0x80;
-
- if (!(mbr = read_block(fd, 0, d1->sector_size))) {
- close (fd);
- return (1);
- }
- if (d1->bootmgr) {
- memcpy(mbr, d1->bootmgr, DOSPARTOFF);
- Cfg_Boot_Mgr(mbr, need_edd);
- }
- memcpy(mbr + DOSPARTOFF, dp, sizeof *dp * NDOSPART);
- mbr[512-2] = 0x55;
- mbr[512-1] = 0xaa;
- write_block(fd, 0, mbr, d1->sector_size);
- if (d1->bootmgr && d1->bootmgr_size > d1->sector_size)
- for (i = 1; i * d1->sector_size <= d1->bootmgr_size; i++)
- write_block(fd, i, &d1->bootmgr[i * d1->sector_size],
- d1->sector_size);
-
- close(fd);
- return 0;
-}
diff --git a/lib/libdisk/write_disk.c b/lib/libdisk/write_disk.c
deleted file mode 100644
index 024981b..0000000
--- a/lib/libdisk/write_disk.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/disklabel.h>
-#include <paths.h>
-#include "libdisk.h"
-
-void
-Fill_Disklabel(struct disklabel *dl, const struct disk *new,
- const struct chunk *c1)
-{
- struct chunk *c2;
- int j;
-
- memset(dl, 0, sizeof *dl);
-
- for (c2 = c1->part; c2; c2 = c2->next) {
- if (c2->type == unused)
- continue;
- if (!strcmp(c2->name, "X"))
- continue;
- j = c2->name[strlen(c2->name) - 1] - 'a';
- if (j < 0 || j >= MAXPARTITIONS || j == RAW_PART)
- continue;
- dl->d_partitions[j].p_size = c2->size;
- dl->d_partitions[j].p_offset = c2->offset;
- dl->d_partitions[j].p_fstype = c2->subtype;
- }
-
- dl->d_bbsize = BBSIZE;
- /*
- * Add in defaults for superblock size, interleave, and rpms
- */
- dl->d_sbsize = 0;
-
- strcpy(dl->d_typename, c1->name);
-
- dl->d_secsize = 512;
- dl->d_secperunit = new->chunks->size;
-#ifndef __ia64__
- dl->d_ncylinders = new->bios_cyl;
- dl->d_ntracks = new->bios_hd;
- dl->d_nsectors = new->bios_sect;
-#endif
- dl->d_secpercyl = dl->d_ntracks * dl->d_nsectors;
-
- dl->d_npartitions = MAXPARTITIONS;
-
- dl->d_type = new->name[0] == 's' || new->name[0] == 'd' ||
- new->name[0] == 'o' ? DTYPE_SCSI : DTYPE_ESDI;
- dl->d_partitions[RAW_PART].p_size = c1->size;
- dl->d_partitions[RAW_PART].p_offset = c1->offset;
- dl->d_rpm = 3600;
- dl->d_interleave = 1;
-
- dl->d_magic = DISKMAGIC;
- dl->d_magic2 = DISKMAGIC;
- dl->d_checksum = dkcksum(dl);
-}
diff --git a/lib/libdisk/write_i386_disk.c b/lib/libdisk/write_i386_disk.c
deleted file mode 100644
index 15317d3..0000000
--- a/lib/libdisk/write_i386_disk.c
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/disklabel.h>
-#include <sys/diskmbr.h>
-#include <paths.h>
-#include "libdisk.h"
-
-/*
- * XXX: A lot of hardcoded 512s probably should be foo->sector_size;
- * I'm not sure which, so I leave it like it worked before. --schweikh
- */
-static int
-Write_FreeBSD(int fd, const struct disk *new, const struct chunk *c1)
-{
- struct disklabel *dl;
- int i;
- void *p;
- u_char buf[BBSIZE];
-
- for (i = 0; i < BBSIZE/512; i++) {
- if (!(p = read_block(fd, i + c1->offset, 512)))
- return (1);
- memcpy(buf + 512 * i, p, 512);
- free(p);
- }
- if (new->boot1)
- memcpy(buf, new->boot1, 512);
-
- if (new->boot2)
- memcpy(buf + 512, new->boot2, BBSIZE - 512);
-
- dl = (struct disklabel *)(buf + 512 * LABELSECTOR + LABELOFFSET);
- Fill_Disklabel(dl, new, c1);
-
- for (i = 0; i < BBSIZE / 512; i++)
- write_block(fd, i + c1->offset, buf + 512 * i, 512);
-
- return 0;
-}
-
-static void
-Write_Int32(u_int32_t *p, u_int32_t v)
-{
- u_int8_t *bp = (u_int8_t *)p;
-
- bp[0] = (v >> 0) & 0xff;
- bp[1] = (v >> 8) & 0xff;
- bp[2] = (v >> 16) & 0xff;
- bp[3] = (v >> 24) & 0xff;
-}
-
-/*
- * Special install-time configuration for the i386 boot0 boot manager.
- */
-static void
-Cfg_Boot_Mgr(u_char *mbrblk, int edd)
-{
-
- if (mbrblk[0x1b0] == 0x66 && mbrblk[0x1b1] == 0xbb) {
- if (edd)
- mbrblk[0x1bb] |= 0x80; /* Packet mode on */
- else
- mbrblk[0x1bb] &= 0x7f; /* Packet mode off */
- }
-}
-
-int
-Write_Disk(const struct disk *d1)
-{
- int fd, j;
- uint i;
- struct chunk *c1;
- int ret = 0;
- char device[64];
- u_char *mbrblk;
- struct dos_partition *dp,work[NDOSPART];
- int s[4];
- int need_edd = 0; /* Need EDD (packet interface) */
-
- strcpy(device, _PATH_DEV);
- strcat(device, d1->name);
-
- fd = open(device, O_RDWR);
- if (fd < 0)
- return 1;
-
- memset(s, 0, sizeof s);
- if (!(mbrblk = read_block(fd, 0, d1->sector_size))) {
- close (fd);
- return (1);
- }
- dp = (struct dos_partition *)(mbrblk + DOSPARTOFF);
- memcpy(work, dp, sizeof work);
- dp = work;
- free(mbrblk);
- for (c1 = d1->chunks->part; c1; c1 = c1->next) {
- if (c1->type == unused)
- continue;
- if (!strcmp(c1->name, "X"))
- continue;
- j = c1->name[strlen(d1->name) + 1] - '1';
- if (j < 0 || j > 3)
- continue;
- s[j]++;
- if (c1->type == freebsd)
- ret += Write_FreeBSD(fd, d1, c1);
-
- Write_Int32(&dp[j].dp_start, c1->offset);
- Write_Int32(&dp[j].dp_size, c1->size);
-
- i = c1->offset;
- if (i >= 1024 * d1->bios_sect * d1->bios_hd) {
- dp[j].dp_ssect = 0xff;
- dp[j].dp_shd = 0xff;
- dp[j].dp_scyl = 0xff;
- need_edd++;
- } else {
- dp[j].dp_ssect = i % d1->bios_sect;
- i -= dp[j].dp_ssect++;
- i /= d1->bios_sect;
- dp[j].dp_shd = i % d1->bios_hd;
- i -= dp[j].dp_shd;
- i /= d1->bios_hd;
- dp[j].dp_scyl = i;
- i -= dp[j].dp_scyl;
- dp[j].dp_ssect |= i >> 2;
- }
-#ifdef DEBUG
- printf("S:%lu = (%x/%x/%x)", c1->offset,
- dp[j].dp_scyl, dp[j].dp_shd, dp[j].dp_ssect);
-#endif
-
- i = c1->end;
- dp[j].dp_esect = i % d1->bios_sect;
- i -= dp[j].dp_esect++;
- i /= d1->bios_sect;
- dp[j].dp_ehd = i % d1->bios_hd;
- i -= dp[j].dp_ehd;
- i /= d1->bios_hd;
- if (i > 1023)
- i = 1023;
- dp[j].dp_ecyl = i;
- i -= dp[j].dp_ecyl;
- dp[j].dp_esect |= i >> 2;
-#ifdef DEBUG
- printf(" E:%lu = (%x/%x/%x)\n", c1->end,
- dp[j].dp_ecyl, dp[j].dp_ehd, dp[j].dp_esect);
-#endif
-
- dp[j].dp_typ = c1->subtype;
- if (c1->flags & CHUNK_ACTIVE)
- dp[j].dp_flag = 0x80;
- else
- dp[j].dp_flag = 0;
- }
- j = 0;
- for (i = 0; i < NDOSPART; i++) {
- if (!s[i])
- memset(dp + i, 0, sizeof *dp);
- if (dp[i].dp_flag)
- j++;
- }
- if (!j)
- for(i = 0; i < NDOSPART; i++)
- if (dp[i].dp_typ == 0xa5)
- dp[i].dp_flag = 0x80;
-
- if (!(mbrblk = read_block(fd, 0, d1->sector_size))) {
- close (fd);
- return (1);
- }
- if (d1->bootmgr) {
- memcpy(mbrblk, d1->bootmgr, DOSPARTOFF);
- Cfg_Boot_Mgr(mbrblk, need_edd);
- }
- memcpy(mbrblk + DOSPARTOFF, dp, sizeof *dp * NDOSPART);
- mbrblk[512-2] = 0x55;
- mbrblk[512-1] = 0xaa;
- write_block(fd, 0, mbrblk, d1->sector_size);
- if (d1->bootmgr && d1->bootmgr_size > d1->sector_size)
- for (i = 1; i * d1->sector_size <= d1->bootmgr_size; i++)
- write_block(fd, i, &d1->bootmgr[i * d1->sector_size],
- d1->sector_size);
-
- close(fd);
- return 0;
-}
diff --git a/lib/libdisk/write_ia64_disk.c b/lib/libdisk/write_ia64_disk.c
deleted file mode 100644
index 6a57322..0000000
--- a/lib/libdisk/write_ia64_disk.c
+++ /dev/null
@@ -1,423 +0,0 @@
-/*
- * Copyright (c) 2003 Marcel Moolenaar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * CRC32 code derived from work by Gary S. Brown.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/types.h>
-#include <sys/disklabel.h>
-#include <sys/diskmbr.h>
-#include <sys/gpt.h>
-#include <sys/stat.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <paths.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <uuid.h>
-
-#include "libdisk.h"
-
-static uuid_t _efi = GPT_ENT_TYPE_EFI;
-static uuid_t _fbsd = GPT_ENT_TYPE_FREEBSD;
-static uuid_t _swap = GPT_ENT_TYPE_FREEBSD_SWAP;
-static uuid_t _ufs = GPT_ENT_TYPE_FREEBSD_UFS;
-
-static uint32_t crc32_tab[] = {
- 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
- 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
- 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
- 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
- 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
- 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
- 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,
- 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
- 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,
- 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
- 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,
- 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
- 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,
- 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
- 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
- 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
- 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,
- 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
- 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa,
- 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
- 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,
- 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
- 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,
- 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
- 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
- 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
- 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,
- 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
- 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,
- 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
- 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,
- 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
- 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,
- 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
- 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
- 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
- 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,
- 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
- 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,
- 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
- 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,
- 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
- 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
-};
-
-static uint32_t
-crc32(const void *buf, size_t size)
-{
- const uint8_t *p;
- uint32_t crc;
-
- p = buf;
- crc = ~0U;
-
- while (size--)
- crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8);
-
- return (crc ^ ~0U);
-}
-
-static int
-write_pmbr(int fd, const struct disk *disk)
-{
- struct dos_partition dp;
- char *buffer;
- u_long nsects;
- int error;
-
- error = 0;
- nsects = disk->media_size / disk->sector_size;
- nsects--; /* The GPT starts at LBA 1 */
-
- buffer = calloc(disk->sector_size, 1);
- if (buffer == NULL)
- return (ENOMEM);
- buffer[DOSMAGICOFFSET] = DOSMAGIC & 0xff;
- buffer[DOSMAGICOFFSET + 1] = DOSMAGIC >> 8;
-
- dp.dp_flag = 0;
- dp.dp_shd = dp.dp_ssect = dp.dp_scyl = 0xff;
- dp.dp_typ = DOSPTYP_PMBR;
- dp.dp_ehd = dp.dp_esect = dp.dp_ecyl = 0xff;
- dp.dp_start = 1;
- dp.dp_size = (nsects > 0xffffffffu) ? ~0u : nsects;
- memcpy(buffer + DOSPARTOFF, &dp, DOSPARTSIZE);
-
- if (lseek(fd, 0L, SEEK_SET) != 0L ||
- write(fd, buffer, disk->sector_size) != disk->sector_size)
- error = (errno) ? errno : EAGAIN;
-
- free(buffer);
- return (error);
-}
-
-static int
-read_gpt(int fd, const struct disk *disk, struct gpt_hdr *hdr,
- struct gpt_ent *tbl)
-{
- char *buffer;
- off_t off;
- size_t nsects, sz;
- int error, i;
-
- error = 0;
- nsects = disk->gpt_size * sizeof(struct gpt_ent) / disk->sector_size;
- nsects++;
- sz = nsects * disk->sector_size;
- buffer = malloc(sz);
- if (buffer == NULL)
- return (ENOMEM);
-
- if (lseek(fd, disk->sector_size, SEEK_SET) != disk->sector_size ||
- read(fd, buffer, disk->sector_size) != disk->sector_size) {
- error = (errno) ? errno : EAGAIN;
- goto bail;
- }
- if (memcmp(buffer, GPT_HDR_SIG, sizeof(hdr->hdr_sig)) != 0) {
- /*
- * No GPT on disk. Create one out of thin air.
- */
- bzero(&hdr[0], sizeof(struct gpt_hdr));
- memcpy(hdr[0].hdr_sig, GPT_HDR_SIG, sizeof(hdr[0].hdr_sig));
- hdr[0].hdr_revision = GPT_HDR_REVISION;
- hdr[0].hdr_size = offsetof(struct gpt_hdr, padding);
- hdr[0].hdr_lba_self = 1;
- hdr[0].hdr_lba_alt = disk->media_size / disk->sector_size - 1L;
- hdr[0].hdr_lba_start = disk->lba_start;
- hdr[0].hdr_lba_end = disk->lba_end;
- uuid_create(&hdr[0].hdr_uuid, NULL);
- hdr[0].hdr_lba_table = 2;
- hdr[0].hdr_entries = disk->gpt_size;
- hdr[0].hdr_entsz = sizeof(struct gpt_ent);
- hdr[1] = hdr[0];
- hdr[1].hdr_lba_self = hdr[0].hdr_lba_alt;
- hdr[1].hdr_lba_alt = hdr[0].hdr_lba_self;
- hdr[1].hdr_lba_table = disk->lba_end + 1;
-
- for (i = 0; i < disk->gpt_size; i++) {
- bzero(&tbl[i], sizeof(struct gpt_ent));
- uuid_create(&tbl[i].ent_uuid, NULL);
- }
-
- goto bail;
- }
-
- /*
- * We have a GPT on disk. Read it.
- */
- memcpy(&hdr[0], buffer, sizeof(struct gpt_hdr));
- off = hdr->hdr_lba_table * disk->sector_size;
- if (lseek(fd, off, SEEK_SET) != off ||
- read(fd, buffer, sz) != sz) {
- error = (errno) ? errno : EAGAIN;
- goto bail;
- }
- memcpy(tbl, buffer, sizeof(struct gpt_ent) * disk->gpt_size);
- off = hdr->hdr_lba_alt * disk->sector_size;
- if (lseek(fd, off, SEEK_SET) != off ||
- read(fd, buffer, disk->sector_size) != disk->sector_size) {
- error = (errno) ? errno : EAGAIN;
- goto bail;
- }
- memcpy(&hdr[1], buffer, sizeof(struct gpt_hdr));
-
-bail:
- free(buffer);
- return (error);
-}
-
-static int
-update_gpt(int fd, const struct disk *disk, struct gpt_hdr *hdr,
- struct gpt_ent *tbl)
-{
- struct gpt_ent *save;
- char *buffer;
- struct chunk *c;
- off_t off;
- size_t bufsz;
- int error, idx, sav;
-
- error = 0;
-
- /*
- * Save the entries of those chunks that have an index. They are
- * the ones that exist on disk already.
- */
- sav = 0;
- for (c = disk->chunks->part; c != NULL; c = c->next) {
- if ((c->flags & CHUNK_HAS_INDEX))
- sav++;
- }
- if (sav > 0) {
- save = malloc(sav * sizeof(struct gpt_ent));
- if (save == NULL)
- abort();
- sav = 0;
- for (c = disk->chunks->part; c != NULL; c = c->next) {
- if ((c->flags & CHUNK_HAS_INDEX)) {
- idx = CHUNK_FTOI(c->flags);
- save[sav] = tbl[idx];
- c->flags ^= CHUNK_ITOF(idx);
- c->flags |= CHUNK_ITOF(sav);
- sav++;
- }
- }
- } else
- save = NULL;
-
- /*
- * Clear the table entries.
- */
- for (idx = 0; idx < disk->gpt_size; idx++) {
- uuid_create_nil(&tbl[idx].ent_type, NULL);
- tbl[idx].ent_lba_start = 0;
- tbl[idx].ent_lba_end = 0;
- tbl[idx].ent_attr = 0;
- bzero(tbl[idx].ent_name, sizeof(tbl[idx].ent_name));
- }
-
- /*
- * Repopulate the table from the chunks, possibly using saved
- * information.
- */
- idx = 0;
- for (c = disk->chunks->part; c != NULL; c = c->next) {
- if (!(c->flags & CHUNK_HAS_INDEX)) {
- switch (c->type) {
- case freebsd:
- tbl[idx].ent_type = _fbsd;
- break;
- case efi:
- tbl[idx].ent_type = _efi;
- break;
- case part:
- switch (c->subtype) {
- case FS_SWAP:
- tbl[idx].ent_type = _swap;
- break;
- case FS_BSDFFS:
- tbl[idx].ent_type = _ufs;
- break;
- default:
- return (EINVAL);
- }
- break;
- default:
- return (EINVAL);
- }
- } else {
- sav = CHUNK_FTOI(c->flags);
- tbl[idx].ent_type = save[sav].ent_type;
- memcpy(tbl[idx].ent_name, save[sav].ent_name,
- sizeof(tbl[idx].ent_name));
- }
- tbl[idx].ent_lba_start = c->offset;
- tbl[idx].ent_lba_end = c->end;
-
- idx++;
- if (idx == disk->gpt_size)
- return (ENOSPC);
- }
- if (save != NULL)
- free(save);
-
- hdr[0].hdr_crc_table = crc32(tbl,
- disk->gpt_size * sizeof(struct gpt_ent));
- hdr[0].hdr_crc_self = 0;
- hdr[0].hdr_crc_self = crc32(&hdr[0], hdr[0].hdr_size);
-
- hdr[1].hdr_crc_table = hdr[0].hdr_crc_table;
- hdr[1].hdr_crc_self = 0;
- hdr[1].hdr_crc_self = crc32(&hdr[1], hdr[1].hdr_size);
-
- /*
- * Write the new GPT back to the disk.
- */
- bufsz = disk->gpt_size * sizeof(struct gpt_ent);
- if (bufsz == 0 || bufsz % disk->sector_size)
- bufsz += disk->sector_size;
- bufsz = (bufsz / disk->sector_size) * disk->sector_size;
- buffer = calloc(1, bufsz);
-
- memcpy(buffer, &hdr[0], sizeof(struct gpt_hdr));
- off = hdr[0].hdr_lba_self * disk->sector_size;
- if (lseek(fd, off, SEEK_SET) != off ||
- write(fd, buffer, disk->sector_size) != disk->sector_size) {
- error = (errno) ? errno : EAGAIN;
- goto bail;
- }
- memcpy(buffer, &hdr[1], sizeof(struct gpt_hdr));
- off = hdr[1].hdr_lba_self * disk->sector_size;
- if (lseek(fd, off, SEEK_SET) != off ||
- write(fd, buffer, disk->sector_size) != disk->sector_size) {
- error = (errno) ? errno : EAGAIN;
- goto bail;
- }
- memcpy(buffer, tbl, disk->gpt_size * sizeof(struct gpt_ent));
- off = hdr[0].hdr_lba_table * disk->sector_size;
- if (lseek(fd, off, SEEK_SET) != off ||
- write(fd, buffer, bufsz) != bufsz) {
- error = (errno) ? errno : EAGAIN;
- goto bail;
- }
- off = hdr[1].hdr_lba_table * disk->sector_size;
- if (lseek(fd, off, SEEK_SET) != off ||
- write(fd, buffer, bufsz) != bufsz) {
- error = (errno) ? errno : EAGAIN;
- goto bail;
- }
-
-bail:
- free(buffer);
- return (error);
-}
-
-int
-Write_Disk(const struct disk *disk)
-{
- char devname[64];
- struct gpt_hdr *hdr;
- struct gpt_ent *tbl;
- int error, fd;
-
- hdr = malloc(sizeof(struct gpt_hdr) * 2);
- if (hdr == NULL)
- return (ENOMEM);
- tbl = malloc(sizeof(struct gpt_ent) * disk->gpt_size);
- if (tbl == NULL) {
- free(hdr);
- return (ENOMEM);
- }
-
- snprintf(devname, sizeof(devname), "%s%s", _PATH_DEV, disk->name);
- fd = open(devname, O_RDWR);
- if (fd == -1) {
- free(tbl);
- free(hdr);
- return (errno);
- }
-
- /*
- * We can always write the PMBR, because we reject disks that do not
- * have a PMBR and are not virgin.
- */
- error = write_pmbr(fd, disk);
- if (error)
- goto bail;
-
- /*
- * Read the existing GPT from disk or otherwise create one out of
- * thin air. This way we can preserve the UUIDs and the entry names
- * when updating it.
- */
- error = read_gpt(fd, disk, hdr, tbl);
- if (error)
- goto bail;
-
- /*
- * Update and write the in-memory copy of the GPT.
- */
- error = update_gpt(fd, disk, hdr, tbl);
-
-bail:
- close(fd);
- free(tbl);
- free(hdr);
- return (error);
-}
diff --git a/lib/libdisk/write_pc98_disk.c b/lib/libdisk/write_pc98_disk.c
deleted file mode 100644
index 8f2a45d..0000000
--- a/lib/libdisk/write_pc98_disk.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#include <err.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/disklabel.h>
-#include <sys/diskpc98.h>
-#include <paths.h>
-#include "libdisk.h"
-
-/*
- * XXX: A lot of hardcoded 512s probably should be foo->sector_size;
- * I'm not sure which, so I leave it like it worked before. --schweikh
- */
-static int
-Write_FreeBSD(int fd, const struct disk *new, const struct chunk *c1)
-{
- struct disklabel *dl;
- int i;
- void *p;
- u_char buf[BBSIZE];
-
- for (i = 0; i < BBSIZE / 512; i++) {
- if (!(p = read_block(fd, i + c1->offset, 512)))
- return (1);
- memcpy(buf + 512 * i, p, 512);
- free(p);
- }
- if (new->boot1)
- memcpy(buf, new->boot1, 512);
-
- if (new->boot2)
- memcpy(buf + 512, new->boot2, BBSIZE - 512);
-
- dl = (struct disklabel *)(buf + 512 * LABELSECTOR + LABELOFFSET);
- Fill_Disklabel(dl, new, c1);
-
- for (i = 0; i < BBSIZE / 512; i++)
- write_block(fd, i + c1->offset, buf + 512 * i, 512);
-
- return 0;
-}
-
-
-int
-Write_Disk(const struct disk *d1)
-{
- int fd, i, j;
- struct chunk *c1;
- int ret = 0;
- char device[64];
- u_char *mbrblk;
- struct pc98_partition *dp, work[NDOSPART];
- int s[7];
- int PC98_EntireDisk = 0;
-
- strcpy(device, _PATH_DEV);
- strcat(device, d1->name);
-
- /* XXX - for entire FreeBSD(98) */
- for (c1 = d1->chunks->part; c1; c1 = c1->next) {
- if ((c1->type == freebsd) || (c1->offset == 0))
- device[9] = 0;
- }
-
- fd = open(device, O_RDWR);
- if (fd < 0) {
-#ifdef DEBUG
- warn("open(%s) failed", device);
-#endif
- return 1;
- }
-
- memset(s, 0, sizeof s);
- if (!(mbrblk = read_block(fd, 1, d1->sector_size))) {
- close (fd);
- return (1);
- }
- dp = (struct pc98_partition *)(mbrblk + DOSPARTOFF);
- memcpy(work, dp, sizeof work);
- dp = work;
- free(mbrblk);
- for (c1 = d1->chunks->part; c1; c1 = c1->next) {
- if (c1->type == unused)
- continue;
- if (!strcmp(c1->name, "X"))
- continue;
- j = c1->name[strlen(d1->name) + 1] - '1';
- if (j < 0 || j > 7)
- continue;
- s[j]++;
- if (c1->type == freebsd)
- ret += Write_FreeBSD(fd, d1, c1);
-
- i = c1->offset;
- dp[j].dp_ssect = dp[j].dp_ipl_sct = i % d1->bios_sect;
- i -= dp[j].dp_ssect;
- i /= d1->bios_sect;
- dp[j].dp_shd = dp[j].dp_ipl_head = i % d1->bios_hd;
- i -= dp[j].dp_shd;
- i /= d1->bios_hd;
- dp[j].dp_scyl = dp[j].dp_ipl_cyl = i;
-#ifdef DEBUG
- printf("S:%lu = (%x/%x/%x)", c1->offset,
- dp[j].dp_scyl, dp[j].dp_shd, dp[j].dp_ssect);
-#endif
-
- i = c1->end;
-#if 1
- dp[j].dp_esect = dp[j].dp_ehd = 0;
- dp[j].dp_ecyl = i / (d1->bios_sect * d1->bios_hd);
-#else
- dp[j].dp_esect = i % d1->bios_sect;
- i -= dp[j].dp_esect;
- i /= d1->bios_sect;
- dp[j].dp_ehd = i % d1->bios_hd;
- i -= dp[j].dp_ehd;
- i /= d1->bios_hd;
- dp[j].dp_ecyl = i;
-#endif
-#ifdef DEBUG
- printf(" E:%lu = (%x/%x/%x)\n", c1->end,
- dp[j].dp_ecyl, dp[j].dp_ehd, dp[j].dp_esect);
-#endif
-
- dp[j].dp_mid = c1->subtype & 0xff;
- dp[j].dp_sid = c1->subtype >> 8;
- if (c1->flags & CHUNK_ACTIVE)
- dp[j].dp_mid |= 0x80;
-
- strncpy(dp[j].dp_name, c1->sname, 16);
- }
- j = 0;
- for (i = 0; i < NDOSPART; i++) {
- if (!s[i])
- memset(dp + i, 0, sizeof *dp);
- }
-
- if (d1->bootipl)
- write_block(fd, 0, d1->bootipl, d1->sector_size);
-
- if (!(mbrblk = read_block(fd, 1, d1->sector_size))) {
- close (fd);
- return (1);
- }
- memcpy(mbrblk + DOSPARTOFF, dp, sizeof *dp * NDOSPART);
- /* XXX - for entire FreeBSD(98) */
- for (c1 = d1->chunks->part; c1; c1 = c1->next)
- if (((c1->type == freebsd) || (c1->type == fat))
- && (c1->offset == 0))
- PC98_EntireDisk = 1;
- if (PC98_EntireDisk == 0)
- write_block(fd, 1, mbrblk, d1->sector_size);
-
- if (d1->bootmenu)
- for (i = 0; i * d1->sector_size < d1->bootmenu_size; i++)
- write_block(fd, 2 + i,
- &d1->bootmenu[i * d1->sector_size],
- d1->sector_size);
-
- close(fd);
- return 0;
-}
diff --git a/lib/libdisk/write_sparc64_disk.c b/lib/libdisk/write_sparc64_disk.c
deleted file mode 100644
index 9832b0d..0000000
--- a/lib/libdisk/write_sparc64_disk.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <err.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/sun_disklabel.h>
-#include <paths.h>
-#include <errno.h>
-#include "libdisk.h"
-
-#include "geom_sunlabel_enc.c"
-
-int
-Write_Disk(const struct disk *d1)
-{
- struct sun_disklabel *sl;
- struct chunk *c, *c1, *c2;
- int i;
- char *p;
- u_long secpercyl;
- char device[64];
- u_char buf[SUN_SIZE];
- int fd;
-
- strcpy(device, _PATH_DEV);
- strcat(device, d1->name);
-
- fd = open(device, O_RDWR);
- if (fd < 0) {
- warn("open(%s) failed", device);
- return (1);
- }
-
- sl = calloc(sizeof *sl, 1);
- c = d1->chunks;
- c2 = c->part;
- secpercyl = d1->bios_sect * d1->bios_hd;
- sl->sl_pcylinders = c->size / secpercyl;
- sl->sl_ncylinders = c2->size / secpercyl;
- sl->sl_acylinders = sl->sl_pcylinders - sl->sl_ncylinders;
- sl->sl_magic = SUN_DKMAGIC;
- sl->sl_nsectors = d1->bios_sect;
- sl->sl_ntracks = d1->bios_hd;
- if (c->size > 4999 * 1024 * 2) {
- sprintf(sl->sl_text, "FreeBSD%luG cyl %u alt %u hd %u sec %u",
- (c->size + 1024 * 1024) / (2 * 1024 * 1024),
- sl->sl_ncylinders, sl->sl_acylinders,
- sl->sl_ntracks, sl->sl_nsectors);
- } else {
- sprintf(sl->sl_text, "FreeBSD%luM cyl %u alt %u hd %u sec %u",
- (c->size + 1024) / (2 * 1024),
- sl->sl_ncylinders, sl->sl_acylinders,
- sl->sl_ntracks, sl->sl_nsectors);
- }
- sl->sl_interleave = 1;
- sl->sl_sparespercyl = 0;
- sl->sl_rpm = 3600;
-
- for (c1 = c2->part; c1 != NULL; c1 = c1->next) {
- p = c1->name;
- p += strlen(p);
- p--;
- if (*p < 'a')
- continue;
- i = *p - 'a';
- if (i >= SUN_NPART)
- continue;
- sl->sl_part[i].sdkp_cyloffset = c1->offset / secpercyl;
- sl->sl_part[i].sdkp_nsectors = c1->size;
- for (i = 1; i < 16; i++) {
- write_block(fd, c1->offset + i, d1->boot1 + (i * 512),
- 512);
- }
- }
-
- /*
- * We need to fill in the "RAW" partition as well. Emperical data
- * seems to indicate that this covers the "obviously" visible part
- * of the disk, ie: sl->sl_ncylinders.
- */
- sl->sl_part[SUN_RAWPART].sdkp_cyloffset = 0;
- sl->sl_part[SUN_RAWPART].sdkp_nsectors = sl->sl_ncylinders * secpercyl;
-
- memset(buf, 0, sizeof buf);
- sunlabel_enc(buf, sl);
- write_block(fd, 0, buf, sizeof buf);
-
- close(fd);
- return 0;
-}
diff --git a/lib/libedit/map.c b/lib/libedit/map.c
index 591118f..c70904a 100644
--- a/lib/libedit/map.c
+++ b/lib/libedit/map.c
@@ -1250,7 +1250,7 @@ map_bind(EditLine *el, int argc, const char **argv)
char inbuf[EL_BUFSIZ];
char outbuf[EL_BUFSIZ];
const char *in = NULL;
- char *out = NULL;
+ char *out;
el_bindings_t *bp, *ep;
int cmd;
int key;
@@ -1368,7 +1368,7 @@ map_bind(EditLine *el, int argc, const char **argv)
return (-1);
}
if (key)
- term_set_arrow(el, in, key_map_str(el, out), ntype);
+ term_set_arrow(el, in, key_map_cmd(el, cmd), ntype);
else {
if (in[1]) {
key_add(el, in, key_map_cmd(el, cmd), ntype);
diff --git a/lib/libipsec/policy_parse.y b/lib/libipsec/policy_parse.y
index 9e2f979..46e54e5 100644
--- a/lib/libipsec/policy_parse.y
+++ b/lib/libipsec/policy_parse.y
@@ -88,7 +88,6 @@ static caddr_t policy_parse(char *msg, int msglen);
extern void __policy__strbuffer__init__(char *msg);
extern void __policy__strbuffer__free__(void);
-extern int yyparse(void);
extern int yylex(void);
extern char *__libipsecyytext; /*XXX*/
diff --git a/lib/libnetbsd/Makefile b/lib/libnetbsd/Makefile
new file mode 100644
index 0000000..09c6985
--- /dev/null
+++ b/lib/libnetbsd/Makefile
@@ -0,0 +1,13 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+LIB= netbsd
+
+CFLAGS+= -I${.CURDIR}
+
+SRCS+= strsuftoll.c util.c util.h
+
+INTERNALLIB=
+
+.include <bsd.lib.mk>
diff --git a/lib/libnetbsd/README b/lib/libnetbsd/README
new file mode 100644
index 0000000..ab30300
--- /dev/null
+++ b/lib/libnetbsd/README
@@ -0,0 +1,7 @@
+$FreeBSD$
+
+libnetbsd is a thin compatibility layer intended to allow a limited
+set of NetBSD software to compile as part of the FreeBSD build with
+little or no modifiction. It is built as a static library and not
+installed for general use. Likewise, its header files are not
+installed.
diff --git a/lib/libnetbsd/rmd160.h b/lib/libnetbsd/rmd160.h
new file mode 100644
index 0000000..7b81199
--- /dev/null
+++ b/lib/libnetbsd/rmd160.h
@@ -0,0 +1,44 @@
+/* $FreeBSD$ */
+
+/*-
+ * Copyright (c) 2012 SRI International
+ * All rights reserved.
+ *
+ * This software was developed by SRI International and the University of
+ * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
+ * ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _RMD160_H_
+#define _RMD160_H_
+
+#include <ripemd.h>
+
+#define RMD160_CTX RIPEMD160_CTX
+#define RMD160End RIPEMD160_End
+#define RMD160File RIPEMD160_File
+#define RMD160Init RIPEMD160_Init
+#define RMD160Update RIPEMD160_Update
+
+#endif /* _RMD160_H_ */
diff --git a/lib/libnetbsd/sha1.h b/lib/libnetbsd/sha1.h
new file mode 100644
index 0000000..41280c5
--- /dev/null
+++ b/lib/libnetbsd/sha1.h
@@ -0,0 +1,43 @@
+/* $FreeBSD$ */
+
+/*-
+ * Copyright (c) 2012 SRI International
+ * All rights reserved.
+ *
+ * This software was developed by SRI International and the University of
+ * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
+ * ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _SHA1_H_
+#define _SHA1_H_
+
+#include <sha.h>
+
+#define SHA1End SHA1_End
+#define SHA1File SHA1_File
+#define SHA1Init SHA1_Init
+#define SHA1Update SHA1_Update
+
+#endif /* _SHA1_H_ */
diff --git a/lib/libdisk/write_mips_disk.c b/lib/libnetbsd/sha2.h
index bd0cb87..b67691d 100644
--- a/lib/libdisk/write_mips_disk.c
+++ b/lib/libnetbsd/sha2.h
@@ -1,7 +1,13 @@
+/* $FreeBSD$ */
+
/*-
- * Copyright (c) 2006 Olivier Houchard
+ * Copyright (c) 2012 SRI International
* All rights reserved.
*
+ * This software was developed by SRI International and the University of
+ * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
+ * ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -24,25 +30,10 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#include <err.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/disklabel.h>
-#include <paths.h>
-#include "libdisk.h"
+#ifndef _SHA2_H_
+#define _SHA2_H_
-int
-Write_Disk(const struct disk *d1)
-{
+#include <sha256.h>
+#include <sha512.h>
- return (0);
-}
+#endif /* _SHA2_H_ */
diff --git a/lib/libnetbsd/stdlib.h b/lib/libnetbsd/stdlib.h
new file mode 100644
index 0000000..d481913
--- /dev/null
+++ b/lib/libnetbsd/stdlib.h
@@ -0,0 +1,70 @@
+/* $FreeBSD$ */
+
+/*-
+ * Copyright (c) 2012 SRI International
+ * Copyright (c) 2001-2002,2004 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Luke Mewburn.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*-
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _LIBNETBSD_STDLIB_H_
+#define _LIBNETBSD_STDLIB_H_
+
+#include_next <stdlib.h>
+
+long long strsuftoll(const char *, const char *, long long, long long);
+long long strsuftollx(const char *, const char *,
+ long long, long long, char *, size_t);
+
+#endif /* _LIBNETBSD_STDLIB_H_ */
diff --git a/lib/libnetbsd/strsuftoll.c b/lib/libnetbsd/strsuftoll.c
new file mode 100644
index 0000000..657e525
--- /dev/null
+++ b/lib/libnetbsd/strsuftoll.c
@@ -0,0 +1,222 @@
+/* $NetBSD: strsuftoll.c,v 1.6 2004/03/05 05:58:29 lukem Exp $ */
+/*-
+ * Copyright (c) 2001-2002,2004 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Luke Mewburn.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*-
+ * Copyright (c) 1991, 1993, 1994
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Keith Muller of the University of California, San Diego and Lance
+ * Visser of Convex Computer Corporation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+#include <sys/time.h>
+
+#include <assert.h>
+#include <ctype.h>
+#include <err.h>
+#include <errno.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef _LIBC
+# ifdef __weak_alias
+__weak_alias(strsuftoll, _strsuftoll)
+__weak_alias(strsuftollx, _strsuftollx)
+# endif
+#endif /* LIBC */
+
+/*
+ * Convert an expression of the following forms to a (u)int64_t.
+ * 1) A positive decimal number.
+ * 2) A positive decimal number followed by a b (mult by 512).
+ * 3) A positive decimal number followed by a k (mult by 1024).
+ * 4) A positive decimal number followed by a m (mult by 1048576).
+ * 5) A positive decimal number followed by a g (mult by 1073741824).
+ * 6) A positive decimal number followed by a t (mult by 1099511627776).
+ * 7) A positive decimal number followed by a w (mult by sizeof int)
+ * 8) Two or more positive decimal numbers (with/without k,b or w).
+ * separated by x (also * for backwards compatibility), specifying
+ * the product of the indicated values.
+ * Returns the result upon successful conversion, or exits with an
+ * appropriate error.
+ *
+ */
+
+/*
+ * As strsuftoll(), but returns the error message into the provided buffer
+ * rather than exiting with it.
+ */
+/* LONGLONG */
+long long
+strsuftollx(const char *desc, const char *val,
+ long long min, long long max, char *ebuf, size_t ebuflen)
+{
+ long long num, t;
+ char *expr;
+
+ errno = 0;
+ ebuf[0] = '\0';
+
+ while (isspace((unsigned char)*val)) /* Skip leading space */
+ val++;
+
+ num = strtoll(val, &expr, 10);
+ if (errno == ERANGE)
+ goto erange; /* Overflow */
+
+ if (expr == val) /* No digits */
+ goto badnum;
+
+ switch (*expr) {
+ case 'b':
+ t = num;
+ num *= 512; /* 1 block */
+ if (t > num)
+ goto erange;
+ ++expr;
+ break;
+ case 'k':
+ t = num;
+ num *= 1024; /* 1 kilobyte */
+ if (t > num)
+ goto erange;
+ ++expr;
+ break;
+ case 'm':
+ t = num;
+ num *= 1048576; /* 1 megabyte */
+ if (t > num)
+ goto erange;
+ ++expr;
+ break;
+ case 'g':
+ t = num;
+ num *= 1073741824; /* 1 gigabyte */
+ if (t > num)
+ goto erange;
+ ++expr;
+ break;
+ case 't':
+ t = num;
+ num *= 1099511627776LL; /* 1 terabyte */
+ if (t > num)
+ goto erange;
+ ++expr;
+ break;
+ case 'w':
+ t = num;
+ num *= sizeof(int); /* 1 word */
+ if (t > num)
+ goto erange;
+ ++expr;
+ break;
+ }
+
+ switch (*expr) {
+ case '\0':
+ break;
+ case '*': /* Backward compatible */
+ case 'x':
+ t = num;
+ num *= strsuftollx(desc, expr + 1, min, max, ebuf, ebuflen);
+ if (*ebuf != '\0')
+ return (0);
+ if (t > num) {
+ erange:
+ snprintf(ebuf, ebuflen,
+ "%s: %s", desc, strerror(ERANGE));
+ return (0);
+ }
+ break;
+ default:
+ badnum: snprintf(ebuf, ebuflen,
+ "%s `%s': illegal number", desc, val);
+ return (0);
+ }
+ if (num < min) {
+ /* LONGLONG */
+ snprintf(ebuf, ebuflen, "%s %lld is less than %lld.",
+ desc, (long long)num, (long long)min);
+ return (0);
+ }
+ if (num > max) {
+ /* LONGLONG */
+ snprintf(ebuf, ebuflen,
+ "%s %lld is greater than %lld.",
+ desc, (long long)num, (long long)max);
+ return (0);
+ }
+ *ebuf = '\0';
+ return (num);
+}
+
+/* LONGLONG */
+long long
+strsuftoll(const char *desc, const char *val,
+ long long min, long long max)
+{
+ long long result;
+ char errbuf[100];
+
+ result = strsuftollx(desc, val, min, max, errbuf, sizeof(errbuf));
+ if (*errbuf != '\0')
+ errx(1, "%s", errbuf);
+ return (result);
+}
diff --git a/lib/libnetbsd/sys/cdefs.h b/lib/libnetbsd/sys/cdefs.h
new file mode 100644
index 0000000..09a7ca4
--- /dev/null
+++ b/lib/libnetbsd/sys/cdefs.h
@@ -0,0 +1,50 @@
+/* $FreeBSD$ */
+
+/*-
+ * Copyright (c) 2012 SRI International
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _LIBNETBSD_SYS_CDEFS_H_
+#define _LIBNETBSD_SYS_CDEFS_H_
+
+#include_next <sys/cdefs.h>
+
+#ifdef __dead2
+#define __dead __dead2
+#else
+#define __dead
+#endif
+
+/*
+ * Return the number of elements in a statically-allocated array,
+ * __x.
+ */
+#define __arraycount(__x) (sizeof(__x) / sizeof(__x[0]))
+
+#endif /* _LIBNETBSD_SYS_CDEFS_H_ */
diff --git a/lib/libdisk/write_powerpc_disk.c b/lib/libnetbsd/util.c
index ec955e2..36b9421 100644
--- a/lib/libdisk/write_powerpc_disk.c
+++ b/lib/libnetbsd/util.c
@@ -1,7 +1,11 @@
/*-
- * Copyright (c) 2004 Suleiman Souhlal.
+ * Copyright (c) 2012 SRI International
* All rights reserved.
*
+ * This software was developed by SRI International and the University of
+ * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
+ * ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -22,43 +26,34 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+#include <sys/types.h>
-#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
#include <string.h>
-#include <err.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/disklabel.h>
-#include <paths.h>
-#include "libdisk.h"
+#include <unistd.h>
+#include <util.h>
-int
-Write_Disk(const struct disk *d1)
+char *
+flags_to_string(u_long flags, const char *def)
{
- /*
- * We don't have to write any label, so we only check that we can
- * open the disk.
- */
- int fd;
- char device[64];
-
- strcpy(device, _PATH_DEV);
- strcat(device, d1->name);
+ char *str;
- fd = open(device, O_RDWR);
- if (fd < 0) {
- close(fd);
- return 1;
+ str = fflagstostr(flags);
+ if (*str == '\0') {
+ free(str);
+ str = strdup(def);
}
+ return (str);
+}
+
+int
+string_to_flags(char **stringp, u_long *setp, u_long *clrp)
+{
- close(fd);
- return 0;
+ return strtofflags(stringp, setp, clrp);
}
diff --git a/lib/libnetbsd/util.h b/lib/libnetbsd/util.h
new file mode 100644
index 0000000..c7d32e1
--- /dev/null
+++ b/lib/libnetbsd/util.h
@@ -0,0 +1,41 @@
+/* $FreeBSD$ */
+
+/*-
+ * Copyright (c) 2012 SRI International
+ * Copyright (c) 1995
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _UTIL_H_
+#define _UTIL_H_
+
+#include <libutil.h>
+
+char *flags_to_string(u_long flags, const char *def);
+int string_to_flags(char **stringp, u_long *setp, u_long *clrp);
+
+#endif /* _UTIL_H_ */
diff --git a/lib/libnetgraph/sock.c b/lib/libnetgraph/sock.c
index fca3900..5f9f563 100644
--- a/lib/libnetgraph/sock.c
+++ b/lib/libnetgraph/sock.c
@@ -71,10 +71,10 @@ NgMkSockNode(const char *name, int *csp, int *dsp)
name = NULL;
/* Create control socket; this also creates the netgraph node.
- If we get an EPROTONOSUPPORT then the socket node type is
+ If we get an EAFNOSUPPORT then the socket node type is
not loaded, so load it and try again. */
if ((cs = socket(AF_NETGRAPH, SOCK_DGRAM, NG_CONTROL)) < 0) {
- if (errno == EPROTONOSUPPORT) {
+ if (errno == EAFNOSUPPORT) {
if (kldload(NG_SOCKET_KLD) < 0) {
errnosv = errno;
if (_gNgDebugLevel >= 1)
diff --git a/lib/libproc/test/t1-bkpt/t1-bkpt.c b/lib/libproc/test/t1-bkpt/t1-bkpt.c
index 37a9fcf..1cd4d17 100644
--- a/lib/libproc/test/t1-bkpt/t1-bkpt.c
+++ b/lib/libproc/test/t1-bkpt/t1-bkpt.c
@@ -36,7 +36,7 @@
#include <string.h>
#include <libproc.h>
-int
+int __noinline
t1_bkpt_t()
{
printf("TEST OK\n");
diff --git a/lib/libradius/Makefile b/lib/libradius/Makefile
index d71d8f2..cb68eaa 100644
--- a/lib/libradius/Makefile
+++ b/lib/libradius/Makefile
@@ -35,6 +35,7 @@ MAN= libradius.3 radius.conf.5
MLINKS+=libradius.3 rad_acct_open.3 \
libradius.3 rad_add_server.3 \
+ libradius.3 rad_add_server_ex.3 \
libradius.3 rad_auth_open.3 \
libradius.3 rad_bind_to.3 \
libradius.3 rad_close.3 \
diff --git a/lib/libradius/libradius.3 b/lib/libradius/libradius.3
index ae0ee24..253659c 100644
--- a/lib/libradius/libradius.3
+++ b/lib/libradius/libradius.3
@@ -37,6 +37,8 @@
.Fn rad_acct_open "void"
.Ft int
.Fn rad_add_server "struct rad_handle *h" "const char *host" "int port" "const char *secret" "int timeout" "int max_tries"
+.Ft int
+.Fn rad_add_server_ex "struct rad_handle *h" "const char *host" "int port" "const char *secret" "int timeout" "int max_tries" "int dead_time" "struct in_addr bindto"
.Ft "struct rad_handle *"
.Fn rad_auth_open "void"
.Ft void
@@ -153,7 +155,12 @@ is used.
returns 0 on success, or \-1 if an error occurs.
.Pp
The library can also be configured programmatically by calls to
-.Fn rad_add_server .
+.Fn rad_add_server
+or
+.Fn rad_add_server_ex .
+.Fn rad_add_server
+is a backward compatible function, implemented via
+.Fn rad_add_server_ex .
The
.Fa host
parameter specifies the server host, either as a fully qualified
@@ -188,11 +195,20 @@ The maximum number of repeated
requests to make before giving up is passed into the
.Fa max_tries
parameter.
+Time interval in seconds when the server will not be requested
+if it is marked as dead (did not answer on the last try) set with
+.Fa dead_time
+parameter.
+.Fa bindto
+parameter is an IP address on the multihomed host that is used as
+a source address for all requests.
.Fn rad_add_server
returns 0 on success, or \-1 if an error occurs.
.Pp
.Fn rad_add_server
-may be called multiple times, and it may be used together with
+or
+.Fn rad_add_server_ex
+may be called multiple times, and they may be used together with
.Fn rad_config .
At most 10 servers may be specified.
When multiple servers are given, they are tried in round-robin
diff --git a/lib/libradius/radius.conf.5 b/lib/libradius/radius.conf.5
index 6ac84e0..6f89c3a 100644
--- a/lib/libradius/radius.conf.5
+++ b/lib/libradius/radius.conf.5
@@ -44,7 +44,7 @@ Leading
white space is ignored, as are empty lines and lines containing
only comments.
.Pp
-A RADIUS server is described by three to five fields on a line:
+A RADIUS server is described by three to seven fields on a line:
.Pp
.Bl -item -offset indent -compact
.It
@@ -57,6 +57,10 @@ Shared secret
Timeout
.It
Retries
+.It
+Dead time
+.It
+Bind address
.El
.Pp
The fields are separated by white space.
@@ -139,6 +143,13 @@ If omitted, it defaults to 3 attempts.
Note,
this is the total number of attempts and not the number of retries.
.Pp
+The sixth field contains a decimal integer specifying a time interval
+in seconds when the server will not requested if it was inaccessible
+on the last try. 0 means ask always.
+.Pp
+The seventh field contains an IP address on multihomed host. All
+requests will be binded to this IP.
+.Pp
Up to 10 RADIUS servers may be specified for each service type.
The servers are tried in
round-robin fashion, until a valid response is received or the
@@ -161,6 +172,9 @@ acct radius1.domain.com OurLittleSecret
# timeout and maximum tries:
auth auth.domain.com:1645 "I can't see you" 5 4
+# As above but set dead time and bind address
+auth auth.domain.com:1645 "I can't see you" 5 4 60 192.168.1.8
+
# A server specified by its IP address:
auth 192.168.27.81 $X*#..38947ax-+=
.Ed
diff --git a/lib/libradius/radlib.c b/lib/libradius/radlib.c
index 46a9b58..55c6f5c 100644
--- a/lib/libradius/radlib.c
+++ b/lib/libradius/radlib.c
@@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$");
#include <md5.h>
#endif
+#define MAX_FIELDS 7
+
/* We need the MPPE_KEY_LEN define */
#include <netgraph/ng_mppc.h>
@@ -379,6 +381,18 @@ int
rad_add_server(struct rad_handle *h, const char *host, int port,
const char *secret, int timeout, int tries)
{
+ struct in_addr bindto;
+ bindto.s_addr = INADDR_ANY;
+
+ return rad_add_server_ex(h, host, port, secret, timeout, tries,
+ DEAD_TIME, &bindto);
+}
+
+int
+rad_add_server_ex(struct rad_handle *h, const char *host, int port,
+ const char *secret, int timeout, int tries, int dead_time,
+ struct in_addr *bindto)
+{
struct rad_server *srvp;
if (h->num_servers >= MAXSERVERS) {
@@ -421,6 +435,10 @@ rad_add_server(struct rad_handle *h, const char *host, int port,
srvp->timeout = timeout;
srvp->max_tries = tries;
srvp->num_tries = 0;
+ srvp->is_dead = 0;
+ srvp->dead_time = dead_time;
+ srvp->next_probe = 0;
+ srvp->bindto = bindto->s_addr;
h->num_servers++;
return 0;
}
@@ -441,6 +459,13 @@ rad_close(struct rad_handle *h)
free(h);
}
+void
+rad_bind_to(struct rad_handle *h, in_addr_t addr)
+{
+
+ h->bindto = addr;
+}
+
int
rad_config(struct rad_handle *h, const char *path)
{
@@ -459,7 +484,7 @@ rad_config(struct rad_handle *h, const char *path)
linenum = 0;
while (fgets(buf, sizeof buf, fp) != NULL) {
int len;
- char *fields[5];
+ char *fields[MAX_FIELDS];
int nfields;
char msg[ERRSIZE];
char *type;
@@ -468,11 +493,15 @@ rad_config(struct rad_handle *h, const char *path)
char *secret;
char *timeout_str;
char *maxtries_str;
+ char *dead_time_str;
+ char *bindto_str;
char *end;
char *wanttype;
unsigned long timeout;
unsigned long maxtries;
+ unsigned long dead_time;
int port;
+ struct in_addr bindto;
int i;
linenum++;
@@ -491,7 +520,7 @@ rad_config(struct rad_handle *h, const char *path)
buf[len - 1] = '\0';
/* Extract the fields from the line. */
- nfields = split(buf, fields, 5, msg, sizeof msg);
+ nfields = split(buf, fields, MAX_FIELDS, msg, sizeof msg);
if (nfields == -1) {
generr(h, "%s:%d: %s", path, linenum, msg);
retval = -1;
@@ -507,7 +536,7 @@ rad_config(struct rad_handle *h, const char *path)
*/
if (strcmp(fields[0], "auth") != 0 &&
strcmp(fields[0], "acct") != 0) {
- if (nfields >= 5) {
+ if (nfields >= MAX_FIELDS) {
generr(h, "%s:%d: invalid service type", path,
linenum);
retval = -1;
@@ -529,6 +558,8 @@ rad_config(struct rad_handle *h, const char *path)
secret = fields[2];
timeout_str = fields[3];
maxtries_str = fields[4];
+ dead_time_str = fields[5];
+ bindto_str = fields[6];
/* Ignore the line if it is for the wrong service type. */
wanttype = h->type == RADIUS_AUTH ? "auth" : "acct";
@@ -570,8 +601,30 @@ rad_config(struct rad_handle *h, const char *path)
} else
maxtries = MAXTRIES;
- if (rad_add_server(h, host, port, secret, timeout, maxtries) ==
- -1) {
+ if (dead_time_str != NULL) {
+ dead_time = strtoul(dead_time_str, &end, 10);
+ if (*end != '\0') {
+ generr(h, "%s:%d: invalid dead_time", path,
+ linenum);
+ retval = -1;
+ break;
+ }
+ } else
+ dead_time = DEAD_TIME;
+
+ if (bindto_str != NULL) {
+ bindto.s_addr = inet_addr(bindto_str);
+ if (bindto.s_addr == INADDR_NONE) {
+ generr(h, "%s:%d: invalid bindto", path,
+ linenum);
+ retval = -1;
+ break;
+ }
+ } else
+ bindto.s_addr = INADDR_ANY;
+
+ if (rad_add_server_ex(h, host, port, secret, timeout, maxtries,
+ dead_time, &bindto) == -1) {
strcpy(msg, h->errmsg);
generr(h, "%s:%d: %s", path, linenum, msg);
retval = -1;
@@ -596,7 +649,9 @@ int
rad_continue_send_request(struct rad_handle *h, int selected, int *fd,
struct timeval *tv)
{
- int n;
+ int n, cur_srv;
+ time_t now;
+ struct sockaddr_in sin;
if (h->type == RADIUS_SERVER) {
generr(h, "denied function call");
@@ -621,19 +676,61 @@ rad_continue_send_request(struct rad_handle *h, int selected, int *fd,
}
}
- if (h->try == h->total_tries) {
- generr(h, "No valid RADIUS responses received");
- return -1;
- }
-
/*
* Scan round-robin to the next server that has some
* tries left. There is guaranteed to be one, or we
* would have exited this loop by now.
*/
- while (h->servers[h->srv].num_tries >= h->servers[h->srv].max_tries)
- if (++h->srv >= h->num_servers)
- h->srv = 0;
+ cur_srv = h->srv;
+ now = time(NULL);
+ if (h->servers[h->srv].num_tries >= h->servers[h->srv].max_tries) {
+ /* Set next probe time for this server */
+ if (h->servers[h->srv].dead_time) {
+ h->servers[h->srv].is_dead = 1;
+ h->servers[h->srv].next_probe = now +
+ h->servers[h->srv].dead_time;
+ }
+ do {
+ h->srv++;
+ if (h->srv >= h->num_servers)
+ h->srv = 0;
+ if (h->servers[h->srv].is_dead == 0)
+ break;
+ if (h->servers[h->srv].dead_time &&
+ h->servers[h->srv].next_probe <= now) {
+ h->servers[h->srv].is_dead = 0;
+ h->servers[h->srv].num_tries = 0;
+ break;
+ }
+ } while (h->srv != cur_srv);
+
+ if (h->srv == cur_srv) {
+ generr(h, "No valid RADIUS responses received");
+ return (-1);
+ }
+ }
+
+ /* Rebind */
+ if (h->bindto != h->servers[h->srv].bindto) {
+ h->bindto = h->servers[h->srv].bindto;
+ close(h->fd);
+ if ((h->fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) {
+ generr(h, "Cannot create socket: %s", strerror(errno));
+ return -1;
+ }
+ memset(&sin, 0, sizeof sin);
+ sin.sin_len = sizeof sin;
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = h->bindto;
+ sin.sin_port = 0;
+ if (bind(h->fd, (const struct sockaddr *)&sin,
+ sizeof sin) == -1) {
+ generr(h, "bind: %s", strerror(errno));
+ close(h->fd);
+ h->fd = -1;
+ return (-1);
+ }
+ }
if (h->out[POS_CODE] == RAD_ACCESS_REQUEST) {
/* Insert the scrambled password into the request */
@@ -641,9 +738,11 @@ rad_continue_send_request(struct rad_handle *h, int selected, int *fd,
insert_scrambled_password(h, h->srv);
}
insert_message_authenticator(h, 0);
+
if (h->out[POS_CODE] != RAD_ACCESS_REQUEST) {
/* Insert the request authenticator into the request */
- insert_request_authenticator(h, h->srv);
+ memset(&h->out[POS_AUTH], 0, LEN_AUTH);
+ insert_request_authenticator(h, 0);
}
/* Send the request */
@@ -654,7 +753,6 @@ rad_continue_send_request(struct rad_handle *h, int selected, int *fd,
tv->tv_sec = 1; /* Do not wait full timeout if send failed. */
else
tv->tv_sec = h->servers[h->srv].timeout;
- h->try++;
h->servers[h->srv].num_tries++;
tv->tv_usec = 0;
*fd = h->fd;
@@ -740,6 +838,10 @@ rad_create_request(struct rad_handle *h, int code)
generr(h, "denied function call");
return (-1);
}
+ if (h->num_servers == 0) {
+ generr(h, "No RADIUS servers specified");
+ return (-1);
+ }
h->out[POS_CODE] = code;
h->out[POS_IDENT] = ++h->ident;
if (code == RAD_ACCESS_REQUEST) {
@@ -756,16 +858,9 @@ rad_create_request(struct rad_handle *h, int code)
clear_password(h);
h->authentic_pos = 0;
h->out_created = 1;
- h->bindto = INADDR_ANY;
return 0;
}
-void
-rad_bind_to(struct rad_handle *h, in_addr_t addr)
-{
- h->bindto = addr;
-}
-
int
rad_create_response(struct rad_handle *h, int code)
{
@@ -793,6 +888,15 @@ rad_cvt_addr(const void *data)
return value;
}
+struct in6_addr
+rad_cvt_addr6(const void *data)
+{
+ struct in6_addr value;
+
+ memcpy(&value.s6_addr, data, sizeof value.s6_addr);
+ return value;
+}
+
u_int32_t
rad_cvt_int(const void *data)
{
@@ -848,6 +952,8 @@ int
rad_init_send_request(struct rad_handle *h, int *fd, struct timeval *tv)
{
int srv;
+ time_t now;
+ struct sockaddr_in sin;
if (h->type == RADIUS_SERVER) {
generr(h, "denied function call");
@@ -855,8 +961,6 @@ rad_init_send_request(struct rad_handle *h, int *fd, struct timeval *tv)
}
/* Make sure we have a socket to use */
if (h->fd == -1) {
- struct sockaddr_in sin;
-
if ((h->fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) {
generr(h, "Cannot create socket: %s", strerror(errno));
return -1;
@@ -902,21 +1006,30 @@ rad_init_send_request(struct rad_handle *h, int *fd, struct timeval *tv)
h->out[POS_LENGTH] = h->out_len >> 8;
h->out[POS_LENGTH+1] = h->out_len;
- /*
- * Count the total number of tries we will make, and zero the
- * counter for each server.
- */
- h->total_tries = 0;
- for (srv = 0; srv < h->num_servers; srv++) {
- h->total_tries += h->servers[srv].max_tries;
+ h->srv = 0;
+ now = time(NULL);
+ for (srv = 0; srv < h->num_servers; srv++)
h->servers[srv].num_tries = 0;
- }
- if (h->total_tries == 0) {
- generr(h, "No RADIUS servers specified");
- return -1;
+ /* Find a first good server. */
+ for (srv = 0; srv < h->num_servers; srv++) {
+ if (h->servers[srv].is_dead == 0)
+ break;
+ if (h->servers[srv].dead_time &&
+ h->servers[srv].next_probe <= now) {
+ h->servers[srv].is_dead = 0;
+ break;
+ }
+ h->srv++;
}
- h->try = h->srv = 0;
+ /* If all servers was dead on the last probe, try from beginning */
+ if (h->srv == h->num_servers) {
+ for (srv = 0; srv < h->num_servers; srv++) {
+ h->servers[srv].is_dead = 0;
+ h->servers[srv].next_probe = 0;
+ }
+ h->srv = 0;
+ }
return rad_continue_send_request(h, 0, fd, tv);
}
@@ -946,6 +1059,7 @@ rad_auth_open(void)
h->type = RADIUS_AUTH;
h->out_created = 0;
h->eap_msg = 0;
+ h->bindto = INADDR_ANY;
}
return h;
}
@@ -987,6 +1101,13 @@ rad_put_addr(struct rad_handle *h, int type, struct in_addr addr)
}
int
+rad_put_addr6(struct rad_handle *h, int type, struct in6_addr addr)
+{
+
+ return rad_put_attr(h, type, &addr.s6_addr, sizeof addr.s6_addr);
+}
+
+int
rad_put_attr(struct rad_handle *h, int type, const void *value, size_t len)
{
int result;
@@ -1229,6 +1350,15 @@ rad_put_vendor_addr(struct rad_handle *h, int vendor, int type,
}
int
+rad_put_vendor_addr6(struct rad_handle *h, int vendor, int type,
+ struct in6_addr addr)
+{
+
+ return (rad_put_vendor_attr(h, vendor, type, &addr.s6_addr,
+ sizeof addr.s6_addr));
+}
+
+int
rad_put_vendor_attr(struct rad_handle *h, int vendor, int type,
const void *value, size_t len)
{
diff --git a/lib/libradius/radlib.h b/lib/libradius/radlib.h
index f9e451b..a479318 100644
--- a/lib/libradius/radlib.h
+++ b/lib/libradius/radlib.h
@@ -194,6 +194,9 @@ __BEGIN_DECLS
struct rad_handle *rad_acct_open(void);
int rad_add_server(struct rad_handle *,
const char *, int, const char *, int, int);
+int rad_add_server_ex(struct rad_handle *,
+ const char *, int, const char *, int, int,
+ int, struct in_addr *);
struct rad_handle *rad_auth_open(void);
void rad_bind_to(struct rad_handle *, in_addr_t);
void rad_close(struct rad_handle *);
@@ -203,6 +206,7 @@ int rad_continue_send_request(struct rad_handle *, int,
int rad_create_request(struct rad_handle *, int);
int rad_create_response(struct rad_handle *, int);
struct in_addr rad_cvt_addr(const void *);
+struct in6_addr rad_cvt_addr6(const void *);
u_int32_t rad_cvt_int(const void *);
char *rad_cvt_string(const void *, size_t);
int rad_get_attr(struct rad_handle *, const void **,
@@ -211,6 +215,7 @@ int rad_init_send_request(struct rad_handle *, int *,
struct timeval *);
struct rad_handle *rad_open(void); /* Deprecated, == rad_auth_open */
int rad_put_addr(struct rad_handle *, int, struct in_addr);
+int rad_put_addr6(struct rad_handle *, int, struct in6_addr);
int rad_put_attr(struct rad_handle *, int,
const void *, size_t);
int rad_put_int(struct rad_handle *, int, u_int32_t);
diff --git a/lib/libradius/radlib_private.h b/lib/libradius/radlib_private.h
index a76e594aa..bfbbbd1 100644
--- a/lib/libradius/radlib_private.h
+++ b/lib/libradius/radlib_private.h
@@ -46,6 +46,7 @@
#define RADIUS_PORT 1812
#define RADACCT_PORT 1813
#define TIMEOUT 3 /* In seconds */
+#define DEAD_TIME 0
/* Limits */
#define ERRSIZE 128 /* Maximum error message length */
@@ -68,6 +69,10 @@ struct rad_server {
int timeout; /* Timeout in seconds */
int max_tries; /* Number of tries before giving up */
int num_tries; /* Number of tries so far */
+ int is_dead; /* The server did not answer last time */
+ time_t dead_time; /* Don't try this server for the time period if it is dead */
+ time_t next_probe; /* Time of a next probe after failure */
+ in_addr_t bindto; /* Bind to address */
};
struct rad_handle {
@@ -88,11 +93,9 @@ struct rad_handle {
unsigned char in[MSGSIZE]; /* Response received */
int in_len; /* Length of response */
int in_pos; /* Current position scanning attrs */
- int total_tries; /* How many requests we'll send */
- int try; /* How many requests we've sent */
int srv; /* Server number we did last */
int type; /* Handle type */
- in_addr_t bindto; /* Bind to address */
+ in_addr_t bindto; /* Current bind address */
};
struct vendor_attribute {
diff --git a/lib/libradius/radlib_vs.h b/lib/libradius/radlib_vs.h
index 8b3a75e..0acfb0e 100644
--- a/lib/libradius/radlib_vs.h
+++ b/lib/libradius/radlib_vs.h
@@ -73,6 +73,7 @@ struct rad_handle;
__BEGIN_DECLS
int rad_get_vendor_attr(u_int32_t *, const void **, size_t *);
int rad_put_vendor_addr(struct rad_handle *, int, int, struct in_addr);
+int rad_put_vendor_addr6(struct rad_handle *, int, int, struct in6_addr);
int rad_put_vendor_attr(struct rad_handle *, int, int, const void *,
size_t);
int rad_put_vendor_int(struct rad_handle *, int, int, u_int32_t);
diff --git a/sys/boot/userboot/libstand/amd64/_setjmp.S b/lib/libstand/amd64/_setjmp.S
index e841f49..e841f49 100644
--- a/sys/boot/userboot/libstand/amd64/_setjmp.S
+++ b/lib/libstand/amd64/_setjmp.S
diff --git a/lib/libutil/gr_util.c b/lib/libutil/gr_util.c
index be34395..acb9767 100644
--- a/lib/libutil/gr_util.c
+++ b/lib/libutil/gr_util.c
@@ -44,11 +44,6 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>
-struct group_storage {
- struct group gr;
- char *members[];
-};
-
static int lockfd = -1;
static char group_dir[PATH_MAX];
static char group_file[PATH_MAX];
@@ -106,10 +101,8 @@ gr_lock(void)
for (;;) {
struct stat st;
- lockfd = open(group_file, O_RDONLY, 0);
- if (lockfd < 0 || fcntl(lockfd, F_SETFD, 1) == -1)
- err(1, "%s", group_file);
- if (flock(lockfd, LOCK_EX|LOCK_NB) == -1) {
+ lockfd = flopen(group_file, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0);
+ if (lockfd == -1) {
if (errno == EWOULDBLOCK) {
errx(1, "the group file is busy");
} else {
@@ -436,14 +429,14 @@ gr_make(const struct group *gr)
struct group *
gr_dup(const struct group *gr)
{
+ struct group *newgr;
char *dst;
size_t len;
- struct group_storage *gs;
int ndx;
int num_mem;
/* Calculate size of the group. */
- len = sizeof(*gs);
+ len = sizeof(*newgr);
if (gr->gr_name != NULL)
len += strlen(gr->gr_name) + 1;
if (gr->gr_passwd != NULL)
@@ -454,30 +447,72 @@ gr_dup(const struct group *gr)
len += (num_mem + 1) * sizeof(*gr->gr_mem);
} else
num_mem = -1;
-
/* Create new group and copy old group into it. */
- if ((gs = calloc(1, len)) == NULL)
+ if ((newgr = malloc(len)) == NULL)
return (NULL);
- dst = (char *)&gs->members[num_mem + 1];
+ /* point new gr_mem to end of struct + 1 */
+ if (gr->gr_mem != NULL)
+ newgr->gr_mem = (char **)(newgr + 1);
+ else
+ newgr->gr_mem = NULL;
+ /* point dst after the end of all the gr_mem pointers in newgr */
+ dst = (char *)&newgr->gr_mem[num_mem + 1];
if (gr->gr_name != NULL) {
- gs->gr.gr_name = dst;
- dst = stpcpy(gs->gr.gr_name, gr->gr_name) + 1;
+ newgr->gr_name = dst;
+ dst = stpcpy(dst, gr->gr_name) + 1;
+ } else {
+ newgr->gr_name = NULL;
}
if (gr->gr_passwd != NULL) {
- gs->gr.gr_passwd = dst;
- dst = stpcpy(gs->gr.gr_passwd, gr->gr_passwd) + 1;
+ newgr->gr_passwd = dst;
+ dst = stpcpy(dst, gr->gr_passwd) + 1;
+ } else {
+ newgr->gr_passwd = NULL;
}
- gs->gr.gr_gid = gr->gr_gid;
+ newgr->gr_gid = gr->gr_gid;
if (gr->gr_mem != NULL) {
- gs->gr.gr_mem = gs->members;
for (ndx = 0; ndx < num_mem; ndx++) {
- gs->gr.gr_mem[ndx] = dst;
- dst = stpcpy(gs->gr.gr_mem[ndx], gr->gr_mem[ndx]) + 1;
+ newgr->gr_mem[ndx] = dst;
+ dst = stpcpy(dst, gr->gr_mem[ndx]) + 1;
}
- gs->gr.gr_mem[ndx] = NULL;
+ newgr->gr_mem[ndx] = NULL;
}
+ return (newgr);
+}
+
+/*
+ * Add a new member name to a struct group.
+ */
+struct group *
+gr_add(struct group *gr, char *newmember)
+{
+ size_t mlen;
+ int num_mem=0;
+ char **members;
+ struct group *newgr;
- return (&gs->gr);
+ if (newmember == NULL)
+ return(gr_dup(gr));
+
+ if (gr->gr_mem != NULL) {
+ for (num_mem = 0; gr->gr_mem[num_mem] != NULL; num_mem++) {
+ if (strcmp(gr->gr_mem[num_mem], newmember) == 0) {
+ errno = EEXIST;
+ return (NULL);
+ }
+ }
+ }
+ /* Allocate enough for current pointers + 1 more and NULL marker */
+ mlen = (num_mem + 2) * sizeof(*gr->gr_mem);
+ if ((members = malloc(mlen)) == NULL)
+ return (NULL);
+ memcpy(members, gr->gr_mem, num_mem * sizeof(*gr->gr_mem));
+ members[num_mem++] = newmember;
+ members[num_mem] = NULL;
+ gr->gr_mem = members;
+ newgr = gr_dup(gr);
+ free(members);
+ return (newgr);
}
/*
diff --git a/lib/libutil/libutil.h b/lib/libutil/libutil.h
index bf42766..b1b2405 100644
--- a/lib/libutil/libutil.h
+++ b/lib/libutil/libutil.h
@@ -166,6 +166,8 @@ int gr_copy(int __ffd, int _tfd, const struct group *_gr,
struct group *_old_gr);
struct group *
gr_dup(const struct group *_gr);
+struct group *
+ gr_add(struct group *_gr, char *_newmember);
int gr_equal(const struct group *_gr1, const struct group *_gr2);
void gr_fini(void);
int gr_init(const char *_dir, const char *_master);
diff --git a/lib/libutil/pw_util.c b/lib/libutil/pw_util.c
index 4bf3001..befd1fb 100644
--- a/lib/libutil/pw_util.c
+++ b/lib/libutil/pw_util.c
@@ -179,11 +179,8 @@ pw_lock(void)
for (;;) {
struct stat st;
- lockfd = open(masterpasswd, O_RDONLY, 0);
- if (lockfd < 0 || fcntl(lockfd, F_SETFD, 1) == -1)
- err(1, "%s", masterpasswd);
- /* XXX vulnerable to race conditions */
- if (flock(lockfd, LOCK_EX|LOCK_NB) == -1) {
+ lockfd = flopen(masterpasswd, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0);
+ if (lockfd == -1) {
if (errno == EWOULDBLOCK) {
errx(1, "the password db file is busy");
} else {
diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile
index 80737e8..e41477d 100644
--- a/libexec/rtld-elf/Makefile
+++ b/libexec/rtld-elf/Makefile
@@ -62,7 +62,7 @@ SYMBOL_MAPS+= ${.CURDIR}/${RTLD_ARCH}/Symbol.map
# Fixup the existing binary that's there so we can symlink over it.
beforeinstall:
.if exists(${DESTDIR}/usr/libexec/${PROG})
- -chflags noschg ${DESTDIR}/usr/libexec/${PROG}
+ -chflags -h noschg ${DESTDIR}/usr/libexec/${PROG}
.endif
.PATH: ${.CURDIR}/${RTLD_ARCH}
diff --git a/libexec/tftpd/tftp-io.c b/libexec/tftpd/tftp-io.c
index d5d7fc6..1d4f743 100644
--- a/libexec/tftpd/tftp-io.c
+++ b/libexec/tftpd/tftp-io.c
@@ -87,14 +87,13 @@ errtomsg(int error)
{
static char ebuf[40];
struct errmsg *pe;
- char buf[MAXPKTSIZE];
if (error == 0)
return ("success");
for (pe = errmsgs; pe->e_code >= 0; pe++)
if (pe->e_code == error)
return (pe->e_msg);
- snprintf(ebuf, sizeof(buf), "error %d", error);
+ snprintf(ebuf, sizeof(ebuf), "error %d", error);
return (ebuf);
}
diff --git a/release/picobsd/build/picobsd b/release/picobsd/build/picobsd
index ae602b2..bc78832 100755
--- a/release/picobsd/build/picobsd
+++ b/release/picobsd/build/picobsd
@@ -445,6 +445,8 @@ do_kernel() { # OK
${BINMAKE} ${o_par} KERNCONF=${l_kernconf} \
-v -f ${PICO_TREE}/build/Makefile.conf ) || \
fail $? missing_kernel
+# -DWITHOUT_CLANG_IS_CC \
+
}
# Populate the variable part of the floppy filesystem. Must be done before
@@ -973,6 +975,7 @@ set_build_parameters() {
if [ ${OSVERSION} -ge 500035 ] ; then
export MAKEOBJDIRPREFIX=${l_objtree}
export TARGET_ARCH=${o_arch} TARGET=${o_arch}
+ export WITHOUT_CLANG_IS_CC=1
# XXX why change machine_arch ?
#-- export MACHINE_ARCH=`uname -m` MACHINE=`uname -m`
# export CWARNFLAGS="-Wextra -Wno-sign-compare -Wno-missing-field-initializers"
diff --git a/release/picobsd/floppy.tree/etc/ppp/ppp.conf b/release/picobsd/floppy.tree/etc/ppp/ppp.conf
index 30981ef..e9ddabf 100644
--- a/release/picobsd/floppy.tree/etc/ppp/ppp.conf
+++ b/release/picobsd/floppy.tree/etc/ppp/ppp.conf
@@ -2,7 +2,7 @@
# PPP Sample Configuration File
# Written by Toshiharu OHNO
default:
- set device /dev/cuad1
+ set device /dev/cuau1
set speed 38400
disable lqr
deny lqr
diff --git a/release/picobsd/mfs_tree/etc/remote b/release/picobsd/mfs_tree/etc/remote
index f881f6b..523a4c2 100644
--- a/release/picobsd/mfs_tree/etc/remote
+++ b/release/picobsd/mfs_tree/etc/remote
@@ -41,10 +41,10 @@ dos1200|1200 Baud dial-out to a DOS system:\
# Rackmount: U U D U D U D D U D
#
dial2400|2400 Baud Hayes attributes:\
- :dv=/dev/cuad0:br#2400:cu=/dev/cuad0:at=hayes:du:
+ :dv=/dev/cuau0:br#2400:cu=/dev/cuau0:at=hayes:du:
dial1200|1200 Baud Hayes attributes:\
- :dv=/dev/cuad0:br#1200:cu=/dev/cuad0:at=hayes:du:
+ :dv=/dev/cuau0:br#1200:cu=/dev/cuau0:at=hayes:du:
# Hardwired line
-cuad0b|cua0b:dv=/dev/cuad0:br#2400
-cuad0c|cua0c:dv=/dev/cuad0:br#9600
+cuau0b|cua0b:dv=/dev/cuau0:br#2400
+cuau0c|cua0c:dv=/dev/cuau0:br#9600
diff --git a/sbin/comcontrol/comcontrol.8 b/sbin/comcontrol/comcontrol.8
index 87a7630..ec12dee 100644
--- a/sbin/comcontrol/comcontrol.8
+++ b/sbin/comcontrol/comcontrol.8
@@ -49,7 +49,7 @@ startup script.
.Bl -tag -width /dev/ttyd? -compact
.It Pa /dev/ttyd?
dialin devices, hardwired terminals
-.It Pa /dev/cuad?
+.It Pa /dev/cuau?
dialout devices
.El
.Sh SEE ALSO
diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc
index 7724719..576dcf6 100644
--- a/sbin/devd/devd.cc
+++ b/sbin/devd/devd.cc
@@ -127,7 +127,7 @@ delete_and_clear(vector<T *> &v)
{
typename vector<T *>::const_iterator i;
- for (i = v.begin(); i != v.end(); i++)
+ for (i = v.begin(); i != v.end(); ++i)
delete *i;
v.clear();
}
@@ -151,22 +151,22 @@ event_proc::add(eps *eps)
}
bool
-event_proc::matches(config &c)
+event_proc::matches(config &c) const
{
vector<eps *>::const_iterator i;
- for (i = _epsvec.begin(); i != _epsvec.end(); i++)
+ for (i = _epsvec.begin(); i != _epsvec.end(); ++i)
if (!(*i)->do_match(c))
return (false);
return (true);
}
bool
-event_proc::run(config &c)
+event_proc::run(config &c) const
{
vector<eps *>::const_iterator i;
- for (i = _epsvec.begin(); i != _epsvec.end(); i++)
+ for (i = _epsvec.begin(); i != _epsvec.end(); ++i)
if (!(*i)->do_action(c))
return (false);
return (true);
@@ -248,9 +248,8 @@ action::do_action(config &c)
}
match::match(config &c, const char *var, const char *re)
- : _var(var)
+ : _var(var), _re("^")
{
- _re = "^";
if (!c.expand_string(string(re)).empty() &&
c.expand_string(string(re)).at(0) == '!') {
_re.append(c.expand_string(string(re)).substr(1));
@@ -301,7 +300,7 @@ media::media(config &, const char *var, const char *type)
{ -1, "unknown" },
{ 0, NULL },
};
- for (int i = 0; media_types[i].ifmt_string != NULL; i++)
+ for (int i = 0; media_types[i].ifmt_string != NULL; ++i)
if (strcasecmp(type, media_types[i].ifmt_string) == 0) {
_type = media_types[i].ifmt_word;
break;
@@ -436,7 +435,7 @@ config::parse_files_in_dir(const char *dirname)
class epv_greater {
public:
- int operator()(event_proc *const&l1, event_proc *const&l2)
+ int operator()(event_proc *const&l1, event_proc *const&l2) const
{
return (l1->get_priority() > l2->get_priority());
}
@@ -445,7 +444,7 @@ public:
void
config::sort_vector(vector<event_proc *> &v)
{
- sort(v.begin(), v.end(), epv_greater());
+ stable_sort(v.begin(), v.end(), epv_greater());
}
void
@@ -454,7 +453,7 @@ config::parse(void)
vector<string>::const_iterator i;
parse_one_file(configfile);
- for (i = _dir_list.begin(); i != _dir_list.end(); i++)
+ for (i = _dir_list.begin(); i != _dir_list.end(); ++i)
parse_files_in_dir((*i).c_str());
sort_vector(_attach_list);
sort_vector(_detach_list);
@@ -569,7 +568,7 @@ config::get_variable(const string &var)
{
vector<var_list *>::reverse_iterator i;
- for (i = _var_list_table.rbegin(); i != _var_list_table.rend(); i++) {
+ for (i = _var_list_table.rbegin(); i != _var_list_table.rend(); ++i) {
if ((*i)->is_set(var))
return ((*i)->get_variable(var));
}
@@ -577,7 +576,7 @@ config::get_variable(const string &var)
}
bool
-config::is_id_char(char ch)
+config::is_id_char(char ch) const
{
return (ch != '\0' && (isalpha(ch) || isdigit(ch) || ch == '_' ||
ch == '-'));
@@ -726,7 +725,7 @@ config::find_and_execute(char type)
}
if (Dflag)
fprintf(stderr, "Processing %s event\n", s);
- for (i = l->begin(); i != l->end(); i++) {
+ for (i = l->begin(); i != l->end(); ++i) {
if ((*i)->matches(*this)) {
(*i)->run(*this);
break;
@@ -823,14 +822,14 @@ notify_clients(const char *data, int len)
list<int> bad;
list<int>::const_iterator i;
- for (i = clients.begin(); i != clients.end(); i++) {
+ for (i = clients.begin(); i != clients.end(); ++i) {
if (write(*i, data, len) <= 0) {
bad.push_back(*i);
close(*i);
}
}
- for (i = bad.begin(); i != bad.end(); i++)
+ for (i = bad.begin(); i != bad.end(); ++i)
clients.erase(find(clients.begin(), clients.end(), *i));
}
diff --git a/sbin/devd/devd.hh b/sbin/devd/devd.hh
index 1830dad..3613216 100644
--- a/sbin/devd/devd.hh
+++ b/sbin/devd/devd.hh
@@ -134,8 +134,8 @@ public:
int get_priority() const { return (_prio); }
void set_priority(int prio) { _prio = prio; }
void add(eps *);
- bool matches(config &);
- bool run(config &);
+ bool matches(config &) const;
+ bool run(config &) const;
private:
int _prio;
std::vector<eps *> _epsvec;
@@ -144,7 +144,7 @@ private:
class config
{
public:
- config() { _pidfile = ""; push_var_table(); }
+ config() : _pidfile("") { push_var_table(); }
virtual ~config() { reset(); }
void add_attach(int, event_proc *);
void add_detach(int, event_proc *);
@@ -170,7 +170,7 @@ protected:
void parse_one_file(const char *fn);
void parse_files_in_dir(const char *dirname);
void expand_one(const char *&src, std::string &dst);
- bool is_id_char(char);
+ bool is_id_char(char) const;
bool chop_var(char *&buffer, char *&lhs, char *&rhs);
private:
std::vector<std::string> _dir_list;
diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c
index 042aada..745e9e9 100644
--- a/sbin/growfs/growfs.c
+++ b/sbin/growfs/growfs.c
@@ -1487,6 +1487,12 @@ main(int argc, char **argv)
}
}
+ /*
+ * Make sure the new size is a multiple of fs_fsize; /dev/ufssuspend
+ * only supports fragment-aligned IO requests.
+ */
+ size -= size % osblock.fs_fsize;
+
if (size <= (uint64_t)(osblock.fs_size * osblock.fs_fsize)) {
humanize_number(oldsizebuf, sizeof(oldsizebuf),
osblock.fs_size * osblock.fs_fsize,
@@ -1605,17 +1611,20 @@ main(int argc, char **argv)
}
sblock.fs_ncg = howmany(sblock.fs_size, sblock.fs_fpg);
+ /*
+ * Allocate last cylinder group only if there is enough room
+ * for at least one data block.
+ */
if (sblock.fs_size % sblock.fs_fpg != 0 &&
- sblock.fs_size % sblock.fs_fpg < cgdmin(&sblock, sblock.fs_ncg)) {
- /*
- * The space in the new last cylinder group is too small,
- * so revert back.
- */
+ sblock.fs_size <= cgdmin(&sblock, sblock.fs_ncg - 1)) {
+ humanize_number(oldsizebuf, sizeof(oldsizebuf),
+ (sblock.fs_size % sblock.fs_fpg) * sblock.fs_fsize,
+ "B", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL);
+ warnx("no room to allocate last cylinder group; "
+ "leaving %s unused", oldsizebuf);
sblock.fs_ncg--;
if (sblock.fs_magic == FS_UFS1_MAGIC)
sblock.fs_old_ncyl = sblock.fs_ncg * sblock.fs_old_cpg;
- printf("Warning: %jd sector(s) cannot be allocated.\n",
- (intmax_t)fsbtodb(&sblock, sblock.fs_size % sblock.fs_fpg));
sblock.fs_size = sblock.fs_ncg * sblock.fs_fpg;
}
diff --git a/sbin/hastd/parse.y b/sbin/hastd/parse.y
index a20b61a..04ea7ab 100644
--- a/sbin/hastd/parse.y
+++ b/sbin/hastd/parse.y
@@ -769,7 +769,7 @@ family_supported(int family)
int sock;
sock = socket(family, SOCK_STREAM, 0);
- if (sock == -1 && errno == EPROTONOSUPPORT)
+ if (sock == -1 && errno == EAFNOSUPPORT)
return (false);
if (sock >= 0)
(void)close(sock);
diff --git a/sbin/ifconfig/af_inet6.c b/sbin/ifconfig/af_inet6.c
index a9ad867..5911a94 100644
--- a/sbin/ifconfig/af_inet6.c
+++ b/sbin/ifconfig/af_inet6.c
@@ -251,8 +251,9 @@ in6_status(int s __unused, const struct ifaddrs *ifa)
if ((flags6 & IN6_IFF_TEMPORARY) != 0)
printf("temporary ");
- if (sin->sin6_scope_id)
- printf("scopeid 0x%x ", sin->sin6_scope_id);
+ if (((struct sockaddr_in6 *)(ifa->ifa_addr))->sin6_scope_id)
+ printf("scopeid 0x%x ",
+ ((struct sockaddr_in6 *)(ifa->ifa_addr))->sin6_scope_id);
if (ip6lifetime && (lifetime.ia6t_preferred || lifetime.ia6t_expire)) {
printf("pltime ");
diff --git a/sbin/ifconfig/af_nd6.c b/sbin/ifconfig/af_nd6.c
index 654e2d9..80065f6 100644
--- a/sbin/ifconfig/af_nd6.c
+++ b/sbin/ifconfig/af_nd6.c
@@ -148,7 +148,7 @@ nd6_status(int s)
memset(&nd, 0, sizeof(nd));
strncpy(nd.ifname, ifr.ifr_name, sizeof(nd.ifname));
if ((s6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) {
- if (errno != EPROTONOSUPPORT)
+ if (errno != EAFNOSUPPORT)
warn("socket(AF_INET6, SOCK_DGRAM)");
return;
}
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 870acdd..983e21f 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -520,7 +520,7 @@ top:
AF_LOCAL : afp->af_af;
if ((s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0)) < 0 &&
- (uafp != NULL || errno != EPROTONOSUPPORT ||
+ (uafp != NULL || errno != EAFNOSUPPORT ||
(s = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0))
err(1, "socket(family %u,SOCK_DGRAM", ifr.ifr_addr.sa_family);
diff --git a/sbin/mount_nfs/mount_nfs.8 b/sbin/mount_nfs/mount_nfs.8
index b1b5c6e..26ed091 100644
--- a/sbin/mount_nfs/mount_nfs.8
+++ b/sbin/mount_nfs/mount_nfs.8
@@ -28,7 +28,7 @@
.\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95
.\" $FreeBSD$
.\"
-.Dd May 3, 2011
+.Dd December 9, 2012
.Dt MOUNT_NFS 8
.Os
.Sh NAME
@@ -175,6 +175,18 @@ Use the NFS Version 3 protocol.
Use the NFS Version 4 protocol.
This option will force the mount to use
TCP transport.
+.It Cm minorversion Ns = Ns Aq Ar value
+Override the default of 0 for the minor version of the NFS Version 4 protocol.
+The only minor version currently supported is 1.
+This option is only meaningful when used with the
+.Cm nfsv4
+option.
+.It Cm pnfs
+Enable support for parallel NFS (pNFS) for minor version 1 of the
+NFS Version 4 protocol.
+This option is only meaningful when used with the
+.Cm minorversion
+option.
.It Cm noconn
For UDP mount points, do not do a
.Xr connect 2 .
diff --git a/sbin/pflogd/Makefile b/sbin/pflogd/Makefile
index ea37bd1..fcff8eb 100644
--- a/sbin/pflogd/Makefile
+++ b/sbin/pflogd/Makefile
@@ -9,7 +9,7 @@ MAN= pflogd.8
CFLAGS+=-include ${.CURDIR}/../../lib/libpcap/config.h
LDADD= -lpcap
-DPADD= ${LIBPCAP} ${LIBUTIL}
+DPADD= ${LIBPCAP}
WARNS?= 2
diff --git a/sbin/route/route.c b/sbin/route/route.c
index 58a92e1..847f3ee 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -260,19 +260,25 @@ static int
fiboptlist_range(const char *arg, struct fibl_head_t *flh)
{
struct fibl *fl;
- char *str, *token, *endptr;
+ char *str0, *str, *token, *endptr;
int fib[2], i, error;
- str = strdup(arg);
+ str0 = str = strdup(arg);
error = 0;
i = 0;
while ((token = strsep(&str, "-")) != NULL) {
switch (i) {
case 0:
case 1:
+ errno = 0;
fib[i] = strtol(token, &endptr, 0);
- if (*endptr != '\0' || (fib[i] == 0 &&
- (errno == EINVAL || errno == ERANGE)))
+ if (errno == 0) {
+ if (*endptr != '\0' ||
+ fib[i] < 0 ||
+ (numfibs != -1 && fib[i] > numfibs - 1))
+ errno = EINVAL;
+ }
+ if (errno)
error = 1;
break;
default:
@@ -296,7 +302,7 @@ fiboptlist_range(const char *arg, struct fibl_head_t *flh)
TAILQ_INSERT_TAIL(flh, fl, fl_next);
}
fiboptlist_range_ret:
- free(str);
+ free(str0);
return (error);
}
@@ -305,7 +311,7 @@ static int
fiboptlist_csv(const char *arg, struct fibl_head_t *flh)
{
struct fibl *fl;
- char *str, *token, *endptr;
+ char *str0, *str, *token, *endptr;
int fib, error;
if (strcmp("all", arg) == 0) {
@@ -319,14 +325,14 @@ fiboptlist_csv(const char *arg, struct fibl_head_t *flh)
else
snprintf(str, ALLSTRLEN - 1, "%d", 0);
} else if (strcmp("default", arg) == 0) {
- str = calloc(1, ALLSTRLEN);
+ str0 = str = calloc(1, ALLSTRLEN);
if (str == NULL) {
error = 1;
goto fiboptlist_csv_ret;
}
snprintf(str, ALLSTRLEN - 1, "%d", defaultfib);
} else
- str = strdup(arg);
+ str0 = str = strdup(arg);
error = 0;
while ((token = strsep(&str, ",")) != NULL) {
@@ -335,9 +341,15 @@ fiboptlist_csv(const char *arg, struct fibl_head_t *flh)
if (error)
goto fiboptlist_csv_ret;
} else {
+ errno = 0;
fib = strtol(token, &endptr, 0);
- if (*endptr != '\0' || (fib == 0 &&
- (errno == EINVAL || errno == ERANGE))) {
+ if (errno == 0) {
+ if (*endptr != '\0' ||
+ fib < 0 ||
+ (numfibs != -1 && fib > numfibs - 1))
+ errno = EINVAL;
+ }
+ if (errno) {
error = 1;
goto fiboptlist_csv_ret;
}
@@ -351,7 +363,7 @@ fiboptlist_csv(const char *arg, struct fibl_head_t *flh)
}
}
fiboptlist_csv_ret:
- free(str);
+ free(str0);
return (error);
}
@@ -365,7 +377,7 @@ flushroutes(int argc, char *argv[])
struct fibl *fl;
int error;
- if (uid != 0 && !debugonly) {
+ if (uid != 0 && !debugonly && !tflag) {
errx(EX_NOPERM, "must be root to alter routing table");
}
shutdown(s, SHUT_RD); /* Don't want to read back our messages */
@@ -396,7 +408,7 @@ flushroutes(int argc, char *argv[])
usage(*argv);
error = fiboptlist_csv(*++argv, &fibl_head);
if (error)
- usage(*argv);
+ errx(EX_USAGE, "invalid fib number: %s", *argv);
break;
default:
usage(*argv);
@@ -727,7 +739,7 @@ newroute(int argc, char **argv)
const char *dest, *gateway, *errmsg;
int key, error, flags, nrflags, fibnum;
- if (uid != 0) {
+ if (uid != 0 && !debugonly && !tflag) {
errx(EX_NOPERM, "must be root to alter routing table");
}
@@ -815,7 +827,8 @@ newroute(int argc, char **argv)
usage(NULL);
error = fiboptlist_csv(*++argv, &fibl_head);
if (error)
- usage(NULL);
+ errx(EX_USAGE,
+ "invalid fib number: %s", *argv);
break;
case K_IFA:
if (!--argc)
@@ -1033,6 +1046,13 @@ inet_makenetandmask(u_long net, struct sockaddr_in *sin, u_long bits)
rtm_addrs |= RTA_NETMASK;
/*
+ * MSB of net should be meaningful. 0/0 is exception.
+ */
+ if (net > 0)
+ while ((net & 0xff000000) == 0)
+ net <<= 8;
+
+ /*
* If no /xx was specified we must calculate the
* CIDR address.
*/
@@ -1376,10 +1396,16 @@ monitor(int argc, char *argv[])
case K_FIB:
if (!--argc)
usage(*argv);
+ errno = 0;
fib = strtol(*++argv, &endptr, 0);
- if (*endptr != '\0' || (fib == 0 &&
- (errno == EINVAL || errno == ERANGE)))
- usage(*argv);
+ if (errno == 0) {
+ if (*endptr != '\0' ||
+ fib < 0 ||
+ (numfibs != -1 && fib > numfibs - 1))
+ errno = EINVAL;
+ }
+ if (errno)
+ errx(EX_USAGE, "invalid fib number: %s", *argv);
break;
default:
usage(*argv);
@@ -1632,6 +1658,7 @@ print_rtmsg(struct rt_msghdr *rtm, size_t msglen)
break;
}
printf("\n");
+ fflush(stdout);
break;
default:
diff --git a/sbin/savecore/savecore.8 b/sbin/savecore/savecore.8
index 01be723..c7d7e95 100644
--- a/sbin/savecore/savecore.8
+++ b/sbin/savecore/savecore.8
@@ -28,7 +28,7 @@
.\" From: @(#)savecore.8 8.1 (Berkeley) 6/5/93
.\" $FreeBSD$
.\"
-.Dd December 24, 2008
+.Dd December 17, 2012
.Dt SAVECORE 8
.Os
.Sh NAME
@@ -37,12 +37,15 @@
.Sh SYNOPSIS
.Nm
.Fl c
+.Op Fl v
+.Op Ar device ...
.Nm
.Fl C
.Op Fl v
-.Op Ar directory device
+.Op Ar device ...
.Nm
.Op Fl fkvz
+.Op Fl m Ar maxdumps
.Op Ar directory Op Ar device ...
.Sh DESCRIPTION
The
@@ -57,7 +60,7 @@ and enters a reboot message and information about the core dump into
the system log.
.Pp
The options are as follows:
-.Bl -tag -width indent
+.Bl -tag -width ".Fl m Ar maxdumps"
.It Fl C
Check to see if a dump exists,
and display a brief message to indicate the status.
@@ -75,6 +78,12 @@ Force a dump to be taken even if either the dump was cleared or if the
dump header information is inconsistent.
.It Fl k
Do not clear the dump after saving it.
+.It Fl m Ar maxdumps
+Maximum number of dumps to store.
+Once the number of stored dumps is equal to
+.Ar maxdumps
+the counter will restart from
+.Dv 0 .
.It Fl v
Print out some additional debugging information.
Specify twice for more information.
diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c
index b3f2902..bdbf7e3 100644
--- a/sbin/savecore/savecore.c
+++ b/sbin/savecore/savecore.c
@@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$");
static int checkfor, compress, clear, force, keep, verbose; /* flags */
static int nfound, nsaved, nerr; /* statistics */
+static int maxdumps;
extern FILE *zopen(const char *, const char *);
@@ -178,27 +179,87 @@ writebounds(int bounds) {
fclose(fp);
}
+static off_t
+file_size(const char *path)
+{
+ struct stat sb;
+
+ /* Ignore all errors, those file may not exists. */
+ if (stat(path, &sb) == -1)
+ return (0);
+ return (sb.st_size);
+}
+
+static off_t
+saved_dump_size(int bounds)
+{
+ static char path[PATH_MAX];
+ off_t dumpsize;
+
+ dumpsize = 0;
+
+ (void)snprintf(path, sizeof(path), "info.%d", bounds);
+ dumpsize += file_size(path);
+ (void)snprintf(path, sizeof(path), "vmcore.%d", bounds);
+ dumpsize += file_size(path);
+ (void)snprintf(path, sizeof(path), "vmcore.%d.gz", bounds);
+ dumpsize += file_size(path);
+ (void)snprintf(path, sizeof(path), "textdump.tar.%d", bounds);
+ dumpsize += file_size(path);
+ (void)snprintf(path, sizeof(path), "textdump.tar.%d.gz", bounds);
+ dumpsize += file_size(path);
+
+ return (dumpsize);
+}
+
+static void
+saved_dump_remove(int bounds)
+{
+ static char path[PATH_MAX];
+
+ (void)snprintf(path, sizeof(path), "info.%d", bounds);
+ (void)unlink(path);
+ (void)snprintf(path, sizeof(path), "vmcore.%d", bounds);
+ (void)unlink(path);
+ (void)snprintf(path, sizeof(path), "vmcore.%d.gz", bounds);
+ (void)unlink(path);
+ (void)snprintf(path, sizeof(path), "textdump.tar.%d", bounds);
+ (void)unlink(path);
+ (void)snprintf(path, sizeof(path), "textdump.tar.%d.gz", bounds);
+ (void)unlink(path);
+}
+
+static void
+symlinks_remove(void)
+{
+
+ (void)unlink("info.last");
+ (void)unlink("vmcore.last");
+ (void)unlink("vmcore.last.gz");
+ (void)unlink("textdump.tar.last");
+ (void)unlink("textdump.tar.last.gz");
+}
+
/*
* Check that sufficient space is available on the disk that holds the
* save directory.
*/
static int
-check_space(const char *savedir, off_t dumpsize)
+check_space(const char *savedir, off_t dumpsize, int bounds)
{
FILE *fp;
off_t minfree, spacefree, totfree, needed;
struct statfs fsbuf;
- char buf[100], path[MAXPATHLEN];
+ char buf[100];
- if (statfs(savedir, &fsbuf) < 0) {
+ if (statfs(".", &fsbuf) < 0) {
syslog(LOG_ERR, "%s: %m", savedir);
exit(1);
}
- spacefree = ((off_t) fsbuf.f_bavail * fsbuf.f_bsize) / 1024;
+ spacefree = ((off_t) fsbuf.f_bavail * fsbuf.f_bsize) / 1024;
totfree = ((off_t) fsbuf.f_bfree * fsbuf.f_bsize) / 1024;
- (void)snprintf(path, sizeof(path), "%s/minfree", savedir);
- if ((fp = fopen(path, "r")) == NULL)
+ if ((fp = fopen("minfree", "r")) == NULL)
minfree = 0;
else {
if (fgets(buf, sizeof(buf), fp) == NULL)
@@ -209,7 +270,8 @@ check_space(const char *savedir, off_t dumpsize)
}
needed = dumpsize / 1024 + 2; /* 2 for info file */
- if (((minfree > 0) ? spacefree : totfree) - needed < minfree) {
+ needed -= saved_dump_size(bounds);
+ if ((minfree > 0 ? spacefree : totfree) - needed < minfree) {
syslog(LOG_WARNING,
"no dump, not enough free space on device (%lld available, need %lld)",
(long long)(minfree > 0 ? spacefree : totfree),
@@ -262,7 +324,7 @@ DoRegularFile(int fd, off_t dumpsize, char *buf, const char *device,
if (he >= hs + BLOCKSIZE)
break;
}
-
+
/* back down to a block boundary */
he &= BLOCKMASK;
@@ -368,7 +430,7 @@ DoTextdumpFile(int fd, off_t dumpsize, off_t lasthd, char *buf,
static void
DoFile(const char *savedir, const char *device)
{
- static char filename[PATH_MAX];
+ static char infoname[PATH_MAX], corename[PATH_MAX], linkname[PATH_MAX];
static char *buf = NULL;
struct kerneldumpheader kdhf, kdhl;
off_t mediasize, dumpsize, firsthd, lasthd;
@@ -383,6 +445,9 @@ DoFile(const char *savedir, const char *device)
mediasize = 0;
status = STATUS_UNKNOWN;
+ if (maxdumps > 0 && bounds == maxdumps)
+ bounds = 0;
+
if (buf == NULL) {
buf = malloc(BUFFERSIZE);
if (buf == NULL) {
@@ -394,7 +459,7 @@ DoFile(const char *savedir, const char *device)
if (verbose)
printf("checking for kernel dump on device %s\n", device);
- fd = open(device, O_RDWR);
+ fd = open(device, (checkfor || keep) ? O_RDONLY : O_RDWR);
if (fd < 0) {
syslog(LOG_ERR, "%s: %m", device);
return;
@@ -433,7 +498,7 @@ DoFile(const char *savedir, const char *device)
syslog(LOG_ERR,
"unknown version (%d) in last dump header on %s",
dtoh32(kdhl.version), device);
-
+
status = STATUS_BAD;
if (force == 0)
goto closefd;
@@ -444,7 +509,7 @@ DoFile(const char *savedir, const char *device)
syslog(LOG_ERR,
"unknown version (%d) in last dump header on %s",
dtoh32(kdhl.version), device);
-
+
status = STATUS_BAD;
if (force == 0)
goto closefd;
@@ -472,7 +537,7 @@ DoFile(const char *savedir, const char *device)
syslog(LOG_ERR,
"unknown version (%d) in last dump header on %s",
dtoh32(kdhl.version), device);
-
+
status = STATUS_BAD;
if (force == 0)
goto closefd;
@@ -536,19 +601,22 @@ DoFile(const char *savedir, const char *device)
if (verbose)
printf("Checking for available free space\n");
- if (!check_space(savedir, dumpsize)) {
+
+ if (!check_space(savedir, dumpsize, bounds)) {
nerr++;
goto closefd;
}
writebounds(bounds + 1);
- sprintf(buf, "info.%d", bounds);
+ saved_dump_remove(bounds);
+
+ snprintf(infoname, sizeof(infoname), "info.%d", bounds);
/*
* Create or overwrite any existing dump header files.
*/
- fdinfo = open(buf, O_WRONLY | O_CREAT | O_TRUNC, 0600);
+ fdinfo = open(infoname, O_WRONLY | O_CREAT | O_TRUNC, 0600);
if (fdinfo < 0) {
syslog(LOG_ERR, "%s: %m", buf);
nerr++;
@@ -556,16 +624,16 @@ DoFile(const char *savedir, const char *device)
}
oumask = umask(S_IRWXG|S_IRWXO); /* Restrict access to the core file.*/
if (compress) {
- sprintf(filename, "%s.%d.gz", istextdump ? "textdump.tar" :
- "vmcore", bounds);
- fp = zopen(filename, "w");
+ snprintf(corename, sizeof(corename), "%s.%d.gz",
+ istextdump ? "textdump.tar" : "vmcore", bounds);
+ fp = zopen(corename, "w");
} else {
- sprintf(filename, "%s.%d", istextdump ? "textdump.tar" :
- "vmcore", bounds);
- fp = fopen(filename, "w");
+ snprintf(corename, sizeof(corename), "%s.%d",
+ istextdump ? "textdump.tar" : "vmcore", bounds);
+ fp = fopen(corename, "w");
}
if (fp == NULL) {
- syslog(LOG_ERR, "%s: %m", filename);
+ syslog(LOG_ERR, "%s: %m", corename);
close(fdinfo);
nerr++;
goto closefd;
@@ -586,15 +654,15 @@ DoFile(const char *savedir, const char *device)
printheader(info, &kdhl, device, bounds, status);
fclose(info);
- syslog(LOG_NOTICE, "writing %score to %s",
- compress ? "compressed " : "", filename);
+ syslog(LOG_NOTICE, "writing %score to %s/%s",
+ compress ? "compressed " : "", savedir, corename);
if (istextdump) {
if (DoTextdumpFile(fd, dumpsize, lasthd, buf, device,
- filename, fp) < 0)
+ corename, fp) < 0)
goto closeall;
} else {
- if (DoRegularFile(fd, dumpsize, buf, device, filename, fp)
+ if (DoRegularFile(fd, dumpsize, buf, device, corename, fp)
< 0)
goto closeall;
}
@@ -602,17 +670,35 @@ DoFile(const char *savedir, const char *device)
printf("\n");
if (fclose(fp) < 0) {
- syslog(LOG_ERR, "error on %s: %m", filename);
+ syslog(LOG_ERR, "error on %s: %m", corename);
nerr++;
goto closeall;
}
+
+ symlinks_remove();
+ if (symlink(infoname, "info.last") == -1) {
+ syslog(LOG_WARNING, "unable to create symlink %s/%s: %m",
+ savedir, "info.last");
+ }
+ if (compress) {
+ snprintf(linkname, sizeof(linkname), "%s.last.gz",
+ istextdump ? "textdump.tar" : "vmcore");
+ } else {
+ snprintf(linkname, sizeof(linkname), "%s.last",
+ istextdump ? "textdump.tar" : "vmcore");
+ }
+ if (symlink(corename, linkname) == -1) {
+ syslog(LOG_WARNING, "unable to create symlink %s/%s: %m",
+ savedir, linkname);
+ }
+
nsaved++;
if (verbose)
printf("dump saved\n");
nuke:
- if (clear || !keep) {
+ if (!keep) {
if (verbose)
printf("clearing dump header\n");
memcpy(kdhl.magic, KERNELDUMPMAGIC_CLEARED, sizeof kdhl.magic);
@@ -636,10 +722,10 @@ static void
usage(void)
{
fprintf(stderr, "%s\n%s\n%s\n",
- "usage: savecore -c",
- " savecore -C [-v] [directory device]",
- " savecore [-fkvz] [directory [device ...]]");
- exit (1);
+ "usage: savecore -c [-v] [device ...]",
+ " savecore -C [-v] [device ...]",
+ " savecore [-fkvz] [-m maxdumps] [directory [device ...]]");
+ exit(1);
}
int
@@ -655,7 +741,7 @@ main(int argc, char **argv)
openlog("savecore", LOG_PERROR, LOG_DAEMON);
signal(SIGINFO, infohandler);
- while ((ch = getopt(argc, argv, "Ccfkvz")) != -1)
+ while ((ch = getopt(argc, argv, "Ccfkm:vz")) != -1)
switch(ch) {
case 'C':
checkfor = 1;
@@ -663,15 +749,22 @@ main(int argc, char **argv)
case 'c':
clear = 1;
break;
+ case 'f':
+ force = 1;
+ break;
case 'k':
keep = 1;
break;
+ case 'm':
+ maxdumps = atoi(optarg);
+ if (maxdumps <= 0) {
+ syslog(LOG_ERR, "Invalid maxdump value");
+ exit(1);
+ }
+ break;
case 'v':
verbose++;
break;
- case 'f':
- force = 1;
- break;
case 'z':
compress = 1;
break;
@@ -681,9 +774,13 @@ main(int argc, char **argv)
}
if (checkfor && (clear || force || keep))
usage();
+ if (clear && (compress || keep))
+ usage();
+ if (maxdumps > 0 && (checkfor || clear))
+ usage();
argc -= optind;
argv += optind;
- if (argc >= 1) {
+ if (argc >= 1 && !checkfor && !clear) {
error = chdir(argv[0]);
if (error) {
syslog(LOG_ERR, "chdir(%s): %m", argv[0]);
diff --git a/sbin/setkey/setkey.8 b/sbin/setkey/setkey.8
index 8f7bae13..19a9164 100644
--- a/sbin/setkey/setkey.8
+++ b/sbin/setkey/setkey.8
@@ -110,7 +110,7 @@ Loop forever and dump all the messages transmitted to
.Dv PF_KEY
socket.
.Fl xx
-makes each timestamps unformatted.
+makes each timestamp unformatted.
.El
.Ss Configuration syntax
With
diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8
index be43e68..fe0a75a 100644
--- a/sbin/sysctl/sysctl.8
+++ b/sbin/sysctl/sysctl.8
@@ -28,7 +28,7 @@
.\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93
.\" $FreeBSD$
.\"
-.Dd January 17, 2011
+.Dd December 13, 2012
.Dt SYSCTL 8
.Os
.Sh NAME
@@ -36,11 +36,12 @@
.Nd get or set kernel state
.Sh SYNOPSIS
.Nm
-.Op Fl bdehiNnoqx
+.Op Fl bdehiNnoRTqx
+.Op Fl f Ar filename
.Ar name Ns Op = Ns Ar value
.Ar ...
.Nm
-.Op Fl bdehNnoqx
+.Op Fl bdehNnoRTqx
.Fl a
.Sh DESCRIPTION
The
@@ -80,6 +81,11 @@ This option is ignored if either
or
.Fl n
is specified, or a variable is being set.
+.It Fl f Ar filename
+Specify a file which contains a pair of name and value in each line.
+.Nm
+reads and processes the specified file first and then processes the name
+and value pairs in the command line argument.
.It Fl h
Format output for human, rather than machine, readability.
.It Fl i
@@ -121,6 +127,11 @@ sixteen bytes of the value.
Suppress some warnings generated by
.Nm
to standard error.
+.It Fl T
+Display only variables that are setable via loader (CTLFLAG_TUN).
+.It Fl W
+Display only wriable variables that are not statistical.
+Useful for determining the set of runtime tunable sysctls.
.It Fl X
Equivalent to
.Fl x a
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index 7379155..8fad089 100644
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -56,13 +56,17 @@ static const char rcsid[] =
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sysexits.h>
#include <unistd.h>
+static const char *conffile;
+
static int aflag, bflag, dflag, eflag, hflag, iflag;
-static int Nflag, nflag, oflag, qflag, xflag, warncount;
+static int Nflag, nflag, oflag, qflag, Tflag, Wflag, xflag;
static int oidfmt(int *, int, char *, u_int *);
-static void parse(char *);
+static int parsefile(const char *);
+static int parse(const char *, int);
static int show_var(int *, int);
static int sysctl_all(int *oid, int len);
static int name2oid(char *, int *);
@@ -74,8 +78,8 @@ usage(void)
{
(void)fprintf(stderr, "%s\n%s\n",
- "usage: sysctl [-bdehiNnoqx] name[=value] ...",
- " sysctl [-bdehNnoqx] -a");
+ "usage: sysctl [-bdehiNnoqTWx] [-f filename] name[=value] ...",
+ " sysctl [-bdehNnoqTWx] -a");
exit(1);
}
@@ -83,12 +87,13 @@ int
main(int argc, char **argv)
{
int ch;
+ int warncount = 0;
setlocale(LC_NUMERIC, "");
setbuf(stdout,0);
setbuf(stderr,0);
- while ((ch = getopt(argc, argv, "AabdehiNnoqwxX")) != -1) {
+ while ((ch = getopt(argc, argv, "Aabdef:hiNnoqTwWxX")) != -1) {
switch (ch) {
case 'A':
/* compatibility */
@@ -106,6 +111,9 @@ main(int argc, char **argv)
case 'e':
eflag = 1;
break;
+ case 'f':
+ conffile = optarg;
+ break;
case 'h':
hflag = 1;
break;
@@ -124,10 +132,16 @@ main(int argc, char **argv)
case 'q':
qflag = 1;
break;
+ case 'T':
+ Tflag = 1;
+ break;
case 'w':
/* compatibility */
/* ignored */
break;
+ case 'W':
+ Wflag = 1;
+ break;
case 'X':
/* compatibility */
aflag = xflag = 1;
@@ -146,13 +160,17 @@ main(int argc, char **argv)
usage();
if (aflag && argc == 0)
exit(sysctl_all(0, 0));
- if (argc == 0)
+ if (argc == 0 && conffile == NULL)
usage();
warncount = 0;
+ if (conffile != NULL)
+ warncount += parsefile(conffile);
+
while (argc-- > 0)
- parse(*argv++);
- exit(warncount);
+ warncount += parse(*argv++, 0);
+
+ return (warncount);
}
/*
@@ -160,8 +178,8 @@ main(int argc, char **argv)
* Lookup and print out the MIB entry if it exists.
* Set a new value if requested.
*/
-static void
-parse(char *string)
+static int
+parse(const char *string, int lineno)
{
int len, i, j;
void *newval = 0;
@@ -173,17 +191,36 @@ parse(char *string)
int64_t i64val;
uint64_t u64val;
int mib[CTL_MAXNAME];
- char *cp, *bufp, buf[BUFSIZ], *endptr, fmt[BUFSIZ];
+ char *cp, *bufp, buf[BUFSIZ], *endptr, fmt[BUFSIZ], line[BUFSIZ];
u_int kind;
- bufp = buf;
- if (snprintf(buf, BUFSIZ, "%s", string) >= BUFSIZ)
- errx(1, "oid too long: '%s'", string);
- if ((cp = strchr(string, '=')) != NULL) {
- *strchr(buf, '=') = '\0';
- *cp++ = '\0';
+ if (lineno)
+ snprintf(line, sizeof(line), " at line %d", lineno);
+ else
+ line[0] = '\0';
+
+ cp = buf;
+ if (snprintf(buf, BUFSIZ, "%s", string) >= BUFSIZ) {
+ warn("oid too long: '%s'%s", string, line);
+ return (1);
+ }
+ bufp = strsep(&cp, "=:");
+ if (cp != NULL) {
+ /* Tflag just lists tunables, do not allow assignment */
+ if (Tflag || Wflag) {
+ warnx("Can't set variables when using -T or -W");
+ usage();
+ }
while (isspace(*cp))
cp++;
+ /* Strip a pair of " or ' if any. */
+ switch (*cp) {
+ case '\"':
+ case '\'':
+ if (cp[strlen(cp) - 1] == *cp)
+ cp[strlen(cp) - 1] = '\0';
+ cp++;
+ }
newval = cp;
newsize = strlen(cp);
}
@@ -191,15 +228,22 @@ parse(char *string)
if (len < 0) {
if (iflag)
- return;
+ return (0);
if (qflag)
- exit(1);
- else
- errx(1, "unknown oid '%s'", bufp);
+ return (1);
+ else {
+ warn("unknown oid '%s'%s", bufp, line);
+ return (1);
+ }
}
- if (oidfmt(mib, len, fmt, &kind))
- err(1, "couldn't find format of oid '%s'", bufp);
+ if (oidfmt(mib, len, fmt, &kind)) {
+ warn("couldn't find format of oid '%s'%s", bufp, line);
+ if (iflag)
+ return (1);
+ else
+ exit(1);
+ }
if (newval == NULL || dflag) {
if ((kind & CTLTYPE) == CTLTYPE_NODE) {
@@ -215,16 +259,18 @@ parse(char *string)
putchar('\n');
}
} else {
- if ((kind & CTLTYPE) == CTLTYPE_NODE)
- errx(1, "oid '%s' isn't a leaf node", bufp);
+ if ((kind & CTLTYPE) == CTLTYPE_NODE) {
+ warn("oid '%s' isn't a leaf node%s", bufp, line);
+ return (1);
+ }
if (!(kind & CTLFLAG_WR)) {
if (kind & CTLFLAG_TUN) {
- warnx("oid '%s' is a read only tunable", bufp);
- errx(1, "Tunable values are set in /boot/loader.conf");
- } else {
- errx(1, "oid '%s' is read only", bufp);
- }
+ warnx("oid '%s' is a read only tunable%p", bufp, line);
+ warnx("Tunable values are set in /boot/loader.conf");
+ } else
+ warnx("oid '%s' is read only%s", bufp, line);
+ return (1);
}
if ((kind & CTLTYPE) == CTLTYPE_INT ||
@@ -233,47 +279,59 @@ parse(char *string)
(kind & CTLTYPE) == CTLTYPE_ULONG ||
(kind & CTLTYPE) == CTLTYPE_S64 ||
(kind & CTLTYPE) == CTLTYPE_U64) {
- if (strlen(newval) == 0)
- errx(1, "empty numeric value");
+ if (strlen(newval) == 0) {
+ warnx("empty numeric value");
+ return (1);
+ }
}
switch (kind & CTLTYPE) {
case CTLTYPE_INT:
if (strcmp(fmt, "IK") == 0) {
- if (!set_IK(newval, &intval))
- errx(1, "invalid value '%s'",
- (char *)newval);
+ if (!set_IK(newval, &intval)) {
+ warnx("invalid value '%s'%s",
+ (char *)newval, line);
+ return (1);
+ }
} else {
intval = (int)strtol(newval, &endptr,
0);
- if (endptr == newval || *endptr != '\0')
- errx(1, "invalid integer '%s'",
- (char *)newval);
+ if (endptr == newval || *endptr != '\0') {
+ warnx("invalid integer '%s'%s",
+ (char *)newval, line);
+ return (1);
+ }
}
newval = &intval;
newsize = sizeof(intval);
break;
case CTLTYPE_UINT:
uintval = (int) strtoul(newval, &endptr, 0);
- if (endptr == newval || *endptr != '\0')
- errx(1, "invalid unsigned integer '%s'",
- (char *)newval);
+ if (endptr == newval || *endptr != '\0') {
+ warnx("invalid unsigned integer '%s'%s",
+ (char *)newval, line);
+ return (1);
+ }
newval = &uintval;
newsize = sizeof(uintval);
break;
case CTLTYPE_LONG:
longval = strtol(newval, &endptr, 0);
- if (endptr == newval || *endptr != '\0')
- errx(1, "invalid long integer '%s'",
- (char *)newval);
+ if (endptr == newval || *endptr != '\0') {
+ warnx("invalid long integer '%s'%s",
+ (char *)newval, line);
+ return (1);
+ }
newval = &longval;
newsize = sizeof(longval);
break;
case CTLTYPE_ULONG:
ulongval = strtoul(newval, &endptr, 0);
- if (endptr == newval || *endptr != '\0')
- errx(1, "invalid unsigned long integer"
- " '%s'", (char *)newval);
+ if (endptr == newval || *endptr != '\0') {
+ warnx("invalid unsigned long integer"
+ " '%s'%s", (char *)newval, line);
+ return (1);
+ }
newval = &ulongval;
newsize = sizeof(ulongval);
break;
@@ -281,26 +339,31 @@ parse(char *string)
break;
case CTLTYPE_S64:
i64val = strtoimax(newval, &endptr, 0);
- if (endptr == newval || *endptr != '\0')
- errx(1, "invalid int64_t '%s'",
- (char *)newval);
+ if (endptr == newval || *endptr != '\0') {
+ warnx("invalid int64_t '%s'%s",
+ (char *)newval, line);
+ return (1);
+ }
newval = &i64val;
newsize = sizeof(i64val);
break;
case CTLTYPE_U64:
u64val = strtoumax(newval, &endptr, 0);
- if (endptr == newval || *endptr != '\0')
- errx(1, "invalid uint64_t '%s'",
- (char *)newval);
+ if (endptr == newval || *endptr != '\0') {
+ warnx("invalid uint64_t '%s'%s",
+ (char *)newval, line);
+ return (1);
+ }
newval = &u64val;
newsize = sizeof(u64val);
break;
case CTLTYPE_OPAQUE:
/* FALLTHROUGH */
default:
- errx(1, "oid '%s' is type %d,"
- " cannot set that", bufp,
- kind & CTLTYPE);
+ warnx("oid '%s' is type %d,"
+ " cannot set that%s", bufp,
+ kind & CTLTYPE, line);
+ return (1);
}
i = show_var(mib, len);
@@ -309,18 +372,20 @@ parse(char *string)
putchar('\n');
switch (errno) {
case EOPNOTSUPP:
- errx(1, "%s: value is not available",
- string);
+ warnx("%s: value is not available%s",
+ string, line);
+ return (1);
case ENOTDIR:
- errx(1, "%s: specification is incomplete",
- string);
+ warnx("%s: specification is incomplete%s",
+ string, line);
+ return (1);
case ENOMEM:
- errx(1, "%s: type is unknown to this program",
- string);
+ warnx("%s: type is unknown to this program%s",
+ string, line);
+ return (1);
default:
- warn("%s", string);
- warncount++;
- return;
+ warn("%s%s", string, line);
+ return (1);
}
}
if (!bflag)
@@ -332,6 +397,58 @@ parse(char *string)
putchar('\n');
nflag = i;
}
+
+ return (0);
+}
+
+static int
+parsefile(const char *filename)
+{
+ FILE *file;
+ char line[BUFSIZ], *p, *pq, *pdq;
+ int warncount = 0, lineno = 0;
+
+ file = fopen(filename, "r");
+ if (file == NULL)
+ err(EX_NOINPUT, "%s", filename);
+ while (fgets(line, sizeof(line), file) != NULL) {
+ lineno++;
+ p = line;
+ pq = strchr(line, '\'');
+ pdq = strchr(line, '\"');
+ /* Replace the first # with \0. */
+ while((p = strchr(p, '#')) != NULL) {
+ if (pq != NULL && p > pq) {
+ if ((p = strchr(pq+1, '\'')) != NULL)
+ *(++p) = '\0';
+ break;
+ } else if (pdq != NULL && p > pdq) {
+ if ((p = strchr(pdq+1, '\"')) != NULL)
+ *(++p) = '\0';
+ break;
+ } else if (p == line || *(p-1) != '\\') {
+ *p = '\0';
+ break;
+ }
+ p++;
+ }
+ /* Trim spaces */
+ p = line + strlen(line) - 1;
+ while (p >= line && isspace((int)*p)) {
+ *p = '\0';
+ p--;
+ }
+ p = line;
+ while (isspace((int)*p))
+ p++;
+ if (*p == '\0')
+ continue;
+ else
+ warncount += parse(p, lineno);
+ }
+ fclose(file);
+
+ return (warncount);
}
/* These functions will dump out various interesting structures. */
@@ -529,7 +646,7 @@ static int
show_var(int *oid, int nlen)
{
u_char buf[BUFSIZ], *val, *oval, *p;
- char name[BUFSIZ], *fmt;
+ char name[BUFSIZ], fmt[BUFSIZ];
const char *sep, *sep1;
int qoid[CTL_MAXNAME+2];
uintmax_t umv;
@@ -544,6 +661,7 @@ show_var(int *oid, int nlen)
umv = mv = intlen = 0;
bzero(buf, BUFSIZ);
+ bzero(fmt, BUFSIZ);
bzero(name, BUFSIZ);
qoid[0] = 0;
memcpy(qoid + 2, oid, nlen * sizeof(int));
@@ -554,6 +672,15 @@ show_var(int *oid, int nlen)
if (i || !j)
err(1, "sysctl name %d %zu %d", i, j, errno);
+ oidfmt(oid, nlen, fmt, &kind);
+ /* if Wflag then only list sysctls that are writeable and not stats. */
+ if (Wflag && ((kind & CTLFLAG_WR) == 0 || (kind & CTLFLAG_STATS) != 0))
+ return 1;
+
+ /* if Tflag then only list sysctls that are tuneables. */
+ if (Tflag && (kind & CTLFLAG_TUN) == 0)
+ return 1;
+
if (Nflag) {
printf("%s", name);
return (0);
@@ -596,8 +723,6 @@ show_var(int *oid, int nlen)
return (0);
}
val[len] = '\0';
- fmt = buf;
- oidfmt(oid, nlen, fmt, &kind);
p = val;
ctltype = (kind & CTLTYPE);
sign = ctl_sign[ctltype];
diff --git a/share/examples/etc/make.conf b/share/examples/etc/make.conf
index 6ba5a4e..9a74298 100644
--- a/share/examples/etc/make.conf
+++ b/share/examples/etc/make.conf
@@ -28,24 +28,25 @@
# of CFLAGS to contain the appropriate optimization directive to cc.
# The automatic setting of CFLAGS may be overridden using the
# NO_CPU_CFLAGS variable below.
-# Currently the following CPU types are recognized by gcc:
+# Currently the following CPU types are recognized:
# Intel x86 architecture:
# (AMD CPUs) opteron-sse3, athlon64-sse3, k8-sse3, opteron,
-# athlon64, k8, athlon-mp, athlon-xp, athlon-4,
-# athlon-tbird, athlon, k7, geode, k6-3, k6-2, k6, k5
+# athlon64, athlon-fx, k8, athlon-mp, athlon-xp,
+# athlon-4, athlon-tbird, athlon, k7, geode, k6-3,
+# k6-2, k6
# (Intel CPUs) core2, core, nocona, pentium4m, pentium4, prescott,
# pentium3m, pentium3, pentium-m, pentium2,
# pentiumpro, pentium-mmx, pentium, i486
# (VIA CPUs) c7, c3-2, c3
# AMD64 architecture: opteron-sse3, athlon64-sse3, k8-sse3, opteron,
-# athlon64, k8, core2, nocona, prescott
+# athlon64, k8, core2, nocona
# Intel ia64 architecture: itanium2, itanium
# SPARC-V9 architecture: v9 (generic 64-bit V9), ultrasparc (default
# if omitted), ultrasparc3
# Additionally the following CPU types are recognized by clang:
# Intel x86 architecture (for both amd64 and i386):
# (AMD CPUs) bdver2, bdver1, btver1, amdfam10
-# (Intel CPUs) core-avx-i, corei7-avx, corei7
+# (Intel CPUs) core-avx2, core-avx-i, corei7-avx, corei7, atom
#
# (?= allows to buildworld for a different CPUTYPE.)
#
@@ -56,21 +57,20 @@
# CFLAGS controls the compiler settings used when compiling C code.
# Note that optimization settings other than -O and -O2 are not recommended
# or supported for compiling the world or the kernel - please revert any
-# nonstandard optimization settings to "-O" or "-O2 -fno-strict-aliasing"
+# nonstandard optimization settings
# before submitting bug reports without patches to the developers.
#
-# Compiling with -fstrict-aliasing optimization breaks some [notable] ports.
-# GCC turns on -fstrict-aliasing optimization at all levels above -O[1], so
-# explicitly turn it off when using compiling with the -O2 optimization level.
-#
-#CFLAGS= -O2 -fno-strict-aliasing -pipe
-#
# CXXFLAGS controls the compiler settings used when compiling C++ code.
# Note that CXXFLAGS is initially set to the value of CFLAGS. If you wish
# to add to CXXFLAGS value, "+=" must be used rather than "=". Using "="
# alone will remove the often needed contents of CFLAGS from CXXFLAGS.
#
-#CXXFLAGS+= -fconserve-space
+# Additional compiler flags can be specified that extend or override
+# default ones. However, neither the base system nor ports are guaranteed
+# to build and function without problems with non-default settings.
+#
+# CFLAGS+= -msse3
+# CXXFLAGS+= -msse3
#
# MAKE_SHELL controls the shell used internally by make(1) to process the
# command scripts in makefiles. Three shells are supported, sh, ksh, and
diff --git a/share/examples/ppp/ppp.conf.sample b/share/examples/ppp/ppp.conf.sample
index 7863eaa..2572644 100644
--- a/share/examples/ppp/ppp.conf.sample
+++ b/share/examples/ppp/ppp.conf.sample
@@ -29,7 +29,7 @@
#
default:
set log Phase Chat LCP IPCP CCP tun command
- set device /dev/cuad1
+ set device /dev/cuau1
set speed 115200
set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" AT \
OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
@@ -145,7 +145,7 @@ TA:
set timeout 60 300 # The minimum charge period is 5 minutes, so don't
# hangup before then
- set device /dev/cuad0 # Or whatever
+ set device /dev/cuau0 # Or whatever
set speed 115200 # Use as high a speed as possible
enable dns # Ask the peer what to put in resolv.conf
@@ -315,7 +315,7 @@ dodgy:
dodgynet:
set log Phase # Log link uptime
allow mode auto # For autoconnect only
- set device /dev/cuad1 # Define modem device and speed
+ set device /dev/cuau1 # Define modem device and speed
set speed 115200
deny lqr # Don't support LQR
set phone 0W1194 # Remote system phone number,
@@ -472,7 +472,7 @@ radius-server:
#
direct-client:
set dial
- set device /dev/cuad0
+ set device /dev/cuau0
set sp 115200
set timeout 900
set lqrperiod 10
@@ -651,7 +651,7 @@ callback-server:
set cbcp
set log +cbcp
set redial 3 1
- set device /dev/cuad0
+ set device /dev/cuau0
set speed 115200
set dial "TIMEOUT 10 \"\" AT OK-AT-OK ATDT\\T CONNECT"
@@ -678,7 +678,7 @@ callback-server-client-decides:
#
mloop:
load loop
- set device /dev/cuad0 /dev/cuad1 /dev/cuad2 # Use any of these devices
+ set device /dev/cuau0 /dev/cuau1 /dev/cuau2 # Use any of these devices
set mode interactive
set mrru 1500
set mru 1504 # Room for the MP header
diff --git a/share/examples/ppp/ppp.conf.span-isp b/share/examples/ppp/ppp.conf.span-isp
index 446cee3..11084de 100644
--- a/share/examples/ppp/ppp.conf.span-isp
+++ b/share/examples/ppp/ppp.conf.span-isp
@@ -104,7 +104,7 @@
default:
set speed 115200
- set device /dev/cuad0 /dev/cuad1 /dev/cuad2 /dev/cuad3
+ set device /dev/cuau0 /dev/cuau1 /dev/cuau2 /dev/cuau3
set dial "ABORT BUSY ABORT NO\\sCARRIER ABORT NO\\sDIAL\\sTONE TIMEOUT 4 \
\"\" ATZ OK-ATZ-OK ATDT\\T TIMEOUT 60 CONNECT \\c \\n"
set login
diff --git a/share/i18n/csmapper/Makefile.part b/share/i18n/csmapper/Makefile.part
index 24696e4..fe4b084 100644
--- a/share/i18n/csmapper/Makefile.part
+++ b/share/i18n/csmapper/Makefile.part
@@ -28,9 +28,9 @@ mapper.dir.${ESUBDIR}: ${CODE}.part
echo "# ${ESUBDIR}" > ${.TARGET}
.for i in ${PART}
printf "%-32s%-32s%s\n" ${ENCID:S@%%PART%%@${i}@}/UCS ${MAPPER} \
- ${ESUBDIR}/${TABLENAME:S@%%PART%%@${i}@}${ENCEXT} >> ${.TARGET}
+ ${ESUBDIR}/${TABLENAME:S@%%PART%%@${i}@:S/:/@/}${ENCEXT} >> ${.TARGET}
printf "%-32s%-32s%s\n" UCS/${ENCID:S@%%PART%%@${i}@} ${MAPPER} \
- ${REVSYMBOL}${ESUBDIR}/${RTABLENAME:S@%%PART%%@${i}@}${ENCEXT} >> ${.TARGET}
+ ${REVSYMBOL}${ESUBDIR}/${RTABLENAME:S@%%PART%%@${i}@:S/:/@/}${ENCEXT} >> ${.TARGET}
.endfor
echo >> ${.TARGET}
.else
@@ -59,13 +59,13 @@ CLEANFILES+= charset.pivot.${ESUBDIR}
.if !defined(MAPS)
.for i in ${PART}
-.if exists(${TABLENAME:S@%%PART%%@${i}@}.src)
-FILES+= ${TABLENAME:S@%%PART%%@${i}@}.mps
-CLEANFILES+= ${TABLENAME:S@%%PART%%@${i}@}.mps
+.if exists(${TABLENAME:S@%%PART%%@${i}@:S/:/@/}.src)
+FILES+= ${TABLENAME:S@%%PART%%@${i}@:S/:/@/}.mps
+CLEANFILES+= ${TABLENAME:S@%%PART%%@${i}@:S/:/@/}.mps
.endif
-.if exists(${RTABLENAME:S@%%PART%%@${i}@}.src)
-FILES+= ${RTABLENAME:S@%%PART%%@${i}@}.mps
-CLEANFILES+= ${RTABLENAME:S@%%PART%%@${i}@}.mps
+.if exists(${RTABLENAME:S@%%PART%%@${i}@:S/:/@/}.src)
+FILES+= ${RTABLENAME:S@%%PART%%@${i}@:S/:/@/}.mps
+CLEANFILES+= ${RTABLENAME:S@%%PART%%@${i}@:S/:/@/}.mps
.endif
.endfor
.else
diff --git a/share/man/man4/arcmsr.4 b/share/man/man4/arcmsr.4
index 1e92e3b..71b5faa 100644
--- a/share/man/man4/arcmsr.4
+++ b/share/man/man4/arcmsr.4
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 3, 2012
+.Dd December 18, 2012
.Dt ARCMSR 4
.Os
.Sh NAME
@@ -100,6 +100,8 @@ ARC-1212
.It
ARC-1213
.It
+ARC-1214
+.It
ARC-1220
.It
ARC-1222
diff --git a/share/man/man4/carp.4 b/share/man/man4/carp.4
index c1dfa57..d051377 100644
--- a/share/man/man4/carp.4
+++ b/share/man/man4/carp.4
@@ -26,7 +26,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 29, 2012
+.Dd December 25, 2012
.Dt CARP 4
.Os
.Sh NAME
@@ -125,15 +125,14 @@ experiences problem with sending announcements, when an interface
running a vhid goes down, or while the
.Xr pfsync 4
interface is not synchronized.
-The demotion value is writable, so that user may alter it
-depending on some external conditions, for example on the status of some
-daemon utility.
-However, altering the value should be performed with care, so as to
-not conflict with subsystems that adjust demotion factor
-automatically:
+The demotion factor can be adjusted writing to the sysctl oid.
+The signed value supplied to the
+.Xr sysctl 8
+command is added to current demotion factor.
+This allows to control
.Nm
-and
-.Xr pfsync 4 .
+behaviour depending on some external conditions, for example on the status
+of some daemon utility.
.It Va net.inet.carp.ifdown_demotion_factor
This value is added to
.Va net.inet.carp.demotion
diff --git a/share/man/man4/gdb.4 b/share/man/man4/gdb.4
index 3a502c8..f81ef40 100644
--- a/share/man/man4/gdb.4
+++ b/share/man/man4/gdb.4
@@ -252,7 +252,7 @@ Finally, establish connection:
GNU gdb 5.2.1 (FreeBSD)
.Em "(political statements omitted)"
Ready to go. Enter 'tr' to connect to the remote target
-with /dev/cuad0, 'tr /dev/cuad1' to connect to a different port
+with /dev/cuau0, 'tr /dev/cuau1' to connect to a different port
or 'trf portno' to connect to the remote target with the firewire
interface. portno defaults to 5556.
@@ -370,10 +370,10 @@ instead.
Debug a remote system via the specified serial or firewire interface.
.It Ic tr0
Debug a remote system via serial interface
-.Pa /dev/cuad0 .
+.Pa /dev/cuau0 .
.It Ic tr1
Debug a remote system via serial interface
-.Pa /dev/cuad1 .
+.Pa /dev/cuau1 .
.It Ic trf
Debug a remote system via firewire interface at default port 5556.
.El
diff --git a/share/man/man4/mouse.4 b/share/man/man4/mouse.4
index f50fc01..816936a 100644
--- a/share/man/man4/mouse.4
+++ b/share/man/man4/mouse.4
@@ -379,7 +379,7 @@ command.
.El
.Sh FILES
.Bl -tag -width /dev/sysmouseXX -compact
-.It Pa /dev/cuad%d
+.It Pa /dev/cuau%d
serial ports
.It Pa /dev/mse%d
bus and InPort mouse device
diff --git a/share/man/man4/ng_netflow.4 b/share/man/man4/ng_netflow.4
index b88c017..3c710dc 100644
--- a/share/man/man4/ng_netflow.4
+++ b/share/man/man4/ng_netflow.4
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd Nov 2, 2012
+.Dd December 10, 2012
.Dt NG_NETFLOW 4
.Os
.Sh NAME
@@ -254,9 +254,6 @@ It is called from
.Xr flowctl 8 ,
not directly from
.Xr ngctl 8 .
-See also
-.Sx BUGS
-section.
.It Dv NGM_NETFLOW_V9INFO Pq Ic v9info
Returns some NetFlow v9 related values in a
.Bd -literal -offset 4n
@@ -349,7 +346,6 @@ written by
Cache snapshot obtained via
.Dv NGM_NETFLOW_SHOW
command may lack some percentage of entries under severe load.
-IPv6 flows are not shown.
.Pp
The
.Nm
diff --git a/share/man/man4/ng_ubt.4 b/share/man/man4/ng_ubt.4
index 6a39ddd..ef8a57e 100644
--- a/share/man/man4/ng_ubt.4
+++ b/share/man/man4/ng_ubt.4
@@ -25,7 +25,7 @@
.\" $Id: ng_ubt.4,v 1.3 2003/05/21 19:37:35 max Exp $
.\" $FreeBSD$
.\"
-.Dd September 13, 2004
+.Dd December 26, 2012
.Dt NG_UBT 4
.Os
.Sh NAME
@@ -73,6 +73,8 @@ Mitsumi Bluetooth USB adapter
MSI MS-6967
.It
TDK Bluetooth USB adapter
+.It
+Broadcom Bluetooth USB adapter
.El
.Sh HOOKS
This node type supports the following hooks:
diff --git a/share/man/man4/stf.4 b/share/man/man4/stf.4
index 1178e03..5e32763 100644
--- a/share/man/man4/stf.4
+++ b/share/man/man4/stf.4
@@ -29,7 +29,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 23, 2011
+.Dd December 28, 2012
.Dt STF 4
.Os
.Sh NAME
@@ -180,6 +180,22 @@ Note, however, there are other security risks exist.
If you wish to use the configuration,
you must not advertise your 6to4 address to others.
.\"
+.Sh SYSCTL VARIABLES
+The following
+.Xr sysctl 8
+variables can be used to control the behavior of the
+.Nm stf .
+The default value is shown next to each variable.
+.Bl -tag -width indent
+.It Va net.link.stf.permit_rfc1918 : No 0
+The RFC3056 requires the use of globally unique 32-bit IPv4
+addresses. This sysctl variable controls the behaviour of this
+requirement. When it set to not 0,
+.Nm stf
+allows the use of private IPv4 addresses described in the RFC1918.
+This may be useful for an Intranet environment or when some mechanisms
+of network address translation (NAT) are used.
+.El
.Sh EXAMPLES
Note that
.Li 8504:0506
diff --git a/share/man/man4/wbwd.4 b/share/man/man4/wbwd.4
index 67af2ec..49290ff 100644
--- a/share/man/man4/wbwd.4
+++ b/share/man/man4/wbwd.4
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 6, 2012
+.Dd December 28, 2012
.Dt WBWD 4
.Os
.Sh NAME
@@ -44,10 +44,6 @@ line in
.Bd -literal -offset indent
wbwd_load="YES"
.Ed
-.Pp
-In
-.Pa /boot/device.hints :
-.Cd hint.wbwd.0.at="isa"
.Sh DESCRIPTION
The
.Nm
diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5
index d9497b9..5024b2c 100644
--- a/share/man/man5/rc.conf.5
+++ b/share/man/man5/rc.conf.5
@@ -3324,7 +3324,7 @@ is set to
.Dq Li YES ,
this is the actual port the mouse is on.
It might be
-.Pa /dev/cuad0
+.Pa /dev/cuau0
for a COM1 serial mouse,
.Pa /dev/psm0
for a PS/2 mouse or
diff --git a/share/man/man5/remote.5 b/share/man/man5/remote.5
index 666608d..1eb9bfc 100644
--- a/share/man/man5/remote.5
+++ b/share/man/man5/remote.5
@@ -194,7 +194,7 @@ the phone number for arpavax (in this case an @ character so that it
is retrieved from the environment).
.Bd -literal
UNIX-57600:\e
-:dv=/dev/cuad0:el=^D^U^C^S^Q^O@:oe=^D:du:at=hayes:br#115200:pa=none:
+:dv=/dev/cuau0:el=^D^U^C^S^Q^O@:oe=^D:du:at=hayes:br#115200:pa=none:
arpavax|ax:\e
:pn=\e@:tc=UNIX-57600
.Ed
diff --git a/share/man/man7/tuning.7 b/share/man/man7/tuning.7
index 36544bb..5e228dd9 100644
--- a/share/man/man7/tuning.7
+++ b/share/man/man7/tuning.7
@@ -23,7 +23,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 20, 2012
+.Dd December 8, 2012
.Dt TUNING 7
.Os
.Sh NAME
@@ -459,52 +459,6 @@ the
sysctl rather than disable delayed acks.
.Pp
The
-.Va net.inet.tcp.inflight.enable
-sysctl turns on bandwidth delay product limiting for all TCP connections.
-The system will attempt to calculate the bandwidth delay product for each
-connection and limit the amount of data queued to the network to just the
-amount required to maintain optimum throughput.
-This feature is useful
-if you are serving data over modems, GigE, or high speed WAN links (or
-any other link with a high bandwidth*delay product), especially if you are
-also using window scaling or have configured a large send window.
-If you enable this option, you should also be sure to set
-.Va net.inet.tcp.inflight.debug
-to 0 (disable debugging), and for production use setting
-.Va net.inet.tcp.inflight.min
-to at least 6144 may be beneficial.
-Note however, that setting high
-minimums may effectively disable bandwidth limiting depending on the link.
-The limiting feature reduces the amount of data built up in intermediate
-router and switch packet queues as well as reduces the amount of data built
-up in the local host's interface queue.
-With fewer packets queued up,
-interactive connections, especially over slow modems, will also be able
-to operate with lower round trip times.
-However, note that this feature
-only affects data transmission (uploading / server-side).
-It does not
-affect data reception (downloading).
-.Pp
-Adjusting
-.Va net.inet.tcp.inflight.stab
-is not recommended.
-This parameter defaults to 20, representing 2 maximal packets added
-to the bandwidth delay product window calculation.
-The additional
-window is required to stabilize the algorithm and improve responsiveness
-to changing conditions, but it can also result in higher ping times
-over slow links (though still much lower than you would get without
-the inflight algorithm).
-In such cases you may
-wish to try reducing this parameter to 15, 10, or 5, and you may also
-have to reduce
-.Va net.inet.tcp.inflight.min
-(for example, to 3500) to get the desired effect.
-Reducing these parameters
-should be done as a last resort only.
-.Pp
-The
.Va net.inet.ip.portrange.*
sysctls control the port number ranges automatically bound to TCP and UDP
sockets.
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index 84c0f56..8e96d64 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -620,6 +620,7 @@ MLINKS+=domain.9 DOMAIN_SET.9 \
domain.9 domain_add.9 \
domain.9 pfctlinput.9 \
domain.9 pfctlinput2.9 \
+ domain.9 pffinddomain.9 \
domain.9 pffindproto.9 \
domain.9 pffindtype.9
MLINKS+=drbr.9 drbr_free.9 \
diff --git a/share/man/man9/domain.9 b/share/man/man9/domain.9
index 2a710d0..e07bded 100644
--- a/share/man/man9/domain.9
+++ b/share/man/man9/domain.9
@@ -26,13 +26,14 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 5, 2012
+.Dd December 7, 2012
.Dt DOMAIN 9
.Os
.Sh NAME
.Nm domain_add ,
.Nm pfctlinput ,
.Nm pfctlinput2 ,
+.Nm pffinddomain ,
.Nm pffindproto ,
.Nm pffindtype ,
.Nm DOMAIN_SET
@@ -48,6 +49,8 @@
.Fn pfctlinput "int cmd" "struct sockaddr *sa"
.Ft void
.Fn pfctlinput2 "int cmd" "struct sockaddr *sa" "void *ctlparam"
+.Ft struct domain *
+.Fn pffinddomain "int family"
.Ft struct protosw *
.Fn pffindproto "int family" "int protocol" "int type"
.Ft struct protosw *
@@ -176,6 +179,12 @@ This is because there is
no reference counting system in place to determine if there are any
active references from sockets within that domain.
.Pp
+.Fn pffinddomain
+finds a domain by family.
+If the domain cannot be found,
+.Dv NULL
+is returned.
+.Pp
.Fn pffindtype
and
.Fn pffindproto
diff --git a/share/man/man9/lock.9 b/share/man/man9/lock.9
index bbcf5e8..fd608d4 100644
--- a/share/man/man9/lock.9
+++ b/share/man/man9/lock.9
@@ -148,7 +148,9 @@ Flags indicating what action is to be taken.
.Bl -tag -width ".Dv LK_CANRECURSE"
.It Dv LK_SHARED
Acquire a shared lock.
-If an exclusive lock is currently held, it will be downgraded.
+If an exclusive lock is currently held,
+.Dv EDEADLK
+will be returned.
.It Dv LK_EXCLUSIVE
Acquire an exclusive lock.
If an exclusive lock is already held, and
@@ -158,7 +160,8 @@ is not set, the system will
.It Dv LK_DOWNGRADE
Downgrade exclusive lock to a shared lock.
Downgrading a shared lock is not permitted.
-If an exclusive lock has been recursed, all references will be downgraded.
+If an exclusive lock has been recursed, the system will
+.Xr panic 9 .
.It Dv LK_UPGRADE
Upgrade a shared lock to an exclusive lock.
If this call fails, the shared lock is lost.
diff --git a/share/man/man9/make_dev.9 b/share/man/man9/make_dev.9
index 2827235..78345fa 100644
--- a/share/man/man9/make_dev.9
+++ b/share/man/man9/make_dev.9
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 3, 2011
+.Dd Dec 22, 2012
.Dt MAKE_DEV 9
.Os
.Sh NAME
@@ -364,6 +364,10 @@ or
.Qq ..
path component or ends with
.Ql / .
+.It Bq Er EINVAL
+The
+.Dv MAKEDEV_CHECKNAME
+flag was specified and the provided device name contains invalid characters.
.It Bq Er EEXIST
The
.Dv MAKEDEV_CHECKNAME
diff --git a/share/man/man9/taskqueue.9 b/share/man/man9/taskqueue.9
index f1a43b6..c8e21d3 100644
--- a/share/man/man9/taskqueue.9
+++ b/share/man/man9/taskqueue.9
@@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 26, 2011
+.Dd December 4, 2012
.Dt TASKQUEUE 9
.Os
.Sh NAME
@@ -180,6 +180,13 @@ is used to schedule the enqueue after the specified amount of
Only non-fast task queues can be used for
.Va timeout_task
scheduling.
+If the
+.Va ticks
+argument is negative, the already scheduled enqueueing is not re-scheduled.
+Otherwise, the task is scheduled for enqueueing in the future,
+after the absolute value of
+.Va ticks
+is passed.
.Pp
The
.Fn taskqueue_cancel
diff --git a/share/man/man9/zone.9 b/share/man/man9/zone.9
index a3efd83..51a1049 100644
--- a/share/man/man9/zone.9
+++ b/share/man/man9/zone.9
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 28, 2012
+.Dd December 7, 2012
.Dt ZONE 9
.Os
.Sh NAME
@@ -37,7 +37,8 @@
.Nm uma_zdestroy ,
.Nm uma_zone_set_max,
.Nm uma_zone_get_max,
-.Nm uma_zone_get_cur
+.Nm uma_zone_get_cur,
+.Nm uma_zone_set_warning
.Nd zone allocator
.Sh SYNOPSIS
.In sys/param.h
@@ -65,6 +66,8 @@
.Fn uma_zone_get_max "uma_zone_t zone"
.Ft int
.Fn uma_zone_get_cur "uma_zone_t zone"
+.Ft void
+.Fn uma_zone_set_warning "uma_zone_t zone" "const char *warning"
.Sh DESCRIPTION
The zone allocator provides an efficient interface for managing
dynamically-sized collections of items of similar size.
@@ -213,6 +216,16 @@ The returned value is approximate because appropriate synchronisation to
determine an exact value is not performed by the implementation.
This ensures low overhead at the expense of potentially stale data being used
in the calculation.
+.Pp
+The
+.Fn uma_zone_set_warning
+function sets a warning that will be printed on the system console when the
+given zone becomes full and fails to allocate an item.
+The warning will be printed not often than every five minutes.
+Warnings can be turned off globally by setting the
+.Va vm.zone_warnings
+sysctl tunable to
+.Va 0 .
.Sh RETURN VALUES
The
.Fn uma_zalloc
diff --git a/share/misc/Makefile b/share/misc/Makefile
index 305baf6..3e2afc4 100644
--- a/share/misc/Makefile
+++ b/share/misc/Makefile
@@ -6,7 +6,8 @@
FILES= ascii birthtoken bsd-family-tree committers-doc.dot committers-ports.dot \
committers-src.dot eqnchar flowers init.ee \
iso3166 iso639 latin1 man.template mdoc.template operator pci_vendors \
- scsi_modes usb_hid_usages usbdevs
+ scsi_modes usb_hid_usages usbdevs \
+ organization.dot
NO_OBJ=
FILESDIR= ${BINDIR}/misc
diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot
index c3bbfe9..f3756e8 100644
--- a/share/misc/committers-src.dot
+++ b/share/misc/committers-src.dot
@@ -194,6 +194,7 @@ le [label="Lukas Ertl\nle@FreeBSD.org\n2004/02/02"]
lstewart [label="Lawrence Stewart\nlstewart@FreeBSD.org\n2008/10/06"]
marcel [label="Marcel Moolenaar\nmarcel@FreeBSD.org\n1999/07/03"]
marius [label="Marius Strobl\nmarius@FreeBSD.org\n2004/04/17"]
+markj [label="Mark Johnston\nmarkj@FreeBSD.org\n2012/12/18"]
markm [label="Mark Murray\nmarkm@FreeBSD.org\n199?/??/??"]
markus [label="Markus Brueffer\nmarkus@FreeBSD.org\n2006/06/01"]
matteo [label="Matteo Riondato\nmatteo@FreeBSD.org\n2006/01/18"]
@@ -241,6 +242,7 @@ rstone [label="Ryan Stone\nrstone@FreeBSD.org\n2010/04/19"]
ru [label="Ruslan Ermilov\nru@FreeBSD.org\n1999/05/27"]
rwatson [label="Robert N. M. Watson\nrwatson@FreeBSD.org\n1999/12/16"]
sam [label="Sam Leffler\nsam@FreeBSD.org\n2002/07/02"]
+sbruno [label="Sean Bruno\nsbruno@FreeBSD.org\n????/??/??"]
sanpei [label="MIHIRA Sanpei Yoshiro\nsanpei@FreeBSD.org\n2000/06/19"]
scf [label="Sean C. Farley\nscf@FreeBSD.org\n2007/06/24"]
schweikh [label="Jens Schweikhardt\nschweikh@FreeBSD.org\n2001/04/06"]
@@ -249,6 +251,7 @@ sephe [label="Sepherosa Ziehau\nsephe@FreeBSD.org\n2007/03/28"]
sepotvin [label="Stephane E. Potvin\nsepotvin@FreeBSD.org\n2007/02/15"]
simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2006/03/07"]
sjg [label="Simon J. Gerraty\nsjg@FreeBSD.org\n2012/10/23"]
+smh [label="Steven Hartland\nsmh@FreeBSD.org\n2012/11/12"]
sobomax [label="Maxim Sobolev\nsobomax@FreeBSD.org\n2001/07/25"]
sos [label="Soren Schmidt\nsos@FreeBSD.org\n????/??/??"]
sson [label="Stacey Son\nsson@FreeBSD.org\n2008/07/08"]
@@ -307,6 +310,7 @@ anholt -> jkim
avg -> art
avg -> pluknet
+avg -> smh
benno -> grehan
@@ -375,6 +379,7 @@ eivind -> rwatson
emaste -> rstone
emaste -> dteske
+emaste -> markj
emax -> markus
@@ -555,6 +560,7 @@ philip -> uqs
pjd -> kib
pjd -> lulf
+pjd -> smh
pjd -> trociny
rgrimes -> markm
@@ -569,6 +575,8 @@ rrs -> brucec
rrs -> jchandra
rrs -> tuexen
+rstone -> markj
+
ru -> ceri
ru -> cjc
ru -> eik
@@ -599,8 +607,11 @@ sam -> andre
sam -> benjsc
sam -> sephe
+sbruno -> jimharris
+
schweikh -> dds
+scottl -> jimharris
scottl -> pjd
scottl -> sah
scottl -> yongari
diff --git a/share/misc/iso639 b/share/misc/iso639
index 467add4..5793421 100644
--- a/share/misc/iso639
+++ b/share/misc/iso639
@@ -12,11 +12,11 @@
# existing ones according to criteria indicated in the standard. It
# maintains an accurate list of information associated with registered
# language codes, processes updates of registered language codes, and
-# distributes them on a regular basis to subscribers and other parties.
+# distributes them on a regular basis to subscribers and other parties.
#
# This is the official site of the ISO 639-2 Registration Authority and thus
# is the only one authorized by ISO. If you have questions concerning ISO
-# 639-2 please contact us at:
+# 639-2 please contact us at:
#
# Library of Congress
# Network Development and MARC Standards Office
@@ -90,7 +90,7 @@ be bel bel Belarusian
bn ben ben Bengali
ber ber Berber languages
bho bho Bhojpuri
-bh bih bih Bihari
+bh bih bih Bihari languages
bik bik Bikol
bin bin Bini; Edo
bi bis bis Bislama
@@ -213,10 +213,10 @@ ha hau hau Hausa
he heb heb Hebrew
hz her her Herero
hil hil Hiligaynon
- him him Himachali
+ him him Himachali languages; Western Pahari languages
hi hin hin Hindi
hit hit Hittite
- hmn hmn Hmong
+ hmn hmn Hmong; Mong
ho hmo hmo Hiri Motu
hr hrv hrv Croatian
hsb hsb Upper Sorbian
@@ -349,11 +349,11 @@ ne nep nep Nepali
nia nia Nias
nic nic Niger-Kordofanian languages
niu niu Niuean
+nn nno nno Norwegian Nynorsk; Nynorsk, Norwegian
+nb nob nob Bokmål, Norwegian; Norwegian Bokmål
nog nog Nogai
non non Norse, Old
no nor nor Norwegian
-nn nno nno Norwegian Nynorsk; Nynorsk, Norwegian
-nb nob nob Bokmål, Norwegian; Norwegian Bokmål
nqo nqo N'Ko
nso nso Pedi; Sepedi; Northern Sotho
nub nub Nubian languages
@@ -469,8 +469,8 @@ bo tib bod Tibetan
ti tir tir Tigrinya
tiv tiv Tiv
tkl tkl Tokelau
- tli tli Tlingit
tlh tlh Klingon; tlhIngan-Hol
+ tli tli Tlingit
tmh tmh Tamashek
tog tog Tonga (Nyasa)
to ton ton Tonga (Tonga Islands)
diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk
index af39561..21e70ad 100644
--- a/share/mk/bsd.cpu.mk
+++ b/share/mk/bsd.cpu.mk
@@ -27,9 +27,13 @@ MACHINE_CPU = mips
# between e.g. i586 and pentium)
. if ${MACHINE_CPUARCH} == "i386"
-. if ${CPUTYPE} == "nocona" || ${CPUTYPE} == "core" || \
- ${CPUTYPE} == "core2" || ${CPUTYPE} == "corei7" || \
- ${CPUTYPE} == "corei7-avx" || ${CPUTYPE} == "core-avx-i"
+. if ${CPUTYPE} == "barcelona"
+CPUTYPE = amdfam10
+. elif ${CPUTYPE} == "k7"
+CPUTYPE = athlon
+. elif ${CPUTYPE} == "westmere" || ${CPUTYPE} == "nehalem"
+CPUTYPE = corei7
+. elif ${CPUTYPE} == "core"
CPUTYPE = prescott
. elif ${CPUTYPE} == "p4"
CPUTYPE = pentium4
@@ -49,18 +53,13 @@ CPUTYPE = pentiumpro
CPUTYPE = pentium-mmx
. elif ${CPUTYPE} == "i586"
CPUTYPE = pentium
-. elif ${CPUTYPE} == "opteron-sse3" || ${CPUTYPE} == "athlon64-sse3" || \
- ${CPUTYPE} == "k8-sse3" || ${CPUTYPE} == "amdfam10" || \
- ${CPUTYPE} == "btver1" || ${CPUTYPE} == "bdver1" || ${CPUTYPE} == "bdver2"
-CPUTYPE = prescott
-. elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \
- ${CPUTYPE} == "k8"
-CPUTYPE = athlon-mp
-. elif ${CPUTYPE} == "k7"
-CPUTYPE = athlon
. endif
. elif ${MACHINE_CPUARCH} == "amd64"
-. if ${CPUTYPE} == "prescott"
+. if ${CPUTYPE} == "barcelona"
+CPUTYPE = amdfam10
+. elif ${CPUTYPE} == "westmere" || ${CPUTYPE} == "nehalem"
+CPUTYPE = corei7
+. elif ${CPUTYPE} == "prescott"
CPUTYPE = nocona
. endif
. elif ${MACHINE_ARCH} == "sparc64"
@@ -87,11 +86,11 @@ CPUTYPE = ultrasparc3
_CPUCFLAGS = -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0
. elif ${CPUTYPE} == "k5"
_CPUCFLAGS = -march=pentium
-. elif ${CPUTYPE} == "core2"
-_CPUCFLAGS = -march=prescott
+. elif ${CPUTYPE} == "c7"
+_CPUCFLAGS = -march=c3-2
. else
_CPUCFLAGS = -march=${CPUTYPE}
-. endif # GCC on 'i386'
+. endif
. elif ${MACHINE_CPUARCH} == "amd64"
_CPUCFLAGS = -march=${CPUTYPE}
. elif ${MACHINE_CPUARCH} == "arm"
@@ -143,7 +142,7 @@ _CPUCFLAGS = -mcpu=ultrasparc3
# presence of a CPU feature.
. if ${MACHINE_CPUARCH} == "i386"
-. if ${CPUTYPE} == "bdver1" || ${CPUTYPE} == "bdver2"
+. if ${CPUTYPE} == "bdver2" || ${CPUTYPE} == "bdver1"
MACHINE_CPU = xop avx sse42 sse41 ssse3 sse4a sse3 sse2 sse mmx k6 k5 i586
. elif ${CPUTYPE} == "btver1"
MACHINE_CPU = ssse3 sse4a sse3 sse2 sse mmx k6 k5 i586
@@ -151,7 +150,8 @@ MACHINE_CPU = ssse3 sse4a sse3 sse2 sse mmx k6 k5 i586
MACHINE_CPU = athlon-xp athlon k7 3dnow sse4a sse3 sse2 sse mmx k6 k5 i586
. elif ${CPUTYPE} == "opteron-sse3" || ${CPUTYPE} == "athlon64-sse3"
MACHINE_CPU = athlon-xp athlon k7 3dnow sse3 sse2 sse mmx k6 k5 i586
-. elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64"
+. elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \
+ ${CPUTYPE} == "athlon-fx"
MACHINE_CPU = athlon-xp athlon k7 3dnow sse2 sse mmx k6 k5 i586
. elif ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \
${CPUTYPE} == "athlon-4"
@@ -164,19 +164,17 @@ MACHINE_CPU = 3dnow mmx k6 k5 i586
MACHINE_CPU = mmx k6 k5 i586
. elif ${CPUTYPE} == "k5"
MACHINE_CPU = k5 i586
-. elif ${CPUTYPE} == "c3"
-MACHINE_CPU = 3dnow mmx i586
-. elif ${CPUTYPE} == "c3-2"
-MACHINE_CPU = sse mmx i586
-. elif ${CPUTYPE} == "c7"
-MACHINE_CPU = sse3 sse2 sse i686 mmx i586
-. elif ${CPUTYPE} == "corei7-avx" || ${CPUTYPE} == "core-avx-i"
+. elif ${CPUTYPE} == "core-avx2"
+MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586
+. elif ${CPUTYPE} == "core-avx-i" || ${CPUTYPE} == "corei7-avx"
MACHINE_CPU = avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586
. elif ${CPUTYPE} == "corei7"
MACHINE_CPU = sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586
-. elif ${CPUTYPE} == "core2"
+. elif ${CPUTYPE} == "penryn"
+MACHINE_CPU = sse41 ssse3 sse3 sse2 sse i686 mmx i586
+. elif ${CPUTYPE} == "atom" || ${CPUTYPE} == "core2"
MACHINE_CPU = ssse3 sse3 sse2 sse i686 mmx i586
-. elif ${CPUTYPE} == "prescott"
+. elif ${CPUTYPE} == "yonah" || ${CPUTYPE} == "prescott"
MACHINE_CPU = sse3 sse2 sse i686 mmx i586
. elif ${CPUTYPE} == "pentium4" || ${CPUTYPE} == "pentium4m" || \
${CPUTYPE} == "pentium-m"
@@ -191,10 +189,20 @@ MACHINE_CPU = i686 i586
MACHINE_CPU = mmx i586
. elif ${CPUTYPE} == "pentium"
MACHINE_CPU = i586
+. elif ${CPUTYPE} == "c7"
+MACHINE_CPU = sse3 sse2 sse i686 mmx i586
+. elif ${CPUTYPE} == "c3-2"
+MACHINE_CPU = sse i686 mmx i586
+. elif ${CPUTYPE} == "c3"
+MACHINE_CPU = 3dnow mmx i586
+. elif ${CPUTYPE} == "winchip2"
+MACHINE_CPU = 3dnow mmx
+. elif ${CPUTYPE} == "winchip-c6"
+MACHINE_CPU = mmx
. endif
MACHINE_CPU += i486
. elif ${MACHINE_CPUARCH} == "amd64"
-. if ${CPUTYPE} == "bdver1" || ${CPUTYPE} == "bdver2"
+. if ${CPUTYPE} == "bdver2" || ${CPUTYPE} == "bdver1"
MACHINE_CPU = xop avx sse42 sse41 ssse3 sse4a sse3
. elif ${CPUTYPE} == "btver1"
MACHINE_CPU = ssse3 sse4a sse3
@@ -204,13 +212,17 @@ MACHINE_CPU = k8 3dnow sse4a sse3
${CPUTYPE} == "k8-sse3"
MACHINE_CPU = k8 3dnow sse3
. elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \
- ${CPUTYPE} == "k8"
+ ${CPUTYPE} == "athlon-fx" || ${CPUTYPE} == "k8"
MACHINE_CPU = k8 3dnow
-. elif ${CPUTYPE} == "corei7-avx" || ${CPUTYPE} == "core-avx-i"
+. elif ${CPUTYPE} == "core-avx2"
+MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3
+. elif ${CPUTYPE} == "core-avx-i" || ${CPUTYPE} == "corei7-avx"
MACHINE_CPU = avx sse42 sse41 ssse3 sse3
. elif ${CPUTYPE} == "corei7"
MACHINE_CPU = sse42 sse41 ssse3 sse3
-. elif ${CPUTYPE} == "core2"
+. elif ${CPUTYPE} == "penryn"
+MACHINE_CPU = sse41 ssse3 sse3
+. elif ${CPUTYPE} == "atom" || ${CPUTYPE} == "core2"
MACHINE_CPU = ssse3 sse3
. elif ${CPUTYPE} == "nocona"
MACHINE_CPU = sse3
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index efaf9dc..1335964 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -39,9 +39,7 @@ CFLAGS+= ${DEBUG_FLAGS}
.if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != ""
CTFFLAGS+= -g
.endif
-.endif
-
-.if !defined(DEBUG_FLAGS)
+.else
STRIP?= -s
.endif
@@ -135,9 +133,9 @@ lib${LIB}.a: ${OBJS} ${STATICOBJS}
@${ECHO} building static ${LIB} library
@rm -f ${.TARGET}
.if !defined(NM)
- @${AR} cq ${.TARGET} `lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD}
+ @${AR} ${ARFLAGS} ${.TARGET} `lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD}
.else
- @${AR} cq ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD}
+ @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD}
.endif
${RANLIB} ${.TARGET}
.endif
@@ -152,9 +150,9 @@ lib${LIB}_p.a: ${POBJS}
@${ECHO} building profiled ${LIB} library
@rm -f ${.TARGET}
.if !defined(NM)
- @${AR} cq ${.TARGET} `lorder ${POBJS} | tsort -q` ${ARADD}
+ @${AR} ${ARFLAGS} ${.TARGET} `lorder ${POBJS} | tsort -q` ${ARADD}
.else
- @${AR} cq ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort -q` ${ARADD}
+ @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort -q` ${ARADD}
.endif
${RANLIB} ${.TARGET}
.endif
@@ -167,20 +165,26 @@ SOBJS+= ${OBJS:.o=.So}
.if defined(SHLIB_NAME)
_LIBS+= ${SHLIB_NAME}
+.if defined(DEBUG_FLAGS)
+SHLIB_NAME_FULL=${SHLIB_NAME}.debug
+.else
+SHLIB_NAME_FULL=${SHLIB_NAME}
+.endif
+
SOLINKOPTS= -shared -Wl,-x
.if !defined(ALLOW_SHARED_TEXTREL)
SOLINKOPTS+= -Wl,--fatal-warnings -Wl,--warn-shared-textrel
.endif
.if target(beforelinking)
-${SHLIB_NAME}: ${SOBJS} beforelinking
-.else
-${SHLIB_NAME}: ${SOBJS}
+beforelinking: ${SOBJS}
+${SHLIB_NAME_FULL}: beforelinking
.endif
+${SHLIB_NAME_FULL}: ${SOBJS}
@${ECHO} building shared library ${SHLIB_NAME}
- @rm -f ${.TARGET} ${SHLIB_LINK}
+ @rm -f ${SHLIB_NAME} ${SHLIB_LINK}
.if defined(SHLIB_LINK)
- @ln -fs ${.TARGET} ${SHLIB_LINK}
+ @ln -fs ${SHLIB_NAME} ${SHLIB_LINK}
.endif
.if !defined(NM)
@${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
@@ -194,6 +198,15 @@ ${SHLIB_NAME}: ${SOBJS}
.if ${MK_CTF} != "no"
${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS}
.endif
+
+.if defined(DEBUG_FLAGS)
+${SHLIB_NAME}: ${SHLIB_NAME_FULL} ${SHLIB_NAME}.symbols
+ ${OBJCOPY} --strip-debug --add-gnu-debuglink=${SHLIB_NAME}.symbols \
+ ${SHLIB_NAME_FULL} ${.TARGET}
+
+${SHLIB_NAME}.symbols: ${SHLIB_NAME_FULL}
+ ${OBJCOPY} --only-keep-debug ${SHLIB_NAME_FULL} ${.TARGET}
+.endif
.endif
.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no"
@@ -202,7 +215,7 @@ _LIBS+= lib${LIB}_pic.a
lib${LIB}_pic.a: ${SOBJS}
@${ECHO} building special pic ${LIB} library
@rm -f ${.TARGET}
- @${AR} cq ${.TARGET} ${SOBJS} ${ARADD}
+ @${AR} ${ARFLAGS} ${.TARGET} ${SOBJS} ${ARADD}
${RANLIB} ${.TARGET}
.endif
@@ -270,6 +283,11 @@ _libinstall:
${INSTALL} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}
+.if defined(DEBUG_FLAGS)
+ ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${_INSTALLFLAGS} \
+ ${SHLIB_NAME}.symbols ${DESTDIR}${SHLIBDIR}
+.endif
.if defined(SHLIB_LINK)
# ${_SHLIBDIRPREFIX} and ${_LDSCRIPTROOT} are both needed when cross-building
# and when building 32 bits library shims. ${_SHLIBDIRPREFIX} is the directory
diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk
index d6a2628..95f9064 100644
--- a/share/mk/bsd.libnames.mk
+++ b/share/mk/bsd.libnames.mk
@@ -45,7 +45,6 @@ LIBCURSES?= ${DESTDIR}${LIBDIR}/libcurses.a
LIBDEVINFO?= ${DESTDIR}${LIBDIR}/libdevinfo.a
LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevstat.a
LIBDIALOG?= ${DESTDIR}${LIBDIR}/libdialog.a
-LIBDISK?= ${DESTDIR}${LIBDIR}/libdisk.a
LIBDNS?= ${DESTDIR}${LIBDIR}/libdns.a
LIBDTRACE?= ${DESTDIR}${LIBDIR}/libdtrace.a
LIBDWARF?= ${DESTDIR}${LIBDIR}/libdwarf.a
@@ -54,7 +53,6 @@ LIBELF?= ${DESTDIR}${LIBDIR}/libelf.a
LIBFETCH?= ${DESTDIR}${LIBDIR}/libfetch.a
LIBFL?= "don't use LIBFL, use LIBL"
LIBFORM?= ${DESTDIR}${LIBDIR}/libform.a
-LIBFTPIO?= ${DESTDIR}${LIBDIR}/libftpio.a
LIBG2C?= ${DESTDIR}${LIBDIR}/libg2c.a
LIBGCC?= ${DESTDIR}${LIBDIR}/libgcc.a
LIBGCC_PIC?= ${DESTDIR}${LIBDIR}/libgcc_pic.a
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk
index 669043f..78af8fb 100644
--- a/share/mk/bsd.own.mk
+++ b/share/mk/bsd.own.mk
@@ -322,9 +322,6 @@ __DEFAULT_YES_OPTIONS = \
BOOT \
BSD_CPIO \
BSNMP \
- SOURCELESS \
- SOURCELESS_HOST \
- SOURCELESS_UCODE \
BZIP2 \
CALENDAR \
CAPSICUM \
@@ -401,10 +398,13 @@ __DEFAULT_YES_OPTIONS = \
SENDMAIL \
SETUID_LOGIN \
SHAREDOCS \
+ SOURCELESS \
+ SOURCELESS_HOST \
+ SOURCELESS_UCODE \
SSP \
- SYSINSTALL \
SYMVER \
SYSCONS \
+ SYSINSTALL \
TCSH \
TELNET \
TEXTPROC \
@@ -417,14 +417,14 @@ __DEFAULT_YES_OPTIONS = \
ZONEINFO
__DEFAULT_NO_OPTIONS = \
- BMAKE \
- BSD_GREP \
BIND_IDN \
BIND_LARGE_FILE \
BIND_LIBS \
BIND_SIGCHASE \
BIND_XML \
+ BMAKE \
BSDCONFIG \
+ BSD_GREP \
CLANG_EXTRAS \
CTF \
HESIOD \
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index 3c306eb..cfa07a3 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -46,10 +46,10 @@ PROG= ${PROG_CXX}
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
.if target(beforelinking)
-${PROG}: ${OBJS} beforelinking
-.else
-${PROG}: ${OBJS}
+beforelinking: ${OBJS}
+${PROG}: beforelinking
.endif
+${PROG}: ${OBJS}
.if defined(PROG_CXX)
${CXX} ${CXXFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
.else
@@ -76,10 +76,10 @@ SRCS= ${PROG}.c
OBJS= ${PROG}.o
.if target(beforelinking)
-${PROG}: ${OBJS} beforelinking
-.else
-${PROG}: ${OBJS}
+beforelinking: ${OBJS}
+${PROG}: beforelinking
.endif
+${PROG}: ${OBJS}
.if defined(PROG_CXX)
${CXX} ${CXXFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
.else
@@ -90,7 +90,7 @@ ${PROG}: ${OBJS}
.endif
.endif
-.endif
+.endif # !defined(SRCS)
.if ${MK_MAN} != "no" && !defined(MAN) && \
!defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \
@@ -100,7 +100,7 @@ ${PROG}: ${OBJS}
MAN= ${PROG}.1
MAN1= ${MAN}
.endif
-.endif
+.endif # defined(PROG)
all: objwarn ${PROG} ${SCRIPTS}
.if ${MK_MAN} != "no"
diff --git a/share/mk/sys.mk b/share/mk/sys.mk
index 0e8dc95..2f67903 100644
--- a/share/mk/sys.mk
+++ b/share/mk/sys.mk
@@ -39,7 +39,7 @@ AR ?= ar
.if defined(%POSIX)
ARFLAGS ?= -rv
.else
-ARFLAGS ?= rl
+ARFLAGS ?= cru
.endif
RANLIB ?= ranlib
@@ -129,16 +129,18 @@ MAKE ?= make
.if !defined(%POSIX)
NM ?= nm
-.endif
OBJC ?= cc
OBJCFLAGS ?= ${OBJCINCLUDES} ${CFLAGS} -Wno-import
+OBJCOPY ?= objcopy
+
PC ?= pc
PFLAGS ?=
RC ?= f77
RFLAGS ?=
+.endif
SHELL ?= sh
diff --git a/share/skel/dot.cshrc b/share/skel/dot.cshrc
index 5ce3e36..3e94371 100644
--- a/share/skel/dot.cshrc
+++ b/share/skel/dot.cshrc
@@ -23,10 +23,7 @@ setenv BLOCKSIZE K
if ($?prompt) then
# An interactive shell -- set some stuff up
- if ($uid == 0) then
- set user = root
- endif
- set prompt = "%n@%m:%~ %# "
+ set prompt = "%N@%m:%~ %# "
set promptchars = "%#"
set filec
diff --git a/share/syscons/keymaps/INDEX.keymaps b/share/syscons/keymaps/INDEX.keymaps
index 3911c4b..70bfd4e 100644
--- a/share/syscons/keymaps/INDEX.keymaps
+++ b/share/syscons/keymaps/INDEX.keymaps
@@ -520,6 +520,8 @@ us.dvorakl.kbd:fr:États Unis d'Amérique dvorakl
us.dvorakl.kbd:pt:Estados Unidos da América dvorakl
us.dvorakl.kbd:es:Estadounidense dvorak zurdo
+us.dvorakp.kbd:en:United States of America Programmer Dvorak
+
us.dvorakx.kbd:en:United States of America dvorakx
us.dvorakx.kbd:de:US-amerikanisch dvorakx
us.dvorakx.kbd:fr:États Unis d'Amérique dvorakx
diff --git a/share/syscons/keymaps/Makefile b/share/syscons/keymaps/Makefile
index 6861b26..bcf7dcc 100644
--- a/share/syscons/keymaps/Makefile
+++ b/share/syscons/keymaps/Makefile
@@ -47,8 +47,8 @@ FILES= INDEX.keymaps \
ua.koi8-u.kbd ua.koi8-u.shift.alt.kbd ua.iso5.kbd \
uk.iso.kbd uk.iso-ctrl.kbd uk.cp850.kbd uk.cp850-ctrl.kbd \
uk.dvorak.kbd \
- us.iso.kbd us.dvorak.kbd us.dvorakl.kbd us.dvorakr.kbd us.dvorakx.kbd \
- us.emacs.kbd us.pc-ctrl.kbd us.unix.kbd us.iso.acc.kbd
+ us.iso.kbd us.dvorak.kbd us.dvorakl.kbd us.dvorakr.kbd us.dvorakp.kbd \
+ us.dvorakx.kbd us.emacs.kbd us.pc-ctrl.kbd us.unix.kbd us.iso.acc.kbd
FILESDIR= ${SHAREDIR}/syscons/keymaps
diff --git a/share/syscons/keymaps/spanish.dvorak.kbd b/share/syscons/keymaps/spanish.dvorak.kbd
index 022a87d..fa5900d 100644
--- a/share/syscons/keymaps/spanish.dvorak.kbd
+++ b/share/syscons/keymaps/spanish.dvorak.kbd
@@ -1,4 +1,6 @@
# $FreeBSD$
+#
+# Submitted by: Álvaro Castillo <netsys@fedoraproject.org>
# alt
# scan cntrl alt alt cntrl lock
# code base shift cntrl shift alt shift cntrl shift state
diff --git a/share/syscons/keymaps/us.dvorakp.kbd b/share/syscons/keymaps/us.dvorakp.kbd
new file mode 100644
index 0000000..e6d4d91
--- /dev/null
+++ b/share/syscons/keymaps/us.dvorakp.kbd
@@ -0,0 +1,117 @@
+# A Programmer Dvorak keyboard for US English
+#
+# $FreeBSD$
+# alt
+# scan cntrl alt alt cntrl lock
+# code base shift cntrl shift alt shift cntrl shift state
+# ------------------------------------------------------------------
+ 000 nop nop nop nop nop nop nop nop O
+ 001 esc esc esc esc esc esc debug esc O
+ 002 '&' '%' nop nop '&' '%' nop nop O
+ 003 '[' '7' nul nul '[' '7' nul nul O
+ 004 '{' '5' nop nop '{' '5' nop nop O
+ 005 '}' '3' nop nop '}' '3' nop nop O
+ 006 '(' '1' nop nop '(' '1' nop nop O
+ 007 '=' '9' rs rs '=' '9' rs rs O
+ 008 '*' '0' nop nop '*' '0' nop nop O
+ 009 ')' '2' nop nop ')' '2' nop nop O
+ 010 '+' '4' nop nop '+' '4' nop nop O
+ 011 ']' '6' nop nop ']' ')' nop nop O
+ 012 '!' '8' esc esc '!' '8' esc esc O
+ 013 '#' '`' gs gs '#' '`' gs gs O
+ 014 bs bs del del bs bs del del O
+ 015 ht btab nop nop ht btab nop nop O
+ 016 ';' ':' nop nop ';' ':' nop nop O
+ 017 ',' '<' nop nop ',' '<' nop nop O
+ 018 '.' '>' nop nop '.' '>' nop nop O
+ 019 'p' 'P' dle dle 'p' 'P' dle dle C
+ 020 'y' 'Y' em em 'y' 'Y' em em C
+ 021 'f' 'F' ack ack 'f' 'F' ack ack C
+ 022 'g' 'G' bel bel 'g' 'G' bel bel C
+ 023 'c' 'C' etx etx 'c' 'C' etx etx C
+ 024 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C
+ 025 'l' 'L' ff ff 'l' 'L' ff ff C
+ 026 '/' '?' nop nop '/' '?' nop nop O
+ 027 '@' '^' nop nop '@' '^' nop nop O
+ 028 cr cr nl nl cr cr nl nl O
+ 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O
+ 030 'a' 'A' soh soh 'a' 'A' soh soh C
+ 031 'o' 'O' si si 'o' 'O' si si C
+ 032 'e' 'E' enq enq 'e' 'E' enq enq C
+ 033 'u' 'U' nak nak 'u' 'U' nak nak C
+ 034 'i' 'I' ht ht 'i' 'I' ht ht C
+ 035 'd' 'D' eot eot 'd' 'D' eot eot C
+ 036 'h' 'H' bs bs 'h' 'H' bs bs C
+ 037 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C
+ 038 'n' 'N' so so 'n' 'N' so so C
+ 039 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C
+ 040 '-' '_' us us '-' '_' us us O
+ 041 '$' '~' nop nop '$' '~' nop nop O
+ 042 lshift lshift lshift lshift lshift lshift lshift lshift O
+ 043 '\' '|' fs fs '\' '|' fs fs O
+ 044 ''' '"' nop nop ''' '"' nop nop O
+ 045 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C
+ 046 'j' 'J' nl nl 'j' 'J' nl nl C
+ 047 'k' 'K' vt vt 'k' 'K' vt vt C
+ 048 'x' 'X' can can 'x' 'X' can can C
+ 049 'b' 'B' stx stx 'b' 'B' stx stx C
+ 050 'm' 'M' cr cr 'm' 'M' cr cr C
+ 051 'w' 'W' etb etb 'w' 'W' etb etb C
+ 052 'v' 'V' syn syn 'v' 'V' syn syn C
+ 053 'z' 'Z' sub sub 'z' 'Z' sub sub C
+ 054 rshift rshift rshift rshift rshift rshift rshift rshift O
+ 055 '*' '*' '*' '*' '*' '*' '*' '*' O
+ 056 lalt lalt lalt lalt lalt lalt lalt lalt O
+ 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O
+ 058 clock clock clock clock clock clock clock clock O
+ 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O
+ 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O
+ 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O
+ 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O
+ 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O
+ 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O
+ 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O
+ 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O
+ 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O
+ 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O
+ 069 nlock nlock nlock nlock nlock nlock nlock nlock O
+ 070 slock slock slock slock slock slock slock slock O
+ 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N
+ 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N
+ 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N
+ 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N
+ 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N
+ 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N
+ 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N
+ 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N
+ 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N
+ 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N
+ 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N
+ 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N
+ 083 del '.' '.' '.' '.' '.' boot boot N
+ 084 nop nop nop nop nop nop nop nop O
+ 085 nop nop nop nop nop nop nop nop O
+ 086 nop nop nop nop nop nop nop nop O
+ 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O
+ 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O
+ 089 cr cr nl nl cr cr nl nl O
+ 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O
+ 091 '/' '/' '/' '/' '/' '/' '/' '/' N
+ 092 nscr pscr debug debug nop nop nop nop O
+ 093 ralt ralt ralt ralt ralt ralt ralt ralt O
+ 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O
+ 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O
+ 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O
+ 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O
+ 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O
+ 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O
+ 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O
+ 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O
+ 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O
+ 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O
+ 104 slock saver slock saver susp nop susp nop O
+ 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O
+ 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O
+ 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O
+ 108 nop nop nop nop nop nop nop nop
+
diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c
index 17d2694..18130b5 100644
--- a/sys/amd64/amd64/fpu.c
+++ b/sys/amd64/amd64/fpu.c
@@ -135,6 +135,7 @@ SYSCTL_INT(_hw, HW_FLOATINGPT, floatingpoint, CTLFLAG_RD,
static int use_xsaveopt;
int use_xsave; /* non-static for cpu_switch.S */
uint64_t xsave_mask; /* the same */
+static uma_zone_t fpu_save_area_zone;
static struct savefpu *fpu_initialstate;
struct xsave_area_elm_descr {
@@ -313,6 +314,10 @@ fpuinitstate(void *arg __unused)
}
}
+ fpu_save_area_zone = uma_zcreate("FPU_save_area",
+ cpu_max_ext_state_size, NULL, NULL, NULL, NULL,
+ XSAVE_AREA_ALIGN - 1, 0);
+
start_emulating();
intr_restore(saveintr);
}
@@ -985,19 +990,10 @@ is_fpu_kern_thread(u_int flags)
/*
* FPU save area alloc/free/init utility routines
*/
-static uma_zone_t fpu_save_area_zone;
-
struct savefpu *
fpu_save_area_alloc(void)
{
- if (fpu_save_area_zone == NULL) {
- fpu_save_area_zone = uma_zcreate("FPU_save_area",
- cpu_max_ext_state_size,
- NULL, NULL, NULL, NULL,
- XSAVE_AREA_ALIGN - 1, 0);
- }
-
return (uma_zalloc(fpu_save_area_zone, 0));
}
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 06b45b2..8e06ff9 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -5446,3 +5446,46 @@ pmap_align_superpage(vm_object_t object, vm_ooffset_t offset,
else
*addr = ((*addr + PDRMASK) & ~PDRMASK) + superpage_offset;
}
+
+#include "opt_ddb.h"
+#ifdef DDB
+#include <ddb/ddb.h>
+
+DB_SHOW_COMMAND(pte, pmap_print_pte)
+{
+ pmap_t pmap;
+ pml4_entry_t *pml4;
+ pdp_entry_t *pdp;
+ pd_entry_t *pde;
+ pt_entry_t *pte;
+ vm_offset_t va;
+
+ if (have_addr) {
+ va = (vm_offset_t)addr;
+ pmap = PCPU_GET(curpmap); /* XXX */
+ } else {
+ db_printf("show pte addr\n");
+ return;
+ }
+ pml4 = pmap_pml4e(pmap, va);
+ db_printf("VA %#016lx pml4e %#016lx", va, *pml4);
+ if ((*pml4 & PG_V) == 0) {
+ db_printf("\n");
+ return;
+ }
+ pdp = pmap_pml4e_to_pdpe(pml4, va);
+ db_printf(" pdpe %#016lx", *pdp);
+ if ((*pdp & PG_V) == 0 || (*pdp & PG_PS) != 0) {
+ db_printf("\n");
+ return;
+ }
+ pde = pmap_pdpe_to_pde(pdp, va);
+ db_printf(" pde %#016lx", *pde);
+ if ((*pde & PG_V) == 0 || (*pde & PG_PS) != 0) {
+ db_printf("\n");
+ return;
+ }
+ pte = pmap_pde_to_pte(pde, va);
+ db_printf(" pte %#016lx\n", *pte);
+}
+#endif
diff --git a/sys/arm/arm/busdma_machdep-v6.c b/sys/arm/arm/busdma_machdep-v6.c
index 0c64845..2a7c23b 100644
--- a/sys/arm/arm/busdma_machdep-v6.c
+++ b/sys/arm/arm/busdma_machdep-v6.c
@@ -1,4 +1,5 @@
/*-
+ * Copyright (c) 2012 Ian Lepore
* Copyright (c) 2010 Mark Tinguely
* Copyright (c) 2004 Olivier Houchard
* Copyright (c) 2002 Peter Grehan
@@ -40,6 +41,7 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/bus.h>
+#include <sys/busdma_bufalloc.h>
#include <sys/interrupt.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
@@ -53,6 +55,8 @@ __FBSDID("$FreeBSD$");
#include <vm/vm.h>
#include <vm/vm_page.h>
#include <vm/vm_map.h>
+#include <vm/vm_extern.h>
+#include <vm/vm_kern.h>
#include <machine/atomic.h>
#include <machine/bus.h>
@@ -83,7 +87,6 @@ struct bus_dma_tag {
int map_count;
bus_dma_lock_t *lockfunc;
void *lockfuncarg;
- bus_dma_segment_t *segments;
struct bounce_zone *bounce_zone;
/*
* DMA range for this tag. If the page doesn't fall within
@@ -93,6 +96,14 @@ struct bus_dma_tag {
*/
struct arm32_dma_range *ranges;
int _nranges;
+ /*
+ * Most tags need one or two segments, and can use the local tagsegs
+ * array. For tags with a larger limit, we'll allocate a bigger array
+ * on first use.
+ */
+ bus_dma_segment_t *segments;
+ bus_dma_segment_t tagsegs[2];
+
};
@@ -150,6 +161,8 @@ struct bus_dmamap {
pmap_t pmap;
bus_dmamap_callback_t *callback;
void *callback_arg;
+ int flags;
+#define DMAMAP_COHERENT (1 << 0)
STAILQ_ENTRY(bus_dmamap) links;
STAILQ_HEAD(,sync_list) slist;
};
@@ -169,6 +182,38 @@ int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr);
static int _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map,
void *buf, bus_size_t buflen, int flags);
+static busdma_bufalloc_t coherent_allocator; /* Cache of coherent buffers */
+static busdma_bufalloc_t standard_allocator; /* Cache of standard buffers */
+static void
+busdma_init(void *dummy)
+{
+
+ /* Create a cache of buffers in standard (cacheable) memory. */
+ standard_allocator = busdma_bufalloc_create("buffer",
+ arm_dcache_align, /* minimum_alignment */
+ NULL, /* uma_alloc func */
+ NULL, /* uma_free func */
+ 0); /* uma_zcreate_flags */
+
+ /*
+ * Create a cache of buffers in uncacheable memory, to implement the
+ * BUS_DMA_COHERENT (and potentially BUS_DMA_NOCACHE) flag.
+ */
+ coherent_allocator = busdma_bufalloc_create("coherent",
+ arm_dcache_align, /* minimum_alignment */
+ busdma_bufalloc_alloc_uncacheable,
+ busdma_bufalloc_free_uncacheable,
+ 0); /* uma_zcreate_flags */
+}
+
+/*
+ * This init historically used SI_SUB_VM, but now the init code requires
+ * malloc(9) using M_DEVBUF memory, which is set up later than SI_SUB_VM, by
+ * SI_SUB_KMEM and SI_ORDER_SECOND, so we'll go right after that by using
+ * SI_SUB_KMEM and SI_ORDER_THIRD.
+ */
+SYSINIT(busdma, SI_SUB_KMEM, SI_ORDER_THIRD, busdma_init, NULL);
+
static __inline int
_bus_dma_can_bounce(vm_offset_t lowaddr, vm_offset_t highaddr)
{
@@ -322,7 +367,18 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
newtag->lockfunc = dflt_lock;
newtag->lockfuncarg = NULL;
}
- newtag->segments = NULL;
+ /*
+ * If all the segments we need fit into the local tagsegs array, set the
+ * pointer now. Otherwise NULL the pointer and an array of segments
+ * will be allocated later, on first use. We don't pre-allocate now
+ * because some tags exist just to pass contraints to children in the
+ * device hierarchy, and they tend to use BUS_SPACE_UNRESTRICTED and we
+ * sure don't want to try to allocate an array for that.
+ */
+ if (newtag->nsegments <= nitems(newtag->tagsegs))
+ newtag->segments = newtag->tagsegs;
+ else
+ newtag->segments = NULL;
/* Take into account any restrictions imposed by our parent tag */
if (parent != NULL) {
@@ -411,7 +467,8 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat)
parent = dmat->parent;
atomic_subtract_int(&dmat->ref_count, 1);
if (dmat->ref_count == 0) {
- if (dmat->segments != NULL)
+ if (dmat->segments != NULL &&
+ dmat->segments != dmat->tagsegs)
free(dmat->segments, M_DEVBUF);
free(dmat, M_DEVBUF);
/*
@@ -545,7 +602,10 @@ int
bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
bus_dmamap_t *mapp)
{
- int mflags, len;
+ busdma_bufalloc_t ba;
+ struct busdma_bufzone *bufzone;
+ vm_memattr_t memattr;
+ int mflags;
if (flags & BUS_DMA_NOWAIT)
mflags = M_NOWAIT;
@@ -579,34 +639,54 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
if (flags & BUS_DMA_ZERO)
mflags |= M_ZERO;
+ if (flags & BUS_DMA_COHERENT) {
+ memattr = VM_MEMATTR_UNCACHEABLE;
+ ba = coherent_allocator;
+ (*mapp)->flags |= DMAMAP_COHERENT;
+ } else {
+ memattr = VM_MEMATTR_DEFAULT;
+ ba = standard_allocator;
+ (*mapp)->flags = 0;
+ }
+#ifdef notyet
+ /* All buffers we allocate are cache-aligned. */
+ map->flags |= DMAMAP_CACHE_ALIGNED;
+#endif
- /*
- * XXX:
- * (dmat->alignment < dmat->maxsize) is just a quick hack; the exact
- * alignment guarantees of malloc need to be nailed down, and the
- * code below should be rewritten to take that into account.
- *
- * In the meantime, we'll warn the user if malloc gets it wrong.
- *
- * allocate at least a cache line. This should help avoid cache
- * corruption.
+ /*
+ * Try to find a bufzone in the allocator that holds a cache of buffers
+ * of the right size for this request. If the buffer is too big to be
+ * held in the allocator cache, this returns NULL.
*/
- len = max(dmat->maxsize, arm_dcache_align);
- if (len <= PAGE_SIZE &&
- (dmat->alignment < len) &&
- !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr)) {
- *vaddr = malloc(len, M_DEVBUF, mflags);
+ bufzone = busdma_bufalloc_findzone(ba, dmat->maxsize);
+
+ /*
+ * Allocate the buffer from the uma(9) allocator if...
+ * - It's small enough to be in the allocator (bufzone not NULL).
+ * - The alignment constraint isn't larger than the allocation size
+ * (the allocator aligns buffers to their size boundaries).
+ * - There's no need to handle lowaddr/highaddr exclusion zones.
+ * else allocate non-contiguous pages if...
+ * - The page count that could get allocated doesn't exceed nsegments.
+ * - The alignment constraint isn't larger than a page boundary.
+ * - There are no boundary-crossing constraints.
+ * else allocate a block of contiguous pages because one or more of the
+ * constraints is something that only the contig allocator can fulfill.
+ */
+ if (bufzone != NULL && dmat->alignment <= bufzone->size &&
+ !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr)) {
+ *vaddr = uma_zalloc(bufzone->umazone, mflags);
+ } else if (dmat->nsegments >= btoc(dmat->maxsize) &&
+ dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) {
+ *vaddr = (void *)kmem_alloc_attr(kernel_map, dmat->maxsize,
+ mflags, 0, dmat->lowaddr, memattr);
} else {
- /*
- * XXX Use Contigmalloc until it is merged into this facility
- * and handles multi-seg allocations. Nobody is doing
- * multi-seg allocations yet though.
- * XXX Certain AGP hardware does.
- */
- *vaddr = contigmalloc(len, M_DEVBUF, mflags,
- 0ul, dmat->lowaddr, dmat->alignment? dmat->alignment : 1ul,
- dmat->boundary);
+ *vaddr = (void *)kmem_alloc_contig(kernel_map, dmat->maxsize,
+ mflags, 0, dmat->lowaddr, dmat->alignment, dmat->boundary,
+ memattr);
}
+
+
if (*vaddr == NULL) {
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
__func__, dmat, dmat->flags, ENOMEM);
@@ -630,19 +710,24 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
void
bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map)
{
- int len;
+ struct busdma_bufzone *bufzone;
+ busdma_bufalloc_t ba;
+
+ if (map->flags & DMAMAP_COHERENT)
+ ba = coherent_allocator;
+ else
+ ba = standard_allocator;
+
+ /* Be careful not to access map from here on. */
+
+ bufzone = busdma_bufalloc_findzone(ba, dmat->maxsize);
+
+ if (bufzone != NULL && dmat->alignment <= bufzone->size &&
+ !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr))
+ uma_zfree(bufzone->umazone, vaddr);
+ else
+ kmem_free(kernel_map, (vm_offset_t)vaddr, dmat->maxsize);
-#ifdef mftnotyet
- pmap_change_attr((vm_offset_t)vaddr, dmat->maxsize, ARM_WRITE_BACK);
-#endif
- len = max(dmat->maxsize, arm_dcache_align);
- if (len <= PAGE_SIZE &&
- (dmat->alignment < len) &&
- !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr))
- free(vaddr, M_DEVBUF);
- else {
- contigfree(vaddr, len, M_DEVBUF);
- }
dmat->map_count--;
free(map, M_DEVBUF);
CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, dmat->flags);
@@ -1095,7 +1180,7 @@ _bus_dmamap_fix_user(vm_offset_t buf, bus_size_t len,
#else
#define l2cache_wb_range(va, pa, size) cpu_l2cache_wb_range(va, size)
#define l2cache_wbinv_range(va, pa, size) cpu_l2cache_wbinv_range(va, size)
-#define l2cache_inv_range(va, pa, size) cpu_l2cache_wbinv_range(va, size)
+#define l2cache_inv_range(va, pa, size) cpu_l2cache_inv_range(va, size)
#endif
void
@@ -1177,6 +1262,8 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
dmat->bounce_zone->total_bounced++;
}
}
+ if (map->flags & DMAMAP_COHERENT)
+ return;
sl = STAILQ_FIRST(&map->slist);
while (sl) {
@@ -1260,35 +1347,49 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
while (sl != NULL) {
/* write back the unaligned portions */
vm_paddr_t physaddr;
+ register_t s = 0;
+
buf = sl->vaddr;
len = sl->datacount;
physaddr = sl->busaddr;
bbuf = buf & ~arm_dcache_align_mask;
ebuf = buf + len;
physaddr = physaddr & ~arm_dcache_align_mask;
- unalign = buf & arm_dcache_align_mask;
- if (unalign) {
- memcpy(_tmp_cl, (void *)bbuf, unalign);
- len += unalign; /* inv entire cache line */
- }
- unalign = ebuf & arm_dcache_align_mask;
- if (unalign) {
- unalign = arm_dcache_align - unalign;
- memcpy(_tmp_clend, (void *)ebuf, unalign);
- len += unalign; /* inv entire cache line */
+
+
+ if ((buf & arm_dcache_align_mask) ||
+ (ebuf & arm_dcache_align_mask)) {
+ s = intr_disable();
+ unalign = buf & arm_dcache_align_mask;
+ if (unalign) {
+ memcpy(_tmp_cl, (void *)bbuf, unalign);
+ len += unalign; /* inv entire cache line */
+ }
+
+ unalign = ebuf & arm_dcache_align_mask;
+ if (unalign) {
+ unalign = arm_dcache_align - unalign;
+ memcpy(_tmp_clend, (void *)ebuf, unalign);
+ len += unalign; /* inv entire cache line */
+ }
}
- /* inv are cache length aligned */
+
+ /* inv are cache length aligned */
cpu_dcache_inv_range(bbuf, len);
l2cache_inv_range(bbuf, physaddr, len);
- unalign = (vm_offset_t)buf & arm_dcache_align_mask;
- if (unalign) {
- memcpy((void *)bbuf, _tmp_cl, unalign);
- }
- unalign = ebuf & arm_dcache_align_mask;
- if (unalign) {
- unalign = arm_dcache_align - unalign;
- memcpy((void *)ebuf, _tmp_clend, unalign);
+ if ((buf & arm_dcache_align_mask) ||
+ (ebuf & arm_dcache_align_mask)) {
+ unalign = (vm_offset_t)buf & arm_dcache_align_mask;
+ if (unalign)
+ memcpy((void *)bbuf, _tmp_cl, unalign);
+
+ unalign = ebuf & arm_dcache_align_mask;
+ if (unalign)
+ memcpy((void *)ebuf, _tmp_clend,
+ arm_dcache_align - unalign);
+
+ intr_restore(s);
}
sl = STAILQ_NEXT(sl, slinks);
}
diff --git a/sys/arm/arm/busdma_machdep.c b/sys/arm/arm/busdma_machdep.c
index ecda7f9..42566e8 100644
--- a/sys/arm/arm/busdma_machdep.c
+++ b/sys/arm/arm/busdma_machdep.c
@@ -1,4 +1,5 @@
/*-
+ * Copyright (c) 2012 Ian Lepore
* Copyright (c) 2004 Olivier Houchard
* Copyright (c) 2002 Peter Grehan
* Copyright (c) 1997, 1998 Justin T. Gibbs.
@@ -32,7 +33,23 @@
__FBSDID("$FreeBSD$");
/*
- * ARM bus dma support routines
+ * ARM bus dma support routines.
+ *
+ * XXX Things to investigate / fix some day...
+ * - What is the earliest that this API can be called? Could there be any
+ * fallout from changing the SYSINIT() order from SI_SUB_VM to SI_SUB_KMEM?
+ * - The manpage mentions the BUS_DMA_NOWAIT flag only in the context of the
+ * bus_dmamap_load() function. This code has historically (and still does)
+ * honor it in bus_dmamem_alloc(). If we got rid of that we could lose some
+ * error checking because some resource management calls would become WAITOK
+ * and thus "cannot fail."
+ * - The decisions made by _bus_dma_can_bounce() should be made once, at tag
+ * creation time, and the result stored in the tag.
+ * - It should be possible to take some shortcuts when mapping a buffer we know
+ * came from the uma(9) allocators based on what we know about such buffers
+ * (aligned, contiguous, etc).
+ * - The allocation of bounce pages could probably be cleaned up, then we could
+ * retire arm_remap_nocache().
*/
#define _ARM32_BUS_DMA_PRIVATE
@@ -40,6 +57,7 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/bus.h>
+#include <sys/busdma_bufalloc.h>
#include <sys/interrupt.h>
#include <sys/lock.h>
#include <sys/proc.h>
@@ -50,7 +68,10 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/sysctl.h>
+#include <vm/uma.h>
#include <vm/vm.h>
+#include <vm/vm_extern.h>
+#include <vm/vm_kern.h>
#include <vm/vm_page.h>
#include <vm/vm_map.h>
@@ -81,7 +102,6 @@ struct bus_dma_tag {
int map_count;
bus_dma_lock_t *lockfunc;
void *lockfuncarg;
- bus_dma_segment_t *segments;
/*
* DMA range for this tag. If the page doesn't fall within
* one of these ranges, an error is returned. The caller
@@ -91,6 +111,13 @@ struct bus_dma_tag {
struct arm32_dma_range *ranges;
int _nranges;
struct bounce_zone *bounce_zone;
+ /*
+ * Most tags need one or two segments, and can use the local tagsegs
+ * array. For tags with a larger limit, we'll allocate a bigger array
+ * on first use.
+ */
+ bus_dma_segment_t *segments;
+ bus_dma_segment_t tagsegs[2];
};
struct bounce_page {
@@ -134,7 +161,7 @@ SYSCTL_INT(_hw_busdma, OID_AUTO, total_bpages, CTLFLAG_RD, &total_bpages, 0,
#define DMAMAP_LINEAR 0x1
#define DMAMAP_MBUF 0x2
#define DMAMAP_UIO 0x4
-#define DMAMAP_ALLOCATED 0x10
+#define DMAMAP_CACHE_ALIGNED 0x10
#define DMAMAP_TYPE_MASK (DMAMAP_LINEAR|DMAMAP_MBUF|DMAMAP_UIO)
#define DMAMAP_COHERENT 0x8
struct bus_dmamap {
@@ -144,9 +171,6 @@ struct bus_dmamap {
bus_dma_tag_t dmat;
int flags;
void *buffer;
- void *origbuffer;
- void *allocbuffer;
- TAILQ_ENTRY(bus_dmamap) freelist;
int len;
STAILQ_ENTRY(bus_dmamap) links;
bus_dmamap_callback_t *callback;
@@ -157,12 +181,6 @@ struct bus_dmamap {
static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist;
static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist;
-static TAILQ_HEAD(,bus_dmamap) dmamap_freelist =
- TAILQ_HEAD_INITIALIZER(dmamap_freelist);
-
-#define BUSDMA_STATIC_MAPS 500
-static struct bus_dmamap map_pool[BUSDMA_STATIC_MAPS];
-
static struct mtx busdma_mtx;
MTX_SYSINIT(busdma_mtx, &busdma_mtx, "busdma lock", MTX_DEF);
@@ -180,6 +198,91 @@ static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage);
bus_dma_tag_t arm_root_dma_tag;
/*
+ * ----------------------------------------------------------------------------
+ * Begin block of code useful to transplant to other implementations.
+ */
+
+static uma_zone_t dmamap_zone; /* Cache of struct bus_dmamap items */
+
+static busdma_bufalloc_t coherent_allocator; /* Cache of coherent buffers */
+static busdma_bufalloc_t standard_allocator; /* Cache of standard buffers */
+
+/*
+ * This is the ctor function passed to uma_zcreate() for the pool of dma maps.
+ * It'll need platform-specific changes if this code is copied.
+ */
+static int
+dmamap_ctor(void *mem, int size, void *arg, int flags)
+{
+ bus_dmamap_t map;
+ bus_dma_tag_t dmat;
+
+ map = (bus_dmamap_t)mem;
+ dmat = (bus_dma_tag_t)arg;
+
+ dmat->map_count++;
+
+ map->dmat = dmat;
+ map->flags = 0;
+ STAILQ_INIT(&map->bpages);
+
+ return (0);
+}
+
+/*
+ * This is the dtor function passed to uma_zcreate() for the pool of dma maps.
+ * It may need platform-specific changes if this code is copied .
+ */
+static void
+dmamap_dtor(void *mem, int size, void *arg)
+{
+ bus_dmamap_t map;
+
+ map = (bus_dmamap_t)mem;
+
+ map->dmat->map_count--;
+}
+
+static void
+busdma_init(void *dummy)
+{
+
+ /* Create a cache of maps for bus_dmamap_create(). */
+ dmamap_zone = uma_zcreate("dma maps", sizeof(struct bus_dmamap),
+ dmamap_ctor, dmamap_dtor, NULL, NULL, UMA_ALIGN_PTR, 0);
+
+ /* Create a cache of buffers in standard (cacheable) memory. */
+ standard_allocator = busdma_bufalloc_create("buffer",
+ arm_dcache_align, /* minimum_alignment */
+ NULL, /* uma_alloc func */
+ NULL, /* uma_free func */
+ 0); /* uma_zcreate_flags */
+
+ /*
+ * Create a cache of buffers in uncacheable memory, to implement the
+ * BUS_DMA_COHERENT (and potentially BUS_DMA_NOCACHE) flag.
+ */
+ coherent_allocator = busdma_bufalloc_create("coherent",
+ arm_dcache_align, /* minimum_alignment */
+ busdma_bufalloc_alloc_uncacheable,
+ busdma_bufalloc_free_uncacheable,
+ 0); /* uma_zcreate_flags */
+}
+
+/*
+ * This init historically used SI_SUB_VM, but now the init code requires
+ * malloc(9) using M_DEVBUF memory, which is set up later than SI_SUB_VM, by
+ * SI_SUB_KMEM and SI_ORDER_SECOND, so we'll go right after that by using
+ * SI_SUB_KMEM and SI_ORDER_THIRD.
+ */
+SYSINIT(busdma, SI_SUB_KMEM, SI_ORDER_THIRD, busdma_init, NULL);
+
+/*
+ * End block of code useful to transplant to other implementations.
+ * ----------------------------------------------------------------------------
+ */
+
+/*
* Return true if a match is made.
*
* To find a match walk the chain of bus_dma_tag_t's looking for 'paddr'.
@@ -206,30 +309,26 @@ run_filter(bus_dma_tag_t dmat, bus_addr_t paddr)
return (retval);
}
-static void
-arm_dmamap_freelist_init(void *dummy)
-{
- int i;
-
- for (i = 0; i < BUSDMA_STATIC_MAPS; i++)
- TAILQ_INSERT_HEAD(&dmamap_freelist, &map_pool[i], freelist);
-}
-
-SYSINIT(busdma, SI_SUB_VM, SI_ORDER_ANY, arm_dmamap_freelist_init, NULL);
-
/*
- * Check to see if the specified page is in an allowed DMA range.
+ * This routine checks the exclusion zone constraints from a tag against the
+ * physical RAM available on the machine. If a tag specifies an exclusion zone
+ * but there's no RAM in that zone, then we avoid allocating resources to bounce
+ * a request, and we can use any memory allocator (as opposed to needing
+ * kmem_alloc_contig() just because it can allocate pages in an address range).
+ *
+ * Most tags have BUS_SPACE_MAXADDR or BUS_SPACE_MAXADDR_32BIT (they are the
+ * same value on 32-bit architectures) as their lowaddr constraint, and we can't
+ * possibly have RAM at an address higher than the highest address we can
+ * express, so we take a fast out.
*/
-
-static __inline int
-bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dma_segment_t *segs,
- bus_dmamap_t map, void *buf, bus_size_t buflen, struct pmap *pmap,
- int flags, vm_offset_t *lastaddrp, int *segp);
-
static __inline int
_bus_dma_can_bounce(vm_offset_t lowaddr, vm_offset_t highaddr)
{
int i;
+
+ if (lowaddr >= BUS_SPACE_MAXADDR)
+ return (0);
+
for (i = 0; phys_avail[i] && phys_avail[i + 1]; i += 2) {
if ((lowaddr >= phys_avail[i] && lowaddr <= phys_avail[i + 1])
|| (lowaddr < phys_avail[i] &&
@@ -294,38 +393,6 @@ dflt_lock(void *arg, bus_dma_lock_op_t op)
#endif
}
-static __inline bus_dmamap_t
-_busdma_alloc_dmamap(void)
-{
- bus_dmamap_t map;
-
- mtx_lock(&busdma_mtx);
- map = TAILQ_FIRST(&dmamap_freelist);
- if (map)
- TAILQ_REMOVE(&dmamap_freelist, map, freelist);
- mtx_unlock(&busdma_mtx);
- if (!map) {
- map = malloc(sizeof(*map), M_DEVBUF, M_NOWAIT | M_ZERO);
- if (map)
- map->flags = DMAMAP_ALLOCATED;
- } else
- map->flags = 0;
- STAILQ_INIT(&map->bpages);
- return (map);
-}
-
-static __inline void
-_busdma_free_dmamap(bus_dmamap_t map)
-{
- if (map->flags & DMAMAP_ALLOCATED)
- free(map, M_DEVBUF);
- else {
- mtx_lock(&busdma_mtx);
- TAILQ_INSERT_HEAD(&dmamap_freelist, map, freelist);
- mtx_unlock(&busdma_mtx);
- }
-}
-
/*
* Allocate a device specific dma_tag.
*/
@@ -354,7 +421,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
}
newtag->parent = parent;
- newtag->alignment = alignment;
+ newtag->alignment = alignment ? alignment : 1;
newtag->boundary = boundary;
newtag->lowaddr = trunc_page((vm_offset_t)lowaddr) + (PAGE_SIZE - 1);
newtag->highaddr = trunc_page((vm_offset_t)highaddr) + (PAGE_SIZE - 1);
@@ -375,9 +442,19 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
newtag->lockfunc = dflt_lock;
newtag->lockfuncarg = NULL;
}
- newtag->segments = NULL;
-
- /*
+ /*
+ * If all the segments we need fit into the local tagsegs array, set the
+ * pointer now. Otherwise NULL the pointer and an array of segments
+ * will be allocated later, on first use. We don't pre-allocate now
+ * because some tags exist just to pass contraints to children in the
+ * device hierarchy, and they tend to use BUS_SPACE_UNRESTRICTED and we
+ * sure don't want to try to allocate an array for that.
+ */
+ if (newtag->nsegments <= nitems(newtag->tagsegs))
+ newtag->segments = newtag->tagsegs;
+ else
+ newtag->segments = NULL;
+ /*
* Take into account any restrictions imposed by our parent tag
*/
if (parent != NULL) {
@@ -450,6 +527,7 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat)
#endif
if (dmat != NULL) {
+
if (dmat->map_count != 0)
return (EBUSY);
@@ -459,7 +537,8 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat)
parent = dmat->parent;
atomic_subtract_int(&dmat->ref_count, 1);
if (dmat->ref_count == 0) {
- if (dmat->segments != NULL)
+ if (dmat->segments != NULL &&
+ dmat->segments != dmat->tagsegs)
free(dmat->segments, M_DEVBUF);
free(dmat, M_DEVBUF);
/*
@@ -485,30 +564,28 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat)
int
bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp)
{
- bus_dmamap_t newmap;
+ bus_dmamap_t map;
int error = 0;
+ map = uma_zalloc_arg(dmamap_zone, dmat, M_NOWAIT);
+ *mapp = map;
+ if (map == NULL)
+ return (ENOMEM);
+
+ /*
+ * If the tag's segments haven't been allocated yet we need to do it
+ * now, because we can't sleep for resources at map load time.
+ */
if (dmat->segments == NULL) {
- dmat->segments = (bus_dma_segment_t *)malloc(
- sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF,
- M_NOWAIT);
+ dmat->segments = malloc(dmat->nsegments *
+ sizeof(*dmat->segments), M_DEVBUF, M_NOWAIT);
if (dmat->segments == NULL) {
- CTR3(KTR_BUSDMA, "%s: tag %p error %d",
- __func__, dmat, ENOMEM);
+ uma_zfree(dmamap_zone, map);
+ *mapp = NULL;
return (ENOMEM);
}
}
- newmap = _busdma_alloc_dmamap();
- if (newmap == NULL) {
- CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, ENOMEM);
- return (ENOMEM);
- }
- *mapp = newmap;
- newmap->dmat = dmat;
- newmap->allocbuffer = NULL;
- dmat->map_count++;
-
/*
* Bouncing might be required if the driver asks for an active
* exclusion region, a data alignment that is stricter than 1, and/or
@@ -522,7 +599,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp)
if (dmat->bounce_zone == NULL) {
if ((error = alloc_bounce_zone(dmat)) != 0) {
- _busdma_free_dmamap(newmap);
+ uma_zfree(dmamap_zone, map);
*mapp = NULL;
return (error);
}
@@ -575,118 +652,129 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map)
__func__, dmat, EBUSY);
return (EBUSY);
}
- _busdma_free_dmamap(map);
+ uma_zfree(dmamap_zone, map);
if (dmat->bounce_zone)
dmat->bounce_zone->map_count--;
- dmat->map_count--;
CTR2(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat);
return (0);
}
/*
- * Allocate a piece of memory that can be efficiently mapped into
- * bus device space based on the constraints lited in the dma tag.
- * A dmamap to for use with dmamap_load is also allocated.
+ * Allocate a piece of memory that can be efficiently mapped into bus device
+ * space based on the constraints listed in the dma tag. Returns a pointer to
+ * the allocated memory, and a pointer to an associated bus_dmamap.
*/
int
-bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
+bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddrp, int flags,
bus_dmamap_t *mapp)
{
- bus_dmamap_t newmap = NULL;
-
+ void * vaddr;
+ struct busdma_bufzone *bufzone;
+ busdma_bufalloc_t ba;
+ bus_dmamap_t map;
int mflags;
+ vm_memattr_t memattr;
if (flags & BUS_DMA_NOWAIT)
mflags = M_NOWAIT;
else
mflags = M_WAITOK;
- if (dmat->segments == NULL) {
- dmat->segments = (bus_dma_segment_t *)malloc(
- sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF,
- mflags);
- if (dmat->segments == NULL) {
- CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
- __func__, dmat, dmat->flags, ENOMEM);
- return (ENOMEM);
- }
+
+ /*
+ * If the tag's segments haven't been allocated yet we need to do it
+ * now, because we can't sleep for resources at map load time.
+ */
+ if (dmat->segments == NULL)
+ dmat->segments = malloc(dmat->nsegments *
+ sizeof(*dmat->segments), M_DEVBUF, mflags);
+
+ map = uma_zalloc_arg(dmamap_zone, dmat, mflags);
+ if (map == NULL)
+ return (ENOMEM);
+
+ if (flags & BUS_DMA_COHERENT) {
+ memattr = VM_MEMATTR_UNCACHEABLE;
+ ba = coherent_allocator;
+ map->flags |= DMAMAP_COHERENT;
+ } else {
+ memattr = VM_MEMATTR_DEFAULT;
+ ba = standard_allocator;
}
+ /* All buffers we allocate are cache-aligned. */
+ map->flags |= DMAMAP_CACHE_ALIGNED;
+
if (flags & BUS_DMA_ZERO)
mflags |= M_ZERO;
- newmap = _busdma_alloc_dmamap();
- if (newmap == NULL) {
- CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
- __func__, dmat, dmat->flags, ENOMEM);
- return (ENOMEM);
+ /*
+ * Try to find a bufzone in the allocator that holds a cache of buffers
+ * of the right size for this request. If the buffer is too big to be
+ * held in the allocator cache, this returns NULL.
+ */
+ bufzone = busdma_bufalloc_findzone(ba, dmat->maxsize);
+
+ /*
+ * Allocate the buffer from the uma(9) allocator if...
+ * - It's small enough to be in the allocator (bufzone not NULL).
+ * - The alignment constraint isn't larger than the allocation size
+ * (the allocator aligns buffers to their size boundaries).
+ * - There's no need to handle lowaddr/highaddr exclusion zones.
+ * else allocate non-contiguous pages if...
+ * - The page count that could get allocated doesn't exceed nsegments.
+ * - The alignment constraint isn't larger than a page boundary.
+ * - There are no boundary-crossing constraints.
+ * else allocate a block of contiguous pages because one or more of the
+ * constraints is something that only the contig allocator can fulfill.
+ */
+ if (bufzone != NULL && dmat->alignment <= bufzone->size &&
+ !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr)) {
+ vaddr = uma_zalloc(bufzone->umazone, mflags);
+ } else if (dmat->nsegments >= btoc(dmat->maxsize) &&
+ dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) {
+ vaddr = (void *)kmem_alloc_attr(kernel_map, dmat->maxsize,
+ mflags, 0, dmat->lowaddr, memattr);
+ } else {
+ vaddr = (void *)kmem_alloc_contig(kernel_map, dmat->maxsize,
+ mflags, 0, dmat->lowaddr, dmat->alignment, dmat->boundary,
+ memattr);
}
- dmat->map_count++;
- *mapp = newmap;
- newmap->dmat = dmat;
-
- if (dmat->maxsize <= PAGE_SIZE &&
- (dmat->alignment < dmat->maxsize) &&
- !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr)) {
- *vaddr = malloc(dmat->maxsize, M_DEVBUF, mflags);
- } else {
- /*
- * XXX Use Contigmalloc until it is merged into this facility
- * and handles multi-seg allocations. Nobody is doing
- * multi-seg allocations yet though.
- */
- *vaddr = contigmalloc(dmat->maxsize, M_DEVBUF, mflags,
- 0ul, dmat->lowaddr, dmat->alignment? dmat->alignment : 1ul,
- dmat->boundary);
- }
- if (*vaddr == NULL) {
- if (newmap != NULL) {
- _busdma_free_dmamap(newmap);
- dmat->map_count--;
- }
- *mapp = NULL;
- return (ENOMEM);
+
+ if (vaddr == NULL) {
+ uma_zfree(dmamap_zone, map);
+ map = NULL;
}
- if (flags & BUS_DMA_COHERENT) {
- void *tmpaddr = arm_remap_nocache(
- (void *)((vm_offset_t)*vaddr &~ PAGE_MASK),
- dmat->maxsize + ((vm_offset_t)*vaddr & PAGE_MASK));
-
- if (tmpaddr) {
- tmpaddr = (void *)((vm_offset_t)(tmpaddr) +
- ((vm_offset_t)*vaddr & PAGE_MASK));
- newmap->origbuffer = *vaddr;
- newmap->allocbuffer = tmpaddr;
- *vaddr = tmpaddr;
- } else
- newmap->origbuffer = newmap->allocbuffer = NULL;
- } else
- newmap->origbuffer = newmap->allocbuffer = NULL;
- return (0);
+
+ *vaddrp = vaddr;
+ *mapp = map;
+
+ return (vaddr == NULL ? ENOMEM : 0);
}
/*
- * Free a piece of memory and it's allocated dmamap, that was allocated
- * via bus_dmamem_alloc. Make the same choice for free/contigfree.
+ * Free a piece of memory that was allocated via bus_dmamem_alloc, along with
+ * its associated map.
*/
void
bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map)
{
- if (map->allocbuffer) {
- KASSERT(map->allocbuffer == vaddr,
- ("Trying to freeing the wrong DMA buffer"));
- vaddr = map->origbuffer;
- arm_unmap_nocache(map->allocbuffer,
- dmat->maxsize + ((vm_offset_t)vaddr & PAGE_MASK));
- }
- if (dmat->maxsize <= PAGE_SIZE &&
- dmat->alignment < dmat->maxsize &&
+ struct busdma_bufzone *bufzone;
+ busdma_bufalloc_t ba;
+
+ if (map->flags & DMAMAP_COHERENT)
+ ba = coherent_allocator;
+ else
+ ba = standard_allocator;
+ uma_zfree(dmamap_zone, map);
+
+ /* Be careful not to access map from here on. */
+
+ bufzone = busdma_bufalloc_findzone(ba, dmat->maxsize);
+
+ if (bufzone != NULL && dmat->alignment <= bufzone->size &&
!_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr))
- free(vaddr, M_DEVBUF);
- else {
- contigfree(vaddr, dmat->maxsize, M_DEVBUF);
- }
- dmat->map_count--;
- _busdma_free_dmamap(map);
- CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, dmat->flags);
+ uma_zfree(bufzone->umazone, vaddr);
+ else
+ kmem_free(kernel_map, (vm_offset_t)vaddr, dmat->maxsize);
}
static int
@@ -795,10 +883,6 @@ bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dma_segment_t *segs,
else
curaddr = (*pde & L1_S_FRAME) |
(vaddr & L1_S_OFFSET);
- if (*pde & L1_S_CACHE_MASK) {
- map->flags &=
- ~DMAMAP_COHERENT;
- }
} else {
pte = *ptep;
KASSERT((pte & L2_TYPE_MASK) != L2_TYPE_INV,
@@ -807,18 +891,9 @@ bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dma_segment_t *segs,
== L2_TYPE_L)) {
curaddr = (pte & L2_L_FRAME) |
(vaddr & L2_L_OFFSET);
- if (pte & L2_L_CACHE_MASK) {
- map->flags &=
- ~DMAMAP_COHERENT;
-
- }
} else {
curaddr = (pte & L2_S_FRAME) |
(vaddr & L2_S_OFFSET);
- if (pte & L2_S_CACHE_MASK) {
- map->flags &=
- ~DMAMAP_COHERENT;
- }
}
}
} else {
@@ -914,7 +989,7 @@ bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
map->callback = callback;
map->callback_arg = callback_arg;
map->flags &= ~DMAMAP_TYPE_MASK;
- map->flags |= DMAMAP_LINEAR|DMAMAP_COHERENT;
+ map->flags |= DMAMAP_LINEAR;
map->buffer = buf;
map->len = buflen;
error = bus_dmamap_load_buffer(dmat,
@@ -935,6 +1010,15 @@ bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
/*
* Like bus_dmamap_load(), but for mbufs.
+ *
+ * Note that the manpage states that BUS_DMA_NOWAIT is implied for mbufs.
+ *
+ * We know that the way the system allocates and uses mbufs implies that we can
+ * treat them as DMAMAP_CACHE_ALIGNED in terms of handling partial cache line
+ * flushes. Even though the flush may reference the data area within the mbuf
+ * that isn't aligned to a cache line, we know the overall mbuf itself is
+ * properly aligned, and we know that the CPU will not touch the header fields
+ * before the data area while the DMA is in progress.
*/
int
bus_dmamap_load_mbuf(bus_dma_tag_t dmat, bus_dmamap_t map, struct mbuf *m0,
@@ -945,8 +1029,9 @@ bus_dmamap_load_mbuf(bus_dma_tag_t dmat, bus_dmamap_t map, struct mbuf *m0,
M_ASSERTPKTHDR(m0);
+ flags |= BUS_DMA_NOWAIT;
map->flags &= ~DMAMAP_TYPE_MASK;
- map->flags |= DMAMAP_MBUF | DMAMAP_COHERENT;
+ map->flags |= DMAMAP_MBUF | DMAMAP_CACHE_ALIGNED;
map->buffer = m0;
map->len = 0;
if (m0->m_pkthdr.len <= dmat->maxsize) {
@@ -969,7 +1054,7 @@ bus_dmamap_load_mbuf(bus_dma_tag_t dmat, bus_dmamap_t map, struct mbuf *m0,
/*
* force "no valid mappings" on error in callback.
*/
- (*callback)(callback_arg, dmat->segments, 0, 0, error);
+ (*callback)(callback_arg, NULL, 0, 0, error);
} else {
(*callback)(callback_arg, dmat->segments, nsegs + 1,
m0->m_pkthdr.len, error);
@@ -991,7 +1076,7 @@ bus_dmamap_load_mbuf_sg(bus_dma_tag_t dmat, bus_dmamap_t map,
flags |= BUS_DMA_NOWAIT;
*nsegs = -1;
map->flags &= ~DMAMAP_TYPE_MASK;
- map->flags |= DMAMAP_MBUF | DMAMAP_COHERENT;
+ map->flags |= DMAMAP_MBUF | DMAMAP_CACHE_ALIGNED;
map->buffer = m0;
map->len = 0;
if (m0->m_pkthdr.len <= dmat->maxsize) {
@@ -1035,7 +1120,7 @@ bus_dmamap_load_uio(bus_dma_tag_t dmat, bus_dmamap_t map, struct uio *uio,
resid = uio->uio_resid;
iov = uio->uio_iov;
map->flags &= ~DMAMAP_TYPE_MASK;
- map->flags |= DMAMAP_UIO|DMAMAP_COHERENT;
+ map->flags |= DMAMAP_UIO;
map->buffer = uio;
map->len = 0;
@@ -1058,7 +1143,7 @@ bus_dmamap_load_uio(bus_dma_tag_t dmat, bus_dmamap_t map, struct uio *uio,
caddr_t addr = (caddr_t) iov[i].iov_base;
if (minlen > 0) {
- error = bus_dmamap_load_buffer(dmat, dmat->segments,
+ error = bus_dmamap_load_buffer(dmat, dmat->segments,
map, addr, minlen, pmap, flags, &lastaddr, &nsegs);
map->len += minlen;
@@ -1070,7 +1155,7 @@ bus_dmamap_load_uio(bus_dma_tag_t dmat, bus_dmamap_t map, struct uio *uio,
/*
* force "no valid mappings" on error in callback.
*/
- (*callback)(callback_arg, dmat->segments, 0, 0, error);
+ (*callback)(callback_arg, NULL, 0, 0, error);
} else {
(*callback)(callback_arg, dmat->segments, nsegs+1,
uio->uio_resid, error);
@@ -1098,7 +1183,7 @@ _bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map)
}
static void
-bus_dmamap_sync_buf(void *buf, int len, bus_dmasync_op_t op)
+bus_dmamap_sync_buf(void *buf, int len, bus_dmasync_op_t op, int bufaligned)
{
char _tmp_cl[arm_dcache_align], _tmp_clend[arm_dcache_align];
register_t s;
@@ -1108,7 +1193,25 @@ bus_dmamap_sync_buf(void *buf, int len, bus_dmasync_op_t op)
cpu_dcache_wb_range((vm_offset_t)buf, len);
cpu_l2cache_wb_range((vm_offset_t)buf, len);
}
+
+ /*
+ * If the caller promises the buffer is properly aligned to a cache line
+ * (even if the call parms make it look like it isn't) we can avoid
+ * attempting to preserve the non-DMA part of the cache line in the
+ * POSTREAD case, but we MUST still do a writeback in the PREREAD case.
+ *
+ * This covers the case of mbufs, where we know how they're aligned and
+ * know the CPU doesn't touch the header in front of the DMA data area
+ * during the IO, but it may have touched it right before invoking the
+ * sync, so a PREREAD writeback is required.
+ *
+ * It also handles buffers we created in bus_dmamem_alloc(), which are
+ * always aligned and padded to cache line size even if the IO length
+ * isn't a multiple of cache line size. In this case the PREREAD
+ * writeback probably isn't required, but it's harmless.
+ */
partial = (((vm_offset_t)buf) | len) & arm_dcache_align_mask;
+
if (op & BUS_DMASYNC_PREREAD) {
if (!(op & BUS_DMASYNC_PREWRITE) && !partial) {
cpu_dcache_inv_range((vm_offset_t)buf, len);
@@ -1119,7 +1222,7 @@ bus_dmamap_sync_buf(void *buf, int len, bus_dmasync_op_t op)
}
}
if (op & BUS_DMASYNC_POSTREAD) {
- if (partial) {
+ if (partial && !bufaligned) {
s = intr_disable();
if ((vm_offset_t)buf & arm_dcache_align_mask)
memcpy(_tmp_cl, (void *)((vm_offset_t)buf &
@@ -1133,7 +1236,7 @@ bus_dmamap_sync_buf(void *buf, int len, bus_dmasync_op_t op)
}
cpu_dcache_inv_range((vm_offset_t)buf, len);
cpu_l2cache_inv_range((vm_offset_t)buf, len);
- if (partial) {
+ if (partial && !bufaligned) {
if ((vm_offset_t)buf & arm_dcache_align_mask)
memcpy((void *)((vm_offset_t)buf &
~arm_dcache_align_mask), _tmp_cl,
@@ -1204,25 +1307,29 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
struct uio *uio;
int resid;
struct iovec *iov;
-
+ int bufaligned;
+
if (op == BUS_DMASYNC_POSTWRITE)
return;
+ if (map->flags & DMAMAP_COHERENT)
+ goto drain;
if (STAILQ_FIRST(&map->bpages))
_bus_dmamap_sync_bp(dmat, map, op);
- if (map->flags & DMAMAP_COHERENT)
- return;
CTR3(KTR_BUSDMA, "%s: op %x flags %x", __func__, op, map->flags);
+ bufaligned = (map->flags & DMAMAP_CACHE_ALIGNED);
switch(map->flags & DMAMAP_TYPE_MASK) {
case DMAMAP_LINEAR:
if (!(_bus_dma_buf_is_in_bp(map, map->buffer, map->len)))
- bus_dmamap_sync_buf(map->buffer, map->len, op);
+ bus_dmamap_sync_buf(map->buffer, map->len, op,
+ bufaligned);
break;
case DMAMAP_MBUF:
m = map->buffer;
while (m) {
if (m->m_len > 0 &&
!(_bus_dma_buf_is_in_bp(map, m->m_data, m->m_len)))
- bus_dmamap_sync_buf(m->m_data, m->m_len, op);
+ bus_dmamap_sync_buf(m->m_data, m->m_len, op,
+ bufaligned);
m = m->m_next;
}
break;
@@ -1237,7 +1344,7 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
if (!_bus_dma_buf_is_in_bp(map, iov[i].iov_base,
minlen))
bus_dmamap_sync_buf(iov[i].iov_base,
- minlen, op);
+ minlen, op, bufaligned);
resid -= minlen;
}
}
@@ -1245,6 +1352,9 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
default:
break;
}
+
+drain:
+
cpu_drain_writebuf();
}
diff --git a/sys/arm/arm/cpufunc.c b/sys/arm/arm/cpufunc.c
index ca08685..5dc2679 100644
--- a/sys/arm/arm/cpufunc.c
+++ b/sys/arm/arm/cpufunc.c
@@ -974,18 +974,18 @@ struct cpu_functions fa526_cpufuncs = {
};
#endif /* CPU_FA526 || CPU_FA626TE */
-#if defined(CPU_ARM11)
-struct cpu_functions arm11_cpufuncs = {
+#if defined(CPU_ARM1136)
+struct cpu_functions arm1136_cpufuncs = {
/* CPU functions */
cpufunc_id, /* id */
- arm11_drain_writebuf, /* cpwait */
+ cpufunc_nullop, /* cpwait */
/* MMU functions */
cpufunc_control, /* control */
cpufunc_domains, /* Domain */
- arm11_setttb, /* Setttb */
+ arm11x6_setttb, /* Setttb */
cpufunc_faultstatus, /* Faultstatus */
cpufunc_faultaddress, /* Faultaddress */
@@ -1000,30 +1000,91 @@ struct cpu_functions arm11_cpufuncs = {
/* Cache operations */
- armv6_icache_sync_all, /* icache_sync_all */
- armv6_icache_sync_range, /* icache_sync_range */
+ arm11x6_icache_sync_all, /* icache_sync_all */
+ arm11x6_icache_sync_range, /* icache_sync_range */
- armv6_dcache_wbinv_all, /* dcache_wbinv_all */
+ arm11x6_dcache_wbinv_all, /* dcache_wbinv_all */
armv6_dcache_wbinv_range, /* dcache_wbinv_range */
armv6_dcache_inv_range, /* dcache_inv_range */
armv6_dcache_wb_range, /* dcache_wb_range */
- armv6_idcache_wbinv_all, /* idcache_wbinv_all */
- armv6_idcache_wbinv_range, /* idcache_wbinv_range */
+ arm11x6_idcache_wbinv_all, /* idcache_wbinv_all */
+ arm11x6_idcache_wbinv_range, /* idcache_wbinv_range */
- (void*)cpufunc_nullop, /* l2cache_wbinv_all */
+ (void *)cpufunc_nullop, /* l2cache_wbinv_all */
(void *)cpufunc_nullop, /* l2cache_wbinv_range */
(void *)cpufunc_nullop, /* l2cache_inv_range */
(void *)cpufunc_nullop, /* l2cache_wb_range */
/* Other functions */
- cpufunc_nullop, /* flush_prefetchbuf */
+ arm11x6_flush_prefetchbuf, /* flush_prefetchbuf */
arm11_drain_writebuf, /* drain_writebuf */
cpufunc_nullop, /* flush_brnchtgt_C */
(void *)cpufunc_nullop, /* flush_brnchtgt_E */
- arm11_sleep, /* sleep */
+ arm11_sleep, /* sleep */
+
+ /* Soft functions */
+
+ cpufunc_null_fixup, /* dataabt_fixup */
+ cpufunc_null_fixup, /* prefetchabt_fixup */
+
+ arm11_context_switch, /* context_switch */
+
+ arm11x6_setup /* cpu setup */
+};
+#endif /* CPU_ARM1136 */
+#if defined(CPU_ARM1176)
+struct cpu_functions arm1176_cpufuncs = {
+ /* CPU functions */
+
+ cpufunc_id, /* id */
+ cpufunc_nullop, /* cpwait */
+
+ /* MMU functions */
+
+ cpufunc_control, /* control */
+ cpufunc_domains, /* Domain */
+ arm11x6_setttb, /* Setttb */
+ cpufunc_faultstatus, /* Faultstatus */
+ cpufunc_faultaddress, /* Faultaddress */
+
+ /* TLB functions */
+
+ arm11_tlb_flushID, /* tlb_flushID */
+ arm11_tlb_flushID_SE, /* tlb_flushID_SE */
+ arm11_tlb_flushI, /* tlb_flushI */
+ arm11_tlb_flushI_SE, /* tlb_flushI_SE */
+ arm11_tlb_flushD, /* tlb_flushD */
+ arm11_tlb_flushD_SE, /* tlb_flushD_SE */
+
+ /* Cache operations */
+
+ arm11x6_icache_sync_all, /* icache_sync_all */
+ arm11x6_icache_sync_range, /* icache_sync_range */
+
+ arm11x6_dcache_wbinv_all, /* dcache_wbinv_all */
+ armv6_dcache_wbinv_range, /* dcache_wbinv_range */
+ armv6_dcache_inv_range, /* dcache_inv_range */
+ armv6_dcache_wb_range, /* dcache_wb_range */
+
+ arm11x6_idcache_wbinv_all, /* idcache_wbinv_all */
+ arm11x6_idcache_wbinv_range, /* idcache_wbinv_range */
+
+ (void *)cpufunc_nullop, /* l2cache_wbinv_all */
+ (void *)cpufunc_nullop, /* l2cache_wbinv_range */
+ (void *)cpufunc_nullop, /* l2cache_inv_range */
+ (void *)cpufunc_nullop, /* l2cache_wb_range */
+
+ /* Other functions */
+
+ arm11x6_flush_prefetchbuf, /* flush_prefetchbuf */
+ arm11_drain_writebuf, /* drain_writebuf */
+ cpufunc_nullop, /* flush_brnchtgt_C */
+ (void *)cpufunc_nullop, /* flush_brnchtgt_E */
+
+ arm11x6_sleep, /* sleep */
/* Soft functions */
@@ -1032,9 +1093,9 @@ struct cpu_functions arm11_cpufuncs = {
arm11_context_switch, /* context_switch */
- arm11_setup /* cpu setup */
+ arm11x6_setup /* cpu setup */
};
-#endif /* CPU_ARM11 */
+#endif /*CPU_ARM1176 */
#if defined(CPU_CORTEXA)
struct cpu_functions cortexa_cpufuncs = {
@@ -1111,8 +1172,8 @@ u_int cputype;
u_int cpu_reset_needs_v4_MMU_disable; /* flag used in locore.s */
#if defined(CPU_ARM7TDMI) || defined(CPU_ARM8) || defined(CPU_ARM9) || \
- defined (CPU_ARM9E) || defined (CPU_ARM10) || defined (CPU_ARM11) || \
- defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \
+ defined (CPU_ARM9E) || defined (CPU_ARM10) || defined (CPU_ARM1136) || \
+ defined(CPU_ARM1176) || defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \
defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \
defined(CPU_FA526) || defined(CPU_FA626TE) || defined(CPU_MV_PJ4B) || \
defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \
@@ -1393,15 +1454,27 @@ set_cpufuncs()
goto out;
}
#endif /* CPU_ARM10 */
-#ifdef CPU_ARM11
- cpufuncs = arm11_cpufuncs;
- cpu_reset_needs_v4_MMU_disable = 1; /* V4 or higher */
- get_cachetype_cp15();
-
- pmap_pte_init_mmu_v6();
+#if defined(CPU_ARM1136) || defined(CPU_ARM1176)
+ if (cputype == CPU_ID_ARM1136JS
+ || cputype == CPU_ID_ARM1136JSR1
+ || cputype == CPU_ID_ARM1176JZS) {
+#ifdef CPU_ARM1136
+ if (cputype == CPU_ID_ARM1136JS
+ || cputype == CPU_ID_ARM1136JSR1)
+ cpufuncs = arm1136_cpufuncs;
+#endif
+#ifdef CPU_ARM1176
+ if (cputype == CPU_ID_ARM1176JZS)
+ cpufuncs = arm1176_cpufuncs;
+#endif
+ cpu_reset_needs_v4_MMU_disable = 1; /* V4 or higher */
+ get_cachetype_cp15();
+
+ pmap_pte_init_mmu_v6();
- goto out;
-#endif /* CPU_ARM11 */
+ goto out;
+ }
+#endif /* CPU_ARM1136 || CPU_ARM1176 */
#ifdef CPU_CORTEXA
if (cputype == CPU_ID_CORTEXA8R1 ||
cputype == CPU_ID_CORTEXA8R2 ||
@@ -1962,7 +2035,7 @@ late_abort_fixup(arg)
defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \
defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \
defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \
- defined(CPU_ARM10) || defined(CPU_ARM11) || \
+ defined(CPU_ARM10) || defined(CPU_ARM1136) || defined(CPU_ARM1176) ||\
defined(CPU_FA526) || defined(CPU_FA626TE)
#define IGN 0
@@ -2262,7 +2335,7 @@ arm10_setup(args)
}
#endif /* CPU_ARM9E || CPU_ARM10 */
-#ifdef CPU_ARM11
+#if defined(CPU_ARM1136) || defined(CPU_ARM1176)
struct cpu_option arm11_options[] = {
{ "cpu.cache", BIC, OR, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) },
{ "cpu.nocache", OR, BIC, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) },
@@ -2273,41 +2346,100 @@ struct cpu_option arm11_options[] = {
};
void
-arm11_setup(args)
- char *args;
+arm11x6_setup(char *args)
{
- int cpuctrl;
+ int cpuctrl, cpuctrl_wax;
+ uint32_t auxctrl, auxctrl_wax;
+ uint32_t tmp, tmp2;
+ uint32_t sbz=0;
+ uint32_t cpuid;
+
+ cpuid = cpufunc_id();
+
+ cpuctrl =
+ CPU_CONTROL_MMU_ENABLE |
+ CPU_CONTROL_DC_ENABLE |
+ CPU_CONTROL_WBUF_ENABLE |
+ CPU_CONTROL_32BP_ENABLE |
+ CPU_CONTROL_32BD_ENABLE |
+ CPU_CONTROL_LABT_ENABLE |
+ CPU_CONTROL_SYST_ENABLE |
+ CPU_CONTROL_IC_ENABLE;
+
+ /*
+ * "write as existing" bits
+ * inverse of this is mask
+ */
+ cpuctrl_wax =
+ (3 << 30) | /* SBZ */
+ (1 << 29) | /* FA */
+ (1 << 28) | /* TR */
+ (3 << 26) | /* SBZ */
+ (3 << 19) | /* SBZ */
+ (1 << 17); /* SBZ */
+
+ cpuctrl |= CPU_CONTROL_BPRD_ENABLE;
+ cpuctrl |= CPU_CONTROL_V6_EXTPAGE;
- cpuctrl = CPU_CONTROL_MMU_ENABLE;
-#ifndef ARM32_DISABLE_ALIGNMENT_FAULTS
- cpuctrl |= CPU_CONTROL_AFLT_ENABLE;
-#endif
- cpuctrl |= CPU_CONTROL_DC_ENABLE;
- cpuctrl |= (0xf << 3);
cpuctrl = parse_cpu_options(args, arm11_options, cpuctrl);
+
#ifdef __ARMEB__
cpuctrl |= CPU_CONTROL_BEND_ENABLE;
#endif
- cpuctrl |= CPU_CONTROL_SYST_ENABLE;
- cpuctrl |= CPU_CONTROL_BPRD_ENABLE;
- cpuctrl |= CPU_CONTROL_IC_ENABLE;
+
if (vector_page == ARM_VECTORS_HIGH)
cpuctrl |= CPU_CONTROL_VECRELOC;
- cpuctrl |= (0x5 << 16);
- cpuctrl |= CPU_CONTROL_V6_EXTPAGE;
- /* Make sure caches are clean. */
+ auxctrl = 0;
+ auxctrl_wax = ~0;
+ /*
+ * This options enables the workaround for the 364296 ARM1136
+ * r0pX errata (possible cache data corruption with
+ * hit-under-miss enabled). It sets the undocumented bit 31 in
+ * the auxiliary control register and the FI bit in the control
+ * register, thus disabling hit-under-miss without putting the
+ * processor into full low interrupt latency mode. ARM11MPCore
+ * is not affected.
+ */
+ if ((cpuid & CPU_ID_CPU_MASK) == CPU_ID_ARM1136JS) { /* ARM1136JSr0pX */
+ cpuctrl |= CPU_CONTROL_FI_ENABLE;
+ auxctrl = ARM1136_AUXCTL_PFI;
+ auxctrl_wax = ~ARM1136_AUXCTL_PFI;
+ }
+
+ /*
+ * Enable an errata workaround
+ */
+ if ((cpuid & CPU_ID_CPU_MASK) == CPU_ID_ARM1176JZS) { /* ARM1176JZSr0 */
+ auxctrl = ARM1176_AUXCTL_PHD;
+ auxctrl_wax = ~ARM1176_AUXCTL_PHD;
+ }
+
+ /* Clear out the cache */
cpu_idcache_wbinv_all();
- cpu_l2cache_wbinv_all();
+
+ /* Now really make sure they are clean. */
+ __asm volatile ("mcr\tp15, 0, %0, c7, c7, 0" : : "r"(sbz));
+
+ /* Allow detection code to find the VFP if it's fitted. */
+ __asm volatile ("mcr\tp15, 0, %0, c1, c0, 2" : : "r" (0x0fffffff));
/* Set the control register */
ctrl = cpuctrl;
- cpu_control(0xffffffff, cpuctrl);
+ cpu_control(~cpuctrl_wax, cpuctrl);
+ __asm volatile ("mrc p15, 0, %0, c1, c0, 1\n\t"
+ "and %1, %0, %2\n\t"
+ "orr %1, %1, %3\n\t"
+ "teq %0, %1\n\t"
+ "mcrne p15, 0, %1, c1, c0, 1\n\t"
+ : "=r"(tmp), "=r"(tmp2) :
+ "r"(auxctrl_wax), "r"(auxctrl));
+
+ /* And again. */
cpu_idcache_wbinv_all();
- cpu_l2cache_wbinv_all();
}
-#endif /* CPU_ARM11 */
+#endif /* CPU_ARM1136 || CPU_ARM1176 */
#ifdef CPU_MV_PJ4B
void
diff --git a/sys/arm/arm/cpufunc_asm_arm11x6.S b/sys/arm/arm/cpufunc_asm_arm11x6.S
new file mode 100644
index 0000000..fc9b7ec
--- /dev/null
+++ b/sys/arm/arm/cpufunc_asm_arm11x6.S
@@ -0,0 +1,216 @@
+/* $NetBSD: cpufunc_asm_arm11x6.S,v 1.1 2012/07/21 12:19:15 skrll Exp $ */
+
+/*
+ * Copyright (c) 2007 Microsoft
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Microsoft
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTERS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*-
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Eben Upton
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
+#if 0
+#define Invalidate_I_cache(Rtmp1, Rtmp2) \
+ mcr p15, 0, Rtmp1, c7, c5, 0 /* Invalidate Entire I cache */
+#else
+/*
+ * Workaround for
+ *
+ * Erratum 411920 in ARM1136 (fixed in r1p4)
+ * Erratum 415045 in ARM1176 (fixed in r0p5?)
+ *
+ * - value of arg 'reg' Should Be Zero
+ */
+#define Invalidate_I_cache(Rtmp1, Rtmp2) \
+ mov Rtmp1, #0; /* SBZ */ \
+ mrs Rtmp2, cpsr; \
+ cpsid ifa; \
+ mcr p15, 0, Rtmp1, c7, c5, 0; /* Nuke Whole Icache */ \
+ mcr p15, 0, Rtmp1, c7, c5, 0; /* Nuke Whole Icache */ \
+ mcr p15, 0, Rtmp1, c7, c5, 0; /* Nuke Whole Icache */ \
+ mcr p15, 0, Rtmp1, c7, c5, 0; /* Nuke Whole Icache */ \
+ msr cpsr_cx, Rtmp2; \
+ nop; \
+ nop; \
+ nop; \
+ nop; \
+ nop; \
+ nop; \
+ nop; \
+ nop; \
+ nop; \
+ nop; \
+ nop;
+#endif
+
+#if 1
+#define Flush_D_cache(reg) \
+ mov reg, #0; /* SBZ */ \
+ mcr p15, 0, reg, c7, c14, 0;/* Clean and Invalidate Entire Data Cache */ \
+ mcr p15, 0, reg, c7, c10, 4;/* Data Synchronization Barrier */
+#else
+#define Flush_D_cache(reg) \
+1: mov reg, #0; /* SBZ */ \
+ mcr p15, 0, reg, c7, c14, 0;/* Clean and Invalidate Entire Data Cache */ \
+ mrc p15, 0, reg, C7, C10, 6;/* Read Cache Dirty Status Register */ \
+ ands reg, reg, #01; /* Check if it is clean */ \
+ bne 1b; /* loop if not */ \
+ mcr p15, 0, reg, c7, c10, 4;/* Data Synchronization Barrier */
+#endif
+
+ENTRY(arm11x6_setttb)
+#ifdef PMAP_CACHE_VIVT
+ Flush_D_cache(r1)
+ Invalidate_I_cache(r1, r2)
+#else
+ mov r1, #0
+#endif
+ mcr p15, 0, r0, c2, c0, 0 /* load new TTB */
+ mcr p15, 0, r1, c8, c7, 0 /* invalidate I+D TLBs */
+ mcr p15, 0, r1, c7, c10, 4 /* drain write buffer */
+ RET
+
+ENTRY_NP(arm11x6_idcache_wbinv_all)
+ Flush_D_cache(r0)
+ Invalidate_I_cache(r0, r1)
+ RET
+
+ENTRY_NP(arm11x6_dcache_wbinv_all)
+ Flush_D_cache(r0)
+ RET
+
+ENTRY_NP(arm11x6_icache_sync_all)
+ Flush_D_cache(r0)
+ Invalidate_I_cache(r0, r1)
+ RET
+
+ENTRY_NP(arm11x6_flush_prefetchbuf)
+ mcr p15, 0, r0, c7, c5, 4 /* Flush Prefetch Buffer */
+ RET
+
+ENTRY_NP(arm11x6_icache_sync_range)
+ add r1, r1, r0
+ sub r1, r1, #1
+ /* Erratum ARM1136 371025, workaround #2 */
+ /* Erratum ARM1176 371367 */
+ mrs r2, cpsr /* save the CPSR */
+ cpsid ifa /* disable interrupts (irq,fiq,abort) */
+ mov r3, #0
+ mcr p15, 0, r3, c13, c0, 0 /* write FCSE (uTLB invalidate) */
+ mcr p15, 0, r3, c7, c5, 4 /* flush prefetch buffer */
+ add r3, pc, #0x24
+ mcr p15, 0, r3, c7, c13, 1 /* prefetch I-cache line */
+ mcrr p15, 0, r1, r0, c5 /* invalidate I-cache range */
+ msr cpsr_cx, r2 /* local_irq_restore */
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+
+ mcrr p15, 0, r1, r0, c12 /* clean and invalidate D cache range */ /* XXXNH */
+ mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */
+ RET
+
+ENTRY_NP(arm11x6_idcache_wbinv_range)
+ add r1, r1, r0
+ sub r1, r1, #1
+ /* Erratum ARM1136 371025, workaround #2 */
+ /* Erratum ARM1176 371367 */
+ mrs r2, cpsr /* save the CPSR */
+ cpsid ifa /* disable interrupts (irq,fiq,abort) */
+ mov r3, #0
+ mcr p15, 0, r3, c13, c0, 0 /* write FCSE (uTLB invalidate) */
+ mcr p15, 0, r3, c7, c5, 4 /* flush prefetch buffer */
+ add r3, pc, #0x24
+ mcr p15, 0, r3, c7, c13, 1 /* prefetch I-cache line */
+ mcrr p15, 0, r1, r0, c5 /* invalidate I-cache range */
+ msr cpsr_cx, r2 /* local_irq_restore */
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+
+ mcrr p15, 0, r1, r0, c14 /* clean and invalidate D cache range */
+ mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */
+ RET
+
+/*
+ * Preload the cache before issuing the WFI by conditionally disabling the
+ * mcr intstructions the first time around the loop. Ensure the function is
+ * cacheline aligned.
+ */
+ .arch armv6
+ .p2align 5
+
+ENTRY_NP(arm11x6_sleep)
+ mov r0, #0
+ mov r1, #2
+1:
+ subs r1, #1
+ nop
+ mcreq p15, 0, r0, c7, c10, 4 /* data sync barrier */
+ mcreq p15, 0, r0, c7, c0, 4 /* wait for interrupt */
+ nop
+ nop
+ nop
+ bne 1b
+ RET
diff --git a/sys/arm/arm/elf_trampoline.c b/sys/arm/arm/elf_trampoline.c
index 2a218bf..31e8bc5 100644
--- a/sys/arm/arm/elf_trampoline.c
+++ b/sys/arm/arm/elf_trampoline.c
@@ -63,7 +63,7 @@ void __startC(void);
#define cpu_idcache_wbinv_all armv5_ec_idcache_wbinv_all
#elif defined(CPU_ARM10)
#define cpu_idcache_wbinv_all arm10_idcache_wbinv_all
-#elif defined(CPU_ARM11)
+#elif defined(CPU_ARM1136) || defined(CPU_ARM1176)
#define cpu_idcache_wbinv_all armv6_idcache_wbinv_all
#elif defined(CPU_SA110) || defined(CPU_SA1110) || defined(CPU_SA1100) || \
defined(CPU_IXP12X0)
diff --git a/sys/arm/arm/identcpu.c b/sys/arm/arm/identcpu.c
index e3d5d4e..56f6e06 100644
--- a/sys/arm/arm/identcpu.c
+++ b/sys/arm/arm/identcpu.c
@@ -307,6 +307,8 @@ const struct cpuidtab cpuids[] = {
generic_steppings },
{ CPU_ID_ARM1136JSR1, CPU_CLASS_ARM11J, "ARM1136J-S R1",
generic_steppings },
+ { CPU_ID_ARM1176JZS, CPU_CLASS_ARM11J, "ARM1176JZ-S",
+ generic_steppings },
{ CPU_ID_MV88FR131, CPU_CLASS_MARVELL, "Feroceon 88FR131",
generic_steppings },
diff --git a/sys/arm/arm/locore.S b/sys/arm/arm/locore.S
index 8d2da54..ed7af25 100644
--- a/sys/arm/arm/locore.S
+++ b/sys/arm/arm/locore.S
@@ -168,7 +168,7 @@ Lunmapped:
mcr p15, 0, r0, c2, c0, 0 /* Set TTB */
mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */
-#if defined(CPU_ARM11) || defined(CPU_CORTEXA) || defined(CPU_MV_PJ4B)
+#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_CORTEXA) || defined(CPU_MV_PJ4B)
mov r0, #0
mcr p15, 0, r0, c13, c0, 1 /* Set ASID to 0 */
#endif
@@ -178,7 +178,7 @@ Lunmapped:
mcr p15, 0, r0, c3, c0, 0
/* Enable MMU */
mrc p15, 0, r0, c1, c0, 0
-#if defined(CPU_ARM11) || defined(CPU_CORTEXA) || defined(CPU_MV_PJ4B)
+#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_CORTEXA) || defined(CPU_MV_PJ4B)
orr r0, r0, #CPU_CONTROL_V6_EXTPAGE
#endif
orr r0, r0, #(CPU_CONTROL_MMU_ENABLE)
@@ -363,7 +363,7 @@ Ltag:
mcr p15, 0, r0, c2, c0, 0 /* Set TTB */
mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */
-#if defined(CPU_ARM11) || defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA)
+#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA)
mov r0, #0
mcr p15, 0, r0, c13, c0, 1 /* Set ASID to 0 */
#endif
@@ -375,7 +375,7 @@ Ltag:
mcr p15, 0, r0, c3, c0, 0
/* Enable MMU */
mrc p15, 0, r0, c1, c0, 0
-#if defined(CPU_ARM11) || defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA)
+#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA)
orr r0, r0, #CPU_CONTROL_V6_EXTPAGE
#endif
orr r0, r0, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE)
diff --git a/sys/arm/arm/pl190.c b/sys/arm/arm/pl190.c
new file mode 100644
index 0000000..3e38073
--- /dev/null
+++ b/sys/arm/arm/pl190.c
@@ -0,0 +1,187 @@
+/*-
+ * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@bluezbox.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/kernel.h>
+#include <sys/ktr.h>
+#include <sys/module.h>
+#include <sys/rman.h>
+#include <machine/bus.h>
+#include <machine/intr.h>
+
+#include <dev/fdt/fdt_common.h>
+#include <dev/ofw/openfirm.h>
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
+#ifdef DEBUG
+#define dprintf(fmt, args...) printf(fmt, ##args)
+#else
+#define dprintf(fmt, args...)
+#endif
+
+#define VICIRQSTATUS 0x000
+#define VICFIQSTATUS 0x004
+#define VICRAWINTR 0x008
+#define VICINTSELECT 0x00C
+#define VICINTENABLE 0x010
+#define VICINTENCLEAR 0x014
+#define VICSOFTINT 0x018
+#define VICSOFTINTCLEAR 0x01C
+#define VICPROTECTION 0x020
+#define VICPERIPHID 0xFE0
+#define VICPRIMECELLID 0xFF0
+
+#define VIC_NIRQS 32
+
+struct pl190_intc_softc {
+ device_t sc_dev;
+ struct resource * intc_res;
+};
+
+static struct pl190_intc_softc *pl190_intc_sc = NULL;
+
+#define intc_vic_read_4(reg) \
+ bus_read_4(pl190_intc_sc->intc_res, (reg))
+#define intc_vic_write_4(reg, val) \
+ bus_write_4(pl190_intc_sc->intc_res, (reg), (val))
+
+static int
+pl190_intc_probe(device_t dev)
+{
+ if (!ofw_bus_is_compatible(dev, "arm,versatile-vic"))
+ return (ENXIO);
+ device_set_desc(dev, "ARM PL190 VIC");
+ return (BUS_PROBE_DEFAULT);
+}
+
+static int
+pl190_intc_attach(device_t dev)
+{
+ struct pl190_intc_softc *sc = device_get_softc(dev);
+ uint32_t id;
+ int i, rid;
+
+ sc->sc_dev = dev;
+
+ if (pl190_intc_sc)
+ return (ENXIO);
+
+ /* Request memory resources */
+ rid = 0;
+ sc->intc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
+ RF_ACTIVE);
+ if (sc->intc_res == NULL) {
+ device_printf(dev, "Error: could not allocate memory resources\n");
+ return (ENXIO);
+ }
+
+ pl190_intc_sc = sc;
+ /*
+ * All interrupts should use IRQ line
+ */
+ intc_vic_write_4(VICINTSELECT, 0x00000000);
+ /* Disable all interrupts */
+ intc_vic_write_4(VICINTENCLEAR, 0xffffffff);
+ /* Enable INT31, SIC IRQ */
+ intc_vic_write_4(VICINTENABLE, (1 << 31));
+
+ id = 0;
+ for (i = 3; i >= 0; i--) {
+ id = (id << 8) |
+ (intc_vic_read_4(VICPERIPHID + i*4) & 0xff);
+ }
+
+ device_printf(dev, "Peripheral ID: %08x\n", id);
+
+ id = 0;
+ for (i = 3; i >= 0; i--) {
+ id = (id << 8) |
+ (intc_vic_read_4(VICPRIMECELLID + i*4) & 0xff);
+ }
+
+ device_printf(dev, "PrimeCell ID: %08x\n", id);
+
+ return (0);
+}
+
+static device_method_t pl190_intc_methods[] = {
+ DEVMETHOD(device_probe, pl190_intc_probe),
+ DEVMETHOD(device_attach, pl190_intc_attach),
+ { 0, 0 }
+};
+
+static driver_t pl190_intc_driver = {
+ "intc",
+ pl190_intc_methods,
+ sizeof(struct pl190_intc_softc),
+};
+
+static devclass_t pl190_intc_devclass;
+
+DRIVER_MODULE(intc, simplebus, pl190_intc_driver, pl190_intc_devclass, 0, 0);
+
+int
+arm_get_next_irq(int last_irq)
+{
+ uint32_t pending;
+ int32_t irq = last_irq + 1;
+
+ /* Sanity check */
+ if (irq < 0)
+ irq = 0;
+
+ pending = intc_vic_read_4(VICIRQSTATUS);
+ while (irq < VIC_NIRQS) {
+ if (pending & (1 << irq))
+ return (irq);
+ irq++;
+ }
+
+ return (-1);
+}
+
+void
+arm_mask_irq(uintptr_t nb)
+{
+
+ dprintf("%s: %d\n", __func__, nb);
+ intc_vic_write_4(VICINTENCLEAR, (1 << nb));
+}
+
+void
+arm_unmask_irq(uintptr_t nb)
+{
+
+ dprintf("%s: %d\n", __func__, nb);
+ intc_vic_write_4(VICINTENABLE, (1 << nb));
+}
diff --git a/sys/arm/arm/pl310.c b/sys/arm/arm/pl310.c
index 7c43b31..a5af23c 100644
--- a/sys/arm/arm/pl310.c
+++ b/sys/arm/arm/pl310.c
@@ -39,62 +39,39 @@ __FBSDID("$FreeBSD$");
#include <sys/lock.h>
#include <sys/mutex.h>
#include <machine/intr.h>
-#include <vm/vm.h>
-#include <vm/pmap.h>
-#include <machine/pl310.h>
+
#include <machine/bus.h>
+#include <machine/pl310.h>
#include <dev/fdt/fdt_common.h>
#include <dev/ofw/openfirm.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
-/**
- * PL310 - L2 Cache Controller register offsets.
- *
+/*
+ * Define this if you need to disable PL310 for debugging purpose
+ * Spec:
+ * http://infocenter.arm.com/help/topic/com.arm.doc.ddi0246e/DDI0246E_l2c310_r3p1_trm.pdf
+ */
+
+/*
+ * Hardcode errata for now
+ * http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0246b/pr01s02s02.html
*/
-#define PL310_CACHE_ID 0x000
-#define PL310_CACHE_TYPE 0x004
-#define PL310_CTRL 0x100
-#define PL310_AUX_CTRL 0x104
-#define PL310_EVENT_COUNTER_CTRL 0x200
-#define PL310_EVENT_COUNTER1_CONF 0x204
-#define PL310_EVENT_COUNTER0_CONF 0x208
-#define PL310_EVENT_COUNTER1_VAL 0x20C
-#define PL310_EVENT_COUNTER0_VAL 0x210
-#define PL310_INTR_MASK 0x214
-#define PL310_MASKED_INTR_STAT 0x218
-#define PL310_RAW_INTR_STAT 0x21C
-#define PL310_INTR_CLEAR 0x220
-#define PL310_CACHE_SYNC 0x730
-#define PL310_INV_LINE_PA 0x770
-#define PL310_INV_WAY 0x77C
-#define PL310_CLEAN_LINE_PA 0x7B0
-#define PL310_CLEAN_LINE_IDX 0x7B8
-#define PL310_CLEAN_WAY 0x7BC
-#define PL310_CLEAN_INV_LINE_PA 0x7F0
-#define PL310_CLEAN_INV_LINE_IDX 0x7F8
-#define PL310_CLEAN_INV_WAY 0x7FC
-#define PL310_LOCKDOWN_D_WAY(x) (0x900 + ((x) * 8))
-#define PL310_LOCKDOWN_I_WAY(x) (0x904 + ((x) * 8))
-#define PL310_LOCKDOWN_LINE_ENABLE 0x950
-#define PL310_UNLOCK_ALL_LINES_WAY 0x954
-#define PL310_ADDR_FILTER_START 0xC00
-#define PL310_ADDR_FILTER_END 0xC04
-#define PL310_DEBUG_CTRL 0xF40
-
-
-#define PL310_AUX_CTRL_MASK 0xc0000fff
-#define PL310_AUX_CTRL_ASSOCIATIVITY_SHIFT 16
-#define PL310_AUX_CTRL_WAY_SIZE_SHIFT 17
-#define PL310_AUX_CTRL_WAY_SIZE_MASK (0x7 << 17)
-#define PL310_AUX_CTRL_SHARE_OVERRIDE_SHIFT 22
-#define PL310_AUX_CTRL_NS_LOCKDOWN_SHIFT 26
-#define PL310_AUX_CTRL_NS_INT_CTRL_SHIFT 27
-#define PL310_AUX_CTRL_DATA_PREFETCH_SHIFT 28
-#define PL310_AUX_CTRL_INSTR_PREFETCH_SHIFT 29
-#define PL310_AUX_CTRL_EARLY_BRESP_SHIFT 30
+#define PL310_ERRATA_588369
+#define PL310_ERRATA_753970
+#define PL310_ERRATA_727915
+
+#define PL310_LOCK(sc) do { \
+ mtx_lock_spin(&(sc)->sc_mtx); \
+} while(0);
+#define PL310_UNLOCK(sc) do { \
+ mtx_unlock_spin(&(sc)->sc_mtx); \
+} while(0);
+
+static int pl310_enabled = 1;
+TUNABLE_INT("pl310.enabled", &pl310_enabled);
void omap4_l2cache_wbinv_range(vm_paddr_t physaddr, vm_size_t size);
void omap4_l2cache_inv_range(vm_paddr_t physaddr, vm_size_t size);
@@ -112,34 +89,31 @@ static uint32_t g_l2cache_size;
static struct pl310_softc *pl310_softc;
-/**
- * pl310_read4 - read a 32-bit value from the PL310 registers
- * pl310_write4 - write a 32-bit value from the PL310 registers
- * @off: byte offset within the register set to read from
- * @val: the value to write into the register
- *
- *
- * LOCKING:
- * None
- *
- * RETURNS:
- * nothing in case of write function, if read function returns the value read.
- */
-static __inline uint32_t
-pl310_read4(bus_size_t off)
-{
- return bus_read_4(pl310_softc->sc_mem_res, off);
-}
-static __inline void
-pl310_write4(bus_size_t off, uint32_t val)
+static int
+pl310_filter(void *arg)
{
- bus_write_4(pl310_softc->sc_mem_res, off, val);
+ struct pl310_softc *sc = arg;
+ uint32_t intr;
+
+ intr = pl310_read4(sc, PL310_INTR_MASK);
+
+ if (!sc->sc_enabled && (intr & INTR_MASK_ECNTR)) {
+ /*
+ * This is for debug purpose, so be blunt about it
+ * We disable PL310 only when something fishy is going
+ * on and we need to make sure L2 cache is 100% disabled
+ */
+ panic("pl310: caches disabled but cache event detected\n");
+ }
+
+ return (FILTER_HANDLED);
}
static __inline void
pl310_wait_background_op(uint32_t off, uint32_t mask)
{
- while (pl310_read4(off) & mask);
+
+ while (pl310_read4(pl310_softc, off) & mask);
}
@@ -157,29 +131,46 @@ pl310_wait_background_op(uint32_t off, uint32_t mask)
static __inline void
pl310_cache_sync(void)
{
- pl310_write4(PL310_CACHE_SYNC, 0);
+ if ((pl310_softc == NULL) || !pl310_softc->sc_enabled)
+ return;
+
+#ifdef PL310_ERRATA_753970
+ /* Write uncached PL310 register */
+ pl310_write4(pl310_softc, 0x740, 0xffffffff);
+#else
+ pl310_write4(pl310_softc, PL310_CACHE_SYNC, 0xffffffff);
+#endif
}
static void
pl310_wbinv_all(void)
{
-#if 1
- pl310_write4(PL310_DEBUG_CTRL, 3);
+
+ if ((pl310_softc == NULL) || !pl310_softc->sc_enabled)
+ return;
+
+ PL310_LOCK(pl310_softc);
+#ifdef PL310_ERRATA_727915
+ platform_pl310_write_debug(pl310_softc, 3);
#endif
- pl310_write4(PL310_CLEAN_INV_WAY, g_l2cache_way_mask);
+ pl310_write4(pl310_softc, PL310_CLEAN_INV_WAY, g_l2cache_way_mask);
pl310_wait_background_op(PL310_CLEAN_INV_WAY, g_l2cache_way_mask);
pl310_cache_sync();
-#if 1
- pl310_write4(PL310_DEBUG_CTRL, 0);
+#ifdef PL310_ERRATA_727915
+ platform_pl310_write_debug(pl310_softc, 0);
#endif
-
+ PL310_UNLOCK(pl310_softc);
}
static void
pl310_wbinv_range(vm_paddr_t start, vm_size_t size)
{
-
+
+ if ((pl310_softc == NULL) || !pl310_softc->sc_enabled)
+ return;
+
+ PL310_LOCK(pl310_softc);
if (start & g_l2cache_align_mask) {
size += start & g_l2cache_align_mask;
start &= ~g_l2cache_align_mask;
@@ -188,12 +179,13 @@ pl310_wbinv_range(vm_paddr_t start, vm_size_t size)
size &= ~g_l2cache_align_mask;
size += g_l2cache_line_size;
}
-#if 1
- pl310_write4(PL310_DEBUG_CTRL, 3);
+
+#ifdef PL310_ERRATA_727915
+ platform_pl310_write_debug(pl310_softc, 3);
#endif
while (size > 0) {
-#if 1
+#ifdef PL310_ERRATA_588369
/*
* Errata 588369 says that clean + inv may keep the
* cache line if it was clean, the recommanded workaround
@@ -201,48 +193,58 @@ pl310_wbinv_range(vm_paddr_t start, vm_size_t size)
* write-back and cache linefill disabled
*/
- pl310_write4(PL310_CLEAN_LINE_PA, start);
- pl310_write4(PL310_INV_LINE_PA, start);
+ pl310_write4(pl310_softc, PL310_CLEAN_LINE_PA, start);
+ pl310_write4(pl310_softc, PL310_INV_LINE_PA, start);
#else
- pl310_write4(PL310_CLEAN_INV_LINE_PA, start);
+ pl310_write4(pl310_softc, PL310_CLEAN_INV_LINE_PA, start);
#endif
start += g_l2cache_line_size;
size -= g_l2cache_line_size;
}
-#if 1
- pl310_write4(PL310_DEBUG_CTRL, 0);
+#ifdef PL310_ERRATA_727915
+ platform_pl310_write_debug(pl310_softc, 0);
#endif
- pl310_wait_background_op(PL310_CLEAN_INV_LINE_PA, 1);
+
pl310_cache_sync();
-
+ PL310_UNLOCK(pl310_softc);
}
static void
pl310_wb_range(vm_paddr_t start, vm_size_t size)
{
-
+
+ if ((pl310_softc == NULL) || !pl310_softc->sc_enabled)
+ return;
+
+ PL310_LOCK(pl310_softc);
if (start & g_l2cache_align_mask) {
size += start & g_l2cache_align_mask;
start &= ~g_l2cache_align_mask;
}
+
if (size & g_l2cache_align_mask) {
size &= ~g_l2cache_align_mask;
size += g_l2cache_line_size;
}
+
while (size > 0) {
- pl310_write4(PL310_CLEAN_LINE_PA, start);
+ pl310_write4(pl310_softc, PL310_CLEAN_LINE_PA, start);
start += g_l2cache_line_size;
size -= g_l2cache_line_size;
}
- pl310_cache_sync();
- pl310_wait_background_op(PL310_CLEAN_LINE_PA, 1);
+ pl310_cache_sync();
+ PL310_UNLOCK(pl310_softc);
}
static void
pl310_inv_range(vm_paddr_t start, vm_size_t size)
{
+ if ((pl310_softc == NULL) || !pl310_softc->sc_enabled)
+ return;
+
+ PL310_LOCK(pl310_softc);
if (start & g_l2cache_align_mask) {
size += start & g_l2cache_align_mask;
start &= ~g_l2cache_align_mask;
@@ -252,13 +254,13 @@ pl310_inv_range(vm_paddr_t start, vm_size_t size)
size += g_l2cache_line_size;
}
while (size > 0) {
- pl310_write4(PL310_INV_LINE_PA, start);
+ pl310_write4(pl310_softc, PL310_INV_LINE_PA, start);
start += g_l2cache_line_size;
size -= g_l2cache_line_size;
}
- pl310_cache_sync();
- pl310_wait_background_op(PL310_INV_LINE_PA, 1);
+ pl310_cache_sync();
+ PL310_UNLOCK(pl310_softc);
}
static int
@@ -280,39 +282,98 @@ pl310_attach(device_t dev)
uint32_t way_size;
uint32_t ways_assoc;
uint32_t ctrl_value;
+ uint32_t cache_id;
+ sc->sc_dev = dev;
sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
RF_ACTIVE);
if (sc->sc_mem_res == NULL)
panic("%s: Cannot map registers", device_get_name(dev));
- pl310_softc = sc;
- platform_init_pl310(sc);
- aux_value = pl310_read4(PL310_AUX_CTRL);
- way_size = (aux_value & PL310_AUX_CTRL_WAY_SIZE_MASK) >>
- PL310_AUX_CTRL_WAY_SIZE_SHIFT;
+ /* Allocate an IRQ resource */
+ rid = 0;
+ sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
+ RF_ACTIVE | RF_SHAREABLE);
+ if (sc->sc_irq_res == NULL) {
+ panic("Cannot allocate IRQ\n");
+ }
+
+ pl310_softc = sc;
+ mtx_init(&sc->sc_mtx, "pl310lock", NULL, MTX_SPIN);
+ sc->sc_enabled = pl310_enabled;
+
+ /* activate the interrupt */
+ bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_MISC | INTR_MPSAFE,
+ pl310_filter, NULL, sc, &sc->sc_irq_h);
+
+ cache_id = pl310_read4(sc, PL310_CACHE_ID);
+ device_printf(dev, "Part number: 0x%x, release: 0x%x\n",
+ (cache_id >> CACHE_ID_PARTNUM_SHIFT) & CACHE_ID_PARTNUM_MASK,
+ (cache_id >> CACHE_ID_RELEASE_SHIFT) & CACHE_ID_RELEASE_MASK);
+ aux_value = pl310_read4(sc, PL310_AUX_CTRL);
+ way_size = (aux_value & AUX_CTRL_WAY_SIZE_MASK) >>
+ AUX_CTRL_WAY_SIZE_SHIFT;
way_size = 1 << (way_size + 13);
- if (aux_value & (1 << PL310_AUX_CTRL_ASSOCIATIVITY_SHIFT))
+ if (aux_value & (1 << AUX_CTRL_ASSOCIATIVITY_SHIFT))
ways_assoc = 16;
else
ways_assoc = 8;
g_l2cache_way_mask = (1 << ways_assoc) - 1;
g_l2cache_size = way_size * ways_assoc;
/* Print the information */
- printf(" L2 Cache: %uKB/%dB %d ways\n", (g_l2cache_size / 1024),
+ device_printf(dev, "L2 Cache: %uKB/%dB %d ways\n", (g_l2cache_size / 1024),
g_l2cache_line_size, ways_assoc);
- ctrl_value = pl310_read4(PL310_CTRL);
- if (!(ctrl_value & 0x1)) {
+
+ ctrl_value = pl310_read4(sc, PL310_CTRL);
+
+ if (sc->sc_enabled && !(ctrl_value & CTRL_ENABLED)) {
/* Enable the L2 cache if disabled */
- pl310_write4(PL310_CTRL, ctrl_value & 0x1);
+ platform_pl310_write_ctrl(sc, CTRL_ENABLED);
+ }
+
+ if (!sc->sc_enabled && (ctrl_value & CTRL_ENABLED)) {
+ /*
+ * Set counters so when cache event happens
+ * we'll get interrupt and be warned that something
+ * is off
+ */
+
+ /* Cache Line Eviction for Counter 0 */
+ pl310_write4(sc, PL310_EVENT_COUNTER0_CONF,
+ EVENT_COUNTER_CONF_INCR | EVENT_COUNTER_CONF_CO);
+ /* Data Read Request for Counter 1 */
+ pl310_write4(sc, PL310_EVENT_COUNTER1_CONF,
+ EVENT_COUNTER_CONF_INCR | EVENT_COUNTER_CONF_DRREQ);
+
+ /* Temporary switch on for final flush*/
+ sc->sc_enabled = 1;
+ pl310_wbinv_all();
+ sc->sc_enabled = 0;
+ platform_pl310_write_ctrl(sc, CTRL_DISABLED);
+
+ /* Enable and clear pending interrupts */
+ pl310_write4(sc, PL310_INTR_CLEAR, INTR_MASK_ECNTR);
+ pl310_write4(sc, PL310_INTR_MASK, INTR_MASK_ALL);
+
+ /* Enable counters and reset C0 and C1 */
+ pl310_write4(sc, PL310_EVENT_COUNTER_CTRL,
+ EVENT_COUNTER_CTRL_ENABLED |
+ EVENT_COUNTER_CTRL_C0_RESET |
+ EVENT_COUNTER_CTRL_C1_RESET);
+
}
+
+ if (sc->sc_enabled)
+ platform_pl310_init(sc);
+
pl310_wbinv_all();
-
+
/* Set the l2 functions in the set of cpufuncs */
cpufuncs.cf_l2cache_wbinv_all = pl310_wbinv_all;
cpufuncs.cf_l2cache_wbinv_range = pl310_wbinv_range;
cpufuncs.cf_l2cache_inv_range = pl310_inv_range;
cpufuncs.cf_l2cache_wb_range = pl310_wb_range;
+
return (0);
}
@@ -330,4 +391,3 @@ static driver_t pl310_driver = {
static devclass_t pl310_devclass;
DRIVER_MODULE(pl310, simplebus, pl310_driver, pl310_devclass, 0, 0);
-
diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c
index a44bdbf..0df6281 100644
--- a/sys/arm/arm/pmap-v6.c
+++ b/sys/arm/arm/pmap-v6.c
@@ -1131,6 +1131,7 @@ pmap_page_init(vm_page_t m)
{
TAILQ_INIT(&m->md.pv_list);
+ m->md.pv_memattr = VM_MEMATTR_DEFAULT;
}
/*
@@ -2662,7 +2663,8 @@ do_l2b_alloc:
if (!(prot & VM_PROT_EXECUTE) && m)
npte |= L2_XN;
- npte |= pte_l2_s_cache_mode;
+ if (m->md.pv_memattr != VM_MEMATTR_UNCACHEABLE)
+ npte |= pte_l2_s_cache_mode;
if (m && m == opg) {
/*
@@ -3817,3 +3819,22 @@ pmap_dmap_iscurrent(pmap_t pmap)
return(pmap_is_current(pmap));
}
+void
+pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma)
+{
+ /*
+ * Remember the memattr in a field that gets used to set the appropriate
+ * bits in the PTEs as mappings are established.
+ */
+ m->md.pv_memattr = ma;
+
+ /*
+ * It appears that this function can only be called before any mappings
+ * for the page are established on ARM. If this ever changes, this code
+ * will need to walk the pv_list and make each of the existing mappings
+ * uncacheable, being careful to sync caches and PTEs (and maybe
+ * invalidate TLB?) for any current mapping it modifies.
+ */
+ if (m->md.pv_kva != 0 || TAILQ_FIRST(&m->md.pv_list) != NULL)
+ panic("Can't change memattr on page with existing mappings");
+}
diff --git a/sys/arm/arm/pmap.c b/sys/arm/arm/pmap.c
index 6a794b7..7170a98 100644
--- a/sys/arm/arm/pmap.c
+++ b/sys/arm/arm/pmap.c
@@ -1366,7 +1366,8 @@ pmap_fix_cache(struct vm_page *pg, pmap_t pm, vm_offset_t va)
(pv->pv_flags & PVF_NC)) {
pv->pv_flags &= ~PVF_NC;
- pmap_set_cache_entry(pv, pm, va, 1);
+ if (pg->md.pv_memattr != VM_MEMATTR_UNCACHEABLE)
+ pmap_set_cache_entry(pv, pm, va, 1);
continue;
}
/* user is no longer sharable and writable */
@@ -1375,7 +1376,8 @@ pmap_fix_cache(struct vm_page *pg, pmap_t pm, vm_offset_t va)
!pmwc && (pv->pv_flags & PVF_NC)) {
pv->pv_flags &= ~(PVF_NC | PVF_MWC);
- pmap_set_cache_entry(pv, pm, va, 1);
+ if (pg->md.pv_memattr != VM_MEMATTR_UNCACHEABLE)
+ pmap_set_cache_entry(pv, pm, va, 1);
}
}
@@ -1426,15 +1428,16 @@ pmap_clearbit(struct vm_page *pg, u_int maskbits)
if (!(oflags & maskbits)) {
if ((maskbits & PVF_WRITE) && (pv->pv_flags & PVF_NC)) {
- /* It is safe to re-enable cacheing here. */
- PMAP_LOCK(pm);
- l2b = pmap_get_l2_bucket(pm, va);
- ptep = &l2b->l2b_kva[l2pte_index(va)];
- *ptep |= pte_l2_s_cache_mode;
- PTE_SYNC(ptep);
- PMAP_UNLOCK(pm);
+ if (pg->md.pv_memattr !=
+ VM_MEMATTR_UNCACHEABLE) {
+ PMAP_LOCK(pm);
+ l2b = pmap_get_l2_bucket(pm, va);
+ ptep = &l2b->l2b_kva[l2pte_index(va)];
+ *ptep |= pte_l2_s_cache_mode;
+ PTE_SYNC(ptep);
+ PMAP_UNLOCK(pm);
+ }
pv->pv_flags &= ~(PVF_NC | PVF_MWC);
-
}
continue;
}
@@ -1463,7 +1466,9 @@ pmap_clearbit(struct vm_page *pg, u_int maskbits)
* permission.
*/
if (maskbits & PVF_WRITE) {
- npte |= pte_l2_s_cache_mode;
+ if (pg->md.pv_memattr !=
+ VM_MEMATTR_UNCACHEABLE)
+ npte |= pte_l2_s_cache_mode;
pv->pv_flags &= ~(PVF_NC | PVF_MWC);
}
} else
@@ -1794,6 +1799,7 @@ pmap_page_init(vm_page_t m)
{
TAILQ_INIT(&m->md.pv_list);
+ m->md.pv_memattr = VM_MEMATTR_DEFAULT;
}
/*
@@ -3393,7 +3399,8 @@ do_l2b_alloc:
(m->oflags & VPO_UNMANAGED) == 0)
vm_page_aflag_set(m, PGA_WRITEABLE);
}
- npte |= pte_l2_s_cache_mode;
+ if (m->md.pv_memattr != VM_MEMATTR_UNCACHEABLE)
+ npte |= pte_l2_s_cache_mode;
if (m && m == opg) {
/*
* We're changing the attrs of an existing mapping.
@@ -4929,3 +4936,24 @@ pmap_devmap_find_va(vm_offset_t va, vm_size_t size)
return (NULL);
}
+void
+pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma)
+{
+ /*
+ * Remember the memattr in a field that gets used to set the appropriate
+ * bits in the PTEs as mappings are established.
+ */
+ m->md.pv_memattr = ma;
+
+ /*
+ * It appears that this function can only be called before any mappings
+ * for the page are established on ARM. If this ever changes, this code
+ * will need to walk the pv_list and make each of the existing mappings
+ * uncacheable, being careful to sync caches and PTEs (and maybe
+ * invalidate TLB?) for any current mapping it modifies.
+ */
+ if (m->md.pv_kva != 0 || TAILQ_FIRST(&m->md.pv_list) != NULL)
+ panic("Can't change memattr on page with existing mappings");
+}
+
+
diff --git a/sys/arm/at91/if_ate.c b/sys/arm/at91/if_ate.c
index 58062e7..9da2aba 100644
--- a/sys/arm/at91/if_ate.c
+++ b/sys/arm/at91/if_ate.c
@@ -901,9 +901,9 @@ ate_intr(void *xsc)
/* Get an appropriately sized mbuf */
if (remain + ETHER_ALIGN >= MINCLSIZE)
- mb = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ mb = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
else
- MGETHDR(mb, M_DONTWAIT, MT_DATA);
+ MGETHDR(mb, M_NOWAIT, MT_DATA);
if (mb == NULL) {
sc->ifp->if_iqdrops++;
@@ -1135,7 +1135,7 @@ atestart_locked(struct ifnet *ifp)
e = bus_dmamap_load_mbuf_sg(sc->mtag, sc->tx_map[sc->txhead], m,
segs, &nseg, 0);
if (e == EFBIG) {
- mdefrag = m_defrag(m, M_DONTWAIT);
+ mdefrag = m_defrag(m, M_NOWAIT);
if (mdefrag == NULL) {
IFQ_DRV_PREPEND(&ifp->if_snd, m);
return;
diff --git a/sys/arm/at91/if_macb.c b/sys/arm/at91/if_macb.c
index ac280a1..1a46adc 100644
--- a/sys/arm/at91/if_macb.c
+++ b/sys/arm/at91/if_macb.c
@@ -435,7 +435,7 @@ macb_new_rxbuf(struct macb_softc *sc, int index)
bus_dma_segment_t seg[1];
int error, nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES - ETHER_ALIGN;
@@ -878,7 +878,7 @@ macb_encap(struct macb_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->dmatag_ring_tx, txd->dmamap,
*m_head, segs, &nsegs, 0);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, MAX_FRAGMENT);
+ m = m_collapse(*m_head, M_NOWAIT, MAX_FRAGMENT);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
@@ -973,7 +973,7 @@ macbstart_locked(struct ifnet *ifp)
#if 0
if (m0->m_next != NULL) {
/* Fragmented mbuf chain, collapse it. */
- m_new = m_defrag(m0, M_DONTWAIT);
+ m_new = m_defrag(m0, M_NOWAIT);
if (m_new != NULL) {
/* Original frame freed. */
m0 = m_new;
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_fb.c b/sys/arm/broadcom/bcm2835/bcm2835_fb.c
index 05c0bbb..e8b2534 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_fb.c
+++ b/sys/arm/broadcom/bcm2835/bcm2835_fb.c
@@ -94,6 +94,12 @@ static struct argb bcmfb_palette[16] = {
{0x00, 0xff, 0xff, 0xff}
};
+/* mouse pointer from dev/syscons/scgfbrndr.c */
+static u_char mouse_pointer[16] = {
+ 0x00, 0x40, 0x60, 0x70, 0x78, 0x7c, 0x7e, 0x68,
+ 0x0c, 0x0c, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00
+};
+
#define FB_WIDTH 640
#define FB_HEIGHT 480
#define FB_DEPTH 24
@@ -420,10 +426,141 @@ static video_switch_t bcmfbvidsw = {
VIDEO_DRIVER(bcmfb, bcmfbvidsw, bcmfb_configure);
-extern sc_rndr_sw_t txtrndrsw;
-RENDERER(bcmfb, 0, txtrndrsw, gfb_set);
+static vr_init_t bcmrend_init;
+static vr_clear_t bcmrend_clear;
+static vr_draw_border_t bcmrend_draw_border;
+static vr_draw_t bcmrend_draw;
+static vr_set_cursor_t bcmrend_set_cursor;
+static vr_draw_cursor_t bcmrend_draw_cursor;
+static vr_blink_cursor_t bcmrend_blink_cursor;
+static vr_set_mouse_t bcmrend_set_mouse;
+static vr_draw_mouse_t bcmrend_draw_mouse;
+
+/*
+ * We use our own renderer; this is because we must emulate a hardware
+ * cursor.
+ */
+static sc_rndr_sw_t bcmrend = {
+ bcmrend_init,
+ bcmrend_clear,
+ bcmrend_draw_border,
+ bcmrend_draw,
+ bcmrend_set_cursor,
+ bcmrend_draw_cursor,
+ bcmrend_blink_cursor,
+ bcmrend_set_mouse,
+ bcmrend_draw_mouse
+};
+
+RENDERER(bcmfb, 0, bcmrend, gfb_set);
RENDERER_MODULE(bcmfb, gfb_set);
+static void
+bcmrend_init(scr_stat* scp)
+{
+}
+
+static void
+bcmrend_clear(scr_stat* scp, int c, int attr)
+{
+}
+
+static void
+bcmrend_draw_border(scr_stat* scp, int color)
+{
+}
+
+static void
+bcmrend_draw(scr_stat* scp, int from, int count, int flip)
+{
+ video_adapter_t* adp = scp->sc->adp;
+ int i, c, a;
+
+ if (!flip) {
+ /* Normal printing */
+ vidd_puts(adp, from, (uint16_t*)sc_vtb_pointer(&scp->vtb, from), count);
+ } else {
+ /* This is for selections and such: invert the color attribute */
+ for (i = count; i-- > 0; ++from) {
+ c = sc_vtb_getc(&scp->vtb, from);
+ a = sc_vtb_geta(&scp->vtb, from) >> 8;
+ vidd_putc(adp, from, c, (a >> 4) | ((a & 0xf) << 4));
+ }
+ }
+}
+
+static void
+bcmrend_set_cursor(scr_stat* scp, int base, int height, int blink)
+{
+}
+
+static void
+bcmrend_draw_cursor(scr_stat* scp, int off, int blink, int on, int flip)
+{
+ video_adapter_t* adp = scp->sc->adp;
+ struct video_adapter_softc *sc;
+ int row, col;
+ uint8_t *addr;
+ int i, j, bytes;
+
+ sc = (struct video_adapter_softc *)adp;
+
+ if (scp->curs_attr.height <= 0)
+ return;
+
+ if (sc->fb_addr == 0)
+ return;
+
+ if (off >= adp->va_info.vi_width * adp->va_info.vi_height)
+ return;
+
+ /* calculate the coordinates in the video buffer */
+ row = (off / adp->va_info.vi_width) * adp->va_info.vi_cheight;
+ col = (off % adp->va_info.vi_width) * adp->va_info.vi_cwidth;
+
+ addr = (uint8_t *)sc->fb_addr
+ + (row + sc->ymargin)*(sc->stride)
+ + (sc->depth/8) * (col + sc->xmargin);
+
+ bytes = sc->depth/8;
+
+ /* our cursor consists of simply inverting the char under it */
+ for (i = 0; i < adp->va_info.vi_cheight; i++) {
+ for (j = 0; j < adp->va_info.vi_cwidth; j++) {
+ switch (sc->depth) {
+ case 32:
+ case 24:
+ addr[bytes*j + 2] ^= 0xff;
+ /* FALLTHROUGH */
+ case 16:
+ addr[bytes*j + 1] ^= 0xff;
+ addr[bytes*j] ^= 0xff;
+ break;
+ default:
+ break;
+ }
+ }
+
+ addr += sc->stride;
+ }
+}
+
+static void
+bcmrend_blink_cursor(scr_stat* scp, int at, int flip)
+{
+}
+
+static void
+bcmrend_set_mouse(scr_stat* scp)
+{
+}
+
+static void
+bcmrend_draw_mouse(scr_stat* scp, int x, int y, int on)
+{
+ vidd_putm(scp->sc->adp, x, y, mouse_pointer, 0xffffffff, 16, 8);
+}
+
static uint16_t bcmfb_static_window[ROW*COL];
extern u_char dflt_font_16[];
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_gpio.c b/sys/arm/broadcom/bcm2835/bcm2835_gpio.c
index a1d97b4..8029d80 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_gpio.c
+++ b/sys/arm/broadcom/bcm2835/bcm2835_gpio.c
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/gpio.h>
+#include <sys/sysctl.h>
#include <machine/bus.h>
#include <machine/cpu.h>
@@ -66,6 +67,11 @@ __FBSDID("$FreeBSD$");
#define BCM_GPIO_DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \
GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN)
+struct bcm_gpio_sysctl {
+ struct bcm_gpio_softc *sc;
+ uint32_t pin;
+};
+
struct bcm_gpio_softc {
device_t sc_dev;
struct mtx sc_mtx;
@@ -78,6 +84,7 @@ struct bcm_gpio_softc {
int sc_ro_npins;
int sc_ro_pins[BCM_GPIO_PINS];
struct gpio_pin sc_gpio_pins[BCM_GPIO_PINS];
+ struct bcm_gpio_sysctl sc_sysctl[BCM_GPIO_PINS];
};
enum bcm_gpio_fsel {
@@ -99,6 +106,7 @@ enum bcm_gpio_pud {
#define BCM_GPIO_LOCK(_sc) mtx_lock(&_sc->sc_mtx)
#define BCM_GPIO_UNLOCK(_sc) mtx_unlock(&_sc->sc_mtx)
+#define BCM_GPIO_LOCK_ASSERT(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED)
#define BCM_GPIO_GPFSEL(_bank) 0x00 + _bank * 4
#define BCM_GPIO_GPSET(_bank) 0x1c + _bank * 4
@@ -126,53 +134,89 @@ bcm_gpio_pin_is_ro(struct bcm_gpio_softc *sc, int pin)
static uint32_t
bcm_gpio_get_function(struct bcm_gpio_softc *sc, uint32_t pin)
{
- uint32_t bank, data, offset;
+ uint32_t bank, func, offset;
/* Five banks, 10 pins per bank, 3 bits per pin. */
bank = pin / 10;
offset = (pin - bank * 10) * 3;
BCM_GPIO_LOCK(sc);
- data = (BCM_GPIO_READ(sc, BCM_GPIO_GPFSEL(bank)) >> offset) & 7;
+ func = (BCM_GPIO_READ(sc, BCM_GPIO_GPFSEL(bank)) >> offset) & 7;
BCM_GPIO_UNLOCK(sc);
-#ifdef DEBUG
- device_printf(sc->sc_dev, "pin %d function: ", pin);
- switch (data) {
+ return (func);
+}
+
+static void
+bcm_gpio_func_str(uint32_t nfunc, char *buf, int bufsize)
+{
+
+ switch (nfunc) {
case BCM_GPIO_INPUT:
- printf("input\n");
+ strncpy(buf, "input", bufsize);
break;
case BCM_GPIO_OUTPUT:
- printf("output\n");
+ strncpy(buf, "output", bufsize);
break;
case BCM_GPIO_ALT0:
- printf("alt0\n");
+ strncpy(buf, "alt0", bufsize);
break;
case BCM_GPIO_ALT1:
- printf("alt1\n");
+ strncpy(buf, "alt1", bufsize);
break;
case BCM_GPIO_ALT2:
- printf("alt2\n");
+ strncpy(buf, "alt2", bufsize);
break;
case BCM_GPIO_ALT3:
- printf("alt3\n");
+ strncpy(buf, "alt3", bufsize);
break;
case BCM_GPIO_ALT4:
- printf("alt4\n");
+ strncpy(buf, "alt4", bufsize);
break;
case BCM_GPIO_ALT5:
- printf("alt5\n");
+ strncpy(buf, "alt5", bufsize);
break;
+ default:
+ strncpy(buf, "invalid", bufsize);
}
-#endif
+}
+
+static int
+bcm_gpio_str_func(char *func, uint32_t *nfunc)
+{
+
+ if (strcasecmp(func, "input") == 0)
+ *nfunc = BCM_GPIO_INPUT;
+ else if (strcasecmp(func, "output") == 0)
+ *nfunc = BCM_GPIO_OUTPUT;
+ else if (strcasecmp(func, "alt0") == 0)
+ *nfunc = BCM_GPIO_ALT0;
+ else if (strcasecmp(func, "alt1") == 0)
+ *nfunc = BCM_GPIO_ALT1;
+ else if (strcasecmp(func, "alt2") == 0)
+ *nfunc = BCM_GPIO_ALT2;
+ else if (strcasecmp(func, "alt3") == 0)
+ *nfunc = BCM_GPIO_ALT3;
+ else if (strcasecmp(func, "alt4") == 0)
+ *nfunc = BCM_GPIO_ALT4;
+ else if (strcasecmp(func, "alt5") == 0)
+ *nfunc = BCM_GPIO_ALT5;
+ else
+ return (-1);
+
+ return (0);
+}
+
+static uint32_t
+bcm_gpio_func_flag(uint32_t nfunc)
+{
- switch (data) {
+ switch (nfunc) {
case BCM_GPIO_INPUT:
return (GPIO_PIN_INPUT);
case BCM_GPIO_OUTPUT:
return (GPIO_PIN_OUTPUT);
}
-
return (0);
}
@@ -181,16 +225,17 @@ bcm_gpio_set_function(struct bcm_gpio_softc *sc, uint32_t pin, uint32_t f)
{
uint32_t bank, data, offset;
+ /* Must be called with lock held. */
+ BCM_GPIO_LOCK_ASSERT(sc);
+
/* Five banks, 10 pins per bank, 3 bits per pin. */
bank = pin / 10;
offset = (pin - bank * 10) * 3;
- BCM_GPIO_LOCK(sc);
data = BCM_GPIO_READ(sc, BCM_GPIO_GPFSEL(bank));
data &= ~(7 << offset);
data |= (f << offset);
BCM_GPIO_WRITE(sc, BCM_GPIO_GPFSEL(bank), data);
- BCM_GPIO_UNLOCK(sc);
}
static void
@@ -198,17 +243,18 @@ bcm_gpio_set_pud(struct bcm_gpio_softc *sc, uint32_t pin, uint32_t state)
{
uint32_t bank, offset;
+ /* Must be called with lock held. */
+ BCM_GPIO_LOCK_ASSERT(sc);
+
bank = pin / 32;
offset = pin - 32 * bank;
- BCM_GPIO_LOCK(sc);
BCM_GPIO_WRITE(sc, BCM_GPIO_GPPUD(0), state);
DELAY(10);
BCM_GPIO_WRITE(sc, BCM_GPIO_GPPUDCLK(bank), (1 << offset));
DELAY(10);
BCM_GPIO_WRITE(sc, BCM_GPIO_GPPUD(0), 0);
BCM_GPIO_WRITE(sc, BCM_GPIO_GPPUDCLK(bank), 0);
- BCM_GPIO_UNLOCK(sc);
}
static void
@@ -216,6 +262,8 @@ bcm_gpio_pin_configure(struct bcm_gpio_softc *sc, struct gpio_pin *pin,
unsigned int flags)
{
+ BCM_GPIO_LOCK(sc);
+
/*
* Manage input/output.
*/
@@ -244,6 +292,8 @@ bcm_gpio_pin_configure(struct bcm_gpio_softc *sc, struct gpio_pin *pin,
}
} else
bcm_gpio_set_pud(sc, pin->gp_pin, BCM_GPIO_NONE);
+
+ BCM_GPIO_UNLOCK(sc);
}
static int
@@ -471,7 +521,7 @@ bcm_gpio_get_ro_pins(struct bcm_gpio_softc *sc)
printf(",");
printf("%d", sc->sc_ro_pins[i]);
}
- if (i > 0)
+ if (i > 0)
printf(".");
printf("\n");
@@ -479,6 +529,89 @@ bcm_gpio_get_ro_pins(struct bcm_gpio_softc *sc)
}
static int
+bcm_gpio_func_proc(SYSCTL_HANDLER_ARGS)
+{
+ char buf[16];
+ struct bcm_gpio_softc *sc;
+ struct bcm_gpio_sysctl *sc_sysctl;
+ uint32_t nfunc;
+ int i, error;
+
+ sc_sysctl = arg1;
+ sc = sc_sysctl->sc;
+
+ /* Get the current pin function. */
+ nfunc = bcm_gpio_get_function(sc, sc_sysctl->pin);
+ bcm_gpio_func_str(nfunc, buf, sizeof(buf));
+
+ error = sysctl_handle_string(oidp, buf, sizeof(buf), req);
+ if (error != 0 || req->newptr == NULL)
+ return (error);
+
+ /* Parse the user supplied string and check for a valid pin function. */
+ if (bcm_gpio_str_func(buf, &nfunc) != 0)
+ return (EINVAL);
+
+ BCM_GPIO_LOCK(sc);
+
+ /* Disable pull-up or pull-down on pin. */
+ bcm_gpio_set_pud(sc, sc_sysctl->pin, BCM_GPIO_NONE);
+
+ /* And now set the pin function. */
+ bcm_gpio_set_function(sc, sc_sysctl->pin, nfunc);
+
+ /* Update the pin flags. */
+ for (i = 0; i < sc->sc_gpio_npins; i++) {
+ if (sc->sc_gpio_pins[i].gp_pin == sc_sysctl->pin)
+ break;
+ }
+ if (i < sc->sc_gpio_npins)
+ sc->sc_gpio_pins[i].gp_flags = bcm_gpio_func_flag(nfunc);
+
+ BCM_GPIO_UNLOCK(sc);
+
+ return (0);
+}
+
+static void
+bcm_gpio_sysctl_init(struct bcm_gpio_softc *sc)
+{
+ char pinbuf[3];
+ struct bcm_gpio_sysctl *sc_sysctl;
+ struct sysctl_ctx_list *ctx;
+ struct sysctl_oid *tree_node, *pin_node, *pinN_node;
+ struct sysctl_oid_list *tree, *pin_tree, *pinN_tree;
+ int i;
+
+ /*
+ * Add per-pin sysctl tree/handlers.
+ */
+ ctx = device_get_sysctl_ctx(sc->sc_dev);
+ tree_node = device_get_sysctl_tree(sc->sc_dev);
+ tree = SYSCTL_CHILDREN(tree_node);
+ pin_node = SYSCTL_ADD_NODE(ctx, tree, OID_AUTO, "pin",
+ CTLFLAG_RW, NULL, "GPIO Pins");
+ pin_tree = SYSCTL_CHILDREN(pin_node);
+
+ for (i = 0; i < sc->sc_gpio_npins; i++) {
+
+ snprintf(pinbuf, sizeof(pinbuf), "%d", i);
+ pinN_node = SYSCTL_ADD_NODE(ctx, pin_tree, OID_AUTO, pinbuf,
+ CTLFLAG_RD, NULL, "GPIO Pin");
+ pinN_tree = SYSCTL_CHILDREN(pinN_node);
+
+ sc->sc_sysctl[i].sc = sc;
+ sc_sysctl = &sc->sc_sysctl[i];
+ sc_sysctl->sc = sc;
+ sc_sysctl->pin = sc->sc_gpio_pins[i].gp_pin;
+ SYSCTL_ADD_PROC(ctx, pinN_tree, OID_AUTO, "function",
+ CTLFLAG_RW | CTLTYPE_STRING, sc_sysctl,
+ sizeof(struct bcm_gpio_sysctl), bcm_gpio_func_proc,
+ "A", "Pin Function");
+ }
+}
+
+static int
bcm_gpio_get_reserved_pins(struct bcm_gpio_softc *sc)
{
int i, j, len, npins;
@@ -499,7 +632,7 @@ bcm_gpio_get_reserved_pins(struct bcm_gpio_softc *sc)
*/
reserved = 0;
while ((node != 0) && (reserved == 0)) {
- len = OF_getprop(node, "name", name,
+ len = OF_getprop(node, "name", name,
sizeof(name) - 1);
name[len] = 0;
if (strcmp(name, "reserved") == 0)
@@ -532,7 +665,7 @@ bcm_gpio_get_reserved_pins(struct bcm_gpio_softc *sc)
sc->sc_ro_pins[j++ + sc->sc_ro_npins] = fdt32_to_cpu(pins[i]);
}
sc->sc_ro_npins += j;
- if (i > 0)
+ if (i > 0)
printf(".");
printf("\n");
@@ -553,6 +686,7 @@ static int
bcm_gpio_attach(device_t dev)
{
struct bcm_gpio_softc *sc = device_get_softc(dev);
+ uint32_t func;
int i, j, rid;
phandle_t gpio;
@@ -600,15 +734,18 @@ bcm_gpio_attach(device_t dev)
continue;
snprintf(sc->sc_gpio_pins[i].gp_name, GPIOMAXNAME,
"pin %d", j);
+ func = bcm_gpio_get_function(sc, j);
sc->sc_gpio_pins[i].gp_pin = j;
sc->sc_gpio_pins[i].gp_caps = BCM_GPIO_DEFAULT_CAPS;
- sc->sc_gpio_pins[i].gp_flags = bcm_gpio_get_function(sc, j);
+ sc->sc_gpio_pins[i].gp_flags = bcm_gpio_func_flag(func);
i++;
}
sc->sc_gpio_npins = i;
- device_add_child(dev, "gpioc", device_get_unit(dev));
- device_add_child(dev, "gpiobus", device_get_unit(dev));
+ bcm_gpio_sysctl_init(sc);
+
+ device_add_child(dev, "gpioc", device_get_unit(dev));
+ device_add_child(dev, "gpiobus", device_get_unit(dev));
return (bus_generic_attach(dev));
fail:
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_systimer.c b/sys/arm/broadcom/bcm2835/bcm2835_systimer.c
index 3f5b8da..97ec43a 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_systimer.c
+++ b/sys/arm/broadcom/bcm2835/bcm2835_systimer.c
@@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$");
#define DEFAULT_TIMER 3
#define DEFAULT_FREQUENCY 1000000
+#define MIN_PERIOD 100LLU
#define SYSTIMER_CS 0x00
#define SYSTIMER_CLO 0x04
@@ -123,17 +124,24 @@ bcm_systimer_start(struct eventtimer *et, struct bintime *first,
struct systimer *st = et->et_priv;
uint32_t clo;
uint32_t count;
+ register_t s;
if (first != NULL) {
- st->enabled = 1;
count = (st->et.et_frequency * (first->frac >> 32)) >> 32;
if (first->sec != 0)
count += st->et.et_frequency * first->sec;
+ s = intr_disable();
clo = bcm_systimer_tc_read_4(SYSTIMER_CLO);
clo += count;
+ /*
+ * Clear pending interrupts
+ */
+ bcm_systimer_tc_write_4(SYSTIMER_CS, (1 << st->index));
bcm_systimer_tc_write_4(SYSTIMER_C0 + st->index*4, clo);
+ st->enabled = 1;
+ intr_restore(s);
return (0);
}
@@ -154,7 +162,13 @@ static int
bcm_systimer_intr(void *arg)
{
struct systimer *st = (struct systimer *)arg;
+ uint32_t cs;
+
+ cs = bcm_systimer_tc_read_4(SYSTIMER_CS);
+ if ((cs & (1 << st->index)) == 0)
+ return (FILTER_STRAY);
+ /* ACK interrupt */
bcm_systimer_tc_write_4(SYSTIMER_CS, (1 << st->index));
if (st->enabled) {
if (st->et.et_active) {
@@ -226,7 +240,7 @@ bcm_systimer_attach(device_t dev)
sc->st[DEFAULT_TIMER].et.et_frequency = sc->sysclk_freq;
sc->st[DEFAULT_TIMER].et.et_min_period.sec = 0;
sc->st[DEFAULT_TIMER].et.et_min_period.frac =
- ((0x00000002LLU << 32) / sc->st[DEFAULT_TIMER].et.et_frequency) << 32;
+ ((MIN_PERIOD << 32) / sc->st[DEFAULT_TIMER].et.et_frequency) << 32;
sc->st[DEFAULT_TIMER].et.et_max_period.sec = 0xfffffff0U / sc->st[DEFAULT_TIMER].et.et_frequency;
sc->st[DEFAULT_TIMER].et.et_max_period.frac =
((0xfffffffeLLU << 32) / sc->st[DEFAULT_TIMER].et.et_frequency) << 32;
diff --git a/sys/arm/broadcom/bcm2835/files.bcm2835 b/sys/arm/broadcom/bcm2835/files.bcm2835
index f00c862..9885155 100644
--- a/sys/arm/broadcom/bcm2835/files.bcm2835
+++ b/sys/arm/broadcom/bcm2835/files.bcm2835
@@ -15,6 +15,7 @@ arm/broadcom/bcm2835/dwc_otg_brcm.c optional dwcotg
arm/arm/bus_space_generic.c standard
arm/arm/bus_space_asm_generic.S standard
arm/arm/cpufunc_asm_arm11.S standard
+arm/arm/cpufunc_asm_arm11x6.S standard
arm/arm/cpufunc_asm_armv5.S standard
arm/arm/cpufunc_asm_armv6.S standard
arm/arm/irq_dispatch.S standard
diff --git a/sys/arm/conf/PANDABOARD b/sys/arm/conf/PANDABOARD
index f7bc402..788a0ed 100644
--- a/sys/arm/conf/PANDABOARD
+++ b/sys/arm/conf/PANDABOARD
@@ -47,9 +47,7 @@ options UFS_DIRHASH #Improve performance on big directories
device snp
options BREAK_TO_DEBUGGER
-#options NFSCL
-options NFSCLIENT #Network Filesystem Client
-#options NFSSERVER #Network Filesystem Server
+options NFSCL
options NFS_ROOT #NFS usable as /, requires NFSCLIENT
#options BOOTP_NFSROOT
#options BOOTP_COMPAT
diff --git a/sys/arm/conf/RPI-B b/sys/arm/conf/RPI-B
index 7e7d3ac..c7b9a5f 100644
--- a/sys/arm/conf/RPI-B
+++ b/sys/arm/conf/RPI-B
@@ -19,7 +19,7 @@
ident RPI-B
machine arm armv6
-cpu CPU_ARM11
+cpu CPU_ARM1176
files "../broadcom/bcm2835/files.bcm2835"
makeoptions MODULES_OVERRIDE=""
diff --git a/sys/arm/conf/VERSATILEPB b/sys/arm/conf/VERSATILEPB
new file mode 100644
index 0000000..b12009dc0
--- /dev/null
+++ b/sys/arm/conf/VERSATILEPB
@@ -0,0 +1,101 @@
+# VERSATILEPB - Configuration for QEMU version of Versatile Platform Board
+#
+# For more information on this file, please read the handbook section on
+# Kernel Configuration Files:
+#
+# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD$
+
+ident VERSATILEPB
+machine arm armv6
+cpu CPU_ARM1176
+
+files "../versatile/files.versatile"
+makeoptions MODULES_OVERRIDE=""
+
+options KERNVIRTADDR=0xc0100000
+makeoptions KERNVIRTADDR=0xc0100000
+options KERNPHYSADDR=0x00100000
+makeoptions KERNPHYSADDR=0x00100000
+options PHYSADDR=0x00000000
+options STARTUP_PAGETABLE_ADDR=0x01000000
+options FREEBSD_BOOT_LOADER
+options LINUX_BOOT_ABI
+
+makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
+options HZ=100
+
+options SCHED_4BSD #4BSD scheduler
+options INET #InterNETworking
+options FFS #Berkeley Fast Filesystem
+options SOFTUPDATES #Enable FFS soft updates support
+options UFS_ACL #Support for access control lists
+options UFS_DIRHASH #Improve performance on big directories
+device snp
+
+options PSEUDOFS #Pseudo-filesystem framework
+options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!]
+options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI
+options KTRACE #ktrace(1) support
+options SYSVSHM #SYSV-style shared memory
+options SYSVMSG #SYSV-style message queues
+options SYSVSEM #SYSV-style semaphores
+options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
+options KBD_INSTALL_CDEV # install a CDEV entry in /dev
+options ROOTDEVNAME=\"ufs:da0s2a\"
+
+options PREEMPTION
+
+device bpf
+device loop
+device mii
+device mii_bitbang
+device smc
+device smcphy
+device ether
+device uart
+device pl011
+device pl190
+
+device pty
+
+device pci
+
+# SCSI Controllers
+device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D
+
+# ATA/SCSI peripherals
+device scbus # SCSI bus (required for ATA/SCSI)
+device da # Direct Access (disks)
+device pass # Passthrough device (direct ATA/SCSI access)
+
+# NOTE: serial console is disabled if syscons enabled
+# Comment following lines for headless setup
+device sc
+device kbdmux
+options SC_DFLT_FONT # compile font in
+makeoptions SC_DFLT_FONT=cp437
+
+options KDB
+options DDB #Enable the kernel debugger
+options INVARIANTS #Enable calls of extra sanity checking
+options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS
+
+device md
+device random # Entropy device
+
+# Flattened Device Tree
+options FDT
+options FDT_DTB_STATIC
+makeoptions FDT_DTS_FILE=versatilepb.dts
diff --git a/sys/arm/econa/if_ece.c b/sys/arm/econa/if_ece.c
index 5169101..cafc2f9 100644
--- a/sys/arm/econa/if_ece.c
+++ b/sys/arm/econa/if_ece.c
@@ -714,7 +714,7 @@ ece_new_rxbuf(struct ece_softc *sc, struct rx_desc_info* descinfo)
tag = sc->dmatag_ring_rx;
- new_mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ new_mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (new_mbuf == NULL)
return (ENOBUFS);
diff --git a/sys/arm/include/armreg.h b/sys/arm/include/armreg.h
index 05b3846..35fe6d7 100644
--- a/sys/arm/include/armreg.h
+++ b/sys/arm/include/armreg.h
@@ -146,6 +146,7 @@
#define CPU_ID_ARM1026EJS 0x4106a260
#define CPU_ID_ARM1136JS 0x4107b360
#define CPU_ID_ARM1136JSR1 0x4117b360
+#define CPU_ID_ARM1176JZS 0x410fb760
#define CPU_ID_CORTEXA8R1 0x411fc080
#define CPU_ID_CORTEXA8R2 0x412fc080
#define CPU_ID_CORTEXA8R3 0x413fc080
@@ -284,11 +285,36 @@
#define CPU_CONTROL_VECRELOC 0x00002000 /* V: Vector relocation */
#define CPU_CONTROL_ROUNDROBIN 0x00004000 /* RR: Predictable replacement */
#define CPU_CONTROL_V4COMPAT 0x00008000 /* L4: ARMv4 compat LDR R15 etc */
+#define CPU_CONTROL_FI_ENABLE 0x00200000 /* FI: Low interrupt latency */
+#define CPU_CONTROL_UNAL_ENABLE 0x00400000 /* U: unaligned data access */
#define CPU_CONTROL_V6_EXTPAGE 0x00800000 /* XP: ARMv6 extended page tables */
#define CPU_CONTROL_L2_ENABLE 0x04000000 /* L2 Cache enabled */
#define CPU_CONTROL_IDC_ENABLE CPU_CONTROL_DC_ENABLE
+/* ARM11x6 Auxiliary Control Register (CP15 register 1, opcode2 1) */
+#define ARM11X6_AUXCTL_RS 0x00000001 /* return stack */
+#define ARM11X6_AUXCTL_DB 0x00000002 /* dynamic branch prediction */
+#define ARM11X6_AUXCTL_SB 0x00000004 /* static branch prediction */
+#define ARM11X6_AUXCTL_TR 0x00000008 /* MicroTLB replacement strat. */
+#define ARM11X6_AUXCTL_EX 0x00000010 /* exclusive L1/L2 cache */
+#define ARM11X6_AUXCTL_RA 0x00000020 /* clean entire cache disable */
+#define ARM11X6_AUXCTL_RV 0x00000040 /* block transfer cache disable */
+#define ARM11X6_AUXCTL_CZ 0x00000080 /* restrict cache size */
+
+/* ARM1136 Auxiliary Control Register (CP15 register 1, opcode2 1) */
+#define ARM1136_AUXCTL_PFI 0x80000000 /* PFI: partial FI mode. */
+ /* This is an undocumented flag
+ * used to work around a cache bug
+ * in r0 steppings. See errata
+ * 364296.
+ */
+/* ARM1176 Auxiliary Control Register (CP15 register 1, opcode2 1) */
+#define ARM1176_AUXCTL_PHD 0x10000000 /* inst. prefetch halting disable */
+#define ARM1176_AUXCTL_BFD 0x20000000 /* branch folding disable */
+#define ARM1176_AUXCTL_FSD 0x40000000 /* force speculative ops disable */
+#define ARM1176_AUXCTL_FIO 0x80000000 /* low intr latency override */
+
/* XScale Auxillary Control Register (CP15 register 1, opcode2 1) */
#define XSCALE_AUXCTL_K 0x00000001 /* dis. write buffer coalescing */
#define XSCALE_AUXCTL_P 0x00000002 /* ECC protect page table access */
diff --git a/sys/arm/include/cpuconf.h b/sys/arm/include/cpuconf.h
index 95d4b91..986633b 100644
--- a/sys/arm/include/cpuconf.h
+++ b/sys/arm/include/cpuconf.h
@@ -54,7 +54,8 @@
defined(CPU_ARM8) + defined(CPU_ARM9) + \
defined(CPU_ARM9E) + \
defined(CPU_ARM10) + \
- defined(CPU_ARM11) + \
+ defined(CPU_ARM1136) + \
+ defined(CPU_ARM1176) + \
defined(CPU_SA110) + defined(CPU_SA1100) + \
defined(CPU_SA1110) + \
defined(CPU_IXP12X0) + \
@@ -89,7 +90,7 @@
#endif
#if !defined(ARM_ARCH_6)
-#if defined(CPU_ARM11) || defined(CPU_MV_PJ4B)
+#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B)
#define ARM_ARCH_6 1
#else
#define ARM_ARCH_6 0
@@ -149,7 +150,7 @@
#define ARM_MMU_GENERIC 0
#endif
-#if defined(CPU_ARM11) || defined(CPU_MV_PJ4B)
+#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B)
#define ARM_MMU_V6 1
#else
#define ARM_MMU_V6 0
diff --git a/sys/arm/include/cpufunc.h b/sys/arm/include/cpufunc.h
index 94b0ff6..07c8258 100644
--- a/sys/arm/include/cpufunc.h
+++ b/sys/arm/include/cpufunc.h
@@ -462,7 +462,8 @@ void sheeva_l2cache_wb_range (vm_offset_t, vm_size_t);
void sheeva_l2cache_wbinv_all (void);
#endif
-#if defined(CPU_ARM11) || defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA)
+#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || \
+ defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA)
void arm11_setttb (u_int);
void arm11_sleep (int);
@@ -532,6 +533,21 @@ void armadaxp_idcache_wbinv_all (void);
void cortexa_setup (char *);
#endif
+#if defined(CPU_ARM1136) || defined(CPU_ARM1176)
+void arm11x6_setttb (u_int);
+void arm11x6_idcache_wbinv_all (void);
+void arm11x6_dcache_wbinv_all (void);
+void arm11x6_icache_sync_all (void);
+void arm11x6_flush_prefetchbuf (void);
+void arm11x6_icache_sync_range (vm_offset_t, vm_size_t);
+void arm11x6_idcache_wbinv_range (vm_offset_t, vm_size_t);
+void arm11x6_setup (char *string);
+void arm11x6_sleep (int); /* no ref. for errata */
+#endif
+#if defined(CPU_ARM1136)
+void arm1136_sleep_rev0 (int); /* for errata 336501 */
+#endif
+
#if defined(CPU_ARM9E) || defined (CPU_ARM10)
void armv5_ec_setttb(u_int);
diff --git a/sys/arm/include/intr.h b/sys/arm/include/intr.h
index ce681aa..45e36e9 100644
--- a/sys/arm/include/intr.h
+++ b/sys/arm/include/intr.h
@@ -52,7 +52,7 @@
#define NIRQ 64
#elif defined(CPU_CORTEXA)
#define NIRQ 128
-#elif defined(CPU_ARM11)
+#elif defined(CPU_ARM1136) || defined(CPU_ARM1176)
#define NIRQ 128
#elif defined(SOC_MV_ARMADAXP)
#define MAIN_IRQ_NUM 116
diff --git a/sys/arm/include/pl310.h b/sys/arm/include/pl310.h
index 98df53c..26f6c60 100644
--- a/sys/arm/include/pl310.h
+++ b/sys/arm/include/pl310.h
@@ -29,10 +29,139 @@
#ifndef PL310_H_
#define PL310_H_
+
+/**
+ * PL310 - L2 Cache Controller register offsets.
+ *
+ */
+#define PL310_CACHE_ID 0x000
+#define CACHE_ID_RELEASE_SHIFT 0
+#define CACHE_ID_RELEASE_MASK 0x3f
+#define CACHE_ID_RELEASE_r0p0 0x00
+#define CACHE_ID_RELEASE_r1p0 0x02
+#define CACHE_ID_RELEASE_r2p0 0x04
+#define CACHE_ID_RELEASE_r3p0 0x05
+#define CACHE_ID_RELEASE_r3p1 0x06
+#define CACHE_ID_RELEASE_r3p2 0x08
+#define CACHE_ID_RELEASE_r3p3 0x09
+#define CACHE_ID_PARTNUM_SHIFT 6
+#define CACHE_ID_PARTNUM_MASK 0xf
+#define CACHE_ID_PARTNUM_VALUE 0x3
+#define PL310_CACHE_TYPE 0x004
+#define PL310_CTRL 0x100
+#define CTRL_ENABLED 0x01
+#define CTRL_DISABLED 0x00
+#define PL310_AUX_CTRL 0x104
+#define AUX_CTRL_MASK 0xc0000fff
+#define AUX_CTRL_ASSOCIATIVITY_SHIFT 16
+#define AUX_CTRL_WAY_SIZE_SHIFT 17
+#define AUX_CTRL_WAY_SIZE_MASK (0x7 << 17)
+#define AUX_CTRL_SHARE_OVERRIDE (1 << 22)
+#define AUX_CTRL_NS_LOCKDOWN (1 << 26)
+#define AUX_CTRL_NS_INT_CTRL (1 << 27)
+#define AUX_CTRL_DATA_PREFETCH (1 << 28)
+#define AUX_CTRL_INSTR_PREFETCH (1 << 29)
+#define AUX_CTRL_EARLY_BRESP (1 << 30)
+#define PL310_EVENT_COUNTER_CTRL 0x200
+#define EVENT_COUNTER_CTRL_ENABLED (1 << 0)
+#define EVENT_COUNTER_CTRL_C0_RESET (1 << 1)
+#define EVENT_COUNTER_CTRL_C1_RESET (1 << 2)
+#define PL310_EVENT_COUNTER1_CONF 0x204
+#define PL310_EVENT_COUNTER0_CONF 0x208
+#define EVENT_COUNTER_CONF_NOINTR 0
+#define EVENT_COUNTER_CONF_INCR 1
+#define EVENT_COUNTER_CONF_OVFW 2
+#define EVENT_COUNTER_CONF_NOEV (0 << 2)
+#define EVENT_COUNTER_CONF_CO (1 << 2)
+#define EVENT_COUNTER_CONF_DRHIT (2 << 2)
+#define EVENT_COUNTER_CONF_DRREQ (3 << 2)
+#define EVENT_COUNTER_CONF_DWHIT (4 << 2)
+#define EVENT_COUNTER_CONF_DWREQ (5 << 2)
+#define EVENT_COUNTER_CONF_DWTREQ (6 << 2)
+#define EVENT_COUNTER_CONF_DIRHIT (7 << 2)
+#define EVENT_COUNTER_CONF_DIRREQ (8 << 2)
+#define EVENT_COUNTER_CONF_WA (9 << 2)
+#define PL310_EVENT_COUNTER1_VAL 0x20C
+#define PL310_EVENT_COUNTER0_VAL 0x210
+#define PL310_INTR_MASK 0x214
+#define PL310_MASKED_INTR_STAT 0x218
+#define PL310_RAW_INTR_STAT 0x21C
+#define PL310_INTR_CLEAR 0x220
+#define INTR_MASK_ALL ((1 << 9) - 1)
+#define INTR_MASK_ECNTR (1 << 0)
+#define INTR_MASK_PARRT (1 << 1)
+#define INTR_MASK_PARRD (1 << 2)
+#define INTR_MASK_ERRWT (1 << 3)
+#define INTR_MASK_ERRWD (1 << 4)
+#define INTR_MASK_ERRRT (1 << 5)
+#define INTR_MASK_ERRRD (1 << 6)
+#define INTR_MASK_SLVERR (1 << 7)
+#define INTR_MASK_DECERR (1 << 8)
+#define PL310_CACHE_SYNC 0x730
+#define PL310_INV_LINE_PA 0x770
+#define PL310_INV_WAY 0x77C
+#define PL310_CLEAN_LINE_PA 0x7B0
+#define PL310_CLEAN_LINE_IDX 0x7B8
+#define PL310_CLEAN_WAY 0x7BC
+#define PL310_CLEAN_INV_LINE_PA 0x7F0
+#define PL310_CLEAN_INV_LINE_IDX 0x7F8
+#define PL310_CLEAN_INV_WAY 0x7FC
+#define PL310_LOCKDOWN_D_WAY(x) (0x900 + ((x) * 8))
+#define PL310_LOCKDOWN_I_WAY(x) (0x904 + ((x) * 8))
+#define PL310_LOCKDOWN_LINE_ENABLE 0x950
+#define PL310_UNLOCK_ALL_LINES_WAY 0x954
+#define PL310_ADDR_FILTER_STAR 0xC00
+#define PL310_ADDR_FILTER_END 0xC04
+#define PL310_DEBUG_CTRL 0xF40
+#define PL310_PREFETCH_CTRL 0xF60
+#define PREFETCH_CTRL_OFFSET_MASK (0x1f)
+#define PREFETCH_CTRL_NOTSAMEID (1 << 21)
+#define PREFETCH_CTRL_INCR_DL (1 << 23)
+#define PREFETCH_CTRL_PREFETCH_DROP (1 << 24)
+#define PREFETCH_CTRL_DL_ON_WRAP (1 << 27)
+#define PREFETCH_CTRL_DATA_PREFETCH (1 << 28)
+#define PREFETCH_CTRL_INSTR_PREFETCH (1 << 29)
+#define PREFETCH_CTRL_DL (1 << 30)
+#define PL310_POWER_CTRL 0xF60
+
struct pl310_softc {
+ device_t sc_dev;
struct resource *sc_mem_res;
+ struct resource *sc_irq_res;
+ void* sc_irq_h;
+ int sc_enabled;
+ struct mtx sc_mtx;
};
-void platform_init_pl310(struct pl310_softc *sc);
+/**
+ * pl310_read4 - read a 32-bit value from the PL310 registers
+ * pl310_write4 - write a 32-bit value from the PL310 registers
+ * @off: byte offset within the register set to read from
+ * @val: the value to write into the register
+ *
+ *
+ * LOCKING:
+ * None
+ *
+ * RETURNS:
+ * nothing in case of write function, if read function returns the value read.
+ */
+static __inline uint32_t
+pl310_read4(struct pl310_softc *sc, bus_size_t off)
+{
+
+ return bus_read_4(sc->sc_mem_res, off);
+}
+
+static __inline void
+pl310_write4(struct pl310_softc *sc, bus_size_t off, uint32_t val)
+{
+
+ bus_write_4(sc->sc_mem_res, off, val);
+}
+
+void platform_pl310_init(struct pl310_softc *);
+void platform_pl310_write_ctrl(struct pl310_softc *, uint32_t);
+void platform_pl310_write_debug(struct pl310_softc *, uint32_t);
#endif /* PL310_H_ */
diff --git a/sys/arm/include/pmap.h b/sys/arm/include/pmap.h
index e20bf18..da4571d 100644
--- a/sys/arm/include/pmap.h
+++ b/sys/arm/include/pmap.h
@@ -96,10 +96,10 @@ enum mem_type {
#endif
-#define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT
+#define pmap_page_get_memattr(m) ((m)->md.pv_memattr)
#define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list))
#define pmap_page_is_write_mapped(m) (((m)->aflags & PGA_WRITEABLE) != 0)
-#define pmap_page_set_memattr(m, ma) (void)0
+void pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma);
/*
* Pmap stuff
@@ -119,6 +119,7 @@ struct pv_entry;
struct md_page {
int pvh_attrs;
+ vm_memattr_t pv_memattr;
vm_offset_t pv_kva; /* first kernel VA mapping */
TAILQ_HEAD(,pv_entry) pv_list;
};
@@ -550,7 +551,7 @@ void pmap_pte_init_arm10(void);
#endif /* CPU_ARM10 */
#if (ARM_MMU_V6 + ARM_MMU_V7) != 0
void pmap_pte_init_mmu_v6(void);
-#endif /* CPU_ARM11 */
+#endif /* (ARM_MMU_V6 + ARM_MMU_V7) != 0 */
#endif /* (ARM_MMU_GENERIC + ARM_MMU_SA1) != 0 */
#if /* ARM_MMU_SA1 == */1
diff --git a/sys/arm/include/vm.h b/sys/arm/include/vm.h
index 7ec2d9e..6f27276 100644
--- a/sys/arm/include/vm.h
+++ b/sys/arm/include/vm.h
@@ -29,7 +29,8 @@
#ifndef _MACHINE_VM_H_
#define _MACHINE_VM_H_
-/* Memory attribute configuration is not (yet) implemented. */
+/* Memory attribute configuration. */
#define VM_MEMATTR_DEFAULT 0
+#define VM_MEMATTR_UNCACHEABLE 1
#endif /* !_MACHINE_VM_H_ */
diff --git a/sys/arm/lpc/if_lpe.c b/sys/arm/lpc/if_lpe.c
index b7b5a9a..025aa72 100644
--- a/sys/arm/lpc/if_lpe.c
+++ b/sys/arm/lpc/if_lpe.c
@@ -1122,7 +1122,7 @@ lpe_init_rxbuf(struct lpe_softc *sc, int n)
rxd = &sc->lpe_cdata.lpe_rx_desc[n];
hwd = &sc->lpe_rdata.lpe_rx_ring[n];
hws = &sc->lpe_rdata.lpe_rx_status[n];
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (!m) {
device_printf(sc->lpe_dev, "WARNING: mbufs exhausted!\n");
diff --git a/sys/arm/ti/cpsw/if_cpsw.c b/sys/arm/ti/cpsw/if_cpsw.c
index d671c72..80cbe73 100644
--- a/sys/arm/ti/cpsw/if_cpsw.c
+++ b/sys/arm/ti/cpsw/if_cpsw.c
@@ -95,9 +95,9 @@ static void cpsw_start(struct ifnet *ifp);
static void cpsw_start_locked(struct ifnet *ifp);
static void cpsw_stop_locked(struct cpsw_softc *sc);
static int cpsw_ioctl(struct ifnet *ifp, u_long command, caddr_t data);
-static int cpsw_allocate_dma(struct cpsw_softc *sc);
-static int cpsw_free_dma(struct cpsw_softc *sc);
-static int cpsw_new_rxbuf(struct cpsw_softc *sc, uint32_t i, uint32_t next);
+static int cpsw_init_slot_lists(struct cpsw_softc *sc);
+static void cpsw_free_slot(struct cpsw_softc *sc, struct cpsw_slot *slot);
+static void cpsw_fill_rx_queue_locked(struct cpsw_softc *sc);
static void cpsw_watchdog(struct cpsw_softc *sc);
static void cpsw_intr_rx_thresh(void *arg);
@@ -156,10 +156,10 @@ static struct {
driver_intr_t *handler;
char * description;
} cpsw_intrs[CPSW_INTR_COUNT + 1] = {
- { cpsw_intr_rx_thresh,"CPSW RX threshold interrupt" },
+ { cpsw_intr_rx_thresh, "CPSW RX threshold interrupt" },
{ cpsw_intr_rx, "CPSW RX interrupt" },
{ cpsw_intr_tx, "CPSW TX interrupt" },
- { cpsw_intr_misc,"CPSW misc interrupt" },
+ { cpsw_intr_misc, "CPSW misc interrupt" },
};
/* Locking macros */
@@ -199,6 +199,34 @@ static struct {
} while (0)
+#include <machine/stdarg.h>
+static void
+cpsw_debugf_head(const char *funcname)
+{
+ int t = (int)(time_second % (24 * 60 * 60));
+
+ printf("%02d:%02d:%02d %s ", t / (60 * 60), (t / 60) % 60, t % 60, funcname);
+}
+
+static void
+cpsw_debugf(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vprintf(fmt, ap);
+ va_end(ap);
+ printf("\n");
+
+}
+
+#define CPSW_DEBUGF(a) do { \
+ if (sc->cpsw_if_flags & IFF_DEBUG) { \
+ cpsw_debugf_head(__func__); \
+ cpsw_debugf a; \
+ } \
+} while (0)
+
static int
cpsw_probe(device_t dev)
{
@@ -213,18 +241,20 @@ cpsw_probe(device_t dev)
static int
cpsw_attach(device_t dev)
{
- struct cpsw_softc *sc;
+ struct cpsw_softc *sc = device_get_softc(dev);
struct mii_softc *miisc;
struct ifnet *ifp;
+ void *phy_sc;
int i, error, phy;
uint32_t reg;
- sc = device_get_softc(dev);
+ CPSW_DEBUGF((""));
+
sc->dev = dev;
sc->node = ofw_bus_get_node(dev);
/* Get phy address from fdt */
- if (fdt_get_phyaddr(sc->node, sc->dev, &phy, (void **)&sc->phy_sc) != 0) {
+ if (fdt_get_phyaddr(sc->node, sc->dev, &phy, &phy_sc) != 0) {
device_printf(dev, "failed to get PHY address from FDT\n");
return (ENXIO);
}
@@ -246,14 +276,32 @@ cpsw_attach(device_t dev)
device_printf(dev, "Version %d.%d (%d)\n", (reg >> 8 & 0x7),
reg & 0xFF, (reg >> 11) & 0x1F);
- /* Allocate DMA, buffers, buffer descriptors */
- error = cpsw_allocate_dma(sc);
+ //cpsw_add_sysctls(sc); TODO
+
+ /* Allocate a busdma tag and DMA safe memory for mbufs. */
+ error = bus_dma_tag_create(
+ bus_get_dma_tag(sc->dev), /* parent */
+ 1, 0, /* alignment, boundary */
+ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */
+ BUS_SPACE_MAXADDR, /* highaddr */
+ NULL, NULL, /* filtfunc, filtfuncarg */
+ MCLBYTES, 1, /* maxsize, nsegments */
+ MCLBYTES, 0, /* maxsegsz, flags */
+ NULL, NULL, /* lockfunc, lockfuncarg */
+ &sc->mbuf_dtag); /* dmatag */
if (error) {
+ device_printf(dev, "bus_dma_tag_create failed\n");
cpsw_detach(dev);
- return (ENXIO);
+ return (ENOMEM);
}
- //cpsw_add_sysctls(sc); TODO
+ /* Initialize the tx_avail and rx_avail lists. */
+ error = cpsw_init_slot_lists(sc);
+ if (error) {
+ device_printf(dev, "failed to allocate dmamaps\n");
+ cpsw_detach(dev);
+ return (ENOMEM);
+ }
/* Allocate network interface */
ifp = sc->ifp = if_alloc(IFT_ETHER);
@@ -294,7 +342,7 @@ cpsw_attach(device_t dev)
/* Initialze MDIO - ENABLE, PREAMBLE=0, FAULTENB, CLKDIV=0xFF */
/* TODO Calculate MDCLK=CLK/(CLKDIV+1) */
- cpsw_write_4(MDIOCONTROL, (1<<30) | (1<<18) | 0xFF);
+ cpsw_write_4(MDIOCONTROL, 1 << 30 | 1 << 18 | 0xFF);
/* Attach PHY(s) */
error = mii_attach(dev, &sc->miibus, ifp, cpsw_ifmedia_upd,
@@ -310,7 +358,7 @@ cpsw_attach(device_t dev)
miisc = LIST_FIRST(&sc->mii->mii_phys);
/* Select PHY and enable interrupts */
- cpsw_write_4(MDIOUSERPHYSEL0, (1 << 6) | (miisc->mii_phy & 0x1F));
+ cpsw_write_4(MDIOUSERPHYSEL0, 1 << 6 | (miisc->mii_phy & 0x1F));
/* Attach interrupt handlers */
for (i = 1; i <= CPSW_INTR_COUNT; ++i) {
@@ -332,17 +380,22 @@ cpsw_attach(device_t dev)
static int
cpsw_detach(device_t dev)
{
- struct cpsw_softc *sc;
- int error,i;
+ struct cpsw_softc *sc = device_get_softc(dev);
+ int error, i;
- sc = device_get_softc(dev);
+ CPSW_DEBUGF((""));
/* Stop controller and free TX queue */
- if (sc->ifp)
- cpsw_shutdown(dev);
+ if (device_is_attached(dev)) {
+ ether_ifdetach(sc->ifp);
+ CPSW_GLOBAL_LOCK(sc);
+ cpsw_stop_locked(sc);
+ CPSW_GLOBAL_UNLOCK(sc);
+ callout_drain(&sc->wd_callout);
+ }
- /* Wait for stopping ticks */
- callout_drain(&sc->wd_callout);
+ bus_generic_detach(dev);
+ device_delete_child(dev, sc->miibus);
/* Stop and release all interrupts */
for (i = 0; i < CPSW_INTR_COUNT; ++i) {
@@ -355,14 +408,17 @@ cpsw_detach(device_t dev)
cpsw_intrs[i + 1].description);
}
- /* Detach network interface */
- if (sc->ifp) {
- ether_ifdetach(sc->ifp);
- if_free(sc->ifp);
+ /* Free dmamaps and mbufs */
+ for (i = 0; i < CPSW_MAX_TX_BUFFERS; i++) {
+ cpsw_free_slot(sc, &sc->_tx_slots[i]);
+ }
+ for (i = 0; i < CPSW_MAX_RX_BUFFERS; i++) {
+ cpsw_free_slot(sc, &sc->_rx_slots[i]);
}
- /* Free DMA resources */
- cpsw_free_dma(sc);
+ /* Free DMA tag */
+ error = bus_dma_tag_destroy(sc->mbuf_dtag);
+ KASSERT(error == 0, ("Unable to destroy DMA tag"));
/* Free IO memory handler */
bus_release_resources(dev, res_spec, sc->res);
@@ -377,15 +433,19 @@ cpsw_detach(device_t dev)
static int
cpsw_suspend(device_t dev)
{
+ struct cpsw_softc *sc = device_get_softc(dev);
- device_printf(dev, "%s\n", __FUNCTION__);
+ CPSW_DEBUGF((""));
+ CPSW_GLOBAL_LOCK(sc);
+ cpsw_stop_locked(sc);
+ CPSW_GLOBAL_UNLOCK(sc);
return (0);
}
static int
cpsw_resume(device_t dev)
{
-
+ /* XXX TODO XXX */
device_printf(dev, "%s\n", __FUNCTION__);
return (0);
}
@@ -395,208 +455,132 @@ cpsw_shutdown(device_t dev)
{
struct cpsw_softc *sc = device_get_softc(dev);
+ CPSW_DEBUGF((""));
CPSW_GLOBAL_LOCK(sc);
-
cpsw_stop_locked(sc);
-
CPSW_GLOBAL_UNLOCK(sc);
-
return (0);
}
static int
-cpsw_miibus_readreg(device_t dev, int phy, int reg)
+cpsw_miibus_ready(struct cpsw_softc *sc)
{
- struct cpsw_softc *sc;
- uint32_t r;
- uint32_t retries = CPSW_MIIBUS_RETRIES;
-
- sc = device_get_softc(dev);
+ uint32_t r, retries = CPSW_MIIBUS_RETRIES;
- /* Wait until interface is ready by watching GO bit */
- while(--retries && (cpsw_read_4(MDIOUSERACCESS0) & (1 << 31)) )
+ while (--retries) {
+ r = cpsw_read_4(MDIOUSERACCESS0);
+ if ((r & 1 << 31) == 0)
+ return 1;
DELAY(CPSW_MIIBUS_DELAY);
- if (!retries)
- device_printf(dev, "Timeout while waiting for MDIO.\n");
+ }
+ return 0;
+}
- /* Set GO, phy and reg */
- cpsw_write_4(MDIOUSERACCESS0, (1 << 31) |
- ((reg & 0x1F) << 21) | ((phy & 0x1F) << 16));
+static int
+cpsw_miibus_readreg(device_t dev, int phy, int reg)
+{
+ struct cpsw_softc *sc = device_get_softc(dev);
+ uint32_t cmd, r;
- while(--retries && (cpsw_read_4(MDIOUSERACCESS0) & (1 << 31)) )
- DELAY(CPSW_MIIBUS_DELAY);
- if (!retries)
- device_printf(dev, "Timeout while waiting for MDIO.\n");
+ if (!cpsw_miibus_ready(sc)) {
+ device_printf(dev, "MDIO not ready to read\n");
+ return 0;
+ }
+
+ /* Set GO, reg, phy */
+ cmd = 1 << 31 | (reg & 0x1F) << 21 | (phy & 0x1F) << 16;
+ cpsw_write_4(MDIOUSERACCESS0, cmd);
+
+ if (!cpsw_miibus_ready(sc)) {
+ device_printf(dev, "MDIO timed out during read\n");
+ return 0;
+ }
r = cpsw_read_4(MDIOUSERACCESS0);
- /* Check for ACK */
- if(r & (1<<29)) {
- return (r & 0xFFFF);
+ if((r & 1 << 29) == 0) {
+ device_printf(dev, "Failed to read from PHY.\n");
+ r = 0;
}
- device_printf(dev, "Failed to read from PHY.\n");
- return 0;
+ return (r & 0xFFFF);
}
static int
cpsw_miibus_writereg(device_t dev, int phy, int reg, int value)
{
- struct cpsw_softc *sc;
- uint32_t retries = CPSW_MIIBUS_RETRIES;
-
- sc = device_get_softc(dev);
-
- /* Wait until interface is ready by watching GO bit */
- while(--retries && (cpsw_read_4(MDIOUSERACCESS0) & (1 << 31)) )
- DELAY(CPSW_MIIBUS_DELAY);
- if (!retries)
- device_printf(dev, "Timeout while waiting for MDIO.\n");
+ struct cpsw_softc *sc = device_get_softc(dev);
+ uint32_t cmd;
- /* Set GO, WRITE, phy, reg and value */
- cpsw_write_4(MDIOUSERACCESS0, (value & 0xFFFF) | (3 << 30) |
- ((reg & 0x1F) << 21) | ((phy & 0x1F) << 16));
+ if (!cpsw_miibus_ready(sc)) {
+ device_printf(dev, "MDIO not ready to write\n");
+ return 0;
+ }
- while(--retries && (cpsw_read_4(MDIOUSERACCESS0) & (1 << 31)) )
- DELAY(CPSW_MIIBUS_DELAY);
- if (!retries)
- device_printf(dev, "Timeout while waiting for MDIO.\n");
+ /* Set GO, WRITE, reg, phy, and value */
+ cmd = 3 << 30 | (reg & 0x1F) << 21 | (phy & 0x1F) << 16
+ | (value & 0xFFFF);
+ cpsw_write_4(MDIOUSERACCESS0, cmd);
- /* Check for ACK */
- if(cpsw_read_4(MDIOUSERACCESS0) & (1<<29)) {
+ if (!cpsw_miibus_ready(sc)) {
+ device_printf(dev, "MDIO timed out during write\n");
return 0;
}
- device_printf(dev, "Failed to write to PHY.\n");
+
+ if((cpsw_read_4(MDIOUSERACCESS0) & (1 << 29)) == 0)
+ device_printf(dev, "Failed to write to PHY.\n");
return 0;
}
static int
-cpsw_allocate_dma(struct cpsw_softc *sc)
+cpsw_init_slot_lists(struct cpsw_softc *sc)
{
- int err;
int i;
- /* Allocate a busdma tag and DMA safe memory for tx mbufs. */
- err = bus_dma_tag_create(
- bus_get_dma_tag(sc->dev), /* parent */
- 1, 0, /* alignment, boundary */
- BUS_SPACE_MAXADDR_32BIT, /* lowaddr */
- BUS_SPACE_MAXADDR, /* highaddr */
- NULL, NULL, /* filtfunc, filtfuncarg */
- MCLBYTES, 1, /* maxsize, nsegments */
- MCLBYTES, 0, /* maxsegsz, flags */
- NULL, NULL, /* lockfunc, lockfuncarg */
- &sc->mbuf_dtag); /* dmatag */
+ STAILQ_INIT(&sc->rx_active);
+ STAILQ_INIT(&sc->rx_avail);
+ STAILQ_INIT(&sc->tx_active);
+ STAILQ_INIT(&sc->tx_avail);
- if (err)
- return (ENOMEM);
+ /* Put the slot descriptors onto the avail lists. */
for (i = 0; i < CPSW_MAX_TX_BUFFERS; i++) {
- if ( bus_dmamap_create(sc->mbuf_dtag, 0, &sc->tx_dmamap[i])) {
- if_printf(sc->ifp, "failed to create dmamap for rx mbuf\n");
+ struct cpsw_slot *slot = &sc->_tx_slots[i];
+ slot->index = i;
+ /* XXX TODO: Remove this from here; allocate dmamaps lazily
+ in the encap routine to reduce memory usage. */
+ if (bus_dmamap_create(sc->mbuf_dtag, 0, &slot->dmamap)) {
+ if_printf(sc->ifp, "failed to create dmamap for tx mbuf\n");
return (ENOMEM);
}
+ STAILQ_INSERT_TAIL(&sc->tx_avail, slot, next);
}
for (i = 0; i < CPSW_MAX_RX_BUFFERS; i++) {
- if ( bus_dmamap_create(sc->mbuf_dtag, 0, &sc->rx_dmamap[i])) {
+ struct cpsw_slot *slot = &sc->_rx_slots[i];
+ slot->index = i;
+ if (bus_dmamap_create(sc->mbuf_dtag, 0, &slot->dmamap)) {
if_printf(sc->ifp, "failed to create dmamap for rx mbuf\n");
return (ENOMEM);
}
+ STAILQ_INSERT_TAIL(&sc->rx_avail, slot, next);
}
return (0);
}
-static int
-cpsw_free_dma(struct cpsw_softc *sc)
-{
- (void)sc; /* UNUSED */
- // TODO
- return 0;
-}
-
-static int
-cpsw_new_rxbuf(struct cpsw_softc *sc, uint32_t i, uint32_t next)
-{
- bus_dma_segment_t seg[1];
- struct cpsw_cpdma_bd bd;
- int error;
- int nsegs;
-
- sc->rx_mbuf[i] = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
- if (sc->rx_mbuf[i] == NULL)
- return (ENOBUFS);
-
- sc->rx_mbuf[i]->m_len = sc->rx_mbuf[i]->m_pkthdr.len = sc->rx_mbuf[i]->m_ext.ext_size;
-
- error = bus_dmamap_load_mbuf_sg(sc->mbuf_dtag, sc->rx_dmamap[i],
- sc->rx_mbuf[i], seg, &nsegs, BUS_DMA_NOWAIT);
-
- KASSERT(nsegs == 1, ("Too many segments returned!"));
- if (nsegs != 1 || error)
- panic("%s: nsegs(%d), error(%d)",__func__, nsegs, error);
-
- bus_dmamap_sync(sc->mbuf_dtag, sc->rx_dmamap[i], BUS_DMASYNC_PREREAD);
-
- /* Create and submit new rx descriptor*/
- bd.next = next;
- bd.bufptr = seg->ds_addr;
- bd.buflen = MCLBYTES-1;
- bd.bufoff = 2; /* make IP hdr aligned with 4 */
- bd.pktlen = 0;
- bd.flags = CPDMA_BD_OWNER;
- cpsw_cpdma_write_rxbd(i, &bd);
-
- return (0);
-}
-
-
-static int
-cpsw_encap(struct cpsw_softc *sc, struct mbuf *m0)
+static void
+cpsw_free_slot(struct cpsw_softc *sc, struct cpsw_slot *slot)
{
- bus_dma_segment_t seg[1];
- struct cpsw_cpdma_bd bd;
int error;
- int nsegs;
- int idx;
-
- if (sc->txbd_queue_size == CPSW_MAX_TX_BUFFERS)
- return (ENOBUFS);
-
- idx = sc->txbd_head + sc->txbd_queue_size;
-
- if (idx >= (CPSW_MAX_TX_BUFFERS) )
- idx -= CPSW_MAX_TX_BUFFERS;
- /* Create mapping in DMA memory */
- error = bus_dmamap_load_mbuf_sg(sc->mbuf_dtag, sc->tx_dmamap[idx], m0, seg, &nsegs,
- BUS_DMA_NOWAIT);
- sc->tc[idx]++;
- if (error != 0 || nsegs != 1 ) {
- bus_dmamap_unload(sc->mbuf_dtag, sc->tx_dmamap[idx]);
- return ((error != 0) ? error : -1);
+ if (slot->dmamap) {
+ error = bus_dmamap_destroy(sc->mbuf_dtag, slot->dmamap);
+ KASSERT(error == 0, ("Mapping still active"));
+ slot->dmamap = NULL;
+ }
+ if (slot->mbuf) {
+ m_freem(slot->mbuf);
+ slot->mbuf = NULL;
}
- bus_dmamap_sync(sc->mbuf_dtag, sc->tx_dmamap[idx], BUS_DMASYNC_PREWRITE);
-
- /* Fill descriptor data */
- bd.next = 0;
- bd.bufptr = seg->ds_addr;
- bd.bufoff = 0;
- bd.buflen = seg->ds_len;
- bd.pktlen = seg->ds_len;
- /* Set OWNERSHIP, SOP, EOP */
- bd.flags = (7<<13);
-
- /* Write descriptor */
- cpsw_cpdma_write_txbd(idx, &bd);
- sc->tx_mbuf[idx] = m0;
-
- /* Previous descriptor should point to us */
- cpsw_cpdma_write_txbd_next(((idx-1<0)?(CPSW_MAX_TX_BUFFERS-1):(idx-1)),
- cpsw_cpdma_txbd_paddr(idx));
-
- sc->txbd_queue_size++;
-
- return (0);
}
/*
@@ -625,7 +609,7 @@ cpsw_pad(struct mbuf *m)
;
if (!(M_WRITABLE(last) && M_TRAILINGSPACE(last) >= padlen)) {
/* Allocate new empty mbuf, pad it. Compact later. */
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (n == NULL)
return (ENOBUFS);
n->m_len = 0;
@@ -655,10 +639,13 @@ cpsw_start(struct ifnet *ifp)
static void
cpsw_start_locked(struct ifnet *ifp)
{
+ bus_dma_segment_t seg[1];
+ struct cpsw_cpdma_bd bd;
struct cpsw_softc *sc = ifp->if_softc;
+ struct cpsw_queue newslots = STAILQ_HEAD_INITIALIZER(newslots);
+ struct cpsw_slot *slot, *prev_slot = NULL, *first_new_slot;
struct mbuf *m0, *mtmp;
- uint32_t queued = 0;
- int error;
+ int error, nsegs, enqueued = 0;
CPSW_TX_LOCK_ASSERT(sc);
@@ -666,44 +653,111 @@ cpsw_start_locked(struct ifnet *ifp)
IFF_DRV_RUNNING)
return;
+ /* Pull pending packets from IF queue and prep them for DMA. */
for (;;) {
- /* Get packet from the queue */
+ slot = STAILQ_FIRST(&sc->tx_avail);
+ if (slot == NULL) {
+ ifp->if_drv_flags |= IFF_DRV_OACTIVE;
+ break;
+ }
+
IF_DEQUEUE(&ifp->if_snd, m0);
if (m0 == NULL)
break;
if ((error = cpsw_pad(m0))) {
+ if_printf(ifp,
+ "%s: Dropping packet; could not pad\n", __func__);
m_freem(m0);
continue;
}
+ /* TODO: don't defragment here, queue each
+ packet fragment as a separate entry. */
mtmp = m_defrag(m0, M_NOWAIT);
if (mtmp)
m0 = mtmp;
- if (cpsw_encap(sc, m0)) {
- IF_PREPEND(&ifp->if_snd, m0);
- ifp->if_drv_flags |= IFF_DRV_OACTIVE;
+ slot->mbuf = m0;
+ /* Create mapping in DMA memory */
+ error = bus_dmamap_load_mbuf_sg(sc->mbuf_dtag, slot->dmamap,
+ m0, seg, &nsegs, BUS_DMA_NOWAIT);
+ KASSERT(nsegs == 1, ("More than one segment (nsegs=%d)", nsegs));
+ KASSERT(error == 0, ("DMA error (error=%d)", error));
+ if (error != 0 || nsegs != 1) {
+ if_printf(ifp,
+ "%s: Can't load packet for DMA (nsegs=%d, error=%d), dropping packet\n",
+ __func__, nsegs, error);
+ bus_dmamap_unload(sc->mbuf_dtag, slot->dmamap);
+ m_freem(m0);
break;
}
- queued++;
+ bus_dmamap_sync(sc->mbuf_dtag, slot->dmamap,
+ BUS_DMASYNC_PREWRITE);
+
+ if (prev_slot != NULL)
+ cpsw_cpdma_write_txbd_next(prev_slot->index,
+ cpsw_cpdma_txbd_paddr(slot->index));
+ bd.next = 0;
+ bd.bufptr = seg->ds_addr;
+ bd.bufoff = 0;
+ bd.buflen = seg->ds_len;
+ bd.pktlen = seg->ds_len;
+ bd.flags = 7 << 13; /* Set OWNERSHIP, SOP, EOP */
+ cpsw_cpdma_write_txbd(slot->index, &bd);
+ ++enqueued;
+
+ prev_slot = slot;
+ STAILQ_REMOVE_HEAD(&sc->tx_avail, next);
+ STAILQ_INSERT_TAIL(&newslots, slot, next);
BPF_MTAP(ifp, m0);
}
- if (!queued)
+ if (STAILQ_EMPTY(&newslots))
return;
- if (sc->eoq) {
- cpsw_write_4(CPSW_CPDMA_TX_HDP(0), cpsw_cpdma_txbd_paddr(sc->txbd_head));
- sc->eoq = 0;
+ /* Attach new segments to the hardware TX queue. */
+ prev_slot = STAILQ_LAST(&sc->tx_active, cpsw_slot, next);
+ first_new_slot = STAILQ_FIRST(&newslots);
+ STAILQ_CONCAT(&sc->tx_active, &newslots);
+ if (prev_slot == NULL) {
+ /* Start the TX queue fresh. */
+ cpsw_write_4(CPSW_CPDMA_TX_HDP(0),
+ cpsw_cpdma_txbd_paddr(first_new_slot->index));
+ } else {
+ /* Add packets to current queue. */
+ /* Race: The hardware might have sent the last packet
+ * on the queue and stopped the transmitter just
+ * before we got here. In that case, this is a no-op,
+ * but it also means there's a TX interrupt waiting
+ * to be processed as soon as we release the lock here.
+ * That TX interrupt can detect and recover from this
+ * situation; see cpsw_intr_tx_locked.
+ */
+ cpsw_cpdma_write_txbd_next(prev_slot->index,
+ cpsw_cpdma_txbd_paddr(first_new_slot->index));
+ }
+ /* If tx_retires hasn't changed, then we may have
+ lost a TX interrupt, so let the timer tick. */
+ sc->tx_enqueues += enqueued;
+ if (sc->tx_retires_at_wd_reset != sc->tx_retires) {
+ sc->tx_retires_at_wd_reset = sc->tx_retires;
+ sc->wd_timer = 5;
+ }
+ sc->tx_queued += enqueued;
+ if (sc->tx_queued > sc->tx_max_queued) {
+ sc->tx_max_queued = sc->tx_queued;
+ CPSW_DEBUGF(("New TX high water mark %d", sc->tx_queued));
}
- sc->wd_timer = 5;
}
static void
cpsw_stop_locked(struct cpsw_softc *sc)
{
struct ifnet *ifp;
+ int i;
+
+ CPSW_DEBUGF((""));
CPSW_GLOBAL_LOCK_ASSERT(sc);
@@ -712,15 +766,89 @@ cpsw_stop_locked(struct cpsw_softc *sc)
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
return;
- /* Stop tick engine */
- callout_stop(&sc->wd_callout);
-
/* Disable interface */
ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
+
+ /* Stop tick engine */
+ callout_stop(&sc->wd_callout);
sc->wd_timer = 0;
- /* Disable interrupts TODO */
+ /* Wait for hardware to clear pending ops. */
+ CPSW_GLOBAL_UNLOCK(sc);
+ CPSW_DEBUGF(("starting RX and TX teardown"));
+ cpsw_write_4(CPSW_CPDMA_RX_TEARDOWN, 0);
+ cpsw_write_4(CPSW_CPDMA_TX_TEARDOWN, 0);
+ i = 0;
+ cpsw_intr_rx(sc); // Try clearing without delay.
+ cpsw_intr_tx(sc);
+ while (sc->rx_running || sc->tx_running) {
+ DELAY(10);
+ cpsw_intr_rx(sc);
+ cpsw_intr_tx(sc);
+ ++i;
+ }
+ CPSW_DEBUGF(("finished RX and TX teardown (%d tries)", i));
+ CPSW_GLOBAL_LOCK(sc);
+
+ /* All slots are now available */
+ STAILQ_CONCAT(&sc->rx_avail, &sc->rx_active);
+ STAILQ_CONCAT(&sc->tx_avail, &sc->tx_active);
+ CPSW_DEBUGF(("%d buffers dropped at TX reset", sc->tx_queued));
+ sc->tx_queued = 0;
+
+ /* Reset writer */
+ cpsw_write_4(CPSW_WR_SOFT_RESET, 1);
+ while (cpsw_read_4(CPSW_WR_SOFT_RESET) & 1)
+ ;
+
+ /* Reset SS */
+ cpsw_write_4(CPSW_SS_SOFT_RESET, 1);
+ while (cpsw_read_4(CPSW_SS_SOFT_RESET) & 1)
+ ;
+
+ /* Reset Sliver port 1 and 2 */
+ for (i = 0; i < 2; i++) {
+ /* Reset */
+ cpsw_write_4(CPSW_SL_SOFT_RESET(i), 1);
+ while (cpsw_read_4(CPSW_SL_SOFT_RESET(i)) & 1)
+ ;
+ }
+ /* Reset CPDMA */
+ cpsw_write_4(CPSW_CPDMA_SOFT_RESET, 1);
+ while (cpsw_read_4(CPSW_CPDMA_SOFT_RESET) & 1)
+ ;
+
+ /* Disable TX & RX DMA */
+ cpsw_write_4(CPSW_CPDMA_TX_CONTROL, 0);
+ cpsw_write_4(CPSW_CPDMA_RX_CONTROL, 0);
+
+ /* Disable TX and RX interrupts for all cores. */
+ for (i = 0; i < 3; ++i) {
+ cpsw_write_4(CPSW_WR_C_TX_EN(i), 0x00);
+ cpsw_write_4(CPSW_WR_C_RX_EN(i), 0x00);
+ cpsw_write_4(CPSW_WR_C_MISC_EN(i), 0x00);
+ }
+
+ /* Clear all interrupt Masks */
+ cpsw_write_4(CPSW_CPDMA_RX_INTMASK_CLEAR, 0xFFFFFFFF);
+ cpsw_write_4(CPSW_CPDMA_TX_INTMASK_CLEAR, 0xFFFFFFFF);
+}
+
+static void
+cpsw_set_promisc(struct cpsw_softc *sc, int set)
+{
+ if (set) {
+ printf("Promiscuous mode unimplemented\n");
+ }
+}
+
+static void
+cpsw_set_allmulti(struct cpsw_softc *sc, int set)
+{
+ if (set) {
+ printf("All-multicast mode unimplemented\n");
+ }
}
static int
@@ -729,53 +857,48 @@ cpsw_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
struct cpsw_softc *sc = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *)data;
int error;
- uint32_t flags;
+ uint32_t changed;
+ CPSW_DEBUGF(("command=0x%lx", command));
error = 0;
- // FIXME
switch (command) {
case SIOCSIFFLAGS:
CPSW_GLOBAL_LOCK(sc);
if (ifp->if_flags & IFF_UP) {
if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
- flags = ifp->if_flags ^ sc->cpsw_if_flags;
- if (flags & IFF_PROMISC)
- printf("%s: SIOCSIFFLAGS "
- "IFF_PROMISC unimplemented\n",
- __func__);
-
- if (flags & IFF_ALLMULTI)
- printf("%s: SIOCSIFFLAGS "
- "IFF_ALLMULTI unimplemented\n",
- __func__);
+ changed = ifp->if_flags ^ sc->cpsw_if_flags;
+ CPSW_DEBUGF(("SIOCSIFFLAGS: UP & RUNNING (changed=0x%x)", changed));
+ if (changed & IFF_PROMISC)
+ cpsw_set_promisc(sc,
+ ifp->if_flags & IFF_PROMISC);
+ if (changed & IFF_ALLMULTI)
+ cpsw_set_allmulti(sc,
+ ifp->if_flags & IFF_ALLMULTI);
} else {
- printf("%s: SIOCSIFFLAGS cpsw_init_locked\n", __func__);
- //cpsw_init_locked(sc);
+ CPSW_DEBUGF(("SIOCSIFFLAGS: UP but not RUNNING"));
+ cpsw_init_locked(sc);
}
- }
- else if (ifp->if_drv_flags & IFF_DRV_RUNNING)
+ } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
+ CPSW_DEBUGF(("SIOCSIFFLAGS: not UP but RUNNING"));
cpsw_stop_locked(sc);
+ }
sc->cpsw_if_flags = ifp->if_flags;
CPSW_GLOBAL_UNLOCK(sc);
break;
case SIOCADDMULTI:
- printf("%s: SIOCADDMULTI\n",__func__);
+ CPSW_DEBUGF(("SIOCADDMULTI unimplemented"));
break;
case SIOCDELMULTI:
- printf("%s: SIOCDELMULTI\n",__func__);
- break;
- case SIOCSIFCAP:
- printf("%s: SIOCSIFCAP\n",__func__);
+ CPSW_DEBUGF(("SIOCDELMULTI unimplemented"));
break;
case SIOCGIFMEDIA:
- error = ifmedia_ioctl(ifp, ifr, &sc->mii->mii_media, command);
- break;
case SIOCSIFMEDIA:
error = ifmedia_ioctl(ifp, ifr, &sc->mii->mii_media, command);
break;
default:
+ CPSW_DEBUGF(("ether ioctl"));
error = ether_ioctl(ifp, command, data);
}
return (error);
@@ -787,6 +910,7 @@ cpsw_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
struct cpsw_softc *sc = ifp->if_softc;
struct mii_data *mii;
+ CPSW_DEBUGF((""));
CPSW_TX_LOCK(sc);
mii = sc->mii;
@@ -804,13 +928,12 @@ cpsw_ifmedia_upd(struct ifnet *ifp)
{
struct cpsw_softc *sc = ifp->if_softc;
+ CPSW_DEBUGF((""));
if (ifp->if_flags & IFF_UP) {
CPSW_GLOBAL_LOCK(sc);
-
sc->cpsw_media_status = sc->mii->mii_media.ifm_media;
mii_mediachg(sc->mii);
cpsw_init_locked(sc);
-
CPSW_GLOBAL_UNLOCK(sc);
}
@@ -820,15 +943,18 @@ cpsw_ifmedia_upd(struct ifnet *ifp)
static void
cpsw_intr_rx_thresh(void *arg)
{
- (void)arg; /* UNUSED */
+ struct cpsw_softc *sc = arg;
+ CPSW_DEBUGF((""));
}
static void
cpsw_intr_rx(void *arg)
{
struct cpsw_softc *sc = arg;
+
CPSW_RX_LOCK(sc);
cpsw_intr_rx_locked(arg);
+ cpsw_write_4(CPSW_CPDMA_CPDMA_EOI_VECTOR, 1);
CPSW_RX_UNLOCK(sc);
}
@@ -837,63 +963,155 @@ cpsw_intr_rx_locked(void *arg)
{
struct cpsw_softc *sc = arg;
struct cpsw_cpdma_bd bd;
+ struct cpsw_slot *slot, *last_slot = NULL;
struct ifnet *ifp;
- int i;
ifp = sc->ifp;
+ if (!sc->rx_running)
+ return;
- i = sc->rxbd_head;
- cpsw_cpdma_read_rxbd(i, &bd);
-
- while (bd.flags & CPDMA_BD_SOP) {
- cpsw_write_4(CPSW_CPDMA_RX_CP(0), cpsw_cpdma_rxbd_paddr(i));
+ /* Pull completed packets off hardware RX queue. */
+ slot = STAILQ_FIRST(&sc->rx_active);
+ while (slot != NULL) {
+ cpsw_cpdma_read_rxbd(slot->index, &bd);
+ if (bd.flags & CPDMA_BD_OWNER)
+ break; /* Still in use by hardware */
+
+ if (bd.flags & CPDMA_BD_TDOWNCMPLT) {
+ CPSW_DEBUGF(("RX teardown in progress"));
+ cpsw_write_4(CPSW_CPDMA_RX_CP(0), 0xfffffffc);
+ sc->rx_running = 0;
+ return;
+ }
- bus_dmamap_sync(sc->mbuf_dtag, sc->rx_dmamap[i], BUS_DMASYNC_POSTREAD);
- bus_dmamap_unload(sc->mbuf_dtag, sc->rx_dmamap[i]);
+ bus_dmamap_sync(sc->mbuf_dtag, slot->dmamap, BUS_DMASYNC_POSTREAD);
+ bus_dmamap_unload(sc->mbuf_dtag, slot->dmamap);
/* Fill mbuf */
- sc->rx_mbuf[i]->m_hdr.mh_data += bd.bufoff;
- sc->rx_mbuf[i]->m_hdr.mh_len = bd.pktlen - 4;
- sc->rx_mbuf[i]->m_pkthdr.len = bd.pktlen - 4;
- sc->rx_mbuf[i]->m_flags |= M_PKTHDR;
- sc->rx_mbuf[i]->m_pkthdr.rcvif = ifp;
+ /* TODO: track SOP/EOP bits to assemble a full mbuf
+ out of received fragments. */
+ slot->mbuf->m_hdr.mh_data += bd.bufoff;
+ slot->mbuf->m_hdr.mh_len = bd.pktlen - 4;
+ slot->mbuf->m_pkthdr.len = bd.pktlen - 4;
+ slot->mbuf->m_flags |= M_PKTHDR;
+ slot->mbuf->m_pkthdr.rcvif = ifp;
if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) {
/* check for valid CRC by looking into pkt_err[5:4] */
- if ( (bd.flags & CPDMA_BD_PKT_ERR_MASK) == 0 ) {
- sc->rx_mbuf[i]->m_pkthdr.csum_flags |= CSUM_IP_CHECKED;
- sc->rx_mbuf[i]->m_pkthdr.csum_flags |= CSUM_IP_VALID;
- sc->rx_mbuf[i]->m_pkthdr.csum_data = 0xffff;
+ if ((bd.flags & CPDMA_BD_PKT_ERR_MASK) == 0) {
+ slot->mbuf->m_pkthdr.csum_flags |= CSUM_IP_CHECKED;
+ slot->mbuf->m_pkthdr.csum_flags |= CSUM_IP_VALID;
+ slot->mbuf->m_pkthdr.csum_data = 0xffff;
}
}
/* Handover packet */
CPSW_RX_UNLOCK(sc);
- (*ifp->if_input)(ifp, sc->rx_mbuf[i]);
- sc->rx_mbuf[i] = NULL;
+ (*ifp->if_input)(ifp, slot->mbuf);
+ slot->mbuf = NULL;
CPSW_RX_LOCK(sc);
- /* Allocate new buffer for current descriptor */
- cpsw_new_rxbuf(sc, i, 0);
+ last_slot = slot;
+ STAILQ_REMOVE_HEAD(&sc->rx_active, next);
+ STAILQ_INSERT_TAIL(&sc->rx_avail, slot, next);
+ slot = STAILQ_FIRST(&sc->rx_active);
+ }
+
+ /* Tell hardware last slot we processed. */
+ if (last_slot)
+ cpsw_write_4(CPSW_CPDMA_RX_CP(0),
+ cpsw_cpdma_rxbd_paddr(last_slot->index));
+
+ /* Repopulate hardware RX queue. */
+ cpsw_fill_rx_queue_locked(sc);
+}
+
+static void
+cpsw_fill_rx_queue_locked(struct cpsw_softc *sc)
+{
+ bus_dma_segment_t seg[1];
+ struct cpsw_queue tmpqueue = STAILQ_HEAD_INITIALIZER(tmpqueue);
+ struct cpsw_cpdma_bd bd;
+ struct cpsw_slot *slot, *prev_slot, *next_slot;
+ int error, nsegs;
+
+ /* Try to allocate new mbufs. */
+ STAILQ_FOREACH(slot, &sc->rx_avail, next) {
+ if (slot->mbuf != NULL)
+ continue;
+ slot->mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
+ if (slot->mbuf == NULL) {
+ if_printf(sc->ifp, "Unable to fill RX queue\n");
+ break;
+ }
+ slot->mbuf->m_len = slot->mbuf->m_pkthdr.len = slot->mbuf->m_ext.ext_size;
+ }
- /* we are not at tail so old tail BD should point to new one */
- cpsw_cpdma_write_rxbd_next(sc->rxbd_tail,
- cpsw_cpdma_rxbd_paddr(i));
+ /* Register new mbufs with hardware. */
+ prev_slot = NULL;
+ while (!STAILQ_EMPTY(&sc->rx_avail)) {
+ slot = STAILQ_FIRST(&sc->rx_avail);
+ if (slot->mbuf == NULL)
+ break;
- /* Check if EOQ is reached */
- if (cpsw_cpdma_read_rxbd_flags(sc->rxbd_tail) & CPDMA_BD_EOQ) {
- cpsw_write_4(CPSW_CPDMA_RX_HDP(0), cpsw_cpdma_rxbd_paddr(i));
+ error = bus_dmamap_load_mbuf_sg(sc->mbuf_dtag, slot->dmamap,
+ slot->mbuf, seg, &nsegs, BUS_DMA_NOWAIT);
+
+ KASSERT(nsegs == 1, ("More than one segment (nsegs=%d)", nsegs));
+ KASSERT(error == 0, ("DMA error (error=%d)", error));
+ if (nsegs != 1 || error) {
+ if_printf(sc->ifp,
+ "%s: Can't prep RX buf for DMA (nsegs=%d, error=%d)\n",
+ __func__, nsegs, error);
+ m_freem(slot->mbuf);
+ slot->mbuf = NULL;
+ break;
}
- sc->rxbd_tail = i;
- /* read next descriptor */
- if (++i == CPSW_MAX_RX_BUFFERS)
- i = 0;
- cpsw_cpdma_read_rxbd(i, &bd);
- sc->rxbd_head = i;
+ bus_dmamap_sync(sc->mbuf_dtag, slot->dmamap, BUS_DMASYNC_PREREAD);
+
+ /* Create and submit new rx descriptor*/
+ bd.next = 0;
+ bd.bufptr = seg->ds_addr;
+ bd.buflen = MCLBYTES-1;
+ bd.bufoff = 2; /* make IP hdr aligned with 4 */
+ bd.pktlen = 0;
+ bd.flags = CPDMA_BD_OWNER;
+ cpsw_cpdma_write_rxbd(slot->index, &bd);
+
+ if (prev_slot) {
+ cpsw_cpdma_write_rxbd_next(prev_slot->index,
+ cpsw_cpdma_rxbd_paddr(slot->index));
+ }
+ prev_slot = slot;
+ STAILQ_REMOVE_HEAD(&sc->rx_avail, next);
+ STAILQ_INSERT_TAIL(&tmpqueue, slot, next);
}
- cpsw_write_4(CPSW_CPDMA_CPDMA_EOI_VECTOR, 1);
+ /* Link new entries to hardware RX queue. */
+ prev_slot = STAILQ_LAST(&sc->rx_active, cpsw_slot, next);
+ next_slot = STAILQ_FIRST(&tmpqueue);
+ if (next_slot == NULL) {
+ return;
+ } else if (prev_slot == NULL) {
+ /* Start a fresh RX queue. */
+ cpsw_write_4(CPSW_CPDMA_RX_HDP(0),
+ cpsw_cpdma_rxbd_paddr(next_slot->index));
+ } else {
+ /* Extend an existing RX queue. */
+ cpsw_cpdma_write_rxbd_next(prev_slot->index,
+ cpsw_cpdma_rxbd_paddr(next_slot->index));
+ /* XXX Order matters: Previous write must complete
+ before next read begins in order to avoid an
+ end-of-queue race. I think bus_write and bus_read have
+ sufficient barriers built-in to ensure this. XXX */
+ /* If old RX queue was stopped, restart it. */
+ if (cpsw_cpdma_read_rxbd_flags(prev_slot->index) & CPDMA_BD_EOQ) {
+ cpsw_write_4(CPSW_CPDMA_RX_HDP(0),
+ cpsw_cpdma_rxbd_paddr(next_slot->index));
+ }
+ }
+ STAILQ_CONCAT(&sc->rx_active, &tmpqueue);
}
static void
@@ -902,6 +1120,7 @@ cpsw_intr_tx(void *arg)
struct cpsw_softc *sc = arg;
CPSW_TX_LOCK(sc);
cpsw_intr_tx_locked(arg);
+ cpsw_write_4(CPSW_CPDMA_CPDMA_EOI_VECTOR, 2);
CPSW_TX_UNLOCK(sc);
}
@@ -909,45 +1128,65 @@ static void
cpsw_intr_tx_locked(void *arg)
{
struct cpsw_softc *sc = arg;
- uint32_t flags;
+ struct cpsw_slot *slot, *last_slot = NULL;
+ uint32_t flags, last_flags = 0, retires = 0;
- if(sc->txbd_head == -1)
+ if (!sc->tx_running)
return;
- if(sc->txbd_queue_size<1) {
- /* in some casses interrupt happens even when there is no
- data in transmit queue */
+ slot = STAILQ_FIRST(&sc->tx_active);
+ if (slot == NULL &&
+ cpsw_read_4(CPSW_CPDMA_TX_CP(0)) == 0xfffffffc) {
+ CPSW_DEBUGF(("TX teardown of an empty queue"));
+ cpsw_write_4(CPSW_CPDMA_TX_CP(0), 0xfffffffc);
+ sc->tx_running = 0;
return;
}
- /* Disable watchdog */
- sc->wd_timer = 0;
-
- flags = cpsw_cpdma_read_txbd_flags(sc->txbd_head);
-
- /* After BD is transmitted CPDMA will set OWNER to 0 */
- if (flags & CPDMA_BD_OWNER)
- return;
-
- if(flags & CPDMA_BD_EOQ)
- sc->eoq=1;
-
- /* release dmamap and mbuf */
- bus_dmamap_sync(sc->mbuf_dtag, sc->tx_dmamap[sc->txbd_head],
- BUS_DMASYNC_POSTWRITE);
- bus_dmamap_unload(sc->mbuf_dtag, sc->tx_dmamap[sc->txbd_head]);
- m_freem(sc->tx_mbuf[sc->txbd_head]);
- sc->tx_mbuf[sc->txbd_head] = NULL;
-
- cpsw_write_4(CPSW_CPDMA_TX_CP(0), cpsw_cpdma_txbd_paddr(sc->txbd_head));
-
- if (++sc->txbd_head == CPSW_MAX_TX_BUFFERS)
- sc->txbd_head = 0;
+ /* Pull completed segments off the hardware TX queue. */
+ while (slot != NULL) {
+ flags = cpsw_cpdma_read_txbd_flags(slot->index);
+ if (flags & CPDMA_BD_OWNER)
+ break; /* Hardware is still using this. */
+
+ if (flags & CPDMA_BD_TDOWNCMPLT) {
+ CPSW_DEBUGF(("TX teardown in progress"));
+ cpsw_write_4(CPSW_CPDMA_TX_CP(0), 0xfffffffc);
+ sc->tx_running = 0;
+ return;
+ }
- --sc->txbd_queue_size;
+ /* Release dmamap, free mbuf. */
+ bus_dmamap_sync(sc->mbuf_dtag, slot->dmamap,
+ BUS_DMASYNC_POSTWRITE);
+ bus_dmamap_unload(sc->mbuf_dtag, slot->dmamap);
+ m_freem(slot->mbuf);
+ slot->mbuf = NULL;
+
+ STAILQ_REMOVE_HEAD(&sc->tx_active, next);
+ STAILQ_INSERT_TAIL(&sc->tx_avail, slot, next);
+ sc->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
+
+ last_slot = slot;
+ last_flags = flags;
+ ++retires;
+ slot = STAILQ_FIRST(&sc->tx_active);
+ }
- cpsw_write_4(CPSW_CPDMA_CPDMA_EOI_VECTOR, 2);
- cpsw_write_4(CPSW_CPDMA_CPDMA_EOI_VECTOR, 1);
+ if (retires != 0) {
+ /* Tell hardware the last item we dequeued. */
+ cpsw_write_4(CPSW_CPDMA_TX_CP(0),
+ cpsw_cpdma_txbd_paddr(last_slot->index));
+ /* If transmitter stopped and there's more, restart it. */
+ /* This resolves the race described in tx_start above. */
+ if ((last_flags & CPDMA_BD_EOQ) && (slot != NULL)) {
+ cpsw_write_4(CPSW_CPDMA_TX_HDP(0),
+ cpsw_cpdma_txbd_paddr(slot->index));
+ }
+ sc->tx_retires += retires;
+ sc->tx_queued -= retires;
+ sc->wd_timer = 0;
+ }
}
static void
@@ -955,7 +1194,8 @@ cpsw_intr_misc(void *arg)
{
struct cpsw_softc *sc = arg;
uint32_t stat = cpsw_read_4(CPSW_WR_C_MISC_STAT(0));
- printf("%s: stat=%x\n",__func__,stat);
+
+ CPSW_DEBUGF(("stat=%x", stat));
/* EOI_RX_PULSE */
cpsw_write_4(CPSW_CPDMA_CPDMA_EOI_VECTOR, 3);
}
@@ -972,7 +1212,7 @@ cpsw_tick(void *msc)
/* Check for media type change */
if(sc->cpsw_media_status != sc->mii->mii_media.ifm_media) {
- printf("%s: media type changed (ifm_media=%x)\n",__func__,
+ printf("%s: media type changed (ifm_media=%x)\n", __func__,
sc->mii->mii_media.ifm_media);
cpsw_ifmedia_upd(sc->ifp);
}
@@ -987,9 +1227,7 @@ cpsw_watchdog(struct cpsw_softc *sc)
struct ifnet *ifp;
ifp = sc->ifp;
-
CPSW_GLOBAL_LOCK(sc);
-
if (sc->wd_timer == 0 || --sc->wd_timer) {
CPSW_GLOBAL_UNLOCK(sc);
return;
@@ -997,10 +1235,8 @@ cpsw_watchdog(struct cpsw_softc *sc)
ifp->if_oerrors++;
if_printf(ifp, "watchdog timeout\n");
-
cpsw_stop_locked(sc);
cpsw_init_locked(sc);
-
CPSW_GLOBAL_UNLOCK(sc);
}
@@ -1008,6 +1244,8 @@ static void
cpsw_init(void *arg)
{
struct cpsw_softc *sc = arg;
+
+ CPSW_DEBUGF((""));
CPSW_GLOBAL_LOCK(sc);
cpsw_init_locked(arg);
CPSW_GLOBAL_UNLOCK(sc);
@@ -1021,53 +1259,56 @@ cpsw_init_locked(void *arg)
struct ifnet *ifp;
struct cpsw_softc *sc = arg;
uint8_t broadcast_address[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
- uint32_t next_bdp;
uint32_t i;
+ CPSW_DEBUGF((""));
ifp = sc->ifp;
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
return;
- printf("%s: start\n",__func__);
-
/* Reset writer */
cpsw_write_4(CPSW_WR_SOFT_RESET, 1);
- while(cpsw_read_4(CPSW_WR_SOFT_RESET) & 1);
+ while (cpsw_read_4(CPSW_WR_SOFT_RESET) & 1)
+ ;
/* Reset SS */
cpsw_write_4(CPSW_SS_SOFT_RESET, 1);
- while(cpsw_read_4(CPSW_SS_SOFT_RESET) & 1);
+ while (cpsw_read_4(CPSW_SS_SOFT_RESET) & 1)
+ ;
/* Clear table (30) and enable ALE(31) */
if (once)
- cpsw_write_4(CPSW_ALE_CONTROL, (3 << 30));
+ cpsw_write_4(CPSW_ALE_CONTROL, 3 << 30);
else
- cpsw_write_4(CPSW_ALE_CONTROL, (1 << 31));
+ cpsw_write_4(CPSW_ALE_CONTROL, 1 << 31);
once = 0; // FIXME
/* Reset and init Sliver port 1 and 2 */
- for(i=0;i<2;i++) {
+ for (i = 0; i < 2; i++) {
/* Reset */
cpsw_write_4(CPSW_SL_SOFT_RESET(i), 1);
- while(cpsw_read_4(CPSW_SL_SOFT_RESET(i)) & 1);
+ while (cpsw_read_4(CPSW_SL_SOFT_RESET(i)) & 1)
+ ;
/* Set Slave Mapping */
- cpsw_write_4(CPSW_SL_RX_PRI_MAP(i),0x76543210);
- cpsw_write_4(CPSW_PORT_P_TX_PRI_MAP(i+1),0x33221100);
- cpsw_write_4(CPSW_SL_RX_MAXLEN(i),0x5f2);
+ cpsw_write_4(CPSW_SL_RX_PRI_MAP(i), 0x76543210);
+ cpsw_write_4(CPSW_PORT_P_TX_PRI_MAP(i + 1), 0x33221100);
+ cpsw_write_4(CPSW_SL_RX_MAXLEN(i), 0x5f2);
/* Set MAC Address */
- cpsw_write_4(CPSW_PORT_P_SA_HI(i+1), sc->mac_addr[0] |
- (sc->mac_addr[1] << 8) |
- (sc->mac_addr[2] << 16) |
- (sc->mac_addr[3] << 24));
- cpsw_write_4(CPSW_PORT_P_SA_LO(i+1), sc->mac_addr[4] |
- (sc->mac_addr[5] << 8));
+ cpsw_write_4(CPSW_PORT_P_SA_HI(i + 1),
+ sc->mac_addr[3] << 24 |
+ sc->mac_addr[2] << 16 |
+ sc->mac_addr[1] << 8 |
+ sc->mac_addr[0]);
+ cpsw_write_4(CPSW_PORT_P_SA_LO(i+1),
+ sc->mac_addr[5] << 8 |
+ sc->mac_addr[4]);
/* Set MACCONTROL for ports 0,1: FULLDUPLEX(1), GMII_EN(5),
IFCTL_A(15), IFCTL_B(16) FIXME */
- cpsw_write_4(CPSW_SL_MACCONTROL(i), 1 | (1<<5) | (1<<15));
+ cpsw_write_4(CPSW_SL_MACCONTROL(i), 1 << 15 | 1 << 5 | 1);
/* Set ALE port to forwarding(3) */
- cpsw_write_4(CPSW_ALE_PORTCTL(i+1), 3);
+ cpsw_write_4(CPSW_ALE_PORTCTL(i + 1), 3);
}
/* Set Host Port Mapping */
@@ -1087,37 +1328,22 @@ cpsw_init_locked(void *arg)
/* Reset CPDMA */
cpsw_write_4(CPSW_CPDMA_SOFT_RESET, 1);
- while(cpsw_read_4(CPSW_CPDMA_SOFT_RESET) & 1);
+ while (cpsw_read_4(CPSW_CPDMA_SOFT_RESET) & 1)
+ ;
- for(i = 0; i < 8; i++) {
+ /* Make IP hdr aligned with 4 */
+ cpsw_write_4(CPSW_CPDMA_RX_BUFFER_OFFSET, 2);
+
+ for (i = 0; i < 8; i++) {
cpsw_write_4(CPSW_CPDMA_TX_HDP(i), 0);
cpsw_write_4(CPSW_CPDMA_RX_HDP(i), 0);
cpsw_write_4(CPSW_CPDMA_TX_CP(i), 0);
cpsw_write_4(CPSW_CPDMA_RX_CP(i), 0);
- }
-
- cpsw_write_4(CPSW_CPDMA_RX_FREEBUFFER(0), 0);
-
- /* Initialize RX Buffer Descriptors */
- i = CPSW_MAX_RX_BUFFERS;
- next_bdp = 0;
- while (i--) {
- cpsw_new_rxbuf(sc, i, next_bdp);
- /* Increment number of free RX buffers */
- //cpsw_write_4(CPSW_CPDMA_RX_FREEBUFFER(0), 1);
- next_bdp = cpsw_cpdma_rxbd_paddr(i);
}
- sc->rxbd_head = 0;
- sc->rxbd_tail = CPSW_MAX_RX_BUFFERS-1;
- sc->txbd_head = 0;
- sc->eoq = 1;
- sc->txbd_queue_size = 0;
-
- /* Make IP hdr aligned with 4 */
- cpsw_write_4(CPSW_CPDMA_RX_BUFFER_OFFSET, 2);
- /* Write channel 0 RX HDP */
- cpsw_write_4(CPSW_CPDMA_RX_HDP(0), cpsw_cpdma_rxbd_paddr(0));
+ /* Initialize RX Buffer Descriptors */
+ cpsw_write_4(CPSW_CPDMA_RX_FREEBUFFER(0), 0);
+ cpsw_fill_rx_queue_locked(sc);
/* Clear all interrupt Masks */
cpsw_write_4(CPSW_CPDMA_RX_INTMASK_CLEAR, 0xFFFFFFFF);
@@ -1147,16 +1373,18 @@ cpsw_init_locked(void *arg)
/* Initialze MDIO - ENABLE, PREAMBLE=0, FAULTENB, CLKDIV=0xFF */
/* TODO Calculate MDCLK=CLK/(CLKDIV+1) */
- cpsw_write_4(MDIOCONTROL, (1<<30) | (1<<18) | 0xFF);
+ cpsw_write_4(MDIOCONTROL, 1 << 30 | 1 << 18 | 0xFF);
/* Select MII in GMII_SEL, Internal Delay mode */
//ti_scm_reg_write_4(0x650, 0);
/* Activate network interface */
- sc->ifp->if_drv_flags |= IFF_DRV_RUNNING;
- sc->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
+ sc->rx_running = 1;
+ sc->tx_running = 1;
sc->wd_timer = 0;
callout_reset(&sc->wd_callout, hz, cpsw_tick, sc);
+ sc->ifp->if_drv_flags |= IFF_DRV_RUNNING;
+ sc->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
}
static void
@@ -1174,7 +1402,7 @@ cpsw_ale_write_entry(struct cpsw_softc *sc, uint16_t idx, uint32_t *ale_entry)
cpsw_write_4(CPSW_ALE_TBLW0, ale_entry[0]);
cpsw_write_4(CPSW_ALE_TBLW1, ale_entry[1]);
cpsw_write_4(CPSW_ALE_TBLW2, ale_entry[2]);
- cpsw_write_4(CPSW_ALE_TBLCTL, (idx & 1023) | (1 << 31));
+ cpsw_write_4(CPSW_ALE_TBLCTL, 1 << 31 | (idx & 1023));
}
static int
@@ -1182,7 +1410,7 @@ cpsw_ale_find_entry_by_mac(struct cpsw_softc *sc, uint8_t *mac)
{
int i;
uint32_t ale_entry[3];
- for(i=0; i< CPSW_MAX_ALE_ENTRIES; i++) {
+ for (i = 0; i < CPSW_MAX_ALE_ENTRIES; i++) {
cpsw_ale_read_entry(sc, i, ale_entry);
if ((((ale_entry[1] >> 8) & 0xFF) == mac[0]) &&
(((ale_entry[1] >> 0) & 0xFF) == mac[1]) &&
@@ -1201,7 +1429,7 @@ cpsw_ale_find_free_entry(struct cpsw_softc *sc)
{
int i;
uint32_t ale_entry[3];
- for(i=0; i< CPSW_MAX_ALE_ENTRIES; i++) {
+ for (i = 0; i < CPSW_MAX_ALE_ENTRIES; i++) {
cpsw_ale_read_entry(sc, i, ale_entry);
/* Entry Type[61:60] is 0 for free entry */
if (((ale_entry[1] >> 28) & 3) == 0) {
@@ -1226,11 +1454,11 @@ cpsw_ale_uc_entry_set(struct cpsw_softc *sc, uint8_t port, uint8_t *mac)
return (ENOMEM);
/* Set MAC address */
- ale_entry[0] = mac[2]<<24 | mac[3]<<16 | mac[4]<<8 | mac[5];
- ale_entry[1] = mac[0]<<8 | mac[1];
+ ale_entry[0] = mac[2] << 24 | mac[3] << 16 | mac[4] << 8 | mac[5];
+ ale_entry[1] = mac[0] << 8 | mac[1];
/* Entry type[61:60] is addr entry(1) */
- ale_entry[1] |= 0x10<<24;
+ ale_entry[1] |= 0x10 << 24;
/* Set portmask [67:66] */
ale_entry[2] = (port & 3) << 2;
@@ -1254,11 +1482,11 @@ cpsw_ale_mc_entry_set(struct cpsw_softc *sc, uint8_t portmap, uint8_t *mac)
return (ENOMEM);
/* Set MAC address */
- ale_entry[0] = mac[2]<<24 | mac[3]<<16 | mac[4]<<8 | mac[5];
- ale_entry[1] = mac[0]<<8 | mac[1];
+ ale_entry[0] = mac[2] << 24 | mac[3] << 16 | mac[4] << 8 | mac[5];
+ ale_entry[1] = mac[0] << 8 | mac[1];
/* Entry type[61:60] is addr entry(1), Mcast fwd state[63:62] is fw(3)*/
- ale_entry[1] |= 0xd0<<24;
+ ale_entry[1] |= 0xd0 << 24;
/* Set portmask [68:66] */
ale_entry[2] = (portmap & 7) << 2;
@@ -1273,11 +1501,11 @@ static void
cpsw_ale_dump_table(struct cpsw_softc *sc) {
int i;
uint32_t ale_entry[3];
- for(i=0; i< CPSW_MAX_ALE_ENTRIES; i++) {
+ for (i = 0; i < CPSW_MAX_ALE_ENTRIES; i++) {
cpsw_ale_read_entry(sc, i, ale_entry);
if (ale_entry[0] || ale_entry[1] || ale_entry[2]) {
printf("ALE[%4u] %08x %08x %08x ", i, ale_entry[0],
- ale_entry[1],ale_entry[2]);
+ ale_entry[1], ale_entry[2]);
printf("mac: %02x:%02x:%02x:%02x:%02x:%02x ",
(ale_entry[1] >> 8) & 0xFF,
(ale_entry[1] >> 0) & 0xFF,
@@ -1285,9 +1513,9 @@ cpsw_ale_dump_table(struct cpsw_softc *sc) {
(ale_entry[0] >>16) & 0xFF,
(ale_entry[0] >> 8) & 0xFF,
(ale_entry[0] >> 0) & 0xFF);
- printf( ((ale_entry[1]>>8)&1) ? "mcast " : "ucast ");
- printf("type: %u ", (ale_entry[1]>>28)&3);
- printf("port: %u ", (ale_entry[2]>>2)&7);
+ printf(((ale_entry[1] >> 8) & 1) ? "mcast " : "ucast ");
+ printf("type: %u ", (ale_entry[1] >> 28) & 3);
+ printf("port: %u ", (ale_entry[2] >> 2) & 7);
printf("\n");
}
}
diff --git a/sys/arm/ti/cpsw/if_cpswreg.h b/sys/arm/ti/cpsw/if_cpswreg.h
index a4264d4..dab4f36 100644
--- a/sys/arm/ti/cpsw/if_cpswreg.h
+++ b/sys/arm/ti/cpsw/if_cpswreg.h
@@ -44,7 +44,9 @@
#define CPSW_CPDMA_OFFSET 0x0800
#define CPSW_CPDMA_TX_CONTROL (CPSW_CPDMA_OFFSET + 0x04)
+#define CPSW_CPDMA_TX_TEARDOWN (CPSW_CPDMA_OFFSET + 0x08)
#define CPSW_CPDMA_RX_CONTROL (CPSW_CPDMA_OFFSET + 0x14)
+#define CPSW_CPDMA_RX_TEARDOWN (CPSW_CPDMA_OFFSET + 0x18)
#define CPSW_CPDMA_SOFT_RESET (CPSW_CPDMA_OFFSET + 0x1c)
#define CPSW_CPDMA_DMACONTROL (CPSW_CPDMA_OFFSET + 0x20)
#define CPSW_CPDMA_DMASTATUS (CPSW_CPDMA_OFFSET + 0x24)
@@ -63,10 +65,14 @@
#define CPSW_CPDMA_DMA_INTMASK_SET (CPSW_CPDMA_OFFSET + 0xB8)
#define CPSW_CPDMA_DMA_INTMASK_CLEAR (CPSW_CPDMA_OFFSET + 0xBC)
#define CPSW_CPDMA_RX_FREEBUFFER(p) (CPSW_CPDMA_OFFSET + 0x0e0 + ((p) * 0x04))
-#define CPSW_CPDMA_TX_HDP(p) (CPSW_CPDMA_OFFSET + 0x200 + ((p) * 0x04))
-#define CPSW_CPDMA_RX_HDP(p) (CPSW_CPDMA_OFFSET + 0x220 + ((p) * 0x04))
-#define CPSW_CPDMA_TX_CP(p) (CPSW_CPDMA_OFFSET + 0x240 + ((p) * 0x04))
-#define CPSW_CPDMA_RX_CP(p) (CPSW_CPDMA_OFFSET + 0x260 + ((p) * 0x04))
+
+#define CPSW_STATS_OFFSET 0x0900
+
+#define CPSW_STATERAM_OFFSET 0x0A00
+#define CPSW_CPDMA_TX_HDP(p) (CPSW_STATERAM_OFFSET + 0x00 + ((p) * 0x04))
+#define CPSW_CPDMA_RX_HDP(p) (CPSW_STATERAM_OFFSET + 0x20 + ((p) * 0x04))
+#define CPSW_CPDMA_TX_CP(p) (CPSW_STATERAM_OFFSET + 0x40 + ((p) * 0x04))
+#define CPSW_CPDMA_RX_CP(p) (CPSW_STATERAM_OFFSET + 0x60 + ((p) * 0x04))
#define CPSW_CPTS_OFFSET 0x0C00
diff --git a/sys/arm/ti/cpsw/if_cpswvar.h b/sys/arm/ti/cpsw/if_cpswvar.h
index 836bc2d..3cae489 100644
--- a/sys/arm/ti/cpsw/if_cpswvar.h
+++ b/sys/arm/ti/cpsw/if_cpswvar.h
@@ -39,6 +39,14 @@
#define CPSW_MAX_RX_BUFFERS 128
#define CPSW_MAX_ALE_ENTRIES 1024
+struct cpsw_slot {
+ bus_dmamap_t dmamap;
+ struct mbuf *mbuf;
+ int index;
+ STAILQ_ENTRY(cpsw_slot) next;
+};
+STAILQ_HEAD(cpsw_queue, cpsw_slot);
+
struct cpsw_softc {
struct ifnet *ifp;
phandle_t node;
@@ -57,29 +65,36 @@ struct cpsw_softc {
struct callout wd_callout;
int wd_timer;
- /* buffers */
bus_dma_tag_t mbuf_dtag;
- bus_dmamap_t tx_dmamap[CPSW_MAX_TX_BUFFERS];
- bus_dmamap_t rx_dmamap[CPSW_MAX_RX_BUFFERS];
- struct mbuf *tx_mbuf[CPSW_MAX_TX_BUFFERS];
- struct mbuf *rx_mbuf[CPSW_MAX_RX_BUFFERS];
- int txbd_head;
- int txbd_queue_size;
- int rxbd_head;
- int rxbd_tail;
-
- int tmp;
- int eoq;
- int tc[CPSW_MAX_TX_BUFFERS];
- int tc_unload[CPSW_MAX_TX_BUFFERS];
-
- struct cpsw_softc *phy_sc;
+
+ /* RX buffer tracking */
+ int rx_running;
+ struct cpsw_queue rx_active;
+ struct cpsw_queue rx_avail;
+ struct cpsw_slot _rx_slots[CPSW_MAX_RX_BUFFERS];
+
+ /* TX buffer tracking. */
+ int tx_running;
+ struct cpsw_queue tx_active;
+ struct cpsw_queue tx_avail;
+ struct cpsw_slot _tx_slots[CPSW_MAX_TX_BUFFERS];
+
+ /* Statistics */
+ uint32_t tx_enqueues; /* total TX bufs added to queue */
+ uint32_t tx_retires; /* total TX bufs removed from queue */
+ uint32_t tx_retires_at_wd_reset; /* used for watchdog */
+ /* Note: tx_queued != tx_enqueues - tx_retires
+ At driver reset, packets can be discarded
+ from TX queue without being retired. */
+ int tx_queued; /* Current bufs in TX queue */
+ int tx_max_queued;
};
#define CPDMA_BD_SOP (1<<15)
#define CPDMA_BD_EOP (1<<14)
#define CPDMA_BD_OWNER (1<<13)
#define CPDMA_BD_EOQ (1<<12)
+#define CPDMA_BD_TDOWNCMPLT (1<<11)
#define CPDMA_BD_PKT_ERR_MASK (3<< 4)
struct cpsw_cpdma_bd {
diff --git a/sys/arm/ti/omap4/omap4_l2cache.c b/sys/arm/ti/omap4/omap4_l2cache.c
index b663a1a..67678bf 100644
--- a/sys/arm/ti/omap4/omap4_l2cache.c
+++ b/sys/arm/ti/omap4/omap4_l2cache.c
@@ -27,13 +27,88 @@ __FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/rman.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+
#include <arm/ti/ti_smc.h>
#include <arm/ti/omap4/omap4_smc.h>
+#include <machine/bus.h>
#include <machine/pl310.h>
void
-platform_init_pl310(struct pl310_softc *softc)
+platform_pl310_init(struct pl310_softc *sc)
+{
+ uint32_t aux, prefetch;
+
+ aux = pl310_read4(sc, PL310_AUX_CTRL);
+ prefetch = pl310_read4(sc, PL310_PREFETCH_CTRL);
+
+ if (bootverbose) {
+ device_printf(sc->sc_dev, "Early BRESP response: %s\n",
+ (aux & AUX_CTRL_EARLY_BRESP) ? "enabled" : "disabled");
+ device_printf(sc->sc_dev, "Instruction prefetch: %s\n",
+ (aux & AUX_CTRL_INSTR_PREFETCH) ? "enabled" : "disabled");
+ device_printf(sc->sc_dev, "Data prefetch: %s\n",
+ (aux & AUX_CTRL_DATA_PREFETCH) ? "enabled" : "disabled");
+ device_printf(sc->sc_dev, "Non-secure interrupt control: %s\n",
+ (aux & AUX_CTRL_NS_INT_CTRL) ? "enabled" : "disabled");
+ device_printf(sc->sc_dev, "Non-secure lockdown: %s\n",
+ (aux & AUX_CTRL_NS_LOCKDOWN) ? "enabled" : "disabled");
+ device_printf(sc->sc_dev, "Share override: %s\n",
+ (aux & AUX_CTRL_SHARE_OVERRIDE) ? "enabled" : "disabled");
+
+ device_printf(sc->sc_dev, "Double linefil: %s\n",
+ (prefetch & PREFETCH_CTRL_DL) ? "enabled" : "disabled");
+ device_printf(sc->sc_dev, "Instruction prefetch: %s\n",
+ (prefetch & PREFETCH_CTRL_INSTR_PREFETCH) ? "enabled" : "disabled");
+ device_printf(sc->sc_dev, "Data prefetch: %s\n",
+ (prefetch & PREFETCH_CTRL_DATA_PREFETCH) ? "enabled" : "disabled");
+ device_printf(sc->sc_dev, "Double linefill on WRAP request: %s\n",
+ (prefetch & PREFETCH_CTRL_DL_ON_WRAP) ? "enabled" : "disabled");
+ device_printf(sc->sc_dev, "Prefetch drop: %s\n",
+ (prefetch & PREFETCH_CTRL_PREFETCH_DROP) ? "enabled" : "disabled");
+ device_printf(sc->sc_dev, "Incr double Linefill: %s\n",
+ (prefetch & PREFETCH_CTRL_INCR_DL) ? "enabled" : "disabled");
+ device_printf(sc->sc_dev, "Not same ID on exclusive sequence: %s\n",
+ (prefetch & PREFETCH_CTRL_NOTSAMEID) ? "enabled" : "disabled");
+ device_printf(sc->sc_dev, "Prefetch offset: %d\n",
+ (prefetch & PREFETCH_CTRL_OFFSET_MASK));
+ }
+
+ /*
+ * Disable instruction prefetch
+ */
+ prefetch &= ~PREFETCH_CTRL_INSTR_PREFETCH;
+ aux &= ~AUX_CTRL_INSTR_PREFETCH;
+
+ // prefetch &= ~PREFETCH_CTRL_DATA_PREFETCH;
+ // aux &= ~AUX_CTRL_DATA_PREFETCH;
+
+ /*
+ * Make sure data prefetch is on
+ */
+ prefetch |= PREFETCH_CTRL_DATA_PREFETCH;
+ aux |= AUX_CTRL_DATA_PREFETCH;
+
+ /*
+ * TODO: add tunable for prefetch offset
+ * and experiment with performance
+ */
+
+ ti_smc0(aux, 0, WRITE_AUXCTRL_REG);
+ ti_smc0(prefetch, 0, WRITE_PREFETCH_CTRL_REG);
+}
+
+void
+platform_pl310_write_ctrl(struct pl310_softc *sc, uint32_t val)
{
- ti_smc0(1, 0, L2CACHE_ENABLE_L2);
+ ti_smc0(val, 0, L2CACHE_WRITE_CTRL_REG);
}
+void
+platform_pl310_write_debug(struct pl310_softc *sc, uint32_t val)
+{
+ ti_smc0(val, 0, L2CACHE_WRITE_DEBUG_REG);
+}
diff --git a/sys/arm/ti/omap4/omap4_smc.h b/sys/arm/ti/omap4/omap4_smc.h
index 11ff853..5fd14aa 100644
--- a/sys/arm/ti/omap4/omap4_smc.h
+++ b/sys/arm/ti/omap4/omap4_smc.h
@@ -31,7 +31,7 @@
/* Define the various function IDs used by the OMAP4 */
#define L2CACHE_WRITE_DEBUG_REG 0x100
#define L2CACHE_CLEAN_INV_RANG 0x101
-#define L2CACHE_ENABLE_L2 0x102
+#define L2CACHE_WRITE_CTRL_REG 0x102
#define READ_AUX_CORE_REGS 0x103
#define MODIFY_AUX_CORE_0 0x104
#define WRITE_AUX_CORE_1 0x105
diff --git a/sys/arm/versatile/bus_space.c b/sys/arm/versatile/bus_space.c
new file mode 100644
index 0000000..4cce820
--- /dev/null
+++ b/sys/arm/versatile/bus_space.c
@@ -0,0 +1,113 @@
+/*-
+ * Copyright (C) 2012 FreeBSD Foundation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of MARVELL nor the names of contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/kernel.h>
+#include <sys/malloc.h>
+
+#include <machine/bus.h>
+
+/* Prototypes for all the bus_space structure functions */
+bs_protos(generic);
+bs_protos(generic_armv4);
+
+struct bus_space _base_tag = {
+ /* cookie */
+ .bs_cookie = (void *) 0,
+
+ /* mapping/unmapping */
+ .bs_map = generic_bs_map,
+ .bs_unmap = generic_bs_unmap,
+ .bs_subregion = generic_bs_subregion,
+
+ /* allocation/deallocation */
+ .bs_alloc = generic_bs_alloc,
+ .bs_free = generic_bs_free,
+
+ /* barrier */
+ .bs_barrier = generic_bs_barrier,
+
+ /* read (single) */
+ .bs_r_1 = generic_bs_r_1,
+ .bs_r_2 = generic_armv4_bs_r_2,
+ .bs_r_4 = generic_bs_r_4,
+ .bs_r_8 = NULL,
+
+ /* read multiple */
+ .bs_rm_1 = generic_bs_rm_1,
+ .bs_rm_2 = generic_armv4_bs_rm_2,
+ .bs_rm_4 = generic_bs_rm_4,
+ .bs_rm_8 = NULL,
+
+ /* read region */
+ .bs_rr_1 = generic_bs_rr_1,
+ .bs_rr_2 = generic_armv4_bs_rr_2,
+ .bs_rr_4 = generic_bs_rr_4,
+ .bs_rr_8 = NULL,
+
+ /* write (single) */
+ .bs_w_1 = generic_bs_w_1,
+ .bs_w_2 = generic_armv4_bs_w_2,
+ .bs_w_4 = generic_bs_w_4,
+ .bs_w_8 = NULL,
+
+ /* write multiple */
+ .bs_wm_1 = generic_bs_wm_1,
+ .bs_wm_2 = generic_armv4_bs_wm_2,
+ .bs_wm_4 = generic_bs_wm_4,
+ .bs_wm_8 = NULL,
+
+ /* write region */
+ .bs_wr_1 = generic_bs_wr_1,
+ .bs_wr_2 = generic_armv4_bs_wr_2,
+ .bs_wr_4 = generic_bs_wr_4,
+ .bs_wr_8 = NULL,
+
+ /* set multiple */
+ /* XXX not implemented */
+
+ /* set region */
+ .bs_sr_1 = NULL,
+ .bs_sr_2 = generic_armv4_bs_sr_2,
+ .bs_sr_4 = generic_bs_sr_4,
+ .bs_sr_8 = NULL,
+
+ /* copy */
+ .bs_c_1 = NULL,
+ .bs_c_2 = generic_armv4_bs_c_2,
+ .bs_c_4 = NULL,
+ .bs_c_8 = NULL,
+};
+
+bus_space_tag_t fdtbus_bs_tag = &_base_tag;
diff --git a/sys/arm/versatile/common.c b/sys/arm/versatile/common.c
new file mode 100644
index 0000000..766db9d
--- /dev/null
+++ b/sys/arm/versatile/common.c
@@ -0,0 +1,75 @@
+/*-
+ * Copyright (C) 2008-2011 MARVELL INTERNATIONAL LTD.
+ * All rights reserved.
+ *
+ * Developed by Semihalf.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of MARVELL nor the names of contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "opt_global.h"
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/kernel.h>
+#include <sys/malloc.h>
+#include <sys/kdb.h>
+#include <sys/reboot.h>
+
+#include <dev/fdt/fdt_common.h>
+#include <dev/ofw/openfirm.h>
+
+#include <machine/bus.h>
+#include <machine/fdt.h>
+#include <machine/vmparam.h>
+
+struct fdt_fixup_entry fdt_fixup_table[] = {
+ { NULL, NULL }
+};
+
+static int
+fdt_intc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
+ int *pol)
+{
+
+ if (!fdt_is_compatible(node, "arm,versatile-vic"))
+ return (ENXIO);
+
+ *interrupt = fdt32_to_cpu(intr[0]);
+ *trig = INTR_TRIGGER_CONFORM;
+ *pol = INTR_POLARITY_CONFORM;
+
+ return (0);
+}
+
+
+fdt_pic_decode_t fdt_pic_table[] = {
+ &fdt_intc_decode_ic,
+ NULL
+};
diff --git a/sys/arm/versatile/files.versatile b/sys/arm/versatile/files.versatile
new file mode 100644
index 0000000..702a236
--- /dev/null
+++ b/sys/arm/versatile/files.versatile
@@ -0,0 +1,23 @@
+# $FreeBSD$
+
+arm/arm/bus_space_asm_generic.S standard
+arm/arm/bus_space_generic.c standard
+arm/arm/cpufunc_asm_arm11.S standard
+arm/arm/cpufunc_asm_arm11x6.S standard
+arm/arm/cpufunc_asm_armv5.S standard
+arm/arm/cpufunc_asm_armv6.S standard
+arm/arm/irq_dispatch.S standard
+
+arm/versatile/bus_space.c standard
+arm/versatile/common.c standard
+arm/versatile/pl050.c optional sc
+arm/versatile/sp804.c standard
+arm/versatile/versatile_machdep.c standard
+arm/versatile/versatile_clcd.c optional sc
+arm/versatile/versatile_pci.c optional pci
+arm/versatile/versatile_pci_bus_space.c optional pci
+arm/versatile/versatile_sic.c standard
+arm/versatile/versatile_timer.c standard
+arm/versatile/if_smc_fdt.c optional smc
+
+kern/kern_clocksource.c standard
diff --git a/sys/arm/versatile/if_smc_fdt.c b/sys/arm/versatile/if_smc_fdt.c
new file mode 100644
index 0000000..f61f18a
--- /dev/null
+++ b/sys/arm/versatile/if_smc_fdt.c
@@ -0,0 +1,131 @@
+/*-
+ * Copyright (c) 2008 Benno Rice
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/kernel.h>
+#include <sys/socket.h>
+
+#include <sys/module.h>
+#include <sys/bus.h>
+
+#include <machine/bus.h>
+#include <machine/resource.h>
+
+#include <net/ethernet.h>
+#include <net/if.h>
+#include <net/if_arp.h>
+#include <net/if_media.h>
+
+#include <dev/smc/if_smcvar.h>
+
+#include <dev/mii/mii.h>
+#include <dev/mii/miivar.h>
+
+#include <dev/fdt/fdt_common.h>
+#include <dev/ofw/openfirm.h>
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
+#include "miibus_if.h"
+
+static int smc_fdt_probe(device_t);
+static int smc_fdt_attach(device_t);
+static int smc_fdt_detach(device_t);
+
+static int
+smc_fdt_probe(device_t dev)
+{
+ struct smc_softc *sc;
+
+ if (ofw_bus_is_compatible(dev, "smsc,lan91c111")) {
+ sc = device_get_softc(dev);
+ sc->smc_usemem = 1;
+
+ if (smc_probe(dev) != 0) {
+ return (ENXIO);
+ }
+
+ return (0);
+ }
+
+ return (ENXIO);
+}
+
+static int
+smc_fdt_attach(device_t dev)
+{
+ int err;
+ struct smc_softc *sc;
+
+ sc = device_get_softc(dev);
+
+ err = smc_attach(dev);
+ if (err) {
+ return (err);
+ }
+
+ return (0);
+}
+
+static int
+smc_fdt_detach(device_t dev)
+{
+
+ smc_detach(dev);
+
+ return (0);
+}
+
+static device_method_t smc_fdt_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, smc_fdt_probe),
+ DEVMETHOD(device_attach, smc_fdt_attach),
+ DEVMETHOD(device_detach, smc_fdt_detach),
+
+ /* MII interface */
+ DEVMETHOD(miibus_readreg, smc_miibus_readreg),
+ DEVMETHOD(miibus_writereg, smc_miibus_writereg),
+ DEVMETHOD(miibus_statchg, smc_miibus_statchg),
+
+ { 0, 0 }
+};
+
+static driver_t smc_fdt_driver = {
+ "smc",
+ smc_fdt_methods,
+ sizeof(struct smc_softc),
+};
+
+extern devclass_t smc_devclass;
+
+DRIVER_MODULE(smc, simplebus, smc_fdt_driver, smc_devclass, 0, 0);
+DRIVER_MODULE(miibus, smc, miibus_driver, miibus_devclass, 0, 0);
+MODULE_DEPEND(smc, fdt, 1, 1, 1);
+MODULE_DEPEND(smc, ether, 1, 1, 1);
+MODULE_DEPEND(smc, miibus, 1, 1, 1);
diff --git a/sys/arm/versatile/pl050.c b/sys/arm/versatile/pl050.c
new file mode 100644
index 0000000..f6662b1
--- /dev/null
+++ b/sys/arm/versatile/pl050.c
@@ -0,0 +1,713 @@
+/*
+ * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org>
+ * All rights reserved.
+ *
+ * Based on dev/usb/input/ukbd.c
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <sys/malloc.h>
+#include <sys/rman.h>
+#include <sys/proc.h>
+#include <sys/sched.h>
+#include <sys/kdb.h>
+
+#include <machine/bus.h>
+#include <machine/cpu.h>
+#include <machine/frame.h>
+#include <machine/intr.h>
+
+#include <dev/fdt/fdt_common.h>
+#include <dev/ofw/openfirm.h>
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
+#include <sys/ioccom.h>
+#include <sys/filio.h>
+#include <sys/tty.h>
+#include <sys/kbio.h>
+
+#include <dev/kbd/kbdreg.h>
+
+#include <machine/bus.h>
+#include <machine/fdt.h>
+
+#include <dev/kbd/kbdtables.h>
+
+#define KMI_LOCK() mtx_lock(&Giant)
+#define KMI_UNLOCK() mtx_unlock(&Giant)
+
+#ifdef INVARIANTS
+/*
+ * Assert that the lock is held in all contexts
+ * where the code can be executed.
+ */
+#define KMI_LOCK_ASSERT() mtx_assert(&Giant, MA_OWNED)
+/*
+ * Assert that the lock is held in the contexts
+ * where it really has to be so.
+ */
+#define KMI_CTX_LOCK_ASSERT() \
+ do { \
+ if (!kdb_active && panicstr == NULL) \
+ mtx_assert(&Giant, MA_OWNED); \
+ } while (0)
+#else
+#define KMI_LOCK_ASSERT() (void)0
+#define KMI_CTX_LOCK_ASSERT() (void)0
+#endif
+
+#define KMICR 0x00
+#define KMICR_TYPE_NONPS2 (1 << 5)
+#define KMICR_RXINTREN (1 << 4)
+#define KMICR_TXINTREN (1 << 3)
+#define KMICR_EN (1 << 2)
+#define KMICR_FKMID (1 << 1)
+#define KMICR_FKMIC (1 << 0)
+#define KMISTAT 0x04
+#define KMISTAT_TXEMPTY (1 << 6)
+#define KMISTAT_TXBUSY (1 << 5)
+#define KMISTAT_RXFULL (1 << 4)
+#define KMISTAT_RXBUSY (1 << 3)
+#define KMISTAT_RXPARITY (1 << 2)
+#define KMISTAT_KMIC (1 << 1)
+#define KMISTAT_KMID (1 << 0)
+#define KMIDATA 0x08
+#define KMICLKDIV 0x0C
+#define KMIIR 0x10
+#define KMIIR_TXINTR (1 << 1)
+#define KMIIR_RXINTR (1 << 0)
+
+#define KMI_DRIVER_NAME "kmi"
+#define KMI_NFKEY (sizeof(fkey_tab)/sizeof(fkey_tab[0])) /* units */
+
+struct kmi_softc {
+ keyboard_t sc_kbd;
+ keymap_t sc_keymap;
+ accentmap_t sc_accmap;
+ fkeytab_t sc_fkeymap[KMI_NFKEY];
+
+ struct resource* sc_mem_res;
+ struct resource* sc_irq_res;
+ void* sc_intr_hl;
+
+ int sc_mode; /* input mode (K_XLATE,K_RAW,K_CODE) */
+ int sc_state; /* shift/lock key state */
+ int sc_accents; /* accent key index (> 0) */
+ uint32_t sc_flags; /* flags */
+#define KMI_FLAG_COMPOSE 0x00000001
+#define KMI_FLAG_POLLING 0x00000002
+
+ struct thread *sc_poll_thread;
+};
+
+/* Read/Write macros for Timer used as timecounter */
+#define pl050_kmi_read_4(sc, reg) \
+ bus_read_4((sc)->sc_mem_res, (reg))
+
+#define pl050_kmi_write_4(sc, reg, val) \
+ bus_write_4((sc)->sc_mem_res, (reg), (val))
+
+/* prototypes */
+static void kmi_set_leds(struct kmi_softc *, uint8_t);
+static int kmi_set_typematic(keyboard_t *, int);
+static uint32_t kmi_read_char(keyboard_t *, int);
+static void kmi_clear_state(keyboard_t *);
+static int kmi_ioctl(keyboard_t *, u_long, caddr_t);
+static int kmi_enable(keyboard_t *);
+static int kmi_disable(keyboard_t *);
+
+/* early keyboard probe, not supported */
+static int
+kmi_configure(int flags)
+{
+ return (0);
+}
+
+/* detect a keyboard, not used */
+static int
+kmi_probe(int unit, void *arg, int flags)
+{
+ return (ENXIO);
+}
+
+/* reset and initialize the device, not used */
+static int
+kmi_init(int unit, keyboard_t **kbdp, void *arg, int flags)
+{
+ return (ENXIO);
+}
+
+/* test the interface to the device, not used */
+static int
+kmi_test_if(keyboard_t *kbd)
+{
+ return (0);
+}
+
+/* finish using this keyboard, not used */
+static int
+kmi_term(keyboard_t *kbd)
+{
+ return (ENXIO);
+}
+
+/* keyboard interrupt routine, not used */
+static int
+kmi_intr(keyboard_t *kbd, void *arg)
+{
+
+ return (0);
+}
+
+/* lock the access to the keyboard, not used */
+static int
+kmi_lock(keyboard_t *kbd, int lock)
+{
+ return (1);
+}
+
+/*
+ * Enable the access to the device; until this function is called,
+ * the client cannot read from the keyboard.
+ */
+static int
+kmi_enable(keyboard_t *kbd)
+{
+
+ KMI_LOCK();
+ KBD_ACTIVATE(kbd);
+ KMI_UNLOCK();
+
+ return (0);
+}
+
+/* disallow the access to the device */
+static int
+kmi_disable(keyboard_t *kbd)
+{
+
+ KMI_LOCK();
+ KBD_DEACTIVATE(kbd);
+ KMI_UNLOCK();
+
+ return (0);
+}
+
+/* check if data is waiting */
+static int
+kmi_check(keyboard_t *kbd)
+{
+ struct kmi_softc *sc = kbd->kb_data;
+ uint32_t reg;
+
+ KMI_CTX_LOCK_ASSERT();
+
+ if (!KBD_IS_ACTIVE(kbd))
+ return (0);
+
+ reg = pl050_kmi_read_4(sc, KMIIR);
+ return (reg & KMIIR_RXINTR);
+}
+
+/* check if char is waiting */
+static int
+kmi_check_char_locked(keyboard_t *kbd)
+{
+ KMI_CTX_LOCK_ASSERT();
+
+ if (!KBD_IS_ACTIVE(kbd))
+ return (0);
+
+ return (kmi_check(kbd));
+}
+
+static int
+kmi_check_char(keyboard_t *kbd)
+{
+ int result;
+
+ KMI_LOCK();
+ result = kmi_check_char_locked(kbd);
+ KMI_UNLOCK();
+
+ return (result);
+}
+
+/* read one byte from the keyboard if it's allowed */
+/* Currently unused. */
+static int
+kmi_read(keyboard_t *kbd, int wait)
+{
+ KMI_CTX_LOCK_ASSERT();
+
+ if (!KBD_IS_ACTIVE(kbd))
+ return (-1);
+
+ ++(kbd->kb_count);
+ printf("Implement ME: %s\n", __func__);
+ return (0);
+}
+
+/* read char from the keyboard */
+static uint32_t
+kmi_read_char_locked(keyboard_t *kbd, int wait)
+{
+ struct kmi_softc *sc = kbd->kb_data;
+ uint32_t reg, data;
+
+ KMI_CTX_LOCK_ASSERT();
+
+ if (!KBD_IS_ACTIVE(kbd))
+ return (NOKEY);
+
+ reg = pl050_kmi_read_4(sc, KMIIR);
+ if (reg & KMIIR_RXINTR) {
+ data = pl050_kmi_read_4(sc, KMIDATA);
+ return (data);
+ }
+
+ ++kbd->kb_count;
+ return (NOKEY);
+}
+
+/* Currently wait is always false. */
+static uint32_t
+kmi_read_char(keyboard_t *kbd, int wait)
+{
+ uint32_t keycode;
+
+ KMI_LOCK();
+ keycode = kmi_read_char_locked(kbd, wait);
+ KMI_UNLOCK();
+
+ return (keycode);
+}
+
+/* some useful control functions */
+static int
+kmi_ioctl_locked(keyboard_t *kbd, u_long cmd, caddr_t arg)
+{
+ struct kmi_softc *sc = kbd->kb_data;
+ int i;
+#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \
+ defined(COMPAT_FREEBSD4) || defined(COMPAT_43)
+ int ival;
+
+#endif
+
+ KMI_LOCK_ASSERT();
+
+ switch (cmd) {
+ case KDGKBMODE: /* get keyboard mode */
+ *(int *)arg = sc->sc_mode;
+ break;
+#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \
+ defined(COMPAT_FREEBSD4) || defined(COMPAT_43)
+ case _IO('K', 7):
+ ival = IOCPARM_IVAL(arg);
+ arg = (caddr_t)&ival;
+ /* FALLTHROUGH */
+#endif
+ case KDSKBMODE: /* set keyboard mode */
+ switch (*(int *)arg) {
+ case K_XLATE:
+ if (sc->sc_mode != K_XLATE) {
+ /* make lock key state and LED state match */
+ sc->sc_state &= ~LOCK_MASK;
+ sc->sc_state |= KBD_LED_VAL(kbd);
+ }
+ /* FALLTHROUGH */
+ case K_RAW:
+ case K_CODE:
+ if (sc->sc_mode != *(int *)arg) {
+ if ((sc->sc_flags & KMI_FLAG_POLLING) == 0)
+ kmi_clear_state(kbd);
+ sc->sc_mode = *(int *)arg;
+ }
+ break;
+ default:
+ return (EINVAL);
+ }
+ break;
+
+ case KDGETLED: /* get keyboard LED */
+ *(int *)arg = KBD_LED_VAL(kbd);
+ break;
+#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \
+ defined(COMPAT_FREEBSD4) || defined(COMPAT_43)
+ case _IO('K', 66):
+ ival = IOCPARM_IVAL(arg);
+ arg = (caddr_t)&ival;
+ /* FALLTHROUGH */
+#endif
+ case KDSETLED: /* set keyboard LED */
+ /* NOTE: lock key state in "sc_state" won't be changed */
+ if (*(int *)arg & ~LOCK_MASK)
+ return (EINVAL);
+
+ i = *(int *)arg;
+
+ /* replace CAPS LED with ALTGR LED for ALTGR keyboards */
+ if (sc->sc_mode == K_XLATE &&
+ kbd->kb_keymap->n_keys > ALTGR_OFFSET) {
+ if (i & ALKED)
+ i |= CLKED;
+ else
+ i &= ~CLKED;
+ }
+ if (KBD_HAS_DEVICE(kbd))
+ kmi_set_leds(sc, i);
+
+ KBD_LED_VAL(kbd) = *(int *)arg;
+ break;
+ case KDGKBSTATE: /* get lock key state */
+ *(int *)arg = sc->sc_state & LOCK_MASK;
+ break;
+#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \
+ defined(COMPAT_FREEBSD4) || defined(COMPAT_43)
+ case _IO('K', 20):
+ ival = IOCPARM_IVAL(arg);
+ arg = (caddr_t)&ival;
+ /* FALLTHROUGH */
+#endif
+ case KDSKBSTATE: /* set lock key state */
+ if (*(int *)arg & ~LOCK_MASK) {
+ return (EINVAL);
+ }
+ sc->sc_state &= ~LOCK_MASK;
+ sc->sc_state |= *(int *)arg;
+
+ /* set LEDs and quit */
+ return (kmi_ioctl(kbd, KDSETLED, arg));
+
+ case KDSETREPEAT: /* set keyboard repeat rate (new
+ * interface) */
+ if (!KBD_HAS_DEVICE(kbd)) {
+ return (0);
+ }
+ if (((int *)arg)[1] < 0) {
+ return (EINVAL);
+ }
+ if (((int *)arg)[0] < 0) {
+ return (EINVAL);
+ }
+ if (((int *)arg)[0] < 200) /* fastest possible value */
+ kbd->kb_delay1 = 200;
+ else
+ kbd->kb_delay1 = ((int *)arg)[0];
+ kbd->kb_delay2 = ((int *)arg)[1];
+ return (0);
+
+#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \
+ defined(COMPAT_FREEBSD4) || defined(COMPAT_43)
+ case _IO('K', 67):
+ ival = IOCPARM_IVAL(arg);
+ arg = (caddr_t)&ival;
+ /* FALLTHROUGH */
+#endif
+ case KDSETRAD: /* set keyboard repeat rate (old
+ * interface) */
+ return (kmi_set_typematic(kbd, *(int *)arg));
+
+ case PIO_KEYMAP: /* set keyboard translation table */
+ case OPIO_KEYMAP: /* set keyboard translation table
+ * (compat) */
+ case PIO_KEYMAPENT: /* set keyboard translation table
+ * entry */
+ case PIO_DEADKEYMAP: /* set accent key translation table */
+ sc->sc_accents = 0;
+ /* FALLTHROUGH */
+ default:
+ return (genkbd_commonioctl(kbd, cmd, arg));
+ }
+
+ return (0);
+}
+
+static int
+kmi_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg)
+{
+ int result;
+
+ /*
+ * XXX KDGKBSTATE, KDSKBSTATE and KDSETLED can be called from any
+ * context where printf(9) can be called, which among other things
+ * includes interrupt filters and threads with any kinds of locks
+ * already held. For this reason it would be dangerous to acquire
+ * the Giant here unconditionally. On the other hand we have to
+ * have it to handle the ioctl.
+ * So we make our best effort to auto-detect whether we can grab
+ * the Giant or not. Blame syscons(4) for this.
+ */
+ switch (cmd) {
+ case KDGKBSTATE:
+ case KDSKBSTATE:
+ case KDSETLED:
+ if (!mtx_owned(&Giant) && !SCHEDULER_STOPPED())
+ return (EDEADLK); /* best I could come up with */
+ /* FALLTHROUGH */
+ default:
+ KMI_LOCK();
+ result = kmi_ioctl_locked(kbd, cmd, arg);
+ KMI_UNLOCK();
+ return (result);
+ }
+}
+
+
+/* clear the internal state of the keyboard */
+static void
+kmi_clear_state(keyboard_t *kbd)
+{
+ struct kmi_softc *sc = kbd->kb_data;
+
+ KMI_CTX_LOCK_ASSERT();
+
+ sc->sc_flags &= ~(KMI_FLAG_COMPOSE | KMI_FLAG_POLLING);
+ sc->sc_state &= LOCK_MASK; /* preserve locking key state */
+ sc->sc_accents = 0;
+}
+
+/* save the internal state, not used */
+static int
+kmi_get_state(keyboard_t *kbd, void *buf, size_t len)
+{
+ return (len == 0) ? 1 : -1;
+}
+
+/* set the internal state, not used */
+static int
+kmi_set_state(keyboard_t *kbd, void *buf, size_t len)
+{
+ return (EINVAL);
+}
+
+static int
+kmi_poll(keyboard_t *kbd, int on)
+{
+ struct kmi_softc *sc = kbd->kb_data;
+
+ KMI_LOCK();
+ if (on) {
+ sc->sc_flags |= KMI_FLAG_POLLING;
+ sc->sc_poll_thread = curthread;
+ } else {
+ sc->sc_flags &= ~KMI_FLAG_POLLING;
+ }
+ KMI_UNLOCK();
+
+ return (0);
+}
+
+/* local functions */
+
+static void
+kmi_set_leds(struct kmi_softc *sc, uint8_t leds)
+{
+
+ KMI_LOCK_ASSERT();
+
+ /* start transfer, if not already started */
+ printf("Implement me: %s\n", __func__);
+}
+
+static int
+kmi_set_typematic(keyboard_t *kbd, int code)
+{
+ static const int delays[] = {250, 500, 750, 1000};
+ static const int rates[] = {34, 38, 42, 46, 50, 55, 59, 63,
+ 68, 76, 84, 92, 100, 110, 118, 126,
+ 136, 152, 168, 184, 200, 220, 236, 252,
+ 272, 304, 336, 368, 400, 440, 472, 504};
+
+ if (code & ~0x7f) {
+ return (EINVAL);
+ }
+ kbd->kb_delay1 = delays[(code >> 5) & 3];
+ kbd->kb_delay2 = rates[code & 0x1f];
+ return (0);
+}
+
+static keyboard_switch_t kmisw = {
+ .probe = &kmi_probe,
+ .init = &kmi_init,
+ .term = &kmi_term,
+ .intr = &kmi_intr,
+ .test_if = &kmi_test_if,
+ .enable = &kmi_enable,
+ .disable = &kmi_disable,
+ .read = &kmi_read,
+ .check = &kmi_check,
+ .read_char = &kmi_read_char,
+ .check_char = &kmi_check_char,
+ .ioctl = &kmi_ioctl,
+ .lock = &kmi_lock,
+ .clear_state = &kmi_clear_state,
+ .get_state = &kmi_get_state,
+ .set_state = &kmi_set_state,
+ .get_fkeystr = &genkbd_get_fkeystr,
+ .poll = &kmi_poll,
+ .diag = &genkbd_diag,
+};
+
+KEYBOARD_DRIVER(kmi, kmisw, kmi_configure);
+
+static void
+pl050_kmi_intr(void *arg)
+{
+ struct kmi_softc *sc = arg;
+ uint32_t c;
+
+ KMI_CTX_LOCK_ASSERT();
+
+ if ((sc->sc_flags & KMI_FLAG_POLLING) != 0)
+ return;
+
+ if (KBD_IS_ACTIVE(&sc->sc_kbd) &&
+ KBD_IS_BUSY(&sc->sc_kbd)) {
+ /* let the callback function process the input */
+ (sc->sc_kbd.kb_callback.kc_func) (&sc->sc_kbd, KBDIO_KEYINPUT,
+ sc->sc_kbd.kb_callback.kc_arg);
+ } else {
+ /* read and discard the input, no one is waiting for it */
+ do {
+ c = kmi_read_char_locked(&sc->sc_kbd, 0);
+ } while (c != NOKEY);
+ }
+
+}
+
+static int
+pl050_kmi_probe(device_t dev)
+{
+
+ if (ofw_bus_is_compatible(dev, "arm,pl050")) {
+ device_set_desc(dev, "PL050 Keyboard/Mouse Interface");
+ return (BUS_PROBE_DEFAULT);
+ }
+
+ return (ENXIO);
+}
+
+static int
+pl050_kmi_attach(device_t dev)
+{
+ struct kmi_softc *sc = device_get_softc(dev);
+ keyboard_t *kbd;
+ int rid;
+ int i;
+
+ kbd = &sc->sc_kbd;
+ rid = 0;
+
+ sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE);
+ if (sc->sc_mem_res == NULL) {
+ device_printf(dev, "could not allocate memory resource\n");
+ return (ENXIO);
+ }
+
+ /* Request the IRQ resources */
+ sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE);
+ if (sc->sc_irq_res == NULL) {
+ device_printf(dev, "Error: could not allocate irq resources\n");
+ return (ENXIO);
+ }
+
+ /* Setup and enable the timer */
+ if (bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_CLK,
+ NULL, pl050_kmi_intr, sc,
+ &sc->sc_intr_hl) != 0) {
+ bus_release_resource(dev, SYS_RES_IRQ, rid,
+ sc->sc_irq_res);
+ device_printf(dev, "Unable to setup the clock irq handler.\n");
+ return (ENXIO);
+ }
+
+ /* TODO: clock & divisor */
+
+ pl050_kmi_write_4(sc, KMICR, KMICR_EN | KMICR_RXINTREN);
+
+ kbd_init_struct(kbd, KMI_DRIVER_NAME, KB_OTHER,
+ device_get_unit(dev), 0, 0, 0);
+ kbd->kb_data = (void *)sc;
+
+ sc->sc_keymap = key_map;
+ sc->sc_accmap = accent_map;
+ for (i = 0; i < KMI_NFKEY; i++) {
+ sc->sc_fkeymap[i] = fkey_tab[i];
+ }
+
+ kbd_set_maps(kbd, &sc->sc_keymap, &sc->sc_accmap,
+ sc->sc_fkeymap, KMI_NFKEY);
+
+ KBD_FOUND_DEVICE(kbd);
+ kmi_clear_state(kbd);
+ KBD_PROBE_DONE(kbd);
+
+ KBD_INIT_DONE(kbd);
+
+ if (kbd_register(kbd) < 0) {
+ goto detach;
+ }
+ KBD_CONFIG_DONE(kbd);
+
+#ifdef KBD_INSTALL_CDEV
+ if (kbd_attach(kbd)) {
+ goto detach;
+ }
+#endif
+
+ if (bootverbose) {
+ genkbd_diag(kbd, bootverbose);
+ }
+ return (0);
+
+detach:
+ return (ENXIO);
+
+}
+
+static device_method_t pl050_kmi_methods[] = {
+ DEVMETHOD(device_probe, pl050_kmi_probe),
+ DEVMETHOD(device_attach, pl050_kmi_attach),
+ { 0, 0 }
+};
+
+static driver_t pl050_kmi_driver = {
+ "kmi",
+ pl050_kmi_methods,
+ sizeof(struct kmi_softc),
+};
+
+static devclass_t pl050_kmi_devclass;
+
+DRIVER_MODULE(pl050_kmi, simplebus, pl050_kmi_driver, pl050_kmi_devclass, 0, 0);
diff --git a/sys/arm/versatile/sp804.c b/sys/arm/versatile/sp804.c
new file mode 100644
index 0000000..82a1889
--- /dev/null
+++ b/sys/arm/versatile/sp804.c
@@ -0,0 +1,352 @@
+/*
+ * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org>
+ * Copyright (c) 2012 Damjan Marion <dmarion@freebsd.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <sys/malloc.h>
+#include <sys/rman.h>
+#include <sys/timeet.h>
+#include <sys/timetc.h>
+#include <sys/watchdog.h>
+#include <machine/bus.h>
+#include <machine/cpu.h>
+#include <machine/frame.h>
+#include <machine/intr.h>
+
+#include <dev/fdt/fdt_common.h>
+#include <dev/ofw/openfirm.h>
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
+#include <machine/bus.h>
+#include <machine/fdt.h>
+
+#define SP804_TIMER1_LOAD 0x00
+#define SP804_TIMER1_VALUE 0x04
+#define SP804_TIMER1_CONTROL 0x08
+#define TIMER_CONTROL_EN (1 << 7)
+#define TIMER_CONTROL_FREERUN (0 << 6)
+#define TIMER_CONTROL_PERIODIC (1 << 6)
+#define TIMER_CONTROL_INTREN (1 << 5)
+#define TIMER_CONTROL_DIV1 (0 << 2)
+#define TIMER_CONTROL_DIV16 (1 << 2)
+#define TIMER_CONTROL_DIV256 (2 << 2)
+#define TIMER_CONTROL_32BIT (1 << 1)
+#define TIMER_CONTROL_ONESHOT (1 << 0)
+#define SP804_TIMER1_INTCLR 0x0C
+#define SP804_TIMER1_RIS 0x10
+#define SP804_TIMER1_MIS 0x14
+#define SP804_TIMER1_BGLOAD 0x18
+#define SP804_TIMER2_LOAD 0x20
+#define SP804_TIMER2_VALUE 0x24
+#define SP804_TIMER2_CONTROL 0x28
+#define SP804_TIMER2_INTCLR 0x2C
+#define SP804_TIMER2_RIS 0x30
+#define SP804_TIMER2_MIS 0x34
+#define SP804_TIMER2_BGLOAD 0x38
+
+#define SP804_PERIPH_ID0 0xFE0
+#define SP804_PERIPH_ID1 0xFE4
+#define SP804_PERIPH_ID2 0xFE8
+#define SP804_PERIPH_ID3 0xFEC
+#define SP804_PRIMECELL_ID0 0xFF0
+#define SP804_PRIMECELL_ID1 0xFF4
+#define SP804_PRIMECELL_ID2 0xFF8
+#define SP804_PRIMECELL_ID3 0xFFC
+
+#define DEFAULT_FREQUENCY 1000000
+/*
+ * QEMU seems to have problem with full frequency
+ */
+#define DEFAULT_DIVISOR 16
+#define DEFAULT_CONTROL_DIV TIMER_CONTROL_DIV16
+
+struct sp804_timer_softc {
+ struct resource* mem_res;
+ struct resource* irq_res;
+ void* intr_hl;
+ uint32_t sysclk_freq;
+ bus_space_tag_t bst;
+ bus_space_handle_t bsh;
+ struct timecounter tc;
+ bool et_enabled;
+ struct eventtimer et;
+};
+
+/* Read/Write macros for Timer used as timecounter */
+#define sp804_timer_tc_read_4(reg) \
+ bus_space_read_4(sc->bst, sc->bsh, reg)
+
+#define sp804_timer_tc_write_4(reg, val) \
+ bus_space_write_4(sc->bst, sc->bsh, reg, val)
+
+static unsigned sp804_timer_tc_get_timecount(struct timecounter *);
+
+static unsigned
+sp804_timer_tc_get_timecount(struct timecounter *tc)
+{
+ struct sp804_timer_softc *sc = tc->tc_priv;
+ return 0xffffffff - sp804_timer_tc_read_4(SP804_TIMER1_VALUE);
+}
+
+static int
+sp804_timer_start(struct eventtimer *et, struct bintime *first,
+ struct bintime *period)
+{
+ struct sp804_timer_softc *sc = et->et_priv;
+ uint32_t count, reg;
+
+ if (first != NULL) {
+ sc->et_enabled = 1;
+
+ count = (sc->et.et_frequency * (first->frac >> 32)) >> 32;
+ if (first->sec != 0)
+ count += sc->et.et_frequency * first->sec;
+
+ sp804_timer_tc_write_4(SP804_TIMER2_LOAD, count);
+ reg = TIMER_CONTROL_32BIT | TIMER_CONTROL_INTREN |
+ TIMER_CONTROL_PERIODIC | DEFAULT_CONTROL_DIV |
+ TIMER_CONTROL_EN;
+ sp804_timer_tc_write_4(SP804_TIMER2_CONTROL, reg);
+
+ return (0);
+ }
+
+ if (period != NULL) {
+ panic("period");
+ }
+
+ return (EINVAL);
+}
+
+static int
+sp804_timer_stop(struct eventtimer *et)
+{
+ struct sp804_timer_softc *sc = et->et_priv;
+ uint32_t reg;
+
+ sc->et_enabled = 0;
+ reg = sp804_timer_tc_read_4(SP804_TIMER2_CONTROL);
+ reg &= ~(TIMER_CONTROL_EN);
+ sp804_timer_tc_write_4(SP804_TIMER2_CONTROL, reg);
+
+ return (0);
+}
+
+static int
+sp804_timer_intr(void *arg)
+{
+ struct sp804_timer_softc *sc = arg;
+ static uint32_t prev = 0;
+ uint32_t x = 0;
+
+ x = sp804_timer_tc_read_4(SP804_TIMER1_VALUE);
+
+ prev =x ;
+ sp804_timer_tc_write_4(SP804_TIMER2_INTCLR, 1);
+ if (sc->et_enabled) {
+ if (sc->et.et_active) {
+ sc->et.et_event_cb(&sc->et, sc->et.et_arg);
+ }
+ }
+
+ return (FILTER_HANDLED);
+}
+
+static int
+sp804_timer_probe(device_t dev)
+{
+
+ if (ofw_bus_is_compatible(dev, "arm,sp804")) {
+ device_set_desc(dev, "SP804 System Timer");
+ return (BUS_PROBE_DEFAULT);
+ }
+
+ return (ENXIO);
+}
+
+static int
+sp804_timer_attach(device_t dev)
+{
+ struct sp804_timer_softc *sc = device_get_softc(dev);
+ int rid = 0;
+ int i;
+ uint32_t id, reg;
+
+ sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE);
+ if (sc->mem_res == NULL) {
+ device_printf(dev, "could not allocate memory resource\n");
+ return (ENXIO);
+ }
+
+ sc->bst = rman_get_bustag(sc->mem_res);
+ sc->bsh = rman_get_bushandle(sc->mem_res);
+
+ /* Request the IRQ resources */
+ sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE);
+ if (sc->irq_res == NULL) {
+ device_printf(dev, "Error: could not allocate irq resources\n");
+ return (ENXIO);
+ }
+
+ /* TODO: get frequency from FDT */
+ sc->sysclk_freq = DEFAULT_FREQUENCY;
+
+ /* Setup and enable the timer */
+ if (bus_setup_intr(dev, sc->irq_res, INTR_TYPE_CLK,
+ sp804_timer_intr, NULL, sc,
+ &sc->intr_hl) != 0) {
+ bus_release_resource(dev, SYS_RES_IRQ, rid,
+ sc->irq_res);
+ device_printf(dev, "Unable to setup the clock irq handler.\n");
+ return (ENXIO);
+ }
+
+ sp804_timer_tc_write_4(SP804_TIMER1_CONTROL, 0);
+ sp804_timer_tc_write_4(SP804_TIMER2_CONTROL, 0);
+
+ /*
+ * Timer 1, timecounter
+ */
+ sc->tc.tc_frequency = DEFAULT_FREQUENCY;
+ sc->tc.tc_name = "SP804 Timecouter";
+ sc->tc.tc_get_timecount = sp804_timer_tc_get_timecount;
+ sc->tc.tc_poll_pps = NULL;
+ sc->tc.tc_counter_mask = ~0u;
+ sc->tc.tc_quality = 1000;
+ sc->tc.tc_priv = sc;
+
+ sp804_timer_tc_write_4(SP804_TIMER1_VALUE, 0xffffffff);
+ sp804_timer_tc_write_4(SP804_TIMER1_LOAD, 0xffffffff);
+ reg = TIMER_CONTROL_PERIODIC | TIMER_CONTROL_32BIT;
+ sp804_timer_tc_write_4(SP804_TIMER1_CONTROL, reg);
+ reg |= TIMER_CONTROL_EN;
+ sp804_timer_tc_write_4(SP804_TIMER1_CONTROL, reg);
+ tc_init(&sc->tc);
+
+ /*
+ * Timer 2, event timer
+ */
+ sc->et_enabled = 0;
+ sc->et.et_name = malloc(64, M_DEVBUF, M_NOWAIT | M_ZERO);
+ sprintf(sc->et.et_name, "SP804 Event Timer %d",
+ device_get_unit(dev));
+ sc->et.et_flags = ET_FLAGS_PERIODIC | ET_FLAGS_ONESHOT;
+ sc->et.et_quality = 1000;
+ sc->et.et_frequency = sc->sysclk_freq / DEFAULT_DIVISOR;
+ sc->et.et_min_period.sec = 0;
+ sc->et.et_min_period.frac =
+ ((0x00000002LLU << 32) / sc->et.et_frequency) << 32;
+ sc->et.et_max_period.sec = 0xfffffff0U / sc->et.et_frequency;
+ sc->et.et_max_period.frac =
+ ((0xfffffffeLLU << 32) / sc->et.et_frequency) << 32;
+ sc->et.et_start = sp804_timer_start;
+ sc->et.et_stop = sp804_timer_stop;
+ sc->et.et_priv = sc;
+ et_register(&sc->et);
+
+ id = 0;
+ for (i = 3; i >= 0; i--) {
+ id = (id << 8) |
+ (sp804_timer_tc_read_4(SP804_PERIPH_ID0 + i*4) & 0xff);
+ }
+
+ device_printf(dev, "peripheral ID: %08x\n", id);
+
+ id = 0;
+ for (i = 3; i >= 0; i--) {
+ id = (id << 8) |
+ (sp804_timer_tc_read_4(SP804_PRIMECELL_ID0 + i*4) & 0xff);
+ }
+
+ device_printf(dev, "PrimeCell ID: %08x\n", id);
+
+ return (0);
+}
+
+static device_method_t sp804_timer_methods[] = {
+ DEVMETHOD(device_probe, sp804_timer_probe),
+ DEVMETHOD(device_attach, sp804_timer_attach),
+ { 0, 0 }
+};
+
+static driver_t sp804_timer_driver = {
+ "timer",
+ sp804_timer_methods,
+ sizeof(struct sp804_timer_softc),
+};
+
+static devclass_t sp804_timer_devclass;
+
+DRIVER_MODULE(sp804_timer, simplebus, sp804_timer_driver, sp804_timer_devclass, 0, 0);
+
+void
+DELAY(int usec)
+{
+ int32_t counts;
+ uint32_t first, last;
+ device_t timer_dev;
+ struct sp804_timer_softc *sc;
+
+ timer_dev = devclass_get_device(sp804_timer_devclass, 0);
+
+ if (timer_dev == NULL) {
+ /*
+ * Timer is not initialized yet
+ */
+ for (; usec > 0; usec--)
+ for (counts = 200; counts > 0; counts--)
+ /* Prevent gcc from optimizing out the loop */
+ cpufunc_nullop();
+ return;
+ }
+
+ sc = device_get_softc(timer_dev);
+
+ /* Get the number of times to count */
+ counts = usec * ((sc->tc.tc_frequency / 1000000) + 1);
+
+ first = sp804_timer_tc_get_timecount(&sc->tc);
+
+ while (counts > 0) {
+ last = sp804_timer_tc_get_timecount(&sc->tc);
+ if (last == first)
+ continue;
+ if (last>first) {
+ counts -= (int32_t)(last - first);
+ } else {
+ counts -= (int32_t)((0xFFFFFFFF - first) + last);
+ }
+ first = last;
+ }
+}
diff --git a/sys/arm/versatile/versatile_clcd.c b/sys/arm/versatile/versatile_clcd.c
new file mode 100644
index 0000000..53226ff
--- /dev/null
+++ b/sys/arm/versatile/versatile_clcd.c
@@ -0,0 +1,959 @@
+/*
+ * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <sys/malloc.h>
+#include <sys/rman.h>
+#include <sys/fbio.h>
+#include <sys/consio.h>
+#include <sys/kdb.h>
+
+#include <machine/bus.h>
+#include <machine/cpu.h>
+#include <machine/frame.h>
+#include <machine/intr.h>
+
+#include <dev/fdt/fdt_common.h>
+#include <dev/ofw/openfirm.h>
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
+#include <dev/fb/fbreg.h>
+#include <dev/syscons/syscons.h>
+
+#include <machine/bus.h>
+#include <machine/fdt.h>
+
+#define PL110_VENDOR_ARM926PXP 1
+
+#define MEM_SYS 0
+#define MEM_CLCD 1
+#define MEM_REGIONS 2
+
+#define SYS_CLCD 0x00
+#define SYS_CLCD_CLCDID_SHIFT 0x08
+#define SYS_CLCD_CLCDID_MASK 0x1f
+#define SYS_CLCD_PWR3V5VSWITCH (1 << 4)
+#define SYS_CLCD_VDDPOSSWITCH (1 << 3)
+#define SYS_CLCD_NLCDIOON (1 << 2)
+#define SYS_CLCD_LCD_MODE_MASK 0x03
+
+#define CLCD_MODE_RGB888 0x0
+#define CLCD_MODE_RGB555 0x01
+#define CLCD_MODE_RBG565 0x02
+#define CLCD_MODE_RGB565 0x03
+
+#define CLCDC_TIMING0 0x00
+#define CLCDC_TIMING1 0x04
+#define CLCDC_TIMING2 0x08
+#define CLCDC_TIMING3 0x0C
+#define CLCDC_TIMING3 0x0C
+#define CLCDC_UPBASE 0x10
+#define CLCDC_LPBASE 0x14
+#ifdef PL110_VENDOR_ARM926PXP
+#define CLCDC_CONTROL 0x18
+#define CLCDC_IMSC 0x1C
+#else
+#define CLCDC_IMSC 0x18
+#define CLCDC_CONTROL 0x1C
+#endif
+#define CONTROL_WATERMARK (1 << 16)
+#define CONTROL_VCOMP_VS (0 << 12)
+#define CONTROL_VCOMP_BP (1 << 12)
+#define CONTROL_VCOMP_SAV (2 << 12)
+#define CONTROL_VCOMP_FP (3 << 12)
+#define CONTROL_PWR (1 << 11)
+#define CONTROL_BEPO (1 << 10)
+#define CONTROL_BEBO (1 << 9)
+#define CONTROL_BGR (1 << 8)
+#define CONTROL_DUAL (1 << 7)
+#define CONTROL_MONO8 (1 << 6)
+#define CONTROL_TFT (1 << 5)
+#define CONTROL_BW (1 << 4)
+#define CONTROL_BPP1 (0x00 << 1)
+#define CONTROL_BPP2 (0x01 << 1)
+#define CONTROL_BPP4 (0x02 << 1)
+#define CONTROL_BPP8 (0x03 << 1)
+#define CONTROL_BPP16 (0x04 << 1)
+#define CONTROL_BPP24 (0x05 << 1)
+#define CONTROL_EN (1 << 0)
+#define CLCDC_RIS 0x20
+#define CLCDC_MIS 0x24
+#define INTR_MBERR (1 << 4)
+#define INTR_VCOMP (1 << 3)
+#define INTR_LNB (1 << 2)
+#define INTR_FUF (1 << 1)
+#define CLCDC_ICR 0x28
+
+#ifdef DEBUG
+#define dprintf(fmt, args...) do { printf("%s(): ", __func__); \
+ printf(fmt,##args); } while (0)
+#else
+#define dprintf(fmt, args...)
+#endif
+
+#define versatile_clcdc_sys_read_4(sc, reg) \
+ bus_read_4((sc)->mem_res[MEM_SYS], (reg))
+#define versatile_clcdc_sys_write_4(sc, reg, val) \
+ bus_write_4((sc)->mem_res[MEM_SYS], (reg), (val))
+
+#define versatile_clcdc_read_4(sc, reg) \
+ bus_read_4((sc)->mem_res[MEM_CLCD], (reg))
+#define versatile_clcdc_write_4(sc, reg, val) \
+ bus_write_4((sc)->mem_res[MEM_CLCD], (reg), (val))
+
+struct versatile_clcdc_softc {
+ struct resource* mem_res[MEM_REGIONS];
+
+ struct mtx mtx;
+
+ int width;
+ int height;
+ int mode;
+
+ bus_dma_tag_t dma_tag;
+ bus_dmamap_t dma_map;
+ bus_addr_t fb_phys;
+ uint8_t *fb_base;
+
+};
+
+struct video_adapter_softc {
+ /* Videoadpater part */
+ video_adapter_t va;
+ int console;
+
+ intptr_t fb_addr;
+ unsigned int fb_size;
+
+ unsigned int height;
+ unsigned int width;
+ unsigned int depth;
+ unsigned int stride;
+
+ unsigned int xmargin;
+ unsigned int ymargin;
+
+ unsigned char *font;
+ int initialized;
+};
+
+struct argb {
+ uint8_t a;
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+};
+
+static struct argb versatilefb_palette[16] = {
+ {0x00, 0x00, 0x00, 0x00},
+ {0x00, 0x00, 0x00, 0xaa},
+ {0x00, 0x00, 0xaa, 0x00},
+ {0x00, 0x00, 0xaa, 0xaa},
+ {0x00, 0xaa, 0x00, 0x00},
+ {0x00, 0xaa, 0x00, 0xaa},
+ {0x00, 0xaa, 0x55, 0x00},
+ {0x00, 0xaa, 0xaa, 0xaa},
+ {0x00, 0x55, 0x55, 0x55},
+ {0x00, 0x55, 0x55, 0xff},
+ {0x00, 0x55, 0xff, 0x55},
+ {0x00, 0x55, 0xff, 0xff},
+ {0x00, 0xff, 0x55, 0x55},
+ {0x00, 0xff, 0x55, 0xff},
+ {0x00, 0xff, 0xff, 0x55},
+ {0x00, 0xff, 0xff, 0xff}
+};
+
+/* mouse pointer from dev/syscons/scgfbrndr.c */
+static u_char mouse_pointer[16] = {
+ 0x00, 0x40, 0x60, 0x70, 0x78, 0x7c, 0x7e, 0x68,
+ 0x0c, 0x0c, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00
+};
+
+#define FB_WIDTH 640
+#define FB_HEIGHT 480
+#define FB_DEPTH 16
+
+#define VERSATILE_FONT_HEIGHT 16
+
+static struct video_adapter_softc va_softc;
+
+static struct resource_spec versatile_clcdc_mem_spec[] = {
+ { SYS_RES_MEMORY, 0, RF_ACTIVE },
+ { SYS_RES_MEMORY, 1, RF_ACTIVE },
+ { -1, 0, 0 }
+};
+
+static int versatilefb_configure(int);
+static void versatilefb_update_margins(video_adapter_t *adp);
+
+static void
+versatile_fb_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int err)
+{
+ bus_addr_t *addr;
+
+ if (err)
+ return;
+
+ addr = (bus_addr_t*)arg;
+ *addr = segs[0].ds_addr;
+}
+
+static int
+versatile_clcdc_probe(device_t dev)
+{
+
+ if (ofw_bus_is_compatible(dev, "arm,pl110")) {
+ device_set_desc(dev, "PL110 CLCD controller");
+ return (BUS_PROBE_DEFAULT);
+ }
+
+ return (ENXIO);
+}
+
+static int
+versatile_clcdc_attach(device_t dev)
+{
+ struct versatile_clcdc_softc *sc = device_get_softc(dev);
+ struct video_adapter_softc *va_sc = &va_softc;
+ int err;
+ uint32_t reg;
+ int clcdid;
+ int dma_size;
+
+ /* Request memory resources */
+ err = bus_alloc_resources(dev, versatile_clcdc_mem_spec,
+ sc->mem_res);
+ if (err) {
+ device_printf(dev, "Error: could not allocate memory resources\n");
+ return (ENXIO);
+ }
+
+ reg = versatile_clcdc_sys_read_4(sc, SYS_CLCD);
+ clcdid = (reg >> SYS_CLCD_CLCDID_SHIFT) & SYS_CLCD_CLCDID_MASK;
+ switch (clcdid) {
+ case 31:
+ device_printf(dev, "QEMU VGA 640x480\n");
+ sc->width = 640;
+ sc->height = 480;
+ break;
+ default:
+ device_printf(dev, "Unsupported: %d\n", clcdid);
+ goto fail;
+ }
+
+ reg &= ~SYS_CLCD_LCD_MODE_MASK;
+ reg |= CLCD_MODE_RGB565;
+ sc->mode = CLCD_MODE_RGB565;
+ versatile_clcdc_sys_write_4(sc, SYS_CLCD, reg);
+ dma_size = sc->width*sc->height*2;
+
+ /*
+ * Power on LCD
+ */
+ reg |= SYS_CLCD_PWR3V5VSWITCH | SYS_CLCD_NLCDIOON;
+ versatile_clcdc_sys_write_4(sc, SYS_CLCD, reg);
+
+ /*
+ * XXX: hardcoded timing for VGA. For other modes/panels
+ * we need to keep table of timing register values
+ */
+ /*
+ * XXX: set SYS_OSC1
+ */
+ versatile_clcdc_write_4(sc, CLCDC_TIMING0, 0x3F1F3F9C);
+ versatile_clcdc_write_4(sc, CLCDC_TIMING1, 0x090B61DF);
+ versatile_clcdc_write_4(sc, CLCDC_TIMING2, 0x067F1800);
+ /* XXX: timing 3? */
+
+ /*
+ * Now allocate framebuffer memory
+ */
+ err = bus_dma_tag_create(
+ bus_get_dma_tag(dev),
+ 4, 0, /* alignment, boundary */
+ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */
+ BUS_SPACE_MAXADDR, /* highaddr */
+ NULL, NULL, /* filter, filterarg */
+ dma_size, 1, /* maxsize, nsegments */
+ dma_size, 0, /* maxsegsize, flags */
+ NULL, NULL, /* lockfunc, lockarg */
+ &sc->dma_tag);
+
+ err = bus_dmamem_alloc(sc->dma_tag, (void **)&sc->fb_base,
+ 0, &sc->dma_map);
+ if (err) {
+ device_printf(dev, "cannot allocate framebuffer\n");
+ goto fail;
+ }
+
+ err = bus_dmamap_load(sc->dma_tag, sc->dma_map, sc->fb_base,
+ dma_size, versatile_fb_dmamap_cb, &sc->fb_phys, BUS_DMA_NOWAIT);
+
+ if (err) {
+ device_printf(dev, "cannot load DMA map\n");
+ goto fail;
+ }
+
+ /* Make sure it's blank */
+ memset(sc->fb_base, 0x00, dma_size);
+
+ versatile_clcdc_write_4(sc, CLCDC_UPBASE, sc->fb_phys);
+
+ err = (sc_attach_unit(device_get_unit(dev),
+ device_get_flags(dev) | SC_AUTODETECT_KBD));
+
+ if (err) {
+ device_printf(dev, "failed to attach syscons\n");
+ goto fail;
+ }
+
+ /*
+ * XXX: hardcoded for VGA
+ */
+ reg = CONTROL_VCOMP_BP | CONTROL_TFT | CONTROL_BGR | CONTROL_EN;
+ reg |= CONTROL_BPP16;
+ versatile_clcdc_write_4(sc, CLCDC_CONTROL, reg);
+ DELAY(20);
+ reg |= CONTROL_PWR;
+ versatile_clcdc_write_4(sc, CLCDC_CONTROL, reg);
+
+ va_sc->fb_addr = (vm_offset_t)sc->fb_base;
+ va_sc->fb_size = dma_size;
+ va_sc->width = sc->width;
+ va_sc->height = sc->height;
+ va_sc->depth = 16;
+ va_sc->stride = sc->width * 2;
+ versatilefb_update_margins(&va_sc->va);
+
+ return (0);
+
+fail:
+ if (sc->fb_base)
+ bus_dmamem_free(sc->dma_tag, sc->fb_base, sc->dma_map);
+ if (sc->dma_map)
+ bus_dmamap_destroy(sc->dma_tag, sc->dma_map);
+ if (sc->dma_tag)
+ bus_dma_tag_destroy(sc->dma_tag);
+ return (err);
+}
+
+static device_method_t versatile_clcdc_methods[] = {
+ DEVMETHOD(device_probe, versatile_clcdc_probe),
+ DEVMETHOD(device_attach, versatile_clcdc_attach),
+
+ DEVMETHOD_END
+};
+
+static driver_t versatile_clcdc_driver = {
+ "clcdc",
+ versatile_clcdc_methods,
+ sizeof(struct versatile_clcdc_softc),
+};
+
+static devclass_t versatile_clcdc_devclass;
+
+DRIVER_MODULE(versatile_clcdc, simplebus, versatile_clcdc_driver, versatile_clcdc_devclass, 0, 0);
+
+/*
+ * Video driver routines and glue.
+ */
+static vi_probe_t versatilefb_probe;
+static vi_init_t versatilefb_init;
+static vi_get_info_t versatilefb_get_info;
+static vi_query_mode_t versatilefb_query_mode;
+static vi_set_mode_t versatilefb_set_mode;
+static vi_save_font_t versatilefb_save_font;
+static vi_load_font_t versatilefb_load_font;
+static vi_show_font_t versatilefb_show_font;
+static vi_save_palette_t versatilefb_save_palette;
+static vi_load_palette_t versatilefb_load_palette;
+static vi_set_border_t versatilefb_set_border;
+static vi_save_state_t versatilefb_save_state;
+static vi_load_state_t versatilefb_load_state;
+static vi_set_win_org_t versatilefb_set_win_org;
+static vi_read_hw_cursor_t versatilefb_read_hw_cursor;
+static vi_set_hw_cursor_t versatilefb_set_hw_cursor;
+static vi_set_hw_cursor_shape_t versatilefb_set_hw_cursor_shape;
+static vi_blank_display_t versatilefb_blank_display;
+static vi_mmap_t versatilefb_mmap;
+static vi_ioctl_t versatilefb_ioctl;
+static vi_clear_t versatilefb_clear;
+static vi_fill_rect_t versatilefb_fill_rect;
+static vi_bitblt_t versatilefb_bitblt;
+static vi_diag_t versatilefb_diag;
+static vi_save_cursor_palette_t versatilefb_save_cursor_palette;
+static vi_load_cursor_palette_t versatilefb_load_cursor_palette;
+static vi_copy_t versatilefb_copy;
+static vi_putp_t versatilefb_putp;
+static vi_putc_t versatilefb_putc;
+static vi_puts_t versatilefb_puts;
+static vi_putm_t versatilefb_putm;
+
+static video_switch_t versatilefbvidsw = {
+ .probe = versatilefb_probe,
+ .init = versatilefb_init,
+ .get_info = versatilefb_get_info,
+ .query_mode = versatilefb_query_mode,
+ .set_mode = versatilefb_set_mode,
+ .save_font = versatilefb_save_font,
+ .load_font = versatilefb_load_font,
+ .show_font = versatilefb_show_font,
+ .save_palette = versatilefb_save_palette,
+ .load_palette = versatilefb_load_palette,
+ .set_border = versatilefb_set_border,
+ .save_state = versatilefb_save_state,
+ .load_state = versatilefb_load_state,
+ .set_win_org = versatilefb_set_win_org,
+ .read_hw_cursor = versatilefb_read_hw_cursor,
+ .set_hw_cursor = versatilefb_set_hw_cursor,
+ .set_hw_cursor_shape = versatilefb_set_hw_cursor_shape,
+ .blank_display = versatilefb_blank_display,
+ .mmap = versatilefb_mmap,
+ .ioctl = versatilefb_ioctl,
+ .clear = versatilefb_clear,
+ .fill_rect = versatilefb_fill_rect,
+ .bitblt = versatilefb_bitblt,
+ .diag = versatilefb_diag,
+ .save_cursor_palette = versatilefb_save_cursor_palette,
+ .load_cursor_palette = versatilefb_load_cursor_palette,
+ .copy = versatilefb_copy,
+ .putp = versatilefb_putp,
+ .putc = versatilefb_putc,
+ .puts = versatilefb_puts,
+ .putm = versatilefb_putm,
+};
+
+VIDEO_DRIVER(versatilefb, versatilefbvidsw, versatilefb_configure);
+
+static vr_init_t clcdr_init;
+static vr_clear_t clcdr_clear;
+static vr_draw_border_t clcdr_draw_border;
+static vr_draw_t clcdr_draw;
+static vr_set_cursor_t clcdr_set_cursor;
+static vr_draw_cursor_t clcdr_draw_cursor;
+static vr_blink_cursor_t clcdr_blink_cursor;
+static vr_set_mouse_t clcdr_set_mouse;
+static vr_draw_mouse_t clcdr_draw_mouse;
+
+/*
+ * We use our own renderer; this is because we must emulate a hardware
+ * cursor.
+ */
+static sc_rndr_sw_t clcdrend = {
+ clcdr_init,
+ clcdr_clear,
+ clcdr_draw_border,
+ clcdr_draw,
+ clcdr_set_cursor,
+ clcdr_draw_cursor,
+ clcdr_blink_cursor,
+ clcdr_set_mouse,
+ clcdr_draw_mouse
+};
+
+RENDERER(versatilefb, 0, clcdrend, gfb_set);
+RENDERER_MODULE(versatilefb, gfb_set);
+
+static void
+clcdr_init(scr_stat* scp)
+{
+}
+
+static void
+clcdr_clear(scr_stat* scp, int c, int attr)
+{
+}
+
+static void
+clcdr_draw_border(scr_stat* scp, int color)
+{
+}
+
+static void
+clcdr_draw(scr_stat* scp, int from, int count, int flip)
+{
+ video_adapter_t* adp = scp->sc->adp;
+ int i, c, a;
+
+ if (!flip) {
+ /* Normal printing */
+ vidd_puts(adp, from, (uint16_t*)sc_vtb_pointer(&scp->vtb, from), count);
+ } else {
+ /* This is for selections and such: invert the color attribute */
+ for (i = count; i-- > 0; ++from) {
+ c = sc_vtb_getc(&scp->vtb, from);
+ a = sc_vtb_geta(&scp->vtb, from) >> 8;
+ vidd_putc(adp, from, c, (a >> 4) | ((a & 0xf) << 4));
+ }
+ }
+}
+
+static void
+clcdr_set_cursor(scr_stat* scp, int base, int height, int blink)
+{
+}
+
+static void
+clcdr_draw_cursor(scr_stat* scp, int off, int blink, int on, int flip)
+{
+ video_adapter_t* adp = scp->sc->adp;
+ struct video_adapter_softc *sc;
+ int row, col;
+ uint8_t *addr;
+ int i,j;
+
+ sc = (struct video_adapter_softc *)adp;
+
+ if (scp->curs_attr.height <= 0)
+ return;
+
+ if (sc->fb_addr == 0)
+ return;
+
+ if (off >= adp->va_info.vi_width * adp->va_info.vi_height)
+ return;
+
+ /* calculate the coordinates in the video buffer */
+ row = (off / adp->va_info.vi_width) * adp->va_info.vi_cheight;
+ col = (off % adp->va_info.vi_width) * adp->va_info.vi_cwidth;
+
+ addr = (uint8_t *)sc->fb_addr
+ + (row + sc->ymargin)*(sc->stride)
+ + (sc->depth/8) * (col + sc->xmargin);
+
+ /* our cursor consists of simply inverting the char under it */
+ for (i = 0; i < adp->va_info.vi_cheight; i++) {
+ for (j = 0; j < adp->va_info.vi_cwidth; j++) {
+
+ addr[2*j] ^= 0xff;
+ addr[2*j + 1] ^= 0xff;
+ }
+
+ addr += sc->stride;
+ }
+}
+
+static void
+clcdr_blink_cursor(scr_stat* scp, int at, int flip)
+{
+}
+
+static void
+clcdr_set_mouse(scr_stat* scp)
+{
+}
+
+static void
+clcdr_draw_mouse(scr_stat* scp, int x, int y, int on)
+{
+ vidd_putm(scp->sc->adp, x, y, mouse_pointer, 0xffffffff, 16, 8);
+
+}
+
+static uint16_t versatilefb_static_window[ROW*COL];
+extern u_char dflt_font_16[];
+
+/*
+ * Update videoadapter settings after changing resolution
+ */
+static void
+versatilefb_update_margins(video_adapter_t *adp)
+{
+ struct video_adapter_softc *sc;
+ video_info_t *vi;
+
+ sc = (struct video_adapter_softc *)adp;
+ vi = &adp->va_info;
+
+ sc->xmargin = (sc->width - (vi->vi_width * vi->vi_cwidth)) / 2;
+ sc->ymargin = (sc->height - (vi->vi_height * vi->vi_cheight))/2;
+}
+
+static int
+versatilefb_configure(int flags)
+{
+ struct video_adapter_softc *va_sc;
+
+ va_sc = &va_softc;
+
+ if (va_sc->initialized)
+ return (0);
+
+ va_sc->width = FB_WIDTH;
+ va_sc->height = FB_HEIGHT;
+ va_sc->depth = FB_DEPTH;
+
+ versatilefb_init(0, &va_sc->va, 0);
+
+ va_sc->initialized = 1;
+
+ return (0);
+}
+
+static int
+versatilefb_probe(int unit, video_adapter_t **adp, void *arg, int flags)
+{
+
+ return (0);
+}
+
+static int
+versatilefb_init(int unit, video_adapter_t *adp, int flags)
+{
+ struct video_adapter_softc *sc;
+ video_info_t *vi;
+
+ sc = (struct video_adapter_softc *)adp;
+ vi = &adp->va_info;
+
+ vid_init_struct(adp, "versatilefb", -1, unit);
+
+ sc->font = dflt_font_16;
+ vi->vi_cheight = VERSATILE_FONT_HEIGHT;
+ vi->vi_cwidth = 8;
+
+ vi->vi_width = sc->width/8;
+ vi->vi_height = sc->height/vi->vi_cheight;
+
+ /*
+ * Clamp width/height to syscons maximums
+ */
+ if (vi->vi_width > COL)
+ vi->vi_width = COL;
+ if (vi->vi_height > ROW)
+ vi->vi_height = ROW;
+
+ sc->xmargin = (sc->width - (vi->vi_width * vi->vi_cwidth)) / 2;
+ sc->ymargin = (sc->height - (vi->vi_height * vi->vi_cheight))/2;
+
+
+ adp->va_window = (vm_offset_t) versatilefb_static_window;
+ adp->va_flags |= V_ADP_FONT /* | V_ADP_COLOR | V_ADP_MODECHANGE */;
+
+ vid_register(&sc->va);
+
+ return (0);
+}
+
+static int
+versatilefb_get_info(video_adapter_t *adp, int mode, video_info_t *info)
+{
+ bcopy(&adp->va_info, info, sizeof(*info));
+ return (0);
+}
+
+static int
+versatilefb_query_mode(video_adapter_t *adp, video_info_t *info)
+{
+ return (0);
+}
+
+static int
+versatilefb_set_mode(video_adapter_t *adp, int mode)
+{
+ return (0);
+}
+
+static int
+versatilefb_save_font(video_adapter_t *adp, int page, int size, int width,
+ u_char *data, int c, int count)
+{
+ return (0);
+}
+
+static int
+versatilefb_load_font(video_adapter_t *adp, int page, int size, int width,
+ u_char *data, int c, int count)
+{
+ struct video_adapter_softc *sc = (struct video_adapter_softc *)adp;
+
+ sc->font = data;
+
+ return (0);
+}
+
+static int
+versatilefb_show_font(video_adapter_t *adp, int page)
+{
+ return (0);
+}
+
+static int
+versatilefb_save_palette(video_adapter_t *adp, u_char *palette)
+{
+ return (0);
+}
+
+static int
+versatilefb_load_palette(video_adapter_t *adp, u_char *palette)
+{
+ return (0);
+}
+
+static int
+versatilefb_set_border(video_adapter_t *adp, int border)
+{
+ return (versatilefb_blank_display(adp, border));
+}
+
+static int
+versatilefb_save_state(video_adapter_t *adp, void *p, size_t size)
+{
+ return (0);
+}
+
+static int
+versatilefb_load_state(video_adapter_t *adp, void *p)
+{
+ return (0);
+}
+
+static int
+versatilefb_set_win_org(video_adapter_t *adp, off_t offset)
+{
+ return (0);
+}
+
+static int
+versatilefb_read_hw_cursor(video_adapter_t *adp, int *col, int *row)
+{
+ *col = *row = 0;
+
+ return (0);
+}
+
+static int
+versatilefb_set_hw_cursor(video_adapter_t *adp, int col, int row)
+{
+
+ return (0);
+}
+
+static int
+versatilefb_set_hw_cursor_shape(video_adapter_t *adp, int base, int height,
+ int celsize, int blink)
+{
+ return (0);
+}
+
+static int
+versatilefb_blank_display(video_adapter_t *adp, int mode)
+{
+
+ struct video_adapter_softc *sc;
+
+ sc = (struct video_adapter_softc *)adp;
+ if (sc && sc->fb_addr)
+ memset((void*)sc->fb_addr, 0, sc->fb_size);
+
+ return (0);
+}
+
+static int
+versatilefb_mmap(video_adapter_t *adp, vm_ooffset_t offset, vm_paddr_t *paddr,
+ int prot, vm_memattr_t *memattr)
+{
+ struct video_adapter_softc *sc;
+
+ sc = (struct video_adapter_softc *)adp;
+
+ /*
+ * This might be a legacy VGA mem request: if so, just point it at the
+ * framebuffer, since it shouldn't be touched
+ */
+ if (offset < sc->stride*sc->height) {
+ *paddr = sc->fb_addr + offset;
+ return (0);
+ }
+
+ return (EINVAL);
+}
+
+static int
+versatilefb_ioctl(video_adapter_t *adp, u_long cmd, caddr_t data)
+{
+
+ return (0);
+}
+
+static int
+versatilefb_clear(video_adapter_t *adp)
+{
+
+ return (versatilefb_blank_display(adp, 0));
+}
+
+static int
+versatilefb_fill_rect(video_adapter_t *adp, int val, int x, int y, int cx, int cy)
+{
+
+ return (0);
+}
+
+static int
+versatilefb_bitblt(video_adapter_t *adp, ...)
+{
+
+ return (0);
+}
+
+static int
+versatilefb_diag(video_adapter_t *adp, int level)
+{
+
+ return (0);
+}
+
+static int
+versatilefb_save_cursor_palette(video_adapter_t *adp, u_char *palette)
+{
+
+ return (0);
+}
+
+static int
+versatilefb_load_cursor_palette(video_adapter_t *adp, u_char *palette)
+{
+
+ return (0);
+}
+
+static int
+versatilefb_copy(video_adapter_t *adp, vm_offset_t src, vm_offset_t dst, int n)
+{
+
+ return (0);
+}
+
+static int
+versatilefb_putp(video_adapter_t *adp, vm_offset_t off, uint32_t p, uint32_t a,
+ int size, int bpp, int bit_ltor, int byte_ltor)
+{
+
+ return (0);
+}
+
+static int
+versatilefb_putc(video_adapter_t *adp, vm_offset_t off, uint8_t c, uint8_t a)
+{
+ struct video_adapter_softc *sc;
+ int row;
+ int col;
+ int i, j, k;
+ uint8_t *addr;
+ u_char *p;
+ uint8_t fg, bg, color;
+ uint16_t rgb;
+
+ sc = (struct video_adapter_softc *)adp;
+
+ if (sc->fb_addr == 0)
+ return (0);
+
+ if (off >= adp->va_info.vi_width * adp->va_info.vi_height)
+ return (0);
+
+ row = (off / adp->va_info.vi_width) * adp->va_info.vi_cheight;
+ col = (off % adp->va_info.vi_width) * adp->va_info.vi_cwidth;
+ p = sc->font + c*VERSATILE_FONT_HEIGHT;
+ addr = (uint8_t *)sc->fb_addr
+ + (row + sc->ymargin)*(sc->stride)
+ + (sc->depth/8) * (col + sc->xmargin);
+
+ fg = a & 0xf ;
+ bg = (a >> 8) & 0xf;
+
+ for (i = 0; i < VERSATILE_FONT_HEIGHT; i++) {
+ for (j = 0, k = 7; j < 8; j++, k--) {
+ if ((p[i] & (1 << k)) == 0)
+ color = bg;
+ else
+ color = fg;
+
+ switch (sc->depth) {
+ case 16:
+ rgb = (versatilefb_palette[color].r >> 3) << 11;
+ rgb |= (versatilefb_palette[color].g >> 2) << 5;
+ rgb |= (versatilefb_palette[color].b >> 3);
+ addr[2*j] = rgb & 0xff;
+ addr[2*j + 1] = (rgb >> 8) & 0xff;
+ default:
+ /* Not supported yet */
+ break;
+ }
+ }
+
+ addr += (sc->stride);
+ }
+
+ return (0);
+}
+
+static int
+versatilefb_puts(video_adapter_t *adp, vm_offset_t off, u_int16_t *s, int len)
+{
+ int i;
+
+ for (i = 0; i < len; i++)
+ versatilefb_putc(adp, off + i, s[i] & 0xff, (s[i] & 0xff00) >> 8);
+
+ return (0);
+}
+
+static int
+versatilefb_putm(video_adapter_t *adp, int x, int y, uint8_t *pixel_image,
+ uint32_t pixel_mask, int size, int width)
+{
+
+ return (0);
+}
+
+/*
+ * Define a stub keyboard driver in case one hasn't been
+ * compiled into the kernel
+ */
+#include <sys/kbio.h>
+#include <dev/kbd/kbdreg.h>
+
+static int dummy_kbd_configure(int flags);
+
+keyboard_switch_t bcmdummysw;
+
+static int
+dummy_kbd_configure(int flags)
+{
+
+ return (0);
+}
+KEYBOARD_DRIVER(bcmdummy, bcmdummysw, dummy_kbd_configure);
diff --git a/sys/arm/versatile/versatile_machdep.c b/sys/arm/versatile/versatile_machdep.c
new file mode 100644
index 0000000..cd29a5a
--- /dev/null
+++ b/sys/arm/versatile/versatile_machdep.c
@@ -0,0 +1,122 @@
+/*-
+ * Copyright (c) 2012 Oleksandr Tymoshenko.
+ * All rights reserved.
+ *
+ * This code is derived from software written for Brini by Mark Brinicombe
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Brini.
+ * 4. The name of the company nor the name of the author may be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL BRINI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+#include "opt_ddb.h"
+#include "opt_platform.h"
+#include "opt_global.h"
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#define _ARM32_BUS_DMA_PRIVATE
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+
+#include <vm/vm.h>
+#include <vm/pmap.h>
+
+#include <machine/bus.h>
+#include <machine/frame.h> /* For trapframe_t, used in <machine/machdep.h> */
+#include <machine/machdep.h>
+#include <machine/pmap.h>
+
+#include <dev/fdt/fdt_common.h>
+
+/* Start of address space used for bootstrap map */
+#define DEVMAP_BOOTSTRAP_MAP_START 0xE0000000
+
+vm_offset_t
+initarm_lastaddr(void)
+{
+
+ return (DEVMAP_BOOTSTRAP_MAP_START - ARM_NOCACHE_KVA_SIZE);
+}
+
+void
+initarm_gpio_init(void)
+{
+}
+
+void
+initarm_late_init(void)
+{
+}
+
+#define FDT_DEVMAP_MAX (2) /* FIXME */
+static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = {
+ { 0, 0, 0, 0, 0, },
+ { 0, 0, 0, 0, 0, }
+};
+
+
+/*
+ * Construct pmap_devmap[] with DT-derived config data.
+ */
+int
+platform_devmap_init(void)
+{
+ int i = 0;
+ fdt_devmap[i].pd_va = 0xf0100000;
+ fdt_devmap[i].pd_pa = 0x10100000;
+ fdt_devmap[i].pd_size = 0x01000000; /* 1 MB */
+ fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE;
+ fdt_devmap[i].pd_cache = PTE_DEVICE;
+
+ pmap_devmap_bootstrap_table = &fdt_devmap[0];
+ return (0);
+}
+
+struct arm32_dma_range *
+bus_dma_get_range(void)
+{
+
+ return (NULL);
+}
+
+int
+bus_dma_get_range_nb(void)
+{
+
+ return (0);
+}
+
+void
+cpu_reset()
+{
+ printf("cpu_reset\n");
+ while (1);
+}
+
diff --git a/sys/arm/versatile/versatile_pci.c b/sys/arm/versatile/versatile_pci.c
new file mode 100644
index 0000000..1ef92ef
--- /dev/null
+++ b/sys/arm/versatile/versatile_pci.c
@@ -0,0 +1,510 @@
+/*
+ * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <sys/malloc.h>
+#include <sys/rman.h>
+#include <sys/watchdog.h>
+#include <machine/bus.h>
+#include <machine/cpu.h>
+#include <machine/frame.h>
+#include <machine/intr.h>
+
+#include <dev/pci/pcivar.h>
+#include <dev/pci/pcireg.h>
+
+#include <dev/pci/pcib_private.h>
+#include "pcib_if.h"
+
+#include <dev/fdt/fdt_common.h>
+#include <dev/ofw/openfirm.h>
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
+#include <machine/bus.h>
+#include <machine/fdt.h>
+
+#include <arm/versatile/versatile_pci_bus_space.h>
+
+#define MEM_SYS 0
+#define MEM_CORE 1
+#define MEM_BASE 2
+#define MEM_CONF_BASE 3
+#define MEM_REGIONS 4
+
+#define SYS_PCICTL 0x00
+
+#define PCI_CORE_IMAP0 0x00
+#define PCI_CORE_IMAP1 0x04
+#define PCI_CORE_IMAP2 0x08
+#define PCI_CORE_SELFID 0x0C
+#define PCI_CORE_SMAP0 0x10
+#define PCI_CORE_SMAP1 0x14
+#define PCI_CORE_SMAP2 0x18
+
+#define VERSATILE_PCI_DEV 0x030010ee
+#define VERSATILE_PCI_CLASS 0x0b400000
+
+#define PCI_IO_WINDOW 0x44000000
+#define PCI_IO_SIZE 0x0c000000
+#define PCI_NPREFETCH_WINDOW 0x50000000
+#define PCI_NPREFETCH_SIZE 0x10000000
+#define PCI_PREFETCH_WINDOW 0x60000000
+#define PCI_PREFETCH_SIZE 0x10000000
+
+#define VERSATILE_PCI_IRQ_START 27
+#define VERSATILE_PCI_IRQ_END 30
+
+#ifdef DEBUG
+#define dprintf(fmt, args...) do { printf("%s(): ", __func__); \
+ printf(fmt,##args); } while (0)
+#else
+#define dprintf(fmt, args...)
+#endif
+
+
+#define versatile_pci_sys_read_4(reg) \
+ bus_read_4(sc->mem_res[MEM_SYS], (reg))
+#define versatile_pci_sys_write_4(reg, val) \
+ bus_write_4(sc->mem_res[MEM_SYS], (reg), (val))
+
+#define versatile_pci_core_read_4(reg) \
+ bus_read_4(sc->mem_res[MEM_CORE], (reg))
+#define versatile_pci_core_write_4(reg, val) \
+ bus_write_4(sc->mem_res[MEM_CORE], (reg), (val))
+
+#define versatile_pci_read_4(reg) \
+ bus_read_4(sc->mem_res[MEM_BASE], (reg))
+#define versatile_pci_write_4(reg, val) \
+ bus_write_4(sc->mem_res[MEM_BASE], (reg), (val))
+
+#define versatile_pci_conf_read_4(reg) \
+ bus_read_4(sc->mem_res[MEM_CONF_BASE], (reg))
+#define versatile_pci_conf_write_4(reg, val) \
+ bus_write_4(sc->mem_res[MEM_CONF_BASE], (reg), (val))
+#define versatile_pci_conf_write_2(reg, val) \
+ bus_write_2(sc->mem_res[MEM_CONF_BASE], (reg), (val))
+#define versatile_pci_conf_write_1(reg, val) \
+ bus_write_1(sc->mem_res[MEM_CONF_BASE], (reg), (val))
+
+struct versatile_pci_softc {
+ struct resource* mem_res[MEM_REGIONS];
+ struct resource* irq_res;
+ void* intr_hl;
+
+ int pcib_slot;
+
+ /* Bus part */
+ int busno;
+ struct rman io_rman;
+ struct rman irq_rman;
+ struct rman mem_rman;
+
+ struct mtx mtx;
+};
+
+static struct resource_spec versatile_pci_mem_spec[] = {
+ { SYS_RES_MEMORY, 0, RF_ACTIVE },
+ { SYS_RES_MEMORY, 1, RF_ACTIVE },
+ { SYS_RES_MEMORY, 2, RF_ACTIVE },
+ { SYS_RES_MEMORY, 3, RF_ACTIVE },
+ { -1, 0, 0 }
+};
+
+static int
+versatile_pci_probe(device_t dev)
+{
+
+ if (ofw_bus_is_compatible(dev, "versatile,pci")) {
+ device_set_desc(dev, "Versatile PCI controller");
+ return (BUS_PROBE_DEFAULT);
+ }
+
+ return (ENXIO);
+}
+
+static int
+versatile_pci_attach(device_t dev)
+{
+ struct versatile_pci_softc *sc = device_get_softc(dev);
+ int err;
+ int slot;
+ uint32_t vendordev_id, class_id;
+ uint32_t val;
+
+ /* Request memory resources */
+ err = bus_alloc_resources(dev, versatile_pci_mem_spec,
+ sc->mem_res);
+ if (err) {
+ device_printf(dev, "Error: could not allocate memory resources\n");
+ return (ENXIO);
+ }
+
+ /*
+ * Setup memory windows
+ */
+ versatile_pci_core_write_4(PCI_CORE_IMAP0, (PCI_IO_WINDOW >> 11));
+ versatile_pci_core_write_4(PCI_CORE_IMAP1, (PCI_NPREFETCH_WINDOW >> 11));
+ versatile_pci_core_write_4(PCI_CORE_IMAP2, (PCI_PREFETCH_WINDOW >> 11));
+
+ /*
+ * XXX: this is SDRAM offset >> 28
+ */
+ versatile_pci_core_write_4(PCI_CORE_SMAP0, 0);
+ versatile_pci_core_write_4(PCI_CORE_SMAP1, 0);
+ versatile_pci_core_write_4(PCI_CORE_SMAP2, 0);
+
+ versatile_pci_sys_write_4(SYS_PCICTL, 1);
+
+ for (slot = 0; slot <= PCI_SLOTMAX; slot++) {
+ vendordev_id = versatile_pci_read_4((slot << 11) + PCIR_DEVVENDOR);
+ class_id = versatile_pci_read_4((slot << 11) + PCIR_REVID);
+ if ((vendordev_id == VERSATILE_PCI_DEV) &&
+ (class_id == VERSATILE_PCI_CLASS))
+ break;
+ }
+
+ if (slot == (PCI_SLOTMAX + 1)) {
+ bus_release_resources(dev, versatile_pci_mem_spec,
+ sc->mem_res);
+ device_printf(dev, "Versatile PCI core not found\n");
+ return (ENXIO);
+ }
+
+ sc->pcib_slot = slot;
+ device_printf(dev, "PCI core at slot #%d\n", slot);
+
+ versatile_pci_core_write_4(PCI_CORE_SELFID, slot);
+ val = versatile_pci_conf_read_4((slot << 11) + PCIR_COMMAND);
+ val |= (PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN | PCIM_CMD_MWRICEN);
+ versatile_pci_conf_write_4((slot << 11) + PCIR_COMMAND, val);
+
+ /* Again SDRAM start >> 28 */
+ versatile_pci_write_4((slot << 11) + PCIR_BAR(0), 0);
+ versatile_pci_write_4((slot << 11) + PCIR_BAR(1), 0);
+ versatile_pci_write_4((slot << 11) + PCIR_BAR(2), 0);
+
+ /* Prepare resource managers */
+ sc->mem_rman.rm_type = RMAN_ARRAY;
+ sc->mem_rman.rm_descr = "versatile PCI memory window";
+ if (rman_init(&sc->mem_rman) != 0 ||
+ rman_manage_region(&sc->mem_rman, PCI_NPREFETCH_WINDOW,
+ PCI_NPREFETCH_WINDOW + PCI_NPREFETCH_SIZE - 1) != 0) {
+ panic("versatile_pci_attach: failed to set up memory rman");
+ }
+
+ bootverbose = 1;
+ sc->io_rman.rm_type = RMAN_ARRAY;
+ sc->io_rman.rm_descr = "versatile PCI IO window";
+ if (rman_init(&sc->io_rman) != 0 ||
+ rman_manage_region(&sc->io_rman, PCI_IO_WINDOW,
+ PCI_IO_WINDOW + PCI_IO_SIZE - 1) != 0) {
+ panic("versatile_pci_attach: failed to set up I/O rman");
+ }
+
+ sc->irq_rman.rm_type = RMAN_ARRAY;
+ sc->irq_rman.rm_descr = "versatile PCI IRQs";
+ if (rman_init(&sc->irq_rman) != 0 ||
+ rman_manage_region(&sc->irq_rman, VERSATILE_PCI_IRQ_START,
+ VERSATILE_PCI_IRQ_END) != 0) {
+ panic("versatile_pci_attach: failed to set up IRQ rman");
+ }
+
+ mtx_init(&sc->mtx, device_get_nameunit(dev), "versatilepci",
+ MTX_SPIN);
+
+ val = versatile_pci_conf_read_4((12 << 11) + PCIR_COMMAND);
+
+ for (slot = 0; slot <= PCI_SLOTMAX; slot++) {
+ vendordev_id = versatile_pci_read_4((slot << 11) + PCIR_DEVVENDOR);
+ class_id = versatile_pci_read_4((slot << 11) + PCIR_REVID);
+
+ if (slot == sc->pcib_slot)
+ continue;
+
+ if ((vendordev_id == 0xffffffff) &&
+ (class_id == 0xffffffff))
+ continue;
+
+ val = versatile_pci_conf_read_4((slot << 11) + PCIR_COMMAND);
+ val |= PCIM_CMD_MEMEN | PCIM_CMD_PORTEN;
+ versatile_pci_conf_write_4((slot << 11) + PCIR_COMMAND, val);
+ }
+
+ device_add_child(dev, "pci", 0);
+ return (bus_generic_attach(dev));
+}
+
+static int
+versatile_pci_read_ivar(device_t dev, device_t child, int which,
+ uintptr_t *result)
+{
+ struct versatile_pci_softc *sc = device_get_softc(dev);
+
+ switch (which) {
+ case PCIB_IVAR_DOMAIN:
+ *result = 0;
+ return (0);
+ case PCIB_IVAR_BUS:
+ *result = sc->busno;
+ return (0);
+ }
+
+ return (ENOENT);
+}
+
+static int
+versatile_pci_write_ivar(device_t dev, device_t child, int which,
+ uintptr_t result)
+{
+ struct versatile_pci_softc * sc = device_get_softc(dev);
+
+ switch (which) {
+ case PCIB_IVAR_BUS:
+ sc->busno = result;
+ return (0);
+ }
+
+ return (ENOENT);
+}
+
+static struct resource *
+versatile_pci_alloc_resource(device_t bus, device_t child, int type, int *rid,
+ u_long start, u_long end, u_long count, u_int flags)
+{
+
+ struct versatile_pci_softc *sc = device_get_softc(bus);
+ struct resource *rv;
+ struct rman *rm;
+
+ printf("Alloc resources %d, %08lx..%08lx, %ld\n", type, start, end, count);
+
+ switch (type) {
+ case SYS_RES_IOPORT:
+ rm = &sc->io_rman;
+ break;
+ case SYS_RES_IRQ:
+ rm = &sc->irq_rman;
+ break;
+ case SYS_RES_MEMORY:
+ rm = &sc->mem_rman;
+ break;
+ default:
+ return (NULL);
+ }
+
+ rv = rman_reserve_resource(rm, start, end, count, flags, child);
+
+ if (rv == NULL)
+ return (NULL);
+
+ rman_set_rid(rv, *rid);
+
+ if (flags & RF_ACTIVE) {
+ if (bus_activate_resource(child, type, *rid, rv)) {
+ rman_release_resource(rv);
+ return (NULL);
+ }
+ }
+ return (rv);
+}
+
+static int
+versatile_pci_activate_resource(device_t bus, device_t child, int type, int rid,
+ struct resource *r)
+{
+ vm_offset_t vaddr;
+ int res = (BUS_ACTIVATE_RESOURCE(device_get_parent(bus),
+ child, type, rid, r));
+
+ if (!res) {
+ switch(type) {
+ case SYS_RES_MEMORY:
+ case SYS_RES_IOPORT:
+ vaddr = (vm_offset_t)pmap_mapdev(rman_get_start(r),
+ rman_get_size(r));
+ rman_set_bushandle(r, vaddr);
+ rman_set_bustag(r, versatile_bus_space_pcimem);
+ break;
+ }
+ }
+ return (res);
+}
+
+static int
+versatile_pci_setup_intr(device_t bus, device_t child, struct resource *ires,
+ int flags, driver_filter_t *filt, driver_intr_t *handler,
+ void *arg, void **cookiep)
+{
+
+ return BUS_SETUP_INTR(device_get_parent(bus), bus, ires, flags,
+ filt, handler, arg, cookiep);
+}
+
+static int
+versatile_pci_teardown_intr(device_t dev, device_t child, struct resource *ires,
+ void *cookie)
+{
+
+ return BUS_TEARDOWN_INTR(device_get_parent(dev), dev, ires, cookie);
+}
+
+
+
+static int
+versatile_pci_maxslots(device_t dev)
+{
+
+ return (PCI_SLOTMAX);
+}
+
+static int
+versatile_pci_route_interrupt(device_t pcib, device_t device, int pin)
+{
+
+ return (27 + ((pci_get_slot(device) + pin - 1) & 3));
+}
+
+static uint32_t
+versatile_pci_read_config(device_t dev, u_int bus, u_int slot, u_int func,
+ u_int reg, int bytes)
+{
+ struct versatile_pci_softc *sc = device_get_softc(dev);
+ uint32_t data;
+ uint32_t shift, mask;
+ uint32_t addr;
+
+ if (sc->pcib_slot == slot) {
+ switch (bytes) {
+ case 4:
+ return (0xffffffff);
+ break;
+ case 2:
+ return (0xffff);
+ break;
+ case 1:
+ return (0xff);
+ break;
+ }
+ }
+
+ addr = (bus << 16) | (slot << 11) | (func << 8) | (reg & ~3);
+
+ /* register access is 32-bit aligned */
+ shift = (reg & 3) * 8;
+
+ /* Create a mask based on the width, post-shift */
+ if (bytes == 2)
+ mask = 0xffff;
+ else if (bytes == 1)
+ mask = 0xff;
+ else
+ mask = 0xffffffff;
+
+ dprintf("%s: tag (%x, %x, %x) reg %d(%d)\n", __func__, bus, slot,
+ func, reg, bytes);
+
+ mtx_lock_spin(&sc->mtx);
+ data = versatile_pci_conf_read_4(addr);
+ mtx_unlock_spin(&sc->mtx);
+
+ /* get request bytes from 32-bit word */
+ data = (data >> shift) & mask;
+
+ dprintf("%s: read 0x%x\n", __func__, data);
+
+ return (data);
+}
+
+static void
+versatile_pci_write_config(device_t dev, u_int bus, u_int slot, u_int func,
+ u_int reg, uint32_t data, int bytes)
+{
+
+ struct versatile_pci_softc *sc = device_get_softc(dev);
+ uint32_t addr;
+
+ dprintf("%s: tag (%x, %x, %x) reg %d(%d)\n", __func__, bus, slot,
+ func, reg, bytes);
+
+ if (sc->pcib_slot == slot)
+ return;
+
+ addr = (bus << 16) | (slot << 11) | (func << 8) | reg;
+ mtx_lock_spin(&sc->mtx);
+ switch (bytes) {
+ case 4:
+ versatile_pci_conf_write_4(addr, data);
+ break;
+ case 2:
+ versatile_pci_conf_write_2(addr, data);
+ break;
+ case 1:
+ versatile_pci_conf_write_1(addr, data);
+ break;
+ }
+ mtx_unlock_spin(&sc->mtx);
+}
+
+static device_method_t versatile_pci_methods[] = {
+ DEVMETHOD(device_probe, versatile_pci_probe),
+ DEVMETHOD(device_attach, versatile_pci_attach),
+
+ /* Bus interface */
+ DEVMETHOD(bus_read_ivar, versatile_pci_read_ivar),
+ DEVMETHOD(bus_write_ivar, versatile_pci_write_ivar),
+ DEVMETHOD(bus_alloc_resource, versatile_pci_alloc_resource),
+ DEVMETHOD(bus_release_resource, bus_generic_release_resource),
+ DEVMETHOD(bus_activate_resource, versatile_pci_activate_resource),
+ DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
+ DEVMETHOD(bus_setup_intr, versatile_pci_setup_intr),
+ DEVMETHOD(bus_teardown_intr, versatile_pci_teardown_intr),
+
+ /* pcib interface */
+ DEVMETHOD(pcib_maxslots, versatile_pci_maxslots),
+ DEVMETHOD(pcib_read_config, versatile_pci_read_config),
+ DEVMETHOD(pcib_write_config, versatile_pci_write_config),
+ DEVMETHOD(pcib_route_interrupt, versatile_pci_route_interrupt),
+
+ DEVMETHOD_END
+};
+
+static driver_t versatile_pci_driver = {
+ "pcib",
+ versatile_pci_methods,
+ sizeof(struct versatile_pci_softc),
+};
+
+static devclass_t versatile_pci_devclass;
+
+DRIVER_MODULE(versatile_pci, simplebus, versatile_pci_driver, versatile_pci_devclass, 0, 0);
diff --git a/sys/arm/versatile/versatile_pci_bus_space.c b/sys/arm/versatile/versatile_pci_bus_space.c
new file mode 100644
index 0000000..2c2e0b5
--- /dev/null
+++ b/sys/arm/versatile/versatile_pci_bus_space.c
@@ -0,0 +1,153 @@
+/*-
+ * Copyright (c) 2009, Oleksandr Tymoshenko <gonzo@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice unmodified, this list of conditions, and the following
+ * disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/endian.h>
+
+#include <machine/bus.h>
+#include <arm/versatile/versatile_pci_bus_space.h>
+
+/* Prototypes for all the bus_space structure functions */
+bs_protos(generic);
+bs_protos(generic_armv4);
+
+/*
+ * Bus space that handles offsets in word for 1/2 bytes read/write access.
+ * Byte order of values is handled by device drivers itself.
+ */
+static struct bus_space bus_space_pcimem = {
+ /* cookie */
+ (void *) 0,
+
+ /* mapping/unmapping */
+ generic_bs_map,
+ generic_bs_unmap,
+ generic_bs_subregion,
+
+ /* allocation/deallocation */
+ NULL,
+ NULL,
+
+ /* barrier */
+ generic_bs_barrier,
+
+ /* read (single) */
+ generic_bs_r_1,
+ generic_armv4_bs_r_2,
+ generic_bs_r_4,
+ NULL,
+
+ /* read multiple */
+ generic_bs_rm_1,
+ generic_armv4_bs_rm_2,
+ generic_bs_rm_4,
+ NULL,
+
+ /* read region */
+ generic_bs_rr_1,
+ generic_armv4_bs_rr_2,
+ generic_bs_rr_4,
+ NULL,
+
+ /* write (single) */
+ generic_bs_w_1,
+ generic_armv4_bs_w_2,
+ generic_bs_w_4,
+ NULL,
+
+ /* write multiple */
+ generic_bs_wm_1,
+ generic_armv4_bs_wm_2,
+ generic_bs_wm_4,
+ NULL,
+
+ /* write region */
+ generic_bs_wr_1,
+ generic_armv4_bs_wr_2,
+ generic_bs_wr_4,
+ NULL,
+
+ /* set multiple */
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+
+ /* set region */
+ NULL,
+ NULL,
+ generic_bs_sr_4,
+ NULL,
+
+ /* copy */
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+
+ /* read (single) stream */
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+
+ /* read multiple stream */
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+
+ /* read region stream */
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+
+ /* write (single) stream */
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+
+ /* write multiple stream */
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+
+ /* write region stream */
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+};
+
+bus_space_tag_t versatile_bus_space_pcimem = &bus_space_pcimem;
diff --git a/sys/arm/versatile/versatile_pci_bus_space.h b/sys/arm/versatile/versatile_pci_bus_space.h
new file mode 100644
index 0000000..d5b54ef
--- /dev/null
+++ b/sys/arm/versatile/versatile_pci_bus_space.h
@@ -0,0 +1,35 @@
+/*-
+ * Copyright (c) 2009, Oleksandr Tymoshenko <gonzo@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice unmodified, this list of conditions, and the following
+ * disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef __VERSATILE_PCI_BUS_SPACEH__
+#define __VERSATILE_PCI_BUS_SPACEH__
+
+extern bus_space_tag_t versatile_bus_space_pcimem;
+
+#endif /* __VERSATILE_PCI_BUS_SPACEH__ */
diff --git a/sys/arm/versatile/versatile_sic.c b/sys/arm/versatile/versatile_sic.c
new file mode 100644
index 0000000..d3eee6e
--- /dev/null
+++ b/sys/arm/versatile/versatile_sic.c
@@ -0,0 +1,133 @@
+/*-
+ * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/kernel.h>
+#include <sys/ktr.h>
+#include <sys/module.h>
+#include <sys/rman.h>
+#include <machine/bus.h>
+#include <machine/intr.h>
+
+#include <dev/fdt/fdt_common.h>
+#include <dev/ofw/openfirm.h>
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
+#ifdef DEBUG
+#define dprintf(fmt, args...) printf(fmt, ##args)
+#else
+#define dprintf(fmt, args...)
+#endif
+
+#define SIC_STATUS 0x00
+#define SIC_RAWSTAT 0x04
+#define SIC_ENABLE 0x08
+#define SIC_ENSET 0x08
+#define SIC_ENCLR 0x0C
+#define SIC_SOFTINTSET 0x10
+#define SIC_SOFTINTCLR 0x14
+#define SIC_PICENABLE 0x20
+#define SIC_PICENSET 0x20
+#define SIC_PICENCLR 0x24
+
+struct versatile_sic_softc {
+ device_t sc_dev;
+ struct resource * mem_res;
+};
+
+#define sic_read_4(sc, reg) \
+ bus_read_4(sc->mem_res, (reg))
+#define sic_write_4(sc, reg, val) \
+ bus_write_4(sc->mem_res, (reg), (val))
+
+static int
+versatile_sic_probe(device_t dev)
+{
+ if (!ofw_bus_is_compatible(dev, "arm,versatile-sic"))
+ return (ENXIO);
+ device_set_desc(dev, "ARM Versatile SIC");
+ return (BUS_PROBE_DEFAULT);
+}
+
+static int
+versatile_sic_attach(device_t dev)
+{
+ struct versatile_sic_softc *sc = device_get_softc(dev);
+ uint32_t pass_irqs;
+ int rid;
+
+ sc->sc_dev = dev;
+
+ /* Request memory resources */
+ rid = 0;
+ sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
+ RF_ACTIVE);
+ if (sc->mem_res == NULL) {
+ device_printf(dev, "Error: could not allocate memory resources\n");
+ return (ENXIO);
+ }
+
+ /* Disable all interrupts on SIC */
+ sic_write_4(sc, SIC_ENCLR, 0xffffffff);
+
+ /*
+ * XXX: Enable IRQ3 for KMI
+ * Should be replaced by proper interrupts cascading
+ */
+ sic_write_4(sc, SIC_ENSET, (1 << 3));
+
+ /*
+ * Let PCI and Ethernet interrupts pass through
+ * IRQ25, IRQ27..IRQ31
+ */
+ pass_irqs = (7 << 27) | (1 << 25);
+ sic_write_4(sc, SIC_PICENSET, pass_irqs);
+
+ return (0);
+}
+
+static device_method_t versatile_sic_methods[] = {
+ DEVMETHOD(device_probe, versatile_sic_probe),
+ DEVMETHOD(device_attach, versatile_sic_attach),
+ { 0, 0 }
+};
+
+static driver_t versatile_sic_driver = {
+ "sic",
+ versatile_sic_methods,
+ sizeof(struct versatile_sic_softc),
+};
+
+static devclass_t versatile_sic_devclass;
+
+DRIVER_MODULE(sic, simplebus, versatile_sic_driver, versatile_sic_devclass, 0, 0);
diff --git a/sys/arm/versatile/versatile_timer.c b/sys/arm/versatile/versatile_timer.c
new file mode 100644
index 0000000..ab46a0a
--- /dev/null
+++ b/sys/arm/versatile/versatile_timer.c
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <sys/malloc.h>
+#include <sys/rman.h>
+#include <sys/timeet.h>
+#include <sys/timetc.h>
+#include <sys/watchdog.h>
+#include <machine/bus.h>
+#include <machine/cpu.h>
+#include <machine/frame.h>
+#include <machine/intr.h>
+
+#include <dev/fdt/fdt_common.h>
+#include <dev/ofw/openfirm.h>
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
+#include <machine/bus.h>
+#include <machine/fdt.h>
+
+void
+cpu_initclocks(void)
+{
+ cpu_initclocks_bsp();
+}
+
+
diff --git a/sys/arm/xscale/ixp425/if_npe.c b/sys/arm/xscale/ixp425/if_npe.c
index 5063ac6..21e3926 100644
--- a/sys/arm/xscale/ixp425/if_npe.c
+++ b/sys/arm/xscale/ixp425/if_npe.c
@@ -1064,7 +1064,7 @@ npe_rxbuf_init(struct npe_softc *sc, struct npebuf *npe, struct mbuf *m)
int error, nseg;
if (m == NULL) {
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return ENOBUFS;
}
@@ -1120,7 +1120,7 @@ npe_rxdone(int qid, void *arg)
* data up the stack and replace it with the newly
* allocated one.
*/
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m != NULL) {
struct mbuf *mrx = npe->ix_m;
struct npehwbuf *hw = npe->ix_hw;
@@ -1316,7 +1316,7 @@ npestart_locked(struct ifnet *ifp)
error = bus_dmamap_load_mbuf_sg(dma->mtag, npe->ix_map,
m, segs, &nseg, 0);
if (error == EFBIG) {
- n = m_collapse(m, M_DONTWAIT, NPE_MAXSEG);
+ n = m_collapse(m, M_NOWAIT, NPE_MAXSEG);
if (n == NULL) {
if_printf(ifp, "%s: too many fragments %u\n",
__func__, nseg);
diff --git a/sys/boot/arm/uboot/Makefile b/sys/boot/arm/uboot/Makefile
index c9940ed..1974218 100644
--- a/sys/boot/arm/uboot/Makefile
+++ b/sys/boot/arm/uboot/Makefile
@@ -109,6 +109,9 @@ CFLAGS+= -I${.OBJDIR}/../../uboot/lib
# where to get libstand from
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
+# clang doesn't understand %D as a specifier to printf
+NO_WERROR.clang=
+
DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND}
LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} -lstand
diff --git a/sys/boot/efi/libefi/libefi.c b/sys/boot/efi/libefi/libefi.c
index 9e921f3..45a48dc 100644
--- a/sys/boot/efi/libefi/libefi.c
+++ b/sys/boot/efi/libefi/libefi.c
@@ -135,7 +135,7 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table)
* first count the number of words. Then, after allocating the
* vector, we split the string up. We don't deal with quotes or
* other more advanced shell features.
- * The EFI shell will pas the name of the image as the first
+ * The EFI shell will pass the name of the image as the first
* word in the argument list. This does not happen if we're
* loaded by the boot manager. This is not so easy to figure
* out though. The ParentHandle is not always NULL, because
diff --git a/sys/boot/fdt/dts/pandaboard.dts b/sys/boot/fdt/dts/pandaboard.dts
index 0f262b1..d1fa803 100644
--- a/sys/boot/fdt/dts/pandaboard.dts
+++ b/sys/boot/fdt/dts/pandaboard.dts
@@ -67,6 +67,8 @@
pl310@48242000 {
compatible = "arm,pl310";
reg = < 0x48242000 0x1000 >;
+ interrupts = < 32 >;
+ interrupt-parent = < &GIC >;
};
mp_tmr@48240200 {
compatible = "arm,mpcore-timers";
diff --git a/sys/boot/fdt/dts/versatilepb.dts b/sys/boot/fdt/dts/versatilepb.dts
new file mode 100644
index 0000000..ca58e88
--- /dev/null
+++ b/sys/boot/fdt/dts/versatilepb.dts
@@ -0,0 +1,118 @@
+/*
+ * $FreeBSD$
+ */
+/dts-v1/;
+
+/ {
+ model = "ARM Versatile PB";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "arm,versatile-pb";
+
+ amba {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ intc: interrupt-controller {
+ compatible = "arm,versatile-vic";
+ reg = <0x10140000 0x1000>;
+
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+
+ sic: secondary-interrupt-controller {
+ compatible = "arm,versatile-sic";
+ reg = <0x10003000 0x28>;
+
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+
+ uart0: uart0 {
+ compatible = "arm,pl011", "arm,primecell";
+ reg = <0x101f1000 0x1000>;
+ interrupts = <12>;
+ interrupt-parent = <&intc>;
+ clock-frequency = <3000000>;
+ reg-shift = <2>;
+ };
+
+ uart1: uart1 {
+ compatible = "arm,pl011", "arm,primecell";
+ reg = <0x101f2000 0x1000>;
+ interrupts = <13>;
+ interrupt-parent = <&intc>;
+ clock-frequency = <3000000>;
+ reg-shift = <2>;
+ };
+
+ uart2: uart2 {
+ compatible = "arm,pl011", "arm,primecell";
+ reg = <0x101f3000 0x1000>;
+ interrupts = <14>;
+ interrupt-parent = <&intc>;
+ clock-frequency = <3000000>;
+ reg-shift = <2>;
+ };
+
+ timer0 {
+ compatible = "arm,sp804", "arm,primecell";
+ reg = <0x101e2000 0x40>;
+ interrupts = <4>;
+ interrupt-parent = <&intc>;
+ };
+
+ pci0 {
+
+ compatible = "versatile,pci";
+ reg = <0x10000044 0x4
+ 0x10001000 0x1000
+ 0x41000000 0x01000000
+ 0x42000000 0x02000000>;
+ };
+
+ net {
+ compatible = "smsc,lan91c111";
+ reg = <0x10010000 0x10000>;
+ interrupts = <25>;
+ interrupt-parent = <&intc>;
+ };
+
+ display {
+ compatible = "arm,pl110", "arm,primecell";
+ reg = <0x10000050 4
+ 0x10120000 0x1000>;
+ interrupts = <16>;
+ interrupt-parent = <&intc>;
+ };
+
+ /*
+ * Cut corner here: we do not have proper interrupt
+ * controllers cascading so just hardwire SIC IRQ 3
+ * to VIC IRQ31
+ */
+ kmi {
+ compatible = "arm,pl050", "arm,primecell";
+ reg = <0x10006000 0x1000>;
+ interrupt-parent = <&intc>;
+ interrupts = <31>;
+ };
+ };
+
+ memory {
+ device_type = "memory";
+ reg = <0 0x08000000>; /* 128MB */
+ };
+
+ aliases {
+ uart0 = &uart0;
+ };
+
+ chosen {
+ stdin = "uart0";
+ stdout = "uart0";
+ };
+};
diff --git a/sys/boot/ficl/Makefile b/sys/boot/ficl/Makefile
index 971faa7..77f4a8f 100644
--- a/sys/boot/ficl/Makefile
+++ b/sys/boot/ficl/Makefile
@@ -1,6 +1,13 @@
# $FreeBSD$
#
-.PATH: ${.CURDIR}/${MACHINE_CPUARCH:S/amd64/i386/}
+
+FICLDIR?= ${.CURDIR}
+
+.if !defined(FICL64)
+.PATH: ${FICLDIR}/${MACHINE_CPUARCH:S/amd64/i386/}
+.else
+.PATH: ${FICLDIR}/${MACHINE_CPUARCH}
+.endif
BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \
prefix.c search.c stack.c tools.c vm.c words.c
@@ -8,8 +15,10 @@ SRCS= ${BASE_SRCS} sysdep.c softcore.c
CLEANFILES= softcore.c testmain testmain.o
CFLAGS+= -ffreestanding
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
+.if !defined(FICL64)
CFLAGS+= -march=i386
CFLAGS+= -mpreferred-stack-boundary=2
+.endif
CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
.endif
.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm"
@@ -33,13 +42,13 @@ INTERNALLIB=
.endif
# Standard softwords
-.PATH: ${.CURDIR}/softwords
+.PATH: ${FICLDIR}/softwords
SOFTWORDS= softcore.fr jhlocal.fr marker.fr freebsd.fr ficllocal.fr \
ifbrack.fr
# Optional OO extension softwords
#SOFTWORDS+= oo.fr classes.fr
-.if ${MACHINE_CPUARCH} == "amd64"
+.if ${MACHINE_CPUARCH} == "amd64" && !defined(FICL64)
CFLAGS+= -m32 -I.
.endif
@@ -47,11 +56,11 @@ CFLAGS+= -m32 -I.
CFLAGS+= -m32 -mcpu=powerpc -I.
.endif
-CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${MACHINE_CPUARCH:S/amd64/i386/} \
- -I${.CURDIR}/../common
+CFLAGS+= -I${FICLDIR} -I${FICLDIR}/${MACHINE_CPUARCH:S/amd64/i386/} \
+ -I${FICLDIR}/../common
softcore.c: ${SOFTWORDS} softcore.awk
- (cd ${.CURDIR}/softwords; cat ${SOFTWORDS} \
+ (cd ${FICLDIR}/softwords; cat ${SOFTWORDS} \
| awk -f softcore.awk -v datestamp="`LC_ALL=C date`") > ${.TARGET}
.if ${MACHINE_CPUARCH} == "amd64"
diff --git a/sys/boot/ficl64/Makefile b/sys/boot/ficl64/Makefile
new file mode 100644
index 0000000..4c6777b
--- /dev/null
+++ b/sys/boot/ficl64/Makefile
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+FICL64=
+FICLDIR= ${.CURDIR}/../ficl
+
+.PATH: ${FICLDIR}
+
+.include "${FICLDIR}/Makefile"
diff --git a/sys/boot/forth/beastie.4th.8 b/sys/boot/forth/beastie.4th.8
index 679a082..30d29b2 100644
--- a/sys/boot/forth/beastie.4th.8
+++ b/sys/boot/forth/beastie.4th.8
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2011 Devin Teske
+.\" Copyright (c) 2011-2012 Devin Teske
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -94,8 +94,9 @@ The
variable can be configured in
.Xr loader.conf 5
to the number of seconds you would like to delay loading the boot menu.
-During the delay the user can press Ctrl-C to fall back to autoboot or ENTER
-to proceed.
+During the delay the user can press Ctrl-C to fall back to
+.Ic autoboot
+or ENTER to proceed.
The default behavior is to not delay.
.El
.Pp
diff --git a/sys/boot/forth/check-password.4th b/sys/boot/forth/check-password.4th
index 4728fc2..26d6b94 100644
--- a/sys/boot/forth/check-password.4th
+++ b/sys/boot/forth/check-password.4th
@@ -1,4 +1,4 @@
-\ Copyright (c) 2006-2011 Devin Teske <dteske@FreeBSD.org>
+\ Copyright (c) 2006-2012 Devin Teske <dteske@FreeBSD.org>
\ All rights reserved.
\
\ Redistribution and use in source and binary forms, with or without
@@ -74,7 +74,7 @@ variable readlen \ input length
again
;
-: read ( -- String prompt )
+: read ( String prompt -- )
0 25 at-xy \ Move the cursor to the bottom-left
dup 1+ read-start ! \ Store X offset after the prompt
@@ -134,23 +134,37 @@ variable readlen \ input length
: check-password ( -- )
- \ Exit if a password was not set
- s" password" getenv dup -1 = if
- drop exit
+ \ Do not allow the user to proceed beyond this point if a boot-lock
+ \ password has been set (preventing even boot from proceeding)
+ s" bootlock_password" getenv dup -1 <> if
+ begin
+ s" Boot Password: " read ( prompt -- )
+ 2dup readval readlen @ compare 0<>
+ while
+ 3000 ms ." loader: incorrect password" 10 emit
+ repeat
+ 2drop ( c-addr/u )
+ else
+ drop ( -1 ) \ getenv cruft
then
- begin \ Loop as long as it takes to get the right password
+ \ Exit if a password was not set
+ s" password" getenv -1 = if exit else drop then
+
+ \ We should prevent the user from visiting the menu or dropping to the
+ \ interactive loader(8) prompt, but still allow the machine to boot...
- s" Password: " \ Output a prompt for a password
- read \ Read the user's input until Enter
+ 0 autoboot
+ \ Only reached if autoboot fails for any reason (including if/when
+ \ the user aborts/escapes the countdown sequence leading to boot).
+
+ s" password" getenv
+ begin
+ s" Password: " read ( prompt -- )
2dup readval readlen @ compare 0= if
2drop exit \ Correct password
then
-
- \ Bad Password
- 3000 ms
- ." loader: incorrect password" 10 emit
-
- again \ Not the right password; repeat
+ 3000 ms ." loader: incorrect password" 10 emit
+ again
;
diff --git a/sys/boot/forth/check-password.4th.8 b/sys/boot/forth/check-password.4th.8
index b9c7b66..e1f52b7 100644
--- a/sys/boot/forth/check-password.4th.8
+++ b/sys/boot/forth/check-password.4th.8
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2011 Devin Teske
+.\" Copyright (c) 2011-2012 Devin Teske
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 18, 2011
+.Dd December 10, 2012
.Dt CHECK-PASSWORD.4TH 8
.Os
.Sh NAME
@@ -33,7 +33,8 @@
.Sh DESCRIPTION
The file that goes by the name of
.Nm
-is a set of commands designed to prevent booting without the proper password.
+is a set of commands designed to either prevent booting or prevent modification
+of boot options without an appropriately configured password.
The commands of
.Nm
by themselves are not enough for most uses.
@@ -57,30 +58,36 @@ The commands provided by it are:
.Pp
.Bl -tag -width disable-module_module -compact -offset indent
.It Ic check-password
-Once called, the user cannot continue until the correct password is entered.
-If the user enters the correct password the function returns.
+Dual-purpose function that can either protect the interactive boot menu or
+prevent boot without password (separately).
.Pp
-The password that is required is configured by setting the
-.Ic password
-variable in
-.Xr loader.conf 5 .
+First checks
+.Va bootlock_password
+and if-set, the user cannot continue until the correct password is entered.
.Pp
-Subsequent calls after a successful password
-has been entered will not cause reprompting
-\(em the function will silently return.
+Next checks
+.Va password
+and if-set, tries to
+.Ic autoboot
+and only prompts for password on failure or user-interrupt.
+See
+.Xr loader.conf 5
+for additional information.
.El
.Pp
The environment variables that effect its behavior are:
-.Bl -tag -width bootfile -offset indent
+.Bl -tag -width bootlock_password -offset indent
+.It Va bootlock_password
+Sets the bootlock password (up to 16 characters long) that is required by
+.Ic check-password
+to be entered before the system is allowed to boot.
.It Va password
Sets the password (up to 16 characters long) that is required by
.Ic check-password
-to be entered before the system is allowed to boot. If unset (default) or NULL,
-.Ic check-password
-will silently abort.
+before the user is allowed to visit the boot menu.
.El
.Sh FILES
-.Bl -tag -width /boot/loader.4th -compact
+.Bl -tag -width /boot/check-password.4th -compact
.It Pa /boot/loader
The
.Xr loader 8 .
@@ -101,11 +108,20 @@ check-password
.Ed
.Pp
Set a password in
-.Xr loader.conf 5 :
+.Xr loader.conf 5
+to prevent modification of boot options:
.Pp
.Bd -literal -offset indent -compact
password="abc123"
.Ed
+.Pp
+Set a password in
+.Xr loader.conf 5
+to prevent booting without password:
+.Pp
+.Bd -literal -offset indent -compact
+bootlock_password="boot"
+.Ed
.Sh SEE ALSO
.Xr loader.conf 5 ,
.Xr loader 8 ,
diff --git a/sys/boot/forth/frames.4th b/sys/boot/forth/frames.4th
index 3b1f404..5d6df24 100644
--- a/sys/boot/forth/frames.4th
+++ b/sys/boot/forth/frames.4th
@@ -12,6 +12,11 @@ variable rt_el
variable rb_el
variable fill
+\ ASCII frames (used when serial console is detected)
+ 45 constant ascii_dash
+124 constant ascii_pipe
+ 43 constant ascii_plus
+
s" arch-pc98" environment? [if]
\ Single frames
149 constant sh_el
@@ -63,7 +68,17 @@ s" arch-pc98" environment? [if]
loop
;
+: f_ascii ( -- ) ( -- ) \ set frames to ascii
+ ascii_dash h_el !
+ ascii_pipe v_el !
+ ascii_plus lt_el !
+ ascii_plus lb_el !
+ ascii_plus rt_el !
+ ascii_plus rb_el !
+;
+
: f_single ( -- ) \ set frames to single
+ boot_serial? if f_ascii exit then
sh_el h_el !
sv_el v_el !
slt_el lt_el !
@@ -73,6 +88,7 @@ s" arch-pc98" environment? [if]
;
: f_double ( -- ) \ set frames to double
+ boot_serial? if f_ascii exit then
dh_el h_el !
dv_el v_el !
dlt_el lt_el !
diff --git a/sys/boot/forth/loader.4th.8 b/sys/boot/forth/loader.4th.8
index 568aa84..6120364 100644
--- a/sys/boot/forth/loader.4th.8
+++ b/sys/boot/forth/loader.4th.8
@@ -99,7 +99,7 @@ This
is the command used in the default
.Pa /boot/loader.rc
file, and it uses the
-.Pa autoboot
+.Ic autoboot
command (see
.Xr loader 8 ) ,
so it can be stopped for further interaction with
diff --git a/sys/boot/forth/loader.conf.5 b/sys/boot/forth/loader.conf.5
index 5f7a0d7..0aa05e7 100644
--- a/sys/boot/forth/loader.conf.5
+++ b/sys/boot/forth/loader.conf.5
@@ -23,7 +23,7 @@
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
-.Dd July 20, 2011
+.Dd December 10, 2012
.Dt LOADER.CONF 5
.Os
.Sh NAME
@@ -113,8 +113,23 @@ that contains a kernel.
.It Ar kernel_options
Flags to be passed to the kernel.
.It Ar password
+Protect boot menu with a password without interrupting
+.Ic autoboot
+process.
+The password should be in clear text format.
+If a password is set, boot menu will not appear until any key is pressed during
+countdown period specified by
+.Va autoboot_delay
+variable or
+.Ic autoboot
+process fails.
+In both cases user should provide specified password to be able to access boot
+menu.
+.It Ar bootlock_password
Provides a password to be required by check-password before execution is
allowed to continue.
+The password should be in clear text format.
+If a password is set, the user must provide specified password to boot.
.It Ar verbose_loading
If set to
.Dq YES ,
diff --git a/sys/boot/forth/menu.4th.8 b/sys/boot/forth/menu.4th.8
index 457952f..044faee 100644
--- a/sys/boot/forth/menu.4th.8
+++ b/sys/boot/forth/menu.4th.8
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2011 Devin Teske
+.\" Copyright (c) 2011-2012 Devin Teske
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -108,8 +108,9 @@ will wait for user input and never execute
If set to
.Dq Li -1 ,
.Ic menu-display
-will boot immediately, preventing both interruption of the autoboot process and
-escaping to the loader prompt.
+will boot immediately, preventing both interruption of the
+.Ic autoboot
+process and escaping to the loader prompt.
Default is
.Dq Li 10 .
See
diff --git a/sys/boot/forth/support.4th b/sys/boot/forth/support.4th
index 3dbeae8..645e14d 100644
--- a/sys/boot/forth/support.4th
+++ b/sys/boot/forth/support.4th
@@ -201,6 +201,46 @@ create last_module_option sizeof module.next allot 0 last_module_option !
: getenv? getenv -1 = if false else drop true then ;
+\ determine if a word appears in a string, case-insensitive
+: contains? ( addr1 len1 addr2 len2 -- 0 | -1 )
+ 2 pick 0= if 2drop 2drop true exit then
+ dup 0= if 2drop 2drop false exit then
+ begin
+ begin
+ swap dup c@ dup 32 = over 9 = or over 10 = or
+ over 13 = or over 44 = or swap drop
+ while 1+ swap 1- repeat
+ swap 2 pick 1- over <
+ while
+ 2over 2over drop over compare-insensitive 0= if
+ 2 pick over = if 2drop 2drop true exit then
+ 2 pick tuck - -rot + swap over c@ dup 32 =
+ over 9 = or over 10 = or over 13 = or over 44 = or
+ swap drop if 2drop 2drop true exit then
+ then begin
+ swap dup c@ dup 32 = over 9 = or over 10 = or
+ over 13 = or over 44 = or swap drop
+ if false else true then 2 pick 0> and
+ while 1+ swap 1- repeat
+ swap
+ repeat
+ 2drop 2drop false
+;
+
+: boot_serial? ( -- 0 | -1 )
+ s" console" getenv dup -1 <> if
+ s" comconsole" 2swap contains?
+ else drop false then
+ s" boot_serial" getenv dup -1 <> if
+ swap drop 0>
+ else drop false then
+ or \ console contains comconsole ( or ) boot_serial
+ s" boot_multicons" getenv dup -1 <> if
+ swap drop 0>
+ else drop false then
+ or \ previous boolean ( or ) boot_multicons
+;
+
\ Private definitions
vocabulary support-functions
diff --git a/sys/boot/i386/efi/exec.c b/sys/boot/i386/efi/exec.c
index fefbf0b..579f559 100644
--- a/sys/boot/i386/efi/exec.c
+++ b/sys/boot/i386/efi/exec.c
@@ -46,14 +46,4 @@ __v86int()
void
__exec(caddr_t addr, ...)
{
- /* XXX this is wrong */
- __asm __volatile("movl %cr0, %eax");
- __asm __volatile("andl $0x7fffffff, %eax");
- __asm __volatile("mov %eax, %cr0");
- __asm __volatile("xorl %eax, %eax");
- __asm __volatile("mov %eax, %cr3");
- __asm __volatile("movl %cr0, %eax");
- __asm __volatile("andl $0xfffffffe, %eax");
- __asm __volatile("movl %eax, %cr0");
- __asm __volatile("jmp %0" :: "r" (addr));
}
diff --git a/sys/boot/i386/efi/ldscript.amd64 b/sys/boot/i386/efi/ldscript.amd64
index f99e730..face49e 100644
--- a/sys/boot/i386/efi/ldscript.amd64
+++ b/sys/boot/i386/efi/ldscript.amd64
@@ -50,19 +50,19 @@ SECTIONS
. = ALIGN(4096);
.dynamic : { *(.dynamic) }
. = ALIGN(4096);
- .rel.dyn : {
- *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
- *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
- *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
- *(.rel.got)
- *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
- *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
- *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
- *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
- *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
- *(.rel.plt)
+ .rela.dyn : {
+ *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
+ *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
+ *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
+ *(.rela.got)
+ *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
+ *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
+ *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
+ *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
+ *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
+ *(.rela.plt)
*(.relset_*)
- *(.rel.dyn .rel.dyn.*)
+ *(.rela.dyn .rela.dyn.*)
}
. = ALIGN(4096);
.reloc : { *(.reloc) }
diff --git a/sys/boot/i386/efi/reloc.c b/sys/boot/i386/efi/reloc.c
index 96f9241..22c6642 100644
--- a/sys/boot/i386/efi/reloc.c
+++ b/sys/boot/i386/efi/reloc.c
@@ -28,21 +28,31 @@
__FBSDID("$FreeBSD$");
#include <sys/types.h>
-#include <sys/elf32.h>
+#include <elf.h>
#include <efi.h>
#include <bootstrap.h>
+#ifdef __i386__
+#define ElfW_Rel Elf32_Rel
+#define ElfW_Dyn Elf32_Dyn
+#define ELFW_R_TYPE ELF32_R_TYPE
+#elif __amd64__
+#define ElfW_Rel Elf64_Rel
+#define ElfW_Dyn Elf64_Dyn
+#define ELFW_R_TYPE ELF64_R_TYPE
+#endif
+
/*
- * A simple relocator for IA32 EFI binaries.
+ * A simple relocator for IA32/AMD64 EFI binaries.
*/
EFI_STATUS
-_reloc(unsigned long ImageBase, Elf32_Dyn *dynamic, EFI_HANDLE image_handle,
+_reloc(unsigned long ImageBase, ElfW_Dyn *dynamic, EFI_HANDLE image_handle,
EFI_SYSTEM_TABLE *system_table)
{
unsigned long relsz, relent;
unsigned long *newaddr;
- Elf32_Rel *rel;
- Elf32_Dyn *dynp;
+ ElfW_Rel *rel;
+ ElfW_Dyn *dynp;
/*
* Find the relocation address, its size and the relocation entry.
@@ -51,14 +61,17 @@ _reloc(unsigned long ImageBase, Elf32_Dyn *dynamic, EFI_HANDLE image_handle,
relent = 0;
for (dynp = dynamic; dynp->d_tag != DT_NULL; dynp++) {
switch (dynp->d_tag) {
+ case DT_RELA:
case DT_REL:
- rel = (Elf32_Rel *) ((unsigned long) dynp->d_un.d_ptr +
+ rel = (ElfW_Rel *) ((unsigned long) dynp->d_un.d_ptr +
ImageBase);
break;
case DT_RELSZ:
+ case DT_RELASZ:
relsz = dynp->d_un.d_val;
break;
case DT_RELENT:
+ case DT_RELAENT:
relent = dynp->d_un.d_val;
break;
default:
@@ -74,7 +87,7 @@ _reloc(unsigned long ImageBase, Elf32_Dyn *dynamic, EFI_HANDLE image_handle,
CTASSERT(R_386_NONE == R_X86_64_NONE);
CTASSERT(R_386_RELATIVE == R_X86_64_RELATIVE);
for (; relsz > 0; relsz -= relent) {
- switch (ELF32_R_TYPE(rel->r_info)) {
+ switch (ELFW_R_TYPE(rel->r_info)) {
case R_386_NONE:
/* No relocation needs be performed. */
break;
@@ -85,9 +98,9 @@ _reloc(unsigned long ImageBase, Elf32_Dyn *dynamic, EFI_HANDLE image_handle,
break;
default:
/* XXX: do we need other relocations ? */
- return (EFI_LOAD_ERROR);
+ break;
}
- rel = (Elf32_Rel *) ((caddr_t) rel + relent);
+ rel = (ElfW_Rel *) ((caddr_t) rel + relent);
}
return (EFI_SUCCESS);
diff --git a/sys/boot/sparc64/boot1/boot1.c b/sys/boot/sparc64/boot1/boot1.c
index d09365c..6c43c93 100644
--- a/sys/boot/sparc64/boot1/boot1.c
+++ b/sys/boot/sparc64/boot1/boot1.c
@@ -340,11 +340,11 @@ main(int ac, char **av)
}
#ifdef ZFSBOOT
- printf(" \n>> FreeBSD/sparc64 ZFS boot block\n Boot path: %s\n",
+ printf(" \n>> FreeBSD/sparc64 ZFS boot block\n Boot path: %s\n",
bootpath);
#else
- printf(" \n>> FreeBSD/sparc64 boot block\n Boot path: %s\n"
- " Boot loader: %s\n", "", bootpath, path);
+ printf(" \n>> FreeBSD/sparc64 boot block\n Boot path: %s\n"
+ " Boot loader: %s\n", bootpath, path);
#endif
if (domount(bootpath) == -1)
diff --git a/sys/boot/userboot/libstand/Makefile b/sys/boot/userboot/libstand/Makefile
index fa54b01..49c6bfb 100644
--- a/sys/boot/userboot/libstand/Makefile
+++ b/sys/boot/userboot/libstand/Makefile
@@ -94,7 +94,7 @@ SRCS+= uuid_equal.c uuid_is_nil.c
# _setjmp/_longjmp
.if ${MACHINE_CPUARCH} == "amd64"
-.PATH: ${.CURDIR}/amd64
+.PATH: ${S}/amd64
.elif ${MACHINE_ARCH} == "powerpc64"
.PATH: ${S}/powerpc
.else
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c
index b6e2b10..523e549 100644
--- a/sys/cam/cam_periph.c
+++ b/sys/cam/cam_periph.c
@@ -615,6 +615,14 @@ camperiphfree(struct cam_periph *periph)
}
/*
+ * We need to set this flag before dropping the topology lock, to
+ * let anyone who is traversing the list that this peripheral is
+ * about to be freed, and there will be no more reference count
+ * checks.
+ */
+ periph->flags |= CAM_PERIPH_FREE;
+
+ /*
* The peripheral destructor semantics dictate calling with only the
* SIM mutex held. Since it might sleep, it should not be called
* with the topology lock held.
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index b184dd1..304d8c7 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -2178,8 +2178,8 @@ xptperiphtraverse(struct cam_ed *device, struct cam_periph *start_periph,
* invalidated, but not peripherals that are scheduled to
* be freed. So instead of calling cam_periph_acquire(),
* which will fail if the periph has been invalidated, we
- * just check for the free flag here. If it is free, we
- * skip to the next periph.
+ * just check for the free flag here. If it is in the
+ * process of being freed, we skip to the next periph.
*/
if (periph->flags & CAM_PERIPH_FREE) {
next_periph = SLIST_NEXT(periph, periph_links);
@@ -2192,16 +2192,9 @@ xptperiphtraverse(struct cam_ed *device, struct cam_periph *start_periph,
*/
periph->refcount++;
- xpt_unlock_buses();
-
retval = tr_func(periph, arg);
/*
- * We need the lock for list traversal.
- */
- xpt_lock_buses();
-
- /*
* Grab the next peripheral before we release this one, so
* our next pointer is still valid.
*/
@@ -2283,11 +2276,6 @@ xptpdperiphtraverse(struct periph_driver **pdrv,
*/
periph->refcount++;
- /*
- * XXX KDM we have the toplogy lock here, but in
- * xptperiphtraverse(), we drop it before calling the
- * traversal function. Which is correct?
- */
retval = tr_func(periph, arg);
/*
diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c
index 2d65fc8..ac5eba7 100644
--- a/sys/cam/ctl/ctl.c
+++ b/sys/cam/ctl/ctl.c
@@ -351,7 +351,8 @@ static void ctl_ioctl_hard_startstop_callback(void *arg,
struct cfi_metatask *metatask);
static void ctl_ioctl_bbrread_callback(void *arg,struct cfi_metatask *metatask);
static int ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num,
- struct ctl_ooa *ooa_hdr);
+ struct ctl_ooa *ooa_hdr,
+ struct ctl_ooa_entry *kern_entries);
static int ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
struct thread *td);
uint32_t ctl_get_resindex(struct ctl_nexus *nexus);
@@ -1960,7 +1961,7 @@ ctl_ioctl_bbrread_callback(void *arg, struct cfi_metatask *metatask)
*/
static int
ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num,
- struct ctl_ooa *ooa_hdr)
+ struct ctl_ooa *ooa_hdr, struct ctl_ooa_entry *kern_entries)
{
union ctl_io *io;
int retval;
@@ -1970,7 +1971,7 @@ ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num,
for (io = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); (io != NULL);
(*cur_fill_num)++, io = (union ctl_io *)TAILQ_NEXT(&io->io_hdr,
ooa_links)) {
- struct ctl_ooa_entry *cur_entry, entry;
+ struct ctl_ooa_entry *entry;
/*
* If we've got more than we can fit, just count the
@@ -1979,36 +1980,29 @@ ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num,
if (*cur_fill_num >= ooa_hdr->alloc_num)
continue;
- cur_entry = &ooa_hdr->entries[*cur_fill_num];
+ entry = &kern_entries[*cur_fill_num];
- bzero(&entry, sizeof(entry));
-
- entry.tag_num = io->scsiio.tag_num;
- entry.lun_num = lun->lun;
+ entry->tag_num = io->scsiio.tag_num;
+ entry->lun_num = lun->lun;
#ifdef CTL_TIME_IO
- entry.start_bt = io->io_hdr.start_bt;
+ entry->start_bt = io->io_hdr.start_bt;
#endif
- bcopy(io->scsiio.cdb, entry.cdb, io->scsiio.cdb_len);
- entry.cdb_len = io->scsiio.cdb_len;
+ bcopy(io->scsiio.cdb, entry->cdb, io->scsiio.cdb_len);
+ entry->cdb_len = io->scsiio.cdb_len;
if (io->io_hdr.flags & CTL_FLAG_BLOCKED)
- entry.cmd_flags |= CTL_OOACMD_FLAG_BLOCKED;
+ entry->cmd_flags |= CTL_OOACMD_FLAG_BLOCKED;
if (io->io_hdr.flags & CTL_FLAG_DMA_INPROG)
- entry.cmd_flags |= CTL_OOACMD_FLAG_DMA;
+ entry->cmd_flags |= CTL_OOACMD_FLAG_DMA;
if (io->io_hdr.flags & CTL_FLAG_ABORT)
- entry.cmd_flags |= CTL_OOACMD_FLAG_ABORT;
+ entry->cmd_flags |= CTL_OOACMD_FLAG_ABORT;
if (io->io_hdr.flags & CTL_FLAG_IS_WAS_ON_RTR)
- entry.cmd_flags |= CTL_OOACMD_FLAG_RTR;
+ entry->cmd_flags |= CTL_OOACMD_FLAG_RTR;
if (io->io_hdr.flags & CTL_FLAG_DMA_QUEUED)
- entry.cmd_flags |= CTL_OOACMD_FLAG_DMA_QUEUED;
-
- retval = copyout(&entry, cur_entry, sizeof(entry));
-
- if (retval != 0)
- break;
+ entry->cmd_flags |= CTL_OOACMD_FLAG_DMA_QUEUED;
}
return (retval);
@@ -2391,6 +2385,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
case CTL_GET_OOA: {
struct ctl_lun *lun;
struct ctl_ooa *ooa_hdr;
+ struct ctl_ooa_entry *entries;
uint32_t cur_fill_num;
ooa_hdr = (struct ctl_ooa *)addr;
@@ -2414,11 +2409,20 @@ ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
break;
}
+ entries = malloc(ooa_hdr->alloc_len, M_CTL, M_WAITOK | M_ZERO);
+ if (entries == NULL) {
+ printf("%s: could not allocate %d bytes for OOA "
+ "dump\n", __func__, ooa_hdr->alloc_len);
+ retval = ENOMEM;
+ break;
+ }
+
mtx_lock(&softc->ctl_lock);
if (((ooa_hdr->flags & CTL_OOA_FLAG_ALL_LUNS) == 0)
&& ((ooa_hdr->lun_num > CTL_MAX_LUNS)
|| (softc->ctl_luns[ooa_hdr->lun_num] == NULL))) {
mtx_unlock(&softc->ctl_lock);
+ free(entries, M_CTL);
printf("%s: CTL_GET_OOA: invalid LUN %ju\n",
__func__, (uintmax_t)ooa_hdr->lun_num);
retval = EINVAL;
@@ -2430,24 +2434,31 @@ ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
if (ooa_hdr->flags & CTL_OOA_FLAG_ALL_LUNS) {
STAILQ_FOREACH(lun, &softc->lun_list, links) {
retval = ctl_ioctl_fill_ooa(lun, &cur_fill_num,
- ooa_hdr);
+ ooa_hdr, entries);
if (retval != 0)
break;
}
if (retval != 0) {
mtx_unlock(&softc->ctl_lock);
+ free(entries, M_CTL);
break;
}
} else {
lun = softc->ctl_luns[ooa_hdr->lun_num];
- retval = ctl_ioctl_fill_ooa(lun, &cur_fill_num,ooa_hdr);
+ retval = ctl_ioctl_fill_ooa(lun, &cur_fill_num,ooa_hdr,
+ entries);
}
mtx_unlock(&softc->ctl_lock);
ooa_hdr->fill_num = min(cur_fill_num, ooa_hdr->alloc_num);
ooa_hdr->fill_len = ooa_hdr->fill_num *
sizeof(struct ctl_ooa_entry);
+ retval = copyout(entries, ooa_hdr->entries, ooa_hdr->fill_len);
+ if (retval != 0) {
+ printf("%s: error copying out %d bytes for OOA dump\n",
+ __func__, ooa_hdr->fill_len);
+ }
getbintime(&ooa_hdr->cur_bt);
@@ -2458,6 +2469,8 @@ ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
ooa_hdr->dropped_num = 0;
ooa_hdr->status = CTL_OOA_OK;
}
+
+ free(entries, M_CTL);
break;
}
case CTL_CHECK_OOA: {
@@ -10782,9 +10795,9 @@ ctl_abort_task(union ctl_io *io)
(xio->io_hdr.flags &
CTL_FLAG_DMA_INPROG) ? " DMA" : "",
(xio->io_hdr.flags &
- CTL_FLAG_ABORT) ? " ABORT" : ""),
+ CTL_FLAG_ABORT) ? " ABORT" : "",
(xio->io_hdr.flags &
- CTL_FLAG_IS_WAS_ON_RTR ? " RTR" : "");
+ CTL_FLAG_IS_WAS_ON_RTR ? " RTR" : ""));
ctl_scsi_command_string(&xio->scsiio, NULL, &sb);
sbuf_finish(&sb);
printf("%s\n", sbuf_data(&sb));
diff --git a/sys/cam/ctl/ctl_frontend_cam_sim.c b/sys/cam/ctl/ctl_frontend_cam_sim.c
index fa72059..43e4d61d 100644
--- a/sys/cam/ctl/ctl_frontend_cam_sim.c
+++ b/sys/cam/ctl/ctl_frontend_cam_sim.c
@@ -275,7 +275,7 @@ cfcs_shutdown(void)
}
static void
-cfcs_online(void *arg)
+cfcs_onoffline(void *arg, int online)
{
struct cfcs_softc *softc;
union ccb *ccb;
@@ -283,13 +283,12 @@ cfcs_online(void *arg)
softc = (struct cfcs_softc *)arg;
mtx_lock(&softc->lock);
- softc->online = 1;
- mtx_unlock(&softc->lock);
+ softc->online = online;
ccb = xpt_alloc_ccb_nowait();
if (ccb == NULL) {
printf("%s: unable to allocate CCB for rescan\n", __func__);
- return;
+ goto bailout;
}
if (xpt_create_path(&ccb->ccb_h.path, xpt_periph,
@@ -297,37 +296,24 @@ cfcs_online(void *arg)
CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
printf("%s: can't allocate path for rescan\n", __func__);
xpt_free_ccb(ccb);
- return;
+ goto bailout;
}
xpt_rescan(ccb);
+
+bailout:
+ mtx_unlock(&softc->lock);
}
static void
-cfcs_offline(void *arg)
+cfcs_online(void *arg)
{
- struct cfcs_softc *softc;
- union ccb *ccb;
-
- softc = (struct cfcs_softc *)arg;
-
- mtx_lock(&softc->lock);
- softc->online = 0;
- mtx_unlock(&softc->lock);
-
- ccb = xpt_alloc_ccb_nowait();
- if (ccb == NULL) {
- printf("%s: unable to allocate CCB for rescan\n", __func__);
- return;
- }
+ cfcs_onoffline(arg, /*online*/ 1);
+}
- if (xpt_create_path(&ccb->ccb_h.path, xpt_periph,
- cam_sim_path(softc->sim), CAM_TARGET_WILDCARD,
- CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
- printf("%s: can't allocate path for rescan\n", __func__);
- xpt_free_ccb(ccb);
- return;
- }
- xpt_rescan(ccb);
+static void
+cfcs_offline(void *arg)
+{
+ cfcs_onoffline(arg, /*online*/ 0);
}
static int
diff --git a/sys/cam/ctl/scsi_ctl.c b/sys/cam/ctl/scsi_ctl.c
index c5809fc..59357123 100644
--- a/sys/cam/ctl/scsi_ctl.c
+++ b/sys/cam/ctl/scsi_ctl.c
@@ -1687,16 +1687,21 @@ ctlfe_onoffline(void *arg, int online)
set_wwnn = 0;
+ sim = bus_softc->sim;
+
+ CAM_SIM_LOCK(sim);
status = xpt_create_path(&path, /*periph*/ NULL, bus_softc->path_id,
CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD);
if (status != CAM_REQ_CMP) {
printf("%s: unable to create path!\n", __func__);
+ CAM_SIM_UNLOCK(sim);
return;
}
+ CAM_SIM_UNLOCK(sim);
+
ccb = (union ccb *)malloc(sizeof(*ccb), M_TEMP, M_WAITOK | M_ZERO);
xpt_setup_ccb(&ccb->ccb_h, path, CAM_PRIORITY_NONE);
- sim = xpt_path_sim(path);
/*
* Copan WWN format:
@@ -1822,8 +1827,6 @@ ctlfe_onoffline(void *arg, int online)
xpt_action(ccb);
- CAM_SIM_UNLOCK(sim);
-
if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
printf("%s: SIM %s (path id %d) target %s failed with "
"status %#x\n",
@@ -1836,9 +1839,12 @@ ctlfe_onoffline(void *arg, int online)
(online != 0) ? "enable" : "disable");
}
- free(ccb, M_TEMP);
xpt_free_path(path);
+ CAM_SIM_UNLOCK(sim);
+
+ free(ccb, M_TEMP);
+
return;
}
@@ -1882,27 +1888,30 @@ ctlfe_lun_enable(void *arg, struct ctl_id targ_id, int lun_id)
bus_softc = (struct ctlfe_softc *)arg;
+ sim = bus_softc->sim;
- status = xpt_create_path_unlocked(&path, /*periph*/ NULL,
- bus_softc->path_id,
- targ_id.id,
- lun_id);
+ CAM_SIM_LOCK(sim);
+
+ status = xpt_create_path(&path, /*periph*/ NULL, bus_softc->path_id,
+ targ_id.id, lun_id);
/* XXX KDM need some way to return status to CTL here? */
if (status != CAM_REQ_CMP) {
printf("%s: could not create path, status %#x\n", __func__,
status);
+ CAM_SIM_UNLOCK(sim);
return (1);
}
+ CAM_SIM_UNLOCK(sim);
softc = malloc(sizeof(*softc), M_CTLFE, M_WAITOK | M_ZERO);
- sim = xpt_path_sim(path);
- mtx_lock(sim->mtx);
+
+ CAM_SIM_LOCK(sim);
periph = cam_periph_find(path, "ctl");
if (periph != NULL) {
/* We've already got a periph, no need to alloc a new one. */
xpt_free_path(path);
free(softc, M_CTLFE);
- mtx_unlock(sim->mtx);
+ CAM_SIM_UNLOCK(sim);
return (0);
}
@@ -1920,10 +1929,10 @@ ctlfe_lun_enable(void *arg, struct ctl_id targ_id, int lun_id)
0,
softc);
- mtx_unlock(sim->mtx);
-
xpt_free_path(path);
+ CAM_SIM_UNLOCK(sim);
+
return (0);
}
diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c
index b15abbe..38dcd48 100644
--- a/sys/cam/scsi/scsi_ch.c
+++ b/sys/cam/scsi/scsi_ch.c
@@ -144,7 +144,8 @@ struct ch_softc {
ch_quirks quirks;
union ccb saved_ccb;
struct devstat *device_stats;
- struct cdev *dev;
+ struct cdev *dev;
+ int open_count;
int sc_picker; /* current picker */
@@ -237,6 +238,48 @@ chinit(void)
}
static void
+chdevgonecb(void *arg)
+{
+ struct cam_sim *sim;
+ struct ch_softc *softc;
+ struct cam_periph *periph;
+ int i;
+
+ periph = (struct cam_periph *)arg;
+ sim = periph->sim;
+ softc = (struct ch_softc *)periph->softc;
+
+ KASSERT(softc->open_count >= 0, ("Negative open count %d",
+ softc->open_count));
+
+ mtx_lock(sim->mtx);
+
+ /*
+ * When we get this callback, we will get no more close calls from
+ * devfs. So if we have any dangling opens, we need to release the
+ * reference held for that particular context.
+ */
+ for (i = 0; i < softc->open_count; i++)
+ cam_periph_release_locked(periph);
+
+ softc->open_count = 0;
+
+ /*
+ * Release the reference held for the device node, it is gone now.
+ */
+ cam_periph_release_locked(periph);
+
+ /*
+ * We reference the SIM lock directly here, instead of using
+ * cam_periph_unlock(). The reason is that the final call to
+ * cam_periph_release_locked() above could result in the periph
+ * getting freed. If that is the case, dereferencing the periph
+ * with a cam_periph_unlock() call would cause a page fault.
+ */
+ mtx_unlock(sim->mtx);
+}
+
+static void
choninvalidate(struct cam_periph *periph)
{
struct ch_softc *softc;
@@ -250,6 +293,12 @@ choninvalidate(struct cam_periph *periph)
softc->flags |= CH_FLAG_INVALID;
+ /*
+ * Tell devfs this device has gone away, and ask for a callback
+ * when it has cleaned up its state.
+ */
+ destroy_dev_sched_cb(softc->dev, chdevgonecb, periph);
+
xpt_print(periph->path, "lost device\n");
}
@@ -262,10 +311,9 @@ chcleanup(struct cam_periph *periph)
softc = (struct ch_softc *)periph->softc;
xpt_print(periph->path, "removing device entry\n");
+
devstat_remove_entry(softc->device_stats);
- cam_periph_unlock(periph);
- destroy_dev(softc->dev);
- cam_periph_lock(periph);
+
free(softc, M_DEVBUF);
}
@@ -359,6 +407,19 @@ chregister(struct cam_periph *periph, void *arg)
XPORT_DEVSTAT_TYPE(cpi.transport),
DEVSTAT_PRIORITY_OTHER);
+ /*
+ * Acquire a reference to the periph before we create the devfs
+ * instance for it. We'll release this reference once the devfs
+ * instance has been freed.
+ */
+ if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
+ xpt_print(periph->path, "%s: lost periph during "
+ "registration!\n", __func__);
+ cam_periph_lock(periph);
+ return (CAM_REQ_CMP_ERR);
+ }
+
+
/* Register the device */
softc->dev = make_dev(&ch_cdevsw, periph->unit_number, UID_ROOT,
GID_OPERATOR, 0600, "%s%d", periph->periph_name,
@@ -419,6 +480,9 @@ chopen(struct cdev *dev, int flags, int fmt, struct thread *td)
}
cam_periph_unhold(periph);
+
+ softc->open_count++;
+
cam_periph_unlock(periph);
return(error);
@@ -427,13 +491,36 @@ chopen(struct cdev *dev, int flags, int fmt, struct thread *td)
static int
chclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
+ struct cam_sim *sim;
struct cam_periph *periph;
+ struct ch_softc *softc;
periph = (struct cam_periph *)dev->si_drv1;
if (periph == NULL)
return(ENXIO);
- cam_periph_release(periph);
+ sim = periph->sim;
+ softc = (struct ch_softc *)periph->softc;
+
+ mtx_lock(sim->mtx);
+
+ softc->open_count--;
+
+ cam_periph_release_locked(periph);
+
+ /*
+ * We reference the SIM lock directly here, instead of using
+ * cam_periph_unlock(). The reason is that the call to
+ * cam_periph_release_locked() above could result in the periph
+ * getting freed. If that is the case, dereferencing the periph
+ * with a cam_periph_unlock() call would cause a page fault.
+ *
+ * cam_periph_release() avoids this problem using the same method,
+ * but we're manually acquiring and dropping the lock here to
+ * protect the open count and avoid another lock acquisition and
+ * release.
+ */
+ mtx_unlock(sim->mtx);
return(0);
}
diff --git a/sys/cam/scsi/scsi_enc.c b/sys/cam/scsi/scsi_enc.c
index 658416b..bb7a1a0 100644
--- a/sys/cam/scsi/scsi_enc.c
+++ b/sys/cam/scsi/scsi_enc.c
@@ -111,11 +111,40 @@ enc_init(void)
static void
enc_devgonecb(void *arg)
{
+ struct cam_sim *sim;
struct cam_periph *periph;
+ struct enc_softc *enc;
+ int i;
periph = (struct cam_periph *)arg;
+ sim = periph->sim;
+ enc = (struct enc_softc *)periph->softc;
+
+ mtx_lock(sim->mtx);
+
+ /*
+ * When we get this callback, we will get no more close calls from
+ * devfs. So if we have any dangling opens, we need to release the
+ * reference held for that particular context.
+ */
+ for (i = 0; i < enc->open_count; i++)
+ cam_periph_release_locked(periph);
- cam_periph_release(periph);
+ enc->open_count = 0;
+
+ /*
+ * Release the reference held for the device node, it is gone now.
+ */
+ cam_periph_release_locked(periph);
+
+ /*
+ * We reference the SIM lock directly here, instead of using
+ * cam_periph_unlock(). The reason is that the final call to
+ * cam_periph_release_locked() above could result in the periph
+ * getting freed. If that is the case, dereferencing the periph
+ * with a cam_periph_unlock() call would cause a page fault.
+ */
+ mtx_unlock(sim->mtx);
}
static void
@@ -262,6 +291,8 @@ enc_open(struct cdev *dev, int flags, int fmt, struct thread *td)
out:
if (error != 0)
cam_periph_release_locked(periph);
+ else
+ softc->open_count++;
cam_periph_unlock(periph);
@@ -271,13 +302,36 @@ out:
static int
enc_close(struct cdev *dev, int flag, int fmt, struct thread *td)
{
+ struct cam_sim *sim;
struct cam_periph *periph;
+ struct enc_softc *enc;
periph = (struct cam_periph *)dev->si_drv1;
if (periph == NULL)
return (ENXIO);
- cam_periph_release(periph);
+ sim = periph->sim;
+ enc = periph->softc;
+
+ mtx_lock(sim->mtx);
+
+ enc->open_count--;
+
+ cam_periph_release_locked(periph);
+
+ /*
+ * We reference the SIM lock directly here, instead of using
+ * cam_periph_unlock(). The reason is that the call to
+ * cam_periph_release_locked() above could result in the periph
+ * getting freed. If that is the case, dereferencing the periph
+ * with a cam_periph_unlock() call would cause a page fault.
+ *
+ * cam_periph_release() avoids this problem using the same method,
+ * but we're manually acquiring and dropping the lock here to
+ * protect the open count and avoid another lock acquisition and
+ * release.
+ */
+ mtx_unlock(sim->mtx);
return (0);
}
@@ -946,6 +1000,11 @@ enc_ctor(struct cam_periph *periph, void *arg)
}
}
+ /*
+ * Acquire a reference to the periph before we create the devfs
+ * instance for it. We'll release this reference once the devfs
+ * instance has been freed.
+ */
if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
xpt_print(periph->path, "%s: lost periph during "
"registration!\n", __func__);
diff --git a/sys/cam/scsi/scsi_enc_internal.h b/sys/cam/scsi/scsi_enc_internal.h
index 865b8a1..f1b8582 100644
--- a/sys/cam/scsi/scsi_enc_internal.h
+++ b/sys/cam/scsi/scsi_enc_internal.h
@@ -148,6 +148,7 @@ struct enc_softc {
union ccb saved_ccb;
struct cdev *enc_dev;
struct cam_periph *periph;
+ int open_count;
/* Bitmap of pending operations. */
uint32_t pending_actions;
diff --git a/sys/cam/scsi/scsi_enc_ses.c b/sys/cam/scsi/scsi_enc_ses.c
index cbc9b90..79e96db 100644
--- a/sys/cam/scsi/scsi_enc_ses.c
+++ b/sys/cam/scsi/scsi_enc_ses.c
@@ -1272,13 +1272,10 @@ ses_process_pages(enc_softc_t *enc, struct enc_fsm_state *state,
err = 0;
for (i = 0; i < length; i++) {
- if (page->params[i] == SesElementDescriptor) {
+ if (page->params[i] == SesElementDescriptor)
ses->ses_flags |= SES_FLAG_DESC;
- break;
- } else if (page->params[i] == SesAddlElementStatus) {
+ else if (page->params[i] == SesAddlElementStatus)
ses->ses_flags |= SES_FLAG_ADDLSTATUS;
- break;
- }
}
out:
@@ -1804,8 +1801,7 @@ ses_process_elm_addlstatus(enc_softc_t *enc, struct enc_fsm_state *state,
ENC_VLOG(enc, "Element %d Beyond End "
"of Additional Element Status Descriptors\n",
iter.global_element_index);
- err = EIO;
- goto out;
+ break;
}
/* Advance to the protocol data, skipping eip bytes if needed */
@@ -1834,7 +1830,7 @@ ses_process_elm_addlstatus(enc_softc_t *enc, struct enc_fsm_state *state,
ENC_VLOG(enc, "Element %d: Unknown Additional Element "
"Protocol 0x%x\n", iter.global_element_index,
ses_elm_addlstatus_proto(elmpriv->addl.hdr));
- goto out;
+ break;
}
offset += proto_info_len;
diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c
index a3968f5..fa6af7c 100644
--- a/sys/cam/scsi/scsi_pass.c
+++ b/sys/cam/scsi/scsi_pass.c
@@ -76,6 +76,7 @@ struct pass_softc {
pass_flags flags;
u_int8_t pd_type;
union ccb saved_ccb;
+ int open_count;
struct devstat *device_stats;
struct cdev *dev;
struct cdev *alias_dev;
@@ -140,12 +141,43 @@ passinit(void)
static void
passdevgonecb(void *arg)
{
+ struct cam_sim *sim;
struct cam_periph *periph;
+ struct pass_softc *softc;
+ int i;
periph = (struct cam_periph *)arg;
+ sim = periph->sim;
+ softc = (struct pass_softc *)periph->softc;
+
+ KASSERT(softc->open_count >= 0, ("Negative open count %d",
+ softc->open_count));
+
+ mtx_lock(sim->mtx);
+
+ /*
+ * When we get this callback, we will get no more close calls from
+ * devfs. So if we have any dangling opens, we need to release the
+ * reference held for that particular context.
+ */
+ for (i = 0; i < softc->open_count; i++)
+ cam_periph_release_locked(periph);
+
+ softc->open_count = 0;
+
+ /*
+ * Release the reference held for the device node, it is gone now.
+ */
+ cam_periph_release_locked(periph);
- xpt_print(periph->path, "%s: devfs entry is gone\n", __func__);
- cam_periph_release(periph);
+ /*
+ * We reference the SIM lock directly here, instead of using
+ * cam_periph_unlock(). The reason is that the final call to
+ * cam_periph_release_locked() above could result in the periph
+ * getting freed. If that is the case, dereferencing the periph
+ * with a cam_periph_unlock() call would cause a page fault.
+ */
+ mtx_unlock(sim->mtx);
}
static void
@@ -368,7 +400,7 @@ passregister(struct cam_periph *periph, void *arg)
if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
xpt_print(periph->path, "%s: lost periph during "
"registration!\n", __func__);
- mtx_lock(periph->sim->mtx);
+ cam_periph_lock(periph);
return (CAM_REQ_CMP_ERR);
}
@@ -461,6 +493,8 @@ passopen(struct cdev *dev, int flags, int fmt, struct thread *td)
return(EINVAL);
}
+ softc->open_count++;
+
cam_periph_unlock(periph);
return (error);
@@ -469,13 +503,36 @@ passopen(struct cdev *dev, int flags, int fmt, struct thread *td)
static int
passclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
+ struct cam_sim *sim;
struct cam_periph *periph;
+ struct pass_softc *softc;
periph = (struct cam_periph *)dev->si_drv1;
if (periph == NULL)
return (ENXIO);
- cam_periph_release(periph);
+ sim = periph->sim;
+ softc = periph->softc;
+
+ mtx_lock(sim->mtx);
+
+ softc->open_count--;
+
+ cam_periph_release_locked(periph);
+
+ /*
+ * We reference the SIM lock directly here, instead of using
+ * cam_periph_unlock(). The reason is that the call to
+ * cam_periph_release_locked() above could result in the periph
+ * getting freed. If that is the case, dereferencing the periph
+ * with a cam_periph_unlock() call would cause a page fault.
+ *
+ * cam_periph_release() avoids this problem using the same method,
+ * but we're manually acquiring and dropping the lock here to
+ * protect the open count and avoid another lock acquisition and
+ * release.
+ */
+ mtx_unlock(sim->mtx);
return (0);
}
diff --git a/sys/cam/scsi/scsi_sg.c b/sys/cam/scsi/scsi_sg.c
index 7f64fea..9836e29 100644
--- a/sys/cam/scsi/scsi_sg.c
+++ b/sys/cam/scsi/scsi_sg.c
@@ -99,6 +99,7 @@ struct sg_rdwr {
struct sg_softc {
sg_state state;
sg_flags flags;
+ int open_count;
struct devstat *device_stats;
TAILQ_HEAD(, sg_rdwr) rdwr_done;
struct cdev *dev;
@@ -169,6 +170,49 @@ sginit(void)
}
static void
+sgdevgonecb(void *arg)
+{
+ struct cam_sim *sim;
+ struct cam_periph *periph;
+ struct sg_softc *softc;
+ int i;
+
+ periph = (struct cam_periph *)arg;
+ sim = periph->sim;
+ softc = (struct sg_softc *)periph->softc;
+
+ KASSERT(softc->open_count >= 0, ("Negative open count %d",
+ softc->open_count));
+
+ mtx_lock(sim->mtx);
+
+ /*
+ * When we get this callback, we will get no more close calls from
+ * devfs. So if we have any dangling opens, we need to release the
+ * reference held for that particular context.
+ */
+ for (i = 0; i < softc->open_count; i++)
+ cam_periph_release_locked(periph);
+
+ softc->open_count = 0;
+
+ /*
+ * Release the reference held for the device node, it is gone now.
+ */
+ cam_periph_release_locked(periph);
+
+ /*
+ * We reference the SIM lock directly here, instead of using
+ * cam_periph_unlock(). The reason is that the final call to
+ * cam_periph_release_locked() above could result in the periph
+ * getting freed. If that is the case, dereferencing the periph
+ * with a cam_periph_unlock() call would cause a page fault.
+ */
+ mtx_unlock(sim->mtx);
+}
+
+
+static void
sgoninvalidate(struct cam_periph *periph)
{
struct sg_softc *softc;
@@ -183,6 +227,12 @@ sgoninvalidate(struct cam_periph *periph)
softc->flags |= SG_FLAG_INVALID;
/*
+ * Tell devfs this device has gone away, and ask for a callback
+ * when it has cleaned up its state.
+ */
+ destroy_dev_sched_cb(softc->dev, sgdevgonecb, periph);
+
+ /*
* XXX Return all queued I/O with ENXIO.
* XXX Handle any transactions queued to the card
* with XPT_ABORT_CCB.
@@ -201,10 +251,9 @@ sgcleanup(struct cam_periph *periph)
softc = (struct sg_softc *)periph->softc;
if (bootverbose)
xpt_print(periph->path, "removing device entry\n");
+
devstat_remove_entry(softc->device_stats);
- cam_periph_unlock(periph);
- destroy_dev(softc->dev);
- cam_periph_lock(periph);
+
free(softc, M_DEVBUF);
}
@@ -299,6 +348,18 @@ sgregister(struct cam_periph *periph, void *arg)
DEVSTAT_TYPE_PASS,
DEVSTAT_PRIORITY_PASS);
+ /*
+ * Acquire a reference to the periph before we create the devfs
+ * instance for it. We'll release this reference once the devfs
+ * instance has been freed.
+ */
+ if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
+ xpt_print(periph->path, "%s: lost periph during "
+ "registration!\n", __func__);
+ cam_periph_lock(periph);
+ return (CAM_REQ_CMP_ERR);
+ }
+
/* Register the device */
softc->dev = make_dev(&sg_cdevsw, periph->unit_number,
UID_ROOT, GID_OPERATOR, 0600, "%s%d",
@@ -414,6 +475,8 @@ sgopen(struct cdev *dev, int flags, int fmt, struct thread *td)
return (ENXIO);
}
+ softc->open_count++;
+
cam_periph_unlock(periph);
return (error);
@@ -422,13 +485,36 @@ sgopen(struct cdev *dev, int flags, int fmt, struct thread *td)
static int
sgclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
+ struct cam_sim *sim;
struct cam_periph *periph;
+ struct sg_softc *softc;
periph = (struct cam_periph *)dev->si_drv1;
if (periph == NULL)
return (ENXIO);
- cam_periph_release(periph);
+ sim = periph->sim;
+ softc = periph->softc;
+
+ mtx_lock(sim->mtx);
+
+ softc->open_count--;
+
+ cam_periph_release_locked(periph);
+
+ /*
+ * We reference the SIM lock directly here, instead of using
+ * cam_periph_unlock(). The reason is that the call to
+ * cam_periph_release_locked() above could result in the periph
+ * getting freed. If that is the case, dereferencing the periph
+ * with a cam_periph_unlock() call would cause a page fault.
+ *
+ * cam_periph_release() avoids this problem using the same method,
+ * but we're manually acquiring and dropping the lock here to
+ * protect the open count and avoid another lock acquisition and
+ * release.
+ */
+ mtx_unlock(sim->mtx);
return (0);
}
diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_kstat.c b/sys/cddl/compat/opensolaris/kern/opensolaris_kstat.c
index 621aec0..ba65109 100644
--- a/sys/cddl/compat/opensolaris/kern/opensolaris_kstat.c
+++ b/sys/cddl/compat/opensolaris/kern/opensolaris_kstat.c
@@ -118,7 +118,7 @@ kstat_install(kstat_t *ksp)
SYSCTL_ADD_PROC(&ksp->ks_sysctl_ctx,
SYSCTL_CHILDREN(ksp->ks_sysctl_root), OID_AUTO, ksent->name,
CTLTYPE_U64 | CTLFLAG_RD, ksent, sizeof(*ksent),
- kstat_sysctl, "QU", "");
+ kstat_sysctl, "QU", ksent->desc);
}
}
diff --git a/sys/cddl/compat/opensolaris/sys/kstat.h b/sys/cddl/compat/opensolaris/sys/kstat.h
index d73bd22..acf6626 100644
--- a/sys/cddl/compat/opensolaris/sys/kstat.h
+++ b/sys/cddl/compat/opensolaris/sys/kstat.h
@@ -53,6 +53,8 @@ typedef struct kstat_named {
#define KSTAT_DATA_INT64 3
#define KSTAT_DATA_UINT64 4
uchar_t data_type;
+#define KSTAT_DESCLEN 128
+ char desc[KSTAT_DESCLEN];
union {
uint64_t ui64;
} value;
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
index c978f8a..4392ea8 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
@@ -3799,7 +3799,7 @@ spa_generate_rootconf(const char *name)
nvlist_lookup_uint64_array(best_cfg, ZPOOL_CONFIG_HOLE_ARRAY,
&holes, &nholes);
- tops = kmem_alloc(nchildren * sizeof(void *), KM_SLEEP | KM_ZERO);
+ tops = kmem_zalloc(nchildren * sizeof(void *), KM_SLEEP);
for (i = 0; i < nchildren; i++) {
if (i >= count)
break;
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
index 47a0bba..b6dc9f5 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
@@ -372,23 +372,23 @@ typedef struct zio_trim_stats {
/*
* Number of bytes successfully TRIMmed.
*/
- kstat_named_t zio_trim_bytes;
+ kstat_named_t bytes;
/*
* Number of successful TRIM requests.
*/
- kstat_named_t zio_trim_success;
+ kstat_named_t success;
/*
* Number of TRIM requests that failed because TRIM is not
* supported.
*/
- kstat_named_t zio_trim_unsupported;
+ kstat_named_t unsupported;
/*
* Number of TRIM requests that failed for other reasons.
*/
- kstat_named_t zio_trim_failed;
+ kstat_named_t failed;
} zio_trim_stats_t;
extern zio_trim_stats_t zio_trim_stats;
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c
index 5de5f2a..4bf0734 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c
@@ -28,6 +28,17 @@
#include <sys/vdev_impl.h>
#include <sys/trim_map.h>
+/*
+ * Calculate the zio end, upgrading based on ashift which would be
+ * done by zio_vdev_io_start.
+ *
+ * This makes free range consolidation much more effective
+ * than it would otherwise be as well as ensuring that entire
+ * blocks are invalidated by writes.
+ */
+#define TRIM_ZIO_END(zio) ((zio)->io_offset + \
+ P2ROUNDUP((zio)->io_size, 1ULL << (zio)->io_vd->vdev_top->vdev_ashift))
+
typedef struct trim_map {
list_t tm_head; /* List of segments sorted by txg. */
avl_tree_t tm_queued_frees; /* AVL tree of segments waiting for TRIM. */
@@ -270,7 +281,7 @@ trim_map_free(zio_t *zio)
return;
mutex_enter(&tm->tm_lock);
- trim_map_free_locked(tm, zio->io_offset, zio->io_offset + zio->io_size,
+ trim_map_free_locked(tm, zio->io_offset, TRIM_ZIO_END(zio),
vd->vdev_spa->spa_syncing_txg);
mutex_exit(&tm->tm_lock);
}
@@ -288,7 +299,7 @@ trim_map_write_start(zio_t *zio)
return (B_TRUE);
start = zio->io_offset;
- end = start + zio->io_size;
+ end = TRIM_ZIO_END(zio);
tsearch.ts_start = start;
tsearch.ts_end = end;
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
index 5a51dee..fd0382a 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
@@ -300,8 +300,8 @@ resize_configs(nvlist_t ***configs, uint64_t *count, uint64_t id)
if (id < *count)
return;
- new_configs = kmem_alloc((id + 1) * sizeof(nvlist_t *),
- KM_SLEEP | KM_ZERO);
+ new_configs = kmem_zalloc((id + 1) * sizeof(nvlist_t *),
+ KM_SLEEP);
for (i = 0; i < *count; i++)
new_configs[i] = (*configs)[i];
if (*configs != NULL)
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c
index 6cf9106..44f6c67 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c
@@ -148,6 +148,11 @@
#include <sys/trim_map.h>
#include <sys/fs/zfs.h>
+static boolean_t vdev_trim_on_init = B_TRUE;
+SYSCTL_DECL(_vfs_zfs_vdev);
+SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, trim_on_init, CTLFLAG_RW,
+ &vdev_trim_on_init, 0, "Enable/disable full vdev trim on initialisation");
+
/*
* Basic routines to read and write from a vdev label.
* Used throughout the rest of this file.
@@ -724,7 +729,7 @@ vdev_label_init(vdev_t *vd, uint64_t crtxg, vdev_labeltype_t reason)
* Don't TRIM if removing so that we don't interfere with zpool
* disaster recovery.
*/
- if (!zfs_notrim && (reason == VDEV_LABEL_CREATE ||
+ if (!zfs_notrim && vdev_trim_on_init && (reason == VDEV_LABEL_CREATE ||
reason == VDEV_LABEL_SPARE || reason == VDEV_LABEL_L2CACHE))
zio_wait(zio_trim(NULL, spa, vd, 0, vd->vdev_psize));
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
index c2720dc..7f40bd6 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
@@ -48,14 +48,15 @@ TUNABLE_INT("vfs.zfs.zio.exclude_metadata", &zio_exclude_metadata);
SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, exclude_metadata, CTLFLAG_RDTUN, &zio_exclude_metadata, 0,
"Exclude metadata buffers from dumps as well");
-/*
- * See zio.h for more information about these fields.
- */
zio_trim_stats_t zio_trim_stats = {
- { "zio_trim_bytes", KSTAT_DATA_UINT64 },
- { "zio_trim_success", KSTAT_DATA_UINT64 },
- { "zio_trim_unsupported", KSTAT_DATA_UINT64 },
- { "zio_trim_failed", KSTAT_DATA_UINT64 },
+ { "bytes", KSTAT_DATA_UINT64,
+ "Number of bytes successfully TRIMmed" },
+ { "success", KSTAT_DATA_UINT64,
+ "Number of successful TRIM requests" },
+ { "unsupported", KSTAT_DATA_UINT64,
+ "Number of TRIM requests that failed because TRIM is not supported" },
+ { "failed", KSTAT_DATA_UINT64,
+ "Number of TRIM requests that failed for reasons other than not supported" },
};
static kstat_t *zio_trim_ksp;
@@ -2447,7 +2448,7 @@ zio_free_zil(spa_t *spa, uint64_t txg, blkptr_t *bp)
/*
* ==========================================================================
- * Read and write to physical devices
+ * Read, write and delete to physical devices
* ==========================================================================
*/
static int
@@ -2660,14 +2661,14 @@ zio_vdev_io_assess(zio_t *zio)
if (zio->io_type == ZIO_TYPE_IOCTL && zio->io_cmd == DKIOCTRIM)
switch (zio->io_error) {
case 0:
- ZIO_TRIM_STAT_INCR(zio_trim_bytes, zio->io_size);
- ZIO_TRIM_STAT_BUMP(zio_trim_success);
+ ZIO_TRIM_STAT_INCR(bytes, zio->io_size);
+ ZIO_TRIM_STAT_BUMP(success);
break;
case EOPNOTSUPP:
- ZIO_TRIM_STAT_BUMP(zio_trim_unsupported);
+ ZIO_TRIM_STAT_BUMP(unsupported);
break;
default:
- ZIO_TRIM_STAT_BUMP(zio_trim_failed);
+ ZIO_TRIM_STAT_BUMP(failed);
break;
}
diff --git a/sys/cddl/dev/dtrace/dtrace_debug.c b/sys/cddl/dev/dtrace/dtrace_debug.c
index 7202fe2..3b29662 100644
--- a/sys/cddl/dev/dtrace/dtrace_debug.c
+++ b/sys/cddl/dev/dtrace/dtrace_debug.c
@@ -33,11 +33,10 @@
#include <machine/atomic.h>
-#define dtrace_cmpset_long atomic_cmpset_long
-
#define DTRACE_DEBUG_BUFR_SIZE (32 * 1024)
struct dtrace_debug_data {
+ uintptr_t lock __aligned(CACHE_LINE_SIZE);
char bufr[DTRACE_DEBUG_BUFR_SIZE];
char *first;
char *last;
@@ -46,20 +45,22 @@ struct dtrace_debug_data {
static char dtrace_debug_bufr[DTRACE_DEBUG_BUFR_SIZE];
-static volatile u_long dtrace_debug_flag[MAXCPU];
-
static void
dtrace_debug_lock(int cpu)
{
- while (dtrace_cmpset_long(&dtrace_debug_flag[cpu], 0, 1) == 0)
- /* Loop until the lock is obtained. */
+ uintptr_t tid;
+
+ tid = (uintptr_t)curthread;
+ spinlock_enter();
+ while (atomic_cmpset_acq_ptr(&dtrace_debug_data[cpu].lock, 0, tid) == 0) /* Loop until the lock is obtained. */
;
}
static void
dtrace_debug_unlock(int cpu)
{
- dtrace_debug_flag[cpu] = 0;
+ atomic_store_rel_ptr(&dtrace_debug_data[cpu].lock, 0);
+ spinlock_exit();
}
static void
@@ -151,10 +152,11 @@ dtrace_debug_output(void)
*/
static __inline void
-dtrace_debug__putc(char c)
+dtrace_debug__putc(int cpu, char c)
{
- struct dtrace_debug_data *d = &dtrace_debug_data[curcpu];
+ struct dtrace_debug_data *d;
+ d = &dtrace_debug_data[cpu];
*d->next++ = c;
if (d->next == d->last)
@@ -172,24 +174,30 @@ dtrace_debug__putc(char c)
static void __used
dtrace_debug_putc(char c)
{
- dtrace_debug_lock(curcpu);
+ int cpu;
+
+ cpu = curcpu;
+ dtrace_debug_lock(cpu);
- dtrace_debug__putc(c);
+ dtrace_debug__putc(cpu, c);
- dtrace_debug_unlock(curcpu);
+ dtrace_debug_unlock(cpu);
}
static void __used
dtrace_debug_puts(const char *s)
{
- dtrace_debug_lock(curcpu);
+ int cpu;
+
+ cpu = curcpu;
+ dtrace_debug_lock(cpu);
while (*s != '\0')
- dtrace_debug__putc(*s++);
+ dtrace_debug__putc(cpu, *s++);
- dtrace_debug__putc('\0');
+ dtrace_debug__putc(cpu, '\0');
- dtrace_debug_unlock(curcpu);
+ dtrace_debug_unlock(cpu);
}
/*
@@ -219,7 +227,7 @@ dtrace_debug_ksprintn(char *nbuf, uintmax_t num, int base, int *lenp, int upper)
#define MAXNBUF (sizeof(intmax_t) * NBBY + 1)
static void
-dtrace_debug_vprintf(const char *fmt, va_list ap)
+dtrace_debug_vprintf(int cpu, const char *fmt, va_list ap)
{
char nbuf[MAXNBUF];
const char *p, *percent, *q;
@@ -243,10 +251,10 @@ dtrace_debug_vprintf(const char *fmt, va_list ap)
width = 0;
while ((ch = (u_char)*fmt++) != '%' || stop) {
if (ch == '\0') {
- dtrace_debug__putc('\0');
+ dtrace_debug__putc(cpu, '\0');
return;
}
- dtrace_debug__putc(ch);
+ dtrace_debug__putc(cpu, ch);
}
percent = fmt - 1;
qflag = 0; lflag = 0; ladjust = 0; sharpflag = 0; neg = 0;
@@ -266,7 +274,7 @@ reswitch: switch (ch = (u_char)*fmt++) {
ladjust = 1;
goto reswitch;
case '%':
- dtrace_debug__putc(ch);
+ dtrace_debug__putc(cpu, ch);
break;
case '*':
if (!dot) {
@@ -301,7 +309,7 @@ reswitch: switch (ch = (u_char)*fmt++) {
num = (u_int)va_arg(ap, int);
p = va_arg(ap, char *);
for (q = dtrace_debug_ksprintn(nbuf, num, *p++, NULL, 0); *q;)
- dtrace_debug__putc(*q--);
+ dtrace_debug__putc(cpu, *q--);
if (num == 0)
break;
@@ -309,19 +317,19 @@ reswitch: switch (ch = (u_char)*fmt++) {
for (tmp = 0; *p;) {
n = *p++;
if (num & (1 << (n - 1))) {
- dtrace_debug__putc(tmp ? ',' : '<');
+ dtrace_debug__putc(cpu, tmp ? ',' : '<');
for (; (n = *p) > ' '; ++p)
- dtrace_debug__putc(n);
+ dtrace_debug__putc(cpu, n);
tmp = 1;
} else
for (; *p > ' '; ++p)
continue;
}
if (tmp)
- dtrace_debug__putc('>');
+ dtrace_debug__putc(cpu, '>');
break;
case 'c':
- dtrace_debug__putc(va_arg(ap, int));
+ dtrace_debug__putc(cpu, va_arg(ap, int));
break;
case 'D':
up = va_arg(ap, u_char *);
@@ -329,12 +337,12 @@ reswitch: switch (ch = (u_char)*fmt++) {
if (!width)
width = 16;
while(width--) {
- dtrace_debug__putc(hex2ascii(*up >> 4));
- dtrace_debug__putc(hex2ascii(*up & 0x0f));
+ dtrace_debug__putc(cpu, hex2ascii(*up >> 4));
+ dtrace_debug__putc(cpu, hex2ascii(*up & 0x0f));
up++;
if (width)
for (q=p;*q;q++)
- dtrace_debug__putc(*q);
+ dtrace_debug__putc(cpu, *q);
}
break;
case 'd':
@@ -406,12 +414,12 @@ reswitch: switch (ch = (u_char)*fmt++) {
if (!ladjust && width > 0)
while (width--)
- dtrace_debug__putc(padc);
+ dtrace_debug__putc(cpu, padc);
while (n--)
- dtrace_debug__putc(*p++);
+ dtrace_debug__putc(cpu, *p++);
if (ladjust && width > 0)
while (width--)
- dtrace_debug__putc(padc);
+ dtrace_debug__putc(cpu, padc);
break;
case 't':
tflag = 1;
@@ -485,32 +493,32 @@ number:
if (!ladjust && padc != '0' && width
&& (width -= tmp) > 0)
while (width--)
- dtrace_debug__putc(padc);
+ dtrace_debug__putc(cpu, padc);
if (neg)
- dtrace_debug__putc('-');
+ dtrace_debug__putc(cpu, '-');
if (sharpflag && num != 0) {
if (base == 8) {
- dtrace_debug__putc('0');
+ dtrace_debug__putc(cpu, '0');
} else if (base == 16) {
- dtrace_debug__putc('0');
- dtrace_debug__putc('x');
+ dtrace_debug__putc(cpu, '0');
+ dtrace_debug__putc(cpu, 'x');
}
}
if (!ladjust && width && (width -= tmp) > 0)
while (width--)
- dtrace_debug__putc(padc);
+ dtrace_debug__putc(cpu, padc);
while (*p)
- dtrace_debug__putc(*p--);
+ dtrace_debug__putc(cpu, *p--);
if (ladjust && width && (width -= tmp) > 0)
while (width--)
- dtrace_debug__putc(padc);
+ dtrace_debug__putc(cpu, padc);
break;
default:
while (percent < fmt)
- dtrace_debug__putc(*percent++);
+ dtrace_debug__putc(cpu, *percent++);
/*
* Since we ignore an formatting argument it is no
* longer safe to obey the remaining formatting
@@ -522,23 +530,25 @@ number:
}
}
- dtrace_debug__putc('\0');
+ dtrace_debug__putc(cpu, '\0');
}
void
dtrace_debug_printf(const char *fmt, ...)
{
va_list ap;
+ int cpu;
- dtrace_debug_lock(curcpu);
+ cpu = curcpu;
+ dtrace_debug_lock(cpu);
va_start(ap, fmt);
- dtrace_debug_vprintf(fmt, ap);
+ dtrace_debug_vprintf(cpu, fmt, ap);
va_end(ap);
- dtrace_debug_unlock(curcpu);
+ dtrace_debug_unlock(cpu);
}
#else
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index d8fcd2d..7271a18 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -1173,7 +1173,7 @@ linux_sendmsg(struct thread *td, struct linux_sendmsg_args *args)
error = ENOBUFS;
cmsg = malloc(CMSG_HDRSZ, M_TEMP, M_WAITOK | M_ZERO);
- control = m_get(M_WAIT, MT_CONTROL);
+ control = m_get(M_WAITOK, MT_CONTROL);
if (control == NULL)
goto bad;
diff --git a/sys/compat/ndis/kern_ndis.c b/sys/compat/ndis/kern_ndis.c
index ce7ee4c..23abaf1 100644
--- a/sys/compat/ndis/kern_ndis.c
+++ b/sys/compat/ndis/kern_ndis.c
@@ -657,12 +657,12 @@ ndis_ptom(m0, p)
for (buf = priv->npp_head; buf != NULL; buf = buf->mdl_next) {
if (buf == priv->npp_head)
#ifdef MT_HEADER
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
+ MGETHDR(m, M_NOWAIT, MT_HEADER);
#else
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
#endif
else
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
m_freem(*m0);
*m0 = NULL;
diff --git a/sys/conf/files b/sys/conf/files
index f80f76e..24f23ee 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -726,6 +726,8 @@ dev/ath/if_ath_rx.c optional ath \
compile-with "${NORMAL_C} -I$S/dev/ath"
dev/ath/if_ath_rx_edma.c optional ath \
compile-with "${NORMAL_C} -I$S/dev/ath"
+dev/ath/if_ath_spectral.c optional ath \
+ compile-with "${NORMAL_C} -I$S/dev/ath"
dev/ath/ah_osdep.c optional ath \
compile-with "${NORMAL_C} -I$S/dev/ath"
#
@@ -858,6 +860,10 @@ dev/ath/ath_hal/ar5416/ar5416_beacon.c \
optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
+dev/ath/ath_hal/ar5416/ar5416_btcoex.c \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
+ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5416/ar5416_cal.c \
optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
ath_ar9287 \
@@ -914,6 +920,10 @@ dev/ath/ath_hal/ar5416/ar5416_reset.c \
optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
+dev/ath/ath_hal/ar5416/ar5416_spectral.c \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
+ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5416/ar5416_xmit.c \
optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
ath_ar9287 \
@@ -941,6 +951,8 @@ dev/ath/ath_hal/ar9002/ar9280_olc.c optional ath_hal | ath_ar9280 | \
# ar9285 (depends on ar5416 and ar9280)
dev/ath/ath_hal/ar9002/ar9285_attach.c optional ath_hal | ath_ar9285 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
+dev/ath/ath_hal/ar9002/ar9285_btcoex.c optional ath_hal | ath_ar9285 \
+ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar9002/ar9285_reset.c optional ath_hal | ath_ar9285 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar9002/ar9285_cal.c optional ath_hal | ath_ar9285 \
@@ -2176,7 +2188,7 @@ dev/usb/net/if_udav.c optional udav
dev/usb/net/if_usie.c optional usie
dev/usb/net/ruephy.c optional rue
dev/usb/net/usb_ethernet.c optional aue | axe | cdce | cue | kue | mos | \
- rue | smsc | udav
+ rue | smsc | udav | ipheth
dev/usb/net/uhso.c optional uhso
#
# USB WLAN drivers
@@ -3505,15 +3517,15 @@ rpc/clnt_dg.c optional krpc | nfslockd | nfsclient | nfscl | nfsd
rpc/clnt_rc.c optional krpc | nfslockd | nfsclient | nfscl | nfsd
rpc/clnt_vc.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
rpc/getnetconfig.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
-rpc/replay.c optional krpc | nfslockd | nfsserver | nfscl | nfsd
+rpc/replay.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
rpc/rpc_callmsg.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
rpc/rpc_generic.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
rpc/rpc_prot.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
rpc/rpcb_clnt.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
rpc/rpcb_prot.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
-rpc/svc.c optional krpc | nfslockd | nfsserver | nfscl | nfsd
-rpc/svc_auth.c optional krpc | nfslockd | nfsserver | nfscl | nfsd
-rpc/svc_auth_unix.c optional krpc | nfslockd | nfsserver | nfscl | nfsd
+rpc/svc.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
+rpc/svc_auth.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
+rpc/svc_auth_unix.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
rpc/svc_dg.c optional krpc | nfslockd | nfsserver | nfscl | nfsd
rpc/svc_generic.c optional krpc | nfslockd | nfsserver | nfscl | nfsd
rpc/svc_vc.c optional krpc | nfslockd | nfsserver | nfscl | nfsd
@@ -3525,16 +3537,16 @@ rpc/rpcsec_gss/svc_rpcsec_gss.c optional krpc kgssapi | nfslockd kgssapi | nfscl
security/audit/audit.c optional audit
security/audit/audit_arg.c optional audit
security/audit/audit_bsm.c optional audit
-security/audit/audit_bsm_domain.c optional audit
-security/audit/audit_bsm_errno.c optional audit
-security/audit/audit_bsm_fcntl.c optional audit
security/audit/audit_bsm_klib.c optional audit
-security/audit/audit_bsm_socket_type.c optional audit
-security/audit/audit_bsm_token.c optional audit
security/audit/audit_pipe.c optional audit
security/audit/audit_syscalls.c standard
security/audit/audit_trigger.c optional audit
security/audit/audit_worker.c optional audit
+security/audit/bsm_domain.c optional audit
+security/audit/bsm_errno.c optional audit
+security/audit/bsm_fcntl.c optional audit
+security/audit/bsm_socket_type.c optional audit
+security/audit/bsm_token.c optional audit
security/mac/mac_atalk.c optional mac netatalk
security/mac/mac_audit.c optional mac audit
security/mac/mac_cred.c optional mac
diff --git a/sys/conf/files.arm b/sys/conf/files.arm
index 8d7904a..428757a 100644
--- a/sys/conf/files.arm
+++ b/sys/conf/files.arm
@@ -6,7 +6,7 @@ arm/arm/blockio.S standard
arm/arm/bootconfig.c standard
arm/arm/bus_space_asm_generic.S standard
arm/arm/busdma_machdep.c optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_sa1100 | cpu_sa1110 | cpu_xscale_80219 | cpu_xscale_80321 | cpu_xscale_81342 | cpu_xscale_ixp425 | cpu_xscale_ixp435 | cpu_xscale_pxa2x0
-arm/arm/busdma_machdep-v6.c optional cpu_arm11 | cpu_cortexa | cpu_mv_pj4b
+arm/arm/busdma_machdep-v6.c optional cpu_arm1136 | cpu_arm1176 | cpu_cortexa | cpu_mv_pj4b
arm/arm/copystr.S standard
arm/arm/cpufunc.c standard
arm/arm/cpufunc_asm.S standard
@@ -32,9 +32,10 @@ arm/arm/mem.c optional mem
arm/arm/minidump_machdep.c optional mem
arm/arm/mp_machdep.c optional smp
arm/arm/nexus.c standard
+arm/arm/pl190.c optional pl190
arm/arm/pl310.c optional pl310
arm/arm/pmap.c optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_sa1100 | cpu_sa1110 | cpu_xscale_80219 | cpu_xscale_80321 | cpu_xscale_81342 | cpu_xscale_ixp425 | cpu_xscale_ixp435 | cpu_xscale_pxa2x0
-arm/arm/pmap-v6.c optional cpu_arm11 | cpu_cortexa | cpu_mv_pj4b
+arm/arm/pmap-v6.c optional cpu_arm1136 | cpu_arm1176 | cpu_cortexa | cpu_mv_pj4b
arm/arm/sc_machdep.c optional sc
arm/arm/setcpsr.S standard
arm/arm/setstack.s standard
@@ -69,6 +70,7 @@ font.h optional sc \
compile-with "uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h" \
no-obj no-implicit-rule before-depend \
clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8"
+kern/subr_busdma_bufalloc.c standard
kern/subr_dummy_vdso_tc.c standard
libkern/arm/divsi3.S standard
libkern/arm/ffs.S standard
diff --git a/sys/conf/options.arm b/sys/conf/options.arm
index 2fe7b9f..37be6f4 100644
--- a/sys/conf/options.arm
+++ b/sys/conf/options.arm
@@ -11,7 +11,8 @@ ARM_WANT_TP_ADDRESS opt_global.h
COUNTS_PER_SEC opt_timer.h
CPU_ARM9 opt_global.h
CPU_ARM9E opt_global.h
-CPU_ARM11 opt_global.h
+CPU_ARM1136 opt_global.h
+CPU_ARM1176 opt_global.h
CPU_CORTEXA opt_global.h
CPU_FA526 opt_global.h
CPU_FA626TE opt_global.h
diff --git a/sys/dev/age/if_age.c b/sys/dev/age/if_age.c
index 7bc56a7..829f350 100644
--- a/sys/dev/age/if_age.c
+++ b/sys/dev/age/if_age.c
@@ -1521,7 +1521,7 @@ age_encap(struct age_softc *sc, struct mbuf **m_head)
if (M_WRITABLE(m) == 0) {
/* Get a writable copy. */
- m = m_dup(*m_head, M_DONTWAIT);
+ m = m_dup(*m_head, M_NOWAIT);
/* Release original mbufs. */
m_freem(*m_head);
if (m == NULL) {
@@ -1599,7 +1599,7 @@ age_encap(struct age_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->age_cdata.age_tx_tag, map,
*m_head, txsegs, &nsegs, 0);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, AGE_MAXTXSEGS);
+ m = m_collapse(*m_head, M_NOWAIT, AGE_MAXTXSEGS);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
@@ -3061,7 +3061,7 @@ age_newbuf(struct age_softc *sc, struct age_rxdesc *rxd)
AGE_LOCK_ASSERT(sc);
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES;
diff --git a/sys/dev/agp/agp_ali.c b/sys/dev/agp/agp_ali.c
index 7cd16ba..8aad840 100644
--- a/sys/dev/agp/agp_ali.c
+++ b/sys/dev/agp/agp_ali.c
@@ -69,7 +69,7 @@ agp_ali_match(device_t dev)
return ("Ali M1541 host to AGP bridge");
case 0x162110b9:
return ("Ali M1621 host to AGP bridge");
- };
+ }
return NULL;
}
diff --git a/sys/dev/agp/agp_amd.c b/sys/dev/agp/agp_amd.c
index 5e0d6d0..2b58a3e 100644
--- a/sys/dev/agp/agp_amd.c
+++ b/sys/dev/agp/agp_amd.c
@@ -191,7 +191,7 @@ agp_amd_match(device_t dev)
return ("AMD 761 host to AGP bridge");
case 0x700c1022:
return ("AMD 762 host to AGP bridge");
- };
+ }
return NULL;
}
diff --git a/sys/dev/agp/agp_amd64.c b/sys/dev/agp/agp_amd64.c
index d4d11ac..5423d5a 100644
--- a/sys/dev/agp/agp_amd64.c
+++ b/sys/dev/agp/agp_amd64.c
@@ -113,7 +113,7 @@ agp_amd64_match(device_t dev)
return ("VIA K8T800Pro host to PCI bridge");
case 0x31881106:
return ("VIA 8385 host to PCI bridge");
- };
+ }
return (NULL);
}
diff --git a/sys/dev/agp/agp_ati.c b/sys/dev/agp/agp_ati.c
index 350d846..c8e35ef 100644
--- a/sys/dev/agp/agp_ati.c
+++ b/sys/dev/agp/agp_ati.c
@@ -99,7 +99,7 @@ agp_ati_match(device_t dev)
return ("ATI RS300_166 AGP bridge");
case 0x58331002:
return ("ATI RS300_200 AGP bridge");
- };
+ }
return NULL;
}
@@ -199,7 +199,7 @@ agp_ati_attach(device_t dev)
default:
/* Unknown chipset */
return EINVAL;
- };
+ }
rid = ATI_GART_MMADDR;
sc->regs = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE);
diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c
index 2a7e885..21c7ce6 100644
--- a/sys/dev/agp/agp_i810.c
+++ b/sys/dev/agp/agp_i810.c
@@ -729,6 +729,11 @@ static const struct agp_i810_match {
.driver = &agp_i810_sb_driver
},
{
+ .devid = 0x016a8086,
+ .name = "IvyBridge server GT2 IG",
+ .driver = &agp_i810_sb_driver
+ },
+ {
.devid = 0,
}
};
diff --git a/sys/dev/agp/agp_intel.c b/sys/dev/agp/agp_intel.c
index 34ea66c..7197580 100644
--- a/sys/dev/agp/agp_intel.c
+++ b/sys/dev/agp/agp_intel.c
@@ -105,7 +105,7 @@ agp_intel_match(device_t dev)
return ("Intel 82845G host to AGP bridge");
case 0x35808086:
return ("Intel 82855GM host to AGP bridge");
- };
+ }
return (NULL);
}
diff --git a/sys/dev/agp/agp_sis.c b/sys/dev/agp/agp_sis.c
index e087ba9..91620de 100644
--- a/sys/dev/agp/agp_sis.c
+++ b/sys/dev/agp/agp_sis.c
@@ -101,7 +101,7 @@ agp_sis_match(device_t dev)
return ("SiS 745 host to AGP bridge");
case 0x07461039:
return ("SiS 746 host to AGP bridge");
- };
+ }
return NULL;
}
diff --git a/sys/dev/agp/agp_via.c b/sys/dev/agp/agp_via.c
index a6f3918..8b054fe 100644
--- a/sys/dev/agp/agp_via.c
+++ b/sys/dev/agp/agp_via.c
@@ -135,7 +135,7 @@ agp_via_match(device_t dev)
return ("VIA PT880 host to PCI bridge");
case 0xb1981106:
return ("VIA VT83xx/VT87xx/KTxxx/Px8xx host to PCI bridge");
- };
+ }
return NULL;
}
diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c
index 4a3c355..5882c86 100644
--- a/sys/dev/ahci/ahci.c
+++ b/sys/dev/ahci/ahci.c
@@ -122,6 +122,11 @@ static struct {
{0x43931002, 0x00, "ATI IXP700", 0},
{0x43941002, 0x00, "ATI IXP800", 0},
{0x43951002, 0x00, "ATI IXP800", 0},
+ {0x78001022, 0x00, "AMD Hudson-2", 0},
+ {0x78011022, 0x00, "AMD Hudson-2", 0},
+ {0x78021022, 0x00, "AMD Hudson-2", 0},
+ {0x78031022, 0x00, "AMD Hudson-2", 0},
+ {0x78041022, 0x00, "AMD Hudson-2", 0},
{0x06121b21, 0x00, "ASMedia ASM1061", 0},
{0x26528086, 0x00, "Intel ICH6", AHCI_Q_NOFORCE},
{0x26538086, 0x00, "Intel ICH6M", AHCI_Q_NOFORCE},
@@ -174,6 +179,14 @@ static struct {
{0x1e078086, 0x00, "Intel Panther Point", 0},
{0x1e0e8086, 0x00, "Intel Panther Point", 0},
{0x1e0f8086, 0x00, "Intel Panther Point", 0},
+ {0x8c028086, 0x00, "Intel Lynx Point", 0},
+ {0x8c038086, 0x00, "Intel Lynx Point", 0},
+ {0x8c048086, 0x00, "Intel Lynx Point", 0},
+ {0x8c058086, 0x00, "Intel Lynx Point", 0},
+ {0x8c068086, 0x00, "Intel Lynx Point", 0},
+ {0x8c078086, 0x00, "Intel Lynx Point", 0},
+ {0x8c0e8086, 0x00, "Intel Lynx Point", 0},
+ {0x8c0f8086, 0x00, "Intel Lynx Point", 0},
{0x23238086, 0x00, "Intel DH89xxCC", 0},
{0x2360197b, 0x00, "JMicron JMB360", 0},
{0x2361197b, 0x00, "JMicron JMB361", AHCI_Q_NOFORCE},
diff --git a/sys/dev/aic7xxx/aicasm/aicasm_gram.y b/sys/dev/aic7xxx/aicasm/aicasm_gram.y
index cc7475c..5c28f3b 100644
--- a/sys/dev/aic7xxx/aicasm/aicasm_gram.y
+++ b/sys/dev/aic7xxx/aicasm/aicasm_gram.y
@@ -103,7 +103,6 @@ static void add_version(const char *verstring);
static int is_download_const(expression_t *immed);
extern int yylex (void);
-extern int yyparse (void);
#define SRAM_SYMNAME "SRAM_BASE"
#define SCB_SYMNAME "SCB_BASE"
diff --git a/sys/dev/alc/if_alc.c b/sys/dev/alc/if_alc.c
index 9fa29b8..2ee9513 100644
--- a/sys/dev/alc/if_alc.c
+++ b/sys/dev/alc/if_alc.c
@@ -2047,7 +2047,7 @@ alc_encap(struct alc_softc *sc, struct mbuf **m_head)
if (M_WRITABLE(m) == 0) {
/* Get a writable copy. */
- m = m_dup(*m_head, M_DONTWAIT);
+ m = m_dup(*m_head, M_NOWAIT);
/* Release original mbufs. */
m_freem(*m_head);
if (m == NULL) {
@@ -2125,7 +2125,7 @@ alc_encap(struct alc_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->alc_cdata.alc_tx_tag, map,
*m_head, txsegs, &nsegs, 0);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, ALC_MAXTXSEGS);
+ m = m_collapse(*m_head, M_NOWAIT, ALC_MAXTXSEGS);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
@@ -2803,7 +2803,7 @@ alc_newbuf(struct alc_softc *sc, struct alc_rxdesc *rxd)
bus_dmamap_t map;
int nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = RX_BUF_SIZE_MAX;
@@ -2923,7 +2923,7 @@ alc_fixup_rx(struct ifnet *ifp, struct mbuf *m)
* header from the mbuf chain. This can save lots of CPU
* cycles for jumbo frame.
*/
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (n == NULL) {
ifp->if_iqdrops++;
m_freem(m);
diff --git a/sys/dev/ale/if_ale.c b/sys/dev/ale/if_ale.c
index f1f35ed..b5eb597 100644
--- a/sys/dev/ale/if_ale.c
+++ b/sys/dev/ale/if_ale.c
@@ -1640,7 +1640,7 @@ ale_encap(struct ale_softc *sc, struct mbuf **m_head)
if (M_WRITABLE(m) == 0) {
/* Get a writable copy. */
- m = m_dup(*m_head, M_DONTWAIT);
+ m = m_dup(*m_head, M_NOWAIT);
/* Release original mbufs. */
m_freem(*m_head);
if (m == NULL) {
@@ -1657,7 +1657,7 @@ ale_encap(struct ale_softc *sc, struct mbuf **m_head)
if ((sc->ale_flags & ALE_FLAG_TXCSUM_BUG) != 0 &&
(m->m_pkthdr.csum_flags & ALE_CSUM_FEATURES) != 0 &&
(mtod(m, intptr_t) & 3) != 0) {
- m = m_defrag(*m_head, M_DONTWAIT);
+ m = m_defrag(*m_head, M_NOWAIT);
if (m == NULL) {
*m_head = NULL;
return (ENOBUFS);
@@ -1742,7 +1742,7 @@ ale_encap(struct ale_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->ale_cdata.ale_tx_tag, map,
*m_head, txsegs, &nsegs, 0);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, ALE_MAXTXSEGS);
+ m = m_collapse(*m_head, M_NOWAIT, ALE_MAXTXSEGS);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
@@ -2932,7 +2932,7 @@ ale_stop_mac(struct ale_softc *sc)
reg = CSR_READ_4(sc, ALE_MAC_CFG);
if ((reg & (MAC_CFG_TX_ENB | MAC_CFG_RX_ENB)) != 0) {
- reg &= ~MAC_CFG_TX_ENB | MAC_CFG_RX_ENB;
+ reg &= ~(MAC_CFG_TX_ENB | MAC_CFG_RX_ENB);
CSR_WRITE_4(sc, ALE_MAC_CFG, reg);
}
diff --git a/sys/dev/an/if_an.c b/sys/dev/an/if_an.c
index 5d90850..b2a13df 100644
--- a/sys/dev/an/if_an.c
+++ b/sys/dev/an/if_an.c
@@ -946,12 +946,12 @@ an_rxeof(struct an_softc *sc)
/* dump raw 802.11 packet to bpf and skip ip stack */
BPF_TAP(ifp, bpf_buf, len);
} else {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
ifp->if_ierrors++;
return;
}
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!(m->m_flags & M_EXT)) {
m_freem(m);
ifp->if_ierrors++;
@@ -1037,12 +1037,12 @@ an_rxeof(struct an_softc *sc)
if (an_rx_desc.an_done && !an_rx_desc.an_valid) {
buf = sc->an_rx_buffer[count].an_dma_vaddr;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
ifp->if_ierrors++;
return;
}
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!(m->m_flags & M_EXT)) {
m_freem(m);
ifp->if_ierrors++;
diff --git a/sys/dev/arcmsr/arcmsr.c b/sys/dev/arcmsr/arcmsr.c
index af359be..2096a22 100644
--- a/sys/dev/arcmsr/arcmsr.c
+++ b/sys/dev/arcmsr/arcmsr.c
@@ -10,8 +10,7 @@
******************************************************************************************
************************************************************************
**
-** Copyright (c) 2004-2010 ARECA Co. Ltd.
-** Erich Chen, Taipei Taiwan All rights reserved.
+** Copyright (C) 2002 - 2010, Areca Technology Corporation All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions
@@ -74,6 +73,7 @@
** 1.20.00.23 01/30/2012 Ching Huang Fixed Request requeued and Retrying command
** 1.20.00.24 06/11/2012 Ching Huang Fixed return sense data condition
** 1.20.00.25 08/17/2012 Ching Huang Fixed hotplug device no function on type A adapter
+** 1.20.00.26 12/14/2012 Ching Huang Added support ARC1214
******************************************************************************************
*/
@@ -129,24 +129,10 @@ __FBSDID("$FreeBSD$");
#include <sys/endian.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
- #define ARCMSR_LOCK_INIT(l, s) mtx_init(l, s, NULL, MTX_DEF)
- #define ARCMSR_LOCK_DESTROY(l) mtx_destroy(l)
- #define ARCMSR_LOCK_ACQUIRE(l) mtx_lock(l)
- #define ARCMSR_LOCK_RELEASE(l) mtx_unlock(l)
- #define ARCMSR_LOCK_TRY(l) mtx_trylock(l)
- #define arcmsr_htole32(x) htole32(x)
- typedef struct mtx arcmsr_lock_t;
#else
#include <sys/select.h>
#include <pci/pcivar.h>
#include <pci/pcireg.h>
- #define ARCMSR_LOCK_INIT(l, s) simple_lock_init(l)
- #define ARCMSR_LOCK_DESTROY(l)
- #define ARCMSR_LOCK_ACQUIRE(l) simple_lock(l)
- #define ARCMSR_LOCK_RELEASE(l) simple_unlock(l)
- #define ARCMSR_LOCK_TRY(l) simple_lock_try(l)
- #define arcmsr_htole32(x) (x)
- typedef struct simplelock arcmsr_lock_t;
#endif
#if !defined(CAM_NEW_TRAN_CODE) && __FreeBSD_version >= 700025
@@ -159,23 +145,15 @@ __FBSDID("$FreeBSD$");
#define arcmsr_callout_init(a) callout_init(a);
#endif
-#define ARCMSR_DRIVER_VERSION "Driver Version 1.20.00.25 2012-08-17"
+#define ARCMSR_DRIVER_VERSION "Driver Version 1.20.00.26 2012-12-14"
#include <dev/arcmsr/arcmsr.h>
-#define SRB_SIZE ((sizeof(struct CommandControlBlock)+0x1f) & 0xffe0)
-#define ARCMSR_SRBS_POOL_SIZE (SRB_SIZE * ARCMSR_MAX_FREESRB_NUM)
-/*
-**************************************************************************
-**************************************************************************
-*/
-#define CHIP_REG_READ32(s, b, r) bus_space_read_4(acb->btag[b], acb->bhandle[b], offsetof(struct s, r))
-#define CHIP_REG_WRITE32(s, b, r, d) bus_space_write_4(acb->btag[b], acb->bhandle[b], offsetof(struct s, r), d)
/*
**************************************************************************
**************************************************************************
*/
static void arcmsr_free_srb(struct CommandControlBlock *srb);
-static struct CommandControlBlock * arcmsr_get_freesrb(struct AdapterControlBlock *acb);
-static u_int8_t arcmsr_seek_cmd2abort(union ccb * abortccb);
+static struct CommandControlBlock *arcmsr_get_freesrb(struct AdapterControlBlock *acb);
+static u_int8_t arcmsr_seek_cmd2abort(union ccb *abortccb);
static int arcmsr_probe(device_t dev);
static int arcmsr_attach(device_t dev);
static int arcmsr_detach(device_t dev);
@@ -190,18 +168,20 @@ static void arcmsr_stop_adapter_bgrb(struct AdapterControlBlock *acb);
static void arcmsr_start_adapter_bgrb(struct AdapterControlBlock *acb);
static void arcmsr_iop_init(struct AdapterControlBlock *acb);
static void arcmsr_flush_adapter_cache(struct AdapterControlBlock *acb);
-static void arcmsr_post_ioctldata2iop(struct AdapterControlBlock *acb);
+static void arcmsr_Read_iop_rqbuffer_data(struct AdapterControlBlock *acb, struct QBUFFER *prbuffer);
+static void arcmsr_Write_data_2iop_wqbuffer(struct AdapterControlBlock *acb);
static void arcmsr_abort_allcmd(struct AdapterControlBlock *acb);
static void arcmsr_srb_complete(struct CommandControlBlock *srb, int stand_flag);
static void arcmsr_iop_reset(struct AdapterControlBlock *acb);
static void arcmsr_report_sense_info(struct CommandControlBlock *srb);
-static void arcmsr_build_srb(struct CommandControlBlock *srb, bus_dma_segment_t * dm_segs, u_int32_t nseg);
-static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, union ccb * pccb);
+static void arcmsr_build_srb(struct CommandControlBlock *srb, bus_dma_segment_t *dm_segs, u_int32_t nseg);
+static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, union ccb *pccb);
static int arcmsr_resume(device_t dev);
static int arcmsr_suspend(device_t dev);
static void arcmsr_rescanLun_cb(struct cam_periph *periph, union ccb *ccb);
-static void arcmsr_polling_devmap(void* arg);
-static void arcmsr_srb_timeout(void* arg);
+static void arcmsr_polling_devmap(void *arg);
+static void arcmsr_srb_timeout(void *arg);
+static void arcmsr_hbd_postqueue_isr(struct AdapterControlBlock *acb);
#ifdef ARCMSR_DEBUG1
static void arcmsr_dump_data(struct AdapterControlBlock *acb);
#endif
@@ -293,12 +273,12 @@ static struct cdevsw arcmsr_cdevsw = {
#endif
{
#if __FreeBSD_version < 503000
- struct AdapterControlBlock *acb=dev->si_drv1;
+ struct AdapterControlBlock *acb = dev->si_drv1;
#else
int unit = dev2unit(dev);
struct AdapterControlBlock *acb = devclass_get_softc(arcmsr_devclass, unit);
#endif
- if(acb==NULL) {
+ if(acb == NULL) {
return ENXIO;
}
return (0);
@@ -318,12 +298,12 @@ static struct cdevsw arcmsr_cdevsw = {
#endif
{
#if __FreeBSD_version < 503000
- struct AdapterControlBlock *acb=dev->si_drv1;
+ struct AdapterControlBlock *acb = dev->si_drv1;
#else
int unit = dev2unit(dev);
struct AdapterControlBlock *acb = devclass_get_softc(arcmsr_devclass, unit);
#endif
- if(acb==NULL) {
+ if(acb == NULL) {
return ENXIO;
}
return 0;
@@ -343,13 +323,13 @@ static struct cdevsw arcmsr_cdevsw = {
#endif
{
#if __FreeBSD_version < 503000
- struct AdapterControlBlock *acb=dev->si_drv1;
+ struct AdapterControlBlock *acb = dev->si_drv1;
#else
int unit = dev2unit(dev);
struct AdapterControlBlock *acb = devclass_get_softc(arcmsr_devclass, unit);
#endif
- if(acb==NULL) {
+ if(acb == NULL) {
return ENXIO;
}
return (arcmsr_iop_ioctlcmd(acb, ioctl_cmd, arg));
@@ -360,28 +340,34 @@ static struct cdevsw arcmsr_cdevsw = {
*/
static u_int32_t arcmsr_disable_allintr( struct AdapterControlBlock *acb)
{
- u_int32_t intmask_org=0;
+ u_int32_t intmask_org = 0;
switch (acb->adapter_type) {
case ACB_ADAPTER_TYPE_A: {
/* disable all outbound interrupt */
- intmask_org=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intmask); /* disable outbound message0 int */
+ intmask_org = CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intmask); /* disable outbound message0 int */
CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intmask, intmask_org|ARCMSR_MU_OUTBOUND_ALL_INTMASKENABLE);
}
break;
case ACB_ADAPTER_TYPE_B: {
/* disable all outbound interrupt */
- intmask_org=CHIP_REG_READ32(HBB_DOORBELL,
+ intmask_org = CHIP_REG_READ32(HBB_DOORBELL,
0, iop2drv_doorbell_mask) & (~ARCMSR_IOP2DRV_MESSAGE_CMD_DONE); /* disable outbound message0 int */
CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell_mask, 0); /* disable all interrupt */
}
break;
case ACB_ADAPTER_TYPE_C: {
/* disable all outbound interrupt */
- intmask_org=CHIP_REG_READ32(HBC_MessageUnit, 0, host_int_mask) ; /* disable outbound message0 int */
+ intmask_org = CHIP_REG_READ32(HBC_MessageUnit, 0, host_int_mask) ; /* disable outbound message0 int */
CHIP_REG_WRITE32(HBC_MessageUnit, 0, host_int_mask, intmask_org|ARCMSR_HBCMU_ALL_INTMASKENABLE);
}
break;
+ case ACB_ADAPTER_TYPE_D: {
+ /* disable all outbound interrupt */
+ intmask_org = CHIP_REG_READ32(HBD_MessageUnit, 0, pcief0_int_enable) ; /* disable outbound message0 int */
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, pcief0_int_enable, ARCMSR_HBDMU_ALL_INT_DISABLE);
+ }
+ break;
}
return (intmask_org);
}
@@ -396,23 +382,31 @@ static void arcmsr_enable_allintr( struct AdapterControlBlock *acb, u_int32_t in
switch (acb->adapter_type) {
case ACB_ADAPTER_TYPE_A: {
/* enable outbound Post Queue, outbound doorbell Interrupt */
- mask=~(ARCMSR_MU_OUTBOUND_POSTQUEUE_INTMASKENABLE|ARCMSR_MU_OUTBOUND_DOORBELL_INTMASKENABLE|ARCMSR_MU_OUTBOUND_MESSAGE0_INTMASKENABLE);
+ mask = ~(ARCMSR_MU_OUTBOUND_POSTQUEUE_INTMASKENABLE|ARCMSR_MU_OUTBOUND_DOORBELL_INTMASKENABLE|ARCMSR_MU_OUTBOUND_MESSAGE0_INTMASKENABLE);
CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intmask, intmask_org & mask);
acb->outbound_int_enable = ~(intmask_org & mask) & 0x000000ff;
}
break;
case ACB_ADAPTER_TYPE_B: {
/* enable ARCMSR_IOP2DRV_MESSAGE_CMD_DONE */
- mask=(ARCMSR_IOP2DRV_DATA_WRITE_OK|ARCMSR_IOP2DRV_DATA_READ_OK|ARCMSR_IOP2DRV_CDB_DONE|ARCMSR_IOP2DRV_MESSAGE_CMD_DONE);
+ mask = (ARCMSR_IOP2DRV_DATA_WRITE_OK|ARCMSR_IOP2DRV_DATA_READ_OK|ARCMSR_IOP2DRV_CDB_DONE|ARCMSR_IOP2DRV_MESSAGE_CMD_DONE);
CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell_mask, intmask_org | mask); /*1=interrupt enable, 0=interrupt disable*/
acb->outbound_int_enable = (intmask_org | mask) & 0x0000000f;
}
break;
case ACB_ADAPTER_TYPE_C: {
/* enable outbound Post Queue, outbound doorbell Interrupt */
- mask=~(ARCMSR_HBCMU_UTILITY_A_ISR_MASK | ARCMSR_HBCMU_OUTBOUND_DOORBELL_ISR_MASK | ARCMSR_HBCMU_OUTBOUND_POSTQUEUE_ISR_MASK);
+ mask = ~(ARCMSR_HBCMU_UTILITY_A_ISR_MASK | ARCMSR_HBCMU_OUTBOUND_DOORBELL_ISR_MASK | ARCMSR_HBCMU_OUTBOUND_POSTQUEUE_ISR_MASK);
CHIP_REG_WRITE32(HBC_MessageUnit, 0, host_int_mask, intmask_org & mask);
- acb->outbound_int_enable= ~(intmask_org & mask) & 0x0000000f;
+ acb->outbound_int_enable = ~(intmask_org & mask) & 0x0000000f;
+ }
+ break;
+ case ACB_ADAPTER_TYPE_D: {
+ /* enable outbound Post Queue, outbound doorbell Interrupt */
+ mask = ARCMSR_HBDMU_ALL_INT_ENABLE;
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, pcief0_int_enable, intmask_org | mask);
+ CHIP_REG_READ32(HBD_MessageUnit, 0, pcief0_int_enable);
+ acb->outbound_int_enable = mask;
}
break;
}
@@ -424,7 +418,7 @@ static void arcmsr_enable_allintr( struct AdapterControlBlock *acb, u_int32_t in
static u_int8_t arcmsr_hba_wait_msgint_ready(struct AdapterControlBlock *acb)
{
u_int32_t Index;
- u_int8_t Retries=0x00;
+ u_int8_t Retries = 0x00;
do {
for(Index=0; Index < 100; Index++) {
@@ -444,7 +438,7 @@ static u_int8_t arcmsr_hba_wait_msgint_ready(struct AdapterControlBlock *acb)
static u_int8_t arcmsr_hbb_wait_msgint_ready(struct AdapterControlBlock *acb)
{
u_int32_t Index;
- u_int8_t Retries=0x00;
+ u_int8_t Retries = 0x00;
do {
for(Index=0; Index < 100; Index++) {
@@ -465,7 +459,7 @@ static u_int8_t arcmsr_hbb_wait_msgint_ready(struct AdapterControlBlock *acb)
static u_int8_t arcmsr_hbc_wait_msgint_ready(struct AdapterControlBlock *acb)
{
u_int32_t Index;
- u_int8_t Retries=0x00;
+ u_int8_t Retries = 0x00;
do {
for(Index=0; Index < 100; Index++) {
@@ -479,12 +473,32 @@ static u_int8_t arcmsr_hbc_wait_msgint_ready(struct AdapterControlBlock *acb)
return (FALSE);
}
/*
+**********************************************************************
+**********************************************************************
+*/
+static u_int8_t arcmsr_hbd_wait_msgint_ready(struct AdapterControlBlock *acb)
+{
+ u_int32_t Index;
+ u_int8_t Retries = 0x00;
+
+ do {
+ for(Index=0; Index < 100; Index++) {
+ if(CHIP_REG_READ32(HBD_MessageUnit, 0, outbound_doorbell) & ARCMSR_HBDMU_IOP2DRV_MESSAGE_CMD_DONE) {
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, outbound_doorbell, ARCMSR_HBDMU_IOP2DRV_MESSAGE_CMD_DONE_CLEAR);/*clear interrupt*/
+ return TRUE;
+ }
+ UDELAY(10000);
+ }/*max 1 seconds*/
+ }while(Retries++ < 20);/*max 20 sec*/
+ return (FALSE);
+}
+/*
************************************************************************
************************************************************************
*/
static void arcmsr_flush_hba_cache(struct AdapterControlBlock *acb)
{
- int retry_count=30;/* enlarge wait flush adapter cache time: 10 minute */
+ int retry_count = 30;/* enlarge wait flush adapter cache time: 10 minute */
CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_FLUSH_CACHE);
do {
@@ -493,7 +507,7 @@ static void arcmsr_flush_hba_cache(struct AdapterControlBlock *acb)
} else {
retry_count--;
}
- }while(retry_count!=0);
+ }while(retry_count != 0);
}
/*
************************************************************************
@@ -501,7 +515,7 @@ static void arcmsr_flush_hba_cache(struct AdapterControlBlock *acb)
*/
static void arcmsr_flush_hbb_cache(struct AdapterControlBlock *acb)
{
- int retry_count=30;/* enlarge wait flush adapter cache time: 10 minute */
+ int retry_count = 30;/* enlarge wait flush adapter cache time: 10 minute */
CHIP_REG_WRITE32(HBB_DOORBELL,
0, drv2iop_doorbell, ARCMSR_MESSAGE_FLUSH_CACHE);
@@ -511,7 +525,7 @@ static void arcmsr_flush_hbb_cache(struct AdapterControlBlock *acb)
} else {
retry_count--;
}
- }while(retry_count!=0);
+ }while(retry_count != 0);
}
/*
************************************************************************
@@ -519,7 +533,7 @@ static void arcmsr_flush_hbb_cache(struct AdapterControlBlock *acb)
*/
static void arcmsr_flush_hbc_cache(struct AdapterControlBlock *acb)
{
- int retry_count=30;/* enlarge wait flush adapter cache time: 10 minute */
+ int retry_count = 30;/* enlarge wait flush adapter cache time: 10 minute */
CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_FLUSH_CACHE);
CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_MESSAGE_CMD_DONE);
@@ -529,7 +543,24 @@ static void arcmsr_flush_hbc_cache(struct AdapterControlBlock *acb)
} else {
retry_count--;
}
- }while(retry_count!=0);
+ }while(retry_count != 0);
+}
+/*
+************************************************************************
+************************************************************************
+*/
+static void arcmsr_flush_hbd_cache(struct AdapterControlBlock *acb)
+{
+ int retry_count = 30; /* enlarge wait flush adapter cache time: 10 minute */
+
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_FLUSH_CACHE);
+ do {
+ if(arcmsr_hbd_wait_msgint_ready(acb)) {
+ break;
+ } else {
+ retry_count--;
+ }
+ }while(retry_count != 0);
}
/*
************************************************************************
@@ -550,6 +581,10 @@ static void arcmsr_flush_adapter_cache(struct AdapterControlBlock *acb)
arcmsr_flush_hbc_cache(acb);
}
break;
+ case ACB_ADAPTER_TYPE_D: {
+ arcmsr_flush_hbd_cache(acb);
+ }
+ break;
}
}
/*
@@ -585,14 +620,14 @@ static void arcmsr_async(void *cb_arg, u_int32_t code, struct cam_path *path, vo
{
struct AdapterControlBlock *acb;
u_int8_t target_id, target_lun;
- struct cam_sim * sim;
+ struct cam_sim *sim;
- sim=(struct cam_sim *) cb_arg;
+ sim = (struct cam_sim *) cb_arg;
acb =(struct AdapterControlBlock *) cam_sim_softc(sim);
switch (code) {
case AC_LOST_DEVICE:
- target_id=xpt_path_target_id(path);
- target_lun=xpt_path_lun_id(path);
+ target_id = xpt_path_target_id(path);
+ target_lun = xpt_path_lun_id(path);
if((target_id > ARCMSR_MAX_TARGETID) || (target_lun > ARCMSR_MAX_TARGETLUN)) {
break;
}
@@ -608,7 +643,7 @@ static void arcmsr_async(void *cb_arg, u_int32_t code, struct cam_path *path, vo
*/
static void arcmsr_report_sense_info(struct CommandControlBlock *srb)
{
- union ccb * pccb=srb->pccb;
+ union ccb *pccb = srb->pccb;
pccb->ccb_h.status |= CAM_SCSI_STATUS_ERROR;
pccb->csio.scsi_status = SCSI_STATUS_CHECK_COND;
@@ -658,6 +693,17 @@ static void arcmsr_abort_hbc_allcmd(struct AdapterControlBlock *acb)
*********************************************************************
*********************************************************************
*/
+static void arcmsr_abort_hbd_allcmd(struct AdapterControlBlock *acb)
+{
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_ABORT_CMD);
+ if(!arcmsr_hbd_wait_msgint_ready(acb)) {
+ printf("arcmsr%d: wait 'abort all outstanding command' timeout \n", acb->pci_unit);
+ }
+}
+/*
+*********************************************************************
+*********************************************************************
+*/
static void arcmsr_abort_allcmd(struct AdapterControlBlock *acb)
{
switch (acb->adapter_type) {
@@ -673,6 +719,10 @@ static void arcmsr_abort_allcmd(struct AdapterControlBlock *acb)
arcmsr_abort_hbc_allcmd(acb);
}
break;
+ case ACB_ADAPTER_TYPE_D: {
+ arcmsr_abort_hbd_allcmd(acb);
+ }
+ break;
}
}
/*
@@ -681,8 +731,8 @@ static void arcmsr_abort_allcmd(struct AdapterControlBlock *acb)
*/
static void arcmsr_srb_complete(struct CommandControlBlock *srb, int stand_flag)
{
- struct AdapterControlBlock *acb=srb->acb;
- union ccb * pccb=srb->pccb;
+ struct AdapterControlBlock *acb = srb->acb;
+ union ccb *pccb = srb->pccb;
if(srb->srb_flags & SRB_FLAG_TIMER_START)
callout_stop(&srb->ccb_callout);
@@ -697,19 +747,17 @@ static void arcmsr_srb_complete(struct CommandControlBlock *srb, int stand_flag)
bus_dmamap_sync(acb->dm_segs_dmat, srb->dm_segs_dmamap, op);
bus_dmamap_unload(acb->dm_segs_dmat, srb->dm_segs_dmamap);
}
- if(stand_flag==1) {
+ if(stand_flag == 1) {
atomic_subtract_int(&acb->srboutstandingcount, 1);
if((acb->acb_flags & ACB_F_CAM_DEV_QFRZN) && (
- acb->srboutstandingcount < ARCMSR_RELEASE_SIMQ_LEVEL)) {
+ acb->srboutstandingcount < (acb->firm_numbers_queue -10))) {
acb->acb_flags &= ~ACB_F_CAM_DEV_QFRZN;
pccb->ccb_h.status |= CAM_RELEASE_SIMQ;
}
}
if(srb->srb_state != ARCMSR_SRB_TIMEOUT)
arcmsr_free_srb(srb);
-#ifdef ARCMSR_DEBUG1
acb->pktReturnCount++;
-#endif
xpt_done(pccb);
}
/*
@@ -720,34 +768,34 @@ static void arcmsr_report_srb_state(struct AdapterControlBlock *acb, struct Comm
{
int target, lun;
- target=srb->pccb->ccb_h.target_id;
- lun=srb->pccb->ccb_h.target_lun;
+ target = srb->pccb->ccb_h.target_id;
+ lun = srb->pccb->ccb_h.target_lun;
if(error == FALSE) {
- if(acb->devstate[target][lun]==ARECA_RAID_GONE) {
- acb->devstate[target][lun]=ARECA_RAID_GOOD;
+ if(acb->devstate[target][lun] == ARECA_RAID_GONE) {
+ acb->devstate[target][lun] = ARECA_RAID_GOOD;
}
srb->pccb->ccb_h.status |= CAM_REQ_CMP;
arcmsr_srb_complete(srb, 1);
} else {
switch(srb->arcmsr_cdb.DeviceStatus) {
case ARCMSR_DEV_SELECT_TIMEOUT: {
- if(acb->devstate[target][lun]==ARECA_RAID_GOOD) {
+ if(acb->devstate[target][lun] == ARECA_RAID_GOOD) {
printf( "arcmsr%d: Target=%x, Lun=%x, selection timeout, raid volume was lost\n", acb->pci_unit, target, lun);
}
- acb->devstate[target][lun]=ARECA_RAID_GONE;
+ acb->devstate[target][lun] = ARECA_RAID_GONE;
srb->pccb->ccb_h.status |= CAM_DEV_NOT_THERE;
arcmsr_srb_complete(srb, 1);
}
break;
case ARCMSR_DEV_ABORTED:
case ARCMSR_DEV_INIT_FAIL: {
- acb->devstate[target][lun]=ARECA_RAID_GONE;
+ acb->devstate[target][lun] = ARECA_RAID_GONE;
srb->pccb->ccb_h.status |= CAM_DEV_NOT_THERE;
arcmsr_srb_complete(srb, 1);
}
break;
case SCSISTAT_CHECK_CONDITION: {
- acb->devstate[target][lun]=ARECA_RAID_GOOD;
+ acb->devstate[target][lun] = ARECA_RAID_GOOD;
arcmsr_report_sense_info(srb);
arcmsr_srb_complete(srb, 1);
}
@@ -755,7 +803,7 @@ static void arcmsr_report_srb_state(struct AdapterControlBlock *acb, struct Comm
default:
printf("arcmsr%d: scsi id=%d lun=%d isr got command error done,but got unknown DeviceStatus=0x%x \n"
, acb->pci_unit, target, lun ,srb->arcmsr_cdb.DeviceStatus);
- acb->devstate[target][lun]=ARECA_RAID_GONE;
+ acb->devstate[target][lun] = ARECA_RAID_GONE;
srb->pccb->ccb_h.status |= CAM_UNCOR_PARITY;
/*unknown error or crc error just for retry*/
arcmsr_srb_complete(srb, 1);
@@ -774,7 +822,8 @@ static void arcmsr_drain_donequeue(struct AdapterControlBlock *acb, u_int32_t fl
/* check if command done with no error*/
switch (acb->adapter_type) {
case ACB_ADAPTER_TYPE_C:
- srb = (struct CommandControlBlock *)(acb->vir2phy_offset+(flag_srb & 0xFFFFFFE0));/*frame must be 32 bytes aligned*/
+ case ACB_ADAPTER_TYPE_D:
+ srb = (struct CommandControlBlock *)(acb->vir2phy_offset+(flag_srb & 0xFFFFFFE0)); /*frame must be 32 bytes aligned*/
break;
case ACB_ADAPTER_TYPE_A:
case ACB_ADAPTER_TYPE_B:
@@ -782,7 +831,7 @@ static void arcmsr_drain_donequeue(struct AdapterControlBlock *acb, u_int32_t fl
srb = (struct CommandControlBlock *)(acb->vir2phy_offset+(flag_srb << 5));/*frame must be 32 bytes aligned*/
break;
}
- if((srb->acb!=acb) || (srb->srb_state!=ARCMSR_SRB_START)) {
+ if((srb->acb != acb) || (srb->srb_state != ARCMSR_SRB_START)) {
if(srb->srb_state == ARCMSR_SRB_TIMEOUT) {
arcmsr_free_srb(srb);
printf("arcmsr%d: srb='%p' return srb has been timeouted\n", acb->pci_unit, srb);
@@ -799,17 +848,17 @@ static void arcmsr_drain_donequeue(struct AdapterControlBlock *acb, u_int32_t fl
**************************************************************************
**************************************************************************
*/
-static void arcmsr_srb_timeout(void* arg)
+static void arcmsr_srb_timeout(void *arg)
{
struct CommandControlBlock *srb = (struct CommandControlBlock *)arg;
struct AdapterControlBlock *acb;
int target, lun;
u_int8_t cmd;
- target=srb->pccb->ccb_h.target_id;
- lun=srb->pccb->ccb_h.target_lun;
+ target = srb->pccb->ccb_h.target_id;
+ lun = srb->pccb->ccb_h.target_lun;
acb = srb->acb;
- ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
+ ARCMSR_LOCK_ACQUIRE(&acb->isr_lock);
if(srb->srb_state == ARCMSR_SRB_START)
{
cmd = srb->pccb->csio.cdb_io.cdb_bytes[0];
@@ -819,7 +868,7 @@ static void arcmsr_srb_timeout(void* arg)
printf("arcmsr%d: scsi id %d lun %d cmd=0x%x srb='%p' ccb command time out!\n",
acb->pci_unit, target, lun, cmd, srb);
}
- ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
+ ARCMSR_LOCK_RELEASE(&acb->isr_lock);
#ifdef ARCMSR_DEBUG1
arcmsr_dump_data(acb);
#endif
@@ -840,10 +889,10 @@ static void arcmsr_done4abort_postqueue(struct AdapterControlBlock *acb)
u_int32_t outbound_intstatus;
/*clear and abort all outbound posted Q*/
- outbound_intstatus=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & acb->outbound_int_enable;
+ outbound_intstatus = CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & acb->outbound_int_enable;
CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, outbound_intstatus);/*clear interrupt*/
while(((flag_srb=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_queueport)) != 0xFFFFFFFF) && (i++ < ARCMSR_MAX_OUTSTANDING_CMD)) {
- error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
+ error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
arcmsr_drain_donequeue(acb, flag_srb, error);
}
}
@@ -854,26 +903,30 @@ static void arcmsr_done4abort_postqueue(struct AdapterControlBlock *acb)
/*clear all outbound posted Q*/
CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell, ARCMSR_DOORBELL_INT_CLEAR_PATTERN); /* clear doorbell interrupt */
for(i=0; i < ARCMSR_MAX_HBB_POSTQUEUE; i++) {
- if((flag_srb=phbbmu->done_qbuffer[i])!=0) {
- phbbmu->done_qbuffer[i]=0;
- error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
+ if((flag_srb = phbbmu->done_qbuffer[i]) != 0) {
+ phbbmu->done_qbuffer[i] = 0;
+ error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
arcmsr_drain_donequeue(acb, flag_srb, error);
}
- phbbmu->post_qbuffer[i]=0;
+ phbbmu->post_qbuffer[i] = 0;
}/*drain reply FIFO*/
- phbbmu->doneq_index=0;
- phbbmu->postq_index=0;
+ phbbmu->doneq_index = 0;
+ phbbmu->postq_index = 0;
}
break;
case ACB_ADAPTER_TYPE_C: {
while((CHIP_REG_READ32(HBC_MessageUnit, 0, host_int_status) & ARCMSR_HBCMU_OUTBOUND_POSTQUEUE_ISR) && (i++ < ARCMSR_MAX_OUTSTANDING_CMD)) {
- flag_srb=CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_queueport_low);
- error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1)?TRUE:FALSE;
+ flag_srb = CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_queueport_low);
+ error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1) ? TRUE : FALSE;
arcmsr_drain_donequeue(acb, flag_srb, error);
}
}
break;
+ case ACB_ADAPTER_TYPE_D: {
+ arcmsr_hbd_postqueue_isr(acb);
+ }
+ break;
}
}
/*
@@ -888,15 +941,15 @@ static void arcmsr_iop_reset(struct AdapterControlBlock *acb)
if(acb->srboutstandingcount>0) {
/* disable all outbound interrupt */
- intmask_org=arcmsr_disable_allintr(acb);
+ intmask_org = arcmsr_disable_allintr(acb);
/*clear and abort all outbound posted Q*/
arcmsr_done4abort_postqueue(acb);
/* talk to iop 331 outstanding command aborted*/
arcmsr_abort_allcmd(acb);
- for(i=0;i<ARCMSR_MAX_FREESRB_NUM;i++) {
- srb=acb->psrb_pool[i];
- if(srb->srb_state==ARCMSR_SRB_START) {
- srb->srb_state=ARCMSR_SRB_ABORTED;
+ for(i=0; i < ARCMSR_MAX_FREESRB_NUM; i++) {
+ srb = acb->psrb_pool[i];
+ if(srb->srb_state == ARCMSR_SRB_START) {
+ srb->srb_state = ARCMSR_SRB_ABORTED;
srb->pccb->ccb_h.status |= CAM_REQ_ABORTED;
arcmsr_srb_complete(srb, 1);
printf("arcmsr%d: scsi id=%d lun=%d srb='%p' aborted\n"
@@ -907,13 +960,11 @@ static void arcmsr_iop_reset(struct AdapterControlBlock *acb)
/* enable all outbound interrupt */
arcmsr_enable_allintr(acb, intmask_org);
}
- acb->srboutstandingcount=0;
- acb->workingsrb_doneindex=0;
- acb->workingsrb_startindex=0;
-#ifdef ARCMSR_DEBUG1
+ acb->srboutstandingcount = 0;
+ acb->workingsrb_doneindex = 0;
+ acb->workingsrb_startindex = 0;
acb->pktRequestCount = 0;
acb->pktReturnCount = 0;
-#endif
}
/*
**********************************************************************
@@ -922,67 +973,66 @@ static void arcmsr_iop_reset(struct AdapterControlBlock *acb)
static void arcmsr_build_srb(struct CommandControlBlock *srb,
bus_dma_segment_t *dm_segs, u_int32_t nseg)
{
- struct ARCMSR_CDB * arcmsr_cdb= &srb->arcmsr_cdb;
- u_int8_t * psge=(u_int8_t *)&arcmsr_cdb->u;
+ struct ARCMSR_CDB *arcmsr_cdb = &srb->arcmsr_cdb;
+ u_int8_t *psge = (u_int8_t *)&arcmsr_cdb->u;
u_int32_t address_lo, address_hi;
- union ccb * pccb=srb->pccb;
- struct ccb_scsiio * pcsio= &pccb->csio;
- u_int32_t arccdbsize=0x30;
+ union ccb *pccb = srb->pccb;
+ struct ccb_scsiio *pcsio = &pccb->csio;
+ u_int32_t arccdbsize = 0x30;
memset(arcmsr_cdb, 0, sizeof(struct ARCMSR_CDB));
- arcmsr_cdb->Bus=0;
- arcmsr_cdb->TargetID=pccb->ccb_h.target_id;
- arcmsr_cdb->LUN=pccb->ccb_h.target_lun;
- arcmsr_cdb->Function=1;
- arcmsr_cdb->CdbLength=(u_int8_t)pcsio->cdb_len;
- arcmsr_cdb->Context=0;
+ arcmsr_cdb->Bus = 0;
+ arcmsr_cdb->TargetID = pccb->ccb_h.target_id;
+ arcmsr_cdb->LUN = pccb->ccb_h.target_lun;
+ arcmsr_cdb->Function = 1;
+ arcmsr_cdb->CdbLength = (u_int8_t)pcsio->cdb_len;
bcopy(pcsio->cdb_io.cdb_bytes, arcmsr_cdb->Cdb, pcsio->cdb_len);
if(nseg != 0) {
- struct AdapterControlBlock *acb=srb->acb;
+ struct AdapterControlBlock *acb = srb->acb;
bus_dmasync_op_t op;
- u_int32_t length, i, cdb_sgcount=0;
+ u_int32_t length, i, cdb_sgcount = 0;
if((pccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) {
- op=BUS_DMASYNC_PREREAD;
+ op = BUS_DMASYNC_PREREAD;
} else {
- op=BUS_DMASYNC_PREWRITE;
- arcmsr_cdb->Flags|=ARCMSR_CDB_FLAG_WRITE;
- srb->srb_flags|=SRB_FLAG_WRITE;
+ op = BUS_DMASYNC_PREWRITE;
+ arcmsr_cdb->Flags |= ARCMSR_CDB_FLAG_WRITE;
+ srb->srb_flags |= SRB_FLAG_WRITE;
}
bus_dmamap_sync(acb->dm_segs_dmat, srb->dm_segs_dmamap, op);
- for(i=0;i<nseg;i++) {
+ for(i=0; i < nseg; i++) {
/* Get the physical address of the current data pointer */
- length=arcmsr_htole32(dm_segs[i].ds_len);
- address_lo=arcmsr_htole32(dma_addr_lo32(dm_segs[i].ds_addr));
- address_hi=arcmsr_htole32(dma_addr_hi32(dm_segs[i].ds_addr));
- if(address_hi==0) {
- struct SG32ENTRY * pdma_sg=(struct SG32ENTRY *)psge;
- pdma_sg->address=address_lo;
- pdma_sg->length=length;
+ length = arcmsr_htole32(dm_segs[i].ds_len);
+ address_lo = arcmsr_htole32(dma_addr_lo32(dm_segs[i].ds_addr));
+ address_hi = arcmsr_htole32(dma_addr_hi32(dm_segs[i].ds_addr));
+ if(address_hi == 0) {
+ struct SG32ENTRY *pdma_sg = (struct SG32ENTRY *)psge;
+ pdma_sg->address = address_lo;
+ pdma_sg->length = length;
psge += sizeof(struct SG32ENTRY);
arccdbsize += sizeof(struct SG32ENTRY);
} else {
- u_int32_t sg64s_size=0, tmplength=length;
+ u_int32_t sg64s_size = 0, tmplength = length;
while(1) {
u_int64_t span4G, length0;
- struct SG64ENTRY * pdma_sg=(struct SG64ENTRY *)psge;
+ struct SG64ENTRY *pdma_sg = (struct SG64ENTRY *)psge;
- span4G=(u_int64_t)address_lo + tmplength;
- pdma_sg->addresshigh=address_hi;
- pdma_sg->address=address_lo;
+ span4G = (u_int64_t)address_lo + tmplength;
+ pdma_sg->addresshigh = address_hi;
+ pdma_sg->address = address_lo;
if(span4G > 0x100000000) {
/*see if cross 4G boundary*/
- length0=0x100000000-address_lo;
- pdma_sg->length=(u_int32_t)length0|IS_SG64_ADDR;
- address_hi=address_hi+1;
- address_lo=0;
- tmplength=tmplength-(u_int32_t)length0;
+ length0 = 0x100000000-address_lo;
+ pdma_sg->length = (u_int32_t)length0 | IS_SG64_ADDR;
+ address_hi = address_hi+1;
+ address_lo = 0;
+ tmplength = tmplength - (u_int32_t)length0;
sg64s_size += sizeof(struct SG64ENTRY);
psge += sizeof(struct SG64ENTRY);
cdb_sgcount++;
} else {
- pdma_sg->length=tmplength|IS_SG64_ADDR;
+ pdma_sg->length = tmplength | IS_SG64_ADDR;
sg64s_size += sizeof(struct SG64ENTRY);
psge += sizeof(struct SG64ENTRY);
break;
@@ -992,15 +1042,16 @@ static void arcmsr_build_srb(struct CommandControlBlock *srb,
}
cdb_sgcount++;
}
- arcmsr_cdb->sgcount=(u_int8_t)cdb_sgcount;
- arcmsr_cdb->DataLength=pcsio->dxfer_len;
+ arcmsr_cdb->sgcount = (u_int8_t)cdb_sgcount;
+ arcmsr_cdb->DataLength = pcsio->dxfer_len;
if( arccdbsize > 256) {
- arcmsr_cdb->Flags|=ARCMSR_CDB_FLAG_SGL_BSIZE;
+ arcmsr_cdb->Flags |= ARCMSR_CDB_FLAG_SGL_BSIZE;
}
} else {
arcmsr_cdb->DataLength = 0;
}
- srb->arc_cdb_size=arccdbsize;
+ srb->arc_cdb_size = arccdbsize;
+ arcmsr_cdb->msgPages = (arccdbsize/256) + ((arccdbsize % 256) ? 1 : 0);
}
/*
**************************************************************************
@@ -1008,46 +1059,45 @@ static void arcmsr_build_srb(struct CommandControlBlock *srb,
*/
static void arcmsr_post_srb(struct AdapterControlBlock *acb, struct CommandControlBlock *srb)
{
- u_int32_t cdb_shifted_phyaddr=(u_int32_t) srb->cdb_shifted_phyaddr;
- struct ARCMSR_CDB * arcmsr_cdb=(struct ARCMSR_CDB *)&srb->arcmsr_cdb;
+ u_int32_t cdb_phyaddr_low = (u_int32_t) srb->cdb_phyaddr_low;
+ struct ARCMSR_CDB *arcmsr_cdb = (struct ARCMSR_CDB *)&srb->arcmsr_cdb;
bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap, (srb->srb_flags & SRB_FLAG_WRITE) ? BUS_DMASYNC_POSTWRITE:BUS_DMASYNC_POSTREAD);
atomic_add_int(&acb->srboutstandingcount, 1);
- srb->srb_state=ARCMSR_SRB_START;
+ srb->srb_state = ARCMSR_SRB_START;
switch (acb->adapter_type) {
case ACB_ADAPTER_TYPE_A: {
if(arcmsr_cdb->Flags & ARCMSR_CDB_FLAG_SGL_BSIZE) {
- CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_queueport, cdb_shifted_phyaddr|ARCMSR_SRBPOST_FLAG_SGL_BSIZE);
+ CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_queueport, cdb_phyaddr_low|ARCMSR_SRBPOST_FLAG_SGL_BSIZE);
} else {
- CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_queueport, cdb_shifted_phyaddr);
+ CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_queueport, cdb_phyaddr_low);
}
}
break;
case ACB_ADAPTER_TYPE_B: {
- struct HBB_MessageUnit *phbbmu=(struct HBB_MessageUnit *)acb->pmu;
+ struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu;
int ending_index, index;
- index=phbbmu->postq_index;
- ending_index=((index+1)%ARCMSR_MAX_HBB_POSTQUEUE);
- phbbmu->post_qbuffer[ending_index]=0;
+ index = phbbmu->postq_index;
+ ending_index = ((index+1) % ARCMSR_MAX_HBB_POSTQUEUE);
+ phbbmu->post_qbuffer[ending_index] = 0;
if(arcmsr_cdb->Flags & ARCMSR_CDB_FLAG_SGL_BSIZE) {
- phbbmu->post_qbuffer[index]= cdb_shifted_phyaddr|ARCMSR_SRBPOST_FLAG_SGL_BSIZE;
+ phbbmu->post_qbuffer[index] = cdb_phyaddr_low | ARCMSR_SRBPOST_FLAG_SGL_BSIZE;
} else {
- phbbmu->post_qbuffer[index]= cdb_shifted_phyaddr;
+ phbbmu->post_qbuffer[index] = cdb_phyaddr_low;
}
index++;
index %= ARCMSR_MAX_HBB_POSTQUEUE; /*if last index number set it to 0 */
- phbbmu->postq_index=index;
+ phbbmu->postq_index = index;
CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_DRV2IOP_CDB_POSTED);
}
break;
- case ACB_ADAPTER_TYPE_C:
- {
+ case ACB_ADAPTER_TYPE_C: {
u_int32_t ccb_post_stamp, arc_cdb_size, cdb_phyaddr_hi32;
- arc_cdb_size=(srb->arc_cdb_size>0x300)?0x300:srb->arc_cdb_size;
- ccb_post_stamp=(cdb_shifted_phyaddr | ((arc_cdb_size-1) >> 6) | 1);
+ arc_cdb_size = (srb->arc_cdb_size > 0x300) ? 0x300 : srb->arc_cdb_size;
+ ccb_post_stamp = (cdb_phyaddr_low | ((arc_cdb_size-1) >> 6) | 1);
cdb_phyaddr_hi32 = acb->srb_phyaddr.B.phyadd_high;
if(cdb_phyaddr_hi32)
{
@@ -1060,33 +1110,67 @@ static void arcmsr_post_srb(struct AdapterControlBlock *acb, struct CommandContr
}
}
break;
+ case ACB_ADAPTER_TYPE_D: {
+ struct HBD_MessageUnit0 *phbdmu = (struct HBD_MessageUnit0 *)acb->pmu;
+ u_int16_t index_stripped;
+ u_int16_t postq_index;
+ struct InBound_SRB *pinbound_srb;
+
+ ARCMSR_LOCK_ACQUIRE(&acb->postDone_lock);
+ postq_index = phbdmu->postq_index;
+ pinbound_srb = (struct InBound_SRB *)&phbdmu->post_qbuffer[postq_index & 0xFF];
+ pinbound_srb->addressHigh = srb->cdb_phyaddr_high;
+ pinbound_srb->addressLow = srb->cdb_phyaddr_low;
+ pinbound_srb->length = srb->arc_cdb_size >> 2;
+ arcmsr_cdb->Context = srb->cdb_phyaddr_low;
+ if (postq_index & 0x4000) {
+ index_stripped = postq_index & 0xFF;
+ index_stripped += 1;
+ index_stripped %= ARCMSR_MAX_HBD_POSTQUEUE;
+ phbdmu->postq_index = index_stripped ? (index_stripped | 0x4000) : index_stripped;
+ } else {
+ index_stripped = postq_index;
+ index_stripped += 1;
+ index_stripped %= ARCMSR_MAX_HBD_POSTQUEUE;
+ phbdmu->postq_index = index_stripped ? index_stripped : (index_stripped | 0x4000);
+ }
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, inboundlist_write_pointer, postq_index);
+ ARCMSR_LOCK_RELEASE(&acb->postDone_lock);
+ }
+ break;
}
}
/*
************************************************************************
************************************************************************
*/
-static struct QBUFFER * arcmsr_get_iop_rqbuffer( struct AdapterControlBlock *acb)
+static struct QBUFFER *arcmsr_get_iop_rqbuffer( struct AdapterControlBlock *acb)
{
struct QBUFFER *qbuffer=NULL;
switch (acb->adapter_type) {
case ACB_ADAPTER_TYPE_A: {
- struct HBA_MessageUnit *phbamu=(struct HBA_MessageUnit *)acb->pmu;
+ struct HBA_MessageUnit *phbamu = (struct HBA_MessageUnit *)acb->pmu;
- qbuffer=(struct QBUFFER *)&phbamu->message_rbuffer;
+ qbuffer = (struct QBUFFER *)&phbamu->message_rbuffer;
}
break;
case ACB_ADAPTER_TYPE_B: {
- struct HBB_MessageUnit *phbbmu=(struct HBB_MessageUnit *)acb->pmu;
+ struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu;
- qbuffer=(struct QBUFFER *)&phbbmu->hbb_rwbuffer->message_rbuffer;
+ qbuffer = (struct QBUFFER *)&phbbmu->hbb_rwbuffer->message_rbuffer;
}
break;
case ACB_ADAPTER_TYPE_C: {
- struct HBC_MessageUnit *phbcmu=(struct HBC_MessageUnit *)acb->pmu;
+ struct HBC_MessageUnit *phbcmu = (struct HBC_MessageUnit *)acb->pmu;
- qbuffer=(struct QBUFFER *)&phbcmu->message_rbuffer;
+ qbuffer = (struct QBUFFER *)&phbcmu->message_rbuffer;
+ }
+ break;
+ case ACB_ADAPTER_TYPE_D: {
+ struct HBD_MessageUnit0 *phbdmu = (struct HBD_MessageUnit0 *)acb->pmu;
+
+ qbuffer = (struct QBUFFER *)&phbdmu->phbdmu->message_rbuffer;
}
break;
}
@@ -1096,27 +1180,33 @@ static struct QBUFFER * arcmsr_get_iop_rqbuffer( struct AdapterControlBlock *acb
************************************************************************
************************************************************************
*/
-static struct QBUFFER * arcmsr_get_iop_wqbuffer( struct AdapterControlBlock *acb)
+static struct QBUFFER *arcmsr_get_iop_wqbuffer( struct AdapterControlBlock *acb)
{
- struct QBUFFER *qbuffer=NULL;
+ struct QBUFFER *qbuffer = NULL;
switch (acb->adapter_type) {
case ACB_ADAPTER_TYPE_A: {
- struct HBA_MessageUnit *phbamu=(struct HBA_MessageUnit *)acb->pmu;
+ struct HBA_MessageUnit *phbamu = (struct HBA_MessageUnit *)acb->pmu;
- qbuffer=(struct QBUFFER *)&phbamu->message_wbuffer;
+ qbuffer = (struct QBUFFER *)&phbamu->message_wbuffer;
}
break;
case ACB_ADAPTER_TYPE_B: {
- struct HBB_MessageUnit *phbbmu=(struct HBB_MessageUnit *)acb->pmu;
+ struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu;
- qbuffer=(struct QBUFFER *)&phbbmu->hbb_rwbuffer->message_wbuffer;
+ qbuffer = (struct QBUFFER *)&phbbmu->hbb_rwbuffer->message_wbuffer;
}
break;
case ACB_ADAPTER_TYPE_C: {
- struct HBC_MessageUnit *phbcmu=(struct HBC_MessageUnit *)acb->pmu;
+ struct HBC_MessageUnit *phbcmu = (struct HBC_MessageUnit *)acb->pmu;
+
+ qbuffer = (struct QBUFFER *)&phbcmu->message_wbuffer;
+ }
+ break;
+ case ACB_ADAPTER_TYPE_D: {
+ struct HBD_MessageUnit0 *phbdmu = (struct HBD_MessageUnit0 *)acb->pmu;
- qbuffer=(struct QBUFFER *)&phbcmu->message_wbuffer;
+ qbuffer = (struct QBUFFER *)&phbdmu->phbdmu->message_wbuffer;
}
break;
}
@@ -1143,6 +1233,12 @@ static void arcmsr_iop_message_read(struct AdapterControlBlock *acb)
/* let IOP know data has been read */
CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_DATA_READ_OK);
}
+ break;
+ case ACB_ADAPTER_TYPE_D: {
+ /* let IOP know data has been read */
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, inbound_doorbell, ARCMSR_HBDMU_DRV2IOP_DATA_OUT_READ);
+ }
+ break;
}
}
/*
@@ -1176,37 +1272,14 @@ static void arcmsr_iop_message_wrote(struct AdapterControlBlock *acb)
CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_DATA_WRITE_OK);
}
break;
- }
-}
-/*
-**********************************************************************
-**********************************************************************
-*/
-static void arcmsr_post_ioctldata2iop(struct AdapterControlBlock *acb)
-{
- u_int8_t *pQbuffer;
- struct QBUFFER *pwbuffer;
- u_int8_t * iop_data;
- int32_t allxfer_len=0;
-
- pwbuffer=arcmsr_get_iop_wqbuffer(acb);
- iop_data=(u_int8_t *)pwbuffer->data;
- if(acb->acb_flags & ACB_F_MESSAGE_WQBUFFER_READ) {
- acb->acb_flags &= (~ACB_F_MESSAGE_WQBUFFER_READ);
- while((acb->wqbuf_firstindex!=acb->wqbuf_lastindex)
- && (allxfer_len<124)) {
- pQbuffer=&acb->wqbuffer[acb->wqbuf_firstindex];
- memcpy(iop_data, pQbuffer, 1);
- acb->wqbuf_firstindex++;
- acb->wqbuf_firstindex %=ARCMSR_MAX_QBUFFER; /*if last index number set it to 0 */
- iop_data++;
- allxfer_len++;
+ case ACB_ADAPTER_TYPE_D: {
+ /*
+ ** push inbound doorbell tell iop, driver data write ok
+ ** and wait reply on next hwinterrupt for next Qbuffer post
+ */
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, inbound_doorbell, ARCMSR_HBDMU_DRV2IOP_DATA_IN_READY);
}
- pwbuffer->data_len=allxfer_len;
- /*
- ** push inbound doorbell and wait reply at hwinterrupt routine for next Qbuffer post
- */
- arcmsr_iop_message_wrote(acb);
+ break;
}
}
/*
@@ -1215,7 +1288,7 @@ static void arcmsr_post_ioctldata2iop(struct AdapterControlBlock *acb)
*/
static void arcmsr_stop_hba_bgrb(struct AdapterControlBlock *acb)
{
- acb->acb_flags &=~ACB_F_MSG_START_BGRB;
+ acb->acb_flags &= ~ACB_F_MSG_START_BGRB;
CHIP_REG_WRITE32(HBA_MessageUnit,
0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_STOP_BGRB);
if(!arcmsr_hba_wait_msgint_ready(acb)) {
@@ -1243,7 +1316,7 @@ static void arcmsr_stop_hbb_bgrb(struct AdapterControlBlock *acb)
*/
static void arcmsr_stop_hbc_bgrb(struct AdapterControlBlock *acb)
{
- acb->acb_flags &=~ACB_F_MSG_START_BGRB;
+ acb->acb_flags &= ~ACB_F_MSG_START_BGRB;
CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_STOP_BGRB);
CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell,ARCMSR_HBCMU_DRV2IOP_MESSAGE_CMD_DONE);
if(!arcmsr_hbc_wait_msgint_ready(acb)) {
@@ -1254,6 +1327,18 @@ static void arcmsr_stop_hbc_bgrb(struct AdapterControlBlock *acb)
************************************************************************
************************************************************************
*/
+static void arcmsr_stop_hbd_bgrb(struct AdapterControlBlock *acb)
+{
+ acb->acb_flags &= ~ACB_F_MSG_START_BGRB;
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_STOP_BGRB);
+ if(!arcmsr_hbd_wait_msgint_ready(acb)) {
+ printf("arcmsr%d: wait 'stop adapter background rebulid' timeout \n", acb->pci_unit);
+ }
+}
+/*
+************************************************************************
+************************************************************************
+*/
static void arcmsr_stop_adapter_bgrb(struct AdapterControlBlock *acb)
{
switch (acb->adapter_type) {
@@ -1269,24 +1354,53 @@ static void arcmsr_stop_adapter_bgrb(struct AdapterControlBlock *acb)
arcmsr_stop_hbc_bgrb(acb);
}
break;
+ case ACB_ADAPTER_TYPE_D: {
+ arcmsr_stop_hbd_bgrb(acb);
+ }
+ break;
}
}
/*
************************************************************************
************************************************************************
*/
-static void arcmsr_poll(struct cam_sim * psim)
+static void arcmsr_poll(struct cam_sim *psim)
{
struct AdapterControlBlock *acb;
int mutex;
acb = (struct AdapterControlBlock *)cam_sim_softc(psim);
- mutex = mtx_owned(&acb->qbuffer_lock);
+ mutex = mtx_owned(&acb->isr_lock);
if( mutex == 0 )
- ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
+ ARCMSR_LOCK_ACQUIRE(&acb->isr_lock);
arcmsr_interrupt(acb);
if( mutex == 0 )
- ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
+ ARCMSR_LOCK_RELEASE(&acb->isr_lock);
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
+static void arcmsr_Read_iop_rqbuffer_data(struct AdapterControlBlock *acb,
+ struct QBUFFER *prbuffer) {
+
+ u_int8_t *pQbuffer;
+ u_int8_t *iop_data;
+ u_int32_t iop_len;
+
+ iop_data = (u_int8_t *)prbuffer->data;
+ iop_len = (u_int32_t)prbuffer->data_len;
+ while (iop_len > 0) {
+ pQbuffer = &acb->rqbuffer[acb->rqbuf_lastindex];
+ *pQbuffer = *iop_data;
+ acb->rqbuf_lastindex++;
+ /* if last, index number set it to 0 */
+ acb->rqbuf_lastindex %= ARCMSR_MAX_QBUFFER;
+ iop_data++;
+ iop_len--;
+ }
+ /* let IOP know data has been read */
+ arcmsr_iop_message_read(acb);
}
/*
**************************************************************************
@@ -1295,31 +1409,46 @@ static void arcmsr_poll(struct cam_sim * psim)
static void arcmsr_iop2drv_data_wrote_handle(struct AdapterControlBlock *acb)
{
struct QBUFFER *prbuffer;
+ int my_empty_len;
+
+ /*check this iop data if overflow my rqbuffer*/
+ ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
+ prbuffer = arcmsr_get_iop_rqbuffer(acb);
+ my_empty_len = (acb->rqbuf_lastindex - acb->rqbuf_firstindex - 1) &
+ (ARCMSR_MAX_QBUFFER-1);
+ if(my_empty_len >= prbuffer->data_len) {
+ arcmsr_Read_iop_rqbuffer_data(acb, prbuffer);
+ } else {
+ acb->acb_flags |= ACB_F_IOPDATA_OVERFLOW;
+ }
+ ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
+}
+/*
+**********************************************************************
+**********************************************************************
+*/
+static void arcmsr_Write_data_2iop_wqbuffer(struct AdapterControlBlock *acb)
+{
u_int8_t *pQbuffer;
+ struct QBUFFER *pwbuffer;
u_int8_t *iop_data;
- int my_empty_len, iop_len, rqbuf_firstindex, rqbuf_lastindex;
+ int32_t allxfer_len=0;
- /*check this iop data if overflow my rqbuffer*/
- rqbuf_lastindex=acb->rqbuf_lastindex;
- rqbuf_firstindex=acb->rqbuf_firstindex;
- prbuffer=arcmsr_get_iop_rqbuffer(acb);
- iop_data=(u_int8_t *)prbuffer->data;
- iop_len=prbuffer->data_len;
- my_empty_len=(rqbuf_firstindex-rqbuf_lastindex-1)&(ARCMSR_MAX_QBUFFER-1);
- if(my_empty_len>=iop_len) {
- while(iop_len > 0) {
- pQbuffer=&acb->rqbuffer[rqbuf_lastindex];
- memcpy(pQbuffer, iop_data, 1);
- rqbuf_lastindex++;
- rqbuf_lastindex %= ARCMSR_MAX_QBUFFER;/*if last index number set it to 0 */
+ if(acb->acb_flags & ACB_F_MESSAGE_WQBUFFER_READ) {
+ acb->acb_flags &= (~ACB_F_MESSAGE_WQBUFFER_READ);
+ pwbuffer = arcmsr_get_iop_wqbuffer(acb);
+ iop_data = (u_int8_t *)pwbuffer->data;
+ while((acb->wqbuf_firstindex != acb->wqbuf_lastindex)
+ && (allxfer_len < 124)) {
+ pQbuffer = &acb->wqbuffer[acb->wqbuf_firstindex];
+ *iop_data = *pQbuffer;
+ acb->wqbuf_firstindex++;
+ acb->wqbuf_firstindex %= ARCMSR_MAX_QBUFFER;
iop_data++;
- iop_len--;
+ allxfer_len++;
}
- acb->rqbuf_lastindex=rqbuf_lastindex;
- arcmsr_iop_message_read(acb);
- /*signature, let IOP know data has been read */
- } else {
- acb->acb_flags|=ACB_F_IOPDATA_OVERFLOW;
+ pwbuffer->data_len = allxfer_len;
+ arcmsr_iop_message_wrote(acb);
}
}
/*
@@ -1328,6 +1457,7 @@ static void arcmsr_iop2drv_data_wrote_handle(struct AdapterControlBlock *acb)
*/
static void arcmsr_iop2drv_data_read_handle(struct AdapterControlBlock *acb)
{
+ ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
acb->acb_flags |= ACB_F_MESSAGE_WQBUFFER_READ;
/*
*****************************************************************
@@ -1335,41 +1465,25 @@ static void arcmsr_iop2drv_data_read_handle(struct AdapterControlBlock *acb)
** in my post bag, now is the time to send them into Areca's firmware
*****************************************************************
*/
- if(acb->wqbuf_firstindex!=acb->wqbuf_lastindex) {
- u_int8_t *pQbuffer;
- struct QBUFFER *pwbuffer;
- u_int8_t *iop_data;
- int allxfer_len=0;
-
- acb->acb_flags &= (~ACB_F_MESSAGE_WQBUFFER_READ);
- pwbuffer=arcmsr_get_iop_wqbuffer(acb);
- iop_data=(u_int8_t *)pwbuffer->data;
- while((acb->wqbuf_firstindex!=acb->wqbuf_lastindex)
- && (allxfer_len<124)) {
- pQbuffer=&acb->wqbuffer[acb->wqbuf_firstindex];
- memcpy(iop_data, pQbuffer, 1);
- acb->wqbuf_firstindex++;
- acb->wqbuf_firstindex %=ARCMSR_MAX_QBUFFER; /*if last index number set it to 0 */
- iop_data++;
- allxfer_len++;
- }
- pwbuffer->data_len=allxfer_len;
- /*
- ** push inbound doorbell tell iop driver data write ok
- ** and wait reply on next hwinterrupt for next Qbuffer post
- */
- arcmsr_iop_message_wrote(acb);
+ if(acb->wqbuf_firstindex != acb->wqbuf_lastindex) {
+ arcmsr_Write_data_2iop_wqbuffer(acb);
}
- if(acb->wqbuf_firstindex==acb->wqbuf_lastindex) {
+ if(acb->wqbuf_firstindex == acb->wqbuf_lastindex) {
acb->acb_flags |= ACB_F_MESSAGE_WQBUFFER_CLEARED;
}
+ ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
}
-
+/*
+**************************************************************************
+**************************************************************************
+*/
static void arcmsr_rescanLun_cb(struct cam_periph *periph, union ccb *ccb)
{
/*
if (ccb->ccb_h.status != CAM_REQ_CMP)
- printf("arcmsr_rescanLun_cb: Rescan Target=%x, lun=%x, failure status=%x\n",ccb->ccb_h.target_id,ccb->ccb_h.target_lun,ccb->ccb_h.status);
+ printf("arcmsr_rescanLun_cb: Rescan Target=%x, lun=%x,"
+ "failure status=%x\n", ccb->ccb_h.target_id,
+ ccb->ccb_h.target_lun, ccb->ccb_h.status);
else
printf("arcmsr_rescanLun_cb: Rescan lun successfully!\n");
*/
@@ -1405,7 +1519,7 @@ static void arcmsr_abort_dr_ccbs(struct AdapterControlBlock *acb, int target, in
u_int32_t intmask_org;
int i;
- ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
+ ARCMSR_LOCK_ACQUIRE(&acb->isr_lock);
/* disable all outbound interrupts */
intmask_org = arcmsr_disable_allintr(acb);
for (i = 0; i < ARCMSR_MAX_FREESRB_NUM; i++)
@@ -1424,10 +1538,8 @@ static void arcmsr_abort_dr_ccbs(struct AdapterControlBlock *acb, int target, in
}
/* enable outbound Post Queue, outbound doorbell Interrupt */
arcmsr_enable_allintr(acb, intmask_org);
- ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
+ ARCMSR_LOCK_RELEASE(&acb->isr_lock);
}
-
-
/*
**************************************************************************
**************************************************************************
@@ -1441,7 +1553,7 @@ static void arcmsr_dr_handle(struct AdapterControlBlock *acb) {
switch (acb->adapter_type) {
case ACB_ADAPTER_TYPE_A:
devicemap = offsetof(struct HBA_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]);
- for (target= 0; target < 4; target++)
+ for (target = 0; target < 4; target++)
{
deviceMapCurrent[target]=bus_space_read_4(acb->btag[0], acb->bhandle[0], devicemap);
devicemap += 4;
@@ -1450,7 +1562,7 @@ static void arcmsr_dr_handle(struct AdapterControlBlock *acb) {
case ACB_ADAPTER_TYPE_B:
devicemap = offsetof(struct HBB_RWBUFFER, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]);
- for (target= 0; target < 4; target++)
+ for (target = 0; target < 4; target++)
{
deviceMapCurrent[target]=bus_space_read_4(acb->btag[1], acb->bhandle[1], devicemap);
devicemap += 4;
@@ -1459,7 +1571,15 @@ static void arcmsr_dr_handle(struct AdapterControlBlock *acb) {
case ACB_ADAPTER_TYPE_C:
devicemap = offsetof(struct HBC_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]);
- for (target= 0; target < 4; target++)
+ for (target = 0; target < 4; target++)
+ {
+ deviceMapCurrent[target]=bus_space_read_4(acb->btag[0], acb->bhandle[0], devicemap);
+ devicemap += 4;
+ }
+ break;
+ case ACB_ADAPTER_TYPE_D:
+ devicemap = offsetof(struct HBD_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]);
+ for (target = 0; target < 4; target++)
{
deviceMapCurrent[target]=bus_space_read_4(acb->btag[0], acb->bhandle[0], devicemap);
devicemap += 4;
@@ -1476,16 +1596,16 @@ static void arcmsr_dr_handle(struct AdapterControlBlock *acb) {
** copy the new map, note if there are differences with the current map
*/
pDevMap = (u_int8_t *)&deviceMapCurrent[0];
- for (target= 0; target < ARCMSR_MAX_TARGETID - 1; target++)
+ for (target = 0; target < ARCMSR_MAX_TARGETID - 1; target++)
{
if (*pDevMap != acb->device_map[target])
{
u_int8_t difference, bit_check;
- difference= *pDevMap ^ acb->device_map[target];
+ difference = *pDevMap ^ acb->device_map[target];
for(lun=0; lun < ARCMSR_MAX_TARGETLUN; lun++)
{
- bit_check=(1 << lun); /*check bit from 0....31*/
+ bit_check = (1 << lun); /*check bit from 0....31*/
if(difference & bit_check)
{
if(acb->device_map[target] & bit_check)
@@ -1504,7 +1624,7 @@ static void arcmsr_dr_handle(struct AdapterControlBlock *acb) {
}
}
/* printf("arcmsr_dr_handle: acb->device_map[%x]=0x%x, deviceMapCurrent[%x]=%x\n",target,acb->device_map[target],target,*pDevMap); */
- acb->device_map[target]= *pDevMap;
+ acb->device_map[target] = *pDevMap;
}
pDevMap++;
}
@@ -1550,6 +1670,18 @@ static void arcmsr_hbc_message_isr(struct AdapterControlBlock *acb) {
**************************************************************************
**************************************************************************
*/
+static void arcmsr_hbd_message_isr(struct AdapterControlBlock *acb) {
+ u_int32_t outbound_message;
+
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, outbound_doorbell, ARCMSR_HBDMU_IOP2DRV_MESSAGE_CMD_DONE_CLEAR);
+ outbound_message = CHIP_REG_READ32(HBD_MessageUnit, 0, msgcode_rwbuffer[0]);
+ if (outbound_message == ARCMSR_SIGNATURE_GET_CONFIG)
+ arcmsr_dr_handle( acb );
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
static void arcmsr_hba_doorbell_isr(struct AdapterControlBlock *acb)
{
u_int32_t outbound_doorbell;
@@ -1561,7 +1693,7 @@ static void arcmsr_hba_doorbell_isr(struct AdapterControlBlock *acb)
** check if there are any mail need to pack from firmware
*******************************************************************
*/
- outbound_doorbell=CHIP_REG_READ32(HBA_MessageUnit,
+ outbound_doorbell = CHIP_REG_READ32(HBA_MessageUnit,
0, outbound_doorbell);
CHIP_REG_WRITE32(HBA_MessageUnit,
0, outbound_doorbell, outbound_doorbell); /* clear doorbell interrupt */
@@ -1587,7 +1719,7 @@ static void arcmsr_hbc_doorbell_isr(struct AdapterControlBlock *acb)
** check if there are any mail need to pack from firmware
*******************************************************************
*/
- outbound_doorbell=CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_doorbell);
+ outbound_doorbell = CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_doorbell);
CHIP_REG_WRITE32(HBC_MessageUnit, 0, outbound_doorbell_clear, outbound_doorbell); /* clear doorbell interrupt */
if(outbound_doorbell & ARCMSR_HBCMU_IOP2DRV_DATA_WRITE_OK) {
arcmsr_iop2drv_data_wrote_handle(acb);
@@ -1603,6 +1735,39 @@ static void arcmsr_hbc_doorbell_isr(struct AdapterControlBlock *acb)
**************************************************************************
**************************************************************************
*/
+static void arcmsr_hbd_doorbell_isr(struct AdapterControlBlock *acb)
+{
+ u_int32_t outbound_Doorbell;
+
+ /*
+ *******************************************************************
+ ** Maybe here we need to check wrqbuffer_lock is lock or not
+ ** DOORBELL: din! don!
+ ** check if there are any mail need to pack from firmware
+ *******************************************************************
+ */
+ outbound_Doorbell = CHIP_REG_READ32(HBD_MessageUnit, 0, outbound_doorbell) & ARCMSR_HBDMU_F0_DOORBELL_CAUSE;
+ if(outbound_Doorbell)
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, outbound_doorbell, outbound_Doorbell); /* clear doorbell interrupt */
+ while( outbound_Doorbell & ARCMSR_HBDMU_F0_DOORBELL_CAUSE ) {
+ if(outbound_Doorbell & ARCMSR_HBDMU_IOP2DRV_DATA_WRITE_OK) {
+ arcmsr_iop2drv_data_wrote_handle(acb);
+ }
+ if(outbound_Doorbell & ARCMSR_HBDMU_IOP2DRV_DATA_READ_OK) {
+ arcmsr_iop2drv_data_read_handle(acb);
+ }
+ if(outbound_Doorbell & ARCMSR_HBDMU_IOP2DRV_MESSAGE_CMD_DONE) {
+ arcmsr_hbd_message_isr(acb); /* messenger of "driver to iop commands" */
+ }
+ outbound_Doorbell = CHIP_REG_READ32(HBD_MessageUnit, 0, outbound_doorbell) & ARCMSR_HBDMU_F0_DOORBELL_CAUSE;
+ if(outbound_Doorbell)
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, outbound_doorbell, outbound_Doorbell); /* clear doorbell interrupt */
+ }
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
static void arcmsr_hba_postqueue_isr(struct AdapterControlBlock *acb)
{
u_int32_t flag_srb;
@@ -1615,10 +1780,10 @@ static void arcmsr_hba_postqueue_isr(struct AdapterControlBlock *acb)
*/
bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap,
BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
- while((flag_srb=CHIP_REG_READ32(HBA_MessageUnit,
+ while((flag_srb = CHIP_REG_READ32(HBA_MessageUnit,
0, outbound_queueport)) != 0xFFFFFFFF) {
/* check if command done with no error*/
- error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
+ error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0) ? TRUE : FALSE;
arcmsr_drain_donequeue(acb, flag_srb, error);
} /*drain reply FIFO*/
}
@@ -1628,7 +1793,7 @@ static void arcmsr_hba_postqueue_isr(struct AdapterControlBlock *acb)
*/
static void arcmsr_hbb_postqueue_isr(struct AdapterControlBlock *acb)
{
- struct HBB_MessageUnit *phbbmu=(struct HBB_MessageUnit *)acb->pmu;
+ struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu;
u_int32_t flag_srb;
int index;
u_int16_t error;
@@ -1640,14 +1805,14 @@ static void arcmsr_hbb_postqueue_isr(struct AdapterControlBlock *acb)
*/
bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap,
BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
- index=phbbmu->doneq_index;
- while((flag_srb=phbbmu->done_qbuffer[index]) != 0) {
- phbbmu->done_qbuffer[index]=0;
+ index = phbbmu->doneq_index;
+ while((flag_srb = phbbmu->done_qbuffer[index]) != 0) {
+ phbbmu->done_qbuffer[index] = 0;
index++;
index %= ARCMSR_MAX_HBB_POSTQUEUE; /*if last index number set it to 0 */
- phbbmu->doneq_index=index;
+ phbbmu->doneq_index = index;
/* check if command done with no error*/
- error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
+ error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
arcmsr_drain_donequeue(acb, flag_srb, error);
} /*drain reply FIFO*/
}
@@ -1657,7 +1822,7 @@ static void arcmsr_hbb_postqueue_isr(struct AdapterControlBlock *acb)
*/
static void arcmsr_hbc_postqueue_isr(struct AdapterControlBlock *acb)
{
- u_int32_t flag_srb,throttling=0;
+ u_int32_t flag_srb,throttling = 0;
u_int16_t error;
/*
@@ -1669,11 +1834,11 @@ static void arcmsr_hbc_postqueue_isr(struct AdapterControlBlock *acb)
while(CHIP_REG_READ32(HBC_MessageUnit, 0, host_int_status) & ARCMSR_HBCMU_OUTBOUND_POSTQUEUE_ISR) {
- flag_srb=CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_queueport_low);
+ flag_srb = CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_queueport_low);
/* check if command done with no error*/
- error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1)?TRUE:FALSE;
+ error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1)?TRUE:FALSE;
arcmsr_drain_donequeue(acb, flag_srb, error);
- if(throttling==ARCMSR_HBC_ISR_THROTTLING_LEVEL) {
+ if(throttling == ARCMSR_HBC_ISR_THROTTLING_LEVEL) {
CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell,ARCMSR_HBCMU_DRV2IOP_POSTQUEUE_THROTTLING);
break;
}
@@ -1682,6 +1847,65 @@ static void arcmsr_hbc_postqueue_isr(struct AdapterControlBlock *acb)
}
/*
**********************************************************************
+**
+**********************************************************************
+*/
+static uint16_t arcmsr_get_doneq_index(struct HBD_MessageUnit0 *phbdmu)
+{
+ uint16_t doneq_index, index_stripped;
+
+ doneq_index = phbdmu->doneq_index;
+ if (doneq_index & 0x4000) {
+ index_stripped = doneq_index & 0xFF;
+ index_stripped += 1;
+ index_stripped %= ARCMSR_MAX_HBD_POSTQUEUE;
+ phbdmu->doneq_index = index_stripped ?
+ (index_stripped | 0x4000) : index_stripped;
+ } else {
+ index_stripped = doneq_index;
+ index_stripped += 1;
+ index_stripped %= ARCMSR_MAX_HBD_POSTQUEUE;
+ phbdmu->doneq_index = index_stripped ?
+ index_stripped : (index_stripped | 0x4000);
+ }
+ return (phbdmu->doneq_index);
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
+static void arcmsr_hbd_postqueue_isr(struct AdapterControlBlock *acb)
+{
+ struct HBD_MessageUnit0 *phbdmu = (struct HBD_MessageUnit0 *)acb->pmu;
+ u_int32_t outbound_write_pointer;
+ u_int32_t addressLow;
+ uint16_t doneq_index;
+ u_int16_t error;
+ /*
+ *****************************************************************************
+ ** areca cdb command done
+ *****************************************************************************
+ */
+ if((CHIP_REG_READ32(HBD_MessageUnit, 0, outboundlist_interrupt_cause) &
+ ARCMSR_HBDMU_OUTBOUND_LIST_INTERRUPT) == 0)
+ return;
+ bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap,
+ BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
+ outbound_write_pointer = phbdmu->done_qbuffer[0].addressLow;
+ doneq_index = phbdmu->doneq_index;
+ while ((doneq_index & 0xFF) != (outbound_write_pointer & 0xFF)) {
+ doneq_index = arcmsr_get_doneq_index(phbdmu);
+ addressLow = phbdmu->done_qbuffer[(doneq_index & 0xFF)+1].addressLow;
+ error = (addressLow & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1) ? TRUE : FALSE;
+ arcmsr_drain_donequeue(acb, addressLow, error); /*Check if command done with no error */
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, outboundlist_read_pointer, doneq_index);
+ outbound_write_pointer = phbdmu->done_qbuffer[0].addressLow;
+ }
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, outboundlist_interrupt_cause, ARCMSR_HBDMU_OUTBOUND_LIST_INTERRUPT_CLEAR);
+ CHIP_REG_READ32(HBD_MessageUnit, 0, outboundlist_interrupt_cause); /*Dummy ioread32 to force pci flush */
+}
+/*
+**********************************************************************
**********************************************************************
*/
static void arcmsr_handle_hba_isr( struct AdapterControlBlock *acb)
@@ -1692,12 +1916,12 @@ static void arcmsr_handle_hba_isr( struct AdapterControlBlock *acb)
** check outbound intstatus
*********************************************
*/
- outbound_intStatus=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & acb->outbound_int_enable;
+ outbound_intStatus = CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & acb->outbound_int_enable;
if(!outbound_intStatus) {
/*it must be share irq*/
return;
}
- CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, outbound_intStatus);/*clear interrupt*/
+ CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, outbound_intStatus); /*clear interrupt*/
/* MU doorbell interrupts*/
if(outbound_intStatus & ARCMSR_MU_OUTBOUND_DOORBELL_INT) {
arcmsr_hba_doorbell_isr(acb);
@@ -1722,7 +1946,7 @@ static void arcmsr_handle_hbb_isr( struct AdapterControlBlock *acb)
** check outbound intstatus
*********************************************
*/
- outbound_doorbell=CHIP_REG_READ32(HBB_DOORBELL, 0, iop2drv_doorbell) & acb->outbound_int_enable;
+ outbound_doorbell = CHIP_REG_READ32(HBB_DOORBELL, 0, iop2drv_doorbell) & acb->outbound_int_enable;
if(!outbound_doorbell) {
/*it must be share irq*/
return;
@@ -1757,7 +1981,7 @@ static void arcmsr_handle_hbc_isr( struct AdapterControlBlock *acb)
** check outbound intstatus
*********************************************
*/
- host_interrupt_status=CHIP_REG_READ32(HBC_MessageUnit, 0, host_int_status);
+ host_interrupt_status = CHIP_REG_READ32(HBC_MessageUnit, 0, host_int_status);
if(!host_interrupt_status) {
/*it must be share irq*/
return;
@@ -1772,6 +1996,39 @@ static void arcmsr_handle_hbc_isr( struct AdapterControlBlock *acb)
}
}
/*
+**********************************************************************
+**********************************************************************
+*/
+static void arcmsr_handle_hbd_isr( struct AdapterControlBlock *acb)
+{
+ u_int32_t host_interrupt_status;
+ u_int32_t intmask_org;
+ /*
+ *********************************************
+ ** check outbound intstatus
+ *********************************************
+ */
+ host_interrupt_status = CHIP_REG_READ32(HBD_MessageUnit, 0, host_int_status) & acb->outbound_int_enable;
+ if(!(host_interrupt_status & ARCMSR_HBDMU_OUTBOUND_INT)) {
+ /*it must be share irq*/
+ return;
+ }
+ /* disable outbound interrupt */
+ intmask_org = CHIP_REG_READ32(HBD_MessageUnit, 0, pcief0_int_enable) ; /* disable outbound message0 int */
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, pcief0_int_enable, ARCMSR_HBDMU_ALL_INT_DISABLE);
+ /* MU doorbell interrupts*/
+ if(host_interrupt_status & ARCMSR_HBDMU_OUTBOUND_DOORBELL_INT) {
+ arcmsr_hbd_doorbell_isr(acb);
+ }
+ /* MU post queue interrupts*/
+ if(host_interrupt_status & ARCMSR_HBDMU_OUTBOUND_POSTQUEUE_INT) {
+ arcmsr_hbd_postqueue_isr(acb);
+ }
+ /* enable all outbound interrupt */
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, pcief0_int_enable, intmask_org | ARCMSR_HBDMU_ALL_INT_ENABLE);
+// CHIP_REG_READ32(HBD_MessageUnit, 0, pcief0_int_enable);
+}
+/*
******************************************************************************
******************************************************************************
*/
@@ -1787,6 +2044,9 @@ static void arcmsr_interrupt(struct AdapterControlBlock *acb)
case ACB_ADAPTER_TYPE_C:
arcmsr_handle_hbc_isr(acb);
break;
+ case ACB_ADAPTER_TYPE_D:
+ arcmsr_handle_hbd_isr(acb);
+ break;
default:
printf("arcmsr%d: interrupt service,"
" unknown adapter type =%d\n", acb->pci_unit, acb->adapter_type);
@@ -1799,17 +2059,17 @@ static void arcmsr_interrupt(struct AdapterControlBlock *acb)
*/
static void arcmsr_intr_handler(void *arg)
{
- struct AdapterControlBlock *acb=(struct AdapterControlBlock *)arg;
+ struct AdapterControlBlock *acb = (struct AdapterControlBlock *)arg;
- ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
+ ARCMSR_LOCK_ACQUIRE(&acb->isr_lock);
arcmsr_interrupt(acb);
- ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
+ ARCMSR_LOCK_RELEASE(&acb->isr_lock);
}
/*
******************************************************************************
******************************************************************************
*/
-static void arcmsr_polling_devmap(void* arg)
+static void arcmsr_polling_devmap(void *arg)
{
struct AdapterControlBlock *acb = (struct AdapterControlBlock *)arg;
switch (acb->adapter_type) {
@@ -1825,6 +2085,10 @@ static void arcmsr_polling_devmap(void* arg)
CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_GET_CONFIG);
CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_MESSAGE_CMD_DONE);
break;
+
+ case ACB_ADAPTER_TYPE_D:
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_GET_CONFIG);
+ break;
}
if((acb->acb_flags & ACB_F_SCSISTOPADAPTER) == 0)
@@ -1842,7 +2106,7 @@ static void arcmsr_iop_parking(struct AdapterControlBlock *acb)
{
u_int32_t intmask_org;
- if(acb!=NULL) {
+ if(acb != NULL) {
/* stop adapter background rebuild */
if(acb->acb_flags & ACB_F_MSG_START_BGRB) {
intmask_org = arcmsr_disable_allintr(acb);
@@ -1859,25 +2123,25 @@ static void arcmsr_iop_parking(struct AdapterControlBlock *acb)
*/
u_int32_t arcmsr_iop_ioctlcmd(struct AdapterControlBlock *acb, u_int32_t ioctl_cmd, caddr_t arg)
{
- struct CMD_MESSAGE_FIELD * pcmdmessagefld;
- u_int32_t retvalue=EINVAL;
+ struct CMD_MESSAGE_FIELD *pcmdmessagefld;
+ u_int32_t retvalue = EINVAL;
- pcmdmessagefld=(struct CMD_MESSAGE_FIELD *) arg;
+ pcmdmessagefld = (struct CMD_MESSAGE_FIELD *) arg;
if(memcmp(pcmdmessagefld->cmdmessage.Signature, "ARCMSR", 6)!=0) {
return retvalue;
}
ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
switch(ioctl_cmd) {
case ARCMSR_MESSAGE_READ_RQBUFFER: {
- u_int8_t * pQbuffer;
- u_int8_t * ptmpQbuffer=pcmdmessagefld->messagedatabuffer;
+ u_int8_t *pQbuffer;
+ u_int8_t *ptmpQbuffer = pcmdmessagefld->messagedatabuffer;
u_int32_t allxfer_len=0;
- while((acb->rqbuf_firstindex!=acb->rqbuf_lastindex)
- && (allxfer_len<1031)) {
+ while((acb->rqbuf_firstindex != acb->rqbuf_lastindex)
+ && (allxfer_len < 1031)) {
/*copy READ QBUFFER to srb*/
- pQbuffer= &acb->rqbuffer[acb->rqbuf_firstindex];
- memcpy(ptmpQbuffer, pQbuffer, 1);
+ pQbuffer = &acb->rqbuffer[acb->rqbuf_firstindex];
+ *ptmpQbuffer = *pQbuffer;
acb->rqbuf_firstindex++;
acb->rqbuf_firstindex %= ARCMSR_MAX_QBUFFER;
/*if last index number set it to 0 */
@@ -1885,51 +2149,37 @@ u_int32_t arcmsr_iop_ioctlcmd(struct AdapterControlBlock *acb, u_int32_t ioctl_c
allxfer_len++;
}
if(acb->acb_flags & ACB_F_IOPDATA_OVERFLOW) {
- struct QBUFFER * prbuffer;
- u_int8_t * iop_data;
- u_int32_t iop_len;
+ struct QBUFFER *prbuffer;
acb->acb_flags &= ~ACB_F_IOPDATA_OVERFLOW;
- prbuffer=arcmsr_get_iop_rqbuffer(acb);
- iop_data=(u_int8_t *)prbuffer->data;
- iop_len=(u_int32_t)prbuffer->data_len;
- /*this iop data does no chance to make me overflow again here, so just do it*/
- while(iop_len>0) {
- pQbuffer= &acb->rqbuffer[acb->rqbuf_lastindex];
- memcpy(pQbuffer, iop_data, 1);
- acb->rqbuf_lastindex++;
- acb->rqbuf_lastindex %= ARCMSR_MAX_QBUFFER;
- /*if last index number set it to 0 */
- iop_data++;
- iop_len--;
- }
- arcmsr_iop_message_read(acb);
- /*signature, let IOP know data has been readed */
+ prbuffer = arcmsr_get_iop_rqbuffer(acb);
+ arcmsr_Read_iop_rqbuffer_data(acb, prbuffer);
}
- pcmdmessagefld->cmdmessage.Length=allxfer_len;
- pcmdmessagefld->cmdmessage.ReturnCode=ARCMSR_MESSAGE_RETURNCODE_OK;
- retvalue=ARCMSR_MESSAGE_SUCCESS;
+ pcmdmessagefld->cmdmessage.Length = allxfer_len;
+ pcmdmessagefld->cmdmessage.ReturnCode = ARCMSR_MESSAGE_RETURNCODE_OK;
+ retvalue = ARCMSR_MESSAGE_SUCCESS;
}
break;
case ARCMSR_MESSAGE_WRITE_WQBUFFER: {
u_int32_t my_empty_len, user_len, wqbuf_firstindex, wqbuf_lastindex;
- u_int8_t * pQbuffer;
- u_int8_t * ptmpuserbuffer=pcmdmessagefld->messagedatabuffer;
+ u_int8_t *pQbuffer;
+ u_int8_t *ptmpuserbuffer = pcmdmessagefld->messagedatabuffer;
- user_len=pcmdmessagefld->cmdmessage.Length;
+ user_len = pcmdmessagefld->cmdmessage.Length;
/*check if data xfer length of this request will overflow my array qbuffer */
- wqbuf_lastindex=acb->wqbuf_lastindex;
- wqbuf_firstindex=acb->wqbuf_firstindex;
- if(wqbuf_lastindex!=wqbuf_firstindex) {
- arcmsr_post_ioctldata2iop(acb);
- pcmdmessagefld->cmdmessage.ReturnCode=ARCMSR_MESSAGE_RETURNCODE_ERROR;
+ wqbuf_lastindex = acb->wqbuf_lastindex;
+ wqbuf_firstindex = acb->wqbuf_firstindex;
+ if(wqbuf_lastindex != wqbuf_firstindex) {
+ arcmsr_Write_data_2iop_wqbuffer(acb);
+ pcmdmessagefld->cmdmessage.ReturnCode = ARCMSR_MESSAGE_RETURNCODE_ERROR;
} else {
- my_empty_len=(wqbuf_firstindex-wqbuf_lastindex-1)&(ARCMSR_MAX_QBUFFER-1);
- if(my_empty_len>=user_len) {
- while(user_len>0) {
+ my_empty_len = (wqbuf_firstindex - wqbuf_lastindex - 1) &
+ (ARCMSR_MAX_QBUFFER - 1);
+ if(my_empty_len >= user_len) {
+ while(user_len > 0) {
/*copy srb data to wqbuffer*/
- pQbuffer= &acb->wqbuffer[acb->wqbuf_lastindex];
- memcpy(pQbuffer, ptmpuserbuffer, 1);
+ pQbuffer = &acb->wqbuffer[acb->wqbuf_lastindex];
+ *pQbuffer = *ptmpuserbuffer;
acb->wqbuf_lastindex++;
acb->wqbuf_lastindex %= ARCMSR_MAX_QBUFFER;
/*if last index number set it to 0 */
@@ -1938,19 +2188,19 @@ u_int32_t arcmsr_iop_ioctlcmd(struct AdapterControlBlock *acb, u_int32_t ioctl_c
}
/*post fist Qbuffer*/
if(acb->acb_flags & ACB_F_MESSAGE_WQBUFFER_CLEARED) {
- acb->acb_flags &=~ACB_F_MESSAGE_WQBUFFER_CLEARED;
- arcmsr_post_ioctldata2iop(acb);
+ acb->acb_flags &= ~ACB_F_MESSAGE_WQBUFFER_CLEARED;
+ arcmsr_Write_data_2iop_wqbuffer(acb);
}
- pcmdmessagefld->cmdmessage.ReturnCode=ARCMSR_MESSAGE_RETURNCODE_OK;
+ pcmdmessagefld->cmdmessage.ReturnCode = ARCMSR_MESSAGE_RETURNCODE_OK;
} else {
- pcmdmessagefld->cmdmessage.ReturnCode=ARCMSR_MESSAGE_RETURNCODE_ERROR;
+ pcmdmessagefld->cmdmessage.ReturnCode = ARCMSR_MESSAGE_RETURNCODE_ERROR;
}
}
- retvalue=ARCMSR_MESSAGE_SUCCESS;
+ retvalue = ARCMSR_MESSAGE_SUCCESS;
}
break;
case ARCMSR_MESSAGE_CLEAR_RQBUFFER: {
- u_int8_t * pQbuffer=acb->rqbuffer;
+ u_int8_t *pQbuffer = acb->rqbuffer;
if(acb->acb_flags & ACB_F_IOPDATA_OVERFLOW) {
acb->acb_flags &= ~ACB_F_IOPDATA_OVERFLOW;
@@ -1958,16 +2208,16 @@ u_int32_t arcmsr_iop_ioctlcmd(struct AdapterControlBlock *acb, u_int32_t ioctl_c
/*signature, let IOP know data has been readed */
}
acb->acb_flags |= ACB_F_MESSAGE_RQBUFFER_CLEARED;
- acb->rqbuf_firstindex=0;
- acb->rqbuf_lastindex=0;
+ acb->rqbuf_firstindex = 0;
+ acb->rqbuf_lastindex = 0;
memset(pQbuffer, 0, ARCMSR_MAX_QBUFFER);
- pcmdmessagefld->cmdmessage.ReturnCode=ARCMSR_MESSAGE_RETURNCODE_OK;
- retvalue=ARCMSR_MESSAGE_SUCCESS;
+ pcmdmessagefld->cmdmessage.ReturnCode = ARCMSR_MESSAGE_RETURNCODE_OK;
+ retvalue = ARCMSR_MESSAGE_SUCCESS;
}
break;
case ARCMSR_MESSAGE_CLEAR_WQBUFFER:
{
- u_int8_t * pQbuffer=acb->wqbuffer;
+ u_int8_t *pQbuffer = acb->wqbuffer;
if(acb->acb_flags & ACB_F_IOPDATA_OVERFLOW) {
acb->acb_flags &= ~ACB_F_IOPDATA_OVERFLOW;
@@ -1975,15 +2225,15 @@ u_int32_t arcmsr_iop_ioctlcmd(struct AdapterControlBlock *acb, u_int32_t ioctl_c
/*signature, let IOP know data has been readed */
}
acb->acb_flags |= (ACB_F_MESSAGE_WQBUFFER_CLEARED|ACB_F_MESSAGE_WQBUFFER_READ);
- acb->wqbuf_firstindex=0;
- acb->wqbuf_lastindex=0;
+ acb->wqbuf_firstindex = 0;
+ acb->wqbuf_lastindex = 0;
memset(pQbuffer, 0, ARCMSR_MAX_QBUFFER);
- pcmdmessagefld->cmdmessage.ReturnCode=ARCMSR_MESSAGE_RETURNCODE_OK;
- retvalue=ARCMSR_MESSAGE_SUCCESS;
+ pcmdmessagefld->cmdmessage.ReturnCode = ARCMSR_MESSAGE_RETURNCODE_OK;
+ retvalue = ARCMSR_MESSAGE_SUCCESS;
}
break;
case ARCMSR_MESSAGE_CLEAR_ALLQBUFFER: {
- u_int8_t * pQbuffer;
+ u_int8_t *pQbuffer;
if(acb->acb_flags & ACB_F_IOPDATA_OVERFLOW) {
acb->acb_flags &= ~ACB_F_IOPDATA_OVERFLOW;
@@ -1993,44 +2243,44 @@ u_int32_t arcmsr_iop_ioctlcmd(struct AdapterControlBlock *acb, u_int32_t ioctl_c
acb->acb_flags |= (ACB_F_MESSAGE_WQBUFFER_CLEARED
|ACB_F_MESSAGE_RQBUFFER_CLEARED
|ACB_F_MESSAGE_WQBUFFER_READ);
- acb->rqbuf_firstindex=0;
- acb->rqbuf_lastindex=0;
- acb->wqbuf_firstindex=0;
- acb->wqbuf_lastindex=0;
- pQbuffer=acb->rqbuffer;
+ acb->rqbuf_firstindex = 0;
+ acb->rqbuf_lastindex = 0;
+ acb->wqbuf_firstindex = 0;
+ acb->wqbuf_lastindex = 0;
+ pQbuffer = acb->rqbuffer;
memset(pQbuffer, 0, sizeof(struct QBUFFER));
- pQbuffer=acb->wqbuffer;
+ pQbuffer = acb->wqbuffer;
memset(pQbuffer, 0, sizeof(struct QBUFFER));
- pcmdmessagefld->cmdmessage.ReturnCode=ARCMSR_MESSAGE_RETURNCODE_OK;
- retvalue=ARCMSR_MESSAGE_SUCCESS;
+ pcmdmessagefld->cmdmessage.ReturnCode = ARCMSR_MESSAGE_RETURNCODE_OK;
+ retvalue = ARCMSR_MESSAGE_SUCCESS;
}
break;
case ARCMSR_MESSAGE_REQUEST_RETURNCODE_3F: {
- pcmdmessagefld->cmdmessage.ReturnCode=ARCMSR_MESSAGE_RETURNCODE_3F;
- retvalue=ARCMSR_MESSAGE_SUCCESS;
+ pcmdmessagefld->cmdmessage.ReturnCode = ARCMSR_MESSAGE_RETURNCODE_3F;
+ retvalue = ARCMSR_MESSAGE_SUCCESS;
}
break;
case ARCMSR_MESSAGE_SAY_HELLO: {
- u_int8_t * hello_string="Hello! I am ARCMSR";
- u_int8_t * puserbuffer=(u_int8_t *)pcmdmessagefld->messagedatabuffer;
+ u_int8_t *hello_string = "Hello! I am ARCMSR";
+ u_int8_t *puserbuffer = (u_int8_t *)pcmdmessagefld->messagedatabuffer;
if(memcpy(puserbuffer, hello_string, (int16_t)strlen(hello_string))) {
- pcmdmessagefld->cmdmessage.ReturnCode=ARCMSR_MESSAGE_RETURNCODE_ERROR;
+ pcmdmessagefld->cmdmessage.ReturnCode = ARCMSR_MESSAGE_RETURNCODE_ERROR;
ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
return ENOIOCTL;
}
- pcmdmessagefld->cmdmessage.ReturnCode=ARCMSR_MESSAGE_RETURNCODE_OK;
- retvalue=ARCMSR_MESSAGE_SUCCESS;
+ pcmdmessagefld->cmdmessage.ReturnCode = ARCMSR_MESSAGE_RETURNCODE_OK;
+ retvalue = ARCMSR_MESSAGE_SUCCESS;
}
break;
case ARCMSR_MESSAGE_SAY_GOODBYE: {
arcmsr_iop_parking(acb);
- retvalue=ARCMSR_MESSAGE_SUCCESS;
+ retvalue = ARCMSR_MESSAGE_SUCCESS;
}
break;
case ARCMSR_MESSAGE_FLUSH_ADAPTER_CACHE: {
arcmsr_flush_adapter_cache(acb);
- retvalue=ARCMSR_MESSAGE_SUCCESS;
+ retvalue = ARCMSR_MESSAGE_SUCCESS;
}
break;
}
@@ -2044,54 +2294,46 @@ u_int32_t arcmsr_iop_ioctlcmd(struct AdapterControlBlock *acb, u_int32_t ioctl_c
static void arcmsr_free_srb(struct CommandControlBlock *srb)
{
struct AdapterControlBlock *acb;
- int mutex;
acb = srb->acb;
- mutex = mtx_owned(&acb->qbuffer_lock);
- if( mutex == 0 )
- ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
- srb->srb_state=ARCMSR_SRB_DONE;
- srb->srb_flags=0;
- acb->srbworkingQ[acb->workingsrb_doneindex]=srb;
+ ARCMSR_LOCK_ACQUIRE(&acb->srb_lock);
+ srb->srb_state = ARCMSR_SRB_DONE;
+ srb->srb_flags = 0;
+ acb->srbworkingQ[acb->workingsrb_doneindex] = srb;
acb->workingsrb_doneindex++;
acb->workingsrb_doneindex %= ARCMSR_MAX_FREESRB_NUM;
- if( mutex == 0 )
- ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
+ ARCMSR_LOCK_RELEASE(&acb->srb_lock);
}
/*
**************************************************************************
**************************************************************************
*/
-struct CommandControlBlock * arcmsr_get_freesrb(struct AdapterControlBlock *acb)
+struct CommandControlBlock *arcmsr_get_freesrb(struct AdapterControlBlock *acb)
{
- struct CommandControlBlock *srb=NULL;
+ struct CommandControlBlock *srb = NULL;
u_int32_t workingsrb_startindex, workingsrb_doneindex;
- int mutex;
- mutex = mtx_owned(&acb->qbuffer_lock);
- if( mutex == 0 )
- ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
- workingsrb_doneindex=acb->workingsrb_doneindex;
- workingsrb_startindex=acb->workingsrb_startindex;
- srb=acb->srbworkingQ[workingsrb_startindex];
+ ARCMSR_LOCK_ACQUIRE(&acb->srb_lock);
+ workingsrb_doneindex = acb->workingsrb_doneindex;
+ workingsrb_startindex = acb->workingsrb_startindex;
+ srb = acb->srbworkingQ[workingsrb_startindex];
workingsrb_startindex++;
workingsrb_startindex %= ARCMSR_MAX_FREESRB_NUM;
- if(workingsrb_doneindex!=workingsrb_startindex) {
- acb->workingsrb_startindex=workingsrb_startindex;
+ if(workingsrb_doneindex != workingsrb_startindex) {
+ acb->workingsrb_startindex = workingsrb_startindex;
} else {
- srb=NULL;
+ srb = NULL;
}
- if( mutex == 0 )
- ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
+ ARCMSR_LOCK_RELEASE(&acb->srb_lock);
return(srb);
}
/*
**************************************************************************
**************************************************************************
*/
-static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, union ccb * pccb)
+static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, union ccb *pccb)
{
- struct CMD_MESSAGE_FIELD * pcmdmessagefld;
+ struct CMD_MESSAGE_FIELD *pcmdmessagefld;
int retvalue = 0, transfer_len = 0;
char *buffer;
u_int32_t controlcode = (u_int32_t ) pccb->csio.cdb_io.cdb_bytes[5] << 24 |
@@ -2114,13 +2356,14 @@ static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, union ccb *
switch(controlcode) {
case ARCMSR_MESSAGE_READ_RQBUFFER: {
u_int8_t *pQbuffer;
- u_int8_t *ptmpQbuffer=pcmdmessagefld->messagedatabuffer;
+ u_int8_t *ptmpQbuffer = pcmdmessagefld->messagedatabuffer;
int32_t allxfer_len = 0;
+ ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
while ((acb->rqbuf_firstindex != acb->rqbuf_lastindex)
&& (allxfer_len < 1031)) {
pQbuffer = &acb->rqbuffer[acb->rqbuf_firstindex];
- memcpy(ptmpQbuffer, pQbuffer, 1);
+ *ptmpQbuffer = *pQbuffer;
acb->rqbuf_firstindex++;
acb->rqbuf_firstindex %= ARCMSR_MAX_QBUFFER;
ptmpQbuffer++;
@@ -2128,38 +2371,28 @@ static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, union ccb *
}
if (acb->acb_flags & ACB_F_IOPDATA_OVERFLOW) {
struct QBUFFER *prbuffer;
- u_int8_t *iop_data;
- int32_t iop_len;
acb->acb_flags &= ~ACB_F_IOPDATA_OVERFLOW;
- prbuffer=arcmsr_get_iop_rqbuffer(acb);
- iop_data = (u_int8_t *)prbuffer->data;
- iop_len =(u_int32_t)prbuffer->data_len;
- while (iop_len > 0) {
- pQbuffer= &acb->rqbuffer[acb->rqbuf_lastindex];
- memcpy(pQbuffer, iop_data, 1);
- acb->rqbuf_lastindex++;
- acb->rqbuf_lastindex %= ARCMSR_MAX_QBUFFER;
- iop_data++;
- iop_len--;
- }
- arcmsr_iop_message_read(acb);
+ prbuffer = arcmsr_get_iop_rqbuffer(acb);
+ arcmsr_Read_iop_rqbuffer_data(acb, prbuffer);
}
pcmdmessagefld->cmdmessage.Length = allxfer_len;
pcmdmessagefld->cmdmessage.ReturnCode = ARCMSR_MESSAGE_RETURNCODE_OK;
- retvalue=ARCMSR_MESSAGE_SUCCESS;
+ retvalue = ARCMSR_MESSAGE_SUCCESS;
+ ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
}
break;
case ARCMSR_MESSAGE_WRITE_WQBUFFER: {
int32_t my_empty_len, user_len, wqbuf_firstindex, wqbuf_lastindex;
u_int8_t *pQbuffer;
- u_int8_t *ptmpuserbuffer=pcmdmessagefld->messagedatabuffer;
+ u_int8_t *ptmpuserbuffer = pcmdmessagefld->messagedatabuffer;
user_len = pcmdmessagefld->cmdmessage.Length;
+ ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
wqbuf_lastindex = acb->wqbuf_lastindex;
wqbuf_firstindex = acb->wqbuf_firstindex;
if (wqbuf_lastindex != wqbuf_firstindex) {
- arcmsr_post_ioctldata2iop(acb);
+ arcmsr_Write_data_2iop_wqbuffer(acb);
/* has error report sensedata */
if(pccb->csio.sense_len) {
((u_int8_t *)&pccb->csio.sense_data)[0] = (0x1 << 7 | 0x70);
@@ -2178,7 +2411,7 @@ static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, union ccb *
if (my_empty_len >= user_len) {
while (user_len > 0) {
pQbuffer = &acb->wqbuffer[acb->wqbuf_lastindex];
- memcpy(pQbuffer, ptmpuserbuffer, 1);
+ *pQbuffer = *ptmpuserbuffer;
acb->wqbuf_lastindex++;
acb->wqbuf_lastindex %= ARCMSR_MAX_QBUFFER;
ptmpuserbuffer++;
@@ -2186,8 +2419,8 @@ static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, union ccb *
}
if (acb->acb_flags & ACB_F_MESSAGE_WQBUFFER_CLEARED) {
acb->acb_flags &=
- ~ACB_F_MESSAGE_WQBUFFER_CLEARED;
- arcmsr_post_ioctldata2iop(acb);
+ ~ACB_F_MESSAGE_WQBUFFER_CLEARED;
+ arcmsr_Write_data_2iop_wqbuffer(acb);
}
} else {
/* has error report sensedata */
@@ -2204,11 +2437,13 @@ static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, union ccb *
retvalue = ARCMSR_MESSAGE_FAIL;
}
}
+ ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
}
break;
case ARCMSR_MESSAGE_CLEAR_RQBUFFER: {
u_int8_t *pQbuffer = acb->rqbuffer;
+ ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
if (acb->acb_flags & ACB_F_IOPDATA_OVERFLOW) {
acb->acb_flags &= ~ACB_F_IOPDATA_OVERFLOW;
arcmsr_iop_message_read(acb);
@@ -2218,12 +2453,14 @@ static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, union ccb *
acb->rqbuf_lastindex = 0;
memset(pQbuffer, 0, ARCMSR_MAX_QBUFFER);
pcmdmessagefld->cmdmessage.ReturnCode =
- ARCMSR_MESSAGE_RETURNCODE_OK;
+ ARCMSR_MESSAGE_RETURNCODE_OK;
+ ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
}
break;
case ARCMSR_MESSAGE_CLEAR_WQBUFFER: {
u_int8_t *pQbuffer = acb->wqbuffer;
+ ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
if (acb->acb_flags & ACB_F_IOPDATA_OVERFLOW) {
acb->acb_flags &= ~ACB_F_IOPDATA_OVERFLOW;
arcmsr_iop_message_read(acb);
@@ -2236,11 +2473,13 @@ static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, union ccb *
memset(pQbuffer, 0, ARCMSR_MAX_QBUFFER);
pcmdmessagefld->cmdmessage.ReturnCode =
ARCMSR_MESSAGE_RETURNCODE_OK;
+ ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
}
break;
case ARCMSR_MESSAGE_CLEAR_ALLQBUFFER: {
u_int8_t *pQbuffer;
+ ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
if (acb->acb_flags & ACB_F_IOPDATA_OVERFLOW) {
acb->acb_flags &= ~ACB_F_IOPDATA_OVERFLOW;
arcmsr_iop_message_read(acb);
@@ -2258,6 +2497,7 @@ static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, union ccb *
pQbuffer = acb->wqbuffer;
memset(pQbuffer, 0, sizeof (struct QBUFFER));
pcmdmessagefld->cmdmessage.ReturnCode = ARCMSR_MESSAGE_RETURNCODE_OK;
+ ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
}
break;
case ARCMSR_MESSAGE_REQUEST_RETURNCODE_3F: {
@@ -2265,7 +2505,7 @@ static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, union ccb *
}
break;
case ARCMSR_MESSAGE_SAY_HELLO: {
- int8_t * hello_string = "Hello! I am ARCMSR";
+ int8_t *hello_string = "Hello! I am ARCMSR";
memcpy(pcmdmessagefld->messagedatabuffer, hello_string
, (int16_t)strlen(hello_string));
@@ -2290,17 +2530,15 @@ message_out:
*/
static void arcmsr_execute_srb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
{
- struct CommandControlBlock *srb=(struct CommandControlBlock *)arg;
- struct AdapterControlBlock *acb=(struct AdapterControlBlock *)srb->acb;
- union ccb * pccb;
+ struct CommandControlBlock *srb = (struct CommandControlBlock *)arg;
+ struct AdapterControlBlock *acb = (struct AdapterControlBlock *)srb->acb;
+ union ccb *pccb;
int target, lun;
- pccb=srb->pccb;
- target=pccb->ccb_h.target_id;
- lun=pccb->ccb_h.target_lun;
-#ifdef ARCMSR_DEBUG1
+ pccb = srb->pccb;
+ target = pccb->ccb_h.target_id;
+ lun = pccb->ccb_h.target_lun;
acb->pktRequestCount++;
-#endif
if(error != 0) {
if(error != EFBIG) {
printf("arcmsr%d: unexpected error %x"
@@ -2324,12 +2562,12 @@ static void arcmsr_execute_srb(void *arg, bus_dma_segment_t *dm_segs, int nseg,
arcmsr_srb_complete(srb, 0);
return;
}
- if(acb->devstate[target][lun]==ARECA_RAID_GONE) {
+ if(acb->devstate[target][lun] == ARECA_RAID_GONE) {
u_int8_t block_cmd, cmd;
cmd = pccb->csio.cdb_io.cdb_bytes[0];
- block_cmd= cmd & 0x0f;
- if(block_cmd==0x08 || block_cmd==0x0a) {
+ block_cmd = cmd & 0x0f;
+ if(block_cmd == 0x08 || block_cmd == 0x0a) {
printf("arcmsr%d:block 'read/write' command "
"with gone raid volume Cmd=0x%2x, TargetId=%d, Lun=%d \n"
, acb->pci_unit, cmd, target, lun);
@@ -2345,10 +2583,14 @@ static void arcmsr_execute_srb(void *arg, bus_dma_segment_t *dm_segs, int nseg,
arcmsr_srb_complete(srb, 0);
return;
}
- if(acb->srboutstandingcount > ARCMSR_MAX_OUTSTANDING_CMD) {
- xpt_freeze_simq(acb->psim, 1);
- pccb->ccb_h.status = CAM_REQUEUE_REQ;
- acb->acb_flags |= ACB_F_CAM_DEV_QFRZN;
+ if(acb->srboutstandingcount >= acb->firm_numbers_queue) {
+ if((acb->acb_flags & ACB_F_CAM_DEV_QFRZN) == 0)
+ {
+ xpt_freeze_simq(acb->psim, 1);
+ acb->acb_flags |= ACB_F_CAM_DEV_QFRZN;
+ }
+ pccb->ccb_h.status &= ~CAM_SIM_QUEUED;
+ pccb->ccb_h.status |= CAM_REQUEUE_REQ;
arcmsr_srb_complete(srb, 0);
return;
}
@@ -2366,12 +2608,12 @@ static void arcmsr_execute_srb(void *arg, bus_dma_segment_t *dm_segs, int nseg,
*****************************************************************************************
*****************************************************************************************
*/
-static u_int8_t arcmsr_seek_cmd2abort(union ccb * abortccb)
+static u_int8_t arcmsr_seek_cmd2abort(union ccb *abortccb)
{
struct CommandControlBlock *srb;
- struct AdapterControlBlock *acb=(struct AdapterControlBlock *) abortccb->ccb_h.arcmsr_ccbacb_ptr;
+ struct AdapterControlBlock *acb = (struct AdapterControlBlock *) abortccb->ccb_h.arcmsr_ccbacb_ptr;
u_int32_t intmask_org;
- int i=0;
+ int i = 0;
acb->num_aborts++;
/*
@@ -2383,14 +2625,14 @@ static u_int8_t arcmsr_seek_cmd2abort(union ccb * abortccb)
** command return success.
***************************************************************************
*/
- if(acb->srboutstandingcount!=0) {
+ if(acb->srboutstandingcount != 0) {
/* disable all outbound interrupt */
- intmask_org=arcmsr_disable_allintr(acb);
- for(i=0;i<ARCMSR_MAX_FREESRB_NUM;i++) {
- srb=acb->psrb_pool[i];
- if(srb->srb_state==ARCMSR_SRB_START) {
- if(srb->pccb==abortccb) {
- srb->srb_state=ARCMSR_SRB_ABORTED;
+ intmask_org = arcmsr_disable_allintr(acb);
+ for(i=0; i < ARCMSR_MAX_FREESRB_NUM; i++) {
+ srb = acb->psrb_pool[i];
+ if(srb->srb_state == ARCMSR_SRB_START) {
+ if(srb->pccb == abortccb) {
+ srb->srb_state = ARCMSR_SRB_ABORTED;
printf("arcmsr%d:scsi id=%d lun=%d abort srb '%p'"
"outstanding command \n"
, acb->pci_unit, abortccb->ccb_h.target_id
@@ -2413,11 +2655,11 @@ static u_int8_t arcmsr_seek_cmd2abort(union ccb * abortccb)
*/
static void arcmsr_bus_reset(struct AdapterControlBlock *acb)
{
- int retry=0;
+ int retry = 0;
acb->num_resets++;
- acb->acb_flags |=ACB_F_BUS_RESET;
- while(acb->srboutstandingcount!=0 && retry < 400) {
+ acb->acb_flags |= ACB_F_BUS_RESET;
+ while(acb->srboutstandingcount != 0 && retry < 400) {
arcmsr_interrupt(acb);
UDELAY(25000);
retry++;
@@ -2430,19 +2672,19 @@ static void arcmsr_bus_reset(struct AdapterControlBlock *acb)
**************************************************************************
*/
static void arcmsr_handle_virtual_command(struct AdapterControlBlock *acb,
- union ccb * pccb)
+ union ccb *pccb)
{
+ if (pccb->ccb_h.target_lun) {
+ pccb->ccb_h.status |= CAM_DEV_NOT_THERE;
+ xpt_done(pccb);
+ return;
+ }
pccb->ccb_h.status |= CAM_REQ_CMP;
switch (pccb->csio.cdb_io.cdb_bytes[0]) {
case INQUIRY: {
unsigned char inqdata[36];
- char *buffer=pccb->csio.data_ptr;
+ char *buffer = pccb->csio.data_ptr;
- if (pccb->ccb_h.target_lun) {
- pccb->ccb_h.status |= CAM_SEL_TIMEOUT;
- xpt_done(pccb);
- return;
- }
inqdata[0] = T_PROCESSOR; /* Periph Qualifier & Periph Dev Type */
inqdata[1] = 0; /* rem media bit & Dev Type Modifier */
inqdata[2] = 0; /* ISO, ECMA, & ANSI versions */
@@ -2475,12 +2717,12 @@ static void arcmsr_handle_virtual_command(struct AdapterControlBlock *acb,
*********************************************************************
*********************************************************************
*/
-static void arcmsr_action(struct cam_sim * psim, union ccb * pccb)
+static void arcmsr_action(struct cam_sim *psim, union ccb *pccb)
{
- struct AdapterControlBlock * acb;
+ struct AdapterControlBlock *acb;
- acb=(struct AdapterControlBlock *) cam_sim_softc(psim);
- if(acb==NULL) {
+ acb = (struct AdapterControlBlock *) cam_sim_softc(psim);
+ if(acb == NULL) {
pccb->ccb_h.status |= CAM_REQ_INVALID;
xpt_done(pccb);
return;
@@ -2488,21 +2730,21 @@ static void arcmsr_action(struct cam_sim * psim, union ccb * pccb)
switch (pccb->ccb_h.func_code) {
case XPT_SCSI_IO: {
struct CommandControlBlock *srb;
- int target=pccb->ccb_h.target_id;
+ int target = pccb->ccb_h.target_id;
if(target == 16) {
/* virtual device for iop message transfer */
arcmsr_handle_virtual_command(acb, pccb);
return;
}
- if((srb=arcmsr_get_freesrb(acb)) == NULL) {
+ if((srb = arcmsr_get_freesrb(acb)) == NULL) {
pccb->ccb_h.status |= CAM_RESRC_UNAVAIL;
xpt_done(pccb);
return;
}
- pccb->ccb_h.arcmsr_ccbsrb_ptr=srb;
- pccb->ccb_h.arcmsr_ccbacb_ptr=acb;
- srb->pccb=pccb;
+ pccb->ccb_h.arcmsr_ccbsrb_ptr = srb;
+ pccb->ccb_h.arcmsr_ccbacb_ptr = acb;
+ srb->pccb = pccb;
if((pccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
if(!(pccb->ccb_h.flags & CAM_SCATTER_VALID)) {
/* Single buffer */
@@ -2510,7 +2752,7 @@ static void arcmsr_action(struct cam_sim * psim, union ccb * pccb)
/* Buffer is virtual */
u_int32_t error, s;
- s=splsoftvm();
+ s = splsoftvm();
error = bus_dmamap_load(acb->dm_segs_dmat
, srb->dm_segs_dmamap
, pccb->csio.data_ptr
@@ -2544,7 +2786,7 @@ static void arcmsr_action(struct cam_sim * psim, union ccb * pccb)
free(srb, M_DEVBUF);
return;
}
- segs=(struct bus_dma_segment *)pccb->csio.data_ptr;
+ segs = (struct bus_dma_segment *)pccb->csio.data_ptr;
arcmsr_execute_srb(srb, segs, pccb->csio.sglist_cnt, 0);
}
} else {
@@ -2559,28 +2801,29 @@ static void arcmsr_action(struct cam_sim * psim, union ccb * pccb)
break;
}
case XPT_PATH_INQ: {
- struct ccb_pathinq *cpi= &pccb->cpi;
+ struct ccb_pathinq *cpi = &pccb->cpi;
- cpi->version_num=1;
- cpi->hba_inquiry=PI_SDTR_ABLE | PI_TAG_ABLE;
- cpi->target_sprt=0;
- cpi->hba_misc=0;
- cpi->hba_eng_cnt=0;
- cpi->max_target=ARCMSR_MAX_TARGETID; /* 0-16 */
- cpi->max_lun=ARCMSR_MAX_TARGETLUN; /* 0-7 */
- cpi->initiator_id=ARCMSR_SCSI_INITIATOR_ID; /* 255 */
- cpi->bus_id=cam_sim_bus(psim);
+ cpi->version_num = 1;
+ cpi->hba_inquiry = PI_SDTR_ABLE | PI_TAG_ABLE;
+ cpi->target_sprt = 0;
+ cpi->hba_misc = 0;
+ cpi->hba_eng_cnt = 0;
+ cpi->max_target = ARCMSR_MAX_TARGETID; /* 0-16 */
+ cpi->max_lun = ARCMSR_MAX_TARGETLUN; /* 0-7 */
+ cpi->initiator_id = ARCMSR_SCSI_INITIATOR_ID; /* 255 */
+ cpi->bus_id = cam_sim_bus(psim);
strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN);
strncpy(cpi->hba_vid, "ARCMSR", HBA_IDLEN);
strncpy(cpi->dev_name, cam_sim_name(psim), DEV_IDLEN);
- cpi->unit_number=cam_sim_unit(psim);
+ cpi->unit_number = cam_sim_unit(psim);
#ifdef CAM_NEW_TRAN_CODE
if(acb->adapter_bus_speed == ACB_BUS_SPEED_6G)
cpi->base_transfer_speed = 600000;
else
cpi->base_transfer_speed = 300000;
if((acb->vendor_device_id == PCIDevVenIDARC1880) ||
- (acb->vendor_device_id == PCIDevVenIDARC1680))
+ (acb->vendor_device_id == PCIDevVenIDARC1680) ||
+ (acb->vendor_device_id == PCIDevVenIDARC1214))
{
cpi->transport = XPORT_SAS;
cpi->transport_version = 0;
@@ -2601,7 +2844,7 @@ static void arcmsr_action(struct cam_sim * psim, union ccb * pccb)
case XPT_ABORT: {
union ccb *pabort_ccb;
- pabort_ccb=pccb->cab.abort_ccb;
+ pabort_ccb = pccb->cab.abort_ccb;
switch (pabort_ccb->ccb_h.func_code) {
case XPT_ACCEPT_TARGET_IO:
case XPT_IMMED_NOTIFY:
@@ -2651,7 +2894,7 @@ static void arcmsr_action(struct cam_sim * psim, union ccb * pccb)
xpt_done(pccb);
break;
}
- cts= &pccb->cts;
+ cts = &pccb->cts;
#ifdef CAM_NEW_TRAN_CODE
{
struct ccb_trans_settings_scsi *scsi;
@@ -2664,14 +2907,16 @@ static void arcmsr_action(struct cam_sim * psim, union ccb * pccb)
cts->protocol = PROTO_SCSI;
if((acb->vendor_device_id == PCIDevVenIDARC1880) ||
- (acb->vendor_device_id == PCIDevVenIDARC1680))
+ (acb->vendor_device_id == PCIDevVenIDARC1680) ||
+ (acb->vendor_device_id == PCIDevVenIDARC1214))
{
cts->protocol_version = SCSI_REV_SPC2;
cts->transport_version = 0;
cts->transport = XPORT_SAS;
sas = &cts->xport_specific.sas;
sas->valid = CTS_SAS_VALID_SPEED;
- if(acb->vendor_device_id == PCIDevVenIDARC1880)
+ if((acb->vendor_device_id == PCIDevVenIDARC1880) ||
+ (acb->vendor_device_id == PCIDevVenIDARC1214))
sas->bitrate = 600000;
else if(acb->vendor_device_id == PCIDevVenIDARC1680)
sas->bitrate = 300000;
@@ -2683,9 +2928,9 @@ static void arcmsr_action(struct cam_sim * psim, union ccb * pccb)
cts->transport = XPORT_SPI;
spi = &cts->xport_specific.spi;
spi->flags = CTS_SPI_FLAGS_DISC_ENB;
- spi->sync_period=2;
- spi->sync_offset=32;
- spi->bus_width=MSG_EXT_WDTR_BUS_16_BIT;
+ spi->sync_period = 2;
+ spi->sync_offset = 32;
+ spi->bus_width = MSG_EXT_WDTR_BUS_16_BIT;
spi->valid = CTS_SPI_VALID_DISC
| CTS_SPI_VALID_SYNC_RATE
| CTS_SPI_VALID_SYNC_OFFSET
@@ -2694,11 +2939,11 @@ static void arcmsr_action(struct cam_sim * psim, union ccb * pccb)
}
#else
{
- cts->flags=(CCB_TRANS_DISC_ENB | CCB_TRANS_TAG_ENB);
- cts->sync_period=2;
- cts->sync_offset=32;
- cts->bus_width=MSG_EXT_WDTR_BUS_16_BIT;
- cts->valid=CCB_TRANS_SYNC_RATE_VALID |
+ cts->flags = (CCB_TRANS_DISC_ENB | CCB_TRANS_TAG_ENB);
+ cts->sync_period = 2;
+ cts->sync_offset = 32;
+ cts->bus_width = MSG_EXT_WDTR_BUS_16_BIT;
+ cts->valid = CCB_TRANS_SYNC_RATE_VALID |
CCB_TRANS_SYNC_OFFSET_VALID |
CCB_TRANS_BUS_WIDTH_VALID |
CCB_TRANS_DISC_VALID |
@@ -2728,7 +2973,7 @@ static void arcmsr_action(struct cam_sim * psim, union ccb * pccb)
u_int32_t size_mb;
u_int32_t secs_per_cylinder;
- ccg= &pccb->ccg;
+ ccg = &pccb->ccg;
if (ccg->block_size == 0) {
pccb->ccb_h.status = CAM_REQ_INVALID;
xpt_done(pccb);
@@ -2739,16 +2984,16 @@ static void arcmsr_action(struct cam_sim * psim, union ccb * pccb)
xpt_done(pccb);
break;
}
- size_mb=ccg->volume_size/((1024L * 1024L)/ccg->block_size);
+ size_mb = ccg->volume_size/((1024L * 1024L)/ccg->block_size);
if(size_mb > 1024 ) {
- ccg->heads=255;
- ccg->secs_per_track=63;
+ ccg->heads = 255;
+ ccg->secs_per_track = 63;
} else {
- ccg->heads=64;
- ccg->secs_per_track=32;
+ ccg->heads = 64;
+ ccg->secs_per_track = 32;
}
- secs_per_cylinder=ccg->heads * ccg->secs_per_track;
- ccg->cylinders=ccg->volume_size / secs_per_cylinder;
+ secs_per_cylinder = ccg->heads * ccg->secs_per_track;
+ ccg->cylinders = ccg->volume_size / secs_per_cylinder;
pccb->ccb_h.status |= CAM_REQ_CMP;
}
#endif
@@ -2801,6 +3046,18 @@ static void arcmsr_start_hbc_bgrb(struct AdapterControlBlock *acb)
**********************************************************************
**********************************************************************
*/
+static void arcmsr_start_hbd_bgrb(struct AdapterControlBlock *acb)
+{
+ acb->acb_flags |= ACB_F_MSG_START_BGRB;
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_START_BGRB);
+ if(!arcmsr_hbd_wait_msgint_ready(acb)) {
+ printf("arcmsr%d: wait 'start adapter background rebulid' timeout \n", acb->pci_unit);
+ }
+}
+/*
+**********************************************************************
+**********************************************************************
+*/
static void arcmsr_start_adapter_bgrb(struct AdapterControlBlock *acb)
{
switch (acb->adapter_type) {
@@ -2813,6 +3070,9 @@ static void arcmsr_start_adapter_bgrb(struct AdapterControlBlock *acb)
case ACB_ADAPTER_TYPE_C:
arcmsr_start_hbc_bgrb(acb);
break;
+ case ACB_ADAPTER_TYPE_D:
+ arcmsr_start_hbd_bgrb(acb);
+ break;
}
}
/*
@@ -2832,8 +3092,8 @@ polling_ccb_retry:
CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, outbound_intstatus); /*clear interrupt*/
bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap, BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
while(1) {
- if((flag_srb=CHIP_REG_READ32(HBA_MessageUnit,
- 0, outbound_queueport))==0xFFFFFFFF) {
+ if((flag_srb = CHIP_REG_READ32(HBA_MessageUnit,
+ 0, outbound_queueport)) == 0xFFFFFFFF) {
if(poll_srb_done) {
break;/*chip FIFO no ccb for completion already*/
} else {
@@ -2845,12 +3105,12 @@ polling_ccb_retry:
}
}
/* check if command done with no error*/
- srb=(struct CommandControlBlock *)
+ srb = (struct CommandControlBlock *)
(acb->vir2phy_offset+(flag_srb << 5));/*frame must be 32 bytes aligned*/
- error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
- poll_srb_done = (srb==poll_srb) ? 1:0;
- if((srb->acb!=acb) || (srb->srb_state!=ARCMSR_SRB_START)) {
- if(srb->srb_state==ARCMSR_SRB_ABORTED) {
+ error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
+ poll_srb_done = (srb == poll_srb) ? 1:0;
+ if((srb->acb != acb) || (srb->srb_state != ARCMSR_SRB_START)) {
+ if(srb->srb_state == ARCMSR_SRB_ABORTED) {
printf("arcmsr%d: scsi id=%d lun=%d srb='%p'"
"poll command abort successfully \n"
, acb->pci_unit
@@ -2876,7 +3136,7 @@ polling_ccb_retry:
*/
static void arcmsr_polling_hbb_srbdone(struct AdapterControlBlock *acb, struct CommandControlBlock *poll_srb)
{
- struct HBB_MessageUnit *phbbmu=(struct HBB_MessageUnit *)acb->pmu;
+ struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu;
struct CommandControlBlock *srb;
u_int32_t flag_srb, poll_srb_done=0, poll_count=0;
int index;
@@ -2888,8 +3148,8 @@ polling_ccb_retry:
0, iop2drv_doorbell, ARCMSR_DOORBELL_INT_CLEAR_PATTERN); /* clear doorbell interrupt */
bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap, BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
while(1) {
- index=phbbmu->doneq_index;
- if((flag_srb=phbbmu->done_qbuffer[index]) == 0) {
+ index = phbbmu->doneq_index;
+ if((flag_srb = phbbmu->done_qbuffer[index]) == 0) {
if(poll_srb_done) {
break;/*chip FIFO no ccb for completion already*/
} else {
@@ -2900,17 +3160,17 @@ polling_ccb_retry:
goto polling_ccb_retry;
}
}
- phbbmu->done_qbuffer[index]=0;
+ phbbmu->done_qbuffer[index] = 0;
index++;
index %= ARCMSR_MAX_HBB_POSTQUEUE; /*if last index number set it to 0 */
- phbbmu->doneq_index=index;
+ phbbmu->doneq_index = index;
/* check if command done with no error*/
- srb=(struct CommandControlBlock *)
+ srb = (struct CommandControlBlock *)
(acb->vir2phy_offset+(flag_srb << 5));/*frame must be 32 bytes aligned*/
- error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
- poll_srb_done = (srb==poll_srb) ? 1:0;
- if((srb->acb!=acb) || (srb->srb_state!=ARCMSR_SRB_START)) {
- if(srb->srb_state==ARCMSR_SRB_ABORTED) {
+ error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
+ poll_srb_done = (srb == poll_srb) ? 1:0;
+ if((srb->acb != acb) || (srb->srb_state != ARCMSR_SRB_START)) {
+ if(srb->srb_state == ARCMSR_SRB_ABORTED) {
printf("arcmsr%d: scsi id=%d lun=%d srb='%p'"
"poll command abort successfully \n"
, acb->pci_unit
@@ -2960,12 +3220,68 @@ polling_ccb_retry:
}
flag_srb = CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_queueport_low);
/* check if command done with no error*/
- srb=(struct CommandControlBlock *)(acb->vir2phy_offset+(flag_srb & 0xFFFFFFE0));/*frame must be 32 bytes aligned*/
- error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1)?TRUE:FALSE;
+ srb = (struct CommandControlBlock *)(acb->vir2phy_offset+(flag_srb & 0xFFFFFFE0));/*frame must be 32 bytes aligned*/
+ error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1)?TRUE:FALSE;
if (poll_srb != NULL)
- poll_srb_done = (srb==poll_srb) ? 1:0;
- if((srb->acb!=acb) || (srb->srb_state!=ARCMSR_SRB_START)) {
- if(srb->srb_state==ARCMSR_SRB_ABORTED) {
+ poll_srb_done = (srb == poll_srb) ? 1:0;
+ if((srb->acb != acb) || (srb->srb_state != ARCMSR_SRB_START)) {
+ if(srb->srb_state == ARCMSR_SRB_ABORTED) {
+ printf("arcmsr%d: scsi id=%d lun=%d srb='%p'poll command abort successfully \n"
+ , acb->pci_unit, srb->pccb->ccb_h.target_id, srb->pccb->ccb_h.target_lun, srb);
+ srb->pccb->ccb_h.status |= CAM_REQ_ABORTED;
+ arcmsr_srb_complete(srb, 1);
+ continue;
+ }
+ printf("arcmsr%d: polling get an illegal srb command done srb='%p'srboutstandingcount=%d \n"
+ , acb->pci_unit, srb, acb->srboutstandingcount);
+ continue;
+ }
+ arcmsr_report_srb_state(acb, srb, error);
+ } /*drain reply FIFO*/
+}
+/*
+**********************************************************************
+**
+**********************************************************************
+*/
+static void arcmsr_polling_hbd_srbdone(struct AdapterControlBlock *acb, struct CommandControlBlock *poll_srb)
+{
+ struct HBD_MessageUnit0 *phbdmu = (struct HBD_MessageUnit0 *)acb->pmu;
+ struct CommandControlBlock *srb;
+ u_int32_t flag_srb, poll_srb_done=0, poll_count=0;
+ u_int32_t outbound_write_pointer;
+ u_int16_t error, doneq_index;
+
+polling_ccb_retry:
+ poll_count++;
+ bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap, BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
+ while(1) {
+ outbound_write_pointer = phbdmu->done_qbuffer[0].addressLow;
+ doneq_index = phbdmu->doneq_index;
+ if ((outbound_write_pointer & 0xFF) == (doneq_index & 0xFF)) {
+ if(poll_srb_done) {
+ break;/*chip FIFO no ccb for completion already*/
+ } else {
+ UDELAY(25000);
+ if ((poll_count > 100) && (poll_srb != NULL)) {
+ break;
+ }
+ if (acb->srboutstandingcount == 0) {
+ break;
+ }
+ goto polling_ccb_retry;
+ }
+ }
+ doneq_index = arcmsr_get_doneq_index(phbdmu);
+ flag_srb = phbdmu->done_qbuffer[(doneq_index & 0xFF)+1].addressLow;
+ /* check if command done with no error*/
+ srb = (struct CommandControlBlock *)(acb->vir2phy_offset+(flag_srb & 0xFFFFFFE0));/*frame must be 32 bytes aligned*/
+ error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1) ? TRUE : FALSE;
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, outboundlist_read_pointer, doneq_index);
+ if (poll_srb != NULL)
+ poll_srb_done = (srb == poll_srb) ? 1:0;
+ if((srb->acb != acb) || (srb->srb_state != ARCMSR_SRB_START)) {
+ if(srb->srb_state == ARCMSR_SRB_ABORTED) {
printf("arcmsr%d: scsi id=%d lun=%d srb='%p'poll command abort successfully \n"
, acb->pci_unit, srb->pccb->ccb_h.target_id, srb->pccb->ccb_h.target_lun, srb);
srb->pccb->ccb_h.status |= CAM_REQ_ABORTED;
@@ -2998,6 +3314,10 @@ static void arcmsr_polling_srbdone(struct AdapterControlBlock *acb, struct Comma
arcmsr_polling_hbc_srbdone(acb, poll_srb);
}
break;
+ case ACB_ADAPTER_TYPE_D: {
+ arcmsr_polling_hbd_srbdone(acb, poll_srb);
+ }
+ break;
}
}
/*
@@ -3006,11 +3326,11 @@ static void arcmsr_polling_srbdone(struct AdapterControlBlock *acb, struct Comma
*/
static void arcmsr_get_hba_config(struct AdapterControlBlock *acb)
{
- char *acb_firm_model=acb->firm_model;
- char *acb_firm_version=acb->firm_version;
+ char *acb_firm_model = acb->firm_model;
+ char *acb_firm_version = acb->firm_version;
char *acb_device_map = acb->device_map;
- size_t iop_firm_model=offsetof(struct HBA_MessageUnit,msgcode_rwbuffer[ARCMSR_FW_MODEL_OFFSET]); /*firm_model,15,60-67*/
- size_t iop_firm_version=offsetof(struct HBA_MessageUnit,msgcode_rwbuffer[ARCMSR_FW_VERS_OFFSET]); /*firm_version,17,68-83*/
+ size_t iop_firm_model = offsetof(struct HBA_MessageUnit,msgcode_rwbuffer[ARCMSR_FW_MODEL_OFFSET]); /*firm_model,15,60-67*/
+ size_t iop_firm_version = offsetof(struct HBA_MessageUnit,msgcode_rwbuffer[ARCMSR_FW_VERS_OFFSET]); /*firm_version,17,68-83*/
size_t iop_device_map = offsetof(struct HBA_MessageUnit,msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]);
int i;
@@ -3018,33 +3338,33 @@ static void arcmsr_get_hba_config(struct AdapterControlBlock *acb)
if(!arcmsr_hba_wait_msgint_ready(acb)) {
printf("arcmsr%d: wait 'get adapter firmware miscellaneous data' timeout \n", acb->pci_unit);
}
- i=0;
- while(i<8) {
- *acb_firm_model=bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_firm_model+i);
+ i = 0;
+ while(i < 8) {
+ *acb_firm_model = bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_firm_model+i);
/* 8 bytes firm_model, 15, 60-67*/
acb_firm_model++;
i++;
}
i=0;
- while(i<16) {
- *acb_firm_version=bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_firm_version+i);
+ while(i < 16) {
+ *acb_firm_version = bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_firm_version+i);
/* 16 bytes firm_version, 17, 68-83*/
acb_firm_version++;
i++;
}
i=0;
- while(i<16) {
- *acb_device_map=bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_device_map+i);
+ while(i < 16) {
+ *acb_device_map = bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_device_map+i);
acb_device_map++;
i++;
}
printf("ARECA RAID ADAPTER%d: %s \n", acb->pci_unit, ARCMSR_DRIVER_VERSION);
printf("ARECA RAID ADAPTER%d: FIRMWARE VERSION %s \n", acb->pci_unit, acb->firm_version);
- acb->firm_request_len=CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[1]); /*firm_request_len, 1, 04-07*/
- acb->firm_numbers_queue=CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[2]); /*firm_numbers_queue, 2, 08-11*/
- acb->firm_sdram_size=CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[3]); /*firm_sdram_size, 3, 12-15*/
- acb->firm_ide_channels=CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[4]); /*firm_ide_channels, 4, 16-19*/
- acb->firm_cfg_version=CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[ARCMSR_FW_CFGVER_OFFSET]); /*firm_cfg_version, 25, */
+ acb->firm_request_len = CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[1]); /*firm_request_len, 1, 04-07*/
+ acb->firm_numbers_queue = CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[2]); /*firm_numbers_queue, 2, 08-11*/
+ acb->firm_sdram_size = CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[3]); /*firm_sdram_size, 3, 12-15*/
+ acb->firm_ide_channels = CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[4]); /*firm_ide_channels, 4, 16-19*/
+ acb->firm_cfg_version = CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[ARCMSR_FW_CFGVER_OFFSET]); /*firm_cfg_version, 25, */
}
/*
**********************************************************************
@@ -3052,11 +3372,11 @@ static void arcmsr_get_hba_config(struct AdapterControlBlock *acb)
*/
static void arcmsr_get_hbb_config(struct AdapterControlBlock *acb)
{
- char *acb_firm_model=acb->firm_model;
- char *acb_firm_version=acb->firm_version;
+ char *acb_firm_model = acb->firm_model;
+ char *acb_firm_version = acb->firm_version;
char *acb_device_map = acb->device_map;
- size_t iop_firm_model=offsetof(struct HBB_RWBUFFER, msgcode_rwbuffer[ARCMSR_FW_MODEL_OFFSET]); /*firm_model,15,60-67*/
- size_t iop_firm_version=offsetof(struct HBB_RWBUFFER, msgcode_rwbuffer[ARCMSR_FW_VERS_OFFSET]); /*firm_version,17,68-83*/
+ size_t iop_firm_model = offsetof(struct HBB_RWBUFFER, msgcode_rwbuffer[ARCMSR_FW_MODEL_OFFSET]); /*firm_model,15,60-67*/
+ size_t iop_firm_version = offsetof(struct HBB_RWBUFFER, msgcode_rwbuffer[ARCMSR_FW_VERS_OFFSET]); /*firm_version,17,68-83*/
size_t iop_device_map = offsetof(struct HBB_RWBUFFER, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]);
int i;
@@ -3064,33 +3384,33 @@ static void arcmsr_get_hbb_config(struct AdapterControlBlock *acb)
if(!arcmsr_hbb_wait_msgint_ready(acb)) {
printf( "arcmsr%d: wait" "'get adapter firmware miscellaneous data' timeout \n", acb->pci_unit);
}
- i=0;
- while(i<8) {
- *acb_firm_model=bus_space_read_1(acb->btag[1], acb->bhandle[1], iop_firm_model+i);
+ i = 0;
+ while(i < 8) {
+ *acb_firm_model = bus_space_read_1(acb->btag[1], acb->bhandle[1], iop_firm_model+i);
/* 8 bytes firm_model, 15, 60-67*/
acb_firm_model++;
i++;
}
- i=0;
- while(i<16) {
- *acb_firm_version=bus_space_read_1(acb->btag[1], acb->bhandle[1], iop_firm_version+i);
+ i = 0;
+ while(i < 16) {
+ *acb_firm_version = bus_space_read_1(acb->btag[1], acb->bhandle[1], iop_firm_version+i);
/* 16 bytes firm_version, 17, 68-83*/
acb_firm_version++;
i++;
}
- i=0;
- while(i<16) {
- *acb_device_map=bus_space_read_1(acb->btag[1], acb->bhandle[1], iop_device_map+i);
+ i = 0;
+ while(i < 16) {
+ *acb_device_map = bus_space_read_1(acb->btag[1], acb->bhandle[1], iop_device_map+i);
acb_device_map++;
i++;
}
printf("ARECA RAID ADAPTER%d: %s \n", acb->pci_unit, ARCMSR_DRIVER_VERSION);
printf("ARECA RAID ADAPTER%d: FIRMWARE VERSION %s \n", acb->pci_unit, acb->firm_version);
- acb->firm_request_len=CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[1]); /*firm_request_len, 1, 04-07*/
- acb->firm_numbers_queue=CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[2]); /*firm_numbers_queue, 2, 08-11*/
- acb->firm_sdram_size=CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[3]); /*firm_sdram_size, 3, 12-15*/
- acb->firm_ide_channels=CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[4]); /*firm_ide_channels, 4, 16-19*/
- acb->firm_cfg_version=CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[ARCMSR_FW_CFGVER_OFFSET]); /*firm_cfg_version, 25, */
+ acb->firm_request_len = CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[1]); /*firm_request_len, 1, 04-07*/
+ acb->firm_numbers_queue = CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[2]); /*firm_numbers_queue, 2, 08-11*/
+ acb->firm_sdram_size = CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[3]); /*firm_sdram_size, 3, 12-15*/
+ acb->firm_ide_channels = CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[4]); /*firm_ide_channels, 4, 16-19*/
+ acb->firm_cfg_version = CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[ARCMSR_FW_CFGVER_OFFSET]); /*firm_cfg_version, 25, */
}
/*
**********************************************************************
@@ -3098,11 +3418,11 @@ static void arcmsr_get_hbb_config(struct AdapterControlBlock *acb)
*/
static void arcmsr_get_hbc_config(struct AdapterControlBlock *acb)
{
- char *acb_firm_model=acb->firm_model;
- char *acb_firm_version=acb->firm_version;
+ char *acb_firm_model = acb->firm_model;
+ char *acb_firm_version = acb->firm_version;
char *acb_device_map = acb->device_map;
- size_t iop_firm_model=offsetof(struct HBC_MessageUnit,msgcode_rwbuffer[ARCMSR_FW_MODEL_OFFSET]); /*firm_model,15,60-67*/
- size_t iop_firm_version=offsetof(struct HBC_MessageUnit,msgcode_rwbuffer[ARCMSR_FW_VERS_OFFSET]); /*firm_version,17,68-83*/
+ size_t iop_firm_model = offsetof(struct HBC_MessageUnit,msgcode_rwbuffer[ARCMSR_FW_MODEL_OFFSET]); /*firm_model,15,60-67*/
+ size_t iop_firm_version = offsetof(struct HBC_MessageUnit,msgcode_rwbuffer[ARCMSR_FW_VERS_OFFSET]); /*firm_version,17,68-83*/
size_t iop_device_map = offsetof(struct HBC_MessageUnit,msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]);
int i;
@@ -3111,33 +3431,81 @@ static void arcmsr_get_hbc_config(struct AdapterControlBlock *acb)
if(!arcmsr_hbc_wait_msgint_ready(acb)) {
printf("arcmsr%d: wait 'get adapter firmware miscellaneous data' timeout \n", acb->pci_unit);
}
- i=0;
- while(i<8) {
- *acb_firm_model=bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_firm_model+i);
+ i = 0;
+ while(i < 8) {
+ *acb_firm_model = bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_firm_model+i);
/* 8 bytes firm_model, 15, 60-67*/
acb_firm_model++;
i++;
}
- i=0;
- while(i<16) {
- *acb_firm_version=bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_firm_version+i);
+ i = 0;
+ while(i < 16) {
+ *acb_firm_version = bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_firm_version+i);
/* 16 bytes firm_version, 17, 68-83*/
acb_firm_version++;
i++;
}
- i=0;
- while(i<16) {
- *acb_device_map=bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_device_map+i);
+ i = 0;
+ while(i < 16) {
+ *acb_device_map = bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_device_map+i);
+ acb_device_map++;
+ i++;
+ }
+ printf("ARECA RAID ADAPTER%d: %s \n", acb->pci_unit, ARCMSR_DRIVER_VERSION);
+ printf("ARECA RAID ADAPTER%d: FIRMWARE VERSION %s \n", acb->pci_unit, acb->firm_version);
+ acb->firm_request_len = CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[1]); /*firm_request_len, 1, 04-07*/
+ acb->firm_numbers_queue = CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[2]); /*firm_numbers_queue, 2, 08-11*/
+ acb->firm_sdram_size = CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[3]); /*firm_sdram_size, 3, 12-15*/
+ acb->firm_ide_channels = CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[4]); /*firm_ide_channels, 4, 16-19*/
+ acb->firm_cfg_version = CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[ARCMSR_FW_CFGVER_OFFSET]); /*firm_cfg_version, 25, */
+}
+/*
+**********************************************************************
+**********************************************************************
+*/
+static void arcmsr_get_hbd_config(struct AdapterControlBlock *acb)
+{
+ char *acb_firm_model = acb->firm_model;
+ char *acb_firm_version = acb->firm_version;
+ char *acb_device_map = acb->device_map;
+ size_t iop_firm_model = offsetof(struct HBD_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_MODEL_OFFSET]); /*firm_model,15,60-67*/
+ size_t iop_firm_version = offsetof(struct HBD_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_VERS_OFFSET]); /*firm_version,17,68-83*/
+ size_t iop_device_map = offsetof(struct HBD_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]);
+ int i;
+
+ if(CHIP_REG_READ32(HBD_MessageUnit, 0, outbound_doorbell) & ARCMSR_HBDMU_IOP2DRV_MESSAGE_CMD_DONE)
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, outbound_doorbell, ARCMSR_HBDMU_IOP2DRV_MESSAGE_CMD_DONE_CLEAR);
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_GET_CONFIG);
+ if(!arcmsr_hbd_wait_msgint_ready(acb)) {
+ printf("arcmsr%d: wait 'get adapter firmware miscellaneous data' timeout \n", acb->pci_unit);
+ }
+ i = 0;
+ while(i < 8) {
+ *acb_firm_model = bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_firm_model+i);
+ /* 8 bytes firm_model, 15, 60-67*/
+ acb_firm_model++;
+ i++;
+ }
+ i = 0;
+ while(i < 16) {
+ *acb_firm_version = bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_firm_version+i);
+ /* 16 bytes firm_version, 17, 68-83*/
+ acb_firm_version++;
+ i++;
+ }
+ i = 0;
+ while(i < 16) {
+ *acb_device_map = bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_device_map+i);
acb_device_map++;
i++;
}
printf("ARECA RAID ADAPTER%d: %s \n", acb->pci_unit, ARCMSR_DRIVER_VERSION);
printf("ARECA RAID ADAPTER%d: FIRMWARE VERSION %s \n", acb->pci_unit, acb->firm_version);
- acb->firm_request_len =CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[1]); /*firm_request_len, 1, 04-07*/
- acb->firm_numbers_queue =CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[2]); /*firm_numbers_queue, 2, 08-11*/
- acb->firm_sdram_size =CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[3]); /*firm_sdram_size, 3, 12-15*/
- acb->firm_ide_channels =CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[4]); /*firm_ide_channels, 4, 16-19*/
- acb->firm_cfg_version =CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[ARCMSR_FW_CFGVER_OFFSET]); /*firm_cfg_version, 25, */
+ acb->firm_request_len = CHIP_REG_READ32(HBD_MessageUnit, 0, msgcode_rwbuffer[2]); /*firm_request_len, 1, 04-07*/
+ acb->firm_numbers_queue = CHIP_REG_READ32(HBD_MessageUnit, 0, msgcode_rwbuffer[3]); /*firm_numbers_queue, 2, 08-11*/
+ acb->firm_sdram_size = CHIP_REG_READ32(HBD_MessageUnit, 0, msgcode_rwbuffer[4]); /*firm_sdram_size, 3, 12-15*/
+ acb->firm_ide_channels = CHIP_REG_READ32(HBD_MessageUnit, 0, msgcode_rwbuffer[5]); /*firm_ide_channels, 4, 16-19*/
+ acb->firm_cfg_version = CHIP_REG_READ32(HBD_MessageUnit, 0, msgcode_rwbuffer[ARCMSR_FW_CFGVER_OFFSET]); /*firm_cfg_version, 25, */
}
/*
**********************************************************************
@@ -3158,6 +3526,10 @@ static void arcmsr_get_firmware_spec(struct AdapterControlBlock *acb)
arcmsr_get_hbc_config(acb);
}
break;
+ case ACB_ADAPTER_TYPE_D: {
+ arcmsr_get_hbd_config(acb);
+ }
+ break;
}
}
/*
@@ -3206,6 +3578,18 @@ static void arcmsr_wait_firmware_ready( struct AdapterControlBlock *acb)
}
}
break;
+ case ACB_ADAPTER_TYPE_D: {
+ while ((CHIP_REG_READ32(HBD_MessageUnit, 0, outbound_msgaddr1) & ARCMSR_HBDMU_MESSAGE_FIRMWARE_OK) == 0)
+ {
+ if (timeout++ > 2000) /* (2000*15)/1000 = 30 sec */
+ {
+ printf( "arcmsr%d:timed out waiting for firmware ready\n", acb->pci_unit);
+ return;
+ }
+ UDELAY(15000); /* wait 15 milli-seconds */
+ }
+ }
+ break;
}
}
/*
@@ -3236,6 +3620,15 @@ static void arcmsr_clear_doorbell_queue_buffer( struct AdapterControlBlock *acb)
outbound_doorbell = CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_doorbell);
CHIP_REG_WRITE32(HBC_MessageUnit, 0, outbound_doorbell_clear, outbound_doorbell); /*clear doorbell interrupt */
CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_DATA_READ_OK);
+ CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_doorbell_clear); /* Dummy read to force pci flush */
+ CHIP_REG_READ32(HBC_MessageUnit, 0, inbound_doorbell); /* Dummy read to force pci flush */
+ }
+ break;
+ case ACB_ADAPTER_TYPE_D: {
+ /* empty doorbell Qbuffer if door bell ringed */
+ outbound_doorbell = CHIP_REG_READ32(HBD_MessageUnit, 0, outbound_doorbell);
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, outbound_doorbell, outbound_doorbell); /*clear doorbell interrupt */
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, inbound_doorbell, ARCMSR_HBDMU_DRV2IOP_DATA_OUT_READ);
}
break;
@@ -3249,6 +3642,7 @@ static u_int32_t arcmsr_iop_confirm(struct AdapterControlBlock *acb)
{
unsigned long srb_phyaddr;
u_int32_t srb_phyaddr_hi32;
+ u_int32_t srb_phyaddr_lo32;
/*
********************************************************************
@@ -3256,12 +3650,12 @@ static u_int32_t arcmsr_iop_confirm(struct AdapterControlBlock *acb)
** if freesrb.HighPart is not zero
********************************************************************
*/
- srb_phyaddr= (unsigned long) acb->srb_phyaddr.phyaddr;
-// srb_phyaddr_hi32=(u_int32_t) ((srb_phyaddr>>16)>>16);
- srb_phyaddr_hi32=acb->srb_phyaddr.B.phyadd_high;
+ srb_phyaddr = (unsigned long) acb->srb_phyaddr.phyaddr;
+ srb_phyaddr_hi32 = acb->srb_phyaddr.B.phyadd_high;
+ srb_phyaddr_lo32 = acb->srb_phyaddr.B.phyadd_low;
switch (acb->adapter_type) {
case ACB_ADAPTER_TYPE_A: {
- if(srb_phyaddr_hi32!=0) {
+ if(srb_phyaddr_hi32 != 0) {
CHIP_REG_WRITE32(HBA_MessageUnit, 0, msgcode_rwbuffer[0], ARCMSR_SIGNATURE_SET_CONFIG);
CHIP_REG_WRITE32(HBA_MessageUnit, 0, msgcode_rwbuffer[1], srb_phyaddr_hi32);
CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_SET_CONFIG);
@@ -3281,9 +3675,9 @@ static u_int32_t arcmsr_iop_confirm(struct AdapterControlBlock *acb)
u_int32_t post_queue_phyaddr;
struct HBB_MessageUnit *phbbmu;
- phbbmu=(struct HBB_MessageUnit *)acb->pmu;
- phbbmu->postq_index=0;
- phbbmu->doneq_index=0;
+ phbbmu = (struct HBB_MessageUnit *)acb->pmu;
+ phbbmu->postq_index = 0;
+ phbbmu->doneq_index = 0;
CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_MESSAGE_SET_POST_WINDOW);
if(!arcmsr_hbb_wait_msgint_ready(acb)) {
printf( "arcmsr%d: 'set window of post command Q' timeout\n", acb->pci_unit);
@@ -3309,7 +3703,7 @@ static u_int32_t arcmsr_iop_confirm(struct AdapterControlBlock *acb)
}
break;
case ACB_ADAPTER_TYPE_C: {
- if(srb_phyaddr_hi32!=0) {
+ if(srb_phyaddr_hi32 != 0) {
CHIP_REG_WRITE32(HBC_MessageUnit, 0, msgcode_rwbuffer[0], ARCMSR_SIGNATURE_SET_CONFIG);
CHIP_REG_WRITE32(HBC_MessageUnit, 0, msgcode_rwbuffer[1], srb_phyaddr_hi32);
CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_SET_CONFIG);
@@ -3321,6 +3715,29 @@ static u_int32_t arcmsr_iop_confirm(struct AdapterControlBlock *acb)
}
}
break;
+ case ACB_ADAPTER_TYPE_D: {
+ u_int32_t post_queue_phyaddr, done_queue_phyaddr;
+ struct HBD_MessageUnit0 *phbdmu;
+
+ phbdmu = (struct HBD_MessageUnit0 *)acb->pmu;
+ phbdmu->postq_index = 0;
+ phbdmu->doneq_index = 0x40FF;
+ post_queue_phyaddr = srb_phyaddr_lo32 + ARCMSR_SRBS_POOL_SIZE
+ + offsetof(struct HBD_MessageUnit0, post_qbuffer);
+ done_queue_phyaddr = srb_phyaddr_lo32 + ARCMSR_SRBS_POOL_SIZE
+ + offsetof(struct HBD_MessageUnit0, done_qbuffer);
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, msgcode_rwbuffer[0], ARCMSR_SIGNATURE_SET_CONFIG); /* driver "set config" signature */
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, msgcode_rwbuffer[1], srb_phyaddr_hi32);
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, msgcode_rwbuffer[2], post_queue_phyaddr); /* postQ base */
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, msgcode_rwbuffer[3], done_queue_phyaddr); /* doneQ base */
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, msgcode_rwbuffer[4], 0x100);
+ CHIP_REG_WRITE32(HBD_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_SET_CONFIG);
+ if(!arcmsr_hbd_wait_msgint_ready(acb)) {
+ printf( "arcmsr%d: 'set srb high part physical address' timeout \n", acb->pci_unit);
+ return FALSE;
+ }
+ }
+ break;
}
return (TRUE);
}
@@ -3334,12 +3751,12 @@ static void arcmsr_enable_eoi_mode(struct AdapterControlBlock *acb)
{
case ACB_ADAPTER_TYPE_A:
case ACB_ADAPTER_TYPE_C:
+ case ACB_ADAPTER_TYPE_D:
break;
case ACB_ADAPTER_TYPE_B: {
CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell,ARCMSR_MESSAGE_ACTIVE_EOI_MODE);
if(!arcmsr_hbb_wait_msgint_ready(acb)) {
printf( "arcmsr%d: 'iop enable eoi mode' timeout \n", acb->pci_unit);
-
return;
}
}
@@ -3355,7 +3772,7 @@ static void arcmsr_iop_init(struct AdapterControlBlock *acb)
u_int32_t intmask_org;
/* disable all outbound interrupt */
- intmask_org=arcmsr_disable_allintr(acb);
+ intmask_org = arcmsr_disable_allintr(acb);
arcmsr_wait_firmware_ready(acb);
arcmsr_iop_confirm(acb);
arcmsr_get_firmware_spec(acb);
@@ -3366,7 +3783,7 @@ static void arcmsr_iop_init(struct AdapterControlBlock *acb)
arcmsr_enable_eoi_mode(acb);
/* enable outbound Post Queue, outbound doorbell Interrupt */
arcmsr_enable_allintr(acb, intmask_org);
- acb->acb_flags |=ACB_F_IOP_INITED;
+ acb->acb_flags |= ACB_F_IOP_INITED;
}
/*
**********************************************************************
@@ -3374,35 +3791,37 @@ static void arcmsr_iop_init(struct AdapterControlBlock *acb)
*/
static void arcmsr_map_free_srb(void *arg, bus_dma_segment_t *segs, int nseg, int error)
{
- struct AdapterControlBlock *acb=arg;
+ struct AdapterControlBlock *acb = arg;
struct CommandControlBlock *srb_tmp;
- u_int8_t * dma_memptr;
u_int32_t i;
- unsigned long srb_phyaddr=(unsigned long)segs->ds_addr;
+ unsigned long srb_phyaddr = (unsigned long)segs->ds_addr;
- dma_memptr=acb->uncacheptr;
- acb->srb_phyaddr.phyaddr=srb_phyaddr;
- srb_tmp=(struct CommandControlBlock *)dma_memptr;
- for(i=0;i<ARCMSR_MAX_FREESRB_NUM;i++) {
+ acb->srb_phyaddr.phyaddr = srb_phyaddr;
+ srb_tmp = (struct CommandControlBlock *)acb->uncacheptr;
+ for(i=0; i < ARCMSR_MAX_FREESRB_NUM; i++) {
if(bus_dmamap_create(acb->dm_segs_dmat,
- /*flags*/0, &srb_tmp->dm_segs_dmamap)!=0) {
+ /*flags*/0, &srb_tmp->dm_segs_dmamap) != 0) {
acb->acb_flags |= ACB_F_MAPFREESRB_FAILD;
printf("arcmsr%d:"
" srb dmamap bus_dmamap_create error\n", acb->pci_unit);
return;
}
- srb_tmp->cdb_shifted_phyaddr=(acb->adapter_type==ACB_ADAPTER_TYPE_C)?srb_phyaddr:(srb_phyaddr >> 5);
- srb_tmp->acb=acb;
- acb->srbworkingQ[i]=acb->psrb_pool[i]=srb_tmp;
- srb_phyaddr=srb_phyaddr+SRB_SIZE;
- srb_tmp = (struct CommandControlBlock *)((unsigned long)srb_tmp+SRB_SIZE);
+ if((acb->adapter_type == ACB_ADAPTER_TYPE_C) || (acb->adapter_type == ACB_ADAPTER_TYPE_D))
+ {
+ srb_tmp->cdb_phyaddr_low = srb_phyaddr;
+ srb_tmp->cdb_phyaddr_high = (u_int32_t)((srb_phyaddr >> 16) >> 16);
+ }
+ else
+ srb_tmp->cdb_phyaddr_low = srb_phyaddr >> 5;
+ srb_tmp->acb = acb;
+ acb->srbworkingQ[i] = acb->psrb_pool[i] = srb_tmp;
+ srb_phyaddr = srb_phyaddr + SRB_SIZE;
+ srb_tmp = (struct CommandControlBlock *)((unsigned long)srb_tmp + SRB_SIZE);
}
- acb->vir2phy_offset=(unsigned long)srb_tmp-(unsigned long)srb_phyaddr;
+ acb->vir2phy_offset = (unsigned long)srb_tmp - (unsigned long)srb_phyaddr;
}
/*
************************************************************************
-**
-**
************************************************************************
*/
static void arcmsr_free_resource(struct AdapterControlBlock *acb)
@@ -3421,9 +3840,31 @@ static void arcmsr_free_resource(struct AdapterControlBlock *acb)
************************************************************************
************************************************************************
*/
+static void arcmsr_mutex_init(struct AdapterControlBlock *acb)
+{
+ ARCMSR_LOCK_INIT(&acb->isr_lock, "arcmsr isr lock");
+ ARCMSR_LOCK_INIT(&acb->srb_lock, "arcmsr srb lock");
+ ARCMSR_LOCK_INIT(&acb->postDone_lock, "arcmsr postQ lock");
+ ARCMSR_LOCK_INIT(&acb->qbuffer_lock, "arcmsr RW buffer lock");
+}
+/*
+************************************************************************
+************************************************************************
+*/
+static void arcmsr_mutex_destroy(struct AdapterControlBlock *acb)
+{
+ ARCMSR_LOCK_DESTROY(&acb->qbuffer_lock);
+ ARCMSR_LOCK_DESTROY(&acb->postDone_lock);
+ ARCMSR_LOCK_DESTROY(&acb->srb_lock);
+ ARCMSR_LOCK_DESTROY(&acb->isr_lock);
+}
+/*
+************************************************************************
+************************************************************************
+*/
static u_int32_t arcmsr_initialize(device_t dev)
{
- struct AdapterControlBlock *acb=device_get_softc(dev);
+ struct AdapterControlBlock *acb = device_get_softc(dev);
u_int16_t pci_command;
int i, j,max_coherent_size;
u_int32_t vendor_dev_id;
@@ -3435,16 +3876,22 @@ static u_int32_t arcmsr_initialize(device_t dev)
case PCIDevVenIDARC1882:
case PCIDevVenIDARC1213:
case PCIDevVenIDARC1223: {
- acb->adapter_type=ACB_ADAPTER_TYPE_C;
+ acb->adapter_type = ACB_ADAPTER_TYPE_C;
+ acb->adapter_bus_speed = ACB_BUS_SPEED_6G;
+ max_coherent_size = ARCMSR_SRBS_POOL_SIZE;
+ }
+ break;
+ case PCIDevVenIDARC1214: {
+ acb->adapter_type = ACB_ADAPTER_TYPE_D;
acb->adapter_bus_speed = ACB_BUS_SPEED_6G;
- max_coherent_size=ARCMSR_SRBS_POOL_SIZE;
+ max_coherent_size = ARCMSR_SRBS_POOL_SIZE + (sizeof(struct HBD_MessageUnit0));
}
break;
case PCIDevVenIDARC1200:
case PCIDevVenIDARC1201: {
- acb->adapter_type=ACB_ADAPTER_TYPE_B;
+ acb->adapter_type = ACB_ADAPTER_TYPE_B;
acb->adapter_bus_speed = ACB_BUS_SPEED_3G;
- max_coherent_size=ARCMSR_SRBS_POOL_SIZE+(sizeof(struct HBB_MessageUnit));
+ max_coherent_size = ARCMSR_SRBS_POOL_SIZE + (sizeof(struct HBB_MessageUnit));
}
break;
case PCIDevVenIDARC1110:
@@ -3466,9 +3913,9 @@ static u_int32_t arcmsr_initialize(device_t dev)
case PCIDevVenIDARC1381:
case PCIDevVenIDARC1680:
case PCIDevVenIDARC1681: {
- acb->adapter_type=ACB_ADAPTER_TYPE_A;
+ acb->adapter_type = ACB_ADAPTER_TYPE_A;
acb->adapter_bus_speed = ACB_BUS_SPEED_3G;
- max_coherent_size=ARCMSR_SRBS_POOL_SIZE;
+ max_coherent_size = ARCMSR_SRBS_POOL_SIZE;
}
break;
default: {
@@ -3477,7 +3924,11 @@ static u_int32_t arcmsr_initialize(device_t dev)
return ENOMEM;
}
}
+#if __FreeBSD_version >= 700000
if(bus_dma_tag_create( /*PCI parent*/ bus_get_dma_tag(dev),
+#else
+ if(bus_dma_tag_create( /*PCI parent*/ NULL,
+#endif
/*alignemnt*/ 1,
/*boundary*/ 0,
/*lowaddr*/ BUS_SPACE_MAXADDR,
@@ -3516,7 +3967,7 @@ static u_int32_t arcmsr_initialize(device_t dev)
/*flags*/ 0,
#if __FreeBSD_version >= 501102
/*lockfunc*/ busdma_lock_mutex,
- /*lockarg*/ &acb->qbuffer_lock,
+ /*lockarg*/ &acb->isr_lock,
#endif
&acb->dm_segs_dmat) != 0)
{
@@ -3564,7 +4015,7 @@ static u_int32_t arcmsr_initialize(device_t dev)
printf("arcmsr%d: srb_dmat bus_dmamap_load failure!\n", device_get_unit(dev));
return ENXIO;
}
- pci_command=pci_read_config(dev, PCIR_COMMAND, 2);
+ pci_command = pci_read_config(dev, PCIR_COMMAND, 2);
pci_command |= PCIM_CMD_BUSMASTEREN;
pci_command |= PCIM_CMD_PERRESPEN;
pci_command |= PCIM_CMD_MWRICEN;
@@ -3573,10 +4024,10 @@ static u_int32_t arcmsr_initialize(device_t dev)
pci_write_config(dev, PCIR_COMMAND, pci_command, 2);
switch(acb->adapter_type) {
case ACB_ADAPTER_TYPE_A: {
- u_int32_t rid0=PCIR_BAR(0);
+ u_int32_t rid0 = PCIR_BAR(0);
vm_offset_t mem_base0;
- acb->sys_res_arcmsr[0]=bus_alloc_resource(dev,SYS_RES_MEMORY, &rid0, 0ul, ~0ul, 0x1000, RF_ACTIVE);
+ acb->sys_res_arcmsr[0] = bus_alloc_resource(dev,SYS_RES_MEMORY, &rid0, 0ul, ~0ul, 0x1000, RF_ACTIVE);
if(acb->sys_res_arcmsr[0] == NULL) {
arcmsr_free_resource(acb);
printf("arcmsr%d: bus_alloc_resource failure!\n", device_get_unit(dev));
@@ -3587,15 +4038,15 @@ static u_int32_t arcmsr_initialize(device_t dev)
printf("arcmsr%d: rman_get_start failure!\n", device_get_unit(dev));
return ENXIO;
}
- mem_base0=(vm_offset_t) rman_get_virtual(acb->sys_res_arcmsr[0]);
- if(mem_base0==0) {
+ mem_base0 = (vm_offset_t) rman_get_virtual(acb->sys_res_arcmsr[0]);
+ if(mem_base0 == 0) {
arcmsr_free_resource(acb);
printf("arcmsr%d: rman_get_virtual failure!\n", device_get_unit(dev));
return ENXIO;
}
- acb->btag[0]=rman_get_bustag(acb->sys_res_arcmsr[0]);
- acb->bhandle[0]=rman_get_bushandle(acb->sys_res_arcmsr[0]);
- acb->pmu=(struct MessageUnit_UNION *)mem_base0;
+ acb->btag[0] = rman_get_bustag(acb->sys_res_arcmsr[0]);
+ acb->bhandle[0] = rman_get_bushandle(acb->sys_res_arcmsr[0]);
+ acb->pmu = (struct MessageUnit_UNION *)mem_base0;
}
break;
case ACB_ADAPTER_TYPE_B: {
@@ -3603,12 +4054,12 @@ static u_int32_t arcmsr_initialize(device_t dev)
struct CommandControlBlock *freesrb;
u_int32_t rid[]={ PCIR_BAR(0), PCIR_BAR(2) };
vm_offset_t mem_base[]={0,0};
- for(i=0; i<2; i++) {
- if(i==0) {
- acb->sys_res_arcmsr[i]=bus_alloc_resource(dev,SYS_RES_MEMORY, &rid[i],
+ for(i=0; i < 2; i++) {
+ if(i == 0) {
+ acb->sys_res_arcmsr[i] = bus_alloc_resource(dev,SYS_RES_MEMORY, &rid[i],
0ul, ~0ul, sizeof(struct HBB_DOORBELL), RF_ACTIVE);
} else {
- acb->sys_res_arcmsr[i]=bus_alloc_resource(dev, SYS_RES_MEMORY, &rid[i],
+ acb->sys_res_arcmsr[i] = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid[i],
0ul, ~0ul, sizeof(struct HBB_RWBUFFER), RF_ACTIVE);
}
if(acb->sys_res_arcmsr[i] == NULL) {
@@ -3621,28 +4072,27 @@ static u_int32_t arcmsr_initialize(device_t dev)
printf("arcmsr%d: rman_get_start %d failure!\n", device_get_unit(dev), i);
return ENXIO;
}
- mem_base[i]=(vm_offset_t) rman_get_virtual(acb->sys_res_arcmsr[i]);
- if(mem_base[i]==0) {
+ mem_base[i] = (vm_offset_t) rman_get_virtual(acb->sys_res_arcmsr[i]);
+ if(mem_base[i] == 0) {
arcmsr_free_resource(acb);
printf("arcmsr%d: rman_get_virtual %d failure!\n", device_get_unit(dev), i);
return ENXIO;
}
- acb->btag[i]=rman_get_bustag(acb->sys_res_arcmsr[i]);
- acb->bhandle[i]=rman_get_bushandle(acb->sys_res_arcmsr[i]);
+ acb->btag[i] = rman_get_bustag(acb->sys_res_arcmsr[i]);
+ acb->bhandle[i] = rman_get_bushandle(acb->sys_res_arcmsr[i]);
}
- freesrb=(struct CommandControlBlock *)acb->uncacheptr;
-// acb->pmu=(struct MessageUnit_UNION *)&freesrb[ARCMSR_MAX_FREESRB_NUM];
- acb->pmu=(struct MessageUnit_UNION *)((unsigned long)freesrb+ARCMSR_SRBS_POOL_SIZE);
- phbbmu=(struct HBB_MessageUnit *)acb->pmu;
- phbbmu->hbb_doorbell=(struct HBB_DOORBELL *)mem_base[0];
- phbbmu->hbb_rwbuffer=(struct HBB_RWBUFFER *)mem_base[1];
+ freesrb = (struct CommandControlBlock *)acb->uncacheptr;
+ acb->pmu = (struct MessageUnit_UNION *)((unsigned long)freesrb+ARCMSR_SRBS_POOL_SIZE);
+ phbbmu = (struct HBB_MessageUnit *)acb->pmu;
+ phbbmu->hbb_doorbell = (struct HBB_DOORBELL *)mem_base[0];
+ phbbmu->hbb_rwbuffer = (struct HBB_RWBUFFER *)mem_base[1];
}
break;
case ACB_ADAPTER_TYPE_C: {
- u_int32_t rid0=PCIR_BAR(1);
+ u_int32_t rid0 = PCIR_BAR(1);
vm_offset_t mem_base0;
- acb->sys_res_arcmsr[0]=bus_alloc_resource(dev,SYS_RES_MEMORY, &rid0, 0ul, ~0ul, sizeof(struct HBC_MessageUnit), RF_ACTIVE);
+ acb->sys_res_arcmsr[0] = bus_alloc_resource(dev,SYS_RES_MEMORY, &rid0, 0ul, ~0ul, sizeof(struct HBC_MessageUnit), RF_ACTIVE);
if(acb->sys_res_arcmsr[0] == NULL) {
arcmsr_free_resource(acb);
printf("arcmsr%d: bus_alloc_resource failure!\n", device_get_unit(dev));
@@ -3653,15 +4103,44 @@ static u_int32_t arcmsr_initialize(device_t dev)
printf("arcmsr%d: rman_get_start failure!\n", device_get_unit(dev));
return ENXIO;
}
- mem_base0=(vm_offset_t) rman_get_virtual(acb->sys_res_arcmsr[0]);
- if(mem_base0==0) {
+ mem_base0 = (vm_offset_t) rman_get_virtual(acb->sys_res_arcmsr[0]);
+ if(mem_base0 == 0) {
arcmsr_free_resource(acb);
printf("arcmsr%d: rman_get_virtual failure!\n", device_get_unit(dev));
return ENXIO;
}
- acb->btag[0]=rman_get_bustag(acb->sys_res_arcmsr[0]);
- acb->bhandle[0]=rman_get_bushandle(acb->sys_res_arcmsr[0]);
- acb->pmu=(struct MessageUnit_UNION *)mem_base0;
+ acb->btag[0] = rman_get_bustag(acb->sys_res_arcmsr[0]);
+ acb->bhandle[0] = rman_get_bushandle(acb->sys_res_arcmsr[0]);
+ acb->pmu = (struct MessageUnit_UNION *)mem_base0;
+ }
+ break;
+ case ACB_ADAPTER_TYPE_D: {
+ struct HBD_MessageUnit0 *phbdmu;
+ u_int32_t rid0 = PCIR_BAR(0);
+ vm_offset_t mem_base0;
+
+ acb->sys_res_arcmsr[0] = bus_alloc_resource(dev,SYS_RES_MEMORY, &rid0, 0ul, ~0ul, sizeof(struct HBD_MessageUnit), RF_ACTIVE);
+ if(acb->sys_res_arcmsr[0] == NULL) {
+ arcmsr_free_resource(acb);
+ printf("arcmsr%d: bus_alloc_resource failure!\n", device_get_unit(dev));
+ return ENOMEM;
+ }
+ if(rman_get_start(acb->sys_res_arcmsr[0]) <= 0) {
+ arcmsr_free_resource(acb);
+ printf("arcmsr%d: rman_get_start failure!\n", device_get_unit(dev));
+ return ENXIO;
+ }
+ mem_base0 = (vm_offset_t) rman_get_virtual(acb->sys_res_arcmsr[0]);
+ if(mem_base0 == 0) {
+ arcmsr_free_resource(acb);
+ printf("arcmsr%d: rman_get_virtual failure!\n", device_get_unit(dev));
+ return ENXIO;
+ }
+ acb->btag[0] = rman_get_bustag(acb->sys_res_arcmsr[0]);
+ acb->bhandle[0] = rman_get_bushandle(acb->sys_res_arcmsr[0]);
+ acb->pmu = (struct MessageUnit_UNION *)((unsigned long)acb->uncacheptr+ARCMSR_SRBS_POOL_SIZE);
+ phbdmu = (struct HBD_MessageUnit0 *)acb->pmu;
+ phbdmu->phbdmu = (struct HBD_MessageUnit *)mem_base0;
}
break;
}
@@ -3677,9 +4156,9 @@ static u_int32_t arcmsr_initialize(device_t dev)
** init raid volume state
********************************************************************
*/
- for(i=0;i<ARCMSR_MAX_TARGETID;i++) {
- for(j=0;j<ARCMSR_MAX_TARGETLUN;j++) {
- acb->devstate[i][j]=ARECA_RAID_GONE;
+ for(i=0; i < ARCMSR_MAX_TARGETID; i++) {
+ for(j=0; j < ARCMSR_MAX_TARGETLUN; j++) {
+ acb->devstate[i][j] = ARECA_RAID_GONE;
}
}
arcmsr_iop_init(acb);
@@ -3702,15 +4181,15 @@ static int arcmsr_attach(device_t dev)
printf("arcmsr%d: cannot allocate softc\n", unit);
return (ENOMEM);
}
- ARCMSR_LOCK_INIT(&acb->qbuffer_lock, "arcmsr Q buffer lock");
+ arcmsr_mutex_init(acb);
if(arcmsr_initialize(dev)) {
printf("arcmsr%d: initialize failure!\n", unit);
- ARCMSR_LOCK_DESTROY(&acb->qbuffer_lock);
+ arcmsr_mutex_destroy(acb);
return ENXIO;
}
/* After setting up the adapter, map our interrupt */
- rid=0;
- irqres=bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0ul, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE);
+ rid = 0;
+ irqres = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0ul, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE);
if(irqres == NULL ||
#if __FreeBSD_version >= 700025
bus_setup_intr(dev, irqres, INTR_TYPE_CAM|INTR_ENTROPY|INTR_MPSAFE, NULL, arcmsr_intr_handler, acb, &acb->ih)) {
@@ -3718,41 +4197,41 @@ static int arcmsr_attach(device_t dev)
bus_setup_intr(dev, irqres, INTR_TYPE_CAM|INTR_ENTROPY|INTR_MPSAFE, arcmsr_intr_handler, acb, &acb->ih)) {
#endif
arcmsr_free_resource(acb);
- ARCMSR_LOCK_DESTROY(&acb->qbuffer_lock);
+ arcmsr_mutex_destroy(acb);
printf("arcmsr%d: unable to register interrupt handler!\n", unit);
return ENXIO;
}
- acb->irqres=irqres;
- acb->pci_dev=dev;
- acb->pci_unit=unit;
+ acb->irqres = irqres;
+ acb->pci_dev = dev;
+ acb->pci_unit = unit;
/*
* Now let the CAM generic SCSI layer find the SCSI devices on
* the bus * start queue to reset to the idle loop. *
* Create device queue of SIM(s) * (MAX_START_JOB - 1) :
* max_sim_transactions
*/
- devq=cam_simq_alloc(ARCMSR_MAX_START_JOB);
+ devq = cam_simq_alloc(ARCMSR_MAX_START_JOB);
if(devq == NULL) {
arcmsr_free_resource(acb);
bus_release_resource(dev, SYS_RES_IRQ, 0, acb->irqres);
- ARCMSR_LOCK_DESTROY(&acb->qbuffer_lock);
+ arcmsr_mutex_destroy(acb);
printf("arcmsr%d: cam_simq_alloc failure!\n", unit);
return ENXIO;
}
#if __FreeBSD_version >= 700025
- acb->psim=cam_sim_alloc(arcmsr_action, arcmsr_poll, "arcmsr", acb, unit, &acb->qbuffer_lock, 1, ARCMSR_MAX_OUTSTANDING_CMD, devq);
+ acb->psim = cam_sim_alloc(arcmsr_action, arcmsr_poll, "arcmsr", acb, unit, &acb->isr_lock, 1, ARCMSR_MAX_OUTSTANDING_CMD, devq);
#else
- acb->psim=cam_sim_alloc(arcmsr_action, arcmsr_poll, "arcmsr", acb, unit, 1, ARCMSR_MAX_OUTSTANDING_CMD, devq);
+ acb->psim = cam_sim_alloc(arcmsr_action, arcmsr_poll, "arcmsr", acb, unit, 1, ARCMSR_MAX_OUTSTANDING_CMD, devq);
#endif
if(acb->psim == NULL) {
arcmsr_free_resource(acb);
bus_release_resource(dev, SYS_RES_IRQ, 0, acb->irqres);
cam_simq_free(devq);
- ARCMSR_LOCK_DESTROY(&acb->qbuffer_lock);
+ arcmsr_mutex_destroy(acb);
printf("arcmsr%d: cam_sim_alloc failure!\n", unit);
return ENXIO;
}
- ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
+ ARCMSR_LOCK_ACQUIRE(&acb->isr_lock);
#if __FreeBSD_version >= 700044
if(xpt_bus_register(acb->psim, dev, 0) != CAM_SUCCESS) {
#else
@@ -3761,7 +4240,7 @@ static int arcmsr_attach(device_t dev)
arcmsr_free_resource(acb);
bus_release_resource(dev, SYS_RES_IRQ, 0, acb->irqres);
cam_sim_free(acb->psim, /*free_devq*/TRUE);
- ARCMSR_LOCK_DESTROY(&acb->qbuffer_lock);
+ arcmsr_mutex_destroy(acb);
printf("arcmsr%d: xpt_bus_register failure!\n", unit);
return ENXIO;
}
@@ -3770,7 +4249,7 @@ static int arcmsr_attach(device_t dev)
bus_release_resource(dev, SYS_RES_IRQ, 0, acb->irqres);
xpt_bus_deregister(cam_sim_path(acb->psim));
cam_sim_free(acb->psim, /* free_simq */ TRUE);
- ARCMSR_LOCK_DESTROY(&acb->qbuffer_lock);
+ arcmsr_mutex_destroy(acb);
printf("arcmsr%d: xpt_create_path failure!\n", unit);
return ENXIO;
}
@@ -3778,17 +4257,17 @@ static int arcmsr_attach(device_t dev)
****************************************************
*/
xpt_setup_ccb(&csa.ccb_h, acb->ppath, /*priority*/5);
- csa.ccb_h.func_code=XPT_SASYNC_CB;
- csa.event_enable=AC_FOUND_DEVICE|AC_LOST_DEVICE;
- csa.callback=arcmsr_async;
- csa.callback_arg=acb->psim;
+ csa.ccb_h.func_code = XPT_SASYNC_CB;
+ csa.event_enable = AC_FOUND_DEVICE|AC_LOST_DEVICE;
+ csa.callback = arcmsr_async;
+ csa.callback_arg = acb->psim;
xpt_action((union ccb *)&csa);
- ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
+ ARCMSR_LOCK_RELEASE(&acb->isr_lock);
/* Create the control device. */
- acb->ioctl_dev=make_dev(&arcmsr_cdevsw, unit, UID_ROOT, GID_WHEEL /* GID_OPERATOR */, S_IRUSR | S_IWUSR, "arcmsr%d", unit);
+ acb->ioctl_dev = make_dev(&arcmsr_cdevsw, unit, UID_ROOT, GID_WHEEL /* GID_OPERATOR */, S_IRUSR | S_IWUSR, "arcmsr%d", unit);
#if __FreeBSD_version < 503000
- acb->ioctl_dev->si_drv1=acb;
+ acb->ioctl_dev->si_drv1 = acb;
#endif
#if __FreeBSD_version > 500005
(void)make_dev_alias(acb->ioctl_dev, "arc%d", unit);
@@ -3813,7 +4292,7 @@ static int arcmsr_probe(device_t dev)
if (pci_get_vendor(dev) != PCI_VENDOR_ID_ARECA) {
return (ENXIO);
}
- switch(id=pci_get_devid(dev)) {
+ switch(id = pci_get_devid(dev)) {
case PCIDevVenIDARC1110:
case PCIDevVenIDARC1200:
case PCIDevVenIDARC1201:
@@ -3831,7 +4310,7 @@ static int arcmsr_probe(device_t dev)
case PCIDevVenIDARC1261:
case PCIDevVenIDARC1270:
case PCIDevVenIDARC1280:
- type = "SATA";
+ type = "SATA 3G";
break;
case PCIDevVenIDARC1212:
case PCIDevVenIDARC1222:
@@ -3847,6 +4326,9 @@ static int arcmsr_probe(device_t dev)
case PCIDevVenIDARC1223:
type = "SAS 6G";
break;
+ case PCIDevVenIDARC1214:
+ type = "SATA 6G";
+ break;
default:
type = x_type;
break;
@@ -3869,36 +4351,34 @@ static int arcmsr_shutdown(device_t dev)
struct AdapterControlBlock *acb=(struct AdapterControlBlock *)device_get_softc(dev);
/* stop adapter background rebuild */
- ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
+ ARCMSR_LOCK_ACQUIRE(&acb->isr_lock);
/* disable all outbound interrupt */
- intmask_org=arcmsr_disable_allintr(acb);
+ intmask_org = arcmsr_disable_allintr(acb);
arcmsr_stop_adapter_bgrb(acb);
arcmsr_flush_adapter_cache(acb);
/* abort all outstanding command */
acb->acb_flags |= ACB_F_SCSISTOPADAPTER;
acb->acb_flags &= ~ACB_F_IOP_INITED;
- if(acb->srboutstandingcount!=0) {
+ if(acb->srboutstandingcount != 0) {
/*clear and abort all outbound posted Q*/
arcmsr_done4abort_postqueue(acb);
/* talk to iop 331 outstanding command aborted*/
arcmsr_abort_allcmd(acb);
- for(i=0;i<ARCMSR_MAX_FREESRB_NUM;i++) {
- srb=acb->psrb_pool[i];
- if(srb->srb_state==ARCMSR_SRB_START) {
- srb->srb_state=ARCMSR_SRB_ABORTED;
+ for(i=0; i < ARCMSR_MAX_FREESRB_NUM; i++) {
+ srb = acb->psrb_pool[i];
+ if(srb->srb_state == ARCMSR_SRB_START) {
+ srb->srb_state = ARCMSR_SRB_ABORTED;
srb->pccb->ccb_h.status |= CAM_REQ_ABORTED;
arcmsr_srb_complete(srb, 1);
}
}
}
- acb->srboutstandingcount=0;
- acb->workingsrb_doneindex=0;
- acb->workingsrb_startindex=0;
-#ifdef ARCMSR_DEBUG1
+ acb->srboutstandingcount = 0;
+ acb->workingsrb_doneindex = 0;
+ acb->workingsrb_startindex = 0;
acb->pktRequestCount = 0;
acb->pktReturnCount = 0;
-#endif
- ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
+ ARCMSR_LOCK_RELEASE(&acb->isr_lock);
return (0);
}
/*
@@ -3918,13 +4398,13 @@ static int arcmsr_detach(device_t dev)
bus_release_resource(dev, SYS_RES_MEMORY, PCIR_BAR(i), acb->sys_res_arcmsr[i]);
}
bus_release_resource(dev, SYS_RES_IRQ, 0, acb->irqres);
- ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
+ ARCMSR_LOCK_ACQUIRE(&acb->isr_lock);
xpt_async(AC_LOST_DEVICE, acb->ppath, NULL);
xpt_free_path(acb->ppath);
xpt_bus_deregister(cam_sim_path(acb->psim));
cam_sim_free(acb->psim, TRUE);
- ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
- ARCMSR_LOCK_DESTROY(&acb->qbuffer_lock);
+ ARCMSR_LOCK_RELEASE(&acb->isr_lock);
+ arcmsr_mutex_destroy(acb);
return (0);
}
diff --git a/sys/dev/arcmsr/arcmsr.h b/sys/dev/arcmsr/arcmsr.h
index ed8feb9..219372e 100644
--- a/sys/dev/arcmsr/arcmsr.h
+++ b/sys/dev/arcmsr/arcmsr.h
@@ -44,7 +44,7 @@
#define ARCMSR_MAX_TARGETLUN 8 /*8*/
#define ARCMSR_MAX_CHIPTYPE_NUM 4
#define ARCMSR_MAX_OUTSTANDING_CMD 256
-#define ARCMSR_MAX_START_JOB 257
+#define ARCMSR_MAX_START_JOB 256
#define ARCMSR_MAX_CMD_PERLUN ARCMSR_MAX_OUTSTANDING_CMD
#define ARCMSR_MAX_FREESRB_NUM 384
#define ARCMSR_MAX_QBUFFER 4096 /* ioctl QBUFFER */
@@ -52,6 +52,7 @@
#define ARCMSR_MAX_ADAPTER 4
#define ARCMSR_RELEASE_SIMQ_LEVEL 230
#define ARCMSR_MAX_HBB_POSTQUEUE 264 /* (ARCMSR_MAX_OUTSTANDING_CMD+8) */
+#define ARCMSR_MAX_HBD_POSTQUEUE 256
#define ARCMSR_TIMEOUT_DELAY 60 /* in sec */
/*
*********************************************************************
@@ -69,6 +70,25 @@
#ifndef offsetof
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
#endif
+
+#if __FreeBSD_version >= 500005
+ #define ARCMSR_LOCK_INIT(l, s) mtx_init(l, s, NULL, MTX_DEF)
+ #define ARCMSR_LOCK_DESTROY(l) mtx_destroy(l)
+ #define ARCMSR_LOCK_ACQUIRE(l) mtx_lock(l)
+ #define ARCMSR_LOCK_RELEASE(l) mtx_unlock(l)
+ #define ARCMSR_LOCK_TRY(l) mtx_trylock(l)
+ #define arcmsr_htole32(x) htole32(x)
+ typedef struct mtx arcmsr_lock_t;
+#else
+ #define ARCMSR_LOCK_INIT(l, s) simple_lock_init(l)
+ #define ARCMSR_LOCK_DESTROY(l)
+ #define ARCMSR_LOCK_ACQUIRE(l) simple_lock(l)
+ #define ARCMSR_LOCK_RELEASE(l) simple_unlock(l)
+ #define ARCMSR_LOCK_TRY(l) simple_lock_try(l)
+ #define arcmsr_htole32(x) (x)
+ typedef struct simplelock arcmsr_lock_t;
+#endif
+
/*
**********************************************************************************
**
@@ -84,6 +104,7 @@
#define PCI_DEVICE_ID_ARECA_1201 0x1201 /* Device ID */
#define PCI_DEVICE_ID_ARECA_1210 0x1210 /* Device ID */
#define PCI_DEVICE_ID_ARECA_1212 0x1212 /* Device ID */
+#define PCI_DEVICE_ID_ARECA_1214 0x1214 /* Device ID */
#define PCI_DEVICE_ID_ARECA_1220 0x1220 /* Device ID */
#define PCI_DEVICE_ID_ARECA_1222 0x1222 /* Device ID */
#define PCI_DEVICE_ID_ARECA_1230 0x1230 /* Device ID */
@@ -115,6 +136,7 @@
#define PCIDevVenIDARC1210 0x121017D3 /* Vendor Device ID */
#define PCIDevVenIDARC1212 0x121217D3 /* Vendor Device ID */
#define PCIDevVenIDARC1213 0x121317D3 /* Vendor Device ID */
+#define PCIDevVenIDARC1214 0x121417D3 /* Vendor Device ID */
#define PCIDevVenIDARC1220 0x122017D3 /* Vendor Device ID */
#define PCIDevVenIDARC1222 0x122217D3 /* Vendor Device ID */
#define PCIDevVenIDARC1223 0x122317D3 /* Vendor Device ID */
@@ -163,8 +185,14 @@
#define get_min(x,y) ((x) < (y) ? (x) : (y))
#define get_max(x,y) ((x) < (y) ? (y) : (x))
/*
+**************************************************************************
+**************************************************************************
+*/
+#define CHIP_REG_READ32(s, b, r) bus_space_read_4(acb->btag[b], acb->bhandle[b], offsetof(struct s, r))
+#define CHIP_REG_WRITE32(s, b, r, d) bus_space_write_4(acb->btag[b], acb->bhandle[b], offsetof(struct s, r), d)
+/*
**********************************************************************************
-**
+** IOCTL CONTROL Mail Box
**********************************************************************************
*/
struct CMD_MESSAGE {
@@ -211,7 +239,7 @@ struct CMD_MESSAGE_FIELD {
#define FUNCTION_FLUSH_ADAPTER_CACHE 0x0809
/*
************************************************************************
-** IOCTL CONTROL CODE
+** IOCTL CONTROL CODE
************************************************************************
*/
/* ARECA IO CONTROL CODE*/
@@ -232,6 +260,40 @@ struct CMD_MESSAGE_FIELD {
#define ARCMSR_IOCTL_RETURNCODE_BUS_HANG_ON 0x00000088
/*
************************************************************************
+** SPEC. for Areca HBA adapter
+************************************************************************
+*/
+/* signature of set and get firmware config */
+#define ARCMSR_SIGNATURE_GET_CONFIG 0x87974060
+#define ARCMSR_SIGNATURE_SET_CONFIG 0x87974063
+/* message code of inbound message register */
+#define ARCMSR_INBOUND_MESG0_NOP 0x00000000
+#define ARCMSR_INBOUND_MESG0_GET_CONFIG 0x00000001
+#define ARCMSR_INBOUND_MESG0_SET_CONFIG 0x00000002
+#define ARCMSR_INBOUND_MESG0_ABORT_CMD 0x00000003
+#define ARCMSR_INBOUND_MESG0_STOP_BGRB 0x00000004
+#define ARCMSR_INBOUND_MESG0_FLUSH_CACHE 0x00000005
+#define ARCMSR_INBOUND_MESG0_START_BGRB 0x00000006
+#define ARCMSR_INBOUND_MESG0_CHK331PENDING 0x00000007
+#define ARCMSR_INBOUND_MESG0_SYNC_TIMER 0x00000008
+/* doorbell interrupt generator */
+#define ARCMSR_INBOUND_DRIVER_DATA_WRITE_OK 0x00000001
+#define ARCMSR_INBOUND_DRIVER_DATA_READ_OK 0x00000002
+#define ARCMSR_OUTBOUND_IOP331_DATA_WRITE_OK 0x00000001
+#define ARCMSR_OUTBOUND_IOP331_DATA_READ_OK 0x00000002
+/* srb areca cdb flag */
+#define ARCMSR_SRBPOST_FLAG_SGL_BSIZE 0x80000000
+#define ARCMSR_SRBPOST_FLAG_IAM_BIOS 0x40000000
+#define ARCMSR_SRBREPLY_FLAG_IAM_BIOS 0x40000000
+#define ARCMSR_SRBREPLY_FLAG_ERROR 0x10000000
+#define ARCMSR_SRBREPLY_FLAG_ERROR_MODE0 0x10000000
+#define ARCMSR_SRBREPLY_FLAG_ERROR_MODE1 0x00000001
+/* outbound firmware ok */
+#define ARCMSR_OUTBOUND_MESG1_FIRMWARE_OK 0x80000000
+
+#define ARCMSR_ARC1680_BUS_RESET 0x00000003
+/*
+************************************************************************
** SPEC. for Areca HBB adapter
************************************************************************
*/
@@ -324,7 +386,303 @@ struct CMD_MESSAGE_FIELD {
#define ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE 0x00000008/*outbound message 0 ready*/
#define ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE_DOORBELL_CLEAR 0x00000008/*outbound message cmd isr door bell clear*/
#define ARCMSR_HBCMU_MESSAGE_FIRMWARE_OK 0x80000000/*ARCMSR_HBCMU_MESSAGE_FIRMWARE_OK*/
+#define ARCMSR_HBCMU_RESET_ADAPTER 0x00000024
+#define ARCMSR_HBCMU_DiagWrite_ENABLE 0x00000080
+
+/*
+************************************************************************
+** SPEC. for Areca HBD adapter
+************************************************************************
+*/
+#define ARCMSR_HBDMU_CHIP_ID 0x00004
+#define ARCMSR_HBDMU_CPU_MEMORY_CONFIGURATION 0x00008
+#define ARCMSR_HBDMU_I2_HOST_INTERRUPT_MASK 0x00034
+#define ARCMSR_HBDMU_MAIN_INTERRUPT_STATUS 0x00200
+#define ARCMSR_HBDMU_PCIE_F0_INTERRUPT_ENABLE 0x0020C
+#define ARCMSR_HBDMU_INBOUND_MESSAGE0 0x00400
+#define ARCMSR_HBDMU_INBOUND_MESSAGE1 0x00404
+#define ARCMSR_HBDMU_OUTBOUND_MESSAGE0 0x00420
+#define ARCMSR_HBDMU_OUTBOUND_MESSAGE1 0x00424
+#define ARCMSR_HBDMU_INBOUND_DOORBELL 0x00460
+#define ARCMSR_HBDMU_OUTBOUND_DOORBELL 0x00480
+#define ARCMSR_HBDMU_OUTBOUND_DOORBELL_ENABLE 0x00484
+#define ARCMSR_HBDMU_INBOUND_LIST_BASE_LOW 0x01000
+#define ARCMSR_HBDMU_INBOUND_LIST_BASE_HIGH 0x01004
+#define ARCMSR_HBDMU_INBOUND_LIST_WRITE_POINTER 0x01018
+#define ARCMSR_HBDMU_OUTBOUND_LIST_BASE_LOW 0x01060
+#define ARCMSR_HBDMU_OUTBOUND_LIST_BASE_HIGH 0x01064
+#define ARCMSR_HBDMU_OUTBOUND_LIST_COPY_POINTER 0x0106C
+#define ARCMSR_HBDMU_OUTBOUND_LIST_READ_POINTER 0x01070
+#define ARCMSR_HBDMU_OUTBOUND_INTERRUPT_CAUSE 0x01088
+#define ARCMSR_HBDMU_OUTBOUND_INTERRUPT_ENABLE 0x0108C
+
+#define ARCMSR_HBDMU_MESSAGE_WBUFFER 0x02000
+#define ARCMSR_HBDMU_MESSAGE_RBUFFER 0x02100
+#define ARCMSR_HBDMU_MESSAGE_RWBUFFER 0x02200
+
+#define ARCMSR_HBDMU_ISR_THROTTLING_LEVEL 16
+#define ARCMSR_HBDMU_ISR_MAX_DONE_QUEUE 20
+
+/* Host Interrupt Mask */
+#define ARCMSR_HBDMU_ALL_INT_ENABLE 0x00001010 /* enable all ISR */
+#define ARCMSR_HBDMU_ALL_INT_DISABLE 0x00000000 /* disable all ISR */
+
+/* Host Interrupt Status */
+#define ARCMSR_HBDMU_OUTBOUND_INT 0x00001010
+#define ARCMSR_HBDMU_OUTBOUND_DOORBELL_INT 0x00001000
+#define ARCMSR_HBDMU_OUTBOUND_POSTQUEUE_INT 0x00000010
+
+/* DoorBell*/
+#define ARCMSR_HBDMU_DRV2IOP_DATA_IN_READY 0x00000001
+#define ARCMSR_HBDMU_DRV2IOP_DATA_OUT_READ 0x00000002
+
+#define ARCMSR_HBDMU_IOP2DRV_DATA_WRITE_OK 0x00000001
+#define ARCMSR_HBDMU_IOP2DRV_DATA_READ_OK 0x00000002
+
+/*outbound message 0 ready*/
+#define ARCMSR_HBDMU_IOP2DRV_MESSAGE_CMD_DONE 0x02000000
+
+#define ARCMSR_HBDMU_F0_DOORBELL_CAUSE 0x02000003
+
+/*outbound message cmd isr door bell clear*/
+#define ARCMSR_HBDMU_IOP2DRV_MESSAGE_CMD_DONE_CLEAR 0x02000000
+
+/*outbound list */
+#define ARCMSR_HBDMU_OUTBOUND_LIST_INTERRUPT 0x00000001
+#define ARCMSR_HBDMU_OUTBOUND_LIST_INTERRUPT_CLEAR 0x00000001
+
+/*ARCMSR_HBAMU_MESSAGE_FIRMWARE_OK*/
+#define ARCMSR_HBDMU_MESSAGE_FIRMWARE_OK 0x80000000
+/*
+*********************************************************************
+** Message Unit structure
+*********************************************************************
+*/
+struct HBA_MessageUnit
+{
+ u_int32_t resrved0[4]; /*0000 000F*/
+ u_int32_t inbound_msgaddr0; /*0010 0013*/
+ u_int32_t inbound_msgaddr1; /*0014 0017*/
+ u_int32_t outbound_msgaddr0; /*0018 001B*/
+ u_int32_t outbound_msgaddr1; /*001C 001F*/
+ u_int32_t inbound_doorbell; /*0020 0023*/
+ u_int32_t inbound_intstatus; /*0024 0027*/
+ u_int32_t inbound_intmask; /*0028 002B*/
+ u_int32_t outbound_doorbell; /*002C 002F*/
+ u_int32_t outbound_intstatus; /*0030 0033*/
+ u_int32_t outbound_intmask; /*0034 0037*/
+ u_int32_t reserved1[2]; /*0038 003F*/
+ u_int32_t inbound_queueport; /*0040 0043*/
+ u_int32_t outbound_queueport; /*0044 0047*/
+ u_int32_t reserved2[2]; /*0048 004F*/
+ u_int32_t reserved3[492]; /*0050 07FF ......local_buffer 492*/
+ u_int32_t reserved4[128]; /*0800 09FF 128*/
+ u_int32_t msgcode_rwbuffer[256]; /*0a00 0DFF 256*/
+ u_int32_t message_wbuffer[32]; /*0E00 0E7F 32*/
+ u_int32_t reserved5[32]; /*0E80 0EFF 32*/
+ u_int32_t message_rbuffer[32]; /*0F00 0F7F 32*/
+ u_int32_t reserved6[32]; /*0F80 0FFF 32*/
+};
+/*
+*********************************************************************
+**
+*********************************************************************
+*/
+struct HBB_DOORBELL
+{
+ u_int8_t doorbell_reserved[ARCMSR_DRV2IOP_DOORBELL]; /*reserved */
+ u_int32_t drv2iop_doorbell; /*offset 0x00020400:00,01,02,03: window of "instruction flags" from driver to iop */
+ u_int32_t drv2iop_doorbell_mask; /* 04,05,06,07: doorbell mask */
+ u_int32_t iop2drv_doorbell; /* 08,09,10,11: window of "instruction flags" from iop to driver */
+ u_int32_t iop2drv_doorbell_mask; /* 12,13,14,15: doorbell mask */
+};
+/*
+*********************************************************************
+**
+*********************************************************************
+*/
+struct HBB_RWBUFFER
+{
+ u_int8_t message_reserved0[ARCMSR_MSGCODE_RWBUFFER]; /*reserved */
+ u_int32_t msgcode_rwbuffer[256]; /*offset 0x0000fa00: 0, 1, 2, 3,...,1023: message code read write 1024bytes */
+ u_int32_t message_wbuffer[32]; /*offset 0x0000fe00:1024,1025,1026,1027,...,1151: user space data to iop 128bytes */
+ u_int32_t message_reserved1[32]; /* 1152,1153,1154,1155,...,1279: message reserved*/
+ u_int32_t message_rbuffer[32]; /*offset 0x0000ff00:1280,1281,1282,1283,...,1407: iop data to user space 128bytes */
+};
+/*
+*********************************************************************
+**
+*********************************************************************
+*/
+struct HBB_MessageUnit
+{
+ u_int32_t post_qbuffer[ARCMSR_MAX_HBB_POSTQUEUE]; /* post queue buffer for iop */
+ u_int32_t done_qbuffer[ARCMSR_MAX_HBB_POSTQUEUE]; /* done queue buffer for iop */
+ int32_t postq_index; /* post queue index */
+ int32_t doneq_index; /* done queue index */
+ struct HBB_DOORBELL *hbb_doorbell;
+ struct HBB_RWBUFFER *hbb_rwbuffer;
+};
+/*
+*********************************************************************
+**
+*********************************************************************
+*/
+struct HBC_MessageUnit {
+ u_int32_t message_unit_status; /*0000 0003*/
+ u_int32_t slave_error_attribute; /*0004 0007*/
+ u_int32_t slave_error_address; /*0008 000B*/
+ u_int32_t posted_outbound_doorbell; /*000C 000F*/
+ u_int32_t master_error_attribute; /*0010 0013*/
+ u_int32_t master_error_address_low; /*0014 0017*/
+ u_int32_t master_error_address_high; /*0018 001B*/
+ u_int32_t hcb_size; /*001C 001F size of the PCIe window used for HCB_Mode accesses*/
+ u_int32_t inbound_doorbell; /*0020 0023*/
+ u_int32_t diagnostic_rw_data; /*0024 0027*/
+ u_int32_t diagnostic_rw_address_low; /*0028 002B*/
+ u_int32_t diagnostic_rw_address_high; /*002C 002F*/
+ u_int32_t host_int_status; /*0030 0033 host interrupt status*/
+ u_int32_t host_int_mask; /*0034 0037 host interrupt mask*/
+ u_int32_t dcr_data; /*0038 003B*/
+ u_int32_t dcr_address; /*003C 003F*/
+ u_int32_t inbound_queueport; /*0040 0043 port32 host inbound queue port*/
+ u_int32_t outbound_queueport; /*0044 0047 port32 host outbound queue port*/
+ u_int32_t hcb_pci_address_low; /*0048 004B*/
+ u_int32_t hcb_pci_address_high; /*004C 004F*/
+ u_int32_t iop_int_status; /*0050 0053*/
+ u_int32_t iop_int_mask; /*0054 0057*/
+ u_int32_t iop_inbound_queue_port; /*0058 005B*/
+ u_int32_t iop_outbound_queue_port; /*005C 005F*/
+ u_int32_t inbound_free_list_index; /*0060 0063 inbound free list producer consumer index*/
+ u_int32_t inbound_post_list_index; /*0064 0067 inbound post list producer consumer index*/
+ u_int32_t outbound_free_list_index; /*0068 006B outbound free list producer consumer index*/
+ u_int32_t outbound_post_list_index; /*006C 006F outbound post list producer consumer index*/
+ u_int32_t inbound_doorbell_clear; /*0070 0073*/
+ u_int32_t i2o_message_unit_control; /*0074 0077*/
+ u_int32_t last_used_message_source_address_low; /*0078 007B*/
+ u_int32_t last_used_message_source_address_high; /*007C 007F*/
+ u_int32_t pull_mode_data_byte_count[4]; /*0080 008F pull mode data byte count0..count7*/
+ u_int32_t message_dest_address_index; /*0090 0093*/
+ u_int32_t done_queue_not_empty_int_counter_timer; /*0094 0097*/
+ u_int32_t utility_A_int_counter_timer; /*0098 009B*/
+ u_int32_t outbound_doorbell; /*009C 009F*/
+ u_int32_t outbound_doorbell_clear; /*00A0 00A3*/
+ u_int32_t message_source_address_index; /*00A4 00A7 message accelerator source address consumer producer index*/
+ u_int32_t message_done_queue_index; /*00A8 00AB message accelerator completion queue consumer producer index*/
+ u_int32_t reserved0; /*00AC 00AF*/
+ u_int32_t inbound_msgaddr0; /*00B0 00B3 scratchpad0*/
+ u_int32_t inbound_msgaddr1; /*00B4 00B7 scratchpad1*/
+ u_int32_t outbound_msgaddr0; /*00B8 00BB scratchpad2*/
+ u_int32_t outbound_msgaddr1; /*00BC 00BF scratchpad3*/
+ u_int32_t inbound_queueport_low; /*00C0 00C3 port64 host inbound queue port low*/
+ u_int32_t inbound_queueport_high; /*00C4 00C7 port64 host inbound queue port high*/
+ u_int32_t outbound_queueport_low; /*00C8 00CB port64 host outbound queue port low*/
+ u_int32_t outbound_queueport_high; /*00CC 00CF port64 host outbound queue port high*/
+ u_int32_t iop_inbound_queue_port_low; /*00D0 00D3*/
+ u_int32_t iop_inbound_queue_port_high; /*00D4 00D7*/
+ u_int32_t iop_outbound_queue_port_low; /*00D8 00DB*/
+ u_int32_t iop_outbound_queue_port_high; /*00DC 00DF*/
+ u_int32_t message_dest_queue_port_low; /*00E0 00E3 message accelerator destination queue port low*/
+ u_int32_t message_dest_queue_port_high; /*00E4 00E7 message accelerator destination queue port high*/
+ u_int32_t last_used_message_dest_address_low; /*00E8 00EB last used message accelerator destination address low*/
+ u_int32_t last_used_message_dest_address_high; /*00EC 00EF last used message accelerator destination address high*/
+ u_int32_t message_done_queue_base_address_low; /*00F0 00F3 message accelerator completion queue base address low*/
+ u_int32_t message_done_queue_base_address_high; /*00F4 00F7 message accelerator completion queue base address high*/
+ u_int32_t host_diagnostic; /*00F8 00FB*/
+ u_int32_t write_sequence; /*00FC 00FF*/
+ u_int32_t reserved1[34]; /*0100 0187*/
+ u_int32_t reserved2[1950]; /*0188 1FFF*/
+ u_int32_t message_wbuffer[32]; /*2000 207F*/
+ u_int32_t reserved3[32]; /*2080 20FF*/
+ u_int32_t message_rbuffer[32]; /*2100 217F*/
+ u_int32_t reserved4[32]; /*2180 21FF*/
+ u_int32_t msgcode_rwbuffer[256]; /*2200 23FF*/
+};
+/*
+*********************************************************************
+**
+*********************************************************************
+*/
+struct InBound_SRB {
+ uint32_t addressLow; //pointer to SRB block
+ uint32_t addressHigh;
+ uint32_t length; // in DWORDs
+ uint32_t reserved0;
+};
+
+struct OutBound_SRB {
+ uint32_t addressLow; //pointer to SRB block
+ uint32_t addressHigh;
+};
+
+struct HBD_MessageUnit {
+ uint32_t reserved0;
+ uint32_t chip_id; //0x0004
+ uint32_t cpu_mem_config; //0x0008
+ uint32_t reserved1[10]; //0x000C
+ uint32_t i2o_host_interrupt_mask; //0x0034
+ uint32_t reserved2[114]; //0x0038
+ uint32_t host_int_status; //0x0200
+ uint32_t host_int_enable; //0x0204
+ uint32_t reserved3[1]; //0x0208
+ uint32_t pcief0_int_enable; //0x020C
+ uint32_t reserved4[124]; //0x0210
+ uint32_t inbound_msgaddr0; //0x0400
+ uint32_t inbound_msgaddr1; //0x0404
+ uint32_t reserved5[6]; //0x0408
+ uint32_t outbound_msgaddr0; //0x0420
+ uint32_t outbound_msgaddr1; //0x0424
+ uint32_t reserved6[14]; //0x0428
+ uint32_t inbound_doorbell; //0x0460
+ uint32_t reserved7[7]; //0x0464
+ uint32_t outbound_doorbell; //0x0480
+ uint32_t outbound_doorbell_enable; //0x0484
+ uint32_t reserved8[734]; //0x0488
+ uint32_t inboundlist_base_low; //0x1000
+ uint32_t inboundlist_base_high; //0x1004
+ uint32_t reserved9[4]; //0x1008
+ uint32_t inboundlist_write_pointer; //0x1018
+ uint32_t inboundlist_read_pointer; //0x101C
+ uint32_t reserved10[16]; //0x1020
+ uint32_t outboundlist_base_low; //0x1060
+ uint32_t outboundlist_base_high; //0x1064
+ uint32_t reserved11; //0x1068
+ uint32_t outboundlist_copy_pointer; //0x106C
+ uint32_t outboundlist_read_pointer; //0x1070 0x1072
+ uint32_t reserved12[5]; //0x1074
+ uint32_t outboundlist_interrupt_cause; //0x1088
+ uint32_t outboundlist_interrupt_enable; //0x108C
+ uint32_t reserved13[988]; //0x1090
+ uint32_t message_wbuffer[32]; //0x2000
+ uint32_t reserved14[32]; //0x2080
+ uint32_t message_rbuffer[32]; //0x2100
+ uint32_t reserved15[32]; //0x2180
+ uint32_t msgcode_rwbuffer[256]; //0x2200
+};
+
+struct HBD_MessageUnit0 {
+ struct InBound_SRB post_qbuffer[ARCMSR_MAX_HBD_POSTQUEUE];
+ struct OutBound_SRB done_qbuffer[ARCMSR_MAX_HBD_POSTQUEUE+1];
+ uint16_t postq_index;
+ uint16_t doneq_index;
+ struct HBD_MessageUnit *phbdmu;
+};
+
+/*
+*********************************************************************
+**
+*********************************************************************
+*/
+struct MessageUnit_UNION
+{
+ union {
+ struct HBA_MessageUnit hbamu;
+ struct HBB_MessageUnit hbbmu;
+ struct HBC_MessageUnit hbcmu;
+ struct HBD_MessageUnit0 hbdmu;
+ } muu;
+};
/*
*************************************************************
** structure for holding DMA address data
@@ -543,38 +901,8 @@ struct CMD_MESSAGE_FIELD {
** LSI2108 support I/O register
** All driver functionality is supported through I/O address
**
-** For further spec, refer to
-** \spec\lsi\2108 for Areca\2108\LSISAS2108_PG_NoEncryption.pdf : Chapter 8 (8-11/8-28)
-** \spec\lsi\2108 for Areca\2108\SAS2108_RM_20.pdf : for configuration space
************************************************************************************************
*/
-/* signature of set and get firmware config */
-#define ARCMSR_SIGNATURE_GET_CONFIG 0x87974060
-#define ARCMSR_SIGNATURE_SET_CONFIG 0x87974063
-/* message code of inbound message register */
-#define ARCMSR_INBOUND_MESG0_NOP 0x00000000
-#define ARCMSR_INBOUND_MESG0_GET_CONFIG 0x00000001
-#define ARCMSR_INBOUND_MESG0_SET_CONFIG 0x00000002
-#define ARCMSR_INBOUND_MESG0_ABORT_CMD 0x00000003
-#define ARCMSR_INBOUND_MESG0_STOP_BGRB 0x00000004
-#define ARCMSR_INBOUND_MESG0_FLUSH_CACHE 0x00000005
-#define ARCMSR_INBOUND_MESG0_START_BGRB 0x00000006
-#define ARCMSR_INBOUND_MESG0_CHK331PENDING 0x00000007
-#define ARCMSR_INBOUND_MESG0_SYNC_TIMER 0x00000008
-/* doorbell interrupt generator */
-#define ARCMSR_INBOUND_DRIVER_DATA_WRITE_OK 0x00000001
-#define ARCMSR_INBOUND_DRIVER_DATA_READ_OK 0x00000002
-#define ARCMSR_OUTBOUND_IOP331_DATA_WRITE_OK 0x00000001
-#define ARCMSR_OUTBOUND_IOP331_DATA_READ_OK 0x00000002
-/* srb areca cdb flag */
-#define ARCMSR_SRBPOST_FLAG_SGL_BSIZE 0x80000000
-#define ARCMSR_SRBPOST_FLAG_IAM_BIOS 0x40000000
-#define ARCMSR_SRBREPLY_FLAG_IAM_BIOS 0x40000000
-#define ARCMSR_SRBREPLY_FLAG_ERROR 0x10000000
-#define ARCMSR_SRBREPLY_FLAG_ERROR_MODE0 0x10000000
-#define ARCMSR_SRBREPLY_FLAG_ERROR_MODE1 0x00000001
-/* outbound firmware ok */
-#define ARCMSR_OUTBOUND_MESG1_FIRMWARE_OK 0x80000000
/*
**********************************
**
@@ -609,6 +937,13 @@ struct QBUFFER {
u_int8_t data[124];
};
/*
+**********************************
+*/
+typedef struct PHYS_ADDR64 {
+ u_int32_t phyadd_low;
+ u_int32_t phyadd_high;
+}PHYSADDR64;
+/*
************************************************************************************************
** FIRMWARE INFO
************************************************************************************************
@@ -673,12 +1008,6 @@ struct ARCMSR_CDB {
u_int8_t CdbLength; /* 04h not used now */
u_int8_t sgcount; /* 05h */
u_int8_t Flags; /* 06h */
-#define ARCMSR_CDB_FLAG_SGL_BSIZE 0x01 /* bit 0: 0(256) / 1(512) bytes */
-#define ARCMSR_CDB_FLAG_BIOS 0x02 /* bit 1: 0(from driver) / 1(from BIOS) */
-#define ARCMSR_CDB_FLAG_WRITE 0x04 /* bit 2: 0(Data in) / 1(Data out) */
-#define ARCMSR_CDB_FLAG_SIMPLEQ 0x00 /* bit 4/3 ,00 : simple Q,01 : head of Q,10 : ordered Q */
-#define ARCMSR_CDB_FLAG_HEADQ 0x08
-#define ARCMSR_CDB_FLAG_ORDEREDQ 0x10
u_int8_t msgPages; /* 07h */
u_int32_t Context; /* 08h Address of this request */
@@ -687,11 +1016,27 @@ struct ARCMSR_CDB {
u_int8_t Cdb[16]; /* 10h SCSI CDB */
/*
********************************************************
- **Device Status : the same from SCSI bus if error occur
+ ** Device Status : the same from SCSI bus if error occur
** SCSI bus status codes.
********************************************************
*/
u_int8_t DeviceStatus; /* 20h if error */
+
+ u_int8_t SenseData[15]; /* 21h output */
+
+ union {
+ struct SG32ENTRY sg32entry[ARCMSR_MAX_SG_ENTRIES]; /* 30h Scatter gather address */
+ struct SG64ENTRY sg64entry[ARCMSR_MAX_SG_ENTRIES]; /* 30h */
+ } u;
+};
+/* CDB flag */
+#define ARCMSR_CDB_FLAG_SGL_BSIZE 0x01 /* bit 0: 0(256) / 1(512) bytes */
+#define ARCMSR_CDB_FLAG_BIOS 0x02 /* bit 1: 0(from driver) / 1(from BIOS) */
+#define ARCMSR_CDB_FLAG_WRITE 0x04 /* bit 2: 0(Data in) / 1(Data out) */
+#define ARCMSR_CDB_FLAG_SIMPLEQ 0x00 /* bit 4/3 ,00 : simple Q,01 : head of Q,10 : ordered Q */
+#define ARCMSR_CDB_FLAG_HEADQ 0x08
+#define ARCMSR_CDB_FLAG_ORDEREDQ 0x10
+/* scsi status */
#define SCSISTAT_GOOD 0x00
#define SCSISTAT_CHECK_CONDITION 0x02
#define SCSISTAT_CONDITION_MET 0x04
@@ -701,17 +1046,10 @@ struct ARCMSR_CDB {
#define SCSISTAT_RESERVATION_CONFLICT 0x18
#define SCSISTAT_COMMAND_TERMINATED 0x22
#define SCSISTAT_QUEUE_FULL 0x28
+/* DeviceStatus */
#define ARCMSR_DEV_SELECT_TIMEOUT 0xF0
#define ARCMSR_DEV_ABORTED 0xF1
#define ARCMSR_DEV_INIT_FAIL 0xF2
-
- u_int8_t SenseData[15]; /* 21h output */
-
- union {
- struct SG32ENTRY sg32entry[ARCMSR_MAX_SG_ENTRIES]; /* 30h Scatter gather address */
- struct SG64ENTRY sg64entry[ARCMSR_MAX_SG_ENTRIES]; /* 30h */
- } u;
-};
/*
*********************************************************************
** Command Control Block (SrbExtension)
@@ -722,14 +1060,15 @@ struct ARCMSR_CDB {
*/
struct CommandControlBlock {
struct ARCMSR_CDB arcmsr_cdb; /* 0 -503 (size of CDB=504): arcmsr messenger scsi command descriptor size 504 bytes */
- u_int32_t cdb_shifted_phyaddr; /* 504-507 */
+ u_int32_t cdb_phyaddr_low; /* 504-507 */
u_int32_t arc_cdb_size; /* 508-511 */
/* ======================512+32 bytes============================ */
union ccb *pccb; /* 512-515 516-519 pointer of freebsd scsi command */
struct AdapterControlBlock *acb; /* 520-523 524-527 */
bus_dmamap_t dm_segs_dmamap; /* 528-531 532-535 */
u_int16_t srb_flags; /* 536-537 */
- u_int16_t srb_state; /* 538-539 */
+ u_int16_t srb_state; /* 538-539 */
+ u_int32_t cdb_phyaddr_high; /* 540-543 */
struct callout ccb_callout;
/* ========================================================== */
};
@@ -754,6 +1093,10 @@ struct CommandControlBlock {
#define ARCMSR_SRB_RESET 0xA5A5
#define ARCMSR_SRB_ABORTED 0x5A5A
#define ARCMSR_SRB_ILLEGAL 0xFFFF
+
+#define SRB_SIZE ((sizeof(struct CommandControlBlock)+0x1f) & 0xffe0)
+#define ARCMSR_SRBS_POOL_SIZE (SRB_SIZE * ARCMSR_MAX_FREESRB_NUM)
+
/*
*********************************************************************
** Adapter Control Block
@@ -762,7 +1105,7 @@ struct CommandControlBlock {
#define ACB_ADAPTER_TYPE_A 0x00000001 /* hba I IOP */
#define ACB_ADAPTER_TYPE_B 0x00000002 /* hbb M IOP */
#define ACB_ADAPTER_TYPE_C 0x00000004 /* hbc L IOP */
-#define ACB_ADAPTER_TYPE_D 0x00000008 /* hbd A IOP */
+#define ACB_ADAPTER_TYPE_D 0x00000008 /* hbd M IOP */
struct AdapterControlBlock {
u_int32_t adapter_type; /* adapter A,B..... */
@@ -821,8 +1164,9 @@ struct AdapterControlBlock {
u_int32_t wqbuf_firstindex; /* first of write buffer */
u_int32_t wqbuf_lastindex; /* last of write buffer */
- arcmsr_lock_t workingQ_done_lock;
- arcmsr_lock_t workingQ_start_lock;
+ arcmsr_lock_t isr_lock;
+ arcmsr_lock_t srb_lock;
+ arcmsr_lock_t postDone_lock;
arcmsr_lock_t qbuffer_lock;
u_int8_t devstate[ARCMSR_MAX_TARGETID][ARCMSR_MAX_TARGETLUN]; /* id0 ..... id15,lun0...lun7 */
@@ -837,10 +1181,8 @@ struct AdapterControlBlock {
char firm_version[20]; /*17,68-83*/
char device_map[20]; /*21,84-99 */
struct callout devmap_callout;
-#ifdef ARCMSR_DEBUG1
u_int32_t pktRequestCount;
u_int32_t pktReturnCount;
-#endif
u_int32_t vendor_device_id;
u_int32_t adapter_bus_speed;
};/* HW_DEVICE_EXTENSION */
@@ -866,167 +1208,6 @@ struct AdapterControlBlock {
#define ACB_BUS_SPEED_6G 1
#define ACB_BUS_SPEED_12G 2
/*
-*********************************************************************
-** Message Unit structure
-*********************************************************************
-*/
-struct HBA_MessageUnit
-{
- u_int32_t resrved0[4]; /*0000 000F*/
- u_int32_t inbound_msgaddr0; /*0010 0013*/
- u_int32_t inbound_msgaddr1; /*0014 0017*/
- u_int32_t outbound_msgaddr0; /*0018 001B*/
- u_int32_t outbound_msgaddr1; /*001C 001F*/
- u_int32_t inbound_doorbell; /*0020 0023*/
- u_int32_t inbound_intstatus; /*0024 0027*/
- u_int32_t inbound_intmask; /*0028 002B*/
- u_int32_t outbound_doorbell; /*002C 002F*/
- u_int32_t outbound_intstatus; /*0030 0033*/
- u_int32_t outbound_intmask; /*0034 0037*/
- u_int32_t reserved1[2]; /*0038 003F*/
- u_int32_t inbound_queueport; /*0040 0043*/
- u_int32_t outbound_queueport; /*0044 0047*/
- u_int32_t reserved2[2]; /*0048 004F*/
- u_int32_t reserved3[492]; /*0050 07FF ......local_buffer 492*/
- u_int32_t reserved4[128]; /*0800 09FF 128*/
- u_int32_t msgcode_rwbuffer[256]; /*0a00 0DFF 256*/
- u_int32_t message_wbuffer[32]; /*0E00 0E7F 32*/
- u_int32_t reserved5[32]; /*0E80 0EFF 32*/
- u_int32_t message_rbuffer[32]; /*0F00 0F7F 32*/
- u_int32_t reserved6[32]; /*0F80 0FFF 32*/
-};
-/*
-*********************************************************************
-**
-*********************************************************************
-*/
-struct HBB_DOORBELL
-{
- u_int8_t doorbell_reserved[ARCMSR_DRV2IOP_DOORBELL]; /*reserved */
- u_int32_t drv2iop_doorbell; /*offset 0x00020400:00,01,02,03: window of "instruction flags" from driver to iop */
- u_int32_t drv2iop_doorbell_mask; /* 04,05,06,07: doorbell mask */
- u_int32_t iop2drv_doorbell; /* 08,09,10,11: window of "instruction flags" from iop to driver */
- u_int32_t iop2drv_doorbell_mask; /* 12,13,14,15: doorbell mask */
-};
-/*
-*********************************************************************
-**
-*********************************************************************
-*/
-struct HBB_RWBUFFER
-{
- u_int8_t message_reserved0[ARCMSR_MSGCODE_RWBUFFER]; /*reserved */
- u_int32_t msgcode_rwbuffer[256]; /*offset 0x0000fa00: 0, 1, 2, 3,...,1023: message code read write 1024bytes */
- u_int32_t message_wbuffer[32]; /*offset 0x0000fe00:1024,1025,1026,1027,...,1151: user space data to iop 128bytes */
- u_int32_t message_reserved1[32]; /* 1152,1153,1154,1155,...,1279: message reserved*/
- u_int32_t message_rbuffer[32]; /*offset 0x0000ff00:1280,1281,1282,1283,...,1407: iop data to user space 128bytes */
-};
-/*
-*********************************************************************
-**
-*********************************************************************
-*/
-struct HBB_MessageUnit
-{
- u_int32_t post_qbuffer[ARCMSR_MAX_HBB_POSTQUEUE]; /* post queue buffer for iop */
- u_int32_t done_qbuffer[ARCMSR_MAX_HBB_POSTQUEUE]; /* done queue buffer for iop */
- int32_t postq_index; /* post queue index */
- int32_t doneq_index; /* done queue index */
- struct HBB_DOORBELL *hbb_doorbell;
- struct HBB_RWBUFFER *hbb_rwbuffer;
-};
-
-/*
-*********************************************************************
-**
-*********************************************************************
-*/
-struct HBC_MessageUnit {
- u_int32_t message_unit_status; /*0000 0003*/
- u_int32_t slave_error_attribute; /*0004 0007*/
- u_int32_t slave_error_address; /*0008 000B*/
- u_int32_t posted_outbound_doorbell; /*000C 000F*/
- u_int32_t master_error_attribute; /*0010 0013*/
- u_int32_t master_error_address_low; /*0014 0017*/
- u_int32_t master_error_address_high; /*0018 001B*/
- u_int32_t hcb_size; /*001C 001F size of the PCIe window used for HCB_Mode accesses*/
- u_int32_t inbound_doorbell; /*0020 0023*/
- u_int32_t diagnostic_rw_data; /*0024 0027*/
- u_int32_t diagnostic_rw_address_low; /*0028 002B*/
- u_int32_t diagnostic_rw_address_high; /*002C 002F*/
- u_int32_t host_int_status; /*0030 0033 host interrupt status*/
- u_int32_t host_int_mask; /*0034 0037 host interrupt mask*/
- u_int32_t dcr_data; /*0038 003B*/
- u_int32_t dcr_address; /*003C 003F*/
- u_int32_t inbound_queueport; /*0040 0043 port32 host inbound queue port*/
- u_int32_t outbound_queueport; /*0044 0047 port32 host outbound queue port*/
- u_int32_t hcb_pci_address_low; /*0048 004B*/
- u_int32_t hcb_pci_address_high; /*004C 004F*/
- u_int32_t iop_int_status; /*0050 0053*/
- u_int32_t iop_int_mask; /*0054 0057*/
- u_int32_t iop_inbound_queue_port; /*0058 005B*/
- u_int32_t iop_outbound_queue_port; /*005C 005F*/
- u_int32_t inbound_free_list_index; /*0060 0063 inbound free list producer consumer index*/
- u_int32_t inbound_post_list_index; /*0064 0067 inbound post list producer consumer index*/
- u_int32_t outbound_free_list_index; /*0068 006B outbound free list producer consumer index*/
- u_int32_t outbound_post_list_index; /*006C 006F outbound post list producer consumer index*/
- u_int32_t inbound_doorbell_clear; /*0070 0073*/
- u_int32_t i2o_message_unit_control; /*0074 0077*/
- u_int32_t last_used_message_source_address_low; /*0078 007B*/
- u_int32_t last_used_message_source_address_high; /*007C 007F*/
- u_int32_t pull_mode_data_byte_count[4]; /*0080 008F pull mode data byte count0..count7*/
- u_int32_t message_dest_address_index; /*0090 0093*/
- u_int32_t done_queue_not_empty_int_counter_timer; /*0094 0097*/
- u_int32_t utility_A_int_counter_timer; /*0098 009B*/
- u_int32_t outbound_doorbell; /*009C 009F*/
- u_int32_t outbound_doorbell_clear; /*00A0 00A3*/
- u_int32_t message_source_address_index; /*00A4 00A7 message accelerator source address consumer producer index*/
- u_int32_t message_done_queue_index; /*00A8 00AB message accelerator completion queue consumer producer index*/
- u_int32_t reserved0; /*00AC 00AF*/
- u_int32_t inbound_msgaddr0; /*00B0 00B3 scratchpad0*/
- u_int32_t inbound_msgaddr1; /*00B4 00B7 scratchpad1*/
- u_int32_t outbound_msgaddr0; /*00B8 00BB scratchpad2*/
- u_int32_t outbound_msgaddr1; /*00BC 00BF scratchpad3*/
- u_int32_t inbound_queueport_low; /*00C0 00C3 port64 host inbound queue port low*/
- u_int32_t inbound_queueport_high; /*00C4 00C7 port64 host inbound queue port high*/
- u_int32_t outbound_queueport_low; /*00C8 00CB port64 host outbound queue port low*/
- u_int32_t outbound_queueport_high; /*00CC 00CF port64 host outbound queue port high*/
- u_int32_t iop_inbound_queue_port_low; /*00D0 00D3*/
- u_int32_t iop_inbound_queue_port_high; /*00D4 00D7*/
- u_int32_t iop_outbound_queue_port_low; /*00D8 00DB*/
- u_int32_t iop_outbound_queue_port_high; /*00DC 00DF*/
- u_int32_t message_dest_queue_port_low; /*00E0 00E3 message accelerator destination queue port low*/
- u_int32_t message_dest_queue_port_high; /*00E4 00E7 message accelerator destination queue port high*/
- u_int32_t last_used_message_dest_address_low; /*00E8 00EB last used message accelerator destination address low*/
- u_int32_t last_used_message_dest_address_high; /*00EC 00EF last used message accelerator destination address high*/
- u_int32_t message_done_queue_base_address_low; /*00F0 00F3 message accelerator completion queue base address low*/
- u_int32_t message_done_queue_base_address_high; /*00F4 00F7 message accelerator completion queue base address high*/
- u_int32_t host_diagnostic; /*00F8 00FB*/
- u_int32_t write_sequence; /*00FC 00FF*/
- u_int32_t reserved1[34]; /*0100 0187*/
- u_int32_t reserved2[1950]; /*0188 1FFF*/
- u_int32_t message_wbuffer[32]; /*2000 207F*/
- u_int32_t reserved3[32]; /*2080 20FF*/
- u_int32_t message_rbuffer[32]; /*2100 217F*/
- u_int32_t reserved4[32]; /*2180 21FF*/
- u_int32_t msgcode_rwbuffer[256]; /*2200 23FF*/
-};
-
-/*
-*********************************************************************
-**
-*********************************************************************
-*/
-struct MessageUnit_UNION
-{
- union {
- struct HBA_MessageUnit hbamu;
- struct HBB_MessageUnit hbbmu;
- struct HBC_MessageUnit hbcmu;
- } muu;
-};
-
-/*
*************************************************************
*************************************************************
*/
diff --git a/sys/dev/ata/ata-pci.h b/sys/dev/ata/ata-pci.h
index de2cd79..d918528 100644
--- a/sys/dev/ata/ata-pci.h
+++ b/sys/dev/ata/ata-pci.h
@@ -101,6 +101,12 @@ struct ata_pci_controller {
#define ATA_AMD768 0x74411022
#define ATA_AMD8111 0x74691022
#define ATA_AMD5536 0x209a1022
+#define ATA_AMD_HUDSON2_S1 0x78001022
+#define ATA_AMD_HUDSON2_S2 0x78011022
+#define ATA_AMD_HUDSON2_S3 0x78021022
+#define ATA_AMD_HUDSON2_S4 0x78031022
+#define ATA_AMD_HUDSON2_S5 0x78041022
+#define ATA_AMD_HUDSON2 0x780c1022
#define ATA_ADAPTEC_ID 0x9005
#define ATA_ADAPTEC_1420 0x02419005
@@ -254,6 +260,19 @@ struct ata_pci_controller {
#define ATA_PPT_R5 0x1e0e8086
#define ATA_PPT_R6 0x1e0f8086
+#define ATA_LPT_S1 0x8c008086
+#define ATA_LPT_S2 0x8c018086
+#define ATA_LPT_AH1 0x8c028086
+#define ATA_LPT_AH2 0x8c038086
+#define ATA_LPT_R1 0x8c048086
+#define ATA_LPT_R2 0x8c058086
+#define ATA_LPT_R3 0x8c068086
+#define ATA_LPT_R4 0x8c078086
+#define ATA_LPT_S3 0x8c088086
+#define ATA_LPT_S4 0x8c098086
+#define ATA_LPT_R5 0x8c0e8086
+#define ATA_LPT_R6 0x8c0f8086
+
#define ATA_I31244 0x32008086
#define ATA_ISCH 0x811a8086
#define ATA_DH89XXCC 0x23238086
diff --git a/sys/dev/ata/chipsets/ata-ati.c b/sys/dev/ata/chipsets/ata-ati.c
index 260dcc6..a88c825 100644
--- a/sys/dev/ata/chipsets/ata-ati.c
+++ b/sys/dev/ata/chipsets/ata-ati.c
@@ -91,6 +91,12 @@ ata_ati_probe(device_t dev)
{ ATA_ATI_IXP700_S4, 0x00, ATI_AHCI, 0, ATA_SA300, "IXP700/800" },
{ ATA_ATI_IXP800_S1, 0x00, ATI_AHCI, 0, ATA_SA300, "IXP800" },
{ ATA_ATI_IXP800_S2, 0x00, ATI_AHCI, 0, ATA_SA300, "IXP800" },
+ { ATA_AMD_HUDSON2, 0x00, ATI_PATA, 0, ATA_UDMA6, "Hudson-2" },
+ { ATA_AMD_HUDSON2_S1, 0x00, ATI_AHCI, 0, ATA_SA300, "Hudson-2" },
+ { ATA_AMD_HUDSON2_S2, 0x00, ATI_AHCI, 0, ATA_SA300, "Hudson-2" },
+ { ATA_AMD_HUDSON2_S3, 0x00, ATI_AHCI, 0, ATA_SA300, "Hudson-2" },
+ { ATA_AMD_HUDSON2_S4, 0x00, ATI_AHCI, 0, ATA_SA300, "Hudson-2" },
+ { ATA_AMD_HUDSON2_S5, 0x00, ATI_AHCI, 0, ATA_SA300, "Hudson-2" },
{ 0, 0, 0, 0, 0, 0}};
if (pci_get_vendor(dev) != ATA_ATI_ID)
diff --git a/sys/dev/ata/chipsets/ata-intel.c b/sys/dev/ata/chipsets/ata-intel.c
index 6888e3c..b2cd714 100644
--- a/sys/dev/ata/chipsets/ata-intel.c
+++ b/sys/dev/ata/chipsets/ata-intel.c
@@ -211,6 +211,18 @@ ata_intel_probe(device_t dev)
{ ATA_PPT_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Panther Point" },
{ ATA_PPT_R5, 0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" },
{ ATA_PPT_R6, 0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" },
+ { ATA_LPT_S1, 0, INTEL_6CH, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_S2, 0, INTEL_6CH, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_AH1, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_AH2, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_R1, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_R2, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_R3, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_R4, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_S3, 0, INTEL_6CH2, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_R5, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" },
+ { ATA_LPT_R6, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" },
{ ATA_I31244, 0, 0, 2, ATA_SA150, "31244" },
{ ATA_ISCH, 0, 0, 1, ATA_UDMA5, "SCH" },
{ ATA_DH89XXCC, 0, INTEL_AHCI, 0, ATA_SA300, "DH89xxCC" },
diff --git a/sys/dev/ath/ath_dfs/null/dfs_null.c b/sys/dev/ath/ath_dfs/null/dfs_null.c
index 11b3d8a..36b2042 100644
--- a/sys/dev/ath/ath_dfs/null/dfs_null.c
+++ b/sys/dev/ath/ath_dfs/null/dfs_null.c
@@ -146,6 +146,26 @@ ath_dfs_radar_enable(struct ath_softc *sc, struct ieee80211_channel *chan)
}
/*
+ * Explicity disable radar reporting.
+ *
+ * Return 0 if it was disabled, < 0 on error.
+ */
+int
+ath_dfs_radar_disable(struct ath_softc *sc)
+{
+#if 0
+ HAL_PHYERR_PARAM pe;
+
+ (void) ath_hal_getdfsthresh(sc->sc_ah, &pe);
+ pe.pe_enabled = 0;
+ (void) ath_hal_enabledfs(sc->sc_ah, &pe);
+ return (0);
+#else
+ return (0);
+#endif
+}
+
+/*
* Process DFS related PHY errors
*
* The mbuf is not "ours" and if we want a copy, we have
diff --git a/sys/dev/ath/ath_hal/ah.c b/sys/dev/ath/ath_hal/ah.c
index b9ad649..d1ce7a8 100644
--- a/sys/dev/ath/ath_hal/ah.c
+++ b/sys/dev/ath/ath_hal/ah.c
@@ -734,6 +734,8 @@ ath_hal_getcapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type,
return HAL_OK;
case HAL_CAP_BT_COEX:
return pCap->halBtCoexSupport ? HAL_OK : HAL_ENOTSUPP;
+ case HAL_CAP_SPECTRAL_SCAN:
+ return pCap->halSpectralScanSupport ? HAL_OK : HAL_ENOTSUPP;
case HAL_CAP_HT20_SGI:
return pCap->halHTSGI20Support ? HAL_OK : HAL_ENOTSUPP;
case HAL_CAP_RXTSTAMP_PREC: /* rx desc tstamp precision (bits) */
diff --git a/sys/dev/ath/ath_hal/ah.h b/sys/dev/ath/ath_hal/ah.h
index 54cef23..19beffe 100644
--- a/sys/dev/ath/ath_hal/ah.h
+++ b/sys/dev/ath/ath_hal/ah.h
@@ -156,6 +156,7 @@ typedef enum {
HAL_CAP_RXBUFSIZE = 81, /* Receive Buffer Length */
HAL_CAP_NUM_MR_RETRIES = 82, /* limit on multirate retries */
HAL_CAP_OL_PWRCTRL = 84, /* Open loop TX power control */
+ HAL_CAP_SPECTRAL_SCAN = 90, /* Hardware supports spectral scan */
HAL_CAP_BB_PANIC_WATCHDOG = 92,
@@ -930,6 +931,20 @@ typedef struct {
#define HAL_PHYERR_PARAM_NOVAL 65535
+typedef struct {
+ u_int16_t ss_fft_period; /* Skip interval for FFT reports */
+ u_int16_t ss_period; /* Spectral scan period */
+ u_int16_t ss_count; /* # of reports to return from ss_active */
+ u_int16_t ss_short_report;/* Set to report ony 1 set of FFT results */
+ u_int8_t radar_bin_thresh_sel; /* strong signal radar FFT threshold configuration */
+ u_int16_t ss_spectral_pri; /* are we doing a noise power cal ? */
+ int8_t ss_nf_cal[AH_MAX_CHAINS*2]; /* nf calibrated values for ctl+ext from eeprom */
+ int8_t ss_nf_pwr[AH_MAX_CHAINS*2]; /* nf pwr values for ctl+ext from eeprom */
+ int32_t ss_nf_temp_data; /* temperature data taken during nf scan */
+} HAL_SPECTRAL_PARAM;
+#define HAL_SPECTRAL_PARAM_NOVAL 0xFFFF
+#define HAL_SPECTRAL_PARAM_ENABLE 0x8000 /* Enable/Disable if applicable */
+
/*
* DFS operating mode flags.
*/
@@ -1433,6 +1448,17 @@ struct ath_hal {
const char *buf, HAL_DFS_EVENT *event);
HAL_BOOL __ahdecl(*ah_isFastClockEnabled)(struct ath_hal *ah);
+ /* Spectral Scan functions */
+ void __ahdecl(*ah_spectralConfigure)(struct ath_hal *ah,
+ HAL_SPECTRAL_PARAM *sp);
+ void __ahdecl(*ah_spectralGetConfig)(struct ath_hal *ah,
+ HAL_SPECTRAL_PARAM *sp);
+ void __ahdecl(*ah_spectralStart)(struct ath_hal *);
+ void __ahdecl(*ah_spectralStop)(struct ath_hal *);
+ HAL_BOOL __ahdecl(*ah_spectralIsEnabled)(struct ath_hal *);
+ HAL_BOOL __ahdecl(*ah_spectralIsActive)(struct ath_hal *);
+ /* XXX getNfPri() and getNfExt() */
+
/* Key Cache Functions */
uint32_t __ahdecl(*ah_getKeyCacheSize)(struct ath_hal*);
HAL_BOOL __ahdecl(*ah_resetKeyCacheEntry)(struct ath_hal*, uint16_t);
@@ -1514,6 +1540,22 @@ struct ath_hal {
HAL_BOOL __ahdecl(*ah_getPendingInterrupts)(struct ath_hal*, HAL_INT*);
HAL_INT __ahdecl(*ah_getInterrupts)(struct ath_hal*);
HAL_INT __ahdecl(*ah_setInterrupts)(struct ath_hal*, HAL_INT);
+
+ /* Bluetooth Coexistence functions */
+ void __ahdecl(*ah_btCoexSetInfo)(struct ath_hal *,
+ HAL_BT_COEX_INFO *);
+ void __ahdecl(*ah_btCoexSetConfig)(struct ath_hal *,
+ HAL_BT_COEX_CONFIG *);
+ void __ahdecl(*ah_btCoexSetQcuThresh)(struct ath_hal *,
+ int);
+ void __ahdecl(*ah_btCoexSetWeights)(struct ath_hal *,
+ uint32_t);
+ void __ahdecl(*ah_btCoexSetBmissThresh)(struct ath_hal *,
+ uint32_t);
+ void __ahdecl(*ah_btcoexSetParameter)(struct ath_hal *,
+ uint32_t, uint32_t);
+ void __ahdecl(*ah_btCoexDisable)(struct ath_hal *);
+ int __ahdecl(*ah_btCoexEnable)(struct ath_hal *);
};
/*
diff --git a/sys/dev/ath/ath_hal/ah_internal.h b/sys/dev/ath/ath_hal/ah_internal.h
index 2d1087a..e3263f9 100644
--- a/sys/dev/ath/ath_hal/ah_internal.h
+++ b/sys/dev/ath/ath_hal/ah_internal.h
@@ -278,7 +278,8 @@ typedef struct {
hal49GhzSupport : 1,
halAntDivCombSupport : 1,
halAntDivCombSupportOrg : 1,
- halRadioRetentionSupport : 1;
+ halRadioRetentionSupport : 1,
+ halSpectralScanSupport : 1;
uint32_t halWirelessModes;
uint16_t halTotalQueues;
diff --git a/sys/dev/ath/ath_hal/ah_regdomain.c b/sys/dev/ath/ath_hal/ah_regdomain.c
index 13f3e42..807db44 100644
--- a/sys/dev/ath/ath_hal/ah_regdomain.c
+++ b/sys/dev/ath/ath_hal/ah_regdomain.c
@@ -613,6 +613,8 @@ ath_hal_mapgsm(int sku, int freq)
return 1544 + freq;
if (sku == SKU_SR9)
return 3344 - freq;
+ if (sku == SKU_XC900M)
+ return 1517 + freq;
HALDEBUG(AH_NULL, HAL_DEBUG_ANY,
"%s: cannot map freq %u unknown gsm sku %u\n",
__func__, freq, sku);
@@ -727,6 +729,7 @@ ath_hal_set_channels(struct ath_hal *ah,
case SKU_SR9:
case SKU_XR9:
case SKU_GZ901:
+ case SKU_XC900M:
/*
* Map 900MHz sku's. The frequencies will be mapped
* according to the sku to compensate for the down-converter.
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416.h b/sys/dev/ath/ath_hal/ar5416/ar5416.h
index 4920922..d570588 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416.h
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416.h
@@ -107,6 +107,9 @@ struct ath_hal_5416 {
void (*ah_initPLL) (struct ath_hal *ah,
const struct ieee80211_channel *chan);
+ /* bluetooth coexistence operations */
+ void (*ah_btCoexSetDiversity)(struct ath_hal *ah);
+
u_int ah_globaltxtimeout; /* global tx timeout */
u_int ah_gpioMask;
int ah_hangs; /* h/w hangs state */
@@ -200,6 +203,7 @@ extern void ar5416SetBTCoexInfo(struct ath_hal *ah,
HAL_BT_COEX_INFO *btinfo);
extern void ar5416BTCoexConfig(struct ath_hal *ah,
HAL_BT_COEX_CONFIG *btconf);
+extern void ar5416BTCoexAntennaDiversity(struct ath_hal *ah);
extern void ar5416BTCoexSetQcuThresh(struct ath_hal *ah, int qnum);
extern void ar5416BTCoexSetWeights(struct ath_hal *ah, uint32_t stompType);
extern void ar5416BTCoexSetupBmissThresh(struct ath_hal *ah,
@@ -261,6 +265,16 @@ extern HAL_BOOL ar5416ProcessRadarEvent(struct ath_hal *ah,
HAL_DFS_EVENT *event);
extern HAL_BOOL ar5416IsFastClockEnabled(struct ath_hal *ah);
+/* ar9280_spectral.c */
+extern void ar5416ConfigureSpectralScan(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss);
+extern void ar5416GetSpectralParams(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss);
+extern HAL_BOOL ar5416IsSpectralActive(struct ath_hal *ah);
+extern HAL_BOOL ar5416IsSpectralEnabled(struct ath_hal *ah);
+extern void ar5416StartSpectralScan(struct ath_hal *ah);
+extern void ar5416StopSpectralScan(struct ath_hal *ah);
+extern uint32_t ar5416GetSpectralConfig(struct ath_hal *ah);
+extern void ar5416RestoreSpectralConfig(struct ath_hal *ah, uint32_t restoreval);
+
extern HAL_BOOL ar5416SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode,
int setChip);
extern HAL_POWER_MODE ar5416GetPowerMode(struct ath_hal *ah);
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c b/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
index 603dfc2..d165540 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
@@ -161,6 +161,14 @@ ar5416InitState(struct ath_hal_5416 *ahp5416, uint16_t devid, HAL_SOFTC sc,
ah->ah_procRadarEvent = ar5416ProcessRadarEvent;
ah->ah_isFastClockEnabled = ar5416IsFastClockEnabled;
+ /* Spectral Scan Functions */
+ ah->ah_spectralConfigure = ar5416ConfigureSpectralScan;
+ ah->ah_spectralGetConfig = ar5416GetSpectralParams;
+ ah->ah_spectralStart = ar5416StartSpectralScan;
+ ah->ah_spectralStop = ar5416StopSpectralScan;
+ ah->ah_spectralIsEnabled = ar5416IsSpectralEnabled;
+ ah->ah_spectralIsActive = ar5416IsSpectralActive;
+
/* Power Management Functions */
ah->ah_setPowerMode = ar5416SetPowerMode;
@@ -191,6 +199,17 @@ ar5416InitState(struct ath_hal_5416 *ahp5416, uint16_t devid, HAL_SOFTC sc,
ah->ah_getPendingInterrupts = ar5416GetPendingInterrupts;
ah->ah_setInterrupts = ar5416SetInterrupts;
+ /* Bluetooth Coexistence functions */
+ ah->ah_btCoexSetInfo = ar5416SetBTCoexInfo;
+ ah->ah_btCoexSetConfig = ar5416BTCoexConfig;
+ ah->ah_btCoexSetQcuThresh = ar5416BTCoexSetQcuThresh;
+ ah->ah_btCoexSetWeights = ar5416BTCoexSetWeights;
+ ah->ah_btCoexSetBmissThresh = ar5416BTCoexSetupBmissThresh;
+ ah->ah_btcoexSetParameter = ar5416BTCoexSetParameter;
+ ah->ah_btCoexDisable = ar5416BTCoexDisable;
+ ah->ah_btCoexEnable = ar5416BTCoexEnable;
+ AH5416(ah)->ah_btCoexSetDiversity = ar5416BTCoexAntennaDiversity;
+
ahp->ah_priv.ah_getWirelessModes= ar5416GetWirelessModes;
ahp->ah_priv.ah_eepromRead = ar5416EepromRead;
#ifdef AH_SUPPORT_WRITE_EEPROM
@@ -887,7 +906,13 @@ ar5416FillCapabilityInfo(struct ath_hal *ah)
pCap->halCompressSupport = AH_FALSE;
pCap->halBurstSupport = AH_TRUE;
- pCap->halFastFramesSupport = AH_FALSE; /* XXX? */
+ /*
+ * This is disabled for now; the net80211 layer needs to be
+ * taught when it is and isn't appropriate to enable FF processing
+ * with 802.11n NICs (it tries to enable both A-MPDU and
+ * fast frames, with very tragic crash-y results.)
+ */
+ pCap->halFastFramesSupport = AH_FALSE;
pCap->halChapTuningSupport = AH_TRUE;
pCap->halTurboPrimeSupport = AH_TRUE;
@@ -901,6 +926,7 @@ ar5416FillCapabilityInfo(struct ath_hal *ah)
pCap->halMcastKeySrchSupport = AH_TRUE; /* Works on AR5416 and later */
pCap->halTsfAddSupport = AH_TRUE;
pCap->hal4AddrAggrSupport = AH_FALSE; /* Broken in Owl */
+ pCap->halSpectralScanSupport = AH_FALSE; /* AR9280 and later */
if (ath_hal_eepromGet(ah, AR_EEP_MAXQCU, &val) == HAL_OK)
pCap->halTotalQueues = val;
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c b/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c
index b7ac118..14cdf69 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c
@@ -173,7 +173,7 @@ ar5416BTCoexSetupBmissThresh(struct ath_hal *ah, u_int32_t thresh)
*
* Kite will override this particular method.
*/
-static void
+void
ar5416BTCoexAntennaDiversity(struct ath_hal *ah)
{
}
@@ -350,8 +350,12 @@ ar5416InitBTCoex(struct ath_hal *ah)
ar5416GpioCfgInput(ah, ahp->ah_btActiveGpioSelect);
ar5416GpioCfgInput(ah, ahp->ah_btPriorityGpioSelect);
- if (AR_SREV_KITE(ah))
- ar5416BTCoexAntennaDiversity(ah);
+ /*
+ * Configure the antenna diversity setup.
+ * It's a no-op for AR9287; AR9285 overrides this
+ * as required.
+ */
+ AH5416(ah)->ah_btCoexSetDiversity(ah);
if (ahp->ah_btCoexEnabled)
ar5416BTCoexEnable(ah);
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_spectral.c b/sys/dev/ath/ath_hal/ar5416/ar5416_spectral.c
new file mode 100644
index 0000000..6bdd722
--- /dev/null
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416_spectral.c
@@ -0,0 +1,244 @@
+/*
+ * Copyright (c) 2012 Qualcomm Atheros, All Rights Reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $FreeBSD$
+ */
+#include "opt_ah.h"
+
+#include "ah.h"
+#include "ah_internal.h"
+#include "ah_devid.h"
+#include "ah_desc.h" /* NB: for HAL_PHYERR* */
+
+#include "ar5416/ar5416.h"
+#include "ar5416/ar5416reg.h"
+#include "ar5416/ar5416phy.h"
+
+/*
+ * Default AR9280 spectral scan parameters
+ */
+#define AR5416_SPECTRAL_SCAN_ENA 0
+#define AR5416_SPECTRAL_SCAN_ACTIVE 0
+#define AR5416_SPECTRAL_SCAN_FFT_PERIOD 8
+#define AR5416_SPECTRAL_SCAN_PERIOD 1
+#define AR5416_SPECTRAL_SCAN_COUNT 16 //used to be 128
+#define AR5416_SPECTRAL_SCAN_SHORT_REPEAT 1
+
+/* constants */
+#define MAX_RADAR_RSSI_THRESH 0x3f
+#define MAX_RADAR_HEIGHT 0x3f
+#define ENABLE_ALL_PHYERR 0xffffffff
+
+static void ar5416DisableRadar(struct ath_hal *ah);
+static void ar5416PrepSpectralScan(struct ath_hal *ah);
+
+static void
+ar5416DisableRadar(struct ath_hal *ah)
+{
+ uint32_t val;
+
+ // Enable radar FFT
+ val = OS_REG_READ(ah, AR_PHY_RADAR_0);
+ val |= AR_PHY_RADAR_0_FFT_ENA;
+
+ // set radar detect thresholds to max to effectively disable radar
+ val &= ~AR_PHY_RADAR_0_RRSSI;
+ val |= SM(MAX_RADAR_RSSI_THRESH, AR_PHY_RADAR_0_RRSSI);
+
+ val &= ~AR_PHY_RADAR_0_HEIGHT;
+ val |= SM(MAX_RADAR_HEIGHT, AR_PHY_RADAR_0_HEIGHT);
+
+ val &= ~(AR_PHY_RADAR_0_ENA);
+ OS_REG_WRITE(ah, AR_PHY_RADAR_0, val);
+
+ // disable extension radar detect
+ val = OS_REG_READ(ah, AR_PHY_RADAR_EXT);
+ OS_REG_WRITE(ah, AR_PHY_RADAR_EXT, val & ~AR_PHY_RADAR_EXT_ENA);
+
+ val = OS_REG_READ(ah, AR_RX_FILTER);
+ val |= (1<<13);
+ OS_REG_WRITE(ah, AR_RX_FILTER, val);
+}
+
+static void
+ar5416PrepSpectralScan(struct ath_hal *ah)
+{
+
+ ar5416DisableRadar(ah);
+ OS_REG_WRITE(ah, AR_PHY_ERR, ENABLE_ALL_PHYERR);
+}
+
+void
+ar5416ConfigureSpectralScan(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss)
+{
+ uint32_t val;
+
+ ar5416PrepSpectralScan(ah);
+
+ val = OS_REG_READ(ah, AR_PHY_SPECTRAL_SCAN);
+
+ if (ss->ss_fft_period != HAL_SPECTRAL_PARAM_NOVAL) {
+ val &= ~AR_PHY_SPECTRAL_SCAN_FFT_PERIOD;
+ val |= SM(ss->ss_fft_period, AR_PHY_SPECTRAL_SCAN_FFT_PERIOD);
+ }
+
+ if (ss->ss_period != HAL_SPECTRAL_PARAM_NOVAL) {
+ val &= ~AR_PHY_SPECTRAL_SCAN_PERIOD;
+ val |= SM(ss->ss_period, AR_PHY_SPECTRAL_SCAN_PERIOD);
+ }
+
+ if (ss->ss_period != HAL_SPECTRAL_PARAM_NOVAL) {
+ val &= ~AR_PHY_SPECTRAL_SCAN_PERIOD;
+ val |= SM(ss->ss_period, AR_PHY_SPECTRAL_SCAN_PERIOD);
+ }
+
+ /* This section is different for Kiwi and Merlin */
+ if (AR_SREV_MERLIN(ah) ) {
+ if (ss->ss_count != HAL_SPECTRAL_PARAM_NOVAL) {
+ val &= ~AR_PHY_SPECTRAL_SCAN_COUNT;
+ val |= SM(ss->ss_count, AR_PHY_SPECTRAL_SCAN_COUNT);
+ }
+
+ if (ss->ss_short_report == AH_TRUE) {
+ val |= AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT;
+ } else if (ss->ss_short_report != HAL_SPECTRAL_PARAM_NOVAL) {
+ val &= ~AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT;
+ }
+ } else {
+ if (ss->ss_count != HAL_SPECTRAL_PARAM_NOVAL) {
+ /*
+ * In Merlin, for continous scan, scan_count = 128.
+ * In case of Kiwi, this value should be 0
+ */
+ if (ss->ss_count == 128)
+ ss->ss_count = 0;
+ val &= ~AR_PHY_SPECTRAL_SCAN_COUNT_KIWI;
+ val |= SM(ss->ss_count, AR_PHY_SPECTRAL_SCAN_COUNT_KIWI);
+ }
+
+ if (ss->ss_short_report == AH_TRUE) {
+ val |= AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT_KIWI;
+ } else if (ss->ss_short_report != HAL_SPECTRAL_PARAM_NOVAL) {
+ val &= ~AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT_KIWI;
+ }
+
+ //Select the mask to be same as before
+ val |= AR_PHY_SPECTRAL_SCAN_PHYERR_MASK_SELECT_KIWI;
+ }
+ // Enable spectral scan
+ OS_REG_WRITE(ah, AR_PHY_SPECTRAL_SCAN, val | AR_PHY_SPECTRAL_SCAN_ENA);
+
+ ar5416GetSpectralParams(ah, ss);
+}
+
+/*
+ * Get the spectral parameter values and return them in the pe
+ * structure
+ */
+void
+ar5416GetSpectralParams(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss)
+{
+ uint32_t val;
+
+ val = OS_REG_READ(ah, AR_PHY_SPECTRAL_SCAN);
+
+ ss->ss_fft_period = MS(val, AR_PHY_SPECTRAL_SCAN_FFT_PERIOD);
+ ss->ss_period = MS(val, AR_PHY_SPECTRAL_SCAN_PERIOD);
+ if (AR_SREV_MERLIN(ah) ) {
+ ss->ss_count = MS(val, AR_PHY_SPECTRAL_SCAN_COUNT);
+ ss->ss_short_report = MS(val, AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT);
+ } else {
+ ss->ss_count = MS(val, AR_PHY_SPECTRAL_SCAN_COUNT_KIWI);
+ ss->ss_short_report = MS(val, AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT_KIWI);
+ }
+ val = OS_REG_READ(ah, AR_PHY_RADAR_1);
+ ss->radar_bin_thresh_sel = MS(val, AR_PHY_RADAR_1_BIN_THRESH_SELECT);
+}
+
+HAL_BOOL
+ar5416IsSpectralActive(struct ath_hal *ah)
+{
+ uint32_t val;
+
+ val = OS_REG_READ(ah, AR_PHY_SPECTRAL_SCAN);
+ return MS(val, AR_PHY_SPECTRAL_SCAN_ACTIVE);
+}
+
+HAL_BOOL
+ar5416IsSpectralEnabled(struct ath_hal *ah)
+{
+ uint32_t val;
+
+ val = OS_REG_READ(ah, AR_PHY_SPECTRAL_SCAN);
+ return MS(val,AR_PHY_SPECTRAL_SCAN_ENA);
+}
+
+void
+ar5416StartSpectralScan(struct ath_hal *ah)
+{
+ uint32_t val;
+
+ ar5416PrepSpectralScan(ah);
+
+ // Activate spectral scan
+ val = OS_REG_READ(ah, AR_PHY_SPECTRAL_SCAN);
+ val |= AR_PHY_SPECTRAL_SCAN_ENA;
+ val |= AR_PHY_SPECTRAL_SCAN_ACTIVE;
+ OS_REG_WRITE(ah, AR_PHY_SPECTRAL_SCAN, val);
+ val = OS_REG_READ(ah, AR_PHY_SPECTRAL_SCAN);
+ val = OS_REG_READ(ah, AR_PHY_ERR_MASK_REG);
+ OS_REG_WRITE(ah, AR_PHY_ERR_MASK_REG, val | AR_PHY_ERR_RADAR);
+}
+
+void
+ar5416StopSpectralScan(struct ath_hal *ah)
+{
+ uint32_t val;
+ val = OS_REG_READ(ah, AR_PHY_SPECTRAL_SCAN);
+
+ // Deactivate spectral scan
+ val &= ~AR_PHY_SPECTRAL_SCAN_ENA;
+ val &= ~AR_PHY_SPECTRAL_SCAN_ACTIVE;
+ OS_REG_WRITE(ah, AR_PHY_SPECTRAL_SCAN, val);
+ val = OS_REG_READ(ah, AR_PHY_SPECTRAL_SCAN);
+ val = OS_REG_READ(ah, AR_PHY_ERR_MASK_REG) & (~AR_PHY_ERR_RADAR);
+ OS_REG_WRITE(ah, AR_PHY_ERR_MASK_REG, val);
+}
+
+uint32_t
+ar5416GetSpectralConfig(struct ath_hal *ah)
+{
+ uint32_t val;
+
+ val = OS_REG_READ(ah, AR_PHY_SPECTRAL_SCAN);
+ return val;
+}
+
+void
+ar5416RestoreSpectralConfig(struct ath_hal *ah, uint32_t restoreval)
+{
+ uint32_t curval;
+
+ ar5416PrepSpectralScan(ah);
+
+ curval = OS_REG_READ(ah, AR_PHY_SPECTRAL_SCAN);
+
+ if (restoreval != curval) {
+ restoreval |= AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT;
+ OS_REG_WRITE(ah, AR_PHY_SPECTRAL_SCAN, restoreval);
+ }
+ return;
+}
+
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416phy.h b/sys/dev/ath/ath_hal/ar5416/ar5416phy.h
index b68e2ca..4884dac 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416phy.h
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416phy.h
@@ -57,6 +57,37 @@
#define AR_BT_DISABLE_BT_ANT 0x00100000
#define AR_BT_DISABLE_BT_ANT_S 20
+#define AR_PHY_SPECTRAL_SCAN 0x9910
+#define AR_PHY_SPECTRAL_SCAN_ENA 0x00000001
+#define AR_PHY_SPECTRAL_SCAN_ENA_S 0
+#define AR_PHY_SPECTRAL_SCAN_ACTIVE 0x00000002
+#define AR_PHY_SPECTRAL_SCAN_ACTIVE_S 1
+#define AR_PHY_SPECTRAL_SCAN_FFT_PERIOD 0x000000F0
+#define AR_PHY_SPECTRAL_SCAN_FFT_PERIOD_S 4
+#define AR_PHY_SPECTRAL_SCAN_PERIOD 0x0000FF00
+#define AR_PHY_SPECTRAL_SCAN_PERIOD_S 8
+
+/* Scan count and Short repeat flags are different for Kiwi and Merlin */
+#define AR_PHY_SPECTRAL_SCAN_COUNT 0x00FF0000
+#define AR_PHY_SPECTRAL_SCAN_COUNT_S 16
+#define AR_PHY_SPECTRAL_SCAN_COUNT_KIWI 0x0FFF0000
+#define AR_PHY_SPECTRAL_SCAN_COUNT_KIWI_S 16
+
+#define AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT 0x01000000
+#define AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT_S 24
+#define AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT_KIWI 0x10000000
+#define AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT_KIWI_S 28
+
+/*
+ * Kiwi only, bit 30 is used to set the error type, if set it is 0x5 (HAL_PHYERR_RADAR)
+ * Else it is 38 (new error type)
+ */
+#define AR_PHY_SPECTRAL_SCAN_PHYERR_MASK_SELECT_KIWI 0x40000000 /* Spectral Error select bit mask */
+#define AR_PHY_SPECTRAL_SCAN_PHYERR_MASK_SELECT_KIWI_S 30 /* Spectral Error select bit 30 */
+
+#define AR_PHY_SPECTRAL_SCAN_PRIORITY_SELECT_KIWI 0x20000000 /* Spectral Error select bit mask */
+#define AR_PHY_SPECTRAL_SCAN_PRIORITY_SELECT_SELECT_KIWI_S 29 /* Spectral Error select bit 30 */
+
/* For AR_PHY_RADAR0 */
#define AR_PHY_RADAR_0_FFT_ENA 0x80000000
@@ -64,6 +95,8 @@
#define AR_PHY_RADAR_EXT_ENA 0x00004000
#define AR_PHY_RADAR_1 0x9958
+#define AR_PHY_RADAR_1_BIN_THRESH_SELECT 0x07000000
+#define AR_PHY_RADAR_1_BIN_THRESH_SELECT_S 24
#define AR_PHY_RADAR_1_RELPWR_ENA 0x00800000
#define AR_PHY_RADAR_1_USE_FIR128 0x00400000
#define AR_PHY_RADAR_1_RELPWR_THRESH 0x003F0000
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416reg.h b/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
index 483d29d..13b7da6 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
@@ -179,6 +179,7 @@
#define AR_2040_MODE 0x8318
#define AR_EXTRCCNT 0x8328 /* extension channel rx clear count */
#define AR_SELFGEN_MASK 0x832c /* rx and cal chain masks */
+#define AR_PHY_ERR_MASK_REG 0x8338
#define AR_PCU_TXBUF_CTRL 0x8340
#define AR_PCU_MISC_MODE2 0x8344
diff --git a/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c b/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
index 5d79418..2a67fe5 100644
--- a/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
+++ b/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
@@ -900,6 +900,7 @@ ar9280FillCapabilityInfo(struct ath_hal *ah)
pCap->halHasRxSelfLinkedTail = AH_FALSE;
pCap->halMbssidAggrSupport = AH_TRUE;
pCap->hal4AddrAggrSupport = AH_TRUE;
+ pCap->halSpectralScanSupport = AH_TRUE;
if (AR_SREV_MERLIN_20(ah)) {
pCap->halPSPollBroken = AH_FALSE;
diff --git a/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c b/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c
index 97e6823a..5f6a2a9 100644
--- a/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c
+++ b/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c
@@ -148,15 +148,16 @@ ar9285Attach(uint16_t devid, HAL_SOFTC sc,
ah->ah_eepromdata = eepromdata;
}
- /* XXX override with 9285 specific state */
- /* override 5416 methods for our needs */
+ /* override with 9285 specific state */
AH5416(ah)->ah_initPLL = ar9280InitPLL;
+ AH5416(ah)->ah_btCoexSetDiversity = ar5416BTCoexAntennaDiversity;
ah->ah_setAntennaSwitch = ar9285SetAntennaSwitch;
ah->ah_configPCIE = ar9285ConfigPCIE;
ah->ah_disablePCIE = ar9285DisablePCIE;
ah->ah_setTxPower = ar9285SetTransmitPower;
ah->ah_setBoardValues = ar9285SetBoardValues;
+ ah->ah_btcoexSetParameter = ar9285BTCoexSetParameter;
AH5416(ah)->ah_cal.iqCalData.calData = &ar9280_iq_cal;
AH5416(ah)->ah_cal.adcGainCalData.calData = &ar9280_adc_gain_cal;
@@ -523,6 +524,7 @@ ar9285FillCapabilityInfo(struct ath_hal *ah)
pCap->halHasRxSelfLinkedTail = AH_FALSE;
pCap->halMbssidAggrSupport = AH_TRUE;
pCap->hal4AddrAggrSupport = AH_TRUE;
+ pCap->halSpectralScanSupport = AH_TRUE;
if (AR_SREV_KITE_12_OR_LATER(ah))
pCap->halPSPollBroken = AH_FALSE;
diff --git a/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c b/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c
index 256039c..093b2b4 100644
--- a/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c
+++ b/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c
@@ -24,7 +24,7 @@
#include "ah_internal.h"
#include "ah_devid.h"
#ifdef AH_DEBUG
-#include "ah_desc.h" /* NB: for HAL_PHYERR* */
+#include "ah_desc.h" /* NB: for HAL_PHYERR* */
#endif
#include "ar5416/ar5416.h"
@@ -47,64 +47,75 @@ ar9285BTCoexAntennaDiversity(struct ath_hal *ah)
u_int32_t regVal;
u_int8_t ant_div_control1, ant_div_control2;
- if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ALLOW) ||
- (AH5212(ah)->ah_diversity != HAL_ANT_VARIABLE)) {
- if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ENABLE) &&
- (AH5212(ah)->ah_diversity == HAL_ANT_VARIABLE)) {
- /* Enable antenna diversity */
- ant_div_control1 = HAL_BT_COEX_ANTDIV_CONTROL1_ENABLE;
- ant_div_control2 = HAL_BT_COEX_ANTDIV_CONTROL2_ENABLE;
-
- /* Don't disable BT ant to allow BB to control SWCOM */
- ahp->ah_btCoexMode2 &= (~(AR_BT_DISABLE_BT_ANT));
- OS_REG_WRITE(ah, AR_BT_COEX_MODE2, ahp->ah_btCoexMode2);
-
- /* Program the correct SWCOM table */
- OS_REG_WRITE(ah, AR_PHY_SWITCH_COM,
- HAL_BT_COEX_ANT_DIV_SWITCH_COM);
- OS_REG_RMW(ah, AR_PHY_SWITCH_CHAIN_0, 0, 0xf0000000);
- } else if (AH5212(ah)->ah_diversity == HAL_ANT_FIXED_B) {
- /* Disable antenna diversity. Use antenna B(LNA2) only. */
- ant_div_control1 = HAL_BT_COEX_ANTDIV_CONTROL1_FIXED_B;
- ant_div_control2 = HAL_BT_COEX_ANTDIV_CONTROL2_FIXED_B;
-
- /* Disable BT ant to allow concurrent BT and WLAN receive */
- ahp->ah_btCoexMode2 |= AR_BT_DISABLE_BT_ANT;
- OS_REG_WRITE(ah, AR_BT_COEX_MODE2, ahp->ah_btCoexMode2);
-
- /* Program SWCOM talbe to make sure RF switch always parks at WLAN side */
- OS_REG_WRITE(ah, AR_PHY_SWITCH_COM, HAL_BT_COEX_ANT_DIV_SWITCH_COM);
- OS_REG_RMW(ah, AR_PHY_SWITCH_CHAIN_0, 0x60000000, 0xf0000000);
- } else {
- /* Disable antenna diversity. Use antenna A(LNA1) only */
- ant_div_control1 = HAL_BT_COEX_ANTDIV_CONTROL1_FIXED_A;
- ant_div_control2 = HAL_BT_COEX_ANTDIV_CONTROL2_FIXED_A;
-
- /* Disable BT ant to allow concurrent BT and WLAN receive */
- ahp->ah_btCoexMode2 |= AR_BT_DISABLE_BT_ANT;
- OS_REG_WRITE(ah, AR_BT_COEX_MODE2, ahp->ah_btCoexMode2);
-
- /* Program SWCOM talbe to make sure RF switch always parks at BT side */
- OS_REG_WRITE(ah, AR_PHY_SWITCH_COM, 0);
- OS_REG_RMW(ah, AR_PHY_SWITCH_CHAIN_0, 0, 0xf0000000);
- }
-
- regVal = OS_REG_READ(ah, AR_PHY_MULTICHAIN_GAIN_CTL);
- regVal &= (~(AR_PHY_9285_ANT_DIV_CTL_ALL));
- /* Clear ant_fast_div_bias [14:9] since for Janus the main LNA is always LNA1. */
- regVal &= (~(AR_PHY_9285_FAST_DIV_BIAS));
-
- regVal |= SM(ant_div_control1, AR_PHY_9285_ANT_DIV_CTL);
- regVal |= SM(ant_div_control2, AR_PHY_9285_ANT_DIV_ALT_LNACONF);
- regVal |= SM((ant_div_control2 >> 2), AR_PHY_9285_ANT_DIV_MAIN_LNACONF);
- regVal |= SM((ant_div_control1 >> 1), AR_PHY_9285_ANT_DIV_ALT_GAINTB);
- regVal |= SM((ant_div_control1 >> 2), AR_PHY_9285_ANT_DIV_MAIN_GAINTB);
- OS_REG_WRITE(ah, AR_PHY_MULTICHAIN_GAIN_CTL, regVal);
-
- regVal = OS_REG_READ(ah, AR_PHY_CCK_DETECT);
- regVal &= (~AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV);
- regVal |= SM((ant_div_control1 >> 3), AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV);
- OS_REG_WRITE(ah, AR_PHY_CCK_DETECT, regVal);
+ if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ALLOW) ||
+ (AH5212(ah)->ah_diversity != HAL_ANT_VARIABLE)) {
+ if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ENABLE) &&
+ (AH5212(ah)->ah_diversity == HAL_ANT_VARIABLE)) {
+ /* Enable antenna diversity */
+ ant_div_control1 = HAL_BT_COEX_ANTDIV_CONTROL1_ENABLE;
+ ant_div_control2 = HAL_BT_COEX_ANTDIV_CONTROL2_ENABLE;
+
+ /* Don't disable BT ant to allow BB to control SWCOM */
+ ahp->ah_btCoexMode2 &= (~(AR_BT_DISABLE_BT_ANT));
+ OS_REG_WRITE(ah, AR_BT_COEX_MODE2, ahp->ah_btCoexMode2);
+
+ /* Program the correct SWCOM table */
+ OS_REG_WRITE(ah, AR_PHY_SWITCH_COM,
+ HAL_BT_COEX_ANT_DIV_SWITCH_COM);
+ OS_REG_RMW(ah, AR_PHY_SWITCH_CHAIN_0, 0, 0xf0000000);
+ } else if (AH5212(ah)->ah_diversity == HAL_ANT_FIXED_B) {
+ /* Disable antenna diversity. Use antenna B(LNA2) only. */
+ ant_div_control1 = HAL_BT_COEX_ANTDIV_CONTROL1_FIXED_B;
+ ant_div_control2 = HAL_BT_COEX_ANTDIV_CONTROL2_FIXED_B;
+
+ /* Disable BT ant to allow concurrent BT and WLAN receive */
+ ahp->ah_btCoexMode2 |= AR_BT_DISABLE_BT_ANT;
+ OS_REG_WRITE(ah, AR_BT_COEX_MODE2, ahp->ah_btCoexMode2);
+
+ /*
+ * Program SWCOM table to make sure RF switch always parks
+ * at WLAN side
+ */
+ OS_REG_WRITE(ah, AR_PHY_SWITCH_COM,
+ HAL_BT_COEX_ANT_DIV_SWITCH_COM);
+ OS_REG_RMW(ah, AR_PHY_SWITCH_CHAIN_0, 0x60000000, 0xf0000000);
+ } else {
+ /* Disable antenna diversity. Use antenna A(LNA1) only */
+ ant_div_control1 = HAL_BT_COEX_ANTDIV_CONTROL1_FIXED_A;
+ ant_div_control2 = HAL_BT_COEX_ANTDIV_CONTROL2_FIXED_A;
+
+ /* Disable BT ant to allow concurrent BT and WLAN receive */
+ ahp->ah_btCoexMode2 |= AR_BT_DISABLE_BT_ANT;
+ OS_REG_WRITE(ah, AR_BT_COEX_MODE2, ahp->ah_btCoexMode2);
+
+ /*
+ * Program SWCOM table to make sure RF switch always
+ * parks at BT side
+ */
+ OS_REG_WRITE(ah, AR_PHY_SWITCH_COM, 0);
+ OS_REG_RMW(ah, AR_PHY_SWITCH_CHAIN_0, 0, 0xf0000000);
+ }
+
+ regVal = OS_REG_READ(ah, AR_PHY_MULTICHAIN_GAIN_CTL);
+ regVal &= (~(AR_PHY_9285_ANT_DIV_CTL_ALL));
+ /*
+ * Clear ant_fast_div_bias [14:9] since for Janus the main LNA is
+ * always LNA1.
+ */
+ regVal &= (~(AR_PHY_9285_FAST_DIV_BIAS));
+
+ regVal |= SM(ant_div_control1, AR_PHY_9285_ANT_DIV_CTL);
+ regVal |= SM(ant_div_control2, AR_PHY_9285_ANT_DIV_ALT_LNACONF);
+ regVal |= SM((ant_div_control2 >> 2), AR_PHY_9285_ANT_DIV_MAIN_LNACONF);
+ regVal |= SM((ant_div_control1 >> 1), AR_PHY_9285_ANT_DIV_ALT_GAINTB);
+ regVal |= SM((ant_div_control1 >> 2), AR_PHY_9285_ANT_DIV_MAIN_GAINTB);
+ OS_REG_WRITE(ah, AR_PHY_MULTICHAIN_GAIN_CTL, regVal);
+
+ regVal = OS_REG_READ(ah, AR_PHY_CCK_DETECT);
+ regVal &= (~AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV);
+ regVal |= SM((ant_div_control1 >> 3),
+ AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV);
+ OS_REG_WRITE(ah, AR_PHY_CCK_DETECT, regVal);
}
}
diff --git a/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c b/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c
index b6b8c2c..010e2c3 100644
--- a/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c
+++ b/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c
@@ -453,6 +453,7 @@ ar9287FillCapabilityInfo(struct ath_hal *ah)
/* Disable this so Block-ACK works correctly */
pCap->halHasRxSelfLinkedTail = AH_FALSE;
pCap->halPSPollBroken = AH_FALSE;
+ pCap->halSpectralScanSupport = AH_TRUE;
/* Hardware supports (at least) single-stream STBC TX/RX */
pCap->halRxStbcSupport = 1;
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 2dee99b..bd2580f 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -111,6 +111,7 @@ __FBSDID("$FreeBSD$");
#include <dev/ath/if_ath_rx_edma.h>
#include <dev/ath/if_ath_tx_edma.h>
#include <dev/ath/if_ath_beacon.h>
+#include <dev/ath/if_ath_spectral.h>
#include <dev/ath/if_athdfs.h>
#ifdef ATH_TX99_DIAG
@@ -510,6 +511,14 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
goto bad2;
}
+ /* Attach spectral module */
+ if (ath_spectral_attach(sc) < 0) {
+ device_printf(sc->sc_dev,
+ "%s: unable to attach spectral\n", __func__);
+ error = EIO;
+ goto bad2;
+ }
+
/* Start DFS processing tasklet */
TASK_INIT(&sc->sc_dfstask, 0, ath_dfs_tasklet, sc);
@@ -967,6 +976,7 @@ ath_detach(struct ath_softc *sc)
if_ath_alq_tidyup(&sc->sc_alq);
#endif
+ ath_spectral_detach(sc);
ath_dfs_detach(sc);
ath_desc_free(sc);
ath_txdma_teardown(sc);
@@ -1489,6 +1499,9 @@ ath_resume(struct ath_softc *sc)
/* Let DFS at it in case it's a DFS channel */
ath_dfs_radar_enable(sc, ic->ic_curchan);
+ /* Let spectral at in case spectral is enabled */
+ ath_spectral_enable(sc, ic->ic_curchan);
+
/* Restore the LED configuration */
ath_led_config(sc);
ath_hal_setledstate(ah, HAL_LED_INIT);
@@ -1918,6 +1931,9 @@ ath_init(void *arg)
/* Let DFS at it in case it's a DFS channel */
ath_dfs_radar_enable(sc, ic->ic_curchan);
+ /* Let spectral at in case spectral is enabled */
+ ath_spectral_enable(sc, ic->ic_curchan);
+
/*
* Likewise this is set during reset so update
* state cached in the driver.
@@ -2226,6 +2242,9 @@ ath_reset(struct ifnet *ifp, ATH_RESET_TYPE reset_type)
/* Let DFS at it in case it's a DFS channel */
ath_dfs_radar_enable(sc, ic->ic_curchan);
+ /* Let spectral at in case spectral is enabled */
+ ath_spectral_enable(sc, ic->ic_curchan);
+
if (ath_startrecv(sc) != 0) /* restart recv */
if_printf(ifp, "%s: unable to start recv logic\n", __func__);
/*
@@ -4402,6 +4421,9 @@ ath_chan_set(struct ath_softc *sc, struct ieee80211_channel *chan)
/* Let DFS at it in case it's a DFS channel */
ath_dfs_radar_enable(sc, chan);
+ /* Let spectral at in case spectral is enabled */
+ ath_spectral_enable(sc, chan);
+
/*
* Re-enable rx framework.
*/
@@ -5384,6 +5406,9 @@ ath_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = ath_ioctl_phyerr(sc,(struct ath_diag*) ifr);
break;
#endif
+ case SIOCGATHSPECTRAL:
+ error = ath_ioctl_spectral(sc,(struct ath_diag*) ifr);
+ break;
case SIOCGATHNODERATESTATS:
error = ath_ioctl_ratestats(sc, (struct ath_rateioctl *) ifr);
break;
@@ -5620,7 +5645,7 @@ ath_node_set_tim(struct ieee80211_node *ni, int enable)
struct ath_vap *avp = ATH_VAP(ni->ni_vap);
/*
- * Some operating omdes don't set av_set_tim(), so don't
+ * Some operating modes don't set av_set_tim(), so don't
* update it here.
*/
if (avp->av_set_tim == NULL)
diff --git a/sys/dev/ath/if_ath_rx.c b/sys/dev/ath/if_ath_rx.c
index 3ebfb2f..543ba43 100644
--- a/sys/dev/ath/if_ath_rx.c
+++ b/sys/dev/ath/if_ath_rx.c
@@ -232,7 +232,7 @@ ath_legacy_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf)
* multiple of the cache line size. Not doing this
* causes weird stuff to happen (for the 5210 at least).
*/
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) {
DPRINTF(sc, ATH_DEBUG_ANY,
"%s: no mbuf/cluster\n", __func__);
diff --git a/sys/dev/ath/if_ath_rx_edma.c b/sys/dev/ath/if_ath_rx_edma.c
index dc7fd9a..301a22c 100644
--- a/sys/dev/ath/if_ath_rx_edma.c
+++ b/sys/dev/ath/if_ath_rx_edma.c
@@ -518,7 +518,7 @@ ath_edma_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf)
ATH_RX_LOCK_ASSERT(sc);
- m = m_getm(NULL, sc->sc_edma_bufsize, M_DONTWAIT, MT_DATA);
+ m = m_getm(NULL, sc->sc_edma_bufsize, M_NOWAIT, MT_DATA);
if (! m)
return (ENOBUFS); /* XXX ?*/
diff --git a/sys/dev/ath/if_ath_spectral.c b/sys/dev/ath/if_ath_spectral.c
new file mode 100644
index 0000000..12fb87a7
--- /dev/null
+++ b/sys/dev/ath/if_ath_spectral.c
@@ -0,0 +1,224 @@
+/*-
+ * Copyright (c) 2013 Adrian Chadd <adrian@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
+ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * $FreeBSD$
+ */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+/*
+ * Implement some basic spectral scan control logic.
+ */
+#include "opt_ath.h"
+#include "opt_inet.h"
+#include "opt_wlan.h"
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/sysctl.h>
+#include <sys/kernel.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/errno.h>
+
+#include <machine/bus.h>
+#include <machine/resource.h>
+#include <sys/bus.h>
+
+#include <sys/socket.h>
+
+#include <net/if.h>
+#include <net/if_media.h>
+#include <net/if_arp.h>
+#include <net/ethernet.h> /* XXX for ether_sprintf */
+
+#include <net80211/ieee80211_var.h>
+
+#include <net/bpf.h>
+
+#ifdef INET
+#include <netinet/in.h>
+#include <netinet/if_ether.h>
+#endif
+
+#include <dev/ath/if_athvar.h>
+#include <dev/ath/if_ath_spectral.h>
+
+#include <dev/ath/ath_hal/ah_desc.h>
+
+struct ath_spectral_state {
+ HAL_SPECTRAL_PARAM spectral_state;
+ int spectral_active;
+ int spectral_enabled;
+};
+
+/*
+ * Methods which are required
+ */
+
+/*
+ * Attach DFS to the given interface
+ */
+int
+ath_spectral_attach(struct ath_softc *sc)
+{
+ struct ath_spectral_state *ss;
+
+ ss = malloc(sizeof(struct ath_spectral_state),
+ M_TEMP, M_WAITOK | M_ZERO);
+
+ if (ss == NULL) {
+ device_printf(sc->sc_dev, "%s: failed to alloc memory\n",
+ __func__);
+ return (-ENOMEM);
+ }
+
+ sc->sc_spectral = ss;
+
+ (void) ath_hal_spectral_get_config(sc->sc_ah, &ss->spectral_state);
+
+ return (0);
+}
+
+/*
+ * Detach DFS from the given interface
+ */
+int
+ath_spectral_detach(struct ath_softc *sc)
+{
+ if (sc->sc_spectral != NULL) {
+ free(sc->sc_spectral, M_TEMP);
+ }
+ return (0);
+}
+
+/*
+ * Check whether spectral needs enabling and if so,
+ * flip it on.
+ */
+int
+ath_spectral_enable(struct ath_softc *sc, struct ieee80211_channel *ch)
+{
+
+ return (0);
+}
+
+/*
+ * Handle ioctl requests from the diagnostic interface.
+ *
+ * The initial part of this code resembles ath_ioctl_diag();
+ * it's likely a good idea to reduce duplication between
+ * these two routines.
+ */
+int
+ath_ioctl_spectral(struct ath_softc *sc, struct ath_diag *ad)
+{
+ unsigned int id = ad->ad_id & ATH_DIAG_ID;
+ void *indata = NULL;
+ void *outdata = NULL;
+ u_int32_t insize = ad->ad_in_size;
+ u_int32_t outsize = ad->ad_out_size;
+ int error = 0;
+ HAL_SPECTRAL_PARAM peout;
+ HAL_SPECTRAL_PARAM *pe;
+ struct ath_spectral_state *ss = sc->sc_spectral;
+
+ if (ad->ad_id & ATH_DIAG_IN) {
+ /*
+ * Copy in data.
+ */
+ indata = malloc(insize, M_TEMP, M_NOWAIT);
+ if (indata == NULL) {
+ error = ENOMEM;
+ goto bad;
+ }
+ error = copyin(ad->ad_in_data, indata, insize);
+ if (error)
+ goto bad;
+ }
+ if (ad->ad_id & ATH_DIAG_DYN) {
+ /*
+ * Allocate a buffer for the results (otherwise the HAL
+ * returns a pointer to a buffer where we can read the
+ * results). Note that we depend on the HAL leaving this
+ * pointer for us to use below in reclaiming the buffer;
+ * may want to be more defensive.
+ */
+ outdata = malloc(outsize, M_TEMP, M_NOWAIT);
+ if (outdata == NULL) {
+ error = ENOMEM;
+ goto bad;
+ }
+ }
+ switch (id) {
+ case SPECTRAL_CONTROL_GET_PARAMS:
+ memset(&peout, 0, sizeof(peout));
+ outsize = sizeof(HAL_SPECTRAL_PARAM);
+ ath_hal_spectral_get_config(sc->sc_ah, &peout);
+ pe = (HAL_SPECTRAL_PARAM *) outdata;
+ memcpy(pe, &peout, sizeof(*pe));
+ break;
+ case SPECTRAL_CONTROL_SET_PARAMS:
+ if (insize < sizeof(HAL_SPECTRAL_PARAM)) {
+ error = EINVAL;
+ break;
+ }
+ pe = (HAL_SPECTRAL_PARAM *) indata;
+ ath_hal_spectral_configure(sc->sc_ah, pe);
+ /* Save a local copy of the updated parameters */
+ ath_hal_spectral_get_config(sc->sc_ah,
+ &ss->spectral_state);
+ break;
+ case SPECTRAL_CONTROL_START:
+ ath_hal_spectral_configure(sc->sc_ah,
+ &ss->spectral_state);
+ (void) ath_hal_spectral_start(sc->sc_ah);
+ break;
+ case SPECTRAL_CONTROL_STOP:
+ (void) ath_hal_spectral_stop(sc->sc_ah);
+ break;
+ case SPECTRAL_CONTROL_ENABLE:
+ /* XXX TODO */
+ case SPECTRAL_CONTROL_DISABLE:
+ /* XXX TODO */
+ break;
+ default:
+ error = EINVAL;
+ }
+ if (outsize < ad->ad_out_size)
+ ad->ad_out_size = outsize;
+ if (outdata && copyout(outdata, ad->ad_out_data, ad->ad_out_size))
+ error = EFAULT;
+bad:
+ if ((ad->ad_id & ATH_DIAG_IN) && indata != NULL)
+ free(indata, M_TEMP);
+ if ((ad->ad_id & ATH_DIAG_DYN) && outdata != NULL)
+ free(outdata, M_TEMP);
+ return (error);
+}
+
diff --git a/sys/dev/ath/if_ath_spectral.h b/sys/dev/ath/if_ath_spectral.h
new file mode 100644
index 0000000..3e069db
--- /dev/null
+++ b/sys/dev/ath/if_ath_spectral.h
@@ -0,0 +1,40 @@
+/*-
+ * Copyright (c) 2013 Adrian Chadd <adrian@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ * redistribution must be conditioned upon including a substantially
+ * similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
+ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * $FreeBSD$
+ */
+#ifndef __IF_ATH_SPECTRAL_H__
+#define __IF_ATH_SPECTRAL_H__
+
+extern int ath_spectral_attach(struct ath_softc *sc);
+extern int ath_spectral_detach(struct ath_softc *sc);
+extern int ath_ioctl_spectral(struct ath_softc *sc, struct ath_diag *ad);
+extern int ath_spectral_enable(struct ath_softc *sc,
+ struct ieee80211_channel *ch);
+
+#endif /* __IF_ATH_SPECTRAL_H__ */
diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c
index 7f97af4..263e69c 100644
--- a/sys/dev/ath/if_ath_tx.c
+++ b/sys/dev/ath/if_ath_tx.c
@@ -325,7 +325,7 @@ ath_tx_dmasetup(struct ath_softc *sc, struct ath_buf *bf, struct mbuf *m0)
*/
if (bf->bf_nseg > ATH_TXDESC) { /* too many desc's, linearize */
sc->sc_stats.ast_tx_linear++;
- m = m_collapse(m0, M_DONTWAIT, ATH_TXDESC);
+ m = m_collapse(m0, M_NOWAIT, ATH_TXDESC);
if (m == NULL) {
ath_freetx(m0);
sc->sc_stats.ast_tx_nombuf++;
@@ -372,7 +372,6 @@ ath_tx_chaindesclist(struct ath_softc *sc, struct ath_desc *ds0,
uint32_t segLenList[4];
int numTxMaps = 1;
int isFirstDesc = 1;
- int qnum;
/*
* XXX There's txdma and txdma_mgmt; the descriptor
@@ -426,18 +425,16 @@ ath_tx_chaindesclist(struct ath_softc *sc, struct ath_desc *ds0,
bf->bf_daddr + dd->dd_descsize * (dsp + 1));
/*
- * XXX this assumes that bfs_txq is the actual destination
- * hardware queue at this point. It may not have been assigned,
- * it may actually be pointing to the multicast software
- * TXQ id. These must be fixed!
+ * XXX This assumes that bfs_txq is the actual destination
+ * hardware queue at this point. It may not have been
+ * assigned, it may actually be pointing to the multicast
+ * software TXQ id. These must be fixed!
*/
- qnum = bf->bf_state.bfs_txq->axq_qnum;
-
ath_hal_filltxdesc(ah, (struct ath_desc *) ds
, bufAddrList
, segLenList
, bf->bf_descid /* XXX desc id */
- , qnum
+ , bf->bf_state.bfs_tx_queue
, isFirstDesc /* first segment */
, i == bf->bf_nseg - 1 /* last segment */
, (struct ath_desc *) ds0 /* first descriptor */
@@ -478,7 +475,8 @@ ath_tx_chaindesclist(struct ath_softc *sc, struct ath_desc *ds0,
isFirstDesc = 0;
#ifdef ATH_DEBUG
if (sc->sc_debug & ATH_DEBUG_XMIT)
- ath_printtxbuf(sc, bf, qnum, 0, 0);
+ ath_printtxbuf(sc, bf, bf->bf_state.bfs_tx_queue,
+ 0, 0);
#endif
bf->bf_lastds = (struct ath_desc *) ds;
@@ -697,11 +695,11 @@ ath_tx_setds_11n(struct ath_softc *sc, struct ath_buf *bf_first)
* during the beacon setup code.
*
* XXX TODO: since the AR9300 EDMA TX queue support wants the QCU ID
- * as part of the TX descriptor, bf_state.bfs_txq must be updated
+ * as part of the TX descriptor, bf_state.bfs_tx_queue must be updated
* with the actual hardware txq, or all of this will fall apart.
*
* XXX It may not be a bad idea to just stuff the QCU ID into bf_state
- * and retire bfs_txq; then make sure the CABQ QCU ID is populated
+ * and retire bfs_tx_queue; then make sure the CABQ QCU ID is populated
* correctly.
*/
static void
@@ -1840,7 +1838,7 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni,
/* Set local packet state, used to queue packets to hardware */
bf->bf_state.bfs_tid = tid;
- bf->bf_state.bfs_txq = txq;
+ bf->bf_state.bfs_tx_queue = txq->axq_qnum;
bf->bf_state.bfs_pri = pri;
/*
@@ -1858,7 +1856,7 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni,
* queue, so the descriptor setup functions will
* correctly initialise the descriptor 'qcuId' field.
*/
- bf->bf_state.bfs_txq = sc->sc_cabq;
+ bf->bf_state.bfs_tx_queue = sc->sc_cabq->axq_qnum;
}
/* Do the generic frame setup */
@@ -2114,7 +2112,7 @@ ath_tx_raw_start(struct ath_softc *sc, struct ieee80211_node *ni,
/* Set local packet state, used to queue packets to hardware */
bf->bf_state.bfs_tid = WME_AC_TO_TID(pri);
- bf->bf_state.bfs_txq = sc->sc_ac2q[pri];
+ bf->bf_state.bfs_tx_queue = sc->sc_ac2q[pri]->axq_qnum;
bf->bf_state.bfs_pri = pri;
/* XXX this should be done in ath_tx_setrate() */
@@ -2713,16 +2711,8 @@ ath_tx_xmit_aggr(struct ath_softc *sc, struct ath_node *an,
struct ath_txq *txq, struct ath_buf *bf)
{
struct ath_tid *tid = &an->an_tid[bf->bf_state.bfs_tid];
-// struct ath_txq *txq = bf->bf_state.bfs_txq;
struct ieee80211_tx_ampdu *tap;
- if (txq != bf->bf_state.bfs_txq) {
- device_printf(sc->sc_dev, "%s: txq %d != bfs_txq %d!\n",
- __func__,
- txq->axq_qnum,
- bf->bf_state.bfs_txq->axq_qnum);
- }
-
ATH_TX_LOCK_ASSERT(sc);
tap = ath_tx_get_tx_tid(an, tid->tid);
@@ -2821,9 +2811,8 @@ ath_tx_swq(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_txq *txq,
/* Set local packet state, used to queue packets to hardware */
/* XXX potentially duplicate info, re-check */
- /* XXX remember, txq must be the hardware queue, not the av_mcastq */
bf->bf_state.bfs_tid = tid;
- bf->bf_state.bfs_txq = txq;
+ bf->bf_state.bfs_tx_queue = txq->axq_qnum;
bf->bf_state.bfs_pri = pri;
/*
@@ -4869,8 +4858,6 @@ ath_tx_tid_hw_queue_aggr(struct ath_softc *sc, struct ath_node *an,
}
queuepkt:
- //txq = bf->bf_state.bfs_txq;
-
/* Set completion handler, multi-frame aggregate or not */
bf->bf_comp = ath_tx_aggr_comp;
@@ -4936,8 +4923,6 @@ ath_tx_tid_hw_queue_norm(struct ath_softc *sc, struct ath_node *an,
ATH_TID_REMOVE(tid, bf, bf_list);
- KASSERT(txq == bf->bf_state.bfs_txq, ("txqs not equal!\n"));
-
/* Sanity check! */
if (tid->tid != bf->bf_state.bfs_tid) {
device_printf(sc->sc_dev, "%s: bfs_tid %d !="
diff --git a/sys/dev/ath/if_athdfs.h b/sys/dev/ath/if_athdfs.h
index 3529671..cc4db15 100644
--- a/sys/dev/ath/if_athdfs.h
+++ b/sys/dev/ath/if_athdfs.h
@@ -35,6 +35,7 @@ extern int ath_dfs_attach(struct ath_softc *sc);
extern int ath_dfs_detach(struct ath_softc *sc);
extern int ath_dfs_radar_enable(struct ath_softc *,
struct ieee80211_channel *chan);
+extern int ath_dfs_radar_disable(struct ath_softc *sc);
extern void ath_dfs_process_phy_err(struct ath_softc *sc, struct mbuf *m,
uint64_t tsf, struct ath_rx_status *rxstat);
extern int ath_dfs_process_radar_event(struct ath_softc *sc,
diff --git a/sys/dev/ath/if_athioctl.h b/sys/dev/ath/if_athioctl.h
index 911bb97..d6adf94 100644
--- a/sys/dev/ath/if_athioctl.h
+++ b/sys/dev/ath/if_athioctl.h
@@ -406,4 +406,26 @@ struct ath_tx_radiotap_header {
#define DFS_PARAM_ENABLE 32
#define DFS_PARAM_EN_EXTCH 33
+/*
+ * Spectral ioctl parameter types
+ */
+#define SPECTRAL_PARAM_FFT_PERIOD 1
+#define SPECTRAL_PARAM_SS_PERIOD 2
+#define SPECTRAL_PARAM_SS_COUNT 3
+#define SPECTRAL_PARAM_SS_SHORT_RPT 4
+#define SPECTRAL_PARAM_ENABLED 5
+#define SPECTRAL_PARAM_ACTIVE 6
+
+/*
+ * Spectral control parameters
+ */
+#define SIOCGATHSPECTRAL _IOWR('i', 151, struct ath_diag)
+
+#define SPECTRAL_CONTROL_ENABLE 2
+#define SPECTRAL_CONTROL_DISABLE 3
+#define SPECTRAL_CONTROL_START 4
+#define SPECTRAL_CONTROL_STOP 5
+#define SPECTRAL_CONTROL_GET_PARAMS 6
+#define SPECTRAL_CONTROL_SET_PARAMS 7
+
#endif /* _DEV_ATH_ATHIOCTL_H */
diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h
index 7c70252..12252ed 100644
--- a/sys/dev/ath/if_athvar.h
+++ b/sys/dev/ath/if_athvar.h
@@ -241,8 +241,7 @@ struct ath_buf {
uint8_t bfs_tid; /* packet TID (or TID_MAX for no QoS) */
uint8_t bfs_nframes; /* number of frames in aggregate */
uint8_t bfs_pri; /* packet AC priority */
-
- struct ath_txq *bfs_txq; /* eventual dest hardware TXQ */
+ uint8_t bfs_tx_queue; /* destination hardware TX queue */
u_int32_t bfs_aggr:1, /* part of aggregate? */
bfs_aggrburst:1, /* part of aggregate burst? */
@@ -751,6 +750,10 @@ struct ath_softc {
int sc_dodfs; /* Whether to enable DFS rx filter bits */
struct task sc_dfstask; /* DFS processing task */
+ /* Spectral related state */
+ void *sc_spectral;
+ int sc_dospectral;
+
/* ALQ */
#ifdef ATH_DEBUG_ALQ
struct if_ath_alq sc_alq;
@@ -1300,4 +1303,13 @@ void ath_intr(void *);
#define ath_hal_get_chan_ext_busy(_ah) \
((*(_ah)->ah_get11nExtBusy)((_ah)))
+#define ath_hal_spectral_get_config(_ah, _p) \
+ ((*(_ah)->ah_spectralGetConfig)((_ah), (_p)))
+#define ath_hal_spectral_configure(_ah, _p) \
+ ((*(_ah)->ah_spectralConfigure)((_ah), (_p)))
+#define ath_hal_spectral_start(_ah) \
+ ((*(_ah)->ah_spectralStart)((_ah)))
+#define ath_hal_spectral_stop(_ah) \
+ ((*(_ah)->ah_spectralStop)((_ah)))
+
#endif /* _DEV_ATH_ATHVAR_H */
diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c
index fdc6984..7cf6508 100644
--- a/sys/dev/atkbdc/psm.c
+++ b/sys/dev/atkbdc/psm.c
@@ -239,6 +239,10 @@ typedef struct synapticspacket {
#define SYNAPTICS_QUEUE_CURSOR(x) \
(x + SYNAPTICS_PACKETQUEUE) % SYNAPTICS_PACKETQUEUE
+#define SYNAPTICS_VERSION_GE(synhw, major, minor) \
+ ((synhw).infoMajor > (major) || \
+ ((synhw).infoMajor == (major) && (synhw).infoMinor >= (minor)))
+
typedef struct synapticsaction {
synapticspacket_t queue[SYNAPTICS_PACKETQUEUE];
int queue_len;
@@ -867,7 +871,9 @@ doopen(struct psm_softc *sc, int command_byte)
if (sc->hw.model == MOUSE_MODEL_SYNAPTICS) {
mouse_ext_command(sc->kbdc, 1);
get_mouse_status(sc->kbdc, stat, 0, 3);
- if (stat[1] == 0x47 && stat[2] == 0x40) {
+ if ((SYNAPTICS_VERSION_GE(sc->synhw, 7, 5) ||
+ stat[1] == 0x47) &&
+ stat[2] == 0x40) {
/* Set the mode byte -- request wmode where
* available */
if (sc->synhw.capExtended)
@@ -4383,7 +4389,7 @@ enable_synaptics(KBDC kbdc, struct psm_softc *sc)
return (FALSE);
if (get_mouse_status(kbdc, status, 0, 3) != 3)
return (FALSE);
- if (status[1] != 0x47) {
+ if (!SYNAPTICS_VERSION_GE(synhw, 7, 5) && status[1] != 0x47) {
printf(" Failed to read extended capability bits\n");
return (FALSE);
}
@@ -4439,7 +4445,7 @@ enable_synaptics(KBDC kbdc, struct psm_softc *sc)
return (FALSE);
if (get_mouse_status(kbdc, status, 0, 3) != 3)
return (FALSE);
- if (status[1] != 0x47) {
+ if (!SYNAPTICS_VERSION_GE(synhw, 7, 5) && status[1] != 0x47) {
printf(" Failed to read mode byte\n");
return (FALSE);
}
diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c
index 1fb583f..2471f19 100644
--- a/sys/dev/bce/if_bce.c
+++ b/sys/dev/bce/if_bce.c
@@ -5437,9 +5437,9 @@ bce_get_rx_buf(struct bce_softc *sc, struct mbuf *m, u16 *prod,
/* This is a new mbuf allocation. */
if (bce_hdr_split == TRUE)
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
else
- m_new = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR,
+ m_new = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR,
sc->rx_bd_mbuf_alloc_size);
if (m_new == NULL) {
@@ -5559,7 +5559,7 @@ bce_get_pg_buf(struct bce_softc *sc, struct mbuf *m, u16 *prod,
goto bce_get_pg_buf_exit);
/* This is a new mbuf allocation. */
- m_new = m_getcl(M_DONTWAIT, MT_DATA, 0);
+ m_new = m_getcl(M_NOWAIT, MT_DATA, 0);
if (m_new == NULL) {
sc->mbuf_alloc_failed_count++;
rc = ENOBUFS;
@@ -7320,7 +7320,7 @@ bce_tso_setup(struct bce_softc *sc, struct mbuf **m_head, u16 *flags)
/* Controller may modify mbuf chains. */
if (M_WRITABLE(*m_head) == 0) {
- m = m_dup(*m_head, M_DONTWAIT);
+ m = m_dup(*m_head, M_NOWAIT);
m_freem(*m_head);
if (m == NULL) {
sc->mbuf_alloc_failed_count++;
@@ -7486,7 +7486,7 @@ bce_tx_encap(struct bce_softc *sc, struct mbuf **m_head)
sc->mbuf_frag_count++;
/* Try to defrag the mbuf. */
- m0 = m_collapse(*m_head, M_DONTWAIT, BCE_MAX_SEGMENTS);
+ m0 = m_collapse(*m_head, M_NOWAIT, BCE_MAX_SEGMENTS);
if (m0 == NULL) {
/* Defrag was unsuccessful */
m_freem(*m_head);
diff --git a/sys/dev/bfe/if_bfe.c b/sys/dev/bfe/if_bfe.c
index 06c8fda..be7e2a4 100644
--- a/sys/dev/bfe/if_bfe.c
+++ b/sys/dev/bfe/if_bfe.c
@@ -791,7 +791,7 @@ bfe_list_newbuf(struct bfe_softc *sc, int c)
u_int32_t ctrl;
int nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
m->m_len = m->m_pkthdr.len = MCLBYTES;
if (bus_dmamap_load_mbuf_sg(sc->bfe_rxmbuf_tag, sc->bfe_rx_sparemap,
@@ -1519,7 +1519,7 @@ bfe_encap(struct bfe_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->bfe_txmbuf_tag, r->bfe_map, *m_head,
txsegs, &nsegs, 0);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, BFE_MAXTXSEGS);
+ m = m_collapse(*m_head, M_NOWAIT, BFE_MAXTXSEGS);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index 9855bbd..e7cb2f7 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -1312,12 +1312,12 @@ bge_newbuf_std(struct bge_softc *sc, int i)
if (sc->bge_flags & BGE_FLAG_JUMBO_STD &&
(sc->bge_ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN +
ETHER_VLAN_ENCAP_LEN > (MCLBYTES - ETHER_ALIGN))) {
- m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES);
+ m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MJUM9BYTES;
} else {
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES;
@@ -1368,11 +1368,11 @@ bge_newbuf_jumbo(struct bge_softc *sc, int i)
struct mbuf *m;
int error, nsegs;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return (ENOBUFS);
- m_cljget(m, M_DONTWAIT, MJUM9BYTES);
+ m_cljget(m, M_NOWAIT, MJUM9BYTES);
if (!(m->m_flags & M_EXT)) {
m_freem(m);
return (ENOBUFS);
@@ -4946,7 +4946,7 @@ bge_cksum_pad(struct mbuf *m)
/* Allocate new empty mbuf, pad it. Compact later. */
struct mbuf *n;
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (n == NULL)
return (ENOBUFS);
n->m_len = 0;
@@ -4988,7 +4988,7 @@ bge_check_short_dma(struct mbuf *m)
}
if (found > 1) {
- n = m_defrag(m, M_DONTWAIT);
+ n = m_defrag(m, M_NOWAIT);
if (n == NULL)
m_freem(m);
} else
@@ -5008,7 +5008,7 @@ bge_setup_tso(struct bge_softc *sc, struct mbuf *m, uint16_t *mss,
if (M_WRITABLE(m) == 0) {
/* Get a writable copy. */
- n = m_dup(m, M_DONTWAIT);
+ n = m_dup(m, M_NOWAIT);
m_freem(m);
if (n == NULL)
return (NULL);
@@ -5125,9 +5125,9 @@ bge_encap(struct bge_softc *sc, struct mbuf **m_head, uint32_t *txidx)
* DMA read operation.
*/
if (sc->bge_forced_collapse == 1)
- m = m_defrag(m, M_DONTWAIT);
+ m = m_defrag(m, M_NOWAIT);
else
- m = m_collapse(m, M_DONTWAIT,
+ m = m_collapse(m, M_NOWAIT,
sc->bge_forced_collapse);
if (m == NULL)
m = *m_head;
@@ -5139,7 +5139,7 @@ bge_encap(struct bge_softc *sc, struct mbuf **m_head, uint32_t *txidx)
error = bus_dmamap_load_mbuf_sg(sc->bge_cdata.bge_tx_mtag, map, m, segs,
&nsegs, BUS_DMA_NOWAIT);
if (error == EFBIG) {
- m = m_collapse(m, M_DONTWAIT, BGE_NSEG_NEW);
+ m = m_collapse(m, M_NOWAIT, BGE_NSEG_NEW);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/dev/bm/if_bm.c b/sys/dev/bm/if_bm.c
index 01706df..cce5ee3 100644
--- a/sys/dev/bm/if_bm.c
+++ b/sys/dev/bm/if_bm.c
@@ -539,7 +539,7 @@ bm_dummypacket(struct bm_softc *sc)
ifp = sc->sc_ifp;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return;
@@ -793,7 +793,7 @@ bm_encap(struct bm_softc *sc, struct mbuf **m_head)
*m_head, segs, &nsegs, BUS_DMA_NOWAIT);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, nsegs);
+ m = m_collapse(*m_head, M_NOWAIT, nsegs);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
@@ -1238,7 +1238,7 @@ bm_add_rxbuf(struct bm_softc *sc, int idx)
bus_dma_segment_t segs[1];
int error, nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = m->m_ext.ext_size;
diff --git a/sys/dev/bwi/if_bwi.c b/sys/dev/bwi/if_bwi.c
index cb4805b..25b5f2b 100644
--- a/sys/dev/bwi/if_bwi.c
+++ b/sys/dev/bwi/if_bwi.c
@@ -2534,7 +2534,7 @@ bwi_newbuf(struct bwi_softc *sc, int buf_idx, int init)
KASSERT(buf_idx < BWI_RX_NDESC, ("buf_idx %d", buf_idx));
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) {
error = ENOBUFS;
@@ -3015,7 +3015,7 @@ bwi_encap(struct bwi_softc *sc, int idx, struct mbuf *m,
/*
* Setup the embedded TX header
*/
- M_PREPEND(m, sizeof(*hdr), M_DONTWAIT);
+ M_PREPEND(m, sizeof(*hdr), M_NOWAIT);
if (m == NULL) {
if_printf(ifp, "%s: prepend TX header failed\n", __func__);
return ENOBUFS;
@@ -3074,7 +3074,7 @@ bwi_encap(struct bwi_softc *sc, int idx, struct mbuf *m,
if (error) { /* error == EFBIG */
struct mbuf *m_new;
- m_new = m_defrag(m, M_DONTWAIT);
+ m_new = m_defrag(m, M_NOWAIT);
if (m_new == NULL) {
if_printf(ifp, "%s: can't defrag TX buffer\n",
__func__);
@@ -3195,7 +3195,7 @@ bwi_encap_raw(struct bwi_softc *sc, int idx, struct mbuf *m,
/*
* Setup the embedded TX header
*/
- M_PREPEND(m, sizeof(*hdr), M_DONTWAIT);
+ M_PREPEND(m, sizeof(*hdr), M_NOWAIT);
if (m == NULL) {
if_printf(ifp, "%s: prepend TX header failed\n", __func__);
return ENOBUFS;
@@ -3249,7 +3249,7 @@ bwi_encap_raw(struct bwi_softc *sc, int idx, struct mbuf *m,
__func__, error);
goto back;
}
- m_new = m_defrag(m, M_DONTWAIT);
+ m_new = m_defrag(m, M_NOWAIT);
if (m_new == NULL) {
if_printf(ifp, "%s: can't defrag TX buffer\n",
__func__);
diff --git a/sys/dev/bwn/if_bwn.c b/sys/dev/bwn/if_bwn.c
index b2cd527..94797b3 100644
--- a/sys/dev/bwn/if_bwn.c
+++ b/sys/dev/bwn/if_bwn.c
@@ -1428,7 +1428,7 @@ bwn_pio_tx_start(struct bwn_mac *mac, struct ieee80211_node *ni, struct mbuf *m)
/*
* XXX please removes m_defrag(9)
*/
- m_new = m_defrag(m, M_DONTWAIT);
+ m_new = m_defrag(m, M_NOWAIT);
if (m_new == NULL) {
device_printf(sc->sc_dev,
"%s: can't defrag TX buffer\n",
@@ -1544,7 +1544,7 @@ bwn_dma_tx_start(struct bwn_mac *mac, struct ieee80211_node *ni, struct mbuf *m)
if (error) { /* error == EFBIG */
struct mbuf *m_new;
- m_new = m_defrag(m, M_DONTWAIT);
+ m_new = m_defrag(m, M_NOWAIT);
if (m_new == NULL) {
if_printf(ifp, "%s: can't defrag TX buffer\n",
__func__);
@@ -9124,7 +9124,7 @@ ready:
padding = (macstat & BWN_RX_MAC_PADDING) ? 2 : 0;
totlen = len + padding;
KASSERT(totlen <= MCLBYTES, ("too big..\n"));
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) {
device_printf(sc->sc_dev, "%s: out of memory", __func__);
goto error;
@@ -9183,7 +9183,7 @@ bwn_dma_newbuf(struct bwn_dma_ring *dr, struct bwn_dmadesc_generic *desc,
struct mbuf *m;
int error;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) {
error = ENOBUFS;
diff --git a/sys/dev/bxe/if_bxe.c b/sys/dev/bxe/if_bxe.c
index 1193865..52d2c1b 100644
--- a/sys/dev/bxe/if_bxe.c
+++ b/sys/dev/bxe/if_bxe.c
@@ -3757,7 +3757,7 @@ bxe_alloc_buf_rings(struct bxe_softc *sc)
if (fp != NULL) {
fp->br = buf_ring_alloc(BXE_BR_SIZE,
- M_DEVBUF, M_DONTWAIT, &fp->mtx);
+ M_DEVBUF, M_NOWAIT, &fp->mtx);
if (fp->br == NULL) {
rc = ENOMEM;
goto bxe_alloc_buf_rings_exit;
@@ -8960,7 +8960,7 @@ bxe_tx_encap(struct bxe_fastpath *fp, struct mbuf **m_head)
} else if (error == EFBIG) {
/* Possibly recoverable with defragmentation. */
fp->mbuf_defrag_attempts++;
- m0 = m_defrag(*m_head, M_DONTWAIT);
+ m0 = m_defrag(*m_head, M_NOWAIT);
if (m0 == NULL) {
fp->mbuf_defrag_failures++;
rc = ENOBUFS;
@@ -10467,7 +10467,7 @@ bxe_alloc_tpa_mbuf(struct bxe_fastpath *fp, int queue)
#endif
/* Allocate the new TPA mbuf. */
- m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, sc->mbuf_alloc_size);
+ m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, sc->mbuf_alloc_size);
if (__predict_false(m == NULL)) {
fp->mbuf_tpa_alloc_failed++;
rc = ENOBUFS;
@@ -10661,7 +10661,7 @@ bxe_alloc_rx_sge_mbuf(struct bxe_fastpath *fp, uint16_t index)
#endif
/* Allocate a new SGE mbuf. */
- m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, SGE_PAGE_SIZE);
+ m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, SGE_PAGE_SIZE);
if (__predict_false(m == NULL)) {
fp->mbuf_sge_alloc_failed++;
rc = ENOMEM;
@@ -10851,7 +10851,7 @@ bxe_alloc_rx_bd_mbuf(struct bxe_fastpath *fp, uint16_t index)
#endif
/* Allocate the new RX BD mbuf. */
- m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, sc->mbuf_alloc_size);
+ m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, sc->mbuf_alloc_size);
if (__predict_false(m == NULL)) {
fp->mbuf_rx_bd_alloc_failed++;
rc = ENOBUFS;
diff --git a/sys/dev/cas/if_cas.c b/sys/dev/cas/if_cas.c
index 8705ac7..f846350 100644
--- a/sys/dev/cas/if_cas.c
+++ b/sys/dev/cas/if_cas.c
@@ -1192,7 +1192,7 @@ cas_load_txmbuf(struct cas_softc *sc, struct mbuf **m_head)
cflags = 0;
if (((*m_head)->m_pkthdr.csum_flags & CAS_CSUM_FEATURES) != 0) {
if (M_WRITABLE(*m_head) == 0) {
- m = m_dup(*m_head, M_DONTWAIT);
+ m = m_dup(*m_head, M_NOWAIT);
m_freem(*m_head);
*m_head = m;
if (m == NULL)
@@ -1215,7 +1215,7 @@ cas_load_txmbuf(struct cas_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->sc_tdmatag, txs->txs_dmamap,
*m_head, txsegs, &nsegs, BUS_DMA_NOWAIT);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, CAS_NTXSEGS);
+ m = m_collapse(*m_head, M_NOWAIT, CAS_NTXSEGS);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
@@ -1714,7 +1714,7 @@ cas_rint(struct cas_softc *sc)
__func__, idx, off, len);
#endif
rxds = &sc->sc_rxdsoft[idx];
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m != NULL) {
refcount_acquire(&rxds->rxds_refcount);
bus_dmamap_sync(sc->sc_rdmatag,
@@ -1759,7 +1759,7 @@ cas_rint(struct cas_softc *sc)
__func__, idx, off, len);
#endif
rxds = &sc->sc_rxdsoft[idx];
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m != NULL) {
refcount_acquire(&rxds->rxds_refcount);
off += ETHER_ALIGN;
@@ -1796,7 +1796,7 @@ cas_rint(struct cas_softc *sc)
#endif
rxds2 = &sc->sc_rxdsoft[idx2];
if (m != NULL) {
- MGET(m2, M_DONTWAIT, MT_DATA);
+ MGET(m2, M_NOWAIT, MT_DATA);
if (m2 != NULL) {
refcount_acquire(
&rxds2->rxds_refcount);
diff --git a/sys/dev/ce/if_ce.c b/sys/dev/ce/if_ce.c
index 7fb208a..700ab80a 100644
--- a/sys/dev/ce/if_ce.c
+++ b/sys/dev/ce/if_ce.c
@@ -319,10 +319,10 @@ static struct mbuf *makembuf (void *buf, unsigned len)
{
struct mbuf *m;
- MGETHDR (m, M_DONTWAIT, MT_DATA);
+ MGETHDR (m, M_NOWAIT, MT_DATA);
if (! m)
return 0;
- MCLGET (m, M_DONTWAIT);
+ MCLGET (m, M_NOWAIT);
if (! (m->m_flags & M_EXT)) {
m_freem (m);
return 0;
diff --git a/sys/dev/cm/smc90cx6.c b/sys/dev/cm/smc90cx6.c
index eb89675..f7ceae6 100644
--- a/sys/dev/cm/smc90cx6.c
+++ b/sys/dev/cm/smc90cx6.c
@@ -502,7 +502,7 @@ cm_srint_locked(vsc)
buffer = sc->sc_rx_act ^ 1;
/* Allocate header mbuf */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == 0) {
/*
@@ -539,7 +539,7 @@ cm_srint_locked(vsc)
*/
if ((len + 2 + 2) > MHLEN) {
/* attach an mbuf cluster */
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
/* Insist on getting a cluster */
if ((m->m_flags & M_EXT) == 0) {
diff --git a/sys/dev/cp/if_cp.c b/sys/dev/cp/if_cp.c
index 49e329e..4ff0bcc 100644
--- a/sys/dev/cp/if_cp.c
+++ b/sys/dev/cp/if_cp.c
@@ -203,10 +203,10 @@ static struct mbuf *makembuf (void *buf, unsigned len)
{
struct mbuf *m;
- MGETHDR (m, M_DONTWAIT, MT_DATA);
+ MGETHDR (m, M_NOWAIT, MT_DATA);
if (! m)
return 0;
- MCLGET (m, M_DONTWAIT);
+ MCLGET (m, M_NOWAIT);
if (! (m->m_flags & M_EXT)) {
m_freem (m);
return 0;
diff --git a/sys/dev/cs/if_cs.c b/sys/dev/cs/if_cs.c
index 3789ea4..c89760a 100644
--- a/sys/dev/cs/if_cs.c
+++ b/sys/dev/cs/if_cs.c
@@ -726,12 +726,12 @@ cs_get_packet(struct cs_softc *sc)
return (-1);
}
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m==NULL)
return (-1);
if (length > MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!(m->m_flags & M_EXT)) {
m_freem(m);
return (-1);
diff --git a/sys/dev/ctau/if_ct.c b/sys/dev/ctau/if_ct.c
index dbdca97..7b4abc3 100644
--- a/sys/dev/ctau/if_ct.c
+++ b/sys/dev/ctau/if_ct.c
@@ -205,10 +205,10 @@ static struct mbuf *makembuf (void *buf, u_int len)
{
struct mbuf *m;
- MGETHDR (m, M_DONTWAIT, MT_DATA);
+ MGETHDR (m, M_NOWAIT, MT_DATA);
if (! m)
return 0;
- MCLGET (m, M_DONTWAIT);
+ MCLGET (m, M_NOWAIT);
if (! (m->m_flags & M_EXT)) {
m_freem (m);
return 0;
diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c
index c8f53a0..cb15486 100644
--- a/sys/dev/cx/if_cx.c
+++ b/sys/dev/cx/if_cx.c
@@ -252,13 +252,13 @@ static struct mbuf *makembuf (void *buf, u_int len)
{
struct mbuf *m, *o, *p;
- MGETHDR (m, M_DONTWAIT, MT_DATA);
+ MGETHDR (m, M_NOWAIT, MT_DATA);
if (! m)
return 0;
if (len >= MINCLSIZE)
- MCLGET (m, M_DONTWAIT);
+ MCLGET (m, M_NOWAIT);
m->m_pkthdr.len = len;
m->m_len = 0;
@@ -271,13 +271,13 @@ static struct mbuf *makembuf (void *buf, u_int len)
if (! n) {
/* Allocate new mbuf. */
o = p;
- MGET (p, M_DONTWAIT, MT_DATA);
+ MGET (p, M_NOWAIT, MT_DATA);
if (! p) {
m_freem (m);
return 0;
}
if (len >= MINCLSIZE)
- MCLGET (p, M_DONTWAIT);
+ MCLGET (p, M_NOWAIT);
p->m_len = 0;
o->m_next = p;
diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c
index 455c723..fee0653 100644
--- a/sys/dev/cxgb/cxgb_main.c
+++ b/sys/dev/cxgb/cxgb_main.c
@@ -1442,7 +1442,7 @@ send_pktsched_cmd(struct adapter *adap, int sched, int qidx, int lo,
struct mbuf *m;
struct mngt_pktsched_wr *req;
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m) {
req = mtod(m, struct mngt_pktsched_wr *);
req->wr.wrh_hi = htonl(V_WR_OP(FW_WROPCODE_MNGT));
diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c
index 0108339..3a5d8f6 100644
--- a/sys/dev/cxgb/cxgb_sge.c
+++ b/sys/dev/cxgb/cxgb_sge.c
@@ -2710,7 +2710,7 @@ get_packet(adapter_t *adap, unsigned int drop_thres, struct sge_qset *qs,
if (recycle_enable && len <= SGE_RX_COPY_THRES &&
sopeop == RSPQ_SOP_EOP) {
- if ((m = m_gethdr(M_DONTWAIT, MT_DATA)) == NULL)
+ if ((m = m_gethdr(M_NOWAIT, MT_DATA)) == NULL)
goto skip_recycle;
cl = mtod(m, void *);
memcpy(cl, sd->rxsd_cl, len);
@@ -2866,10 +2866,10 @@ process_responses(adapter_t *adap, struct sge_qset *qs, int budget)
printf("async notification\n");
if (mh->mh_head == NULL) {
- mh->mh_head = m_gethdr(M_DONTWAIT, MT_DATA);
+ mh->mh_head = m_gethdr(M_NOWAIT, MT_DATA);
m = mh->mh_head;
} else {
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
}
if (m == NULL)
goto no_mem;
@@ -2882,7 +2882,7 @@ process_responses(adapter_t *adap, struct sge_qset *qs, int budget)
rspq->async_notif++;
goto skip;
} else if (flags & F_RSPD_IMM_DATA_VALID) {
- struct mbuf *m = m_gethdr(M_DONTWAIT, MT_DATA);
+ struct mbuf *m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL) {
no_mem:
diff --git a/sys/dev/cxgb/sys/uipc_mvec.c b/sys/dev/cxgb/sys/uipc_mvec.c
index f52daa6..dea5500 100644
--- a/sys/dev/cxgb/sys/uipc_mvec.c
+++ b/sys/dev/cxgb/sys/uipc_mvec.c
@@ -98,7 +98,7 @@ retry:
printf("mbuf chain too long: %d max allowed %d\n",
seg_count, TX_MAX_SEGS);
if (!defragged) {
- n = m_defrag(*m, M_DONTWAIT);
+ n = m_defrag(*m, M_NOWAIT);
if (n == NULL) {
err = ENOBUFS;
goto err_out;
diff --git a/sys/dev/cxgbe/t4_l2t.c b/sys/dev/cxgbe/t4_l2t.c
index 6476b9b..dd8748e 100644
--- a/sys/dev/cxgbe/t4_l2t.c
+++ b/sys/dev/cxgbe/t4_l2t.c
@@ -149,7 +149,7 @@ t4_l2t_alloc_switching(struct l2t_data *d)
{
struct l2t_entry *e;
- rw_rlock(&d->lock);
+ rw_wlock(&d->lock);
e = t4_alloc_l2e(d);
if (e) {
mtx_lock(&e->lock); /* avoid race with t4_l2t_free */
@@ -157,7 +157,7 @@ t4_l2t_alloc_switching(struct l2t_data *d)
atomic_store_rel_int(&e->refcnt, 1);
mtx_unlock(&e->lock);
}
- rw_runlock(&d->lock);
+ rw_wunlock(&d->lock);
return e;
}
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index 03c4a3f..aeaa4d2 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -371,6 +371,7 @@ struct t4_pciids {
{0x4408, "Chelsio T420-CX"},
{0x4409, "Chelsio T420-BT"},
{0x440a, "Chelsio T404-BT"},
+ {0x440e, "Chelsio T440-LP-CR"},
};
#ifdef TCP_OFFLOAD
diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c
index fa33d18..62d9eb3 100644
--- a/sys/dev/cxgbe/t4_sge.c
+++ b/sys/dev/cxgbe/t4_sge.c
@@ -2761,7 +2761,7 @@ start: sgl->nsegs = 0;
rc = bus_dmamap_load_mbuf_sg(txq->tx_tag, txm->map, m, sgl->seg,
&sgl->nsegs, BUS_DMA_NOWAIT);
if (rc == EFBIG && defragged == 0) {
- m = m_defrag(m, M_DONTWAIT);
+ m = m_defrag(m, M_NOWAIT);
if (m == NULL)
return (EFBIG);
diff --git a/sys/dev/cxgbe/tom/t4_ddp.c b/sys/dev/cxgbe/tom/t4_ddp.c
index 31eb607..16eb707 100644
--- a/sys/dev/cxgbe/tom/t4_ddp.c
+++ b/sys/dev/cxgbe/tom/t4_ddp.c
@@ -1207,7 +1207,7 @@ deliver:
KASSERT(sb->sb_mb != NULL,
("%s: len > 0 && sb->sb_mb empty", __func__));
- m = m_copym(sb->sb_mb, 0, len, M_DONTWAIT);
+ m = m_copym(sb->sb_mb, 0, len, M_NOWAIT);
if (m == NULL)
len = 0; /* Don't flush data from sockbuf. */
else
diff --git a/sys/dev/cxgbe/tom/t4_listen.c b/sys/dev/cxgbe/tom/t4_listen.c
index e5c457d..523f7f3 100644
--- a/sys/dev/cxgbe/tom/t4_listen.c
+++ b/sys/dev/cxgbe/tom/t4_listen.c
@@ -1164,7 +1164,7 @@ do_pass_accept_req(struct sge_iq *iq, const struct rss_header *rss,
* or may not be stashed in the original SYN mbuf passed to us.
* Just copy it over instead of dealing with all possibilities.
*/
- m = m_dup(synqe->syn, M_DONTWAIT);
+ m = m_dup(synqe->syn, M_NOWAIT);
if (m)
m->m_pkthdr.rcvif = ifp;
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index 01f4974..2c8d1ca 100644
--- a/sys/dev/dc/if_dc.c
+++ b/sys/dev/dc/if_dc.c
@@ -2650,7 +2650,7 @@ dc_newbuf(struct dc_softc *sc, int i)
bus_dma_segment_t segs[1];
int error, nseg;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES;
@@ -3387,7 +3387,7 @@ dc_encap(struct dc_softc *sc, struct mbuf **m_head)
defragged = 0;
if (sc->dc_flags & DC_TX_COALESCE &&
((*m_head)->m_next != NULL || sc->dc_flags & DC_TX_ALIGN)) {
- m = m_defrag(*m_head, M_DONTWAIT);
+ m = m_defrag(*m_head, M_NOWAIT);
defragged = 1;
} else {
/*
@@ -3402,7 +3402,7 @@ dc_encap(struct dc_softc *sc, struct mbuf **m_head)
if (i > DC_TX_LIST_CNT / 4 ||
DC_TX_LIST_CNT - i + sc->dc_cdata.dc_tx_cnt <=
DC_TX_LIST_RSVD) {
- m = m_collapse(*m_head, M_DONTWAIT, DC_MAXFRAGS);
+ m = m_collapse(*m_head, M_NOWAIT, DC_MAXFRAGS);
defragged = 1;
}
}
@@ -3419,7 +3419,7 @@ dc_encap(struct dc_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->dc_tx_mtag,
sc->dc_cdata.dc_tx_map[idx], *m_head, segs, &nseg, 0);
if (error == EFBIG) {
- if (defragged != 0 || (m = m_collapse(*m_head, M_DONTWAIT,
+ if (defragged != 0 || (m = m_collapse(*m_head, M_NOWAIT,
DC_MAXFRAGS)) == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c
index 2503961..ace5542 100644
--- a/sys/dev/de/if_de.c
+++ b/sys/dev/de/if_de.c
@@ -257,7 +257,7 @@ tulip_txprobe(tulip_softc_t * const sc)
* to verify the connectivity.
*/
TULIP_LOCK_ASSERT(sc);
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return 0;
/*
@@ -3517,7 +3517,7 @@ tulip_rx_intr(tulip_softc_t * const sc)
ms->m_pkthdr.len = total_len;
ms->m_pkthdr.rcvif = ifp;
m0 = ms;
- ms = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ ms = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
#endif
TULIP_UNLOCK(sc);
CTR1(KTR_TULIP, "tulip_rx_intr: passing %p to upper layer", m0);
@@ -3528,7 +3528,7 @@ tulip_rx_intr(tulip_softc_t * const sc)
* If we are priming the TULIP with mbufs, then allocate
* a new cluster for the next descriptor.
*/
- ms = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ ms = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
#ifndef __NO_STRICT_ALIGNMENT
skip_input:
@@ -3970,7 +3970,7 @@ tulip_txput(tulip_softc_t * const sc, struct mbuf *m)
* to recopy it into one mbuf and then try again. If
* we can't recopy it, try again later.
*/
- m0 = m_defrag(m, M_DONTWAIT);
+ m0 = m_defrag(m, M_NOWAIT);
if (m0 == NULL) {
sc->tulip_flags |= TULIP_WANTTXSTART;
#if defined(TULIP_DEBUG)
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index 112b538..8ba32e0 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -1831,7 +1831,7 @@ retry:
if (do_tso || (m_head->m_next != NULL &&
m_head->m_pkthdr.csum_flags & CSUM_OFFLOAD)) {
if (M_WRITABLE(*m_headp) == 0) {
- m_head = m_dup(*m_headp, M_DONTWAIT);
+ m_head = m_dup(*m_headp, M_NOWAIT);
m_freem(*m_headp);
if (m_head == NULL) {
*m_headp = NULL;
@@ -1948,7 +1948,7 @@ retry:
if (error == EFBIG && remap) {
struct mbuf *m;
- m = m_defrag(*m_headp, M_DONTWAIT);
+ m = m_defrag(*m_headp, M_NOWAIT);
if (m == NULL) {
adapter->mbuf_alloc_failed++;
m_freem(*m_headp);
@@ -3930,7 +3930,7 @@ em_refresh_mbufs(struct rx_ring *rxr, int limit)
while (j != limit) {
rxbuf = &rxr->rx_buffers[i];
if (rxbuf->m_head == NULL) {
- m = m_getjcl(M_DONTWAIT, MT_DATA,
+ m = m_getjcl(M_NOWAIT, MT_DATA,
M_PKTHDR, adapter->rx_mbuf_sz);
/*
** If we have a temporary resource shortage
@@ -4100,7 +4100,7 @@ em_setup_receive_ring(struct rx_ring *rxr)
continue;
}
#endif /* DEV_NETMAP */
- rxbuf->m_head = m_getjcl(M_DONTWAIT, MT_DATA,
+ rxbuf->m_head = m_getjcl(M_NOWAIT, MT_DATA,
M_PKTHDR, adapter->rx_mbuf_sz);
if (rxbuf->m_head == NULL) {
error = ENOBUFS;
@@ -4579,7 +4579,7 @@ em_fixup_rx(struct rx_ring *rxr)
bcopy(m->m_data, m->m_data + ETHER_HDR_LEN, m->m_len);
m->m_data += ETHER_HDR_LEN;
} else {
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (n != NULL) {
bcopy(m->m_data, n->m_data, ETHER_HDR_LEN);
m->m_data += ETHER_HDR_LEN;
diff --git a/sys/dev/e1000/if_igb.c b/sys/dev/e1000/if_igb.c
index cf70965..8eb3011 100644
--- a/sys/dev/e1000/if_igb.c
+++ b/sys/dev/e1000/if_igb.c
@@ -1830,7 +1830,7 @@ retry:
if (do_tso || (m_head->m_next != NULL &&
m_head->m_pkthdr.csum_flags & CSUM_OFFLOAD)) {
if (M_WRITABLE(*m_headp) == 0) {
- m_head = m_dup(*m_headp, M_DONTWAIT);
+ m_head = m_dup(*m_headp, M_NOWAIT);
m_freem(*m_headp);
if (m_head == NULL) {
*m_headp = NULL;
@@ -1935,7 +1935,7 @@ retry:
if (error == EFBIG && remap) {
struct mbuf *m;
- m = m_defrag(*m_headp, M_DONTWAIT);
+ m = m_defrag(*m_headp, M_NOWAIT);
if (m == NULL) {
adapter->mbuf_defrag_failed++;
m_freem(*m_headp);
@@ -3983,7 +3983,7 @@ igb_refresh_mbufs(struct rx_ring *rxr, int limit)
if (rxr->hdr_split == FALSE)
goto no_split;
if (rxbuf->m_head == NULL) {
- mh = m_gethdr(M_DONTWAIT, MT_DATA);
+ mh = m_gethdr(M_NOWAIT, MT_DATA);
if (mh == NULL)
goto update;
} else
@@ -4009,7 +4009,7 @@ igb_refresh_mbufs(struct rx_ring *rxr, int limit)
htole64(hseg[0].ds_addr);
no_split:
if (rxbuf->m_pack == NULL) {
- mp = m_getjcl(M_DONTWAIT, MT_DATA,
+ mp = m_getjcl(M_NOWAIT, MT_DATA,
M_PKTHDR, adapter->rx_mbuf_sz);
if (mp == NULL)
goto update;
@@ -4225,7 +4225,7 @@ igb_setup_receive_ring(struct rx_ring *rxr)
goto skip_head;
/* First the header */
- rxbuf->m_head = m_gethdr(M_DONTWAIT, MT_DATA);
+ rxbuf->m_head = m_gethdr(M_NOWAIT, MT_DATA);
if (rxbuf->m_head == NULL) {
error = ENOBUFS;
goto fail;
@@ -4247,7 +4247,7 @@ igb_setup_receive_ring(struct rx_ring *rxr)
skip_head:
/* Now the payload cluster */
- rxbuf->m_pack = m_getjcl(M_DONTWAIT, MT_DATA,
+ rxbuf->m_pack = m_getjcl(M_NOWAIT, MT_DATA,
M_PKTHDR, adapter->rx_mbuf_sz);
if (rxbuf->m_pack == NULL) {
error = ENOBUFS;
diff --git a/sys/dev/e1000/if_lem.c b/sys/dev/e1000/if_lem.c
index aeb3295..58e6c7e 100644
--- a/sys/dev/e1000/if_lem.c
+++ b/sys/dev/e1000/if_lem.c
@@ -1566,7 +1566,7 @@ lem_xmit(struct adapter *adapter, struct mbuf **m_headp)
if (error == EFBIG) {
struct mbuf *m;
- m = m_defrag(*m_headp, M_DONTWAIT);
+ m = m_defrag(*m_headp, M_NOWAIT);
if (m == NULL) {
adapter->mbuf_alloc_failed++;
m_freem(*m_headp);
@@ -3075,7 +3075,7 @@ lem_get_buf(struct adapter *adapter, int i)
struct em_buffer *rx_buffer;
int error, nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) {
adapter->mbuf_cluster_failed++;
return (ENOBUFS);
@@ -3633,7 +3633,7 @@ lem_fixup_rx(struct adapter *adapter)
bcopy(m->m_data, m->m_data + ETHER_HDR_LEN, m->m_len);
m->m_data += ETHER_HDR_LEN;
} else {
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (n != NULL) {
bcopy(m->m_data, n->m_data, ETHER_HDR_LEN);
m->m_data += ETHER_HDR_LEN;
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index 80446a6..a84fc75 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -1268,7 +1268,7 @@ ed_get_packet(struct ed_softc *sc, bus_size_t buf, u_short len)
struct mbuf *m;
/* Allocate a header mbuf */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return;
m->m_pkthdr.rcvif = ifp;
@@ -1282,7 +1282,7 @@ ed_get_packet(struct ed_softc *sc, bus_size_t buf, u_short len)
*/
if ((len + 2) > MHLEN) {
/* Attach an mbuf cluster */
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
/* Insist on getting a cluster */
if ((m->m_flags & M_EXT) == 0) {
diff --git a/sys/dev/en/midway.c b/sys/dev/en/midway.c
index 3b57ce3..ee12b20 100644
--- a/sys/dev/en/midway.c
+++ b/sys/dev/en/midway.c
@@ -837,15 +837,15 @@ copy_mbuf(struct mbuf *m)
{
struct mbuf *new;
- MGET(new, M_WAIT, MT_DATA);
+ MGET(new, M_WAITOK, MT_DATA);
if (m->m_flags & M_PKTHDR) {
M_MOVE_PKTHDR(new, m);
if (m->m_len > MHLEN)
- MCLGET(new, M_WAIT);
+ MCLGET(new, M_WAITOK);
} else {
if (m->m_len > MLEN)
- MCLGET(new, M_WAIT);
+ MCLGET(new, M_WAITOK);
}
bcopy(m->m_data, new->m_data, m->m_len);
@@ -1925,7 +1925,7 @@ en_mget(struct en_softc *sc, u_int pktlen)
* words at the begin.
*/
/* called from interrupt context */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return (NULL);
@@ -1940,7 +1940,7 @@ en_mget(struct en_softc *sc, u_int pktlen)
totlen -= m->m_len;
/* called from interrupt context */
- tmp = m_getm(m, totlen, M_DONTWAIT, MT_DATA);
+ tmp = m_getm(m, totlen, M_NOWAIT, MT_DATA);
if (tmp == NULL) {
m_free(m);
return (NULL);
@@ -2924,7 +2924,7 @@ en_attach(struct en_softc *sc)
&en_utopia_methods);
utopia_init_media(&sc->utopia);
- MGET(sc->padbuf, M_WAIT, MT_DATA);
+ MGET(sc->padbuf, M_WAITOK, MT_DATA);
bzero(sc->padbuf->m_data, MLEN);
if (bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0,
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c
index 7be1f80..183c5f4 100644
--- a/sys/dev/ep/if_ep.c
+++ b/sys/dev/ep/if_ep.c
@@ -746,11 +746,11 @@ read_again:
rx_fifo = rx_fifo2 = status & RX_BYTES_MASK;
if (EP_FTST(sc, F_RX_FIRST)) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (!m)
goto out;
if (rx_fifo >= MINCLSIZE)
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
sc->top = sc->mcur = top = m;
#define EROUND ((sizeof(struct ether_header) + 3) & ~3)
#define EOFF (EROUND - sizeof(struct ether_header))
@@ -774,11 +774,11 @@ read_again:
lenthisone = min(rx_fifo, M_TRAILINGSPACE(m));
if (lenthisone == 0) { /* no room in this one */
mcur = m;
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (!m)
goto out;
if (rx_fifo >= MINCLSIZE)
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
m->m_len = 0;
mcur->m_next = m;
lenthisone = min(rx_fifo, M_TRAILINGSPACE(m));
diff --git a/sys/dev/et/if_et.c b/sys/dev/et/if_et.c
index dfdcde7..3d73c9c 100644
--- a/sys/dev/et/if_et.c
+++ b/sys/dev/et/if_et.c
@@ -2169,7 +2169,7 @@ et_encap(struct et_softc *sc, struct mbuf **m0)
error = bus_dmamap_load_mbuf_sg(sc->sc_tx_tag, map, *m0, segs, &nsegs,
0);
if (error == EFBIG) {
- m = m_collapse(*m0, M_DONTWAIT, ET_NSEG_MAX);
+ m = m_collapse(*m0, M_NOWAIT, ET_NSEG_MAX);
if (m == NULL) {
m_freem(*m0);
*m0 = NULL;
@@ -2331,7 +2331,7 @@ et_newbuf_cluster(struct et_rxbuf_data *rbd, int buf_idx)
int nsegs;
MPASS(buf_idx < ET_RX_NDESC);
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES;
@@ -2390,7 +2390,7 @@ et_newbuf_hdr(struct et_rxbuf_data *rbd, int buf_idx)
int nsegs;
MPASS(buf_idx < ET_RX_NDESC);
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MHLEN;
diff --git a/sys/dev/ex/if_ex.c b/sys/dev/ex/if_ex.c
index 1034dacd..a91a3cc 100644
--- a/sys/dev/ex/if_ex.c
+++ b/sys/dev/ex/if_ex.c
@@ -733,7 +733,7 @@ ex_rx_intr(struct ex_softc *sc)
QQQ = pkt_len = CSR_READ_2(sc, IO_PORT_REG);
if (rx_status & RCV_OK_bit) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
ipkt = m;
if (ipkt == NULL) {
ifp->if_iqdrops++;
@@ -744,7 +744,7 @@ ex_rx_intr(struct ex_softc *sc)
while (pkt_len > 0) {
if (pkt_len >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (m->m_flags & M_EXT) {
m->m_len = MCLBYTES;
} else {
@@ -769,7 +769,7 @@ ex_rx_intr(struct ex_softc *sc)
pkt_len -= m->m_len;
if (pkt_len > 0) {
- MGET(m->m_next, M_DONTWAIT, MT_DATA);
+ MGET(m->m_next, M_NOWAIT, MT_DATA);
if (m->m_next == NULL) {
m_freem(ipkt);
ifp->if_iqdrops++;
diff --git a/sys/dev/fatm/if_fatm.c b/sys/dev/fatm/if_fatm.c
index 8ddda95..9020d22 100644
--- a/sys/dev/fatm/if_fatm.c
+++ b/sys/dev/fatm/if_fatm.c
@@ -1099,7 +1099,7 @@ fatm_supply_small_buffers(struct fatm_softc *sc)
if_printf(sc->ifp, "out of rbufs\n");
break;
}
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
LIST_INSERT_HEAD(&sc->rbuf_free, rb, link);
break;
@@ -1189,7 +1189,7 @@ fatm_supply_large_buffers(struct fatm_softc *sc)
if_printf(sc->ifp, "out of rbufs\n");
break;
}
- if ((m = m_getcl(M_DONTWAIT, MT_DATA,
+ if ((m = m_getcl(M_NOWAIT, MT_DATA,
M_PKTHDR)) == NULL) {
LIST_INSERT_HEAD(&sc->rbuf_free, rb, link);
break;
@@ -1768,17 +1768,17 @@ copy_mbuf(struct mbuf *m)
{
struct mbuf *new;
- MGET(new, M_DONTWAIT, MT_DATA);
+ MGET(new, M_NOWAIT, MT_DATA);
if (new == NULL)
return (NULL);
if (m->m_flags & M_PKTHDR) {
M_MOVE_PKTHDR(new, m);
if (m->m_len > MHLEN)
- MCLGET(new, M_WAIT);
+ MCLGET(new, M_WAITOK);
} else {
if (m->m_len > MLEN)
- MCLGET(new, M_WAIT);
+ MCLGET(new, M_WAITOK);
}
bcopy(m->m_data, new->m_data, m->m_len);
diff --git a/sys/dev/fdt/fdtbus.c b/sys/dev/fdt/fdtbus.c
index 2ca7ab5..770c4c8 100644
--- a/sys/dev/fdt/fdtbus.c
+++ b/sys/dev/fdt/fdtbus.c
@@ -257,6 +257,8 @@ newbus_device_destroy(device_t dev)
struct fdtbus_devinfo *di;
di = device_get_ivars(dev);
+ if (di == NULL)
+ return;
free(di->di_name, M_OFWPROP);
free(di->di_type, M_OFWPROP);
diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c
index 7bfca2a..5883b6b 100644
--- a/sys/dev/fe/if_fe.c
+++ b/sys/dev/fe/if_fe.c
@@ -1870,13 +1870,13 @@ fe_get_packet (struct fe_softc * sc, u_short len)
*/
/* Allocate an mbuf with packet header info. */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return -1;
/* Attach a cluster if this packet doesn't fit in a normal mbuf. */
if (len > MHLEN - NFS_MAGIC_OFFSET) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!(m->m_flags & M_EXT)) {
m_freem(m);
return -1;
diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c
index 4b147b2..77886d3 100644
--- a/sys/dev/firewire/fwohci.c
+++ b/sys/dev/firewire/fwohci.c
@@ -977,7 +977,7 @@ again:
if (firewire_debug)
device_printf(sc->fc.dev, "EFBIG.\n");
- m0 = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m0 = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m0 != NULL) {
m_copydata(xfer->mbuf, 0,
xfer->mbuf->m_pkthdr.len,
diff --git a/sys/dev/firewire/if_fwe.c b/sys/dev/firewire/if_fwe.c
index fa51026..615cb07 100644
--- a/sys/dev/firewire/if_fwe.c
+++ b/sys/dev/firewire/if_fwe.c
@@ -357,7 +357,7 @@ fwe_init(void *arg)
STAILQ_INIT(&xferq->stdma);
xferq->stproc = NULL;
for (i = 0; i < xferq->bnchunk; i ++) {
- m = m_getcl(M_WAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_WAITOK, MT_DATA, M_PKTHDR);
xferq->bulkxfer[i].mbuf = m;
m->m_len = m->m_pkthdr.len = m->m_ext.ext_size;
STAILQ_INSERT_TAIL(&xferq->stfree,
@@ -606,7 +606,7 @@ fwe_as_output(struct fwe_softc *fwe, struct ifnet *ifp)
#endif
/* keep ip packet alignment for alpha */
- M_PREPEND(m, ETHER_ALIGN, M_DONTWAIT);
+ M_PREPEND(m, ETHER_ALIGN, M_NOWAIT);
fp = &xfer->send.hdr;
*(uint32_t *)&xfer->send.hdr = *(int32_t *)&fwe->pkt_hdr;
fp->mode.stream.len = m->m_pkthdr.len;
@@ -657,7 +657,7 @@ fwe_as_input(struct fw_xferq *xferq)
m = sxfer->mbuf;
/* insert new rbuf */
- sxfer->mbuf = m0 = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ sxfer->mbuf = m0 = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m0 != NULL) {
m0->m_len = m0->m_pkthdr.len = m0->m_ext.ext_size;
STAILQ_INSERT_TAIL(&xferq->stfree, sxfer, link);
diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c
index e7c4a66..7010bc9 100644
--- a/sys/dev/firewire/if_fwip.c
+++ b/sys/dev/firewire/if_fwip.c
@@ -333,7 +333,7 @@ fwip_init(void *arg)
STAILQ_INIT(&xferq->stdma);
xferq->stproc = NULL;
for (i = 0; i < xferq->bnchunk; i ++) {
- m = m_getcl(M_WAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_WAITOK, MT_DATA, M_PKTHDR);
xferq->bulkxfer[i].mbuf = m;
m->m_len = m->m_pkthdr.len = m->m_ext.ext_size;
STAILQ_INSERT_TAIL(&xferq->stfree,
@@ -349,7 +349,7 @@ fwip_init(void *arg)
xfer = fw_xfer_alloc(M_FWIP);
if (xfer == NULL)
break;
- m = m_getcl(M_WAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_WAITOK, MT_DATA, M_PKTHDR);
xfer->recv.payload = mtod(m, uint32_t *);
xfer->recv.pay_len = MCLBYTES;
xfer->hand = fwip_unicast_input;
@@ -657,7 +657,7 @@ fwip_async_output(struct fwip_softc *fwip, struct ifnet *ifp)
*/
uint32_t *p;
- M_PREPEND(m, 2*sizeof(uint32_t), M_DONTWAIT);
+ M_PREPEND(m, 2*sizeof(uint32_t), M_NOWAIT);
p = mtod(m, uint32_t *);
fp->mode.stream.len = m->m_pkthdr.len;
fp->mode.stream.chtag = broadcast_channel;
@@ -778,7 +778,7 @@ fwip_stream_input(struct fw_xferq *xferq)
m = sxfer->mbuf;
/* insert new rbuf */
- sxfer->mbuf = m0 = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ sxfer->mbuf = m0 = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m0 != NULL) {
m0->m_len = m0->m_pkthdr.len = m0->m_ext.ext_size;
STAILQ_INSERT_TAIL(&xferq->stfree, sxfer, link);
@@ -871,7 +871,7 @@ fwip_unicast_input_recycle(struct fwip_softc *fwip, struct fw_xfer *xfer)
* We have finished with a unicast xfer. Allocate a new
* cluster and stick it on the back of the input queue.
*/
- m = m_getcl(M_WAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_WAITOK, MT_DATA, M_PKTHDR);
xfer->mbuf = m;
xfer->recv.payload = mtod(m, uint32_t *);
xfer->recv.pay_len = MCLBYTES;
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 364df90..ba63af7 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -1447,7 +1447,7 @@ fxp_encap(struct fxp_softc *sc, struct mbuf **m_head)
if (M_WRITABLE(*m_head) == 0) {
/* Get a writable copy. */
- m = m_dup(*m_head, M_DONTWAIT);
+ m = m_dup(*m_head, M_NOWAIT);
m_freem(*m_head);
if (m == NULL) {
*m_head = NULL;
@@ -1563,7 +1563,7 @@ fxp_encap(struct fxp_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->fxp_txmtag, txp->tx_map, *m_head,
segs, &nseg, 0);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, sc->maxtxseg);
+ m = m_collapse(*m_head, M_NOWAIT, sc->maxtxseg);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
@@ -2628,7 +2628,7 @@ fxp_new_rfabuf(struct fxp_softc *sc, struct fxp_rx *rxp)
bus_dmamap_t tmp_map;
int error;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
diff --git a/sys/dev/gem/if_gem.c b/sys/dev/gem/if_gem.c
index d75e1ab..4aa9c6d 100644
--- a/sys/dev/gem/if_gem.c
+++ b/sys/dev/gem/if_gem.c
@@ -1120,7 +1120,7 @@ gem_load_txmbuf(struct gem_softc *sc, struct mbuf **m_head)
cflags = 0;
if (((*m_head)->m_pkthdr.csum_flags & sc->sc_csum_features) != 0) {
if (M_WRITABLE(*m_head) == 0) {
- m = m_dup(*m_head, M_DONTWAIT);
+ m = m_dup(*m_head, M_NOWAIT);
m_freem(*m_head);
*m_head = m;
if (m == NULL)
@@ -1143,7 +1143,7 @@ gem_load_txmbuf(struct gem_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->sc_tdmatag, txs->txs_dmamap,
*m_head, txsegs, &nsegs, BUS_DMA_NOWAIT);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, GEM_NTXSEGS);
+ m = m_collapse(*m_head, M_NOWAIT, GEM_NTXSEGS);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
@@ -1663,7 +1663,7 @@ gem_add_rxbuf(struct gem_softc *sc, int idx)
GEM_LOCK_ASSERT(sc, MA_OWNED);
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = m->m_ext.ext_size;
diff --git a/sys/dev/gxemul/ether/if_gx.c b/sys/dev/gxemul/ether/if_gx.c
index b98cc7c..321882f 100644
--- a/sys/dev/gxemul/ether/if_gx.c
+++ b/sys/dev/gxemul/ether/if_gx.c
@@ -370,7 +370,7 @@ gx_rx_intr(void *arg)
continue;
}
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) {
device_printf(sc->sc_dev, "no memory for receive mbuf.\n");
sc->sc_ifp->if_iqdrops++;
diff --git a/sys/dev/hatm/if_hatm_intr.c b/sys/dev/hatm/if_hatm_intr.c
index 35bbd57..b6a5368 100644
--- a/sys/dev/hatm/if_hatm_intr.c
+++ b/sys/dev/hatm/if_hatm_intr.c
@@ -330,7 +330,7 @@ he_intr_rbp(struct hatm_softc *sc, struct herbp *rbp, u_int large,
if (large) {
/* allocate the MBUF */
- if ((m = m_getcl(M_DONTWAIT, MT_DATA,
+ if ((m = m_getcl(M_NOWAIT, MT_DATA,
M_PKTHDR)) == NULL) {
if_printf(sc->ifp,
"no mbuf clusters\n");
@@ -437,7 +437,7 @@ hatm_rx_buffer(struct hatm_softc *sc, u_int group, u_int handle)
DBG(sc, RX, ("RX group=%u handle=%x page=%u chunk=%u", group, handle,
pageno, chunkno));
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (group == 0) {
struct mbuf0_chunk *c0;
diff --git a/sys/dev/hatm/if_hatm_tx.c b/sys/dev/hatm/if_hatm_tx.c
index 868b5a3..455dbb4 100644
--- a/sys/dev/hatm/if_hatm_tx.c
+++ b/sys/dev/hatm/if_hatm_tx.c
@@ -466,7 +466,7 @@ hatm_start(struct ifnet *ifp)
if (error == EFBIG) {
/* try to defragment the packet */
sc->istats.defrag++;
- m = m_defrag(m, M_DONTWAIT);
+ m = m_defrag(m, M_NOWAIT);
if (m == NULL) {
tpd->mbuf = NULL;
hatm_free_txmbuf(sc);
diff --git a/sys/dev/hifn/hifn7751.c b/sys/dev/hifn/hifn7751.c
index ecb1239..c5c5af1 100644
--- a/sys/dev/hifn/hifn7751.c
+++ b/sys/dev/hifn/hifn7751.c
@@ -1878,14 +1878,14 @@ hifn_crypto(
totlen = cmd->src_mapsize;
if (cmd->src_m->m_flags & M_PKTHDR) {
len = MHLEN;
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
- if (m0 && !m_dup_pkthdr(m0, cmd->src_m, M_DONTWAIT)) {
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
+ if (m0 && !m_dup_pkthdr(m0, cmd->src_m, M_NOWAIT)) {
m_free(m0);
m0 = NULL;
}
} else {
len = MLEN;
- MGET(m0, M_DONTWAIT, MT_DATA);
+ MGET(m0, M_NOWAIT, MT_DATA);
}
if (m0 == NULL) {
hifnstats.hst_nomem_mbuf++;
@@ -1893,7 +1893,7 @@ hifn_crypto(
goto err_srcmap;
}
if (totlen >= MINCLSIZE) {
- MCLGET(m0, M_DONTWAIT);
+ MCLGET(m0, M_NOWAIT);
if ((m0->m_flags & M_EXT) == 0) {
hifnstats.hst_nomem_mcl++;
err = sc->sc_cmdu ? ERESTART : ENOMEM;
@@ -1907,7 +1907,7 @@ hifn_crypto(
mlast = m0;
while (totlen > 0) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
hifnstats.hst_nomem_mbuf++;
err = sc->sc_cmdu ? ERESTART : ENOMEM;
@@ -1916,7 +1916,7 @@ hifn_crypto(
}
len = MLEN;
if (totlen >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
hifnstats.hst_nomem_mcl++;
err = sc->sc_cmdu ? ERESTART : ENOMEM;
diff --git a/sys/dev/hme/if_hme.c b/sys/dev/hme/if_hme.c
index 63d27d1..9f310ee 100644
--- a/sys/dev/hme/if_hme.c
+++ b/sys/dev/hme/if_hme.c
@@ -564,7 +564,7 @@ hme_add_rxbuf(struct hme_softc *sc, unsigned int ri, int keepold)
hme_discard_rxbuf(sc, ri);
return (0);
}
- if ((m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR)) == NULL)
+ if ((m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR)) == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = m->m_ext.ext_size;
b = mtod(m, uintptr_t);
@@ -951,7 +951,7 @@ hme_load_txmbuf(struct hme_softc *sc, struct mbuf **m0)
cflags = 0;
if (((*m0)->m_pkthdr.csum_flags & sc->sc_csum_features) != 0) {
if (M_WRITABLE(*m0) == 0) {
- m = m_dup(*m0, M_DONTWAIT);
+ m = m_dup(*m0, M_NOWAIT);
m_freem(*m0);
*m0 = m;
if (m == NULL)
@@ -974,7 +974,7 @@ hme_load_txmbuf(struct hme_softc *sc, struct mbuf **m0)
error = bus_dmamap_load_mbuf_sg(sc->sc_tdmatag, htx->htx_dmamap,
*m0, segs, &nsegs, 0);
if (error == EFBIG) {
- m = m_collapse(*m0, M_DONTWAIT, HME_NTXSEGS);
+ m = m_collapse(*m0, M_NOWAIT, HME_NTXSEGS);
if (m == NULL) {
m_freem(*m0);
*m0 = NULL;
diff --git a/sys/dev/ichsmb/ichsmb_pci.c b/sys/dev/ichsmb/ichsmb_pci.c
index d4fb777..083338f 100644
--- a/sys/dev/ichsmb/ichsmb_pci.c
+++ b/sys/dev/ichsmb/ichsmb_pci.c
@@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$");
#define ID_PATSBURG 0x1d228086
#define ID_CPT 0x1c228086
#define ID_PPT 0x1e228086
+#define ID_LPT 0x8c228086
#define PCIS_SERIALBUS_SMBUS_PROGIF 0x00
@@ -188,6 +189,9 @@ ichsmb_pci_probe(device_t dev)
case ID_PPT:
device_set_desc(dev, "Intel Panther Point SMBus controller");
break;
+ case ID_LPT:
+ device_set_desc(dev, "Intel Lynx Point SMBus controller");
+ break;
default:
return (ENXIO);
}
diff --git a/sys/dev/ichwd/ichwd.c b/sys/dev/ichwd/ichwd.c
index 904c44d..2a0feb0 100644
--- a/sys/dev/ichwd/ichwd.c
+++ b/sys/dev/ichwd/ichwd.c
@@ -191,6 +191,9 @@ static struct ichwd_device ichwd_devices[] = {
{ DEVICEID_PPT29, "Intel Panther Point watchdog timer", 10 },
{ DEVICEID_PPT30, "Intel Panther Point watchdog timer", 10 },
{ DEVICEID_PPT31, "Intel Panther Point watchdog timer", 10 },
+ { DEVICEID_LPT0, "Intel Lynx Point watchdog timer", 10 },
+ { DEVICEID_LPT1, "Intel Lynx Point watchdog timer", 10 },
+ { DEVICEID_LPT2, "Intel Lynx Point watchdog timer", 10 },
{ DEVICEID_DH89XXCC_LPC, "Intel DH89xxCC watchdog timer", 10 },
{ 0, NULL, 0 },
};
diff --git a/sys/dev/ichwd/ichwd.h b/sys/dev/ichwd/ichwd.h
index 5c5b068..858e3bc 100644
--- a/sys/dev/ichwd/ichwd.h
+++ b/sys/dev/ichwd/ichwd.h
@@ -177,6 +177,38 @@ struct ichwd_softc {
#define DEVICEID_3400 0x3b12
#define DEVICEID_3420 0x3b14
#define DEVICEID_3450 0x3b16
+#define DEVICEID_LPT0 0x8c40
+#define DEVICEID_LPT1 0x8c41
+#define DEVICEID_LPT2 0x8c42
+#define DEVICEID_LPT3 0x8c43
+#define DEVICEID_LPT4 0x8c44
+#define DEVICEID_LPT5 0x8c45
+#define DEVICEID_LPT6 0x8c46
+#define DEVICEID_LPT7 0x8c47
+#define DEVICEID_LPT8 0x8c48
+#define DEVICEID_LPT9 0x8c49
+#define DEVICEID_LPT10 0x8c4a
+#define DEVICEID_LPT11 0x8c4b
+#define DEVICEID_LPT12 0x8c4c
+#define DEVICEID_LPT13 0x8c4d
+#define DEVICEID_LPT14 0x8c4e
+#define DEVICEID_LPT15 0x8c4f
+#define DEVICEID_LPT16 0x8c50
+#define DEVICEID_LPT17 0x8c51
+#define DEVICEID_LPT18 0x8c52
+#define DEVICEID_LPT19 0x8c53
+#define DEVICEID_LPT20 0x8c54
+#define DEVICEID_LPT21 0x8c55
+#define DEVICEID_LPT22 0x8c56
+#define DEVICEID_LPT23 0x8c57
+#define DEVICEID_LPT24 0x8c58
+#define DEVICEID_LPT25 0x8c59
+#define DEVICEID_LPT26 0x8c5a
+#define DEVICEID_LPT27 0x8c5b
+#define DEVICEID_LPT28 0x8c5c
+#define DEVICEID_LPT29 0x8c5d
+#define DEVICEID_LPT30 0x8c5e
+#define DEVICEID_LPT31 0x8c5f
/* ICH LPC Interface Bridge Registers (ICH5 and older) */
#define ICH_GEN_STA 0xd4
diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c
index fb0d987..e945a06 100644
--- a/sys/dev/ie/if_ie.c
+++ b/sys/dev/ie/if_ie.c
@@ -698,7 +698,7 @@ ieget(struct ie_softc *sc, struct mbuf **mp)
return (-1);
}
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (!m) {
ie_drop_packet_buffer(sc);
/* XXXX if_ierrors++; */
@@ -727,7 +727,7 @@ ieget(struct ie_softc *sc, struct mbuf **mp)
* single mbuf which may or may not be big enough. Got that?
*/
if (top) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (!m) {
m_freem(top);
ie_drop_packet_buffer(sc);
@@ -736,7 +736,7 @@ ieget(struct ie_softc *sc, struct mbuf **mp)
m->m_len = MLEN;
}
if (resid >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (m->m_flags & M_EXT)
m->m_len = min(resid, MCLBYTES);
} else {
diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c
index 10fc018..a62b913 100644
--- a/sys/dev/if_ndis/if_ndis.c
+++ b/sys/dev/if_ndis/if_ndis.c
@@ -1174,7 +1174,7 @@ ndis_rxeof_eth(adapter, ctx, addr, hdr, hdrlen, lookahead, lookaheadlen, pktlen)
block = adapter;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return;
@@ -1418,7 +1418,7 @@ ndis_rxeof(adapter, packets, pktcnt)
} else {
#ifdef notdef
if (p->np_oob.npo_status == NDIS_STATUS_RESOURCES) {
- m = m_dup(m0, M_DONTWAIT);
+ m = m_dup(m0, M_NOWAIT);
/*
* NOTE: we want to destroy the mbuf here, but
* we don't actually want to return it to the
@@ -1436,7 +1436,7 @@ ndis_rxeof(adapter, packets, pktcnt)
} else
p->np_oob.npo_status = NDIS_STATUS_PENDING;
#endif
- m = m_dup(m0, M_DONTWAIT);
+ m = m_dup(m0, M_NOWAIT);
if (p->np_oob.npo_status == NDIS_STATUS_RESOURCES)
p->np_refcnt++;
else
diff --git a/sys/dev/ipw/if_ipw.c b/sys/dev/ipw/if_ipw.c
index 01e3012..28fa0fd 100644
--- a/sys/dev/ipw/if_ipw.c
+++ b/sys/dev/ipw/if_ipw.c
@@ -709,7 +709,7 @@ ipw_dma_alloc(struct ipw_softc *sc)
sbuf = &sc->rx_sbuf_list[i];
sbd->bd = &sc->rbd_list[i];
- sbuf->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ sbuf->m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (sbuf->m == NULL) {
device_printf(sc->sc_dev,
"could not allocate rx mbuf\n");
@@ -1207,7 +1207,7 @@ ipw_rx_data_intr(struct ipw_softc *sc, struct ipw_status *status,
* drop the received packet and reuse the old mbuf. In the unlikely
* case that the old mbuf can't be reloaded either, explicitly panic.
*/
- mnew = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ mnew = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (mnew == NULL) {
ifp->if_ierrors++;
return;
@@ -1651,7 +1651,7 @@ ipw_tx_start(struct ifnet *ifp, struct mbuf *m0, struct ieee80211_node *ni)
return error;
}
if (error != 0) {
- mnew = m_defrag(m0, M_DONTWAIT);
+ mnew = m_defrag(m0, M_NOWAIT);
if (mnew == NULL) {
device_printf(sc->sc_dev,
"could not defragment mbuf\n");
diff --git a/sys/dev/isci/isci_io_request.c b/sys/dev/isci/isci_io_request.c
index 67ed1da..719034e 100644
--- a/sys/dev/isci/isci_io_request.c
+++ b/sys/dev/isci/isci_io_request.c
@@ -670,8 +670,7 @@ isci_io_request_construct(void *arg, bus_dma_segment_t *seg, int nseg,
io_request->sge = seg;
ccb = io_request->ccb;
- /* XXX More cleanup is needed here */
- if ((nseg == 0) || (error != 0)) {
+ if (error != 0) {
ccb->ccb_h.status = CAM_REQ_INVALID;
xpt_done(ccb);
return;
@@ -757,18 +756,21 @@ isci_io_request_execute_scsi_io(union ccb *ccb,
panic("Unexpected CAM_DATA_PHYS flag! flags = 0x%x\n",
ccb->ccb_h.flags);
- error = bus_dmamap_load(io_request->parent.dma_tag,
- io_request->parent.dma_map, csio->data_ptr, csio->dxfer_len,
- isci_io_request_construct, io_request, 0x0);
+ if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
+ error = bus_dmamap_load(io_request->parent.dma_tag,
+ io_request->parent.dma_map, csio->data_ptr, csio->dxfer_len,
+ isci_io_request_construct, io_request, 0x0);
- /* A resource shortage from BUSDMA will be automatically
- * continued at a later point, pushing the CCB processing
- * forward, which will in turn unfreeze the simq.
- */
- if (error == EINPROGRESS) {
- xpt_freeze_simq(controller->sim, 1);
- ccb->ccb_h.flags |= CAM_RELEASE_SIMQ;
- }
+ /* A resource shortage from BUSDMA will be automatically
+ * continued at a later point, pushing the CCB processing
+ * forward, which will in turn unfreeze the simq.
+ */
+ if (error == EINPROGRESS) {
+ xpt_freeze_simq(controller->sim, 1);
+ ccb->ccb_h.flags |= CAM_RELEASE_SIMQ;
+ }
+ } else
+ isci_io_request_construct(io_request, NULL, 0, 0);
}
void
diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c
index 8571d61..fe1c643 100644
--- a/sys/dev/iwi/if_iwi.c
+++ b/sys/dev/iwi/if_iwi.c
@@ -788,7 +788,7 @@ iwi_alloc_rx_ring(struct iwi_softc *sc, struct iwi_rx_ring *ring, int count)
goto fail;
}
- data->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ data->m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (data->m == NULL) {
device_printf(sc->sc_dev,
"could not allocate rx mbuf\n");
@@ -1236,7 +1236,7 @@ iwi_frame_intr(struct iwi_softc *sc, struct iwi_rx_data *data, int i,
* drop the received packet and reuse the old mbuf. In the unlikely
* case that the old mbuf can't be reloaded either, explicitly panic.
*/
- mnew = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ mnew = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (mnew == NULL) {
ifp->if_ierrors++;
return;
@@ -1884,7 +1884,7 @@ iwi_tx_start(struct ifnet *ifp, struct mbuf *m0, struct ieee80211_node *ni,
return error;
}
if (error != 0) {
- mnew = m_defrag(m0, M_DONTWAIT);
+ mnew = m_defrag(m0, M_NOWAIT);
if (mnew == NULL) {
device_printf(sc->sc_dev,
"could not defragment mbuf\n");
diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c
index 6c292d7..b6b523a 100644
--- a/sys/dev/iwn/if_iwn.c
+++ b/sys/dev/iwn/if_iwn.c
@@ -1377,7 +1377,7 @@ iwn_alloc_rx_ring(struct iwn_softc *sc, struct iwn_rx_ring *ring)
goto fail;
}
- data->m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR,
+ data->m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR,
IWN_RBUF_SIZE);
if (data->m == NULL) {
device_printf(sc->sc_dev,
@@ -2334,7 +2334,7 @@ iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc,
return;
}
- m1 = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, IWN_RBUF_SIZE);
+ m1 = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, IWN_RBUF_SIZE);
if (m1 == NULL) {
DPRINTF(sc, IWN_DEBUG_ANY, "%s: no mbuf to restock ring\n",
__func__);
@@ -3539,7 +3539,7 @@ iwn_tx_data(struct iwn_softc *sc, struct mbuf *m, struct ieee80211_node *ni)
return error;
}
/* Too many DMA segments, linearize mbuf. */
- m1 = m_collapse(m, M_DONTWAIT, IWN_MAX_SCATTER);
+ m1 = m_collapse(m, M_NOWAIT, IWN_MAX_SCATTER);
if (m1 == NULL) {
device_printf(sc->sc_dev,
"%s: could not defrag mbuf\n", __func__);
@@ -3743,7 +3743,7 @@ iwn_tx_data_raw(struct iwn_softc *sc, struct mbuf *m,
return error;
}
/* Too many DMA segments, linearize mbuf. */
- m1 = m_collapse(m, M_DONTWAIT, IWN_MAX_SCATTER);
+ m1 = m_collapse(m, M_NOWAIT, IWN_MAX_SCATTER);
if (m1 == NULL) {
device_printf(sc->sc_dev,
"%s: could not defrag mbuf\n", __func__);
@@ -3976,7 +3976,7 @@ iwn_cmd(struct iwn_softc *sc, int code, const void *buf, int size, int async)
/* Command is too large to fit in a descriptor. */
if (totlen > MCLBYTES)
return EINVAL;
- m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE);
+ m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE);
if (m == NULL)
return ENOMEM;
cmd = mtod(m, struct iwn_tx_cmd *);
diff --git a/sys/dev/ixgb/if_ixgb.c b/sys/dev/ixgb/if_ixgb.c
index 544e8e3..e9acae0 100644
--- a/sys/dev/ixgb/if_ixgb.c
+++ b/sys/dev/ixgb/if_ixgb.c
@@ -1790,7 +1790,7 @@ ixgb_get_buf(int i, struct adapter * adapter,
if (mp == NULL) {
- mp = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ mp = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (mp == NULL) {
adapter->mbuf_alloc_failed++;
diff --git a/sys/dev/ixgbe/ixgbe.c b/sys/dev/ixgbe/ixgbe.c
index 27d3d0a..1d97343 100644
--- a/sys/dev/ixgbe/ixgbe.c
+++ b/sys/dev/ixgbe/ixgbe.c
@@ -3707,7 +3707,7 @@ ixgbe_refresh_mbufs(struct rx_ring *rxr, int limit)
while (j != limit) {
rxbuf = &rxr->rx_buffers[i];
if (rxbuf->buf == NULL) {
- mp = m_getjcl(M_DONTWAIT, MT_DATA,
+ mp = m_getjcl(M_NOWAIT, MT_DATA,
M_PKTHDR, rxr->mbuf_sz);
if (mp == NULL)
goto update;
@@ -3721,8 +3721,8 @@ ixgbe_refresh_mbufs(struct rx_ring *rxr, int limit)
*/
if ((rxbuf->flags & IXGBE_RX_COPY) == 0) {
/* Get the memory mapping */
- error = bus_dmamap_load_mbuf_sg(rxr->tag,
- rxbuf->map, mp, seg, &nsegs, BUS_DMA_NOWAIT);
+ error = bus_dmamap_load_mbuf_sg(rxr->ptag,
+ rxbuf->pmap, mp, seg, &nsegs, BUS_DMA_NOWAIT);
if (error != 0) {
printf("Refresh mbufs: payload dmamap load"
" failure - %d\n", error);
@@ -3731,7 +3731,7 @@ ixgbe_refresh_mbufs(struct rx_ring *rxr, int limit)
goto update;
}
rxbuf->buf = mp;
- bus_dmamap_sync(rxr->tag, rxbuf->map,
+ bus_dmamap_sync(rxr->ptag, rxbuf->pmap,
BUS_DMASYNC_PREREAD);
rxbuf->addr = rxr->rx_base[i].read.pkt_addr =
htole64(seg[0].ds_addr);
@@ -3790,15 +3790,15 @@ ixgbe_allocate_receive_buffers(struct rx_ring *rxr)
0, /* flags */
NULL, /* lockfunc */
NULL, /* lockfuncarg */
- &rxr->tag))) {
+ &rxr->ptag))) {
device_printf(dev, "Unable to create RX DMA tag\n");
goto fail;
}
for (i = 0; i < rxr->num_desc; i++, rxbuf++) {
rxbuf = &rxr->rx_buffers[i];
- error = bus_dmamap_create(rxr->tag,
- BUS_DMA_NOWAIT, &rxbuf->map);
+ error = bus_dmamap_create(rxr->ptag,
+ BUS_DMA_NOWAIT, &rxbuf->pmap);
if (error) {
device_printf(dev, "Unable to create RX dma map\n");
goto fail;
@@ -3897,9 +3897,9 @@ ixgbe_free_receive_ring(struct rx_ring *rxr)
for (i = 0; i < rxr->num_desc; i++) {
rxbuf = &rxr->rx_buffers[i];
if (rxbuf->buf != NULL) {
- bus_dmamap_sync(rxr->tag, rxbuf->map,
+ bus_dmamap_sync(rxr->ptag, rxbuf->pmap,
BUS_DMASYNC_POSTREAD);
- bus_dmamap_unload(rxr->tag, rxbuf->map);
+ bus_dmamap_unload(rxr->ptag, rxbuf->pmap);
rxbuf->buf->m_flags |= M_PKTHDR;
m_freem(rxbuf->buf);
rxbuf->buf = NULL;
@@ -3966,7 +3966,7 @@ ixgbe_setup_receive_ring(struct rx_ring *rxr)
void *addr;
addr = PNMB(slot + sj, &paddr);
- netmap_load_map(rxr->tag, rxbuf->map, addr);
+ netmap_load_map(rxr->ptag, rxbuf->pmap, addr);
/* Update descriptor */
rxr->rx_base[j].read.pkt_addr = htole64(paddr);
continue;
@@ -3981,13 +3981,13 @@ ixgbe_setup_receive_ring(struct rx_ring *rxr)
mp = rxbuf->buf;
mp->m_pkthdr.len = mp->m_len = rxr->mbuf_sz;
/* Get the memory mapping */
- error = bus_dmamap_load_mbuf_sg(rxr->tag,
- rxbuf->map, mp, seg,
+ error = bus_dmamap_load_mbuf_sg(rxr->ptag,
+ rxbuf->pmap, mp, seg,
&nsegs, BUS_DMA_NOWAIT);
if (error != 0)
goto fail;
- bus_dmamap_sync(rxr->tag,
- rxbuf->map, BUS_DMASYNC_PREREAD);
+ bus_dmamap_sync(rxr->ptag,
+ rxbuf->pmap, BUS_DMASYNC_PREREAD);
/* Update descriptor */
rxr->rx_base[j].read.pkt_addr = htole64(seg[0].ds_addr);
}
@@ -4237,16 +4237,16 @@ ixgbe_free_receive_buffers(struct rx_ring *rxr)
for (int i = 0; i < adapter->num_rx_desc; i++) {
rxbuf = &rxr->rx_buffers[i];
if (rxbuf->buf != NULL) {
- bus_dmamap_sync(rxr->tag, rxbuf->map,
+ bus_dmamap_sync(rxr->ptag, rxbuf->pmap,
BUS_DMASYNC_POSTREAD);
- bus_dmamap_unload(rxr->tag, rxbuf->map);
+ bus_dmamap_unload(rxr->ptag, rxbuf->pmap);
rxbuf->buf->m_flags |= M_PKTHDR;
m_freem(rxbuf->buf);
}
rxbuf->buf = NULL;
- if (rxbuf->map != NULL) {
- bus_dmamap_destroy(rxr->tag, rxbuf->map);
- rxbuf->map = NULL;
+ if (rxbuf->pmap != NULL) {
+ bus_dmamap_destroy(rxr->ptag, rxbuf->pmap);
+ rxbuf->pmap = NULL;
}
}
if (rxr->rx_buffers != NULL) {
@@ -4255,9 +4255,9 @@ ixgbe_free_receive_buffers(struct rx_ring *rxr)
}
}
- if (rxr->tag != NULL) {
- bus_dma_tag_destroy(rxr->tag);
- rxr->tag = NULL;
+ if (rxr->ptag != NULL) {
+ bus_dma_tag_destroy(rxr->ptag);
+ rxr->ptag = NULL;
}
return;
diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h
index 28b9193..4267cc5 100644
--- a/sys/dev/ixgbe/ixgbe.h
+++ b/sys/dev/ixgbe/ixgbe.h
@@ -247,7 +247,7 @@ struct ixgbe_tx_buf {
struct ixgbe_rx_buf {
struct mbuf *buf;
struct mbuf *fmp;
- bus_dmamap_t map;
+ bus_dmamap_t pmap;
u_int flags;
#define IXGBE_RX_COPY 0x01
uint64_t addr;
@@ -348,7 +348,7 @@ struct rx_ring {
u16 process_limit;
char mtx_name[16];
struct ixgbe_rx_buf *rx_buffers;
- bus_dma_tag_t tag;
+ bus_dma_tag_t ptag;
u32 bytes; /* Used for AIM calc */
u32 packets;
diff --git a/sys/dev/ixgbe/ixv.c b/sys/dev/ixgbe/ixv.c
index 37f602b..b9aff80 100644
--- a/sys/dev/ixgbe/ixv.c
+++ b/sys/dev/ixgbe/ixv.c
@@ -1235,7 +1235,7 @@ ixv_xmit(struct tx_ring *txr, struct mbuf **m_headp)
if (error == EFBIG) {
struct mbuf *m;
- m = m_defrag(*m_headp, M_DONTWAIT);
+ m = m_defrag(*m_headp, M_NOWAIT);
if (m == NULL) {
adapter->mbuf_defrag_failed++;
m_freem(*m_headp);
@@ -2723,7 +2723,7 @@ ixv_refresh_mbufs(struct rx_ring *rxr, int limit)
while (j != limit) {
rxbuf = &rxr->rx_buffers[i];
if ((rxbuf->m_head == NULL) && (rxr->hdr_split)) {
- mh = m_gethdr(M_DONTWAIT, MT_DATA);
+ mh = m_gethdr(M_NOWAIT, MT_DATA);
if (mh == NULL)
goto update;
mh->m_pkthdr.len = mh->m_len = MHLEN;
@@ -2747,7 +2747,7 @@ ixv_refresh_mbufs(struct rx_ring *rxr, int limit)
}
if (rxbuf->m_pack == NULL) {
- mp = m_getjcl(M_DONTWAIT, MT_DATA,
+ mp = m_getjcl(M_NOWAIT, MT_DATA,
M_PKTHDR, adapter->rx_mbuf_sz);
if (mp == NULL)
goto update;
diff --git a/sys/dev/jme/if_jme.c b/sys/dev/jme/if_jme.c
index 13270b7..832acef 100644
--- a/sys/dev/jme/if_jme.c
+++ b/sys/dev/jme/if_jme.c
@@ -1712,7 +1712,7 @@ jme_encap(struct jme_softc *sc, struct mbuf **m_head)
if (M_WRITABLE(*m_head) == 0) {
/* Get a writable copy. */
- m = m_dup(*m_head, M_DONTWAIT);
+ m = m_dup(*m_head, M_NOWAIT);
m_freem(*m_head);
if (m == NULL) {
*m_head = NULL;
@@ -1774,7 +1774,7 @@ jme_encap(struct jme_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->jme_cdata.jme_tx_tag,
txd->tx_dmamap, *m_head, txsegs, &nsegs, 0);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, JME_MAXTXSEGS);
+ m = m_collapse(*m_head, M_NOWAIT, JME_MAXTXSEGS);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
@@ -3181,7 +3181,7 @@ jme_newbuf(struct jme_softc *sc, struct jme_rxdesc *rxd)
bus_dmamap_t map;
int nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
/*
diff --git a/sys/dev/le/lance.c b/sys/dev/le/lance.c
index 8700aa2..e2cc30e 100644
--- a/sys/dev/le/lance.c
+++ b/sys/dev/le/lance.c
@@ -394,7 +394,7 @@ lance_get(struct lance_softc *sc, int boff, int totlen)
return (NULL);
}
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
if (m0 == NULL)
return (NULL);
m0->m_pkthdr.rcvif = ifp;
@@ -404,7 +404,7 @@ lance_get(struct lance_softc *sc, int boff, int totlen)
while (totlen > 0) {
if (totlen >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0)
goto bad;
len = MCLBYTES;
@@ -423,7 +423,7 @@ lance_get(struct lance_softc *sc, int boff, int totlen)
totlen -= len;
if (totlen > 0) {
- MGET(newm, M_DONTWAIT, MT_DATA);
+ MGET(newm, M_NOWAIT, MT_DATA);
if (newm == 0)
goto bad;
len = MLEN;
diff --git a/sys/dev/lge/if_lge.c b/sys/dev/lge/if_lge.c
index 09ceea1..d994867 100644
--- a/sys/dev/lge/if_lge.c
+++ b/sys/dev/lge/if_lge.c
@@ -691,7 +691,7 @@ lge_newbuf(sc, c, m)
caddr_t *buf = NULL;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
device_printf(sc->lge_dev, "no memory for rx list "
"-- packet dropped!\n");
diff --git a/sys/dev/lmc/if_lmc.c b/sys/dev/lmc/if_lmc.c
index 62f6017..9d1ec8c 100644
--- a/sys/dev/lmc/if_lmc.c
+++ b/sys/dev/lmc/if_lmc.c
@@ -2916,7 +2916,7 @@ rxintr_cleanup(softc_t *sc)
/* Optimization: copy a small pkt into a small mbuf. */
if (first_mbuf->m_pkthdr.len <= COPY_BREAK)
{
- MGETHDR(new_mbuf, M_DONTWAIT, MT_DATA);
+ MGETHDR(new_mbuf, M_NOWAIT, MT_DATA);
if (new_mbuf != NULL)
{
new_mbuf->m_pkthdr.rcvif = first_mbuf->m_pkthdr.rcvif;
@@ -3016,7 +3016,7 @@ rxintr_setup(softc_t *sc)
return 0; /* ring is full; nothing to do */
/* Allocate a small mbuf and attach an mbuf cluster. */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
{
sc->status.cntrs.rxdma++;
@@ -3024,7 +3024,7 @@ rxintr_setup(softc_t *sc)
printf("%s: rxintr_setup: MGETHDR() failed\n", NAME_UNIT);
return 0;
}
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0)
{
m_freem(m);
diff --git a/sys/dev/malo/if_malo.c b/sys/dev/malo/if_malo.c
index 7305d12..9f298de 100644
--- a/sys/dev/malo/if_malo.c
+++ b/sys/dev/malo/if_malo.c
@@ -854,7 +854,7 @@ malo_tx_dmasetup(struct malo_softc *sc, struct malo_txbuf *bf, struct mbuf *m0)
*/
if (error == EFBIG) { /* too many desc's, linearize */
sc->malo_stats.mst_tx_linear++;
- m = m_defrag(m0, M_DONTWAIT);
+ m = m_defrag(m0, M_NOWAIT);
if (m == NULL) {
m_freem(m0);
sc->malo_stats.mst_tx_nombuf++;
@@ -1396,7 +1396,7 @@ malo_getrxmbuf(struct malo_softc *sc, struct malo_rxbuf *bf)
int error;
/* XXX don't need mbuf, just dma buffer */
- m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE);
+ m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE);
if (m == NULL) {
sc->malo_stats.mst_rx_nombuf++; /* XXX */
return NULL;
diff --git a/sys/dev/mge/if_mge.c b/sys/dev/mge/if_mge.c
index a76fee4..3195b23 100644
--- a/sys/dev/mge/if_mge.c
+++ b/sys/dev/mge/if_mge.c
@@ -389,7 +389,7 @@ mge_new_rxbuf(bus_dma_tag_t tag, bus_dmamap_t map, struct mbuf **mbufp,
KASSERT(mbufp != NULL, ("NULL mbuf pointer!"));
- new_mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ new_mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (new_mbuf == NULL)
return (ENOBUFS);
new_mbuf->m_len = new_mbuf->m_pkthdr.len = new_mbuf->m_ext.ext_size;
@@ -1549,7 +1549,7 @@ mge_start_locked(struct ifnet *ifp)
if (m0 == NULL)
break;
- mtmp = m_defrag(m0, M_DONTWAIT);
+ mtmp = m_defrag(m0, M_NOWAIT);
if (mtmp)
m0 = mtmp;
diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c
index 3dd20ff..be4276c 100644
--- a/sys/dev/mii/brgphy.c
+++ b/sys/dev/mii/brgphy.c
@@ -204,6 +204,13 @@ brgphy_attach(device_t dev)
&brgphy_funcs, 0);
bsc->serdes_flags = 0;
+ ifp = sc->mii_pdata->mii_ifp;
+
+ /* Find the MAC driver associated with this PHY. */
+ if (strcmp(ifp->if_dname, "bge") == 0)
+ bge_sc = ifp->if_softc;
+ else if (strcmp(ifp->if_dname, "bce") == 0)
+ bce_sc = ifp->if_softc;
/* Handle any special cases based on the PHY ID */
switch (sc->mii_mpd_oui) {
@@ -235,22 +242,21 @@ brgphy_attach(device_t dev)
sc->mii_flags |= MIIF_HAVEFIBER;
break;
case MII_MODEL_BROADCOM2_BCM5709S:
- bsc->serdes_flags |= BRGPHY_5709S;
+ /*
+ * XXX
+ * 5720S and 5709S shares the same PHY id.
+ * Assume 5720S PHY if parent device is bge(4).
+ */
+ if (bge_sc != NULL)
+ bsc->serdes_flags |= BRGPHY_5708S;
+ else
+ bsc->serdes_flags |= BRGPHY_5709S;
sc->mii_flags |= MIIF_HAVEFIBER;
break;
}
break;
}
- ifp = sc->mii_pdata->mii_ifp;
-
- /* Find the MAC driver associated with this PHY. */
- if (strcmp(ifp->if_dname, "bge") == 0) {
- bge_sc = ifp->if_softc;
- } else if (strcmp(ifp->if_dname, "bce") == 0) {
- bce_sc = ifp->if_softc;
- }
-
PHY_RESET(sc);
/* Read the PHY's capabilities. */
@@ -608,6 +614,11 @@ brgphy_mii_phy_auto(struct mii_softc *sc, int media)
(sc->mii_flags & MIIF_FORCEPAUSE) != 0)
anar |= BRGPHY_ANAR_PC | BRGPHY_ANAR_ASP;
PHY_WRITE(sc, BRGPHY_MII_ANAR, anar);
+ ktcr = BRGPHY_1000CTL_AFD | BRGPHY_1000CTL_AHD;
+ if (sc->mii_mpd_model == MII_MODEL_BROADCOM_BCM5701)
+ ktcr |= BRGPHY_1000CTL_MSE | BRGPHY_1000CTL_MSC;
+ PHY_WRITE(sc, BRGPHY_MII_1000CTL, ktcr);
+ PHY_READ(sc, BRGPHY_MII_1000CTL);
} else {
anar = BRGPHY_SERDES_ANAR_FDX | BRGPHY_SERDES_ANAR_HDX;
if ((media & IFM_FLOW) != 0 ||
@@ -616,12 +627,6 @@ brgphy_mii_phy_auto(struct mii_softc *sc, int media)
PHY_WRITE(sc, BRGPHY_SERDES_ANAR, anar);
}
- ktcr = BRGPHY_1000CTL_AFD | BRGPHY_1000CTL_AHD;
- if (sc->mii_mpd_model == MII_MODEL_BROADCOM_BCM5701)
- ktcr |= BRGPHY_1000CTL_MSE | BRGPHY_1000CTL_MSC;
- PHY_WRITE(sc, BRGPHY_MII_1000CTL, ktcr);
- ktcr = PHY_READ(sc, BRGPHY_MII_1000CTL);
-
PHY_WRITE(sc, BRGPHY_MII_BMCR, BRGPHY_BMCR_AUTOEN |
BRGPHY_BMCR_STARTNEG);
PHY_WRITE(sc, BRGPHY_MII_IMR, 0xFF00);
diff --git a/sys/dev/mii/miidevs b/sys/dev/mii/miidevs
index 3ccaf37..4220906 100644
--- a/sys/dev/mii/miidevs
+++ b/sys/dev/mii/miidevs
@@ -180,7 +180,7 @@ model BROADCOM2 BCM5722 0x002d BCM5722 1000BASE-T media interface
model BROADCOM2 BCM5784 0x003a BCM5784 10/100/1000baseT PHY
model BROADCOM2 BCM5709C 0x003c BCM5709 10/100/1000baseT PHY
model BROADCOM2 BCM5761 0x003d BCM5761 10/100/1000baseT PHY
-model BROADCOM2 BCM5709S 0x003f BCM5709S 1000/2500baseSX PHY
+model BROADCOM2 BCM5709S 0x003f BCM5709S/5720S 1000/2500baseSX PHY
model BROADCOM3 BCM57780 0x0019 BCM57780 1000BASE-T media interface
model BROADCOM3 BCM5717C 0x0020 BCM5717C 1000BASE-T media interface
model BROADCOM3 BCM5719C 0x0022 BCM5719C 1000BASE-T media interface
diff --git a/sys/dev/mn/if_mn.c b/sys/dev/mn/if_mn.c
index 07c2a98..48fc3dc 100644
--- a/sys/dev/mn/if_mn.c
+++ b/sys/dev/mn/if_mn.c
@@ -693,7 +693,7 @@ ngmn_connect(hook_p hook)
/* Setup a transmit chain with one descriptor */
/* XXX: we actually send a 1 byte packet */
dp = mn_alloc_desc();
- MGETHDR(m, M_WAIT, MT_DATA);
+ MGETHDR(m, M_WAITOK, MT_DATA);
m->m_pkthdr.len = 0;
dp->m = m;
dp->flags = 0xc0000000 + (1 << 16);
@@ -708,8 +708,8 @@ ngmn_connect(hook_p hook)
dp = mn_alloc_desc();
m = NULL;
- MGETHDR(m, M_WAIT, MT_DATA);
- MCLGET(m, M_WAIT);
+ MGETHDR(m, M_WAITOK, MT_DATA);
+ MCLGET(m, M_WAITOK);
dp->m = m;
dp->data = vtophys(m->m_data);
dp->flags = 0x40000000;
@@ -722,8 +722,8 @@ ngmn_connect(hook_p hook)
dp2 = dp;
dp = mn_alloc_desc();
m = NULL;
- MGETHDR(m, M_WAIT, MT_DATA);
- MCLGET(m, M_WAIT);
+ MGETHDR(m, M_WAITOK, MT_DATA);
+ MCLGET(m, M_WAITOK);
dp->m = m;
dp->data = vtophys(m->m_data);
dp->flags = 0x00000000;
@@ -1160,12 +1160,12 @@ mn_rx_intr(struct mn_softc *sc, u_int32_t vector)
/* Replenish desc + mbuf supplies */
if (!m) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
mn_free_desc(dp);
return; /* ENOBUFS */
}
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if((m->m_flags & M_EXT) == 0) {
mn_free_desc(dp);
m_freem(m);
diff --git a/sys/dev/msk/if_msk.c b/sys/dev/msk/if_msk.c
index 93292e5..d0ca808 100644
--- a/sys/dev/msk/if_msk.c
+++ b/sys/dev/msk/if_msk.c
@@ -897,7 +897,7 @@ msk_newbuf(struct msk_if_softc *sc_if, int idx)
bus_dmamap_t map;
int nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
@@ -955,7 +955,7 @@ msk_jumbo_newbuf(struct msk_if_softc *sc_if, int idx)
bus_dmamap_t map;
int nsegs;
- m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES);
+ m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES);
if (m == NULL)
return (ENOBUFS);
if ((m->m_flags & M_EXT) == 0) {
@@ -2653,7 +2653,7 @@ msk_encap(struct msk_if_softc *sc_if, struct mbuf **m_head)
if (M_WRITABLE(m) == 0) {
/* Get a writable copy. */
- m = m_dup(*m_head, M_DONTWAIT);
+ m = m_dup(*m_head, M_NOWAIT);
m_freem(*m_head);
if (m == NULL) {
*m_head = NULL;
@@ -2732,7 +2732,7 @@ msk_encap(struct msk_if_softc *sc_if, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc_if->msk_cdata.msk_tx_tag, map,
*m_head, txsegs, &nseg, BUS_DMA_NOWAIT);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, MSK_MAXTXSEGS);
+ m = m_collapse(*m_head, M_NOWAIT, MSK_MAXTXSEGS);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c
index 79393c8..1d2b6e3 100644
--- a/sys/dev/mwl/if_mwl.c
+++ b/sys/dev/mwl/if_mwl.c
@@ -2810,7 +2810,7 @@ mwl_rx_proc(void *arg, int npending)
* be a net loss. The tradeoff might be system
* dependent (cache architecture is important).
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
DPRINTF(sc, MWL_DEBUG_ANY,
"%s: no rx mbuf\n", __func__);
@@ -3087,9 +3087,9 @@ mwl_tx_dmasetup(struct mwl_softc *sc, struct mwl_txbuf *bf, struct mbuf *m0)
if (error == EFBIG) { /* too many desc's, linearize */
sc->sc_stats.mst_tx_linear++;
#if MWL_TXDESC > 1
- m = m_collapse(m0, M_DONTWAIT, MWL_TXDESC);
+ m = m_collapse(m0, M_NOWAIT, MWL_TXDESC);
#else
- m = m_defrag(m0, M_DONTWAIT);
+ m = m_defrag(m0, M_NOWAIT);
#endif
if (m == NULL) {
m_freem(m0);
diff --git a/sys/dev/mxge/if_mxge.c b/sys/dev/mxge/if_mxge.c
index c8dea6b..c04e0df2 100644
--- a/sys/dev/mxge/if_mxge.c
+++ b/sys/dev/mxge/if_mxge.c
@@ -2004,7 +2004,7 @@ mxge_vlan_tag_insert(struct mbuf *m)
{
struct ether_vlan_header *evl;
- M_PREPEND(m, ETHER_VLAN_ENCAP_LEN, M_DONTWAIT);
+ M_PREPEND(m, ETHER_VLAN_ENCAP_LEN, M_NOWAIT);
if (__predict_false(m == NULL))
return NULL;
if (m->m_len < sizeof(*evl)) {
@@ -2376,7 +2376,7 @@ mxge_get_buf_small(struct mxge_slice_state *ss, bus_dmamap_t map, int idx)
mxge_rx_ring_t *rx = &ss->rx_small;
int cnt, err;
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL) {
rx->alloc_fail++;
err = ENOBUFS;
@@ -2409,7 +2409,7 @@ mxge_get_buf_big(struct mxge_slice_state *ss, bus_dmamap_t map, int idx)
mxge_rx_ring_t *rx = &ss->rx_big;
int cnt, err, i;
- m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, rx->cl_size);
+ m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, rx->cl_size);
if (m == NULL) {
rx->alloc_fail++;
err = ENOBUFS;
diff --git a/sys/dev/my/if_my.c b/sys/dev/my/if_my.c
index c7c0ad4..9648412 100644
--- a/sys/dev/my/if_my.c
+++ b/sys/dev/my/if_my.c
@@ -1085,13 +1085,13 @@ my_newbuf(struct my_softc * sc, struct my_chain_onefrag * c)
struct mbuf *m_new = NULL;
MY_LOCK_ASSERT(sc);
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
device_printf(sc->my_dev,
"no memory for rx list -- packet dropped!\n");
return (ENOBUFS);
}
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
device_printf(sc->my_dev,
"no memory for rx list -- packet dropped!\n");
@@ -1352,13 +1352,13 @@ my_encap(struct my_softc * sc, struct my_chain * c, struct mbuf * m_head)
* chain.
*/
m = m_head;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
device_printf(sc->my_dev, "no memory for tx list");
return (1);
}
if (m_head->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
device_printf(sc->my_dev, "no memory for tx list");
diff --git a/sys/dev/netmap/ixgbe_netmap.h b/sys/dev/netmap/ixgbe_netmap.h
index 63e834b..55bd21f 100644
--- a/sys/dev/netmap/ixgbe_netmap.h
+++ b/sys/dev/netmap/ixgbe_netmap.h
@@ -503,8 +503,8 @@ ixgbe_netmap_rxsync(struct ifnet *ifp, u_int ring_nr, int do_lock)
ring->slot[j].len = le16toh(curr->wb.upper.length) - crclen;
if (ix_write_len)
D("rx[%d] len %d", j, ring->slot[j].len);
- bus_dmamap_sync(rxr->tag,
- rxr->rx_buffers[l].map, BUS_DMASYNC_POSTREAD);
+ bus_dmamap_sync(rxr->ptag,
+ rxr->rx_buffers[l].pmap, BUS_DMASYNC_POSTREAD);
j = (j == lim) ? 0 : j + 1;
l = (l == lim) ? 0 : l + 1;
}
@@ -556,12 +556,12 @@ ixgbe_netmap_rxsync(struct ifnet *ifp, u_int ring_nr, int do_lock)
goto ring_reset;
if (slot->flags & NS_BUF_CHANGED) {
- netmap_reload_map(rxr->tag, rxbuf->map, addr);
+ netmap_reload_map(rxr->ptag, rxbuf->pmap, addr);
slot->flags &= ~NS_BUF_CHANGED;
}
curr->wb.upper.status_error = 0;
curr->read.pkt_addr = htole64(paddr);
- bus_dmamap_sync(rxr->tag, rxbuf->map,
+ bus_dmamap_sync(rxr->ptag, rxbuf->pmap,
BUS_DMASYNC_PREREAD);
j = (j == lim) ? 0 : j + 1;
l = (l == lim) ? 0 : l + 1;
diff --git a/sys/dev/nfe/if_nfe.c b/sys/dev/nfe/if_nfe.c
index fe072f3..13099e9 100644
--- a/sys/dev/nfe/if_nfe.c
+++ b/sys/dev/nfe/if_nfe.c
@@ -1975,7 +1975,7 @@ nfe_newbuf(struct nfe_softc *sc, int idx)
bus_dmamap_t map;
int nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
@@ -2031,7 +2031,7 @@ nfe_jnewbuf(struct nfe_softc *sc, int idx)
bus_dmamap_t map;
int nsegs;
- m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES);
+ m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES);
if (m == NULL)
return (ENOBUFS);
if ((m->m_flags & M_EXT) == 0) {
@@ -2400,7 +2400,7 @@ nfe_encap(struct nfe_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->txq.tx_data_tag, map, *m_head, segs,
&nsegs, BUS_DMA_NOWAIT);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, NFE_MAX_SCATTER);
+ m = m_collapse(*m_head, M_NOWAIT, NFE_MAX_SCATTER);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/dev/nge/if_nge.c b/sys/dev/nge/if_nge.c
index 7cf3eea..6f680c3 100644
--- a/sys/dev/nge/if_nge.c
+++ b/sys/dev/nge/if_nge.c
@@ -1381,7 +1381,7 @@ nge_newbuf(struct nge_softc *sc, int idx)
bus_dmamap_t map;
int nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES;
@@ -1894,7 +1894,7 @@ nge_encap(struct nge_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->nge_cdata.nge_tx_tag, map,
*m_head, txsegs, &nsegs, BUS_DMA_NOWAIT);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, NGE_MAXTXSEGS);
+ m = m_collapse(*m_head, M_NOWAIT, NGE_MAXTXSEGS);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/dev/nve/if_nve.c b/sys/dev/nve/if_nve.c
index fe26666..839cfb6 100644
--- a/sys/dev/nve/if_nve.c
+++ b/sys/dev/nve/if_nve.c
@@ -764,7 +764,7 @@ nve_init_rings(struct nve_softc *sc)
struct nve_rx_desc *desc = sc->rx_desc + i;
struct nve_map_buffer *buf = &desc->buf;
- buf->mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ buf->mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (buf->mbuf == NULL) {
device_printf(sc->dev, "couldn't allocate mbuf\n");
nve_free_rings(sc);
@@ -918,7 +918,7 @@ nve_ifstart_locked(struct ifnet *ifp)
* cluster
*/
if (error) {
- m = m_defrag(m0, M_DONTWAIT);
+ m = m_defrag(m0, M_NOWAIT);
if (m == NULL) {
m_freem(m0);
sc->tx_errors++;
@@ -1480,7 +1480,7 @@ nve_osallocrxbuf(PNV_VOID ctx, PMEMORY_BLOCK mem, PNV_VOID *id)
buf = &desc->buf;
if (buf->mbuf == NULL) {
- buf->mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ buf->mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (buf->mbuf == NULL) {
device_printf(sc->dev, "failed to allocate memory\n");
goto fail;
diff --git a/sys/dev/nvme/nvme.c b/sys/dev/nvme/nvme.c
index c050a62..ed5dbdb 100644
--- a/sys/dev/nvme/nvme.c
+++ b/sys/dev/nvme/nvme.c
@@ -53,6 +53,7 @@ MALLOC_DEFINE(M_NVME, "nvme", "nvme(4) memory allocations");
static int nvme_probe(device_t);
static int nvme_attach(device_t);
static int nvme_detach(device_t);
+static int nvme_modevent(module_t mod, int type, void *arg);
static devclass_t nvme_devclass;
@@ -70,7 +71,7 @@ static driver_t nvme_pci_driver = {
sizeof(struct nvme_controller),
};
-DRIVER_MODULE(nvme, pci, nvme_pci_driver, nvme_devclass, 0, 0);
+DRIVER_MODULE(nvme, pci, nvme_pci_driver, nvme_devclass, nvme_modevent, 0);
MODULE_VERSION(nvme, 1);
static struct _pcsid
@@ -80,7 +81,8 @@ static struct _pcsid
} pci_ids[] = {
{ 0x01118086, "NVMe Controller" },
{ CHATHAM_PCI_ID, "Chatham Prototype NVMe Controller" },
- { IDT_PCI_ID, "IDT NVMe Controller" },
+ { IDT32_PCI_ID, "IDT NVMe Controller (32 channel)" },
+ { IDT8_PCI_ID, "IDT NVMe Controller (8 channel)" },
{ 0x00000000, NULL }
};
@@ -195,14 +197,6 @@ nvme_modevent(module_t mod, int type, void *arg)
return (0);
}
-moduledata_t nvme_mod = {
- "nvme",
- (modeventhand_t)nvme_modevent,
- 0
-};
-
-DECLARE_MODULE(nvme, nvme_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);
-
void
nvme_dump_command(struct nvme_command *cmd)
{
@@ -297,11 +291,6 @@ nvme_detach (device_t dev)
struct nvme_namespace *ns;
int i;
- if (ctrlr->taskqueue) {
- taskqueue_drain(ctrlr->taskqueue, &ctrlr->task);
- taskqueue_free(ctrlr->taskqueue);
- }
-
for (i = 0; i < NVME_MAX_NAMESPACES; i++) {
ns = &ctrlr->ns[i];
if (ns->cdev)
@@ -324,6 +313,11 @@ nvme_detach (device_t dev)
ctrlr->resource_id, ctrlr->resource);
}
+ if (ctrlr->bar4_resource != NULL) {
+ bus_release_resource(dev, SYS_RES_MEMORY,
+ ctrlr->bar4_resource_id, ctrlr->bar4_resource);
+ }
+
#ifdef CHATHAM2
if (ctrlr->chatham_resource != NULL) {
bus_release_resource(dev, SYS_RES_MEMORY,
diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c
index 94987e2..1ddf9cc 100644
--- a/sys/dev/nvme/nvme_ctrlr.c
+++ b/sys/dev/nvme/nvme_ctrlr.c
@@ -78,6 +78,17 @@ nvme_ctrlr_allocate_bar(struct nvme_controller *ctrlr)
ctrlr->bus_handle = rman_get_bushandle(ctrlr->resource);
ctrlr->regs = (struct nvme_registers *)ctrlr->bus_handle;
+ /*
+ * The NVMe spec allows for the MSI-X table to be placed behind
+ * BAR 4/5, separate from the control/doorbell registers. Always
+ * try to map this bar, because it must be mapped prior to calling
+ * pci_alloc_msix(). If the table isn't behind BAR 4/5,
+ * bus_alloc_resource() will just return NULL which is OK.
+ */
+ ctrlr->bar4_resource_id = PCIR_BAR(4);
+ ctrlr->bar4_resource = bus_alloc_resource(ctrlr->dev, SYS_RES_MEMORY,
+ &ctrlr->bar4_resource_id, 0, ~0, 1, RF_ACTIVE);
+
return (0);
}
@@ -619,10 +630,12 @@ err:
}
static void
-nvme_ctrlr_intx_task(void *arg, int pending)
+nvme_ctrlr_intx_handler(void *arg)
{
struct nvme_controller *ctrlr = arg;
+ nvme_mmio_write_4(ctrlr, intms, 1);
+
nvme_qpair_process_completions(&ctrlr->adminq);
if (ctrlr->ioq[0].cpl)
@@ -631,15 +644,6 @@ nvme_ctrlr_intx_task(void *arg, int pending)
nvme_mmio_write_4(ctrlr, intmc, 1);
}
-static void
-nvme_ctrlr_intx_handler(void *arg)
-{
- struct nvme_controller *ctrlr = arg;
-
- nvme_mmio_write_4(ctrlr, intms, 1);
- taskqueue_enqueue_fast(ctrlr->taskqueue, &ctrlr->task);
-}
-
static int
nvme_ctrlr_configure_intx(struct nvme_controller *ctrlr)
{
@@ -665,12 +669,6 @@ nvme_ctrlr_configure_intx(struct nvme_controller *ctrlr)
return (ENOMEM);
}
- TASK_INIT(&ctrlr->task, 0, nvme_ctrlr_intx_task, ctrlr);
- ctrlr->taskqueue = taskqueue_create_fast("nvme_taskq", M_NOWAIT,
- taskqueue_thread_enqueue, &ctrlr->taskqueue);
- taskqueue_start_threads(&ctrlr->taskqueue, 1, PI_NET,
- "%s intx taskq", device_get_nameunit(ctrlr->dev));
-
return (0);
}
diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h
index 4f57f7c..a74b876 100644
--- a/sys/dev/nvme/nvme_private.h
+++ b/sys/dev/nvme/nvme_private.h
@@ -36,7 +36,6 @@
#include <sys/mutex.h>
#include <sys/rman.h>
#include <sys/systm.h>
-#include <sys/taskqueue.h>
#include <vm/uma.h>
@@ -55,7 +54,8 @@ MALLOC_DECLARE(M_NVME);
#define CHATHAM_CONTROL_BAR 0
#endif
-#define IDT_PCI_ID 0x80d0111d
+#define IDT32_PCI_ID 0x80d0111d /* 32 channel board */
+#define IDT8_PCI_ID 0x80d2111d /* 8 channel board */
#define NVME_MAX_PRP_LIST_ENTRIES (32)
@@ -199,6 +199,14 @@ struct nvme_controller {
int resource_id;
struct resource *resource;
+ /*
+ * The NVMe spec allows for the MSI-X table to be placed in BAR 4/5,
+ * separate from the control registers which are in BAR 0/1. These
+ * members track the mapping of BAR 4/5 for that reason.
+ */
+ int bar4_resource_id;
+ struct resource *bar4_resource;
+
#ifdef CHATHAM2
bus_space_tag_t chatham_bus_tag;
bus_space_handle_t chatham_bus_handle;
@@ -221,8 +229,6 @@ struct nvme_controller {
int rid;
struct resource *res;
void *tag;
- struct task task;
- struct taskqueue *taskqueue;
bus_dma_tag_t hw_desc_tag;
bus_dmamap_t hw_desc_map;
diff --git a/sys/dev/nvme/nvme_test.c b/sys/dev/nvme/nvme_test.c
index 4177227..3d04ea5 100644
--- a/sys/dev/nvme/nvme_test.c
+++ b/sys/dev/nvme/nvme_test.c
@@ -287,10 +287,10 @@ nvme_ns_test(struct nvme_namespace *ns, u_long cmd, caddr_t arg)
for (i = 0; i < io_test->num_threads; i++)
#if __FreeBSD_version >= 800004
kthread_add(fn, io_test_internal,
- NULL, NULL, 0, 0, "nvme_io_test[%d]", i);
+ curproc, NULL, 0, 0, "nvme_io_test[%d]", i);
#else
kthread_create(fn, io_test_internal,
- NULL, 0, 0, "nvme_io_test[%d]", i);
+ curproc, 0, 0, "nvme_io_test[%d]", i);
#endif
tsleep(io_test_internal, 0, "nvme_test", io_test->time * 2 * hz);
diff --git a/sys/dev/nxge/if_nxge.c b/sys/dev/nxge/if_nxge.c
index 8c3ca5d..c7dbeb6 100644
--- a/sys/dev/nxge/if_nxge.c
+++ b/sys/dev/nxge/if_nxge.c
@@ -3024,7 +3024,7 @@ xge_send_locked(struct ifnet *ifnetp, int qindex)
}
if(count >= max_fragments) {
- m_buf = m_defrag(m_head, M_DONTWAIT);
+ m_buf = m_defrag(m_head, M_NOWAIT);
if(m_buf != NULL) m_head = m_buf;
XGE_DRV_STATS(tx_defrag);
}
@@ -3132,7 +3132,7 @@ xge_get_buf(xge_hal_dtr_h dtrh, xge_rx_priv_t *rxd_priv,
if(buffer_size <= MCLBYTES) {
cluster_size = MCLBYTES;
- mp = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ mp = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
}
else {
cluster_size = MJUMPAGESIZE;
@@ -3140,7 +3140,7 @@ xge_get_buf(xge_hal_dtr_h dtrh, xge_rx_priv_t *rxd_priv,
(buffer_size > MJUMPAGESIZE)) {
cluster_size = MJUM9BYTES;
}
- mp = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, cluster_size);
+ mp = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, cluster_size);
}
if(!mp) {
xge_trace(XGE_ERR, "Out of memory to allocate mbuf");
diff --git a/sys/dev/oce/oce_if.c b/sys/dev/oce/oce_if.c
index 79ba410..7d15fcc 100644
--- a/sys/dev/oce/oce_if.c
+++ b/sys/dev/oce/oce_if.c
@@ -902,7 +902,7 @@ retry:
} else if (rc == EFBIG) {
if (retry_cnt == 0) {
- m_temp = m_defrag(m, M_DONTWAIT);
+ m_temp = m_defrag(m, M_NOWAIT);
if (m_temp == NULL)
goto free_ret;
m = m_temp;
@@ -995,7 +995,7 @@ oce_tso_setup(POCE_SOFTC sc, struct mbuf **mpp)
m = *mpp;
if (M_WRITABLE(m) == 0) {
- m = m_dup(*mpp, M_DONTWAIT);
+ m = m_dup(*mpp, M_NOWAIT);
if (!m)
return NULL;
m_freem(*mpp);
@@ -1481,7 +1481,7 @@ oce_alloc_rx_bufs(struct oce_rq *rq, int count)
break; /* no more room */
pd = &rq->pckts[rq->packets_in];
- pd->mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ pd->mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (pd->mbuf == NULL)
break;
diff --git a/sys/dev/patm/if_patm_intr.c b/sys/dev/patm/if_patm_intr.c
index 79cb248..12ef995 100644
--- a/sys/dev/patm/if_patm_intr.c
+++ b/sys/dev/patm/if_patm_intr.c
@@ -324,7 +324,7 @@ patm_lmbuf_alloc(struct patm_softc *sc)
struct mbuf *m;
struct lmbuf *b;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (NULL);
m->m_data += LMBUF_OFFSET;
diff --git a/sys/dev/patm/if_patm_rx.c b/sys/dev/patm/if_patm_rx.c
index 024d8ef..f739b9c 100644
--- a/sys/dev/patm/if_patm_rx.c
+++ b/sys/dev/patm/if_patm_rx.c
@@ -396,9 +396,9 @@ patm_rcv_mbuf(struct patm_softc *sc, void *buf, u_int h, int hdr)
return ((struct mbuf *)buf);
if (hdr)
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
else
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
patm_rcv_free(sc, buf, h);
return (NULL);
@@ -458,7 +458,7 @@ patm_rx_raw(struct patm_softc *sc, u_char *cell)
}
}
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
sc->stats.raw_no_buf++;
return;
diff --git a/sys/dev/patm/if_patm_tx.c b/sys/dev/patm/if_patm_tx.c
index cb40aa5..81a1efc 100644
--- a/sys/dev/patm/if_patm_tx.c
+++ b/sys/dev/patm/if_patm_tx.c
@@ -438,7 +438,7 @@ patm_tx_pad(struct patm_softc *sc, struct mbuf *m0)
return (m0);
}
}
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == 0) {
m_freem(m0);
sc->ifp->if_oerrors++;
@@ -532,7 +532,7 @@ patm_launch(struct patm_softc *sc, struct patm_scd *scd)
error = bus_dmamap_load_mbuf(sc->tx_tag, map->map, m,
patm_load_txbuf, &a, BUS_DMA_NOWAIT);
if (error == EFBIG) {
- if ((m = m_defrag(m, M_DONTWAIT)) == NULL) {
+ if ((m = m_defrag(m, M_NOWAIT)) == NULL) {
sc->ifp->if_oerrors++;
continue;
}
diff --git a/sys/dev/pci/pci_user.c b/sys/dev/pci/pci_user.c
index b8756a6..a5b58c3 100644
--- a/sys/dev/pci/pci_user.c
+++ b/sys/dev/pci/pci_user.c
@@ -425,12 +425,12 @@ pci_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *t
#ifdef COMPAT_FREEBSD32
struct pci_conf_io32 *cio32 = NULL;
struct pci_conf_old32 conf_old32;
- struct pci_match_conf_old32 *pattern_buf_old32;
+ struct pci_match_conf_old32 *pattern_buf_old32 = NULL;
#endif
struct pci_conf_old conf_old;
struct pci_io iodata;
struct pci_io_old *io_old;
- struct pci_match_conf_old *pattern_buf_old;
+ struct pci_match_conf_old *pattern_buf_old = NULL;
io_old = NULL;
@@ -470,10 +470,8 @@ pci_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *t
#ifdef PRE7_COMPAT
#ifdef COMPAT_FREEBSD32
case PCIOCGETCONF_OLD32:
- pattern_buf_old32 = NULL;
#endif
case PCIOCGETCONF_OLD:
- pattern_buf_old = NULL;
#endif
case PCIOCGETCONF:
diff --git a/sys/dev/pcn/if_pcn.c b/sys/dev/pcn/if_pcn.c
index 4aaabc0..a9cff3c 100644
--- a/sys/dev/pcn/if_pcn.c
+++ b/sys/dev/pcn/if_pcn.c
@@ -798,11 +798,11 @@ pcn_newbuf(sc, idx, m)
c = &sc->pcn_ldata->pcn_rx_list[idx];
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
diff --git a/sys/dev/pdq/pdq_freebsd.h b/sys/dev/pdq/pdq_freebsd.h
index 6efd684..02bb9ca 100644
--- a/sys/dev/pdq/pdq_freebsd.h
+++ b/sys/dev/pdq/pdq_freebsd.h
@@ -187,9 +187,9 @@ typedef struct _pdq_os_ctx_t {
#define PDQ_OS_DATABUF_ALLOC(pdq, b) do { \
PDQ_OS_DATABUF_T *x_m0; \
- MGETHDR(x_m0, M_DONTWAIT, MT_DATA); \
+ MGETHDR(x_m0, M_NOWAIT, MT_DATA); \
if (x_m0 != NULL) { \
- MCLGET(x_m0, M_DONTWAIT); \
+ MCLGET(x_m0, M_NOWAIT); \
if ((x_m0->m_flags & M_EXT) == 0) { \
m_free(x_m0); \
(b) = NULL; \
diff --git a/sys/dev/pdq/pdq_ifsubr.c b/sys/dev/pdq/pdq_ifsubr.c
index 4df0082..00e42b0 100644
--- a/sys/dev/pdq/pdq_ifsubr.c
+++ b/sys/dev/pdq/pdq_ifsubr.c
@@ -742,12 +742,12 @@ pdq_os_databuf_alloc(
struct mbuf *m;
bus_dmamap_t map;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
printf("%s: can't alloc small buf\n", sc->sc_dev.dv_xname);
return NULL;
}
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
printf("%s: can't alloc cluster\n", sc->sc_dev.dv_xname);
m_free(m);
diff --git a/sys/dev/pdq/pdqvar.h b/sys/dev/pdq/pdqvar.h
index d978809..7eb6324 100644
--- a/sys/dev/pdq/pdqvar.h
+++ b/sys/dev/pdq/pdqvar.h
@@ -214,9 +214,9 @@ typedef struct mbuf PDQ_OS_DATABUF_T;
#ifndef PDQ_OS_DATABUF_ALLOC
#define PDQ_OS_DATABUF_ALLOC(pdq, b) do { \
PDQ_OS_DATABUF_T *x_m0; \
- MGETHDR(x_m0, M_DONTWAIT, MT_DATA); \
+ MGETHDR(x_m0, M_NOWAIT, MT_DATA); \
if (x_m0 != NULL) { \
- MCLGET(x_m0, M_DONTWAIT); \
+ MCLGET(x_m0, M_NOWAIT); \
if ((x_m0->m_flags & M_EXT) == 0) { \
m_free(x_m0); \
(b) = NULL; \
diff --git a/sys/dev/qlxgb/qla_os.c b/sys/dev/qlxgb/qla_os.c
index 546a81a..b22fa9f 100644
--- a/sys/dev/qlxgb/qla_os.c
+++ b/sys/dev/qlxgb/qla_os.c
@@ -1063,7 +1063,7 @@ qla_send(qla_host_t *ha, struct mbuf **m_headp)
QL_DPRINT8((ha->pci_dev, "%s: EFBIG [%d]\n", __func__,
m_head->m_pkthdr.len));
- m = m_defrag(m_head, M_DONTWAIT);
+ m = m_defrag(m_head, M_NOWAIT);
if (m == NULL) {
ha->err_tx_defrag++;
m_freem(m_head);
@@ -1405,7 +1405,7 @@ qla_get_mbuf(qla_host_t *ha, qla_rx_buf_t *rxb, struct mbuf *nmp,
if (mp == NULL) {
if (!jumbo) {
- mp = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ mp = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (mp == NULL) {
ha->err_m_getcl++;
@@ -1416,7 +1416,7 @@ qla_get_mbuf(qla_host_t *ha, qla_rx_buf_t *rxb, struct mbuf *nmp,
}
mp->m_len = mp->m_pkthdr.len = MCLBYTES;
} else {
- mp = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR,
+ mp = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR,
MJUM9BYTES);
if (mp == NULL) {
ha->err_m_getjcl++;
diff --git a/sys/dev/ral/rt2560.c b/sys/dev/ral/rt2560.c
index 9fdc157..c67f1f7 100644
--- a/sys/dev/ral/rt2560.c
+++ b/sys/dev/ral/rt2560.c
@@ -673,7 +673,7 @@ rt2560_alloc_rx_ring(struct rt2560_softc *sc, struct rt2560_rx_ring *ring,
goto fail;
}
- data->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ data->m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (data->m == NULL) {
device_printf(sc->sc_dev,
"could not allocate rx mbuf\n");
@@ -1160,7 +1160,7 @@ rt2560_decryption_intr(struct rt2560_softc *sc)
* mbuf. In the unlikely case that the old mbuf can't be
* reloaded either, explicitly panic.
*/
- mnew = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ mnew = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (mnew == NULL) {
ifp->if_ierrors++;
goto skip;
@@ -1844,7 +1844,7 @@ rt2560_tx_data(struct rt2560_softc *sc, struct mbuf *m0,
return error;
}
if (error != 0) {
- mnew = m_defrag(m0, M_DONTWAIT);
+ mnew = m_defrag(m0, M_NOWAIT);
if (mnew == NULL) {
device_printf(sc->sc_dev,
"could not defragment mbuf\n");
diff --git a/sys/dev/ral/rt2661.c b/sys/dev/ral/rt2661.c
index c4e8fe7..8ae2515 100644
--- a/sys/dev/ral/rt2661.c
+++ b/sys/dev/ral/rt2661.c
@@ -682,7 +682,7 @@ rt2661_alloc_rx_ring(struct rt2661_softc *sc, struct rt2661_rx_ring *ring,
goto fail;
}
- data->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ data->m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (data->m == NULL) {
device_printf(sc->sc_dev,
"could not allocate rx mbuf\n");
@@ -1030,7 +1030,7 @@ rt2661_rx_intr(struct rt2661_softc *sc)
* mbuf. In the unlikely case that the old mbuf can't be
* reloaded either, explicitly panic.
*/
- mnew = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ mnew = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (mnew == NULL) {
ifp->if_ierrors++;
goto skip;
@@ -1534,7 +1534,7 @@ rt2661_tx_data(struct rt2661_softc *sc, struct mbuf *m0,
return error;
}
if (error != 0) {
- mnew = m_defrag(m0, M_DONTWAIT);
+ mnew = m_defrag(m0, M_NOWAIT);
if (mnew == NULL) {
device_printf(sc->sc_dev,
"could not defragment mbuf\n");
diff --git a/sys/dev/ral/rt2860.c b/sys/dev/ral/rt2860.c
index 4a5aa25..4207d75 100644
--- a/sys/dev/ral/rt2860.c
+++ b/sys/dev/ral/rt2860.c
@@ -743,7 +743,7 @@ rt2860_alloc_rx_ring(struct rt2860_softc *sc, struct rt2860_rx_ring *ring)
goto fail;
}
- data->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ data->m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (data->m == NULL) {
device_printf(sc->sc_dev,
"could not allocate rx mbuf\n");
@@ -1237,7 +1237,7 @@ rt2860_rx_intr(struct rt2860_softc *sc)
}
#endif
- m1 = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m1 = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (__predict_false(m1 == NULL)) {
ifp->if_ierrors++;
goto skip;
@@ -1625,7 +1625,7 @@ rt2860_tx(struct rt2860_softc *sc, struct mbuf *m, struct ieee80211_node *ni)
}
}
if (__predict_false(error != 0)) {
- m1 = m_defrag(m, M_DONTWAIT);
+ m1 = m_defrag(m, M_NOWAIT);
if (m1 == NULL) {
device_printf(sc->sc_dev,
"could not defragment mbuf\n");
@@ -1877,7 +1877,7 @@ rt2860_tx_raw(struct rt2860_softc *sc, struct mbuf *m,
}
}
if (__predict_false(error != 0)) {
- m1 = m_defrag(m, M_DONTWAIT);
+ m1 = m_defrag(m, M_NOWAIT);
if (m1 == NULL) {
device_printf(sc->sc_dev,
"could not defragment mbuf\n");
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c
index 5f54318..9ec914a 100644
--- a/sys/dev/re/if_re.c
+++ b/sys/dev/re/if_re.c
@@ -758,7 +758,7 @@ re_diag(struct rl_softc *sc)
u_int8_t src[] = { 0x00, 'w', 'o', 'r', 'l', 'd' };
/* Allocate a single mbuf */
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
if (m0 == NULL)
return (ENOBUFS);
@@ -1886,7 +1886,7 @@ re_newbuf(struct rl_softc *sc, int idx)
uint32_t cmdstat;
int error, nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
@@ -1950,7 +1950,7 @@ re_jumbo_newbuf(struct rl_softc *sc, int idx)
uint32_t cmdstat;
int error, nsegs;
- m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES);
+ m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MJUM9BYTES;
@@ -2700,7 +2700,7 @@ re_encap(struct rl_softc *sc, struct mbuf **m_head)
padlen = RL_MIN_FRAMELEN - (*m_head)->m_pkthdr.len;
if (M_WRITABLE(*m_head) == 0) {
/* Get a writable copy. */
- m_new = m_dup(*m_head, M_DONTWAIT);
+ m_new = m_dup(*m_head, M_NOWAIT);
m_freem(*m_head);
if (m_new == NULL) {
*m_head = NULL;
@@ -2710,7 +2710,7 @@ re_encap(struct rl_softc *sc, struct mbuf **m_head)
}
if ((*m_head)->m_next != NULL ||
M_TRAILINGSPACE(*m_head) < padlen) {
- m_new = m_defrag(*m_head, M_DONTWAIT);
+ m_new = m_defrag(*m_head, M_NOWAIT);
if (m_new == NULL) {
m_freem(*m_head);
*m_head = NULL;
@@ -2734,7 +2734,7 @@ re_encap(struct rl_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->rl_ldata.rl_tx_mtag, txd->tx_dmamap,
*m_head, segs, &nsegs, BUS_DMA_NOWAIT);
if (error == EFBIG) {
- m_new = m_collapse(*m_head, M_DONTWAIT, RL_NTXSEGS);
+ m_new = m_collapse(*m_head, M_NOWAIT, RL_NTXSEGS);
if (m_new == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/dev/rt/if_rt.c b/sys/dev/rt/if_rt.c
index 6649782..ebbbba5 100644
--- a/sys/dev/rt/if_rt.c
+++ b/sys/dev/rt/if_rt.c
@@ -892,7 +892,7 @@ rt_tx_data(struct rt_softc *sc, struct mbuf *m, int qid)
"mbuf: ndmasegs=%d, len=%d, error=%d\n",
ndmasegs, m->m_pkthdr.len, error);
- m_d = m_collapse(m, M_DONTWAIT, 16);
+ m_d = m_collapse(m, M_NOWAIT, 16);
if (m_d == NULL) {
m_freem(m);
m = NULL;
@@ -1637,7 +1637,7 @@ rt_rx_eof(struct rt_softc *sc, int limit)
nframes++;
- mnew = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR,
+ mnew = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR,
MJUMPAGESIZE);
if (mnew == NULL) {
sc->rx_mbuf_alloc_errors++;
@@ -2009,7 +2009,7 @@ rt_alloc_rx_ring(struct rt_softc *sc, struct rt_softc_rx_ring *ring)
goto fail;
}
- data->m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR,
+ data->m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR,
MJUMPAGESIZE);
if (data->m == NULL) {
device_printf(sc->dev, "could not allocate Rx mbuf\n");
diff --git a/sys/dev/safe/safe.c b/sys/dev/safe/safe.c
index 6095aa3..396a93c 100644
--- a/sys/dev/safe/safe.c
+++ b/sys/dev/safe/safe.c
@@ -1325,15 +1325,15 @@ safe_process(device_t dev, struct cryptop *crp, int hint)
totlen = re->re_src_mapsize;
if (re->re_src_m->m_flags & M_PKTHDR) {
len = MHLEN;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m && !m_dup_pkthdr(m, re->re_src_m,
- M_DONTWAIT)) {
+ M_NOWAIT)) {
m_free(m);
m = NULL;
}
} else {
len = MLEN;
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
}
if (m == NULL) {
safestats.st_nombuf++;
@@ -1341,7 +1341,7 @@ safe_process(device_t dev, struct cryptop *crp, int hint)
goto errout;
}
if (totlen >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
safestats.st_nomcl++;
@@ -1357,7 +1357,7 @@ safe_process(device_t dev, struct cryptop *crp, int hint)
while (totlen > 0) {
if (top) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
m_freem(top);
safestats.st_nombuf++;
@@ -1368,7 +1368,7 @@ safe_process(device_t dev, struct cryptop *crp, int hint)
len = MLEN;
}
if (top && totlen >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
*mp = m;
m_freem(top);
diff --git a/sys/dev/sbni/if_sbni.c b/sys/dev/sbni/if_sbni.c
index 7ca46d3..dc1b6eb 100644
--- a/sys/dev/sbni/if_sbni.c
+++ b/sys/dev/sbni/if_sbni.c
@@ -863,7 +863,7 @@ get_rx_buf(struct sbni_softc *sc)
{
struct mbuf *m;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
if_printf(sc->ifp, "cannot allocate header mbuf\n");
return (0);
@@ -877,7 +877,7 @@ get_rx_buf(struct sbni_softc *sc)
*/
if (ETHER_MAX_LEN + 2 > MHLEN) {
/* Attach an mbuf cluster */
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_freem(m);
return (0);
diff --git a/sys/dev/sf/if_sf.c b/sys/dev/sf/if_sf.c
index ec3aa27..7280801 100644
--- a/sys/dev/sf/if_sf.c
+++ b/sys/dev/sf/if_sf.c
@@ -1455,7 +1455,7 @@ sf_newbuf(struct sf_softc *sc, int idx)
bus_dmamap_t map;
int nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES;
@@ -2171,7 +2171,7 @@ sf_encap(struct sf_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->sf_cdata.sf_tx_tag, map,
*m_head, txsegs, &nsegs, BUS_DMA_NOWAIT);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, SF_MAXTXSEGS);
+ m = m_collapse(*m_head, M_NOWAIT, SF_MAXTXSEGS);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/dev/sfxge/sfxge_dma.c b/sys/dev/sfxge/sfxge_dma.c
index 076c7c6..f0d1754 100644
--- a/sys/dev/sfxge/sfxge_dma.c
+++ b/sys/dev/sfxge/sfxge_dma.c
@@ -97,7 +97,7 @@ retry:
goto err_out;
} else if (err == EFBIG || seg_count >= maxsegs) {
if (!defragged) {
- m = m_defrag(*mp, M_DONTWAIT);
+ m = m_defrag(*mp, M_NOWAIT);
if (m == NULL) {
err = ENOBUFS;
goto err_out;
diff --git a/sys/dev/sfxge/sfxge_tx.c b/sys/dev/sfxge/sfxge_tx.c
index 801787a..33f26d9 100644
--- a/sys/dev/sfxge/sfxge_tx.c
+++ b/sys/dev/sfxge/sfxge_tx.c
@@ -262,7 +262,7 @@ static int sfxge_tx_queue_mbuf(struct sfxge_txq *txq, struct mbuf *mbuf)
mbuf, dma_seg, &n_dma_seg, 0);
if (rc == EFBIG) {
/* Try again. */
- struct mbuf *new_mbuf = m_collapse(mbuf, M_DONTWAIT,
+ struct mbuf *new_mbuf = m_collapse(mbuf, M_NOWAIT,
SFXGE_TX_MAPPING_MAX_SEG);
if (new_mbuf == NULL)
goto reject;
diff --git a/sys/dev/sge/if_sge.c b/sys/dev/sge/if_sge.c
index 68679fe..8482bb2 100644
--- a/sys/dev/sge/if_sge.c
+++ b/sys/dev/sge/if_sge.c
@@ -1083,7 +1083,7 @@ sge_newbuf(struct sge_softc *sc, int prod)
SGE_LOCK_ASSERT(sc);
cd = &sc->sge_cdata;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES;
@@ -1407,7 +1407,7 @@ sge_encap(struct sge_softc *sc, struct mbuf **m_head)
if (M_WRITABLE(*m_head) == 0) {
/* Get a writable copy. */
- m = m_dup(*m_head, M_DONTWAIT);
+ m = m_dup(*m_head, M_NOWAIT);
m_freem(*m_head);
if (m == NULL) {
*m_head = NULL;
@@ -1464,7 +1464,7 @@ sge_encap(struct sge_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->sge_cdata.sge_txmbuf_tag,
txd->tx_dmamap, *m_head, txsegs, &nsegs, 0);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, SGE_MAXTXSEGS);
+ m = m_collapse(*m_head, M_NOWAIT, SGE_MAXTXSEGS);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/dev/sis/if_sis.c b/sys/dev/sis/if_sis.c
index 2e93afa..456c3d4 100644
--- a/sys/dev/sis/if_sis.c
+++ b/sys/dev/sis/if_sis.c
@@ -1411,7 +1411,7 @@ sis_newbuf(struct sis_softc *sc, struct sis_rxdesc *rxd)
bus_dmamap_t map;
int nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = SIS_RXLEN;
@@ -1771,7 +1771,7 @@ sis_encap(struct sis_softc *sc, struct mbuf **m_head)
padlen = SIS_MIN_FRAMELEN - m->m_pkthdr.len;
if (M_WRITABLE(m) == 0) {
/* Get a writable copy. */
- m = m_dup(*m_head, M_DONTWAIT);
+ m = m_dup(*m_head, M_NOWAIT);
m_freem(*m_head);
if (m == NULL) {
*m_head = NULL;
@@ -1780,7 +1780,7 @@ sis_encap(struct sis_softc *sc, struct mbuf **m_head)
*m_head = m;
}
if (m->m_next != NULL || M_TRAILINGSPACE(m) < padlen) {
- m = m_defrag(m, M_DONTWAIT);
+ m = m_defrag(m, M_NOWAIT);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
@@ -1799,7 +1799,7 @@ sis_encap(struct sis_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->sis_tx_tag, txd->tx_dmamap,
*m_head, segs, &nsegs, 0);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, SIS_MAXTXSEGS);
+ m = m_collapse(*m_head, M_NOWAIT, SIS_MAXTXSEGS);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c
index 836c34d..120810d 100644
--- a/sys/dev/sk/if_sk.c
+++ b/sys/dev/sk/if_sk.c
@@ -965,7 +965,7 @@ sk_newbuf(sc_if, idx)
bus_dmamap_t map;
int nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES;
@@ -1010,7 +1010,7 @@ sk_jumbo_newbuf(sc_if, idx)
bus_dmamap_t map;
int nsegs;
- m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES);
+ m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES);
if (m == NULL)
return (ENOBUFS);
if ((m->m_flags & M_EXT) == 0) {
@@ -2393,7 +2393,7 @@ sk_encap(sc_if, m_head)
error = bus_dmamap_load_mbuf_sg(sc_if->sk_cdata.sk_tx_tag,
txd->tx_dmamap, *m_head, txsegs, &nseg, 0);
if (error == EFBIG) {
- m = m_defrag(*m_head, M_DONTWAIT);
+ m = m_defrag(*m_head, M_NOWAIT);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/dev/smc/if_smc.c b/sys/dev/smc/if_smc.c
index cece5b7..f6df350 100644
--- a/sys/dev/smc/if_smc.c
+++ b/sys/dev/smc/if_smc.c
@@ -688,11 +688,11 @@ smc_task_rx(void *context, int pending)
/*
* Grab an mbuf and attach a cluster.
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
break;
}
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_freem(m);
break;
@@ -807,6 +807,10 @@ smc_intr(void *context)
struct smc_softc *sc;
sc = (struct smc_softc *)context;
+ /*
+ * Block interrupts in order to let smc_task_intr to kick in
+ */
+ smc_write_1(sc, MSK, 0);
taskqueue_enqueue_fast(sc->smc_tq, &sc->smc_intr);
return (FILTER_HANDLED);
}
@@ -827,13 +831,6 @@ smc_task_intr(void *context, int pending)
smc_select_bank(sc, 2);
/*
- * Get the current mask, and then block all interrupts while we're
- * working.
- */
- if ((ifp->if_capenable & IFCAP_POLLING) == 0)
- smc_write_1(sc, MSK, 0);
-
- /*
* Find out what interrupts are flagged.
*/
status = smc_read_1(sc, IST) & sc->smc_mask;
diff --git a/sys/dev/sn/if_sn.c b/sys/dev/sn/if_sn.c
index 8aef549..d7cc20d 100644
--- a/sys/dev/sn/if_sn.c
+++ b/sys/dev/sn/if_sn.c
@@ -1056,7 +1056,7 @@ read_another:
/*
* Allocate a header mbuf from the kernel.
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
goto out;
@@ -1066,7 +1066,7 @@ read_another:
/*
* Attach an mbuf cluster
*/
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
/*
* Insist on getting a cluster
diff --git a/sys/dev/snc/dp83932.c b/sys/dev/snc/dp83932.c
index 17b67cd..a41ceed 100644
--- a/sys/dev/snc/dp83932.c
+++ b/sys/dev/snc/dp83932.c
@@ -1108,7 +1108,7 @@ sonic_get(struct snc_softc *sc, u_int32_t pkt, int datalen)
* Our sonic_read() and sonic_get() require it.
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == 0)
return (0);
m->m_pkthdr.rcvif = sc->sc_ifp;
@@ -1119,7 +1119,7 @@ sonic_get(struct snc_softc *sc, u_int32_t pkt, int datalen)
while (datalen > 0) {
if (top) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == 0) {
m_freem(top);
return (0);
@@ -1127,7 +1127,7 @@ sonic_get(struct snc_softc *sc, u_int32_t pkt, int datalen)
len = MLEN;
}
if (datalen >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
if (top) m_freem(top);
return (0);
diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c
index 2e7255f..41d51d7 100644
--- a/sys/dev/sound/pci/hda/hdaa_patches.c
+++ b/sys/dev/sound/pci/hda/hdaa_patches.c
@@ -271,7 +271,17 @@ hdac_pin_patch(struct hdaa_widget *w)
}
/* New patches */
- if (id == HDA_CODEC_AD1986A &&
+ if (id == HDA_CODEC_AD1984A &&
+ subid == LENOVO_X300_SUBVENDOR) {
+ switch (nid) {
+ case 17: /* Headphones with redirection */
+ patch = "as=1 seq=15";
+ break;
+ case 20: /* Two mics together */
+ patch = "as=2 seq=15";
+ break;
+ }
+ } else if (id == HDA_CODEC_AD1986A &&
(subid == ASUS_M2NPVMX_SUBVENDOR ||
subid == ASUS_A8NVMCSM_SUBVENDOR ||
subid == ASUS_P5PL2_SUBVENDOR)) {
@@ -372,6 +382,13 @@ hdaa_widget_patch(struct hdaa_widget *w)
HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_SHIFT;
w->waspin = 1;
}
+ /*
+ * Clear "digital" flag from digital mic input, as its signal then goes
+ * to "analog" mixer and this separation just limits functionaity.
+ */
+ if (hdaa_codec_id(devinfo) == HDA_CODEC_AD1984A &&
+ w->nid == 23)
+ w->param.widget_cap &= ~HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL_MASK;
HDA_BOOTVERBOSE(
if (w->param.widget_cap != orig) {
device_printf(w->devinfo->dev,
diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c
index 79c6149..1a60266 100644
--- a/sys/dev/sound/pci/hda/hdac.c
+++ b/sys/dev/sound/pci/hda/hdac.c
@@ -81,6 +81,8 @@ static const struct {
{ HDA_INTEL_CPT, "Intel Cougar Point", 0, 0 },
{ HDA_INTEL_PATSBURG,"Intel Patsburg", 0, 0 },
{ HDA_INTEL_PPT1, "Intel Panther Point", 0, 0 },
+ { HDA_INTEL_LPT1, "Intel Lynx Point", 0, 0 },
+ { HDA_INTEL_LPT2, "Intel Lynx Point", 0, 0 },
{ HDA_INTEL_82801F, "Intel 82801F", 0, 0 },
{ HDA_INTEL_63XXESB, "Intel 631x/632xESB", 0, 0 },
{ HDA_INTEL_82801G, "Intel 82801G", 0, 0 },
diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h
index 622d56e..9f9d687 100644
--- a/sys/dev/sound/pci/hda/hdac.h
+++ b/sys/dev/sound/pci/hda/hdac.h
@@ -54,6 +54,8 @@
#define HDA_INTEL_PCH HDA_MODEL_CONSTRUCT(INTEL, 0x3b56)
#define HDA_INTEL_PCH2 HDA_MODEL_CONSTRUCT(INTEL, 0x3b57)
#define HDA_INTEL_SCH HDA_MODEL_CONSTRUCT(INTEL, 0x811b)
+#define HDA_INTEL_LPT1 HDA_MODEL_CONSTRUCT(INTEL, 0x8c20)
+#define HDA_INTEL_LPT2 HDA_MODEL_CONSTRUCT(INTEL, 0x8c21)
#define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff)
/* Nvidia */
@@ -218,6 +220,7 @@
#define LENOVO_3KN200_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x384e)
#define LENOVO_B450_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3a0d)
#define LENOVO_TCA55_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x1015)
+#define LENOVO_X300_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x20ac)
#define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff)
/* Samsung */
diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c
index 1177042..367491b 100644
--- a/sys/dev/sound/usb/uaudio.c
+++ b/sys/dev/sound/usb/uaudio.c
@@ -122,6 +122,7 @@ SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, default_channels, CTLFLAG_RW,
#define MAKE_WORD(h,l) (((h) << 8) | (l))
#define BIT_TEST(bm,bno) (((bm)[(bno) / 8] >> (7 - ((bno) % 8))) & 1)
#define UAUDIO_MAX_CHAN(x) (x)
+#define MIX(sc) ((sc)->sc_mixer_node)
union uaudio_asid {
const struct usb_audio_streaming_interface_descriptor *v1;
@@ -283,6 +284,7 @@ struct uaudio_softc {
struct uaudio_chan sc_play_chan;
struct umidi_chan sc_midi_chan;
struct uaudio_search_result sc_mixer_clocks;
+ struct uaudio_mixer_node sc_mixer_node;
struct mtx *sc_mixer_lock;
struct usb_device *sc_udev;
@@ -641,6 +643,115 @@ static driver_t uaudio_driver = {
.size = sizeof(struct uaudio_softc),
};
+/* The following table is derived from Linux's quirks-table.h */
+static const STRUCT_USB_HOST_ID uaudio_vendor_midi[] = {
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1000, 0) }, /* UX256 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1001, 0) }, /* MU1000 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1002, 0) }, /* MU2000 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1003, 0) }, /* MU500 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1004, 3) }, /* UW500 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1005, 0) }, /* MOTIF6 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1006, 0) }, /* MOTIF7 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1007, 0) }, /* MOTIF8 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1008, 0) }, /* UX96 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1009, 0) }, /* UX16 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x100a, 3) }, /* EOS BX */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x100c, 0) }, /* UC-MX */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x100d, 0) }, /* UC-KX */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x100e, 0) }, /* S08 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x100f, 0) }, /* CLP-150 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1010, 0) }, /* CLP-170 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1011, 0) }, /* P-250 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1012, 0) }, /* TYROS */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1013, 0) }, /* PF-500 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1014, 0) }, /* S90 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1015, 0) }, /* MOTIF-R */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1016, 0) }, /* MDP-5 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1017, 0) }, /* CVP-204 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1018, 0) }, /* CVP-206 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1019, 0) }, /* CVP-208 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x101a, 0) }, /* CVP-210 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x101b, 0) }, /* PSR-1100 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x101c, 0) }, /* PSR-2100 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x101d, 0) }, /* CLP-175 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x101e, 0) }, /* PSR-K1 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x101f, 0) }, /* EZ-J24 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1020, 0) }, /* EZ-250i */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1021, 0) }, /* MOTIF ES 6 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1022, 0) }, /* MOTIF ES 7 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1023, 0) }, /* MOTIF ES 8 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1024, 0) }, /* CVP-301 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1025, 0) }, /* CVP-303 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1026, 0) }, /* CVP-305 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1027, 0) }, /* CVP-307 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1028, 0) }, /* CVP-309 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1029, 0) }, /* CVP-309GP */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x102a, 0) }, /* PSR-1500 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x102b, 0) }, /* PSR-3000 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x102e, 0) }, /* ELS-01/01C */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1030, 0) }, /* PSR-295/293 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1031, 0) }, /* DGX-205/203 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1032, 0) }, /* DGX-305 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1033, 0) }, /* DGX-505 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1034, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1035, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1036, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1037, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1038, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1039, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x103a, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x103b, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x103c, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x103d, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x103e, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x103f, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1040, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1041, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1042, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1043, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1044, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1045, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x104e, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x104f, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1050, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1051, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1052, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1053, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1054, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1055, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1056, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1057, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1058, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1059, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x105a, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x105b, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x105c, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x105d, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x1503, 3) }, /* MOX6/MOX8 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x2000, 0) }, /* DGP-7 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x2001, 0) }, /* DGP-5 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x2002, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x2003, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x5000, 0) }, /* CS1D */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x5001, 0) }, /* DSP1D */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x5002, 0) }, /* DME32 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x5003, 0) }, /* DM2000 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x5004, 0) }, /* 02R96 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x5005, 0) }, /* ACU16-C */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x5006, 0) }, /* NHB32-C */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x5007, 0) }, /* DM1000 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x5008, 0) }, /* 01V96 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x5009, 0) }, /* SPX2000 */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x500a, 0) }, /* PM5D */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x500b, 0) }, /* DME64N */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x500c, 0) }, /* DME24N */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x500d, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x500e, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x500f, 0) }, /* NULL */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x7000, 0) }, /* DTX */
+ { USB_VPI(USB_VENDOR_YAMAHA, 0x7010, 0) }, /* UB99 */
+};
+
static const STRUCT_USB_HOST_ID __used uaudio_devs[] = {
/* Generic USB audio class match */
{USB_IFACE_CLASS(UICLASS_AUDIO),
@@ -658,7 +769,12 @@ uaudio_probe(device_t dev)
if (uaa->usb_mode != USB_MODE_HOST)
return (ENXIO);
- /* lookup non-standard device */
+ /* lookup non-standard device(s) */
+
+ if (usbd_lookup_id_by_uaa(uaudio_vendor_midi,
+ sizeof(uaudio_vendor_midi), uaa) == 0) {
+ return (BUS_PROBE_SPECIFIC);
+ }
if (uaa->info.bInterfaceClass != UICLASS_AUDIO) {
if (uaa->info.bInterfaceClass != UICLASS_VENDOR ||
@@ -763,6 +879,16 @@ uaudio_attach(device_t dev)
device_printf(dev, "No recording.\n");
}
+ if (sc->sc_midi_chan.valid == 0) {
+ if (usbd_lookup_id_by_uaa(uaudio_vendor_midi,
+ sizeof(uaudio_vendor_midi), uaa) == 0) {
+ sc->sc_midi_chan.iface_index =
+ (uint8_t)uaa->driver_info;
+ sc->sc_midi_chan.iface_alt_index = 0;
+ sc->sc_midi_chan.valid = 1;
+ }
+ }
+
if (sc->sc_midi_chan.valid) {
if (umidi_probe(dev)) {
@@ -2201,149 +2327,148 @@ uaudio_mixer_register_sysctl(struct uaudio_softc *sc, device_t dev)
static void
uaudio_mixer_controls_create_ftu(struct uaudio_softc *sc)
{
- struct uaudio_mixer_node mix;
int chx;
int chy;
- memset(&mix, 0, sizeof(mix));
- mix.wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no);
- mix.wValue[0] = MAKE_WORD(8, 0);
- mix.class = UAC_OUTPUT;
- mix.type = MIX_UNSIGNED_16;
- mix.ctl = SOUND_MIXER_NRDEVICES;
- mix.name = "effect";
- mix.minval = 0;
- mix.maxval = 7;
- mix.mul = 7;
- mix.nchan = 1;
- mix.update[0] = 1;
- strlcpy(mix.desc, "Room1,2,3,Hall1,2,Plate,Delay,Echo", sizeof(mix.desc));
- uaudio_mixer_add_ctl_sub(sc, &mix);
-
- memset(&mix, 0, sizeof(mix));
- mix.wIndex = MAKE_WORD(5, sc->sc_mixer_iface_no);
+ memset(&MIX(sc), 0, sizeof(MIX(sc)));
+ MIX(sc).wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no);
+ MIX(sc).wValue[0] = MAKE_WORD(8, 0);
+ MIX(sc).class = UAC_OUTPUT;
+ MIX(sc).type = MIX_UNSIGNED_16;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES;
+ MIX(sc).name = "effect";
+ MIX(sc).minval = 0;
+ MIX(sc).maxval = 7;
+ MIX(sc).mul = 7;
+ MIX(sc).nchan = 1;
+ MIX(sc).update[0] = 1;
+ strlcpy(MIX(sc).desc, "Room1,2,3,Hall1,2,Plate,Delay,Echo", sizeof(MIX(sc).desc));
+ uaudio_mixer_add_ctl_sub(sc, &MIX(sc));
+
+ memset(&MIX(sc), 0, sizeof(MIX(sc)));
+ MIX(sc).wIndex = MAKE_WORD(5, sc->sc_mixer_iface_no);
for (chx = 0; chx != 8; chx++) {
for (chy = 0; chy != 8; chy++) {
- mix.wValue[0] = MAKE_WORD(chx + 1, chy + 1);
- mix.type = MIX_SIGNED_16;
- mix.ctl = SOUND_MIXER_NRDEVICES;
- mix.name = "mix_rec";
- mix.nchan = 1;
- mix.update[0] = 1;
- mix.val_default = 0;
- snprintf(mix.desc, sizeof(mix.desc),
+ MIX(sc).wValue[0] = MAKE_WORD(chx + 1, chy + 1);
+ MIX(sc).type = MIX_SIGNED_16;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES;
+ MIX(sc).name = "mix_rec";
+ MIX(sc).nchan = 1;
+ MIX(sc).update[0] = 1;
+ MIX(sc).val_default = 0;
+ snprintf(MIX(sc).desc, sizeof(MIX(sc).desc),
"AIn%d - Out%d Record Volume", chy + 1, chx + 1);
- uaudio_mixer_add_ctl(sc, &mix);
+ uaudio_mixer_add_ctl(sc, &MIX(sc));
- mix.wValue[0] = MAKE_WORD(chx + 1, chy + 1 + 8);
- mix.type = MIX_SIGNED_16;
- mix.ctl = SOUND_MIXER_NRDEVICES;
- mix.name = "mix_play";
- mix.nchan = 1;
- mix.update[0] = 1;
- mix.val_default = (chx == chy) ? 2 : 0;
- snprintf(mix.desc, sizeof(mix.desc),
+ MIX(sc).wValue[0] = MAKE_WORD(chx + 1, chy + 1 + 8);
+ MIX(sc).type = MIX_SIGNED_16;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES;
+ MIX(sc).name = "mix_play";
+ MIX(sc).nchan = 1;
+ MIX(sc).update[0] = 1;
+ MIX(sc).val_default = (chx == chy) ? 2 : 0;
+ snprintf(MIX(sc).desc, sizeof(MIX(sc).desc),
"DIn%d - Out%d Playback Volume", chy + 1, chx + 1);
- uaudio_mixer_add_ctl(sc, &mix);
+ uaudio_mixer_add_ctl(sc, &MIX(sc));
}
}
- memset(&mix, 0, sizeof(mix));
- mix.wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no);
- mix.wValue[0] = MAKE_WORD(2, 0);
- mix.class = UAC_OUTPUT;
- mix.type = MIX_SIGNED_8;
- mix.ctl = SOUND_MIXER_NRDEVICES;
- mix.name = "effect_vol";
- mix.nchan = 1;
- mix.update[0] = 1;
- mix.minval = 0;
- mix.maxval = 0x7f;
- mix.mul = 0x7f;
- mix.nchan = 1;
- mix.update[0] = 1;
- strlcpy(mix.desc, "Effect Volume", sizeof(mix.desc));
- uaudio_mixer_add_ctl_sub(sc, &mix);
-
- memset(&mix, 0, sizeof(mix));
- mix.wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no);
- mix.wValue[0] = MAKE_WORD(3, 0);
- mix.class = UAC_OUTPUT;
- mix.type = MIX_SIGNED_16;
- mix.ctl = SOUND_MIXER_NRDEVICES;
- mix.name = "effect_dur";
- mix.nchan = 1;
- mix.update[0] = 1;
- mix.minval = 0;
- mix.maxval = 0x7f00;
- mix.mul = 0x7f00;
- mix.nchan = 1;
- mix.update[0] = 1;
- strlcpy(mix.desc, "Effect Duration", sizeof(mix.desc));
- uaudio_mixer_add_ctl_sub(sc, &mix);
-
- memset(&mix, 0, sizeof(mix));
- mix.wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no);
- mix.wValue[0] = MAKE_WORD(4, 0);
- mix.class = UAC_OUTPUT;
- mix.type = MIX_SIGNED_8;
- mix.ctl = SOUND_MIXER_NRDEVICES;
- mix.name = "effect_fb";
- mix.nchan = 1;
- mix.update[0] = 1;
- mix.minval = 0;
- mix.maxval = 0x7f;
- mix.mul = 0x7f;
- mix.nchan = 1;
- mix.update[0] = 1;
- strlcpy(mix.desc, "Effect Feedback Volume", sizeof(mix.desc));
- uaudio_mixer_add_ctl_sub(sc, &mix);
-
- memset(&mix, 0, sizeof(mix));
- mix.wIndex = MAKE_WORD(7, sc->sc_mixer_iface_no);
+ memset(&MIX(sc), 0, sizeof(MIX(sc)));
+ MIX(sc).wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no);
+ MIX(sc).wValue[0] = MAKE_WORD(2, 0);
+ MIX(sc).class = UAC_OUTPUT;
+ MIX(sc).type = MIX_SIGNED_8;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES;
+ MIX(sc).name = "effect_vol";
+ MIX(sc).nchan = 1;
+ MIX(sc).update[0] = 1;
+ MIX(sc).minval = 0;
+ MIX(sc).maxval = 0x7f;
+ MIX(sc).mul = 0x7f;
+ MIX(sc).nchan = 1;
+ MIX(sc).update[0] = 1;
+ strlcpy(MIX(sc).desc, "Effect Volume", sizeof(MIX(sc).desc));
+ uaudio_mixer_add_ctl_sub(sc, &MIX(sc));
+
+ memset(&MIX(sc), 0, sizeof(MIX(sc)));
+ MIX(sc).wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no);
+ MIX(sc).wValue[0] = MAKE_WORD(3, 0);
+ MIX(sc).class = UAC_OUTPUT;
+ MIX(sc).type = MIX_SIGNED_16;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES;
+ MIX(sc).name = "effect_dur";
+ MIX(sc).nchan = 1;
+ MIX(sc).update[0] = 1;
+ MIX(sc).minval = 0;
+ MIX(sc).maxval = 0x7f00;
+ MIX(sc).mul = 0x7f00;
+ MIX(sc).nchan = 1;
+ MIX(sc).update[0] = 1;
+ strlcpy(MIX(sc).desc, "Effect Duration", sizeof(MIX(sc).desc));
+ uaudio_mixer_add_ctl_sub(sc, &MIX(sc));
+
+ memset(&MIX(sc), 0, sizeof(MIX(sc)));
+ MIX(sc).wIndex = MAKE_WORD(6, sc->sc_mixer_iface_no);
+ MIX(sc).wValue[0] = MAKE_WORD(4, 0);
+ MIX(sc).class = UAC_OUTPUT;
+ MIX(sc).type = MIX_SIGNED_8;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES;
+ MIX(sc).name = "effect_fb";
+ MIX(sc).nchan = 1;
+ MIX(sc).update[0] = 1;
+ MIX(sc).minval = 0;
+ MIX(sc).maxval = 0x7f;
+ MIX(sc).mul = 0x7f;
+ MIX(sc).nchan = 1;
+ MIX(sc).update[0] = 1;
+ strlcpy(MIX(sc).desc, "Effect Feedback Volume", sizeof(MIX(sc).desc));
+ uaudio_mixer_add_ctl_sub(sc, &MIX(sc));
+
+ memset(&MIX(sc), 0, sizeof(MIX(sc)));
+ MIX(sc).wIndex = MAKE_WORD(7, sc->sc_mixer_iface_no);
for (chy = 0; chy != 4; chy++) {
- mix.wValue[0] = MAKE_WORD(7, chy + 1);
- mix.type = MIX_SIGNED_16;
- mix.ctl = SOUND_MIXER_NRDEVICES;
- mix.name = "effect_ret";
- mix.nchan = 1;
- mix.update[0] = 1;
- snprintf(mix.desc, sizeof(mix.desc),
+ MIX(sc).wValue[0] = MAKE_WORD(7, chy + 1);
+ MIX(sc).type = MIX_SIGNED_16;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES;
+ MIX(sc).name = "effect_ret";
+ MIX(sc).nchan = 1;
+ MIX(sc).update[0] = 1;
+ snprintf(MIX(sc).desc, sizeof(MIX(sc).desc),
"Effect Return %d Volume", chy + 1);
- uaudio_mixer_add_ctl(sc, &mix);
+ uaudio_mixer_add_ctl(sc, &MIX(sc));
}
- memset(&mix, 0, sizeof(mix));
- mix.wIndex = MAKE_WORD(5, sc->sc_mixer_iface_no);
+ memset(&MIX(sc), 0, sizeof(MIX(sc)));
+ MIX(sc).wIndex = MAKE_WORD(5, sc->sc_mixer_iface_no);
for (chy = 0; chy != 8; chy++) {
- mix.wValue[0] = MAKE_WORD(9, chy + 1);
- mix.type = MIX_SIGNED_16;
- mix.ctl = SOUND_MIXER_NRDEVICES;
- mix.name = "effect_send";
- mix.nchan = 1;
- mix.update[0] = 1;
- snprintf(mix.desc, sizeof(mix.desc),
+ MIX(sc).wValue[0] = MAKE_WORD(9, chy + 1);
+ MIX(sc).type = MIX_SIGNED_16;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES;
+ MIX(sc).name = "effect_send";
+ MIX(sc).nchan = 1;
+ MIX(sc).update[0] = 1;
+ snprintf(MIX(sc).desc, sizeof(MIX(sc).desc),
"Effect Send AIn%d Volume", chy + 1);
- uaudio_mixer_add_ctl(sc, &mix);
+ uaudio_mixer_add_ctl(sc, &MIX(sc));
- mix.wValue[0] = MAKE_WORD(9, chy + 1);
- mix.type = MIX_SIGNED_16;
- mix.ctl = SOUND_MIXER_NRDEVICES;
- mix.name = "effect_send";
- mix.nchan = 1;
- mix.update[0] = 1;
- snprintf(mix.desc, sizeof(mix.desc),
+ MIX(sc).wValue[0] = MAKE_WORD(9, chy + 1);
+ MIX(sc).type = MIX_SIGNED_16;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES;
+ MIX(sc).name = "effect_send";
+ MIX(sc).nchan = 1;
+ MIX(sc).update[0] = 1;
+ snprintf(MIX(sc).desc, sizeof(MIX(sc).desc),
"Effect Send DIn%d Volume", chy + 1 + 8);
- uaudio_mixer_add_ctl(sc, &mix);
+ uaudio_mixer_add_ctl(sc, &MIX(sc));
}
}
@@ -2469,8 +2594,6 @@ static void
uaudio_mixer_add_mixer(struct uaudio_softc *sc,
const struct uaudio_terminal_node *iot, int id)
{
- struct uaudio_mixer_node mix;
-
const struct usb_audio_mixer_unit_0 *d0 = iot[id].u.mu_v1;
const struct usb_audio_mixer_unit_1 *d1;
@@ -2504,11 +2627,11 @@ uaudio_mixer_add_mixer(struct uaudio_softc *sc,
DPRINTFN(3, "ichs=%d ochs=%d\n", ichs, ochs);
- memset(&mix, 0, sizeof(mix));
+ memset(&MIX(sc), 0, sizeof(MIX(sc)));
- mix.wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no);
- uaudio_mixer_determine_class(&iot[id], &mix);
- mix.type = MIX_SIGNED_16;
+ MIX(sc).wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no);
+ uaudio_mixer_determine_class(&iot[id], &MIX(sc));
+ MIX(sc).type = MIX_SIGNED_16;
if (uaudio_mixer_verify_desc(d0, ((ichs * ochs) + 7) / 8) == NULL)
return;
@@ -2536,11 +2659,11 @@ uaudio_mixer_add_mixer(struct uaudio_softc *sc,
for (o = 0; o < ochs; o++) {
bno = ((p + c) * ochs) + o;
if (BIT_TEST(d1->bmControls, bno))
- mix.wValue[mc++] = MAKE_WORD(p + c + 1, o + 1);
+ MIX(sc).wValue[mc++] = MAKE_WORD(p + c + 1, o + 1);
}
}
- mix.nchan = chs;
- uaudio_mixer_add_ctl(sc, &mix);
+ MIX(sc).nchan = chs;
+ uaudio_mixer_add_ctl(sc, &MIX(sc));
}
p += chs;
}
@@ -2550,8 +2673,6 @@ static void
uaudio20_mixer_add_mixer(struct uaudio_softc *sc,
const struct uaudio_terminal_node *iot, int id)
{
- struct uaudio_mixer_node mix;
-
const struct usb_audio20_mixer_unit_0 *d0 = iot[id].u.mu_v2;
const struct usb_audio20_mixer_unit_1 *d1;
@@ -2585,11 +2706,11 @@ uaudio20_mixer_add_mixer(struct uaudio_softc *sc,
DPRINTFN(3, "ichs=%d ochs=%d\n", ichs, ochs);
- memset(&mix, 0, sizeof(mix));
+ memset(&MIX(sc), 0, sizeof(MIX(sc)));
- mix.wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no);
- uaudio20_mixer_determine_class(&iot[id], &mix);
- mix.type = MIX_SIGNED_16;
+ MIX(sc).wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no);
+ uaudio20_mixer_determine_class(&iot[id], &MIX(sc));
+ MIX(sc).type = MIX_SIGNED_16;
if (uaudio20_mixer_verify_desc(d0, ((ichs * ochs) + 7) / 8) == NULL)
return;
@@ -2617,11 +2738,11 @@ uaudio20_mixer_add_mixer(struct uaudio_softc *sc,
for (o = 0; o < ochs; o++) {
bno = ((p + c) * ochs) + o;
if (BIT_TEST(d1->bmControls, bno))
- mix.wValue[mc++] = MAKE_WORD(p + c + 1, o + 1);
+ MIX(sc).wValue[mc++] = MAKE_WORD(p + c + 1, o + 1);
}
}
- mix.nchan = chs;
- uaudio_mixer_add_ctl(sc, &mix);
+ MIX(sc).nchan = chs;
+ uaudio_mixer_add_ctl(sc, &MIX(sc));
}
p += chs;
}
@@ -2632,7 +2753,6 @@ uaudio_mixer_add_selector(struct uaudio_softc *sc,
const struct uaudio_terminal_node *iot, int id)
{
const struct usb_audio_selector_unit *d = iot[id].u.su_v1;
- struct uaudio_mixer_node mix;
uint16_t i;
DPRINTFN(3, "bUnitId=%d bNrInPins=%d\n",
@@ -2641,41 +2761,41 @@ uaudio_mixer_add_selector(struct uaudio_softc *sc,
if (d->bNrInPins == 0)
return;
- memset(&mix, 0, sizeof(mix));
+ memset(&MIX(sc), 0, sizeof(MIX(sc)));
- mix.wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no);
- mix.wValue[0] = MAKE_WORD(0, 0);
- uaudio_mixer_determine_class(&iot[id], &mix);
- mix.nchan = 1;
- mix.type = MIX_SELECTOR;
- mix.ctl = SOUND_MIXER_NRDEVICES;
- mix.minval = 1;
- mix.maxval = d->bNrInPins;
- mix.name = "selector";
+ MIX(sc).wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no);
+ MIX(sc).wValue[0] = MAKE_WORD(0, 0);
+ uaudio_mixer_determine_class(&iot[id], &MIX(sc));
+ MIX(sc).nchan = 1;
+ MIX(sc).type = MIX_SELECTOR;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES;
+ MIX(sc).minval = 1;
+ MIX(sc).maxval = d->bNrInPins;
+ MIX(sc).name = "selector";
i = d->baSourceId[d->bNrInPins];
if (i == 0 ||
usbd_req_get_string_any(sc->sc_udev, NULL,
- mix.desc, sizeof(mix.desc), i) != 0) {
- mix.desc[0] = 0;
+ MIX(sc).desc, sizeof(MIX(sc).desc), i) != 0) {
+ MIX(sc).desc[0] = 0;
}
- if (mix.maxval > MAX_SELECTOR_INPUT_PIN) {
- mix.maxval = MAX_SELECTOR_INPUT_PIN;
+ if (MIX(sc).maxval > MAX_SELECTOR_INPUT_PIN) {
+ MIX(sc).maxval = MAX_SELECTOR_INPUT_PIN;
}
- mix.mul = (mix.maxval - mix.minval);
+ MIX(sc).mul = (MIX(sc).maxval - MIX(sc).minval);
for (i = 0; i < MAX_SELECTOR_INPUT_PIN; i++) {
- mix.slctrtype[i] = SOUND_MIXER_NRDEVICES;
+ MIX(sc).slctrtype[i] = SOUND_MIXER_NRDEVICES;
}
- for (i = 0; i < mix.maxval; i++) {
- mix.slctrtype[i] = uaudio_mixer_feature_name(
- &iot[d->baSourceId[i]], &mix);
+ for (i = 0; i < MIX(sc).maxval; i++) {
+ MIX(sc).slctrtype[i] = uaudio_mixer_feature_name(
+ &iot[d->baSourceId[i]], &MIX(sc));
}
- mix.class = 0; /* not used */
+ MIX(sc).class = 0; /* not used */
- uaudio_mixer_add_ctl(sc, &mix);
+ uaudio_mixer_add_ctl(sc, &MIX(sc));
}
static void
@@ -2683,7 +2803,6 @@ uaudio20_mixer_add_selector(struct uaudio_softc *sc,
const struct uaudio_terminal_node *iot, int id)
{
const struct usb_audio20_selector_unit *d = iot[id].u.su_v2;
- struct uaudio_mixer_node mix;
uint16_t i;
DPRINTFN(3, "bUnitId=%d bNrInPins=%d\n",
@@ -2692,40 +2811,40 @@ uaudio20_mixer_add_selector(struct uaudio_softc *sc,
if (d->bNrInPins == 0)
return;
- memset(&mix, 0, sizeof(mix));
+ memset(&MIX(sc), 0, sizeof(MIX(sc)));
- mix.wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no);
- mix.wValue[0] = MAKE_WORD(0, 0);
- uaudio20_mixer_determine_class(&iot[id], &mix);
- mix.nchan = 1;
- mix.type = MIX_SELECTOR;
- mix.ctl = SOUND_MIXER_NRDEVICES;
- mix.minval = 1;
- mix.maxval = d->bNrInPins;
- mix.name = "selector";
+ MIX(sc).wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no);
+ MIX(sc).wValue[0] = MAKE_WORD(0, 0);
+ uaudio20_mixer_determine_class(&iot[id], &MIX(sc));
+ MIX(sc).nchan = 1;
+ MIX(sc).type = MIX_SELECTOR;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES;
+ MIX(sc).minval = 1;
+ MIX(sc).maxval = d->bNrInPins;
+ MIX(sc).name = "selector";
i = d->baSourceId[d->bNrInPins];
if (i == 0 ||
usbd_req_get_string_any(sc->sc_udev, NULL,
- mix.desc, sizeof(mix.desc), i) != 0) {
- mix.desc[0] = 0;
+ MIX(sc).desc, sizeof(MIX(sc).desc), i) != 0) {
+ MIX(sc).desc[0] = 0;
}
- if (mix.maxval > MAX_SELECTOR_INPUT_PIN)
- mix.maxval = MAX_SELECTOR_INPUT_PIN;
+ if (MIX(sc).maxval > MAX_SELECTOR_INPUT_PIN)
+ MIX(sc).maxval = MAX_SELECTOR_INPUT_PIN;
- mix.mul = (mix.maxval - mix.minval);
+ MIX(sc).mul = (MIX(sc).maxval - MIX(sc).minval);
for (i = 0; i < MAX_SELECTOR_INPUT_PIN; i++)
- mix.slctrtype[i] = SOUND_MIXER_NRDEVICES;
+ MIX(sc).slctrtype[i] = SOUND_MIXER_NRDEVICES;
- for (i = 0; i < mix.maxval; i++) {
- mix.slctrtype[i] = uaudio20_mixer_feature_name(
- &iot[d->baSourceId[i]], &mix);
+ for (i = 0; i < MIX(sc).maxval; i++) {
+ MIX(sc).slctrtype[i] = uaudio20_mixer_feature_name(
+ &iot[d->baSourceId[i]], &MIX(sc));
}
- mix.class = 0; /* not used */
+ MIX(sc).class = 0; /* not used */
- uaudio_mixer_add_ctl(sc, &mix);
+ uaudio_mixer_add_ctl(sc, &MIX(sc));
}
static uint32_t
@@ -2755,7 +2874,6 @@ uaudio_mixer_add_feature(struct uaudio_softc *sc,
const struct uaudio_terminal_node *iot, int id)
{
const struct usb_audio_feature_unit *d = iot[id].u.fu_v1;
- struct uaudio_mixer_node mix;
uint32_t fumask;
uint32_t mmask;
uint32_t cmask;
@@ -2768,7 +2886,7 @@ uaudio_mixer_add_feature(struct uaudio_softc *sc,
if (d->bControlSize == 0)
return;
- memset(&mix, 0, sizeof(mix));
+ memset(&MIX(sc), 0, sizeof(MIX(sc)));
nchan = (d->bLength - 7) / d->bControlSize;
mmask = uaudio_mixer_feature_get_bmaControls(d, 0);
@@ -2789,13 +2907,13 @@ uaudio_mixer_add_feature(struct uaudio_softc *sc,
if (nchan > MIX_MAX_CHAN) {
nchan = MIX_MAX_CHAN;
}
- mix.wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no);
+ MIX(sc).wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no);
i = d->bmaControls[d->bControlSize];
if (i == 0 ||
usbd_req_get_string_any(sc->sc_udev, NULL,
- mix.desc, sizeof(mix.desc), i) != 0) {
- mix.desc[0] = 0;
+ MIX(sc).desc, sizeof(MIX(sc).desc), i) != 0) {
+ MIX(sc).desc[0] = 0;
}
for (ctl = 1; ctl <= LOUDNESS_CONTROL; ctl++) {
@@ -2806,87 +2924,87 @@ uaudio_mixer_add_feature(struct uaudio_softc *sc,
ctl, fumask);
if (mmask & fumask) {
- mix.nchan = 1;
- mix.wValue[0] = MAKE_WORD(ctl, 0);
+ MIX(sc).nchan = 1;
+ MIX(sc).wValue[0] = MAKE_WORD(ctl, 0);
} else if (cmask & fumask) {
- mix.nchan = nchan - 1;
+ MIX(sc).nchan = nchan - 1;
for (i = 1; i < nchan; i++) {
if (uaudio_mixer_feature_get_bmaControls(d, i) & fumask)
- mix.wValue[i - 1] = MAKE_WORD(ctl, i);
+ MIX(sc).wValue[i - 1] = MAKE_WORD(ctl, i);
else
- mix.wValue[i - 1] = -1;
+ MIX(sc).wValue[i - 1] = -1;
}
} else {
continue;
}
- mixernumber = uaudio_mixer_feature_name(&iot[id], &mix);
+ mixernumber = uaudio_mixer_feature_name(&iot[id], &MIX(sc));
switch (ctl) {
case MUTE_CONTROL:
- mix.type = MIX_ON_OFF;
- mix.ctl = SOUND_MIXER_NRDEVICES;
- mix.name = "mute";
+ MIX(sc).type = MIX_ON_OFF;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES;
+ MIX(sc).name = "mute";
break;
case VOLUME_CONTROL:
- mix.type = MIX_SIGNED_16;
- mix.ctl = mixernumber;
- mix.name = "vol";
+ MIX(sc).type = MIX_SIGNED_16;
+ MIX(sc).ctl = mixernumber;
+ MIX(sc).name = "vol";
break;
case BASS_CONTROL:
- mix.type = MIX_SIGNED_8;
- mix.ctl = SOUND_MIXER_BASS;
- mix.name = "bass";
+ MIX(sc).type = MIX_SIGNED_8;
+ MIX(sc).ctl = SOUND_MIXER_BASS;
+ MIX(sc).name = "bass";
break;
case MID_CONTROL:
- mix.type = MIX_SIGNED_8;
- mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */
- mix.name = "mid";
+ MIX(sc).type = MIX_SIGNED_8;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */
+ MIX(sc).name = "mid";
break;
case TREBLE_CONTROL:
- mix.type = MIX_SIGNED_8;
- mix.ctl = SOUND_MIXER_TREBLE;
- mix.name = "treble";
+ MIX(sc).type = MIX_SIGNED_8;
+ MIX(sc).ctl = SOUND_MIXER_TREBLE;
+ MIX(sc).name = "treble";
break;
case GRAPHIC_EQUALIZER_CONTROL:
continue; /* XXX don't add anything */
case AGC_CONTROL:
- mix.type = MIX_ON_OFF;
- mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */
- mix.name = "agc";
+ MIX(sc).type = MIX_ON_OFF;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */
+ MIX(sc).name = "agc";
break;
case DELAY_CONTROL:
- mix.type = MIX_UNSIGNED_16;
- mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */
- mix.name = "delay";
+ MIX(sc).type = MIX_UNSIGNED_16;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */
+ MIX(sc).name = "delay";
break;
case BASS_BOOST_CONTROL:
- mix.type = MIX_ON_OFF;
- mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */
- mix.name = "boost";
+ MIX(sc).type = MIX_ON_OFF;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */
+ MIX(sc).name = "boost";
break;
case LOUDNESS_CONTROL:
- mix.type = MIX_ON_OFF;
- mix.ctl = SOUND_MIXER_LOUD; /* Is this correct ? */
- mix.name = "loudness";
+ MIX(sc).type = MIX_ON_OFF;
+ MIX(sc).ctl = SOUND_MIXER_LOUD; /* Is this correct ? */
+ MIX(sc).name = "loudness";
break;
default:
- mix.type = MIX_UNKNOWN;
+ MIX(sc).type = MIX_UNKNOWN;
break;
}
- if (mix.type != MIX_UNKNOWN)
- uaudio_mixer_add_ctl(sc, &mix);
+ if (MIX(sc).type != MIX_UNKNOWN)
+ uaudio_mixer_add_ctl(sc, &MIX(sc));
}
}
@@ -2895,7 +3013,6 @@ uaudio20_mixer_add_feature(struct uaudio_softc *sc,
const struct uaudio_terminal_node *iot, int id)
{
const struct usb_audio20_feature_unit *d = iot[id].u.fu_v2;
- struct uaudio_mixer_node mix;
uint32_t ctl;
uint32_t mmask;
uint32_t cmask;
@@ -2908,7 +3025,7 @@ uaudio20_mixer_add_feature(struct uaudio_softc *sc,
if (UGETDW(d->bmaControls[0]) == 0)
return;
- memset(&mix, 0, sizeof(mix));
+ memset(&MIX(sc), 0, sizeof(MIX(sc)));
nchan = (d->bLength - 6) / 4;
mmask = UGETDW(d->bmaControls[0]);
@@ -2925,84 +3042,84 @@ uaudio20_mixer_add_feature(struct uaudio_softc *sc,
if (nchan > MIX_MAX_CHAN)
nchan = MIX_MAX_CHAN;
- mix.wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no);
+ MIX(sc).wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no);
i = d->bmaControls[nchan][0];
if (i == 0 ||
usbd_req_get_string_any(sc->sc_udev, NULL,
- mix.desc, sizeof(mix.desc), i) != 0) {
- mix.desc[0] = 0;
+ MIX(sc).desc, sizeof(MIX(sc).desc), i) != 0) {
+ MIX(sc).desc[0] = 0;
}
for (ctl = 3; ctl != 0; ctl <<= 2) {
- mixernumber = uaudio20_mixer_feature_name(&iot[id], &mix);
+ mixernumber = uaudio20_mixer_feature_name(&iot[id], &MIX(sc));
switch (ctl) {
case (3 << 0):
- mix.type = MIX_ON_OFF;
- mix.ctl = SOUND_MIXER_NRDEVICES;
- mix.name = "mute";
+ MIX(sc).type = MIX_ON_OFF;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES;
+ MIX(sc).name = "mute";
what = MUTE_CONTROL;
break;
case (3 << 2):
- mix.type = MIX_SIGNED_16;
- mix.ctl = mixernumber;
- mix.name = "vol";
+ MIX(sc).type = MIX_SIGNED_16;
+ MIX(sc).ctl = mixernumber;
+ MIX(sc).name = "vol";
what = VOLUME_CONTROL;
break;
case (3 << 4):
- mix.type = MIX_SIGNED_8;
- mix.ctl = SOUND_MIXER_BASS;
- mix.name = "bass";
+ MIX(sc).type = MIX_SIGNED_8;
+ MIX(sc).ctl = SOUND_MIXER_BASS;
+ MIX(sc).name = "bass";
what = BASS_CONTROL;
break;
case (3 << 6):
- mix.type = MIX_SIGNED_8;
- mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */
- mix.name = "mid";
+ MIX(sc).type = MIX_SIGNED_8;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */
+ MIX(sc).name = "mid";
what = MID_CONTROL;
break;
case (3 << 8):
- mix.type = MIX_SIGNED_8;
- mix.ctl = SOUND_MIXER_TREBLE;
- mix.name = "treble";
+ MIX(sc).type = MIX_SIGNED_8;
+ MIX(sc).ctl = SOUND_MIXER_TREBLE;
+ MIX(sc).name = "treble";
what = TREBLE_CONTROL;
break;
case (3 << 12):
- mix.type = MIX_ON_OFF;
- mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */
- mix.name = "agc";
+ MIX(sc).type = MIX_ON_OFF;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */
+ MIX(sc).name = "agc";
what = AGC_CONTROL;
break;
case (3 << 14):
- mix.type = MIX_UNSIGNED_16;
- mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */
- mix.name = "delay";
+ MIX(sc).type = MIX_UNSIGNED_16;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */
+ MIX(sc).name = "delay";
what = DELAY_CONTROL;
break;
case (3 << 16):
- mix.type = MIX_ON_OFF;
- mix.ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */
- mix.name = "boost";
+ MIX(sc).type = MIX_ON_OFF;
+ MIX(sc).ctl = SOUND_MIXER_NRDEVICES; /* XXXXX */
+ MIX(sc).name = "boost";
what = BASS_BOOST_CONTROL;
break;
case (3 << 18):
- mix.type = MIX_ON_OFF;
- mix.ctl = SOUND_MIXER_LOUD; /* Is this correct ? */
- mix.name = "loudness";
+ MIX(sc).type = MIX_ON_OFF;
+ MIX(sc).ctl = SOUND_MIXER_LOUD; /* Is this correct ? */
+ MIX(sc).name = "loudness";
what = LOUDNESS_CONTROL;
break;
case (3 << 20):
- mix.type = MIX_SIGNED_16;
- mix.ctl = mixernumber;
- mix.name = "igain";
+ MIX(sc).type = MIX_SIGNED_16;
+ MIX(sc).ctl = mixernumber;
+ MIX(sc).name = "igain";
what = INPUT_GAIN_CONTROL;
break;
case (3 << 22):
- mix.type = MIX_SIGNED_16;
- mix.ctl = mixernumber;
- mix.name = "igainpad";
+ MIX(sc).type = MIX_SIGNED_16;
+ MIX(sc).ctl = mixernumber;
+ MIX(sc).name = "igainpad";
what = INPUT_GAIN_PAD_CONTROL;
break;
default:
@@ -3010,22 +3127,22 @@ uaudio20_mixer_add_feature(struct uaudio_softc *sc,
}
if ((mmask & ctl) == ctl) {
- mix.nchan = 1;
- mix.wValue[0] = MAKE_WORD(what, 0);
+ MIX(sc).nchan = 1;
+ MIX(sc).wValue[0] = MAKE_WORD(what, 0);
} else if ((cmask & ctl) == ctl) {
- mix.nchan = nchan - 1;
+ MIX(sc).nchan = nchan - 1;
for (i = 1; i < nchan; i++) {
if ((UGETDW(d->bmaControls[i]) & ctl) == ctl)
- mix.wValue[i - 1] = MAKE_WORD(what, i);
+ MIX(sc).wValue[i - 1] = MAKE_WORD(what, i);
else
- mix.wValue[i - 1] = -1;
+ MIX(sc).wValue[i - 1] = -1;
}
} else {
continue;
}
- if (mix.type != MIX_UNKNOWN)
- uaudio_mixer_add_ctl(sc, &mix);
+ if (MIX(sc).type != MIX_UNKNOWN)
+ uaudio_mixer_add_ctl(sc, &MIX(sc));
}
}
@@ -3035,10 +3152,9 @@ uaudio_mixer_add_processing_updown(struct uaudio_softc *sc,
{
const struct usb_audio_processing_unit_0 *d0 = iot[id].u.pu_v1;
const struct usb_audio_processing_unit_1 *d1 =
- (const void *)(d0->baSourceId + d0->bNrInPins);
+ (const void *)(d0->baSourceId + d0->bNrInPins);
const struct usb_audio_processing_unit_updown *ud =
- (const void *)(d1->bmControls + d1->bControlSize);
- struct uaudio_mixer_node mix;
+ (const void *)(d1->bmControls + d1->bControlSize);
uint8_t i;
if (uaudio_mixer_verify_desc(d0, sizeof(*ud)) == NULL) {
@@ -3055,20 +3171,20 @@ uaudio_mixer_add_processing_updown(struct uaudio_softc *sc,
DPRINTF("no mode select\n");
return;
}
- memset(&mix, 0, sizeof(mix));
+ memset(&MIX(sc), 0, sizeof(MIX(sc)));
- mix.wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no);
- mix.nchan = 1;
- mix.wValue[0] = MAKE_WORD(UD_MODE_SELECT_CONTROL, 0);
- uaudio_mixer_determine_class(&iot[id], &mix);
- mix.type = MIX_ON_OFF; /* XXX */
+ MIX(sc).wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no);
+ MIX(sc).nchan = 1;
+ MIX(sc).wValue[0] = MAKE_WORD(UD_MODE_SELECT_CONTROL, 0);
+ uaudio_mixer_determine_class(&iot[id], &MIX(sc));
+ MIX(sc).type = MIX_ON_OFF; /* XXX */
for (i = 0; i < ud->bNrModes; i++) {
DPRINTFN(3, "i=%d bm=0x%x\n", i, UGETW(ud->waModes[i]));
/* XXX */
}
- uaudio_mixer_add_ctl(sc, &mix);
+ uaudio_mixer_add_ctl(sc, &MIX(sc));
}
static void
@@ -3077,11 +3193,10 @@ uaudio_mixer_add_processing(struct uaudio_softc *sc,
{
const struct usb_audio_processing_unit_0 *d0 = iot[id].u.pu_v1;
const struct usb_audio_processing_unit_1 *d1 =
- (const void *)(d0->baSourceId + d0->bNrInPins);
- struct uaudio_mixer_node mix;
+ (const void *)(d0->baSourceId + d0->bNrInPins);
uint16_t ptype;
- memset(&mix, 0, sizeof(mix));
+ memset(&MIX(sc), 0, sizeof(MIX(sc)));
ptype = UGETW(d0->wProcessType);
@@ -3092,12 +3207,12 @@ uaudio_mixer_add_processing(struct uaudio_softc *sc,
return;
}
if (d1->bmControls[0] & UA_PROC_ENABLE_MASK) {
- mix.wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no);
- mix.nchan = 1;
- mix.wValue[0] = MAKE_WORD(XX_ENABLE_CONTROL, 0);
- uaudio_mixer_determine_class(&iot[id], &mix);
- mix.type = MIX_ON_OFF;
- uaudio_mixer_add_ctl(sc, &mix);
+ MIX(sc).wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no);
+ MIX(sc).nchan = 1;
+ MIX(sc).wValue[0] = MAKE_WORD(XX_ENABLE_CONTROL, 0);
+ uaudio_mixer_determine_class(&iot[id], &MIX(sc));
+ MIX(sc).type = MIX_ON_OFF;
+ uaudio_mixer_add_ctl(sc, &MIX(sc));
}
switch (ptype) {
case UPDOWNMIX_PROCESS:
@@ -3122,8 +3237,7 @@ uaudio_mixer_add_extension(struct uaudio_softc *sc,
{
const struct usb_audio_extension_unit_0 *d0 = iot[id].u.eu_v1;
const struct usb_audio_extension_unit_1 *d1 =
- (const void *)(d0->baSourceId + d0->bNrInPins);
- struct uaudio_mixer_node mix;
+ (const void *)(d0->baSourceId + d0->bNrInPins);
DPRINTFN(3, "bUnitId=%d bNrInPins=%d\n",
d0->bUnitId, d0->bNrInPins);
@@ -3136,15 +3250,15 @@ uaudio_mixer_add_extension(struct uaudio_softc *sc,
}
if (d1->bmControls[0] & UA_EXT_ENABLE_MASK) {
- memset(&mix, 0, sizeof(mix));
+ memset(&MIX(sc), 0, sizeof(MIX(sc)));
- mix.wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no);
- mix.nchan = 1;
- mix.wValue[0] = MAKE_WORD(UA_EXT_ENABLE, 0);
- uaudio_mixer_determine_class(&iot[id], &mix);
- mix.type = MIX_ON_OFF;
+ MIX(sc).wIndex = MAKE_WORD(d0->bUnitId, sc->sc_mixer_iface_no);
+ MIX(sc).nchan = 1;
+ MIX(sc).wValue[0] = MAKE_WORD(UA_EXT_ENABLE, 0);
+ uaudio_mixer_determine_class(&iot[id], &MIX(sc));
+ MIX(sc).type = MIX_ON_OFF;
- uaudio_mixer_add_ctl(sc, &mix);
+ uaudio_mixer_add_ctl(sc, &MIX(sc));
}
}
diff --git a/sys/dev/ste/if_ste.c b/sys/dev/ste/if_ste.c
index 742d497..be2e8b2 100644
--- a/sys/dev/ste/if_ste.c
+++ b/sys/dev/ste/if_ste.c
@@ -1385,7 +1385,7 @@ ste_newbuf(struct ste_softc *sc, struct ste_chain_onefrag *rxc)
bus_dmamap_t map;
int error, nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES;
@@ -1824,7 +1824,7 @@ ste_encap(struct ste_softc *sc, struct mbuf **m_head, struct ste_chain *txc)
error = bus_dmamap_load_mbuf_sg(sc->ste_cdata.ste_tx_tag,
txc->ste_map, *m_head, txsegs, &nsegs, 0);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, STE_MAXFRAGS);
+ m = m_collapse(*m_head, M_NOWAIT, STE_MAXFRAGS);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/dev/stge/if_stge.c b/sys/dev/stge/if_stge.c
index 7d22540..96860a8 100644
--- a/sys/dev/stge/if_stge.c
+++ b/sys/dev/stge/if_stge.c
@@ -1081,7 +1081,7 @@ stge_encap(struct stge_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->sc_cdata.stge_tx_tag,
txd->tx_dmamap, *m_head, txsegs, &nsegs, 0);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, STGE_MAXTXSEGS);
+ m = m_collapse(*m_head, M_NOWAIT, STGE_MAXTXSEGS);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
@@ -1609,7 +1609,7 @@ stge_fixup_rx(struct stge_softc *sc, struct mbuf *m)
m->m_data += ETHER_HDR_LEN;
n = m;
} else {
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (n != NULL) {
bcopy(m->m_data, n->m_data, ETHER_HDR_LEN);
m->m_data += ETHER_HDR_LEN;
@@ -2439,7 +2439,7 @@ stge_newbuf(struct stge_softc *sc, int idx)
bus_dmamap_t map;
int nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES;
diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c
index 3c8be40..b644f94 100644
--- a/sys/dev/sym/sym_hipd.c
+++ b/sys/dev/sym/sym_hipd.c
@@ -135,6 +135,8 @@ typedef u_int32_t u32;
#define MEMORY_BARRIER() __asm__ volatile("mf.a; mf" : : : "memory")
#elif defined __sparc64__
#define MEMORY_BARRIER() __asm__ volatile("membar #Sync" : : : "memory")
+#elif defined __arm__
+#define MEMORY_BARRIER() __do_dmb()
#else
#error "Not supported platform"
#endif
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c
index d31af29..f8142b4 100644
--- a/sys/dev/ti/if_ti.c
+++ b/sys/dev/ti/if_ti.c
@@ -1381,7 +1381,7 @@ ti_newbuf_std(struct ti_softc *sc, int i)
struct ti_rx_desc *r;
int error, nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES;
@@ -1436,7 +1436,7 @@ ti_newbuf_mini(struct ti_softc *sc, int i)
struct ti_rx_desc *r;
int error, nsegs;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MHLEN;
@@ -1495,7 +1495,7 @@ ti_newbuf_jumbo(struct ti_softc *sc, int i, struct mbuf *dummy)
(void)dummy;
- m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES);
+ m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MJUM9BYTES;
@@ -1577,19 +1577,19 @@ ti_newbuf_jumbo(struct ti_softc *sc, int idx, struct mbuf *m_old)
}
} else {
/* Allocate the mbufs. */
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
device_printf(sc->ti_dev, "mbuf allocation failed "
"-- packet dropped!\n");
goto nobufs;
}
- MGET(m[NPAYLOAD], M_DONTWAIT, MT_DATA);
+ MGET(m[NPAYLOAD], M_NOWAIT, MT_DATA);
if (m[NPAYLOAD] == NULL) {
device_printf(sc->ti_dev, "cluster mbuf allocation "
"failed -- packet dropped!\n");
goto nobufs;
}
- MCLGET(m[NPAYLOAD], M_DONTWAIT);
+ MCLGET(m[NPAYLOAD], M_NOWAIT);
if ((m[NPAYLOAD]->m_flags & M_EXT) == 0) {
device_printf(sc->ti_dev, "mbuf allocation failed "
"-- packet dropped!\n");
@@ -1598,7 +1598,7 @@ ti_newbuf_jumbo(struct ti_softc *sc, int idx, struct mbuf *m_old)
m[NPAYLOAD]->m_len = MCLBYTES;
for (i = 0; i < NPAYLOAD; i++){
- MGET(m[i], M_DONTWAIT, MT_DATA);
+ MGET(m[i], M_NOWAIT, MT_DATA);
if (m[i] == NULL) {
device_printf(sc->ti_dev, "mbuf allocation "
"failed -- packet dropped!\n");
@@ -3051,7 +3051,7 @@ ti_encap(struct ti_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->ti_cdata.ti_tx_tag, txd->tx_dmamap,
*m_head, txsegs, &nseg, 0);
if (error == EFBIG) {
- m = m_defrag(*m_head, M_DONTWAIT);
+ m = m_defrag(*m_head, M_NOWAIT);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/dev/tl/if_tl.c b/sys/dev/tl/if_tl.c
index 0c8725d..30969e2 100644
--- a/sys/dev/tl/if_tl.c
+++ b/sys/dev/tl/if_tl.c
@@ -1365,7 +1365,7 @@ tl_newbuf(sc, c)
{
struct mbuf *m_new = NULL;
- m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m_new = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m_new == NULL)
return(ENOBUFS);
@@ -1806,13 +1806,13 @@ tl_encap(sc, c, m_head)
if (m != NULL) {
struct mbuf *m_new = NULL;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
if_printf(ifp, "no memory for tx list\n");
return(1);
}
if (m_head->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
if_printf(ifp, "no memory for tx list\n");
diff --git a/sys/dev/tsec/if_tsec.c b/sys/dev/tsec/if_tsec.c
index 1d87b30d..8041776 100644
--- a/sys/dev/tsec/if_tsec.c
+++ b/sys/dev/tsec/if_tsec.c
@@ -727,7 +727,7 @@ tsec_start_locked(struct ifnet *ifp)
csum_flags = m0->m_pkthdr.csum_flags;
if (csum_flags) {
- M_PREPEND(m0, sizeof(struct tsec_tx_fcb), M_DONTWAIT);
+ M_PREPEND(m0, sizeof(struct tsec_tx_fcb), M_NOWAIT);
if (m0 == NULL)
break;
@@ -751,7 +751,7 @@ tsec_start_locked(struct ifnet *ifp)
fcb_inserted = 1;
}
- mtmp = m_defrag(m0, M_DONTWAIT);
+ mtmp = m_defrag(m0, M_NOWAIT);
if (mtmp)
m0 = mtmp;
@@ -1029,7 +1029,7 @@ tsec_new_rxbuf(bus_dma_tag_t tag, bus_dmamap_t map, struct mbuf **mbufp,
KASSERT(mbufp != NULL, ("NULL mbuf pointer!"));
- new_mbuf = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MCLBYTES);
+ new_mbuf = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MCLBYTES);
if (new_mbuf == NULL)
return (ENOBUFS);
new_mbuf->m_len = new_mbuf->m_pkthdr.len = new_mbuf->m_ext.ext_size;
diff --git a/sys/dev/tx/if_tx.c b/sys/dev/tx/if_tx.c
index c977909..66f5480 100644
--- a/sys/dev/tx/if_tx.c
+++ b/sys/dev/tx/if_tx.c
@@ -682,7 +682,7 @@ epic_ifstart_locked(struct ifnet * ifp)
* recopy packet to a newly allocated mbuf cluster.
*/
if (error) {
- m = m_defrag(m0, M_DONTWAIT);
+ m = m_defrag(m0, M_NOWAIT);
if (m == NULL) {
m_freem(m0);
ifp->if_oerrors++;
@@ -761,7 +761,7 @@ epic_rx_done(epic_softc_t *sc)
m = buf->mbuf;
/* Try to get an mbuf cluster. */
- buf->mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ buf->mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (buf->mbuf == NULL) {
buf->mbuf = m;
desc->status = 0x8000;
@@ -1495,7 +1495,7 @@ epic_queue_last_packet(epic_softc_t *sc)
if ((desc->status & 0x8000) || (buf->mbuf != NULL))
return (EBUSY);
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
if (m0 == NULL)
return (ENOBUFS);
@@ -1644,7 +1644,7 @@ epic_init_rings(epic_softc_t *sc)
return (EFAULT);
}
- buf->mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ buf->mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (buf->mbuf == NULL) {
epic_free_rings(sc);
return (ENOBUFS);
diff --git a/sys/dev/txp/if_txp.c b/sys/dev/txp/if_txp.c
index e51489f..bc6f016 100644
--- a/sys/dev/txp/if_txp.c
+++ b/sys/dev/txp/if_txp.c
@@ -1015,7 +1015,7 @@ txp_rxbuf_reclaim(struct txp_softc *sc)
break;
rbd = sc->sc_rxbufs + prod;
bcopy((u_long *)&rbd->rb_vaddrlo, &sd, sizeof(sd));
- sd->sd_mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ sd->sd_mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (sd->sd_mbuf == NULL)
break;
sd->sd_mbuf->m_pkthdr.len = sd->sd_mbuf->m_len = MCLBYTES;
@@ -1792,7 +1792,7 @@ txp_rxring_fill(struct txp_softc *sc)
bcopy(&sd, (u_long *)&rbd->rb_vaddrlo, sizeof(sd));
KASSERT(sd->sd_mbuf == NULL,
("%s : Rx buffer ring corrupted", __func__));
- sd->sd_mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ sd->sd_mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (sd->sd_mbuf == NULL)
return (ENOMEM);
sd->sd_mbuf->m_pkthdr.len = sd->sd_mbuf->m_len = MCLBYTES;
@@ -2105,7 +2105,7 @@ txp_encap(struct txp_softc *sc, struct txp_tx_ring *r, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->sc_cdata.txp_tx_tag, sd->sd_map,
*m_head, txsegs, &nsegs, 0);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, TXP_MAXTXSEGS);
+ m = m_collapse(*m_head, M_NOWAIT, TXP_MAXTXSEGS);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/dev/uart/uart_bus_fdt.c b/sys/dev/uart/uart_bus_fdt.c
index 8dbbb25..b55329e 100644
--- a/sys/dev/uart/uart_bus_fdt.c
+++ b/sys/dev/uart/uart_bus_fdt.c
@@ -206,8 +206,10 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di)
err = fdt_regsize(node, &start, &size);
if (err)
return (ENXIO);
+ err = fdt_get_range(OF_parent(node), 0, &pbase, &psize);
+ if (err)
+ pbase = 0;
- fdt_get_range(OF_parent(node), 0, &pbase, &psize);
start += pbase;
return (bus_space_map(di->bas.bst, start, size, 0, &di->bas.bsh));
diff --git a/sys/dev/ubsec/ubsec.c b/sys/dev/ubsec/ubsec.c
index ee5a5b9..40e6d5e 100644
--- a/sys/dev/ubsec/ubsec.c
+++ b/sys/dev/ubsec/ubsec.c
@@ -1375,18 +1375,18 @@ ubsec_process(device_t dev, struct cryptop *crp, int hint)
ubsecstats.hst_unaligned++;
totlen = q->q_src_mapsize;
if (totlen >= MINCLSIZE) {
- m = m_getcl(M_DONTWAIT, MT_DATA,
+ m = m_getcl(M_NOWAIT, MT_DATA,
q->q_src_m->m_flags & M_PKTHDR);
len = MCLBYTES;
} else if (q->q_src_m->m_flags & M_PKTHDR) {
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
len = MHLEN;
} else {
- m = m_get(M_DONTWAIT, MT_DATA);
+ m = m_get(M_NOWAIT, MT_DATA);
len = MLEN;
}
if (m && q->q_src_m->m_flags & M_PKTHDR &&
- !m_dup_pkthdr(m, q->q_src_m, M_DONTWAIT)) {
+ !m_dup_pkthdr(m, q->q_src_m, M_NOWAIT)) {
m_free(m);
m = NULL;
}
@@ -1402,11 +1402,11 @@ ubsec_process(device_t dev, struct cryptop *crp, int hint)
while (totlen > 0) {
if (totlen >= MINCLSIZE) {
- m = m_getcl(M_DONTWAIT,
+ m = m_getcl(M_NOWAIT,
MT_DATA, 0);
len = MCLBYTES;
} else {
- m = m_get(M_DONTWAIT, MT_DATA);
+ m = m_get(M_NOWAIT, MT_DATA);
len = MLEN;
}
if (m == NULL) {
diff --git a/sys/dev/usb/misc/udbp.c b/sys/dev/usb/misc/udbp.c
index 150985e..56f86ae 100644
--- a/sys/dev/usb/misc/udbp.c
+++ b/sys/dev/usb/misc/udbp.c
@@ -410,12 +410,12 @@ udbp_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error)
/* allocate new mbuf */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
goto tr_setup;
}
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!(m->m_flags & M_EXT)) {
m_freem(m);
diff --git a/sys/dev/usb/net/if_axe.c b/sys/dev/usb/net/if_axe.c
index 2f9929f..694e5a5 100644
--- a/sys/dev/usb/net/if_axe.c
+++ b/sys/dev/usb/net/if_axe.c
@@ -1114,7 +1114,7 @@ axe_rxeof(struct usb_ether *ue, struct usb_page_cache *pc, unsigned int offset,
return (EINVAL);
}
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) {
ifp->if_iqdrops++;
return (ENOMEM);
diff --git a/sys/dev/usb/net/if_cdce.c b/sys/dev/usb/net/if_cdce.c
index 780efe8..6e0ce97 100644
--- a/sys/dev/usb/net/if_cdce.c
+++ b/sys/dev/usb/net/if_cdce.c
@@ -753,7 +753,7 @@ tr_setup:
}
}
if (m->m_len != m->m_pkthdr.len) {
- mt = m_defrag(m, M_DONTWAIT);
+ mt = m_defrag(m, M_NOWAIT);
if (mt == NULL) {
m_freem(m);
ifp->if_oerrors++;
@@ -1369,9 +1369,9 @@ cdce_ncm_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error)
/* silently ignore this frame */
continue;
} else if (temp > (int)(MHLEN - ETHER_ALIGN)) {
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
} else {
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
}
DPRINTFN(16, "frame %u, offset = %u, length = %u \n",
diff --git a/sys/dev/usb/net/if_usie.c b/sys/dev/usb/net/if_usie.c
index cdbdd6b..f3dbd9e 100644
--- a/sys/dev/usb/net/if_usie.c
+++ b/sys/dev/usb/net/if_usie.c
@@ -796,7 +796,7 @@ usie_if_rx_callback(struct usb_xfer *xfer, usb_error_t error)
tr_setup:
if (sc->sc_rxm == NULL) {
- sc->sc_rxm = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR,
+ sc->sc_rxm = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR,
MJUMPAGESIZE /* could be bigger than MCLBYTES */ );
}
if (sc->sc_rxm == NULL) {
@@ -892,7 +892,7 @@ tr_setup:
break;
}
/* copy aggregated frames to another mbuf */
- m0 = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m0 = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (__predict_false(m0 == NULL)) {
DPRINTF("could not allocate mbuf\n");
err++;
@@ -1388,7 +1388,7 @@ usie_cns_req(struct usie_softc *sc, uint32_t id, uint16_t obj)
uint8_t *tmp;
uint8_t cns_len;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (__predict_false(m == NULL)) {
DPRINTF("could not allocate mbuf\n");
ifp->if_ierrors++;
diff --git a/sys/dev/usb/net/uhso.c b/sys/dev/usb/net/uhso.c
index 40dd1f4..96c6335 100644
--- a/sys/dev/usb/net/uhso.c
+++ b/sys/dev/usb/net/uhso.c
@@ -1619,7 +1619,7 @@ uhso_ifnet_read_callback(struct usb_xfer *xfer, usb_error_t error)
case USB_ST_TRANSFERRED:
if (actlen > 0 && (sc->sc_ifp->if_drv_flags & IFF_DRV_RUNNING)) {
pc = usbd_xfer_get_frame(xfer, 0);
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
usbd_copy_out(pc, 0, mtod(m, uint8_t *), actlen);
m->m_pkthdr.len = m->m_len = actlen;
/* Enqueue frame for further processing */
@@ -1752,13 +1752,13 @@ uhso_if_rxflush(void *arg)
* Allocate a new mbuf for this IP packet and
* copy the IP-packet into it.
*/
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
memcpy(mtod(m, uint8_t *), mtod(m0, uint8_t *), iplen);
m->m_pkthdr.len = m->m_len = iplen;
/* Adjust the size of the original mbuf */
m_adj(m0, iplen);
- m0 = m_defrag(m0, M_WAIT);
+ m0 = m_defrag(m0, M_WAITOK);
UHSO_DPRINTF(3, "New mbuf=%p, len=%d/%d, m0=%p, "
"m0_len=%d/%d\n", m, m->m_pkthdr.len, m->m_len,
diff --git a/sys/dev/usb/net/usb_ethernet.c b/sys/dev/usb/net/usb_ethernet.c
index 2a7bddf..2f17959 100644
--- a/sys/dev/usb/net/usb_ethernet.c
+++ b/sys/dev/usb/net/usb_ethernet.c
@@ -557,7 +557,7 @@ uether_newbuf(void)
{
struct mbuf *m_new;
- m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m_new = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m_new == NULL)
return (NULL);
m_new->m_len = m_new->m_pkthdr.len = MCLBYTES;
diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c
index 8f35584..b8f07aa 100644
--- a/sys/dev/usb/quirk/usb_quirk.c
+++ b/sys/dev/usb/quirk/usb_quirk.c
@@ -482,6 +482,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = {
* after issuing non-supported commands:
*/
USB_QUIRK(ALCOR, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_TEST_UNIT_READY, UQ_MATCH_VENDOR_ONLY),
+ USB_QUIRK(APPLE, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY),
USB_QUIRK(FEIYA, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY),
USB_QUIRK(REALTEK, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY),
USB_QUIRK(INITIO, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY),
diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c
index aae42e5..dc670d66 100644
--- a/sys/dev/usb/serial/u3g.c
+++ b/sys/dev/usb/serial/u3g.c
@@ -342,6 +342,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = {
U3G_DEV(NOVATEL, MC760, 0),
U3G_DEV(NOVATEL, MC547, 0),
U3G_DEV(NOVATEL, MC950D, 0),
+ U3G_DEV(NOVATEL, MIFI2200, U3GINIT_SCSIEJECT),
U3G_DEV(NOVATEL, U720, 0),
U3G_DEV(NOVATEL, U727, 0),
U3G_DEV(NOVATEL, U727_2, 0),
@@ -553,6 +554,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = {
U3G_DEV(TOSHIBA, G450, 0),
U3G_DEV(TOSHIBA, HSDPA, 0),
U3G_DEV(YISO, C893, 0),
+ U3G_DEV(WETELECOM, WM_D200, 0),
/* Autoinstallers */
U3G_DEV(NOVATEL, ZEROCD, U3GINIT_SCSIEJECT),
U3G_DEV(OPTION, GTICON322, U3GINIT_REZERO),
diff --git a/sys/dev/usb/serial/usb_serial.c b/sys/dev/usb/serial/usb_serial.c
index 2047bc3..3bf6ee0 100644
--- a/sys/dev/usb/serial/usb_serial.c
+++ b/sys/dev/usb/serial/usb_serial.c
@@ -797,10 +797,14 @@ ucom_inwakeup(struct tty *tp)
DPRINTF("tp=%p\n", tp);
if (ttydisc_can_bypass(tp) != 0 ||
- (sc->sc_flag & UCOM_FLAG_HL_READY) == 0) {
+ (sc->sc_flag & UCOM_FLAG_HL_READY) == 0 ||
+ (sc->sc_flag & UCOM_FLAG_INWAKEUP) != 0) {
return;
}
+ /* prevent recursion */
+ sc->sc_flag |= UCOM_FLAG_INWAKEUP;
+
pos = sc->sc_jitterbuf_out;
while (sc->sc_jitterbuf_in != pos) {
@@ -821,6 +825,8 @@ ucom_inwakeup(struct tty *tp)
if ((sc->sc_jitterbuf_in == pos) &&
(sc->sc_flag & UCOM_FLAG_RTS_IFLOW))
ucom_rts(sc, 0);
+
+ sc->sc_flag &= ~UCOM_FLAG_INWAKEUP;
}
static int
diff --git a/sys/dev/usb/serial/usb_serial.h b/sys/dev/usb/serial/usb_serial.h
index d045fbe..0ac822d 100644
--- a/sys/dev/usb/serial/usb_serial.h
+++ b/sys/dev/usb/serial/usb_serial.h
@@ -183,6 +183,7 @@ struct ucom_softc {
#define UCOM_FLAG_CONSOLE 0x80 /* set if device is a console */
#define UCOM_FLAG_WAIT_REFS 0x0100 /* set if we must wait for refs */
#define UCOM_FLAG_FREE_UNIT 0x0200 /* set if we must free the unit */
+#define UCOM_FLAG_INWAKEUP 0x0400 /* set if we are in the tsw_inwakeup callback */
uint8_t sc_lsr;
uint8_t sc_msr;
uint8_t sc_mcr;
diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c
index 178c68b..48ae389 100644
--- a/sys/dev/usb/storage/umass.c
+++ b/sys/dev/usb/storage/umass.c
@@ -163,12 +163,16 @@ __FBSDID("$FreeBSD$");
#define UDMASS_CBI 0x00400000 /* CBI transfers */
#define UDMASS_WIRE (UDMASS_BBB|UDMASS_CBI)
#define UDMASS_ALL 0xffff0000 /* all of the above */
-static int umass_debug = 0;
+static int umass_debug;
+static int umass_throttle;
static SYSCTL_NODE(_hw_usb, OID_AUTO, umass, CTLFLAG_RW, 0, "USB umass");
SYSCTL_INT(_hw_usb_umass, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN,
&umass_debug, 0, "umass debug level");
TUNABLE_INT("hw.usb.umass.debug", &umass_debug);
+SYSCTL_INT(_hw_usb_umass, OID_AUTO, throttle, CTLFLAG_RW | CTLFLAG_TUN,
+ &umass_throttle, 0, "Forced delay between commands in milliseconds");
+TUNABLE_INT("hw.usb.umass.throttle", &umass_throttle);
#else
#define DIF(...) do { } while (0)
#define DPRINTF(...) do { } while (0)
@@ -881,7 +885,7 @@ umass_attach(device_t dev)
struct usb_attach_arg *uaa = device_get_ivars(dev);
struct umass_probe_proto temp = umass_probe_proto(dev, uaa);
struct usb_interface_descriptor *id;
- int32_t err;
+ int err;
/*
* NOTE: the softc struct is cleared in device_set_driver.
@@ -994,6 +998,24 @@ umass_attach(device_t dev)
"transfers, %s\n", usbd_errstr(err));
goto detach;
}
+#ifdef USB_DEBUG
+ if (umass_throttle > 0) {
+ uint8_t x;
+ int iv;
+
+ iv = umass_throttle;
+
+ if (iv < 1)
+ iv = 1;
+ else if (iv > 8000)
+ iv = 8000;
+
+ for (x = 0; x != UMASS_T_MAX; x++) {
+ if (sc->sc_xfer[x] != NULL)
+ usbd_xfer_set_interval(sc->sc_xfer[x], iv);
+ }
+ }
+#endif
sc->sc_transform =
(sc->sc_proto & UMASS_PROTO_SCSI) ? &umass_scsi_transform :
(sc->sc_proto & UMASS_PROTO_UFI) ? &umass_ufi_transform :
diff --git a/sys/dev/usb/storage/ustorage_fs.c b/sys/dev/usb/storage/ustorage_fs.c
index c874999..df89619 100644
--- a/sys/dev/usb/storage/ustorage_fs.c
+++ b/sys/dev/usb/storage/ustorage_fs.c
@@ -74,7 +74,7 @@ SYSCTL_INT(_hw_usb_ustorage_fs, OID_AUTO, debug, CTLFLAG_RW,
/* Define some limits */
#ifndef USTORAGE_FS_BULK_SIZE
-#define USTORAGE_FS_BULK_SIZE (1UL << 17) /* bytes */
+#define USTORAGE_FS_BULK_SIZE (1U << 17) /* bytes */
#endif
#ifndef USTORAGE_FS_MAX_LUN
@@ -85,8 +85,6 @@ SYSCTL_INT(_hw_usb_ustorage_fs, OID_AUTO, debug, CTLFLAG_RW,
#define USTORAGE_QDATA_MAX 40 /* bytes */
#endif
-#define sc_cmd_data sc_cbw.CBWCDB
-
/*
* The SCSI ID string must be exactly 28 characters long
* exluding the terminating zero.
@@ -176,8 +174,9 @@ struct ustorage_fs_lun {
struct ustorage_fs_softc {
- ustorage_fs_bbb_cbw_t sc_cbw; /* Command Wrapper Block */
- ustorage_fs_bbb_csw_t sc_csw; /* Command Status Block */
+ ustorage_fs_bbb_cbw_t *sc_cbw; /* Command Wrapper Block */
+ ustorage_fs_bbb_csw_t *sc_csw; /* Command Status Block */
+ void *sc_dma_ptr; /* Main data buffer */
struct mtx sc_mtx;
@@ -275,7 +274,6 @@ static struct usb_config ustorage_fs_bbb_config[USTORAGE_FS_T_BBB_MAX] = {
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_OUT,
.bufsize = sizeof(ustorage_fs_bbb_cbw_t),
- .flags = {.ext_buffer = 1,},
.callback = &ustorage_fs_t_bbb_command_callback,
.usb_mode = USB_MODE_DEVICE,
},
@@ -295,7 +293,7 @@ static struct usb_config ustorage_fs_bbb_config[USTORAGE_FS_T_BBB_MAX] = {
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_OUT,
.bufsize = USTORAGE_FS_BULK_SIZE,
- .flags = {.proxy_buffer = 1,.short_xfer_ok = 1,.ext_buffer = 1},
+ .flags = {.proxy_buffer = 1,.short_xfer_ok = 1},
.callback = &ustorage_fs_t_bbb_data_read_callback,
.usb_mode = USB_MODE_DEVICE,
},
@@ -315,7 +313,7 @@ static struct usb_config ustorage_fs_bbb_config[USTORAGE_FS_T_BBB_MAX] = {
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_IN,
.bufsize = sizeof(ustorage_fs_bbb_csw_t),
- .flags = {.short_xfer_ok = 1,.ext_buffer = 1,},
+ .flags = {.short_xfer_ok = 1},
.callback = &ustorage_fs_t_bbb_status_callback,
.usb_mode = USB_MODE_DEVICE,
},
@@ -409,6 +407,14 @@ ustorage_fs_attach(device_t dev)
"transfers, %s\n", usbd_errstr(err));
goto detach;
}
+
+ sc->sc_cbw = usbd_xfer_get_frame_buffer(sc->sc_xfer[
+ USTORAGE_FS_T_BBB_COMMAND], 0);
+ sc->sc_csw = usbd_xfer_get_frame_buffer(sc->sc_xfer[
+ USTORAGE_FS_T_BBB_STATUS], 0);
+ sc->sc_dma_ptr = usbd_xfer_get_frame_buffer(sc->sc_xfer[
+ USTORAGE_FS_T_BBB_DATA_READ], 0);
+
/* start Mass Storage State Machine */
mtx_lock(&sc->sc_mtx);
@@ -518,44 +524,44 @@ ustorage_fs_t_bbb_command_callback(struct usb_xfer *xfer, usb_error_t error)
switch (USB_GET_STATE(xfer)) {
case USB_ST_TRANSFERRED:
- tag = UGETDW(sc->sc_cbw.dCBWSignature);
+ tag = UGETDW(sc->sc_cbw->dCBWSignature);
if (tag != CBWSIGNATURE) {
/* do nothing */
DPRINTF("invalid signature 0x%08x\n", tag);
break;
}
- tag = UGETDW(sc->sc_cbw.dCBWTag);
+ tag = UGETDW(sc->sc_cbw->dCBWTag);
/* echo back tag */
- USETDW(sc->sc_csw.dCSWTag, tag);
+ USETDW(sc->sc_csw->dCSWTag, tag);
/* reset status */
- sc->sc_csw.bCSWStatus = 0;
+ sc->sc_csw->bCSWStatus = 0;
/* reset data offset, data length and data remainder */
sc->sc_transfer.offset = 0;
sc->sc_transfer.data_rem =
- UGETDW(sc->sc_cbw.dCBWDataTransferLength);
+ UGETDW(sc->sc_cbw->dCBWDataTransferLength);
/* reset data flags */
sc->sc_transfer.data_short = 0;
/* extract LUN */
- sc->sc_transfer.lun = sc->sc_cbw.bCBWLUN;
+ sc->sc_transfer.lun = sc->sc_cbw->bCBWLUN;
if (sc->sc_transfer.data_rem == 0) {
sc->sc_transfer.cbw_dir = DIR_NONE;
} else {
- if (sc->sc_cbw.bCBWFlags & CBWFLAGS_IN) {
+ if (sc->sc_cbw->bCBWFlags & CBWFLAGS_IN) {
sc->sc_transfer.cbw_dir = DIR_WRITE;
} else {
sc->sc_transfer.cbw_dir = DIR_READ;
}
}
- sc->sc_transfer.cmd_len = sc->sc_cbw.bCDBLength;
- if ((sc->sc_transfer.cmd_len > sizeof(sc->sc_cbw.CBWCDB)) ||
+ sc->sc_transfer.cmd_len = sc->sc_cbw->bCDBLength;
+ if ((sc->sc_transfer.cmd_len > sizeof(sc->sc_cbw->CBWCDB)) ||
(sc->sc_transfer.cmd_len == 0)) {
/* just halt - this is invalid */
DPRINTF("invalid command length %d bytes\n",
@@ -597,9 +603,8 @@ tr_setup:
usbd_xfer_set_stall(xfer);
DPRINTF("stall pipe\n");
}
-
- usbd_xfer_set_frame_data(xfer, 0, &sc->sc_cbw,
- sizeof(sc->sc_cbw));
+ usbd_xfer_set_frame_len(xfer, 0,
+ sizeof(ustorage_fs_bbb_cbw_t));
usbd_transfer_submit(xfer);
break;
@@ -616,9 +621,9 @@ tr_setup:
goto tr_setup;
}
if (err) {
- if (sc->sc_csw.bCSWStatus == 0) {
+ if (sc->sc_csw->bCSWStatus == 0) {
/* set some default error code */
- sc->sc_csw.bCSWStatus = CSWSTATUS_FAILED;
+ sc->sc_csw->bCSWStatus = CSWSTATUS_FAILED;
}
if (sc->sc_transfer.cbw_dir == DIR_READ) {
/* dump all data */
@@ -699,6 +704,9 @@ ustorage_fs_t_bbb_data_read_callback(struct usb_xfer *xfer, usb_error_t error)
switch (USB_GET_STATE(xfer)) {
case USB_ST_TRANSFERRED:
+ /* XXX copy data from DMA buffer */
+ memcpy(sc->sc_transfer.data_ptr, sc->sc_dma_ptr, actlen);
+
sc->sc_transfer.data_rem -= actlen;
sc->sc_transfer.data_ptr += actlen;
sc->sc_transfer.offset += actlen;
@@ -721,8 +729,7 @@ tr_setup:
usbd_xfer_set_stall(xfer);
}
- usbd_xfer_set_frame_data(xfer, 0, sc->sc_transfer.data_ptr,
- max_bulk);
+ usbd_xfer_set_frame_data(xfer, 0, sc->sc_dma_ptr, max_bulk);
usbd_transfer_submit(xfer);
break;
@@ -778,8 +785,10 @@ tr_setup:
usbd_xfer_set_stall(xfer);
}
- usbd_xfer_set_frame_data(xfer, 0, sc->sc_transfer.data_ptr,
- max_bulk);
+ /* XXX copy data to DMA buffer */
+ memcpy(sc->sc_dma_ptr, sc->sc_transfer.data_ptr, max_bulk);
+
+ usbd_xfer_set_frame_data(xfer, 0, sc->sc_dma_ptr, max_bulk);
usbd_transfer_submit(xfer);
break;
@@ -813,16 +822,15 @@ ustorage_fs_t_bbb_status_callback(struct usb_xfer *xfer, usb_error_t error)
case USB_ST_SETUP:
tr_setup:
- USETDW(sc->sc_csw.dCSWSignature, CSWSIGNATURE);
- USETDW(sc->sc_csw.dCSWDataResidue, sc->sc_transfer.data_rem);
+ USETDW(sc->sc_csw->dCSWSignature, CSWSIGNATURE);
+ USETDW(sc->sc_csw->dCSWDataResidue, sc->sc_transfer.data_rem);
if (sc->sc_transfer.data_error) {
sc->sc_transfer.data_error = 0;
usbd_xfer_set_stall(xfer);
}
-
- usbd_xfer_set_frame_data(xfer, 0, &sc->sc_csw,
- sizeof(sc->sc_csw));
+ usbd_xfer_set_frame_len(xfer, 0,
+ sizeof(ustorage_fs_bbb_csw_t));
usbd_transfer_submit(xfer);
break;
@@ -934,17 +942,17 @@ ustorage_fs_verify(struct ustorage_fs_softc *sc)
/*
* Get the starting Logical Block Address
*/
- lba = get_be32(&sc->sc_cmd_data[2]);
+ lba = get_be32(&sc->sc_cbw->CBWCDB[2]);
/*
* We allow DPO (Disable Page Out = don't save data in the cache)
* but we don't implement it.
*/
- if ((sc->sc_cmd_data[1] & ~0x10) != 0) {
+ if ((sc->sc_cbw->CBWCDB[1] & ~0x10) != 0) {
currlun->sense_data = SS_INVALID_FIELD_IN_CDB;
return (1);
}
- vlen = get_be16(&sc->sc_cmd_data[7]);
+ vlen = get_be16(&sc->sc_cbw->CBWCDB[7]);
if (vlen == 0) {
goto done;
}
@@ -1092,8 +1100,8 @@ ustorage_fs_read_capacity(struct ustorage_fs_softc *sc)
{
uint8_t *buf = sc->sc_transfer.data_ptr;
struct ustorage_fs_lun *currlun = sc->sc_transfer.currlun;
- uint32_t lba = get_be32(&sc->sc_cmd_data[2]);
- uint8_t pmi = sc->sc_cmd_data[8];
+ uint32_t lba = get_be32(&sc->sc_cbw->CBWCDB[2]);
+ uint8_t pmi = sc->sc_cbw->CBWCDB[8];
/* Check the PMI and LBA fields */
if ((pmi > 1) || ((pmi == 0) && (lba != 0))) {
@@ -1126,7 +1134,7 @@ ustorage_fs_mode_sense(struct ustorage_fs_softc *sc)
uint8_t *buf0;
uint16_t len;
uint16_t limit;
- uint8_t mscmnd = sc->sc_cmd_data[0];
+ uint8_t mscmnd = sc->sc_cbw->CBWCDB[0];
uint8_t pc;
uint8_t page_code;
uint8_t changeable_values;
@@ -1134,13 +1142,13 @@ ustorage_fs_mode_sense(struct ustorage_fs_softc *sc)
buf0 = buf;
- if ((sc->sc_cmd_data[1] & ~0x08) != 0) {
+ if ((sc->sc_cbw->CBWCDB[1] & ~0x08) != 0) {
/* Mask away DBD */
currlun->sense_data = SS_INVALID_FIELD_IN_CDB;
return (1);
}
- pc = sc->sc_cmd_data[2] >> 6;
- page_code = sc->sc_cmd_data[2] & 0x3f;
+ pc = sc->sc_cbw->CBWCDB[2] >> 6;
+ page_code = sc->sc_cbw->CBWCDB[2] & 0x3f;
if (pc == 3) {
currlun->sense_data = SS_SAVING_PARAMETERS_NOT_SUPPORTED;
return (1);
@@ -1237,9 +1245,9 @@ ustorage_fs_start_stop(struct ustorage_fs_softc *sc)
currlun->sense_data = SS_INVALID_COMMAND;
return (1);
}
- immed = sc->sc_cmd_data[1] & 0x01;
- loej = sc->sc_cmd_data[4] & 0x02;
- start = sc->sc_cmd_data[4] & 0x01;
+ immed = sc->sc_cbw->CBWCDB[1] & 0x01;
+ loej = sc->sc_cbw->CBWCDB[4] & 0x02;
+ start = sc->sc_cbw->CBWCDB[4] & 0x01;
if (immed || loej || start) {
/* compile fix */
@@ -1264,8 +1272,8 @@ ustorage_fs_prevent_allow(struct ustorage_fs_softc *sc)
currlun->sense_data = SS_INVALID_COMMAND;
return (1);
}
- prevent = sc->sc_cmd_data[4] & 0x01;
- if ((sc->sc_cmd_data[4] & ~0x01) != 0) {
+ prevent = sc->sc_cbw->CBWCDB[4] & 0x01;
+ if ((sc->sc_cbw->CBWCDB[4] & ~0x01) != 0) {
/* Mask away Prevent */
currlun->sense_data = SS_INVALID_FIELD_IN_CDB;
return (1);
@@ -1369,18 +1377,18 @@ ustorage_fs_read(struct ustorage_fs_softc *sc)
* Get the starting Logical Block Address and check that it's not
* too big
*/
- if (sc->sc_cmd_data[0] == SC_READ_6) {
- lba = (((uint32_t)sc->sc_cmd_data[1]) << 16) |
- get_be16(&sc->sc_cmd_data[2]);
+ if (sc->sc_cbw->CBWCDB[0] == SC_READ_6) {
+ lba = (((uint32_t)sc->sc_cbw->CBWCDB[1]) << 16) |
+ get_be16(&sc->sc_cbw->CBWCDB[2]);
} else {
- lba = get_be32(&sc->sc_cmd_data[2]);
+ lba = get_be32(&sc->sc_cbw->CBWCDB[2]);
/*
* We allow DPO (Disable Page Out = don't save data in the
* cache) and FUA (Force Unit Access = don't read from the
* cache), but we don't implement them.
*/
- if ((sc->sc_cmd_data[1] & ~0x18) != 0) {
+ if ((sc->sc_cbw->CBWCDB[1] & ~0x18) != 0) {
currlun->sense_data = SS_INVALID_FIELD_IN_CDB;
return (1);
}
@@ -1427,11 +1435,11 @@ ustorage_fs_write(struct ustorage_fs_softc *sc)
* Get the starting Logical Block Address and check that it's not
* too big.
*/
- if (sc->sc_cmd_data[0] == SC_WRITE_6)
- lba = (((uint32_t)sc->sc_cmd_data[1]) << 16) |
- get_be16(&sc->sc_cmd_data[2]);
+ if (sc->sc_cbw->CBWCDB[0] == SC_WRITE_6)
+ lba = (((uint32_t)sc->sc_cbw->CBWCDB[1]) << 16) |
+ get_be16(&sc->sc_cbw->CBWCDB[2]);
else {
- lba = get_be32(&sc->sc_cmd_data[2]);
+ lba = get_be32(&sc->sc_cbw->CBWCDB[2]);
/*
* We allow DPO (Disable Page Out = don't save data in the
@@ -1439,11 +1447,11 @@ ustorage_fs_write(struct ustorage_fs_softc *sc)
* medium). We don't implement DPO; we implement FUA by
* performing synchronous output.
*/
- if ((sc->sc_cmd_data[1] & ~0x18) != 0) {
+ if ((sc->sc_cbw->CBWCDB[1] & ~0x18) != 0) {
currlun->sense_data = SS_INVALID_FIELD_IN_CDB;
return (1);
}
- if (sc->sc_cmd_data[1] & 0x08) {
+ if (sc->sc_cbw->CBWCDB[1] & 0x08) {
/* FUA */
/* XXX set SYNC flag here */
}
@@ -1483,7 +1491,7 @@ ustorage_fs_min_len(struct ustorage_fs_softc *sc, uint32_t len, uint32_t mask)
* there must be something wrong about this SCSI
* command
*/
- sc->sc_csw.bCSWStatus = CSWSTATUS_PHASE;
+ sc->sc_csw->bCSWStatus = CSWSTATUS_PHASE;
return (1);
}
/* compute the minimum length */
@@ -1519,18 +1527,18 @@ ustorage_fs_check_cmd(struct ustorage_fs_softc *sc, uint8_t min_cmd_size,
uint16_t mask, uint8_t needs_medium)
{
struct ustorage_fs_lun *currlun;
- uint8_t lun = (sc->sc_cmd_data[1] >> 5);
+ uint8_t lun = (sc->sc_cbw->CBWCDB[1] >> 5);
uint8_t i;
/* Verify the length of the command itself */
if (min_cmd_size > sc->sc_transfer.cmd_len) {
DPRINTF("%u > %u\n",
min_cmd_size, sc->sc_transfer.cmd_len);
- sc->sc_csw.bCSWStatus = CSWSTATUS_PHASE;
+ sc->sc_csw->bCSWStatus = CSWSTATUS_PHASE;
return (1);
}
/* Mask away the LUN */
- sc->sc_cmd_data[1] &= 0x1f;
+ sc->sc_cbw->CBWCDB[1] &= 0x1f;
/* Check if LUN is correct */
if (lun != sc->sc_transfer.lun) {
@@ -1540,7 +1548,7 @@ ustorage_fs_check_cmd(struct ustorage_fs_softc *sc, uint8_t min_cmd_size,
if (sc->sc_transfer.lun <= sc->sc_last_lun) {
sc->sc_transfer.currlun = currlun =
sc->sc_lun + sc->sc_transfer.lun;
- if (sc->sc_cmd_data[0] != SC_REQUEST_SENSE) {
+ if (sc->sc_cbw->CBWCDB[0] != SC_REQUEST_SENSE) {
currlun->sense_data = SS_NO_SENSE;
currlun->sense_data_info = 0;
currlun->info_valid = 0;
@@ -1551,8 +1559,8 @@ ustorage_fs_check_cmd(struct ustorage_fs_softc *sc, uint8_t min_cmd_size,
* else must fail!
*/
if ((currlun->unit_attention_data != SS_NO_SENSE) &&
- (sc->sc_cmd_data[0] != SC_INQUIRY) &&
- (sc->sc_cmd_data[0] != SC_REQUEST_SENSE)) {
+ (sc->sc_cbw->CBWCDB[0] != SC_INQUIRY) &&
+ (sc->sc_cbw->CBWCDB[0] != SC_REQUEST_SENSE)) {
currlun->sense_data = currlun->unit_attention_data;
currlun->unit_attention_data = SS_NO_SENSE;
return (1);
@@ -1564,8 +1572,8 @@ ustorage_fs_check_cmd(struct ustorage_fs_softc *sc, uint8_t min_cmd_size,
* INQUIRY and REQUEST SENSE commands are explicitly allowed
* to use unsupported LUNs; all others may not.
*/
- if ((sc->sc_cmd_data[0] != SC_INQUIRY) &&
- (sc->sc_cmd_data[0] != SC_REQUEST_SENSE)) {
+ if ((sc->sc_cbw->CBWCDB[0] != SC_INQUIRY) &&
+ (sc->sc_cbw->CBWCDB[0] != SC_REQUEST_SENSE)) {
return (1);
}
}
@@ -1575,7 +1583,7 @@ ustorage_fs_check_cmd(struct ustorage_fs_softc *sc, uint8_t min_cmd_size,
* non-zero.
*/
for (i = 0; i != min_cmd_size; i++) {
- if (sc->sc_cmd_data[i] && !(mask & (1UL << i))) {
+ if (sc->sc_cbw->CBWCDB[i] && !(mask & (1UL << i))) {
if (currlun) {
currlun->sense_data = SS_INVALID_FIELD_IN_CDB;
}
@@ -1613,12 +1621,12 @@ ustorage_fs_do_cmd(struct ustorage_fs_softc *sc)
sc->sc_transfer.data_ptr = sc->sc_qdata;
DPRINTF("cmd_data[0]=0x%02x, data_rem=0x%08x\n",
- sc->sc_cmd_data[0], sc->sc_transfer.data_rem);
+ sc->sc_cbw->CBWCDB[0], sc->sc_transfer.data_rem);
- switch (sc->sc_cmd_data[0]) {
+ switch (sc->sc_cbw->CBWCDB[0]) {
case SC_INQUIRY:
sc->sc_transfer.cmd_dir = DIR_WRITE;
- error = ustorage_fs_min_len(sc, sc->sc_cmd_data[4], -1U);
+ error = ustorage_fs_min_len(sc, sc->sc_cbw->CBWCDB[4], -1U);
if (error) {
break;
}
@@ -1633,7 +1641,7 @@ ustorage_fs_do_cmd(struct ustorage_fs_softc *sc)
case SC_MODE_SELECT_6:
sc->sc_transfer.cmd_dir = DIR_READ;
- error = ustorage_fs_min_len(sc, sc->sc_cmd_data[4], -1U);
+ error = ustorage_fs_min_len(sc, sc->sc_cbw->CBWCDB[4], -1U);
if (error) {
break;
}
@@ -1649,7 +1657,7 @@ ustorage_fs_do_cmd(struct ustorage_fs_softc *sc)
case SC_MODE_SELECT_10:
sc->sc_transfer.cmd_dir = DIR_READ;
error = ustorage_fs_min_len(sc,
- get_be16(&sc->sc_cmd_data[7]), -1U);
+ get_be16(&sc->sc_cbw->CBWCDB[7]), -1U);
if (error) {
break;
}
@@ -1664,7 +1672,7 @@ ustorage_fs_do_cmd(struct ustorage_fs_softc *sc)
case SC_MODE_SENSE_6:
sc->sc_transfer.cmd_dir = DIR_WRITE;
- error = ustorage_fs_min_len(sc, sc->sc_cmd_data[4], -1U);
+ error = ustorage_fs_min_len(sc, sc->sc_cbw->CBWCDB[4], -1U);
if (error) {
break;
}
@@ -1680,7 +1688,7 @@ ustorage_fs_do_cmd(struct ustorage_fs_softc *sc)
case SC_MODE_SENSE_10:
sc->sc_transfer.cmd_dir = DIR_WRITE;
error = ustorage_fs_min_len(sc,
- get_be16(&sc->sc_cmd_data[7]), -1U);
+ get_be16(&sc->sc_cbw->CBWCDB[7]), -1U);
if (error) {
break;
}
@@ -1708,7 +1716,7 @@ ustorage_fs_do_cmd(struct ustorage_fs_softc *sc)
break;
case SC_READ_6:
- i = sc->sc_cmd_data[4];
+ i = sc->sc_cbw->CBWCDB[4];
sc->sc_transfer.cmd_dir = DIR_WRITE;
temp = ((i == 0) ? 256UL : i);
error = ustorage_fs_min_len(sc, temp << 9, mask9);
@@ -1726,7 +1734,7 @@ ustorage_fs_do_cmd(struct ustorage_fs_softc *sc)
case SC_READ_10:
sc->sc_transfer.cmd_dir = DIR_WRITE;
- temp = get_be16(&sc->sc_cmd_data[7]);
+ temp = get_be16(&sc->sc_cbw->CBWCDB[7]);
error = ustorage_fs_min_len(sc, temp << 9, mask9);
if (error) {
break;
@@ -1742,10 +1750,10 @@ ustorage_fs_do_cmd(struct ustorage_fs_softc *sc)
case SC_READ_12:
sc->sc_transfer.cmd_dir = DIR_WRITE;
- temp = get_be32(&sc->sc_cmd_data[6]);
+ temp = get_be32(&sc->sc_cbw->CBWCDB[6]);
if (temp >= (1UL << (32 - 9))) {
/* numerical overflow */
- sc->sc_csw.bCSWStatus = CSWSTATUS_FAILED;
+ sc->sc_csw->bCSWStatus = CSWSTATUS_FAILED;
error = 1;
break;
}
@@ -1776,7 +1784,7 @@ ustorage_fs_do_cmd(struct ustorage_fs_softc *sc)
case SC_READ_FORMAT_CAPACITIES:
sc->sc_transfer.cmd_dir = DIR_WRITE;
error = ustorage_fs_min_len(sc,
- get_be16(&sc->sc_cmd_data[7]), -1U);
+ get_be16(&sc->sc_cbw->CBWCDB[7]), -1U);
if (error) {
break;
}
@@ -1791,7 +1799,7 @@ ustorage_fs_do_cmd(struct ustorage_fs_softc *sc)
case SC_REQUEST_SENSE:
sc->sc_transfer.cmd_dir = DIR_WRITE;
- error = ustorage_fs_min_len(sc, sc->sc_cmd_data[4], -1U);
+ error = ustorage_fs_min_len(sc, sc->sc_cbw->CBWCDB[4], -1U);
if (error) {
break;
}
@@ -1860,7 +1868,7 @@ ustorage_fs_do_cmd(struct ustorage_fs_softc *sc)
break;
case SC_WRITE_6:
- i = sc->sc_cmd_data[4];
+ i = sc->sc_cbw->CBWCDB[4];
sc->sc_transfer.cmd_dir = DIR_READ;
temp = ((i == 0) ? 256UL : i);
error = ustorage_fs_min_len(sc, temp << 9, mask9);
@@ -1878,7 +1886,7 @@ ustorage_fs_do_cmd(struct ustorage_fs_softc *sc)
case SC_WRITE_10:
sc->sc_transfer.cmd_dir = DIR_READ;
- temp = get_be16(&sc->sc_cmd_data[7]);
+ temp = get_be16(&sc->sc_cbw->CBWCDB[7]);
error = ustorage_fs_min_len(sc, temp << 9, mask9);
if (error) {
break;
@@ -1894,10 +1902,10 @@ ustorage_fs_do_cmd(struct ustorage_fs_softc *sc)
case SC_WRITE_12:
sc->sc_transfer.cmd_dir = DIR_READ;
- temp = get_be32(&sc->sc_cmd_data[6]);
+ temp = get_be32(&sc->sc_cbw->CBWCDB[6]);
if (temp > (mask9 >> 9)) {
/* numerical overflow */
- sc->sc_csw.bCSWStatus = CSWSTATUS_FAILED;
+ sc->sc_csw->bCSWStatus = CSWSTATUS_FAILED;
error = 1;
break;
}
diff --git a/sys/dev/usb/usb_busdma.c b/sys/dev/usb/usb_busdma.c
index 59dc8c1..f3c4833 100644
--- a/sys/dev/usb/usb_busdma.c
+++ b/sys/dev/usb/usb_busdma.c
@@ -358,8 +358,7 @@ usb_dma_tag_create(struct usb_dma_tag *udt,
if (bus_dma_tag_create
( /* parent */ udt->tag_parent->tag,
/* alignment */ align,
- /* boundary */ (align == 1) ?
- USB_PAGE_SIZE : 0,
+ /* boundary */ 0,
/* lowaddr */ (2ULL << (udt->tag_parent->dma_bits - 1)) - 1,
/* highaddr */ BUS_SPACE_MAXADDR,
/* filter */ NULL,
@@ -418,6 +417,7 @@ usb_pc_common_mem_cb(void *arg, bus_dma_segment_t *segs,
struct usb_page_cache *pc;
struct usb_page *pg;
usb_size_t rem;
+ bus_size_t off;
uint8_t owned;
pc = arg;
@@ -433,6 +433,8 @@ usb_pc_common_mem_cb(void *arg, bus_dma_segment_t *segs,
if (error) {
goto done;
}
+
+ off = 0;
pg = pc->page_start;
pg->physaddr = segs->ds_addr & ~(USB_PAGE_SIZE - 1);
rem = segs->ds_addr & (USB_PAGE_SIZE - 1);
@@ -450,10 +452,16 @@ usb_pc_common_mem_cb(void *arg, bus_dma_segment_t *segs,
}
#endif
while (nseg > 0) {
- nseg--;
- segs++;
+ off += USB_PAGE_SIZE;
+ if (off >= (segs->ds_len + rem)) {
+ /* page crossing */
+ nseg--;
+ segs++;
+ off = 0;
+ rem = 0;
+ }
pg++;
- pg->physaddr = segs->ds_addr & ~(USB_PAGE_SIZE - 1);
+ pg->physaddr = (segs->ds_addr + off) & ~(USB_PAGE_SIZE - 1);
}
done:
diff --git a/sys/dev/usb/usb_msctest.c b/sys/dev/usb/usb_msctest.c
index c578a6c..c5e8f49 100644
--- a/sys/dev/usb/usb_msctest.c
+++ b/sys/dev/usb/usb_msctest.c
@@ -83,7 +83,7 @@ enum {
DIR_NONE,
};
-#define SCSI_MAX_LEN 0x100
+#define SCSI_MAX_LEN MAX(0x100, BULK_SIZE)
#define SCSI_INQ_LEN 0x24
#define SCSI_SENSE_LEN 0xFF
@@ -139,8 +139,8 @@ struct bbb_csw {
struct bbb_transfer {
struct mtx mtx;
struct cv cv;
- struct bbb_cbw cbw;
- struct bbb_csw csw;
+ struct bbb_cbw *cbw;
+ struct bbb_csw *csw;
struct usb_xfer *xfer[ST_MAX];
@@ -150,6 +150,7 @@ struct bbb_transfer {
usb_size_t data_rem; /* bytes */
usb_timeout_t data_timeout; /* ms */
usb_frlength_t actlen; /* bytes */
+ usb_frlength_t buffer_size; /* bytes */
uint8_t cmd_len; /* bytes */
uint8_t dir;
@@ -158,7 +159,7 @@ struct bbb_transfer {
uint8_t status_try;
int error;
- uint8_t buffer[SCSI_MAX_LEN] __aligned(4);
+ uint8_t *buffer;
};
static usb_callback_t bbb_command_callback;
@@ -184,7 +185,6 @@ static const struct usb_config bbb_config[ST_MAX] = {
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_OUT,
.bufsize = sizeof(struct bbb_cbw),
- .flags = {.ext_buffer = 1,},
.callback = &bbb_command_callback,
.timeout = 4 * USB_MS_HZ, /* 4 seconds */
},
@@ -193,8 +193,8 @@ static const struct usb_config bbb_config[ST_MAX] = {
.type = UE_BULK,
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_IN,
- .bufsize = BULK_SIZE,
- .flags = {.ext_buffer = 1,.proxy_buffer = 1,.short_xfer_ok = 1,},
+ .bufsize = SCSI_MAX_LEN,
+ .flags = {.proxy_buffer = 1,.short_xfer_ok = 1,},
.callback = &bbb_data_read_callback,
.timeout = 4 * USB_MS_HZ, /* 4 seconds */
},
@@ -212,7 +212,7 @@ static const struct usb_config bbb_config[ST_MAX] = {
.type = UE_BULK,
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_OUT,
- .bufsize = BULK_SIZE,
+ .bufsize = SCSI_MAX_LEN,
.flags = {.ext_buffer = 1,.proxy_buffer = 1,},
.callback = &bbb_data_write_callback,
.timeout = 4 * USB_MS_HZ, /* 4 seconds */
@@ -232,7 +232,7 @@ static const struct usb_config bbb_config[ST_MAX] = {
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_IN,
.bufsize = sizeof(struct bbb_csw),
- .flags = {.ext_buffer = 1,.short_xfer_ok = 1,},
+ .flags = {.short_xfer_ok = 1,},
.callback = &bbb_status_callback,
.timeout = 1 * USB_MS_HZ, /* 1 second */
},
@@ -241,7 +241,6 @@ static const struct usb_config bbb_config[ST_MAX] = {
static void
bbb_done(struct bbb_transfer *sc, int error)
{
-
sc->error = error;
sc->state = ST_COMMAND;
sc->status_try = 1;
@@ -290,18 +289,19 @@ bbb_command_callback(struct usb_xfer *xfer, usb_error_t error)
case USB_ST_SETUP:
sc->status_try = 0;
- tag = UGETDW(sc->cbw.dCBWTag) + 1;
- USETDW(sc->cbw.dCBWSignature, CBWSIGNATURE);
- USETDW(sc->cbw.dCBWTag, tag);
- USETDW(sc->cbw.dCBWDataTransferLength, (uint32_t)sc->data_len);
- sc->cbw.bCBWFlags = ((sc->dir == DIR_IN) ? CBWFLAGS_IN : CBWFLAGS_OUT);
- sc->cbw.bCBWLUN = sc->lun;
- sc->cbw.bCDBLength = sc->cmd_len;
- if (sc->cbw.bCDBLength > sizeof(sc->cbw.CBWCDB)) {
- sc->cbw.bCDBLength = sizeof(sc->cbw.CBWCDB);
+ tag = UGETDW(sc->cbw->dCBWTag) + 1;
+ USETDW(sc->cbw->dCBWSignature, CBWSIGNATURE);
+ USETDW(sc->cbw->dCBWTag, tag);
+ USETDW(sc->cbw->dCBWDataTransferLength, (uint32_t)sc->data_len);
+ sc->cbw->bCBWFlags = ((sc->dir == DIR_IN) ? CBWFLAGS_IN : CBWFLAGS_OUT);
+ sc->cbw->bCBWLUN = sc->lun;
+ sc->cbw->bCDBLength = sc->cmd_len;
+ if (sc->cbw->bCDBLength > sizeof(sc->cbw->CBWCDB)) {
+ sc->cbw->bCDBLength = sizeof(sc->cbw->CBWCDB);
DPRINTFN(0, "Truncating long command\n");
}
- usbd_xfer_set_frame_data(xfer, 0, &sc->cbw, sizeof(sc->cbw));
+ usbd_xfer_set_frame_len(xfer, 0,
+ sizeof(struct bbb_cbw));
usbd_transfer_submit(xfer);
break;
@@ -388,7 +388,7 @@ bbb_data_write_callback(struct usb_xfer *xfer, usb_error_t error)
if (sc->data_rem == 0) {
bbb_transfer_start(sc, ST_STATUS);
- return;
+ break;
}
if (max_bulk > sc->data_rem) {
max_bulk = sc->data_rem;
@@ -396,7 +396,7 @@ bbb_data_write_callback(struct usb_xfer *xfer, usb_error_t error)
usbd_xfer_set_timeout(xfer, sc->data_timeout);
usbd_xfer_set_frame_data(xfer, 0, sc->data_ptr, max_bulk);
usbd_transfer_submit(xfer);
- return;
+ break;
default: /* Error */
if (error == USB_ERR_CANCELLED) {
@@ -404,8 +404,7 @@ bbb_data_write_callback(struct usb_xfer *xfer, usb_error_t error)
} else {
bbb_transfer_start(sc, ST_DATA_WR_CS);
}
- return;
-
+ break;
}
}
@@ -430,9 +429,9 @@ bbb_status_callback(struct usb_xfer *xfer, usb_error_t error)
/* very simple status check */
- if (actlen < (int)sizeof(sc->csw)) {
+ if (actlen < (int)sizeof(struct bbb_csw)) {
bbb_done(sc, USB_ERR_SHORT_XFER);
- } else if (sc->csw.bCSWStatus == CSWSTATUS_GOOD) {
+ } else if (sc->csw->bCSWStatus == CSWSTATUS_GOOD) {
bbb_done(sc, 0); /* success */
} else {
bbb_done(sc, ERR_CSW_FAILED); /* error */
@@ -440,7 +439,8 @@ bbb_status_callback(struct usb_xfer *xfer, usb_error_t error)
break;
case USB_ST_SETUP:
- usbd_xfer_set_frame_data(xfer, 0, &sc->csw, sizeof(sc->csw));
+ usbd_xfer_set_frame_len(xfer, 0,
+ sizeof(struct bbb_csw));
usbd_transfer_submit(xfer);
break;
@@ -478,9 +478,9 @@ bbb_command_start(struct bbb_transfer *sc, uint8_t dir, uint8_t lun,
sc->data_timeout = (data_timeout + USB_MS_HZ);
sc->actlen = 0;
sc->cmd_len = cmd_len;
- memset(&sc->cbw.CBWCDB, 0, sizeof(sc->cbw.CBWCDB));
- memcpy(&sc->cbw.CBWCDB, cmd_ptr, cmd_len);
- DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, (char *)sc->cbw.CBWCDB, ":");
+ memset(&sc->cbw->CBWCDB, 0, sizeof(sc->cbw->CBWCDB));
+ memcpy(&sc->cbw->CBWCDB, cmd_ptr, cmd_len);
+ DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, (char *)sc->cbw->CBWCDB, ":");
mtx_lock(&sc->mtx);
usbd_transfer_start(sc->xfer[sc->state]);
@@ -554,6 +554,16 @@ bbb_attach(struct usb_device *udev, uint8_t iface_index)
bbb_detach(sc);
return (NULL);
}
+ /* store pointer to DMA buffers */
+ sc->buffer = usbd_xfer_get_frame_buffer(
+ sc->xfer[ST_DATA_RD], 0);
+ sc->buffer_size =
+ usbd_xfer_max_len(sc->xfer[ST_DATA_RD]);
+ sc->cbw = usbd_xfer_get_frame_buffer(
+ sc->xfer[ST_COMMAND], 0);
+ sc->csw = usbd_xfer_get_frame_buffer(
+ sc->xfer[ST_STATUS], 0);
+
return (sc);
}
@@ -829,8 +839,8 @@ usb_msc_eject(struct usb_device *udev, uint8_t iface_index, int method)
* TCTMobile needs DIR_IN flag. To get it, we
* supply a dummy data with the command.
*/
- err = bbb_command_start(sc, DIR_IN, 0, &sc->buffer,
- sizeof(sc->buffer), &scsi_tct_eject,
+ err = bbb_command_start(sc, DIR_IN, 0, sc->buffer,
+ sc->buffer_size, &scsi_tct_eject,
sizeof(scsi_tct_eject), USB_MS_HZ);
break;
default:
diff --git a/sys/dev/usb/usb_transfer.c b/sys/dev/usb/usb_transfer.c
index e4cb5fb..6e48a3e 100644
--- a/sys/dev/usb/usb_transfer.c
+++ b/sys/dev/usb/usb_transfer.c
@@ -181,6 +181,10 @@ usbd_get_dma_delay(struct usb_device *udev)
* according to "size", "align" and "count" arguments. "ppc" is
* pointed to a linear array of USB page caches afterwards.
*
+ * If the "align" argument is equal to "1" a non-contiguous allocation
+ * can happen. Else if the "align" argument is greater than "1", the
+ * allocation will always be contiguous in memory.
+ *
* Returns:
* 0: Success
* Else: Failure
@@ -195,13 +199,14 @@ usbd_transfer_setup_sub_malloc(struct usb_setup_params *parm,
struct usb_page *pg;
void *buf;
usb_size_t n_dma_pc;
+ usb_size_t n_dma_pg;
usb_size_t n_obj;
usb_size_t x;
usb_size_t y;
usb_size_t r;
usb_size_t z;
- USB_ASSERT(align > 1, ("Invalid alignment, 0x%08x\n",
+ USB_ASSERT(align > 0, ("Invalid alignment, 0x%08x\n",
align));
USB_ASSERT(size > 0, ("Invalid size = 0\n"));
@@ -217,8 +222,14 @@ usbd_transfer_setup_sub_malloc(struct usb_setup_params *parm,
* Try multi-allocation chunks to reduce the number of DMA
* allocations, hence DMA allocations are slow.
*/
- if (size >= USB_PAGE_SIZE) {
+ if (align == 1) {
+ /* special case - non-cached multi page DMA memory */
+ n_dma_pc = count;
+ n_dma_pg = (2 + (size / USB_PAGE_SIZE));
+ n_obj = 1;
+ } else if (size >= USB_PAGE_SIZE) {
n_dma_pc = count;
+ n_dma_pg = 1;
n_obj = 1;
} else {
/* compute number of objects per page */
@@ -228,13 +239,22 @@ usbd_transfer_setup_sub_malloc(struct usb_setup_params *parm,
* to nearest one:
*/
n_dma_pc = ((count + n_obj - 1) / n_obj);
+ n_dma_pg = 1;
}
+ /*
+ * DMA memory is allocated once, but mapped twice. That's why
+ * there is one list for auto-free and another list for
+ * non-auto-free which only holds the mapping and not the
+ * allocation.
+ */
if (parm->buf == NULL) {
- /* for the future */
- parm->dma_page_ptr += n_dma_pc;
+ /* reserve memory (auto-free) */
+ parm->dma_page_ptr += n_dma_pc * n_dma_pg;
parm->dma_page_cache_ptr += n_dma_pc;
- parm->dma_page_ptr += count;
+
+ /* reserve memory (no-auto-free) */
+ parm->dma_page_ptr += count * n_dma_pg;
parm->xfer_page_cache_ptr += count;
return (0);
}
@@ -272,9 +292,9 @@ usbd_transfer_setup_sub_malloc(struct usb_setup_params *parm,
buf = parm->dma_page_cache_ptr->buffer;
/* Make room for one DMA page cache and one page */
parm->dma_page_cache_ptr++;
- pg++;
+ pg += n_dma_pg;
- for (y = 0; (y != n_obj); y++, r--, pc++, pg++) {
+ for (y = 0; (y != n_obj); y++, r--, pc++, pg += n_dma_pg) {
/* Load sub-chunk into DMA */
if (usb_pc_dmamap_create(pc, size)) {
@@ -688,12 +708,30 @@ usbd_transfer_setup_sub(struct usb_setup_params *parm)
*/
if (!xfer->flags.ext_buffer) {
+#if USB_HAVE_BUSDMA
+ struct usb_page_search page_info;
+ struct usb_page_cache *pc;
+ if (usbd_transfer_setup_sub_malloc(parm,
+ &pc, parm->bufsize, 1, 1)) {
+ parm->err = USB_ERR_NOMEM;
+ } else if (parm->buf != NULL) {
+
+ usbd_get_page(pc, 0, &page_info);
+
+ xfer->local_buffer = page_info.buffer;
+
+ usbd_xfer_set_frame_offset(xfer, 0, 0);
+
+ if ((type == UE_CONTROL) && (n_frbuffers > 1)) {
+ usbd_xfer_set_frame_offset(xfer, REQ_SIZE, 1);
+ }
+ }
+#else
/* align data */
parm->size[0] += ((-parm->size[0]) & (USB_HOST_ALIGN - 1));
- if (parm->buf) {
-
+ if (parm->buf != NULL) {
xfer->local_buffer =
USB_ADD_BYTES(parm->buf, parm->size[0]);
@@ -707,6 +745,7 @@ usbd_transfer_setup_sub(struct usb_setup_params *parm)
/* align data again */
parm->size[0] += ((-parm->size[0]) & (USB_HOST_ALIGN - 1));
+#endif
}
/*
* Compute maximum buffer size
@@ -1078,9 +1117,12 @@ usbd_transfer_setup(struct usb_device *udev,
* The number of DMA tags required depends on
* the number of endpoints. The current estimate
* for maximum number of DMA tags per endpoint
- * is two.
+ * is three:
+ * 1) for loading memory
+ * 2) for allocating memory
+ * 3) for fixing memory [UHCI]
*/
- parm.dma_tag_max += 2 * MIN(n_setup, USB_EP_MAX);
+ parm.dma_tag_max += 3 * MIN(n_setup, USB_EP_MAX);
/*
* DMA tags for QH, TD, Data and more.
@@ -1943,6 +1985,17 @@ usbd_xfer_get_frame(struct usb_xfer *xfer, usb_frcount_t frindex)
return (&xfer->frbuffers[frindex]);
}
+void *
+usbd_xfer_get_frame_buffer(struct usb_xfer *xfer, usb_frcount_t frindex)
+{
+ struct usb_page_search page_info;
+
+ KASSERT(frindex < xfer->max_frame_count, ("frame index overflow"));
+
+ usbd_get_page(&xfer->frbuffers[frindex], 0, &page_info);
+ return (page_info.buffer);
+}
+
/*------------------------------------------------------------------------*
* usbd_xfer_get_fps_shift
*
diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs
index 634ea58..0cd43ef 100644
--- a/sys/dev/usb/usbdevs
+++ b/sys/dev/usb/usbdevs
@@ -721,6 +721,7 @@ vendor RTSYSTEMS 0x2100 RTSYSTEMS
vendor VIALABS 0x2109 VIA Labs
vendor ERICSSON 0x2282 Ericsson
vendor MOTOROLA2 0x22b8 Motorola
+vendor WETELECOM 0x22de WeTelecom
vendor TRIPPLITE 0x2478 Tripp-Lite
vendor HIROSE 0x2631 Hirose Electric
vendor NHJ 0x2770 NHJ
@@ -1049,6 +1050,7 @@ product AOX USB101 0x0008 Ethernet
product APC UPS 0x0002 Uninterruptible Power Supply
/* Apple Computer products */
+product APPLE DUMMY 0x0000 Dummy product
product APPLE IMAC_KBD 0x0201 USB iMac Keyboard
product APPLE KBD 0x0202 USB Keyboard M2452
product APPLE EXT_KBD 0x020c Apple Extended USB Keyboard
@@ -3056,6 +3058,7 @@ product NOVATEL U727 0x4100 Merlin U727 CDMA
product NOVATEL MC950D 0x4400 Novatel MC950D HSUPA
product NOVATEL ZEROCD 0x5010 Novatel ZeroCD
product NOVATEL ZEROCD2 0x5030 Novatel ZeroCD
+product NOVATEL MIFI2200 0x5041 Novatel MiFi 2200 CDMA
product NOVATEL U727_2 0x5100 Merlin U727 CDMA
product NOVATEL U760 0x6000 Novatel U760
product NOVATEL MC760 0x6002 Novatel MC760
@@ -4194,6 +4197,9 @@ product WESTERN HUB 0x0500 USB HUB
product WESTERN MYBOOK 0x0901 MyBook External HDD
product WESTERN MYPASSWORD 0x0704 MyPassword External HDD
+/* WeTelecom products */
+product WETELECOM WM_D200 0x6801 WM-D200
+
/* WIENER Plein & Baus GmbH products */
product WIENERPLEINBAUS PL512 0x0010 PL512 PSU
product WIENERPLEINBAUS RCM 0x0011 RCM Remote Control
diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h
index 4193118..d753fe1 100644
--- a/sys/dev/usb/usbdi.h
+++ b/sys/dev/usb/usbdi.h
@@ -530,8 +530,8 @@ usb_frlength_t
usbd_xfer_old_frame_length(struct usb_xfer *xfer, usb_frcount_t frindex);
void usbd_xfer_status(struct usb_xfer *xfer, int *actlen, int *sumlen,
int *aframes, int *nframes);
-struct usb_page_cache *usbd_xfer_get_frame(struct usb_xfer *xfer,
- usb_frcount_t frindex);
+struct usb_page_cache *usbd_xfer_get_frame(struct usb_xfer *, usb_frcount_t);
+void *usbd_xfer_get_frame_buffer(struct usb_xfer *, usb_frcount_t);
void *usbd_xfer_softc(struct usb_xfer *xfer);
void *usbd_xfer_get_priv(struct usb_xfer *xfer);
void usbd_xfer_set_priv(struct usb_xfer *xfer, void *);
diff --git a/sys/dev/usb/wlan/if_rum.c b/sys/dev/usb/wlan/if_rum.c
index 93e66de..4c54aeb 100644
--- a/sys/dev/usb/wlan/if_rum.c
+++ b/sys/dev/usb/wlan/if_rum.c
@@ -907,7 +907,7 @@ rum_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error)
goto tr_setup;
}
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) {
DPRINTF("could not allocate mbuf\n");
ifp->if_ierrors++;
diff --git a/sys/dev/usb/wlan/if_run.c b/sys/dev/usb/wlan/if_run.c
index d5c86a6..3d2577f 100644
--- a/sys/dev/usb/wlan/if_run.c
+++ b/sys/dev/usb/wlan/if_run.c
@@ -2595,7 +2595,7 @@ run_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error)
case USB_ST_SETUP:
tr_setup:
if (sc->rx_m == NULL) {
- sc->rx_m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR,
+ sc->rx_m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR,
MJUMPAGESIZE /* xfer can be bigger than MCLBYTES */);
}
if (sc->rx_m == NULL) {
@@ -2669,7 +2669,7 @@ tr_setup:
}
/* copy aggregated frames to another mbuf */
- m0 = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m0 = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (__predict_false(m0 == NULL)) {
DPRINTF("could not allocate mbuf\n");
ifp->if_ierrors++;
diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c
index b78d7bf..0ac57af 100644
--- a/sys/dev/usb/wlan/if_uath.c
+++ b/sys/dev/usb/wlan/if_uath.c
@@ -217,9 +217,8 @@ static const struct usb_config uath_usbconfig[UATH_N_XFERS] = {
.type = UE_BULK,
.endpoint = 0x1,
.direction = UE_DIR_OUT,
- .bufsize = UATH_MAX_CMDSZ,
+ .bufsize = UATH_MAX_CMDSZ * UATH_CMD_LIST_COUNT,
.flags = {
- .ext_buffer = 1,
.force_short_xfer = 1,
.pipe_bof = 1,
},
@@ -242,9 +241,8 @@ static const struct usb_config uath_usbconfig[UATH_N_XFERS] = {
.type = UE_BULK,
.endpoint = 0x2,
.direction = UE_DIR_OUT,
- .bufsize = UATH_MAX_TXBUFSZ,
+ .bufsize = UATH_MAX_TXBUFSZ * UATH_TX_DATA_LIST_COUNT,
.flags = {
- .ext_buffer = 1,
.force_short_xfer = 1,
.pipe_bof = 1
},
@@ -258,10 +256,8 @@ static struct ieee80211vap *uath_vap_create(struct ieee80211com *,
const uint8_t [IEEE80211_ADDR_LEN],
const uint8_t [IEEE80211_ADDR_LEN]);
static void uath_vap_delete(struct ieee80211vap *);
-static int uath_alloc_cmd_list(struct uath_softc *, struct uath_cmd [],
- int, int);
-static void uath_free_cmd_list(struct uath_softc *, struct uath_cmd [],
- int);
+static int uath_alloc_cmd_list(struct uath_softc *, struct uath_cmd []);
+static void uath_free_cmd_list(struct uath_softc *, struct uath_cmd []);
static int uath_host_available(struct uath_softc *);
static int uath_get_capability(struct uath_softc *, uint32_t, uint32_t *);
static int uath_get_devcap(struct uath_softc *);
@@ -365,8 +361,7 @@ uath_attach(device_t dev)
/*
* Allocate xfers for firmware commands.
*/
- error = uath_alloc_cmd_list(sc, sc->sc_cmd, UATH_CMD_LIST_COUNT,
- UATH_MAX_CMDSZ);
+ error = uath_alloc_cmd_list(sc, sc->sc_cmd);
if (error != 0) {
device_printf(sc->sc_dev,
"could not allocate Tx command list\n");
@@ -381,6 +376,11 @@ uath_attach(device_t dev)
goto fail1;
}
+ sc->sc_cmd_dma_buf =
+ usbd_xfer_get_frame_buffer(sc->sc_xfer[UATH_INTR_TX], 0);
+ sc->sc_tx_dma_buf =
+ usbd_xfer_get_frame_buffer(sc->sc_xfer[UATH_BULK_TX], 0);
+
/*
* We're now ready to send+receive firmware commands.
*/
@@ -493,7 +493,7 @@ uath_attach(device_t dev)
fail4: if_free(ifp);
fail3: UATH_UNLOCK(sc);
fail2: usbd_transfer_unsetup(sc->sc_xfer, UATH_N_XFERS);
-fail1: uath_free_cmd_list(sc, sc->sc_cmd, UATH_CMD_LIST_COUNT);
+fail1: uath_free_cmd_list(sc, sc->sc_cmd);
fail:
return (error);
}
@@ -524,7 +524,7 @@ uath_detach(device_t dev)
UATH_LOCK(sc);
uath_free_rx_data_list(sc);
uath_free_tx_data_list(sc);
- uath_free_cmd_list(sc, sc->sc_cmd, UATH_CMD_LIST_COUNT);
+ uath_free_cmd_list(sc, sc->sc_cmd);
UATH_UNLOCK(sc);
if_free(ifp);
@@ -533,45 +533,35 @@ uath_detach(device_t dev)
}
static void
-uath_free_cmd_list(struct uath_softc *sc, struct uath_cmd cmds[], int ncmd)
+uath_free_cmd_list(struct uath_softc *sc, struct uath_cmd cmds[])
{
int i;
- for (i = 0; i < ncmd; i++)
- if (cmds[i].buf != NULL)
- free(cmds[i].buf, M_USBDEV);
+ for (i = 0; i != UATH_CMD_LIST_COUNT; i++)
+ cmds[i].buf = NULL;
}
static int
-uath_alloc_cmd_list(struct uath_softc *sc, struct uath_cmd cmds[],
- int ncmd, int maxsz)
+uath_alloc_cmd_list(struct uath_softc *sc, struct uath_cmd cmds[])
{
- int i, error;
+ int i;
STAILQ_INIT(&sc->sc_cmd_active);
STAILQ_INIT(&sc->sc_cmd_pending);
STAILQ_INIT(&sc->sc_cmd_waiting);
STAILQ_INIT(&sc->sc_cmd_inactive);
- for (i = 0; i < ncmd; i++) {
+ for (i = 0; i != UATH_CMD_LIST_COUNT; i++) {
struct uath_cmd *cmd = &cmds[i];
cmd->sc = sc; /* backpointer for callbacks */
cmd->msgid = i;
- cmd->buf = malloc(maxsz, M_USBDEV, M_NOWAIT);
- if (cmd->buf == NULL) {
- device_printf(sc->sc_dev,
- "could not allocate xfer buffer\n");
- error = ENOMEM;
- goto fail;
- }
+ cmd->buf = ((uint8_t *)sc->sc_cmd_dma_buf) +
+ (i * UATH_MAX_CMDSZ);
STAILQ_INSERT_TAIL(&sc->sc_cmd_inactive, cmd, next);
UATH_STAT_INC(sc, st_cmd_inactive);
}
return (0);
-
-fail: uath_free_cmd_list(sc, cmds, ncmd);
- return (error);
}
static int
@@ -942,10 +932,7 @@ uath_free_data_list(struct uath_softc *sc, struct uath_data data[], int ndata,
dp->buf = NULL;
}
} else {
- if (dp->buf != NULL) {
- free(dp->buf, M_USBDEV);
- dp->buf = NULL;
- }
+ dp->buf = NULL;
}
#ifdef UATH_DEBUG
if (dp->ni != NULL)
@@ -956,7 +943,7 @@ uath_free_data_list(struct uath_softc *sc, struct uath_data data[], int ndata,
static int
uath_alloc_data_list(struct uath_softc *sc, struct uath_data data[],
- int ndata, int maxsz, int fillmbuf)
+ int ndata, int maxsz, void *dma_buf)
{
int i, error;
@@ -964,9 +951,9 @@ uath_alloc_data_list(struct uath_softc *sc, struct uath_data data[],
struct uath_data *dp = &data[i];
dp->sc = sc;
- if (fillmbuf) {
+ if (dma_buf == NULL) {
/* XXX check maxsz */
- dp->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ dp->m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (dp->m == NULL) {
device_printf(sc->sc_dev,
"could not allocate rx mbuf\n");
@@ -976,20 +963,14 @@ uath_alloc_data_list(struct uath_softc *sc, struct uath_data data[],
dp->buf = mtod(dp->m, uint8_t *);
} else {
dp->m = NULL;
- dp->buf = malloc(maxsz, M_USBDEV, M_NOWAIT);
- if (dp->buf == NULL) {
- device_printf(sc->sc_dev,
- "could not allocate buffer\n");
- error = ENOMEM;
- goto fail;
- }
+ dp->buf = ((uint8_t *)dma_buf) + (i * maxsz);
}
dp->ni = NULL;
}
return (0);
-fail: uath_free_data_list(sc, data, ndata, fillmbuf);
+fail: uath_free_data_list(sc, data, ndata, 1 /* free mbufs */);
return (error);
}
@@ -1001,7 +982,7 @@ uath_alloc_rx_data_list(struct uath_softc *sc)
/* XXX is it enough to store the RX packet with MCLBYTES bytes? */
error = uath_alloc_data_list(sc,
sc->sc_rx, UATH_RX_DATA_LIST_COUNT, MCLBYTES,
- 1 /* setup mbufs */);
+ NULL /* setup mbufs */);
if (error != 0)
return (error);
@@ -1024,7 +1005,7 @@ uath_alloc_tx_data_list(struct uath_softc *sc)
error = uath_alloc_data_list(sc,
sc->sc_tx, UATH_TX_DATA_LIST_COUNT, UATH_MAX_TXBUFSZ,
- 0 /* no mbufs */);
+ sc->sc_tx_dma_buf);
if (error != 0)
return (error);
@@ -2611,7 +2592,7 @@ uath_data_rxeof(struct usb_xfer *xfer, struct uath_data *data,
}
sc->sc_intrx_len += chunklen;
- mnew = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ mnew = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (mnew == NULL) {
DPRINTF(sc, UATH_DEBUG_RECV | UATH_DEBUG_RECV_ALL,
"%s: can't get new mbuf, drop frame\n", __func__);
@@ -2741,8 +2722,7 @@ setup:
UATH_STAT_DEC(sc, st_rx_inactive);
STAILQ_INSERT_TAIL(&sc->sc_rx_active, data, next);
UATH_STAT_INC(sc, st_rx_active);
- usbd_xfer_set_frame_data(xfer, 0, data->buf,
- usbd_xfer_max_len(xfer));
+ usbd_xfer_set_frame_data(xfer, 0, data->buf, MCLBYTES);
usbd_transfer_submit(xfer);
/*
@@ -2890,7 +2870,7 @@ static device_method_t uath_methods[] = {
DEVMETHOD(device_probe, uath_match),
DEVMETHOD(device_attach, uath_attach),
DEVMETHOD(device_detach, uath_detach),
- { 0, 0 }
+ DEVMETHOD_END
};
static driver_t uath_driver = {
.name = "uath",
diff --git a/sys/dev/usb/wlan/if_uathvar.h b/sys/dev/usb/wlan/if_uathvar.h
index 6e58d93..ed84ba9 100644
--- a/sys/dev/usb/wlan/if_uathvar.h
+++ b/sys/dev/usb/wlan/if_uathvar.h
@@ -186,6 +186,8 @@ struct uath_softc {
struct ifnet *sc_ifp;
device_t sc_dev;
struct usb_device *sc_udev;
+ void *sc_cmd_dma_buf;
+ void *sc_tx_dma_buf;
struct mtx sc_mtx;
uint32_t sc_debug;
diff --git a/sys/dev/usb/wlan/if_upgt.c b/sys/dev/usb/wlan/if_upgt.c
index ab5b717..c625926 100644
--- a/sys/dev/usb/wlan/if_upgt.c
+++ b/sys/dev/usb/wlan/if_upgt.c
@@ -201,9 +201,8 @@ static const struct usb_config upgt_config[UPGT_N_XFERS] = {
.type = UE_BULK,
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_OUT,
- .bufsize = MCLBYTES,
+ .bufsize = MCLBYTES * UPGT_TX_MAXCOUNT,
.flags = {
- .ext_buffer = 1,
.force_short_xfer = 1,
.pipe_bof = 1
},
@@ -214,9 +213,8 @@ static const struct usb_config upgt_config[UPGT_N_XFERS] = {
.type = UE_BULK,
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_IN,
- .bufsize = MCLBYTES,
+ .bufsize = MCLBYTES * UPGT_RX_MAXCOUNT,
.flags = {
- .ext_buffer = 1,
.pipe_bof = 1,
.short_xfer_ok = 1
},
@@ -277,6 +275,11 @@ upgt_attach(device_t dev)
goto fail3;
}
+ sc->sc_rx_dma_buf = usbd_xfer_get_frame_buffer(
+ sc->sc_xfer[UPGT_BULK_RX], 0);
+ sc->sc_tx_dma_buf = usbd_xfer_get_frame_buffer(
+ sc->sc_xfer[UPGT_BULK_TX], 0);
+
ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211);
if (ifp == NULL) {
device_printf(dev, "can not if_alloc()\n");
@@ -1493,7 +1496,7 @@ upgt_rx(struct upgt_softc *sc, uint8_t *data, int pkglen, int *rssi)
/* create mbuf which is suitable for strict alignment archs */
KASSERT((pkglen + ETHER_ALIGN) < MCLBYTES,
("A current mbuf storage is small (%d)", pkglen + ETHER_ALIGN));
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) {
device_printf(sc->sc_dev, "could not create RX mbuf\n");
return (NULL);
@@ -1952,13 +1955,7 @@ upgt_alloc_tx(struct upgt_softc *sc)
for (i = 0; i < UPGT_TX_MAXCOUNT; i++) {
struct upgt_data *data = &sc->sc_tx_data[i];
-
- data->buf = malloc(MCLBYTES, M_USBDEV, M_NOWAIT | M_ZERO);
- if (data->buf == NULL) {
- device_printf(sc->sc_dev,
- "could not allocate TX buffer\n");
- return (ENOMEM);
- }
+ data->buf = ((uint8_t *)sc->sc_tx_dma_buf) + (i * MCLBYTES);
STAILQ_INSERT_TAIL(&sc->sc_tx_inactive, data, next);
UPGT_STAT_INC(sc, st_tx_inactive);
}
@@ -1976,13 +1973,7 @@ upgt_alloc_rx(struct upgt_softc *sc)
for (i = 0; i < UPGT_RX_MAXCOUNT; i++) {
struct upgt_data *data = &sc->sc_rx_data[i];
-
- data->buf = malloc(MCLBYTES, M_USBDEV, M_NOWAIT | M_ZERO);
- if (data->buf == NULL) {
- device_printf(sc->sc_dev,
- "could not allocate RX buffer\n");
- return (ENOMEM);
- }
+ data->buf = ((uint8_t *)sc->sc_rx_dma_buf) + (i * MCLBYTES);
STAILQ_INSERT_TAIL(&sc->sc_rx_inactive, data, next);
}
@@ -2004,8 +1995,10 @@ upgt_detach(device_t dev)
callout_drain(&sc->sc_led_ch);
callout_drain(&sc->sc_watchdog_ch);
- usbd_transfer_unsetup(sc->sc_xfer, UPGT_N_XFERS);
ieee80211_ifdetach(ic);
+
+ usbd_transfer_unsetup(sc->sc_xfer, UPGT_N_XFERS);
+
upgt_free_rx(sc);
upgt_free_tx(sc);
@@ -2023,7 +2016,7 @@ upgt_free_rx(struct upgt_softc *sc)
for (i = 0; i < UPGT_RX_MAXCOUNT; i++) {
struct upgt_data *data = &sc->sc_rx_data[i];
- free(data->buf, M_USBDEV);
+ data->buf = NULL;
data->ni = NULL;
}
}
@@ -2036,7 +2029,7 @@ upgt_free_tx(struct upgt_softc *sc)
for (i = 0; i < UPGT_TX_MAXCOUNT; i++) {
struct upgt_data *data = &sc->sc_tx_data[i];
- free(data->buf, M_USBDEV);
+ data->buf = NULL;
data->ni = NULL;
}
}
@@ -2278,8 +2271,7 @@ setup:
return;
STAILQ_REMOVE_HEAD(&sc->sc_rx_inactive, next);
STAILQ_INSERT_TAIL(&sc->sc_rx_active, data, next);
- usbd_xfer_set_frame_data(xfer, 0, data->buf,
- usbd_xfer_max_len(xfer));
+ usbd_xfer_set_frame_data(xfer, 0, data->buf, MCLBYTES);
usbd_transfer_submit(xfer);
/*
@@ -2382,8 +2374,7 @@ static device_method_t upgt_methods[] = {
DEVMETHOD(device_probe, upgt_match),
DEVMETHOD(device_attach, upgt_attach),
DEVMETHOD(device_detach, upgt_detach),
-
- { 0, 0 }
+ DEVMETHOD_END
};
static driver_t upgt_driver = {
diff --git a/sys/dev/usb/wlan/if_upgtvar.h b/sys/dev/usb/wlan/if_upgtvar.h
index 68d5d2b..6e22de2 100644
--- a/sys/dev/usb/wlan/if_upgtvar.h
+++ b/sys/dev/usb/wlan/if_upgtvar.h
@@ -422,6 +422,8 @@ struct upgt_softc {
device_t sc_dev;
struct ifnet *sc_ifp;
struct usb_device *sc_udev;
+ void *sc_rx_dma_buf;
+ void *sc_tx_dma_buf;
struct mtx sc_mtx;
struct upgt_stat sc_stat;
int sc_flags;
diff --git a/sys/dev/usb/wlan/if_ural.c b/sys/dev/usb/wlan/if_ural.c
index 60096bd..14c2868 100644
--- a/sys/dev/usb/wlan/if_ural.c
+++ b/sys/dev/usb/wlan/if_ural.c
@@ -913,7 +913,7 @@ ural_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error)
goto tr_setup;
}
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) {
DPRINTF("could not allocate mbuf\n");
ifp->if_ierrors++;
diff --git a/sys/dev/usb/wlan/if_urtw.c b/sys/dev/usb/wlan/if_urtw.c
index 45b72a2..b0202c5 100644
--- a/sys/dev/usb/wlan/if_urtw.c
+++ b/sys/dev/usb/wlan/if_urtw.c
@@ -532,9 +532,8 @@ static const struct usb_config urtw_8187b_usbconfig[URTW_8187B_N_XFERS] = {
.type = UE_BULK,
.endpoint = 0x89,
.direction = UE_DIR_IN,
- .bufsize = MCLBYTES,
+ .bufsize = sizeof(uint64_t),
.flags = {
- .ext_buffer = 1,
.pipe_bof = 1,
.short_xfer_ok = 1
},
@@ -544,9 +543,8 @@ static const struct usb_config urtw_8187b_usbconfig[URTW_8187B_N_XFERS] = {
.type = UE_BULK,
.endpoint = URTW_8187B_TXPIPE_BE,
.direction = UE_DIR_OUT,
- .bufsize = URTW_TX_MAXSIZE,
+ .bufsize = URTW_TX_MAXSIZE * URTW_TX_DATA_LIST_COUNT,
.flags = {
- .ext_buffer = 1,
.force_short_xfer = 1,
.pipe_bof = 1,
},
@@ -624,9 +622,8 @@ static const struct usb_config urtw_8187l_usbconfig[URTW_8187L_N_XFERS] = {
.type = UE_BULK,
.endpoint = 0x2,
.direction = UE_DIR_OUT,
- .bufsize = URTW_TX_MAXSIZE,
+ .bufsize = URTW_TX_MAXSIZE * URTW_TX_DATA_LIST_COUNT,
.flags = {
- .ext_buffer = 1,
.force_short_xfer = 1,
.pipe_bof = 1,
},
@@ -827,6 +824,16 @@ urtw_attach(device_t dev)
goto fail0;
}
+ if (sc->sc_flags & URTW_RTL8187B) {
+ sc->sc_tx_dma_buf =
+ usbd_xfer_get_frame_buffer(sc->sc_xfer[
+ URTW_8187B_BULK_TX_BE], 0);
+ } else {
+ sc->sc_tx_dma_buf =
+ usbd_xfer_get_frame_buffer(sc->sc_xfer[
+ URTW_8187L_BULK_TX_LOW], 0);
+ }
+
URTW_LOCK(sc);
urtw_read32_m(sc, URTW_RX, &data);
@@ -937,9 +944,10 @@ urtw_detach(device_t dev)
usb_callout_drain(&sc->sc_led_ch);
callout_drain(&sc->sc_watchdog_ch);
+ ieee80211_ifdetach(ic);
+
usbd_transfer_unsetup(sc->sc_xfer, (sc->sc_flags & URTW_RTL8187B) ?
URTW_8187B_N_XFERS : URTW_8187L_N_XFERS);
- ieee80211_ifdetach(ic);
urtw_free_tx_data_list(sc);
urtw_free_rx_data_list(sc);
@@ -980,10 +988,7 @@ urtw_free_data_list(struct urtw_softc *sc, struct urtw_data data[], int ndata,
dp->buf = NULL;
}
} else {
- if (dp->buf != NULL) {
- free(dp->buf, M_USBDEV);
- dp->buf = NULL;
- }
+ dp->buf = NULL;
}
if (dp->ni != NULL) {
ieee80211_free_node(dp->ni);
@@ -1449,7 +1454,7 @@ urtw_start(struct ifnet *ifp)
static int
urtw_alloc_data_list(struct urtw_softc *sc, struct urtw_data data[],
- int ndata, int maxsz, int fillmbuf)
+ int ndata, int maxsz, void *dma_buf)
{
int i, error;
@@ -1457,8 +1462,8 @@ urtw_alloc_data_list(struct urtw_softc *sc, struct urtw_data data[],
struct urtw_data *dp = &data[i];
dp->sc = sc;
- if (fillmbuf) {
- dp->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ if (dma_buf == NULL) {
+ dp->m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (dp->m == NULL) {
device_printf(sc->sc_dev,
"could not allocate rx mbuf\n");
@@ -1468,24 +1473,15 @@ urtw_alloc_data_list(struct urtw_softc *sc, struct urtw_data data[],
dp->buf = mtod(dp->m, uint8_t *);
} else {
dp->m = NULL;
- dp->buf = malloc(maxsz, M_USBDEV, M_NOWAIT);
- if (dp->buf == NULL) {
- device_printf(sc->sc_dev,
- "could not allocate buffer\n");
- error = ENOMEM;
- goto fail;
- }
- if (((unsigned long)dp->buf) % 4)
- device_printf(sc->sc_dev,
- "warn: unaligned buffer %p\n", dp->buf);
+ dp->buf = ((uint8_t *)dma_buf) +
+ (i * maxsz);
}
dp->ni = NULL;
}
+ return (0);
- return 0;
-
-fail: urtw_free_data_list(sc, data, ndata, fillmbuf);
- return error;
+fail: urtw_free_data_list(sc, data, ndata, 1);
+ return (error);
}
static int
@@ -1494,7 +1490,8 @@ urtw_alloc_rx_data_list(struct urtw_softc *sc)
int error, i;
error = urtw_alloc_data_list(sc,
- sc->sc_rx, URTW_RX_DATA_LIST_COUNT, MCLBYTES, 1 /* mbufs */);
+ sc->sc_rx, URTW_RX_DATA_LIST_COUNT,
+ MCLBYTES, NULL /* mbufs */);
if (error != 0)
return (error);
@@ -1514,7 +1511,7 @@ urtw_alloc_tx_data_list(struct urtw_softc *sc)
error = urtw_alloc_data_list(sc,
sc->sc_tx, URTW_TX_DATA_LIST_COUNT, URTW_TX_MAXSIZE,
- 0 /* no mbufs */);
+ sc->sc_tx_dma_buf /* no mbufs */);
if (error != 0)
return (error);
@@ -2709,42 +2706,28 @@ fail:
return (error);
}
-/* XXX why we should allocalte memory buffer instead of using memory stack? */
static usb_error_t
urtw_8225_write_s16(struct urtw_softc *sc, uint8_t addr, int index,
uint16_t *data)
{
- uint8_t *buf;
+ uint8_t buf[2];
uint16_t data16;
- struct usb_device_request *req;
+ struct usb_device_request req;
usb_error_t error = 0;
data16 = *data;
- req = (usb_device_request_t *)malloc(sizeof(usb_device_request_t),
- M_80211_VAP, M_NOWAIT | M_ZERO);
- if (req == NULL) {
- device_printf(sc->sc_dev, "could not allocate a memory\n");
- goto fail0;
- }
- buf = (uint8_t *)malloc(2, M_80211_VAP, M_NOWAIT | M_ZERO);
- if (req == NULL) {
- device_printf(sc->sc_dev, "could not allocate a memory\n");
- goto fail1;
- }
- req->bmRequestType = UT_WRITE_VENDOR_DEVICE;
- req->bRequest = URTW_8187_SETREGS_REQ;
- USETW(req->wValue, addr);
- USETW(req->wIndex, index);
- USETW(req->wLength, sizeof(uint16_t));
+ req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
+ req.bRequest = URTW_8187_SETREGS_REQ;
+ USETW(req.wValue, addr);
+ USETW(req.wIndex, index);
+ USETW(req.wLength, sizeof(uint16_t));
buf[0] = (data16 & 0x00ff);
buf[1] = (data16 & 0xff00) >> 8;
- error = urtw_do_request(sc, req, buf);
+ error = urtw_do_request(sc, &req, buf);
- free(buf, M_80211_VAP);
-fail1: free(req, M_80211_VAP);
-fail0: return (error);
+ return (error);
}
static usb_error_t
@@ -3994,7 +3977,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *data, int *rssi_p,
noise = rx->noise;
}
- mnew = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ mnew = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (mnew == NULL) {
ifp->if_ierrors++;
return (NULL);
@@ -4133,6 +4116,7 @@ urtw_bulk_tx_status_callback(struct usb_xfer *xfer, usb_error_t error)
{
struct urtw_softc *sc = usbd_xfer_softc(xfer);
struct ifnet *ifp = sc->sc_ifp;
+ void *dma_buf = usbd_xfer_get_frame_buffer(xfer, 0);
URTW_ASSERT_LOCKED(sc);
@@ -4142,8 +4126,8 @@ urtw_bulk_tx_status_callback(struct usb_xfer *xfer, usb_error_t error)
/* FALLTHROUGH */
case USB_ST_SETUP:
setup:
- usbd_xfer_set_frame_data(xfer, 0, &sc->sc_txstatus,
- sizeof(int64_t));
+ memcpy(dma_buf, &sc->sc_txstatus, sizeof(uint64_t));
+ usbd_xfer_set_frame_len(xfer, 0, sizeof(uint64_t));
usbd_transfer_submit(xfer);
break;
default:
@@ -4431,7 +4415,7 @@ static device_method_t urtw_methods[] = {
DEVMETHOD(device_probe, urtw_match),
DEVMETHOD(device_attach, urtw_attach),
DEVMETHOD(device_detach, urtw_detach),
- { 0, 0 }
+ DEVMETHOD_END
};
static driver_t urtw_driver = {
.name = "urtw",
diff --git a/sys/dev/usb/wlan/if_urtwvar.h b/sys/dev/usb/wlan/if_urtwvar.h
index e4a8721..c8f94ff 100644
--- a/sys/dev/usb/wlan/if_urtwvar.h
+++ b/sys/dev/usb/wlan/if_urtwvar.h
@@ -97,6 +97,7 @@ struct urtw_softc {
device_t sc_dev;
struct usb_device *sc_udev;
struct mtx sc_mtx;
+ void *sc_tx_dma_buf;
int sc_debug;
int sc_if_flags;
diff --git a/sys/dev/usb/wlan/if_zyd.c b/sys/dev/usb/wlan/if_zyd.c
index 0dac7ad..b960ce0 100644
--- a/sys/dev/usb/wlan/if_zyd.c
+++ b/sys/dev/usb/wlan/if_zyd.c
@@ -2191,9 +2191,9 @@ zyd_rx_data(struct usb_xfer *xfer, int offset, uint16_t len)
ifp->if_ierrors++;
return;
} else if (rlen > (int)MHLEN)
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
else
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL) {
DPRINTF(sc, ZYD_DEBUG_RECV, "%s: could not allocate rx mbuf\n",
device_get_nameunit(sc->sc_dev));
diff --git a/sys/dev/vge/if_vge.c b/sys/dev/vge/if_vge.c
index 402a55c..cdd67e0 100644
--- a/sys/dev/vge/if_vge.c
+++ b/sys/dev/vge/if_vge.c
@@ -1239,7 +1239,7 @@ vge_newbuf(struct vge_softc *sc, int prod)
bus_dmamap_t map;
int i, nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
/*
@@ -1827,7 +1827,7 @@ vge_encap(struct vge_softc *sc, struct mbuf **m_head)
padlen = VGE_MIN_FRAMELEN - m->m_pkthdr.len;
if (M_WRITABLE(m) == 0) {
/* Get a writable copy. */
- m = m_dup(*m_head, M_DONTWAIT);
+ m = m_dup(*m_head, M_NOWAIT);
m_freem(*m_head);
if (m == NULL) {
*m_head = NULL;
@@ -1836,7 +1836,7 @@ vge_encap(struct vge_softc *sc, struct mbuf **m_head)
*m_head = m;
}
if (M_TRAILINGSPACE(m) < padlen) {
- m = m_defrag(m, M_DONTWAIT);
+ m = m_defrag(m, M_NOWAIT);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
@@ -1858,7 +1858,7 @@ vge_encap(struct vge_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->vge_cdata.vge_tx_tag,
txd->tx_dmamap, *m_head, txsegs, &nsegs, 0);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, VGE_MAXTXSEGS);
+ m = m_collapse(*m_head, M_NOWAIT, VGE_MAXTXSEGS);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/dev/virtio/block/virtio_blk.c b/sys/dev/virtio/block/virtio_blk.c
index d35421a..cb628f6 100644
--- a/sys/dev/virtio/block/virtio_blk.c
+++ b/sys/dev/virtio/block/virtio_blk.c
@@ -338,8 +338,6 @@ vtblk_attach(device_t dev)
device_printf(dev, "cannot allocate taskqueue\n");
goto fail;
}
- taskqueue_start_threads(&sc->vtblk_tq, 1, PI_DISK, "%s taskq",
- device_get_nameunit(dev));
error = virtio_setup_intr(dev, INTR_TYPE_BIO | INTR_ENTROPY);
if (error) {
@@ -347,6 +345,9 @@ vtblk_attach(device_t dev)
goto fail;
}
+ taskqueue_start_threads(&sc->vtblk_tq, 1, PI_DISK, "%s taskq",
+ device_get_nameunit(dev));
+
vtblk_create_disk(sc);
virtqueue_enable_intr(sc->vtblk_vq);
diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c
index e6fef90..ffc349a 100644
--- a/sys/dev/virtio/network/if_vtnet.c
+++ b/sys/dev/virtio/network/if_vtnet.c
@@ -439,18 +439,17 @@ vtnet_attach(device_t dev)
ether_ifdetach(ifp);
goto fail;
}
- taskqueue_start_threads(&sc->vtnet_tq, 1, PI_NET, "%s taskq",
- device_get_nameunit(dev));
error = virtio_setup_intr(dev, INTR_TYPE_NET);
if (error) {
device_printf(dev, "cannot setup virtqueue interrupts\n");
- taskqueue_free(sc->vtnet_tq);
- sc->vtnet_tq = NULL;
ether_ifdetach(ifp);
goto fail;
}
+ taskqueue_start_threads(&sc->vtnet_tq, 1, PI_NET, "%s taskq",
+ device_get_nameunit(dev));
+
/*
* Device defaults to promiscuous mode for backwards
* compatibility. Turn it off if possible.
@@ -1103,7 +1102,7 @@ vtnet_alloc_rxbuf(struct vtnet_softc *sc, int nbufs, struct mbuf **m_tailp)
clsize = sc->vtnet_rx_mbuf_size;
- m_head = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, clsize);
+ m_head = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, clsize);
if (m_head == NULL)
goto fail;
@@ -1115,7 +1114,7 @@ vtnet_alloc_rxbuf(struct vtnet_softc *sc, int nbufs, struct mbuf **m_tailp)
("chained Rx mbuf requested without LRO_NOMRG"));
for (i = 1; i < nbufs; i++) {
- m = m_getjcl(M_DONTWAIT, MT_DATA, 0, clsize);
+ m = m_getjcl(M_NOWAIT, MT_DATA, 0, clsize);
if (m == NULL)
goto fail;
@@ -1927,7 +1926,7 @@ again:
if (collapsed)
goto fail;
- m = m_collapse(m, M_DONTWAIT, VTNET_MAX_TX_SEGS - 1);
+ m = m_collapse(m, M_NOWAIT, VTNET_MAX_TX_SEGS - 1);
if (m == NULL)
goto fail;
diff --git a/sys/dev/virtio/scsi/virtio_scsi.c b/sys/dev/virtio/scsi/virtio_scsi.c
index 6b10a96..86684ba 100644
--- a/sys/dev/virtio/scsi/virtio_scsi.c
+++ b/sys/dev/virtio/scsi/virtio_scsi.c
@@ -129,7 +129,7 @@ static int vtscsi_execute_abort_task_cmd(struct vtscsi_softc *,
static int vtscsi_execute_reset_dev_cmd(struct vtscsi_softc *,
struct vtscsi_request *);
-static void vtscsi_get_request_lun(uint8_t lun[], target_id_t *, lun_id_t *);
+static void vtscsi_get_request_lun(uint8_t [], target_id_t *, lun_id_t *);
static void vtscsi_set_request_lun(struct ccb_hdr *, uint8_t []);
static void vtscsi_init_scsi_cmd_req(struct ccb_scsiio *,
struct virtio_scsi_cmd_req *);
@@ -347,12 +347,6 @@ vtscsi_attach(device_t dev)
device_printf(dev, "cannot allocate taskqueue\n");
goto fail;
}
- error = taskqueue_start_threads(&sc->vtscsi_tq, 1, PI_DISK, "%s taskq",
- device_get_nameunit(dev));
- if (error) {
- device_printf(dev, "cannot start taskqueue threads\n");
- goto fail;
- }
error = virtio_setup_intr(dev, INTR_TYPE_CAM);
if (error) {
@@ -360,6 +354,9 @@ vtscsi_attach(device_t dev)
goto fail;
}
+ taskqueue_start_threads(&sc->vtscsi_tq, 1, PI_DISK, "%s taskq",
+ device_get_nameunit(dev));
+
vtscsi_enable_vqs_intr(sc);
/*
@@ -1673,9 +1670,6 @@ vtscsi_announce(struct vtscsi_softc *sc, uint32_t ac_code,
{
struct cam_path *path;
- xpt_async(ac_code, sc->vtscsi_path, NULL);
- return;
-
/* Use the wildcard path from our softc for bus announcements. */
if (target_id == CAM_TARGET_WILDCARD && lun_id == CAM_LUN_WILDCARD) {
xpt_async(ac_code, sc->vtscsi_path, NULL);
diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c
index 7054042..00e7269 100644
--- a/sys/dev/vr/if_vr.c
+++ b/sys/dev/vr/if_vr.c
@@ -1224,7 +1224,7 @@ vr_newbuf(struct vr_softc *sc, int idx)
bus_dmamap_t map;
int nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES;
@@ -1800,7 +1800,7 @@ vr_encap(struct vr_softc *sc, struct mbuf **m_head)
* to copy, just do it all the time.
*/
if ((sc->vr_quirks & VR_Q_NEEDALIGN) != 0) {
- m = m_defrag(*m_head, M_DONTWAIT);
+ m = m_defrag(*m_head, M_NOWAIT);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
@@ -1819,7 +1819,7 @@ vr_encap(struct vr_softc *sc, struct mbuf **m_head)
padlen = VR_MIN_FRAMELEN - m->m_pkthdr.len;
if (M_WRITABLE(m) == 0) {
/* Get a writable copy. */
- m = m_dup(*m_head, M_DONTWAIT);
+ m = m_dup(*m_head, M_NOWAIT);
m_freem(*m_head);
if (m == NULL) {
*m_head = NULL;
@@ -1828,7 +1828,7 @@ vr_encap(struct vr_softc *sc, struct mbuf **m_head)
*m_head = m;
}
if (m->m_next != NULL || M_TRAILINGSPACE(m) < padlen) {
- m = m_defrag(m, M_DONTWAIT);
+ m = m_defrag(m, M_NOWAIT);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
@@ -1850,7 +1850,7 @@ vr_encap(struct vr_softc *sc, struct mbuf **m_head)
error = bus_dmamap_load_mbuf_sg(sc->vr_cdata.vr_tx_tag, txd->tx_dmamap,
*m_head, txsegs, &nsegs, BUS_DMA_NOWAIT);
if (error == EFBIG) {
- m = m_collapse(*m_head, M_DONTWAIT, VR_MAXFRAGS);
+ m = m_collapse(*m_head, M_NOWAIT, VR_MAXFRAGS);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/dev/vte/if_vte.c b/sys/dev/vte/if_vte.c
index 7865ff2..dfc06e5 100644
--- a/sys/dev/vte/if_vte.c
+++ b/sys/dev/vte/if_vte.c
@@ -1034,7 +1034,7 @@ vte_encap(struct vte_softc *sc, struct mbuf **m_head)
if (M_WRITABLE(m) == 0) {
if (m->m_next != NULL || padlen > 0) {
/* Get a writable copy. */
- m = m_dup(*m_head, M_DONTWAIT);
+ m = m_dup(*m_head, M_NOWAIT);
/* Release original mbuf chains. */
m_freem(*m_head);
if (m == NULL) {
@@ -1046,7 +1046,7 @@ vte_encap(struct vte_softc *sc, struct mbuf **m_head)
}
if (m->m_next != NULL) {
- m = m_defrag(*m_head, M_DONTWAIT);
+ m = m_defrag(*m_head, M_NOWAIT);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
@@ -1057,7 +1057,7 @@ vte_encap(struct vte_softc *sc, struct mbuf **m_head)
if (padlen > 0) {
if (M_TRAILINGSPACE(m) < padlen) {
- m = m_defrag(*m_head, M_DONTWAIT);
+ m = m_defrag(*m_head, M_NOWAIT);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
@@ -1422,7 +1422,7 @@ vte_newbuf(struct vte_softc *sc, struct vte_rxdesc *rxd)
bus_dmamap_t map;
int nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES;
@@ -1870,7 +1870,7 @@ vte_init_tx_ring(struct vte_softc *sc)
/* Pre-allocate TX mbufs for deep copy. */
if (tx_deep_copy != 0) {
for (i = 0; i < VTE_TX_RING_CNT; i++) {
- sc->vte_cdata.vte_txmbufs[i] = m_getcl(M_DONTWAIT,
+ sc->vte_cdata.vte_txmbufs[i] = m_getcl(M_NOWAIT,
MT_DATA, M_PKTHDR);
if (sc->vte_cdata.vte_txmbufs[i] == NULL)
return (ENOBUFS);
diff --git a/sys/dev/vx/if_vx.c b/sys/dev/vx/if_vx.c
index 090bb0c..acb9c2f 100644
--- a/sys/dev/vx/if_vx.c
+++ b/sys/dev/vx/if_vx.c
@@ -811,7 +811,7 @@ vx_get(struct vx_softc *sc, u_int totlen)
m = sc->vx_mb[sc->vx_next_mb];
sc->vx_mb[sc->vx_next_mb] = NULL;
if (m == NULL) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return NULL;
} else {
@@ -853,7 +853,7 @@ vx_get(struct vx_softc *sc, u_int totlen)
m = sc->vx_mb[sc->vx_next_mb];
sc->vx_mb[sc->vx_next_mb] = NULL;
if (m == NULL) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
m_freem(top);
return NULL;
@@ -864,7 +864,7 @@ vx_get(struct vx_softc *sc, u_int totlen)
len = MLEN;
}
if (totlen >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (m->m_flags & M_EXT)
len = MCLBYTES;
}
@@ -1044,7 +1044,7 @@ vx_mbuf_fill(void *sp)
i = sc->vx_last_mb;
do {
if (sc->vx_mb[i] == NULL)
- MGET(sc->vx_mb[i], M_DONTWAIT, MT_DATA);
+ MGET(sc->vx_mb[i], M_NOWAIT, MT_DATA);
if (sc->vx_mb[i] == NULL)
break;
i = (i + 1) % MAX_MBS;
diff --git a/sys/dev/vxge/vxge.c b/sys/dev/vxge/vxge.c
index 9948801..c35d84b 100644
--- a/sys/dev/vxge/vxge.c
+++ b/sys/dev/vxge/vxge.c
@@ -1192,7 +1192,7 @@ vxge_rx_rxd_1b_set(vxge_vpath_t *vpath, vxge_hal_rxd_h rxdh, void *dtr_priv)
vxge_dev_t *vdev = vpath->vdev;
- mbuf_pkt = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, vdev->rx_mbuf_sz);
+ mbuf_pkt = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, vdev->rx_mbuf_sz);
if (!mbuf_pkt) {
err = ENOBUFS;
VXGE_DRV_STATS(vpath, rx_no_buf);
@@ -3011,7 +3011,7 @@ retry:
dma_buffers, num_segs, BUS_DMA_NOWAIT);
if (err == EFBIG) {
/* try to defrag, too many segments */
- mbuf_pkt = m_defrag(*m_headp, M_DONTWAIT);
+ mbuf_pkt = m_defrag(*m_headp, M_NOWAIT);
if (mbuf_pkt == NULL) {
err = ENOBUFS;
goto _exit0;
diff --git a/sys/dev/wb/if_wb.c b/sys/dev/wb/if_wb.c
index 0d0dd55..8bc28ea 100644
--- a/sys/dev/wb/if_wb.c
+++ b/sys/dev/wb/if_wb.c
@@ -842,7 +842,7 @@ wb_newbuf(sc, c, m)
struct mbuf *m_new = NULL;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
m_new->m_data = c->wb_buf;
@@ -1192,11 +1192,11 @@ wb_encap(sc, c, m_head)
if (m != NULL) {
struct mbuf *m_new = NULL;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(1);
if (m_head->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(1);
diff --git a/sys/dev/wbwd/wbwd.c b/sys/dev/wbwd/wbwd.c
index 266f87e..dfd8f3c 100644
--- a/sys/dev/wbwd/wbwd.c
+++ b/sys/dev/wbwd/wbwd.c
@@ -1,5 +1,6 @@
/*-
* Copyright (c) 2011 Sandvine Incorporated ULC.
+ * Copyright (c) 2012 iXsystems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -93,15 +94,6 @@ __FBSDID("$FreeBSD$");
#define WB_LDN8_CRF7_CLEAR_MASK \
(WB_LDN8_CRF7_MOUSE|WB_LDN8_CRF7_KEYB|WB_LDN8_CRF7_TS|WB_LDN8_CRF7_IRQS)
-#define write_efir_1(sc, value) \
- bus_space_write_1((sc)->bst, (sc)->bsh, 0, (value))
-#define read_efir_1(sc) \
- bus_space_read_1((sc)->bst, (sc)->bsh, 0)
-#define write_efdr_1(sc, value) \
- bus_space_write_1((sc)->bst, (sc)->bsh, 1, (value))
-#define read_efdr_1(sc) \
- bus_space_read_1((sc)->bst, (sc)->bsh, 1)
-
struct wb_softc {
device_t dev;
struct resource *portres;
@@ -109,8 +101,8 @@ struct wb_softc {
bus_space_handle_t bsh;
int rid;
eventhandler_tag ev_tag;
- int (*ext_cfg_enter_f)(struct wb_softc *);
- void (*ext_cfg_exit_f)(struct wb_softc *);
+ int (*ext_cfg_enter_f)(struct wb_softc *, u_short);
+ void (*ext_cfg_exit_f)(struct wb_softc *, u_short);
int debug_verbose;
/*
@@ -131,13 +123,13 @@ struct wb_softc {
uint8_t reg_2;
};
-static int ext_cfg_enter_0x87_0x87(struct wb_softc *);
-static void ext_cfg_exit_0xaa(struct wb_softc *);
+static int ext_cfg_enter_0x87_0x87(struct wb_softc *, u_short);
+static void ext_cfg_exit_0xaa(struct wb_softc *, u_short);
struct winbond_superio_cfg {
uint8_t efer; /* and efir */
- int (*ext_cfg_enter_f)(struct wb_softc *);
- void (*ext_cfg_exit_f)(struct wb_softc *);
+ int (*ext_cfg_enter_f)(struct wb_softc *, u_short);
+ void (*ext_cfg_exit_f)(struct wb_softc *, u_short);
} probe_addrs[] = {
{
.efer = 0x2e,
@@ -189,6 +181,50 @@ struct winbond_vendor_device_id {
},
};
+static void
+write_efir_1(struct wb_softc *sc, u_short baseport, uint8_t value)
+{
+
+ MPASS(sc != NULL || baseport != 0);
+ if (sc != NULL)
+ bus_space_write_1((sc)->bst, (sc)->bsh, 0, (value));
+ else
+ outb(baseport, value);
+}
+
+static uint8_t __unused
+read_efir_1(struct wb_softc *sc, u_short baseport)
+{
+
+ MPASS(sc != NULL || baseport != 0);
+ if (sc != NULL)
+ return (bus_space_read_1((sc)->bst, (sc)->bsh, 0));
+ else
+ return (inb(baseport));
+}
+
+static void
+write_efdr_1(struct wb_softc *sc, u_short baseport, uint8_t value)
+{
+
+ MPASS(sc != NULL || baseport != 0);
+ if (sc != NULL)
+ bus_space_write_1((sc)->bst, (sc)->bsh, 1, (value));
+ else
+ outb(baseport + 1, value);
+}
+
+static uint8_t
+read_efdr_1(struct wb_softc *sc, u_short baseport)
+{
+
+ MPASS(sc != NULL || baseport != 0);
+ if (sc != NULL)
+ return (bus_space_read_1((sc)->bst, (sc)->bsh, 1));
+ else
+ return (inb(baseport + 1));
+}
+
/*
* Return the watchdog related registers as we last read them. This will
* usually not give the current timeout or state on whether the watchdog
@@ -208,9 +244,8 @@ sysctl_wb_debug(SYSCTL_HANDLER_ARGS)
sbuf_printf(&sb, "LDN8 (GPIO2, Watchdog): ");
sbuf_printf(&sb, "CRF5 0x%02x ", sc->reg_1);
sbuf_printf(&sb, "CRF6 0x%02x ", sc->reg_timeout);
- sbuf_printf(&sb, "CRF7 0x%02x ", sc->reg_2);
+ sbuf_printf(&sb, "CRF7 0x%02x", sc->reg_2);
- sbuf_trim(&sb);
error = sbuf_finish(&sb);
sbuf_delete(&sb);
return (error);
@@ -232,19 +267,19 @@ sysctl_wb_debug_current(SYSCTL_HANDLER_ARGS)
* Enter extended function mode in case someone else has been
* poking on the registers. We will not leave it though.
*/
- if ((*sc->ext_cfg_enter_f)(sc) != 0)
+ if ((*sc->ext_cfg_enter_f)(sc, 0) != 0)
return (ENXIO);
/* Watchdog is configured as part of LDN 8 (GPIO Port2, Watchdog). */
- write_efir_1(sc, WB_LDN_REG);
- write_efdr_1(sc, WB_LDN_REG_LDN8);
+ write_efir_1(sc, 0, WB_LDN_REG);
+ write_efdr_1(sc, 0, WB_LDN_REG_LDN8);
- write_efir_1(sc, WB_LDN8_CRF5);
- sc->reg_1 = read_efdr_1(sc);
- write_efir_1(sc, WB_LDN8_CRF6);
- sc->reg_timeout = read_efdr_1(sc);
- write_efir_1(sc, WB_LDN8_CRF7);
- sc->reg_2 = read_efdr_1(sc);
+ write_efir_1(sc, 0, WB_LDN8_CRF5);
+ sc->reg_1 = read_efdr_1(sc, 0);
+ write_efir_1(sc, 0, WB_LDN8_CRF6);
+ sc->reg_timeout = read_efdr_1(sc, 0);
+ write_efir_1(sc, 0, WB_LDN8_CRF7);
+ sc->reg_2 = read_efdr_1(sc, 0);
return (sysctl_wb_debug(oidp, arg1, arg2, req));
}
@@ -289,7 +324,7 @@ sysctl_wb_force_test_nmi(SYSCTL_HANDLER_ARGS)
* Enter extended function mode in case someone else has been
* poking on the registers. We will not leave it though.
*/
- if ((*sc->ext_cfg_enter_f)(sc) != 0)
+ if ((*sc->ext_cfg_enter_f)(sc, 0) != 0)
return (ENXIO);
#ifdef notyet
@@ -302,16 +337,16 @@ sysctl_wb_force_test_nmi(SYSCTL_HANDLER_ARGS)
#endif
/* Watchdog is configured as part of LDN 8 (GPIO Port2, Watchdog). */
- write_efir_1(sc, WB_LDN_REG);
- write_efdr_1(sc, WB_LDN_REG_LDN8);
+ write_efir_1(sc, 0, WB_LDN_REG);
+ write_efdr_1(sc, 0, WB_LDN_REG_LDN8);
/* Force watchdog to fire. */
- write_efir_1(sc, WB_LDN8_CRF7);
- sc->reg_2 = read_efdr_1(sc);
+ write_efir_1(sc, 0, WB_LDN8_CRF7);
+ sc->reg_2 = read_efdr_1(sc, 0);
sc->reg_2 |= WB_LDN8_CRF7_FORCE;
- write_efir_1(sc, WB_LDN8_CRF7);
- write_efdr_1(sc, sc->reg_2);
+ write_efir_1(sc, 0, WB_LDN8_CRF7);
+ write_efdr_1(sc, 0, sc->reg_2);
return (0);
}
@@ -345,24 +380,24 @@ wb_print_state(struct wb_softc *sc, const char *msg)
* between different chips.
*/
static int
-ext_cfg_enter_0x87_0x87(struct wb_softc *sc)
+ext_cfg_enter_0x87_0x87(struct wb_softc *sc, u_short baseport)
{
/*
* Enable extended function mode.
* Winbond does not allow us to validate so always return success.
*/
- write_efir_1(sc, 0x87);
- write_efir_1(sc, 0x87);
+ write_efir_1(sc, baseport, 0x87);
+ write_efir_1(sc, baseport, 0x87);
return (0);
}
static void
-ext_cfg_exit_0xaa(struct wb_softc *sc)
+ext_cfg_exit_0xaa(struct wb_softc *sc, u_short baseport)
{
- write_efir_1(sc, 0xaa);
+ write_efir_1(sc, baseport, 0xaa);
}
/*
@@ -380,22 +415,22 @@ wb_set_watchdog(struct wb_softc *sc, unsigned int timeout)
* Enter extended function mode in case someone else has been
* poking on the registers. We will not leave it though.
*/
- if ((*sc->ext_cfg_enter_f)(sc) != 0)
+ if ((*sc->ext_cfg_enter_f)(sc, 0) != 0)
return (ENXIO);
/* Watchdog is configured as part of LDN 8 (GPIO Port2, Watchdog) */
- write_efir_1(sc, WB_LDN_REG);
- write_efdr_1(sc, WB_LDN_REG_LDN8);
+ write_efir_1(sc, 0, WB_LDN_REG);
+ write_efdr_1(sc, 0, WB_LDN_REG_LDN8);
/* Disable and validate or arm/reset watchdog. */
if (timeout == 0) {
/* Disable watchdog. */
- write_efir_1(sc, WB_LDN8_CRF6);
- write_efdr_1(sc, 0x00);
+ write_efir_1(sc, 0, WB_LDN8_CRF6);
+ write_efdr_1(sc, 0, 0x00);
/* Re-check. */
- write_efir_1(sc, WB_LDN8_CRF6);
- sc->reg_timeout = read_efdr_1(sc);
+ write_efir_1(sc, 0, WB_LDN8_CRF6);
+ sc->reg_timeout = read_efdr_1(sc, 0);
if (sc->reg_timeout != 0x00) {
device_printf(sc->dev, "Failed to disable watchdog: "
@@ -416,8 +451,8 @@ wb_set_watchdog(struct wb_softc *sc, unsigned int timeout)
return (EINVAL);
/* Read current scaling factor. */
- write_efir_1(sc, WB_LDN8_CRF5);
- sc->reg_1 = read_efdr_1(sc);
+ write_efir_1(sc, 0, WB_LDN8_CRF5);
+ sc->reg_1 = read_efdr_1(sc, 0);
if (timeout > 255) {
/* Set scaling factor to 60s. */
@@ -432,21 +467,21 @@ wb_set_watchdog(struct wb_softc *sc, unsigned int timeout)
}
/* In case we fired before we need to clear to fire again. */
- write_efir_1(sc, WB_LDN8_CRF7);
- sc->reg_2 = read_efdr_1(sc);
+ write_efir_1(sc, 0, WB_LDN8_CRF7);
+ sc->reg_2 = read_efdr_1(sc, 0);
if (sc->reg_2 & WB_LDN8_CRF7_TS) {
sc->reg_2 &= ~WB_LDN8_CRF7_TS;
- write_efir_1(sc, WB_LDN8_CRF7);
- write_efdr_1(sc, sc->reg_2);
+ write_efir_1(sc, 0, WB_LDN8_CRF7);
+ write_efdr_1(sc, 0, sc->reg_2);
}
/* Write back scaling factor. */
- write_efir_1(sc, WB_LDN8_CRF5);
- write_efdr_1(sc, sc->reg_1);
+ write_efir_1(sc, 0, WB_LDN8_CRF5);
+ write_efdr_1(sc, 0, sc->reg_1);
/* Set timer and arm/reset the watchdog. */
- write_efir_1(sc, WB_LDN8_CRF6);
- write_efdr_1(sc, sc->reg_timeout);
+ write_efir_1(sc, 0, WB_LDN8_CRF6);
+ write_efdr_1(sc, 0, sc->reg_timeout);
}
if (sc->debug_verbose)
@@ -516,62 +551,71 @@ wb_probe_enable(device_t dev, int probe)
int error, found, i, j;
uint8_t dev_id, dev_rev, cr26;
- sc = device_get_softc(dev);
- bzero(sc, sizeof(*sc));
- sc->dev = dev;
+ if (dev == NULL)
+ sc = NULL;
+ else {
+ sc = device_get_softc(dev);
+ bzero(sc, sizeof(*sc));
+ sc->dev = dev;
+ }
error = ENXIO;
for (i = 0; i < sizeof(probe_addrs) / sizeof(*probe_addrs); i++) {
- /* Allocate bus resources for IO index/data register access. */
- sc->portres = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->rid,
- probe_addrs[i].efer, probe_addrs[i].efer + 1, 2, RF_ACTIVE);
- if (sc->portres == NULL)
- continue;
- sc->bst = rman_get_bustag(sc->portres);
- sc->bsh = rman_get_bushandle(sc->portres);
+ if (sc != NULL) {
+ /* Allocate bus resources for IO index/data register access. */
+ sc->portres = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->rid,
+ probe_addrs[i].efer, probe_addrs[i].efer + 1, 2, RF_ACTIVE);
+ if (sc->portres == NULL)
+ continue;
+ sc->bst = rman_get_bustag(sc->portres);
+ sc->bsh = rman_get_bushandle(sc->portres);
+ }
found = 0;
- error = (*probe_addrs[i].ext_cfg_enter_f)(sc);
+ error = (*probe_addrs[i].ext_cfg_enter_f)(sc, probe_addrs[i].efer);
if (error != 0)
goto cleanup;
/* Identify the SuperIO chip. */
- write_efir_1(sc, WB_DEVICE_ID_REG);
- dev_id = read_efdr_1(sc);
- write_efir_1(sc, WB_DEVICE_REV_REG);
- dev_rev = read_efdr_1(sc);
- write_efir_1(sc, WB_CR26);
- cr26 = read_efdr_1(sc);
+ write_efir_1(sc, probe_addrs[i].efer, WB_DEVICE_ID_REG);
+ dev_id = read_efdr_1(sc, probe_addrs[i].efer);
+ write_efir_1(sc, probe_addrs[i].efer, WB_DEVICE_REV_REG);
+ dev_rev = read_efdr_1(sc, probe_addrs[i].efer);
+ write_efir_1(sc, probe_addrs[i].efer, WB_CR26);
+ cr26 = read_efdr_1(sc, probe_addrs[i].efer);
/* HEFRAS of 0 means EFER at 0x2e, 1 means EFER at 0x4e. */
if (((cr26 & 0x40) == 0x00 && probe_addrs[i].efer != 0x2e) ||
((cr26 & 0x40) == 0x40 && probe_addrs[i].efer != 0x4e)) {
- device_printf(dev, "HEFRAS and EFER do not align: EFER "
- "0x%02x DevID 0x%02x DevRev 0x%02x CR26 0x%02x\n",
- probe_addrs[i].efer, dev_id, dev_rev, cr26);
+ if (dev != NULL)
+ device_printf(dev, "HEFRAS and EFER do not "
+ "align: EFER 0x%02x DevID 0x%02x DevRev "
+ "0x%02x CR26 0x%02x\n",
+ probe_addrs[i].efer, dev_id, dev_rev, cr26);
goto cleanup;
}
for (j = 0; j < sizeof(wb_devs) / sizeof(*wb_devs); j++) {
if (wb_devs[j].device_id == dev_id &&
wb_devs[j].device_rev == dev_rev) {
- if (probe)
+ if (probe && dev != NULL)
device_set_desc(dev, wb_devs[j].descr);
found++;
break;
}
}
- if (probe && found && bootverbose)
+ if (probe && found && bootverbose && dev != NULL)
device_printf(dev, "%s EFER 0x%02x ID 0x%02x Rev 0x%02x"
" CR26 0x%02x (probing)\n", device_get_desc(dev),
probe_addrs[i].efer, dev_id, dev_rev, cr26);
cleanup:
if (probe || !found) {
- (*probe_addrs[i].ext_cfg_exit_f)(sc);
+ (*probe_addrs[i].ext_cfg_exit_f)(sc, probe_addrs[i].efer);
- (void) bus_release_resource(dev, SYS_RES_IOPORT, sc->rid,
- sc->portres);
+ if (sc != NULL)
+ (void) bus_release_resource(dev, SYS_RES_IOPORT,
+ sc->rid, sc->portres);
}
/*
@@ -580,8 +624,10 @@ cleanup:
* for operations.
*/
if (found) {
- sc->ext_cfg_enter_f = probe_addrs[i].ext_cfg_enter_f;
- sc->ext_cfg_exit_f = probe_addrs[i].ext_cfg_exit_f;
+ if (sc != NULL) {
+ sc->ext_cfg_enter_f = probe_addrs[i].ext_cfg_enter_f;
+ sc->ext_cfg_exit_f = probe_addrs[i].ext_cfg_exit_f;
+ }
error = BUS_PROBE_DEFAULT;
break;
} else
@@ -591,6 +637,21 @@ cleanup:
return (error);
}
+static void
+wb_identify(driver_t *driver, device_t parent)
+{
+ device_t dev;
+
+ if ((dev = device_find_child(parent, driver->name, 0)) == NULL) {
+ if (wb_probe_enable(dev, 1) != BUS_PROBE_DEFAULT) {
+ if (bootverbose)
+ device_printf(dev, "can not find compatible Winbond chip.\n");
+ } else
+ dev = BUS_ADD_CHILD(parent, 0, driver->name, 0);
+ return;
+ }
+}
+
static int
wb_probe(device_t dev)
{
@@ -620,20 +681,20 @@ wb_attach(device_t dev)
("%s: successfull probe result but not setup correctly", __func__));
/* Watchdog is configured as part of LDN 8 (GPIO Port2, Watchdog). */
- write_efir_1(sc, WB_LDN_REG);
- write_efdr_1(sc, WB_LDN_REG_LDN8);
+ write_efir_1(sc, 0, WB_LDN_REG);
+ write_efdr_1(sc, 0, WB_LDN_REG_LDN8);
/* Make sure LDN8 is enabled (Do we need to? Also affects GPIO). */
- write_efir_1(sc, WB_LDN8_CR30);
- write_efdr_1(sc, WB_LDN8_CR30_ACTIVE);
+ write_efir_1(sc, 0, WB_LDN8_CR30);
+ write_efdr_1(sc, 0, WB_LDN8_CR30_ACTIVE);
/* Read the current watchdog configuration. */
- write_efir_1(sc, WB_LDN8_CRF5);
- sc->reg_1 = read_efdr_1(sc);
- write_efir_1(sc, WB_LDN8_CRF6);
- sc->reg_timeout = read_efdr_1(sc);
- write_efir_1(sc, WB_LDN8_CRF7);
- sc->reg_2 = read_efdr_1(sc);
+ write_efir_1(sc, 0, WB_LDN8_CRF5);
+ sc->reg_1 = read_efdr_1(sc, 0);
+ write_efir_1(sc, 0, WB_LDN8_CRF6);
+ sc->reg_timeout = read_efdr_1(sc, 0);
+ write_efir_1(sc, 0, WB_LDN8_CRF7);
+ sc->reg_2 = read_efdr_1(sc, 0);
/* Print current state if bootverbose or watchdog already enabled. */
if (bootverbose || (sc->reg_timeout > 0x00))
@@ -645,12 +706,12 @@ wb_attach(device_t dev)
*/
sc->reg_1 &= ~(WB_LDN8_CRF5_KEYB_P20);
sc->reg_1 |= WB_LDN8_CRF5_KBRST;
- write_efir_1(sc, WB_LDN8_CRF5);
- write_efdr_1(sc, sc->reg_1);
+ write_efir_1(sc, 0, WB_LDN8_CRF5);
+ write_efdr_1(sc, 0, sc->reg_1);
sc->reg_2 &= ~WB_LDN8_CRF7_CLEAR_MASK;
- write_efir_1(sc, WB_LDN8_CRF7);
- write_efdr_1(sc, sc->reg_2);
+ write_efir_1(sc, 0, WB_LDN8_CRF7);
+ write_efdr_1(sc, 0, sc->reg_2);
/* Read global timeout override tunable, Add per device sysctls. */
if (TUNABLE_ULONG_FETCH("hw.wbwd.timeout_override", &timeout)) {
@@ -699,7 +760,7 @@ wb_detach(device_t dev)
wb_set_watchdog(sc, 0);
/* Disable extended function mode. */
- (*sc->ext_cfg_exit_f)(sc);
+ (*sc->ext_cfg_exit_f)(sc, 0);
/* Cleanup resources. */
(void) bus_release_resource(dev, SYS_RES_IOPORT, sc->rid, sc->portres);
@@ -711,11 +772,12 @@ wb_detach(device_t dev)
static device_method_t wb_methods[] = {
/* Device interface */
+ DEVMETHOD(device_identify, wb_identify),
DEVMETHOD(device_probe, wb_probe),
DEVMETHOD(device_attach, wb_attach),
DEVMETHOD(device_detach, wb_detach),
- { 0, 0 }
+ DEVMETHOD_END
};
static driver_t wb_isa_driver = {
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c
index cae3b6f..2ca3c8c 100644
--- a/sys/dev/wi/if_wi.c
+++ b/sys/dev/wi/if_wi.c
@@ -1360,9 +1360,9 @@ wi_rx_intr(struct wi_softc *sc)
}
if (off + len > MHLEN)
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
else
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL) {
CSR_WRITE_2(sc, WI_EVENT_ACK, WI_EV_RX);
ifp->if_ierrors++;
diff --git a/sys/dev/wl/if_wl.c b/sys/dev/wl/if_wl.c
index a95997e..c6db4b9 100644
--- a/sys/dev/wl/if_wl.c
+++ b/sys/dev/wl/if_wl.c
@@ -1094,7 +1094,7 @@ wlread(struct wl_softc *sc, u_short fd_p)
/*
* Allocate a cluster'd mbuf to receive the packet.
*/
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) {
if (wlhwrst(sc) != TRUE) {
sc->hacr &= ~HACR_INTRON;
diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c
index 365e03e..465c140 100644
--- a/sys/dev/wpi/if_wpi.c
+++ b/sys/dev/wpi/if_wpi.c
@@ -989,7 +989,7 @@ wpi_alloc_rx_ring(struct wpi_softc *sc, struct wpi_rx_ring *ring)
__func__, error);
goto fail;
}
- m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE);
+ m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE);
if (m == NULL) {
device_printf(sc->sc_dev,
"%s: could not allocate rx mbuf\n", __func__);
@@ -1493,7 +1493,7 @@ wpi_rx_intr(struct wpi_softc *sc, struct wpi_rx_desc *desc,
}
/* XXX don't need mbuf, just dma buffer */
- mnew = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE);
+ mnew = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE);
if (mnew == NULL) {
DPRINTFN(WPI_DEBUG_RX, ("%s: no mbuf to restock ring\n",
__func__));
@@ -1975,7 +1975,7 @@ wpi_tx_data(struct wpi_softc *sc, struct mbuf *m0, struct ieee80211_node *ni,
}
if (error != 0) {
/* XXX use m_collapse */
- mnew = m_defrag(m0, M_DONTWAIT);
+ mnew = m_defrag(m0, M_NOWAIT);
if (mnew == NULL) {
device_printf(sc->sc_dev,
"could not defragment mbuf\n");
@@ -2575,7 +2575,7 @@ wpi_scan(struct wpi_softc *sc)
desc = &ring->desc[ring->cur];
data = &ring->data[ring->cur];
- data->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ data->m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (data->m == NULL) {
device_printf(sc->sc_dev,
"could not allocate mbuf for scan command\n");
diff --git a/sys/dev/wtap/if_wtap.c b/sys/dev/wtap/if_wtap.c
index 6adc5b3..6bc8e6b 100644
--- a/sys/dev/wtap/if_wtap.c
+++ b/sys/dev/wtap/if_wtap.c
@@ -100,7 +100,7 @@ wtap_node_write(struct cdev *dev, struct uio *uio, int ioflag)
return (err);
}
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
m_copyback(m, 0, buf_len, buf);
CURVNET_SET(TD_TO_VNET(curthread));
@@ -241,7 +241,7 @@ wtap_beacon_intrp(void *arg)
* the beacon frame changed size (probably because
* of the TIM bitmap).
*/
- m = m_dup(avp->beacon, M_DONTWAIT);
+ m = m_dup(avp->beacon, M_NOWAIT);
if (ieee80211_beacon_update(avp->bf_node, &avp->av_boff, m, 0)) {
printf("%s, need to remap the memory because the beacon frame"
" changed size.\n",__func__);
@@ -326,14 +326,19 @@ wtap_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ],
DWTAP_PRINTF("%s\n", __func__);
- avp = (struct wtap_vap *) malloc(sizeof(struct wtap_vap),
- M_80211_VAP, M_NOWAIT | M_ZERO);
+ avp = malloc(sizeof(struct wtap_vap), M_80211_VAP, M_NOWAIT | M_ZERO);
+ if (avp == NULL)
+ return (NULL);
avp->id = sc->id;
avp->av_md = sc->sc_md;
avp->av_bcinterval = msecs_to_ticks(BEACON_INTRERVAL + 100*sc->id);
vap = (struct ieee80211vap *) avp;
error = ieee80211_vap_setup(ic, vap, name, unit, IEEE80211_M_MBSS,
flags | IEEE80211_CLONE_NOBEACONS, bssid, mac);
+ if (error) {
+ free(avp, M_80211_VAP);
+ return (NULL);
+ }
/* override various methods */
avp->av_recv_mgmt = vap->iv_recv_mgmt;
@@ -348,7 +353,7 @@ wtap_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ],
/* complete setup */
ieee80211_vap_attach(vap, wtap_media_change, ieee80211_media_status);
avp->av_dev = make_dev(&wtap_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600,
- (const char *)ic->ic_ifp->if_xname);
+ "%s", (const char *)ic->ic_ifp->if_xname);
/* TODO this is a hack to force it to choose the rate we want */
ni = ieee80211_ref_node(vap->iv_bss);
@@ -803,11 +808,7 @@ wtap_attach(struct wtap_softc *sc, const uint8_t *macaddr)
ic->ic_regdomain.location = 1; /* Indoors */
ic->ic_regdomain.isocc[0] = 'S';
ic->ic_regdomain.isocc[1] = 'E';
- /*
- * Indicate we need the 802.11 header padded to a
- * 32-bit boundary for 4-address and QoS frames.
- */
- ic->ic_flags |= IEEE80211_F_DATAPAD;
+
ic->ic_nchans = 1;
ic->ic_channels[0].ic_flags = IEEE80211_CHAN_B;
ic->ic_channels[0].ic_freq = 2412;
diff --git a/sys/dev/wtap/plugins/visibility.c b/sys/dev/wtap/plugins/visibility.c
index 9d2624c..a73d520 100644
--- a/sys/dev/wtap/plugins/visibility.c
+++ b/sys/dev/wtap/plugins/visibility.c
@@ -151,7 +151,7 @@ visibility_work(struct wtap_plugin *plugin, struct packet *p)
struct wtap_softc *sc =
hal->hal_devs[k];
struct mbuf *m =
- m_dup(p->m, M_DONTWAIT);
+ m_dup(p->m, M_NOWAIT);
DWTAP_PRINTF("[%d] duplicated old_m=%p"
"to new_m=%p\n", p->id, p->m, m);
#if 0
diff --git a/sys/dev/xe/if_xe.c b/sys/dev/xe/if_xe.c
index 57411ba..855c8c1 100644
--- a/sys/dev/xe/if_xe.c
+++ b/sys/dev/xe/if_xe.c
@@ -757,14 +757,14 @@ xe_rxintr(struct xe_softc *scp, uint8_t rst0)
* read 16-bit words). XXX - Surely there's a
* better way to do this alignment?
*/
- MGETHDR(mbp, M_DONTWAIT, MT_DATA);
+ MGETHDR(mbp, M_NOWAIT, MT_DATA);
if (mbp == NULL) {
ifp->if_iqdrops++;
continue;
}
if (len + 3 > MHLEN) {
- MCLGET(mbp, M_DONTWAIT);
+ MCLGET(mbp, M_NOWAIT);
if ((mbp->m_flags & M_EXT) == 0) {
m_freem(mbp);
ifp->if_iqdrops++;
diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c
index 7dd5639..856c988 100644
--- a/sys/dev/xen/netfront/netfront.c
+++ b/sys/dev/xen/netfront/netfront.c
@@ -831,13 +831,13 @@ network_alloc_rx_buffers(struct netfront_info *sc)
*/
batch_target = sc->rx_target - (req_prod - sc->rx.rsp_cons);
for (i = mbufq_len(&sc->xn_rx_batch); i < batch_target; i++) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("%s: MGETHDR failed\n", __func__);
goto no_mbuf;
}
- m_cljget(m_new, M_DONTWAIT, MJUMPAGESIZE);
+ m_cljget(m_new, M_NOWAIT, MJUMPAGESIZE);
if ((m_new->m_flags & M_EXT) == 0) {
printf("%s: m_cljget failed\n", __func__);
m_freem(m_new);
@@ -1530,7 +1530,7 @@ xn_assemble_tx_request(struct netfront_info *sc, struct mbuf *m_head)
* the Linux network stack.
*/
if (nfrags > sc->maxfrags) {
- m = m_defrag(m_head, M_DONTWAIT);
+ m = m_defrag(m_head, M_NOWAIT);
if (!m) {
/*
* Defrag failed, so free the mbuf and
diff --git a/sys/dev/xl/if_xl.c b/sys/dev/xl/if_xl.c
index 7b2e23f..90bc0c0 100644
--- a/sys/dev/xl/if_xl.c
+++ b/sys/dev/xl/if_xl.c
@@ -1762,7 +1762,7 @@ xl_newbuf(struct xl_softc *sc, struct xl_chain_onefrag *c)
XL_LOCK_ASSERT(sc);
- m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m_new = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m_new == NULL)
return (ENOBUFS);
@@ -2358,7 +2358,7 @@ xl_encap(struct xl_softc *sc, struct xl_chain *c, struct mbuf **m_head)
* and would waste cycles.
*/
if (error) {
- m_new = m_collapse(*m_head, M_DONTWAIT, XL_MAXFRAGS);
+ m_new = m_collapse(*m_head, M_NOWAIT, XL_MAXFRAGS);
if (m_new == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c
index 97a1bcf..9851229 100644
--- a/sys/fs/devfs/devfs_vnops.c
+++ b/sys/fs/devfs/devfs_vnops.c
@@ -1049,6 +1049,7 @@ devfs_open(struct vop_open_args *ap)
int error, ref, vlocked;
struct cdevsw *dsw;
struct file *fpop;
+ struct mtx *mtxp;
if (vp->v_type == VBLK)
return (ENXIO);
@@ -1099,6 +1100,16 @@ devfs_open(struct vop_open_args *ap)
#endif
if (fp->f_ops == &badfileops)
finit(fp, fp->f_flag, DTYPE_VNODE, dev, &devfs_ops_f);
+ mtxp = mtx_pool_find(mtxpool_sleep, fp);
+
+ /*
+ * Hint to the dofilewrite() to not force the buffer draining
+ * on the writer to the file. Most likely, the write would
+ * not need normal buffers.
+ */
+ mtx_lock(mtxp);
+ fp->f_vnread_flags |= FDEVFS_VNODE;
+ mtx_unlock(mtxp);
return (error);
}
diff --git a/sys/fs/ext2fs/ext2_dinode.h b/sys/fs/ext2fs/ext2_dinode.h
index 16c2cb7..9a87fc4 100755
--- a/sys/fs/ext2fs/ext2_dinode.h
+++ b/sys/fs/ext2fs/ext2_dinode.h
@@ -60,15 +60,16 @@
#define EXT2_APPEND 0x00000020 /* writes to file may only append */
#define EXT2_NODUMP 0x00000040 /* do not dump file */
#define EXT2_NOATIME 0x00000080 /* do not update atime */
-#define EXT2_INDEX 0x00001000 /* hash-indexed directory */
-#define EXT2_IMAGIC 0x00002000 /* AFS directory */
-#define EXT2_JOURNAL_DATA 0x00004000 /* file data should be journaled */
-#define EXT2_NOTAIL 0x00008000 /* file tail should not be merged */
-#define EXT2_DIRSYNC 0x00010000 /* dirsync behaviour */
-#define EXT2_TOPDIR 0x00020000 /* Top of directory hierarchies*/
-#define EXT2_HUGE_FILE 0x00040000 /* Set to each huge file */
-#define EXT2_EXTENTS 0x00080000 /* Inode uses extents */
-#define EXT2_EOFBLOCKS 0x00400000 /* Blocks allocated beyond EOF */
+
+#define EXT4_INDEX 0x00001000 /* hash-indexed directory */
+#define EXT4_IMAGIC 0x00002000 /* AFS directory */
+#define EXT4_JOURNAL_DATA 0x00004000 /* file data should be journaled */
+#define EXT4_NOTAIL 0x00008000 /* file tail should not be merged */
+#define EXT4_DIRSYNC 0x00010000 /* dirsync behaviour */
+#define EXT4_TOPDIR 0x00020000 /* Top of directory hierarchies*/
+#define EXT4_HUGE_FILE 0x00040000 /* Set to each huge file */
+#define EXT4_EXTENTS 0x00080000 /* Inode uses extents */
+#define EXT4_EOFBLOCKS 0x00400000 /* Blocks allocated beyond EOF */
/*
* Definitions for nanosecond timestamps.
@@ -78,8 +79,7 @@
#define EXT3_EPOCH_MASK ((1 << EXT3_EPOCH_BITS) - 1)
#define EXT3_NSEC_MASK (~0UL << EXT3_EPOCH_BITS)
-#define E2DI_HAS_XTIME(ip) (EXT2_INODE_SIZE((ip)->i_e2fs) > \
- E2FS_REV0_INODE_SIZE)
+#define E2DI_HAS_XTIME(ip) (EXT2_HAS_RO_COMPAT_FEATURE(ip->i_e2fs, EXT2F_ROCOMPAT_EXTRA_ISIZE))
/*
* Structure of an inode on the disk
diff --git a/sys/fs/ext2fs/ext2_inode_cnv.c b/sys/fs/ext2fs/ext2_inode_cnv.c
index aff44d9..0fa3075 100644
--- a/sys/fs/ext2fs/ext2_inode_cnv.c
+++ b/sys/fs/ext2fs/ext2_inode_cnv.c
@@ -27,17 +27,18 @@
*/
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/endian.h>
#include <sys/lock.h>
#include <sys/stat.h>
#include <sys/vnode.h>
#include <fs/ext2fs/inode.h>
#include <fs/ext2fs/ext2fs.h>
-#include <fs/ext2fs/ext2_extern.h>
#include <fs/ext2fs/ext2_dinode.h>
+#include <fs/ext2fs/ext2_extern.h>
#define XTIME_TO_NSEC(x) ((x & EXT3_NSEC_MASK) >> 2)
-#define NSEC_TO_XTIME(t) ((t << 2) & EXT3_NSEC_MASK)
+#define NSEC_TO_XTIME(t) (le32toh(t << 2) & EXT3_NSEC_MASK)
void
ext2_print_inode( in )
diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c
index 7447558..3f181fd 100644
--- a/sys/fs/ext2fs/ext2_vfsops.c
+++ b/sys/fs/ext2fs/ext2_vfsops.c
@@ -349,7 +349,7 @@ compute_sb_data(struct vnode *devvp, struct ext2fs *es,
}
}
/* Check for extra isize in big inodes. */
- if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT4F_ROCOMPAT_EXTRA_ISIZE) &&
+ if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_EXTRA_ISIZE) &&
EXT2_INODE_SIZE(fs) < sizeof(struct ext2fs_dinode)) {
printf("ext2fs: no space for extra inode timestamps\n");
return (EINVAL);
diff --git a/sys/fs/ext2fs/ext2fs.h b/sys/fs/ext2fs/ext2fs.h
index add9c05..5cafc7b 100755
--- a/sys/fs/ext2fs/ext2fs.h
+++ b/sys/fs/ext2fs/ext2fs.h
@@ -215,18 +215,18 @@ struct m_ext2fs {
#define EXT2F_ROCOMPAT_SPARSESUPER 0x0001
#define EXT2F_ROCOMPAT_LARGEFILE 0x0002
#define EXT2F_ROCOMPAT_BTREE_DIR 0x0004
-#define EXT4F_ROCOMPAT_HUGE_FILE 0x0008
-#define EXT4F_ROCOMPAT_GDT_CSUM 0x0010
-#define EXT4F_ROCOMPAT_DIR_NLINK 0x0020
-#define EXT4F_ROCOMPAT_EXTRA_ISIZE 0x0040
+#define EXT2F_ROCOMPAT_HUGE_FILE 0x0008
+#define EXT2F_ROCOMPAT_GDT_CSUM 0x0010
+#define EXT2F_ROCOMPAT_DIR_NLINK 0x0020
+#define EXT2F_ROCOMPAT_EXTRA_ISIZE 0x0040
#define EXT2F_INCOMPAT_COMP 0x0001
#define EXT2F_INCOMPAT_FTYPE 0x0002
-#define EXT4F_INCOMPAT_META_BG 0x0010
-#define EXT4F_INCOMPAT_EXTENTS 0x0040
-#define EXT4F_INCOMPAT_64BIT 0x0080
-#define EXT4F_INCOMPAT_MMP 0x0100
-#define EXT4F_INCOMPAT_FLEX_BG 0x0200
+#define EXT2F_INCOMPAT_META_BG 0x0010
+#define EXT2F_INCOMPAT_EXTENTS 0x0040
+#define EXT2F_INCOMPAT_64BIT 0x0080
+#define EXT2F_INCOMPAT_MMP 0x0100
+#define EXT2F_INCOMPAT_FLEX_BG 0x0200
/*
* Features supported in this implementation
@@ -239,7 +239,7 @@ struct m_ext2fs {
#define EXT2F_COMPAT_SUPP 0x0000
#define EXT2F_ROCOMPAT_SUPP (EXT2F_ROCOMPAT_SPARSESUPER | \
EXT2F_ROCOMPAT_LARGEFILE | \
- EXT4F_ROCOMPAT_EXTRA_ISIZE)
+ EXT2F_ROCOMPAT_EXTRA_ISIZE)
#define EXT2F_INCOMPAT_SUPP EXT2F_INCOMPAT_FTYPE
/* Assume that user mode programs are passing in an ext2fs superblock, not
diff --git a/sys/fs/nfs/nfs.h b/sys/fs/nfs/nfs.h
index 3d588a5..3cc8c8f 100644
--- a/sys/fs/nfs/nfs.h
+++ b/sys/fs/nfs/nfs.h
@@ -50,6 +50,7 @@
#define NFS_MAXREXMIT 100 /* Stop counting after this many */
#define NFSV4_CALLBACKTIMEO (2 * NFS_HZ) /* Timeout in ticks */
#define NFSV4_CALLBACKRETRY 5 /* Number of retries before failure */
+#define NFSV4_CBSLOTS 8 /* Number of slots for session */
#define NFSV4_CBRETRYCNT 4 /* # of CBRecall retries upon err */
#define NFSV4_UPCALLTIMEO (15 * NFS_HZ) /* Timeout in ticks for upcalls */
/* to gssd or nfsuserd */
@@ -100,6 +101,9 @@
#ifndef NFSCLDELEGHIGHWATER
#define NFSCLDELEGHIGHWATER 10000 /* limit for client delegations */
#endif
+#ifndef NFSCLLAYOUTHIGHWATER
+#define NFSCLLAYOUTHIGHWATER 10000 /* limit for client pNFS layouts */
+#endif
#ifndef NFSNOOPEN /* Inactive open owner (sec) */
#define NFSNOOPEN 120
#endif
@@ -529,6 +533,7 @@ struct nfsrv_descript {
nfsquad_t nd_clientid; /* Implied clientid */
int nd_gssnamelen; /* principal name length */
char *nd_gssname; /* principal name */
+ uint32_t *nd_slotseq; /* ptr to slot seq# in req */
};
#define nd_princlen nd_gssnamelen
@@ -560,6 +565,8 @@ struct nfsrv_descript {
#define ND_EXGSSPRIVACY 0x00400000
#define ND_INCRSEQID 0x00800000
#define ND_NFSCL 0x01000000
+#define ND_NFSV41 0x02000000
+#define ND_HASSEQUENCE 0x04000000
/*
* ND_GSS should be the "or" of all GSS type authentications.
@@ -572,6 +579,7 @@ struct nfsv4_opflag {
int savereply;
int modifyfs;
int lktype;
+ int needsseq;
};
/*
@@ -645,6 +653,15 @@ struct nfsv4lock {
#define NFSACCCHK_VPNOTLOCKED 0
#define NFSACCCHK_VPISLOCKED 1
+/*
+ * Slot for the NFSv4.1 Sequence Op.
+ */
+struct nfsslot {
+ int nfssl_inprog;
+ uint32_t nfssl_seq;
+ struct mbuf *nfssl_reply;
+};
+
#endif /* _KERNEL */
#endif /* _NFS_NFS_H */
diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c
index 7b72ced..6640c1f 100644
--- a/sys/fs/nfs/nfs_commonkrpc.c
+++ b/sys/fs/nfs/nfs_commonkrpc.c
@@ -76,23 +76,27 @@ dtrace_nfsclient_nfs23_done_probe_func_t
/*
* Registered probes by RPC type.
*/
-uint32_t nfscl_nfs2_start_probes[NFS_NPROCS + 1];
-uint32_t nfscl_nfs2_done_probes[NFS_NPROCS + 1];
+uint32_t nfscl_nfs2_start_probes[NFSV41_NPROCS + 1];
+uint32_t nfscl_nfs2_done_probes[NFSV41_NPROCS + 1];
-uint32_t nfscl_nfs3_start_probes[NFS_NPROCS + 1];
-uint32_t nfscl_nfs3_done_probes[NFS_NPROCS + 1];
+uint32_t nfscl_nfs3_start_probes[NFSV41_NPROCS + 1];
+uint32_t nfscl_nfs3_done_probes[NFSV41_NPROCS + 1];
-uint32_t nfscl_nfs4_start_probes[NFS_NPROCS + 1];
-uint32_t nfscl_nfs4_done_probes[NFS_NPROCS + 1];
+uint32_t nfscl_nfs4_start_probes[NFSV41_NPROCS + 1];
+uint32_t nfscl_nfs4_done_probes[NFSV41_NPROCS + 1];
#endif
NFSSTATESPINLOCK;
NFSREQSPINLOCK;
+NFSDLOCKMUTEX;
extern struct nfsstats newnfsstats;
extern struct nfsreqhead nfsd_reqq;
extern int nfscl_ticks;
extern void (*ncl_call_invalcaches)(struct vnode *);
+extern int nfs_numnfscbd;
+extern int nfscl_debuglevel;
+SVCPOOL *nfscbd_pool;
static int nfsrv_gsscallbackson = 0;
static int nfs_bufpackets = 4;
static int nfs_reconnects;
@@ -167,6 +171,7 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq *nrp,
struct socket *so;
int one = 1, retries, error = 0;
struct thread *td = curthread;
+ SVCXPRT *xprt;
struct timeval timo;
/*
@@ -277,6 +282,24 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq *nrp,
retries = nmp->nm_retry;
} else
retries = INT_MAX;
+ if (NFSHASNFSV4N(nmp)) {
+ /*
+ * Make sure the nfscbd_pool doesn't get destroyed
+ * while doing this.
+ */
+ NFSD_LOCK();
+ if (nfs_numnfscbd > 0) {
+ nfs_numnfscbd++;
+ NFSD_UNLOCK();
+ xprt = svc_vc_create_backchannel(nfscbd_pool);
+ CLNT_CONTROL(client, CLSET_BACKCHANNEL, xprt);
+ NFSD_LOCK();
+ nfs_numnfscbd--;
+ if (nfs_numnfscbd == 0)
+ wakeup(&nfs_numnfscbd);
+ }
+ NFSD_UNLOCK();
+ }
} else {
/*
* Three cases:
@@ -468,12 +491,13 @@ int
newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
struct nfsclient *clp, struct nfssockreq *nrp, vnode_t vp,
struct thread *td, struct ucred *cred, u_int32_t prog, u_int32_t vers,
- u_char *retsum, int toplevel, u_int64_t *xidp)
+ u_char *retsum, int toplevel, u_int64_t *xidp, struct nfsclsession *sep)
{
- u_int32_t *tl;
+ u_int32_t retseq, retval, *tl;
time_t waituntil;
- int i, j, set_sigset = 0, timeo;
+ int i = 0, j = 0, opcnt, set_sigset = 0, slot;
int trycnt, error = 0, usegssname = 0, secflavour = AUTH_SYS;
+ int freeslot, timeo;
u_int16_t procnum;
u_int trylater_delay = 1;
struct nfs_feedback_arg nf;
@@ -670,7 +694,9 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
#endif
}
trycnt = 0;
+ freeslot = -1; /* Set to slot that needs to be free'd */
tryagain:
+ slot = -1; /* Slot that needs a sequence# increment. */
/*
* This timeout specifies when a new socket should be created,
* along with new xid values. For UDP, this should be done
@@ -772,11 +798,66 @@ tryagain:
nd->nd_dpos = NFSMTOD(nd->nd_md, caddr_t);
nd->nd_repstat = 0;
if (nd->nd_procnum != NFSPROC_NULL) {
+ /* If sep == NULL, set it to the default in nmp. */
+ if (sep == NULL && nmp != NULL)
+ sep = NFSMNT_MDSSESSION(nmp);
/*
* and now the actual NFS xdr.
*/
NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
nd->nd_repstat = fxdr_unsigned(u_int32_t, *tl);
+ if (nd->nd_repstat >= 10000)
+ NFSCL_DEBUG(1, "proc=%d reps=%d\n", (int)nd->nd_procnum,
+ (int)nd->nd_repstat);
+
+ /*
+ * Get rid of the tag, return count and SEQUENCE result for
+ * NFSv4.
+ */
+ if ((nd->nd_flag & ND_NFSV4) != 0) {
+ NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
+ i = fxdr_unsigned(int, *tl);
+ error = nfsm_advance(nd, NFSM_RNDUP(i), -1);
+ if (error)
+ goto nfsmout;
+ NFSM_DISSECT(tl, u_int32_t *, 3 * NFSX_UNSIGNED);
+ opcnt = fxdr_unsigned(int, *tl++);
+ i = fxdr_unsigned(int, *tl++);
+ j = fxdr_unsigned(int, *tl);
+ if (j >= 10000)
+ NFSCL_DEBUG(1, "fop=%d fst=%d\n", i, j);
+ /*
+ * If the first op is Sequence, free up the slot.
+ */
+ if (nmp != NULL && i == NFSV4OP_SEQUENCE && j != 0)
+ NFSCL_DEBUG(1, "failed seq=%d\n", j);
+ if (nmp != NULL && i == NFSV4OP_SEQUENCE && j == 0) {
+ NFSM_DISSECT(tl, uint32_t *, NFSX_V4SESSIONID +
+ 5 * NFSX_UNSIGNED);
+ mtx_lock(&sep->nfsess_mtx);
+ tl += NFSX_V4SESSIONID / NFSX_UNSIGNED;
+ retseq = fxdr_unsigned(uint32_t, *tl++);
+ slot = fxdr_unsigned(int, *tl++);
+ freeslot = slot;
+ if (retseq != sep->nfsess_slotseq[slot])
+ printf("retseq diff 0x%x\n", retseq);
+ retval = fxdr_unsigned(uint32_t, *++tl);
+ if ((retval + 1) < sep->nfsess_foreslots)
+ sep->nfsess_foreslots = (retval + 1);
+ else if ((retval + 1) > sep->nfsess_foreslots)
+ sep->nfsess_foreslots = (retval < 64) ?
+ (retval + 1) : 64;
+ mtx_unlock(&sep->nfsess_mtx);
+
+ /* Grab the op and status for the next one. */
+ if (opcnt > 1) {
+ NFSM_DISSECT(tl, uint32_t *,
+ 2 * NFSX_UNSIGNED);
+ i = fxdr_unsigned(int, *tl++);
+ j = fxdr_unsigned(int, *tl);
+ }
+ }
+ }
if (nd->nd_repstat != 0) {
if (((nd->nd_repstat == NFSERR_DELAY ||
nd->nd_repstat == NFSERR_GRACE) &&
@@ -784,7 +865,9 @@ tryagain:
nd->nd_procnum != NFSPROC_DELEGRETURN &&
nd->nd_procnum != NFSPROC_SETATTR &&
nd->nd_procnum != NFSPROC_READ &&
+ nd->nd_procnum != NFSPROC_READDS &&
nd->nd_procnum != NFSPROC_WRITE &&
+ nd->nd_procnum != NFSPROC_WRITEDS &&
nd->nd_procnum != NFSPROC_OPEN &&
nd->nd_procnum != NFSPROC_CREATE &&
nd->nd_procnum != NFSPROC_OPENCONFIRM &&
@@ -801,6 +884,13 @@ tryagain:
while (NFSD_MONOSEC < waituntil)
(void) nfs_catnap(PZERO, 0, "nfstry");
trylater_delay *= 2;
+ if (slot != -1) {
+ mtx_lock(&sep->nfsess_mtx);
+ sep->nfsess_slotseq[slot]++;
+ *nd->nd_slotseq = txdr_unsigned(
+ sep->nfsess_slotseq[slot]);
+ mtx_unlock(&sep->nfsess_mtx);
+ }
m_freem(nd->nd_mrep);
nd->nd_mrep = NULL;
goto tryagain;
@@ -817,34 +907,22 @@ tryagain:
(*ncl_call_invalcaches)(vp);
}
}
-
- /*
- * Get rid of the tag, return count, and PUTFH result for V4.
- */
- if (nd->nd_flag & ND_NFSV4) {
- NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
- i = fxdr_unsigned(int, *tl);
- error = nfsm_advance(nd, NFSM_RNDUP(i), -1);
- if (error)
- goto nfsmout;
- NFSM_DISSECT(tl, u_int32_t *, 3 * NFSX_UNSIGNED);
- i = fxdr_unsigned(int, *++tl);
-
+ if ((nd->nd_flag & ND_NFSV4) != 0) {
+ /* Free the slot, as required. */
+ if (freeslot != -1)
+ nfsv4_freeslot(sep, freeslot);
/*
- * If the first op's status is non-zero, mark that
- * there is no more data to process.
+ * If this op is Putfh, throw its results away.
*/
- if (*++tl)
- nd->nd_flag |= ND_NOMOREDATA;
-
- /*
- * If the first op is Putfh, throw its results away
- * and toss the op# and status for the first op.
- */
- if (nmp != NULL && i == NFSV4OP_PUTFH && *tl == 0) {
+ if (j >= 10000)
+ NFSCL_DEBUG(1, "nop=%d nst=%d\n", i, j);
+ if (nmp != NULL && i == NFSV4OP_PUTFH && j == 0) {
NFSM_DISSECT(tl,u_int32_t *,2 * NFSX_UNSIGNED);
i = fxdr_unsigned(int, *tl++);
j = fxdr_unsigned(int, *tl);
+ if (j >= 10000)
+ NFSCL_DEBUG(1, "n2op=%d n2st=%d\n", i,
+ j);
/*
* All Compounds that do an Op that must
* be in sequence consist of NFSV4OP_PUTFH
@@ -867,19 +945,20 @@ tryagain:
j != NFSERR_RESOURCE &&
j != NFSERR_NOFILEHANDLE)))
nd->nd_flag |= ND_INCRSEQID;
- /*
- * If the first op's status is non-zero, mark
- * that there is no more data to process.
- */
- if (j)
- nd->nd_flag |= ND_NOMOREDATA;
}
+ /*
+ * If this op's status is non-zero, mark
+ * that there is no more data to process.
+ */
+ if (j)
+ nd->nd_flag |= ND_NOMOREDATA;
/*
* If R_DONTRECOVER is set, replace the stale error
* reply, so that recovery isn't initiated.
*/
if ((nd->nd_repstat == NFSERR_STALECLIENTID ||
+ nd->nd_repstat == NFSERR_BADSESSION ||
nd->nd_repstat == NFSERR_STALESTATEID) &&
rep != NULL && (rep->r_flags & R_DONTRECOVER))
nd->nd_repstat = NFSERR_STALEDONTRECOVER;
diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c
index fe9b94a..545b995 100644
--- a/sys/fs/nfs/nfs_commonport.c
+++ b/sys/fs/nfs/nfs_commonport.c
@@ -106,6 +106,12 @@ MALLOC_DEFINE(M_NEWNFSDIROFF, "NFSCL diroffdiroff",
"New NFS directory offset data");
MALLOC_DEFINE(M_NEWNFSDROLLBACK, "NFSD rollback",
"New NFS local lock rollback");
+MALLOC_DEFINE(M_NEWNFSLAYOUT, "NFSCL layout", "NFSv4.1 Layout");
+MALLOC_DEFINE(M_NEWNFSFLAYOUT, "NFSCL flayout", "NFSv4.1 File Layout");
+MALLOC_DEFINE(M_NEWNFSDEVINFO, "NFSCL devinfo", "NFSv4.1 Device Info");
+MALLOC_DEFINE(M_NEWNFSSOCKREQ, "NFSCL sockreq", "NFS Sock Req");
+MALLOC_DEFINE(M_NEWNFSCLDS, "NFSCL session", "NFSv4.1 Session");
+MALLOC_DEFINE(M_NEWNFSLAYRECALL, "NFSCL layrecall", "NFSv4.1 Layout Recall");
/*
* Definition of mutex locks.
diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c
index 71cfbab..95aa7bd 100644
--- a/sys/fs/nfs/nfs_commonsubs.c
+++ b/sys/fs/nfs/nfs_commonsubs.c
@@ -85,47 +85,66 @@ NFSSOCKMUTEX;
* non-idempotent Ops.
* Define it here, since it is used by both the client and server.
*/
-struct nfsv4_opflag nfsv4_opflag[NFSV4OP_NOPS] = {
- { 0, 0, 0, 0, LK_EXCLUSIVE }, /* undef */
- { 0, 0, 0, 0, LK_EXCLUSIVE }, /* undef */
- { 0, 0, 0, 0, LK_EXCLUSIVE }, /* undef */
- { 0, 1, 0, 0, LK_SHARED }, /* Access */
- { 0, 1, 0, 0, LK_EXCLUSIVE }, /* Close */
- { 0, 2, 0, 1, LK_EXCLUSIVE }, /* Commit */
- { 1, 2, 1, 1, LK_EXCLUSIVE }, /* Create */
- { 0, 0, 0, 0, LK_EXCLUSIVE }, /* Delegpurge */
- { 0, 1, 0, 0, LK_EXCLUSIVE }, /* Delegreturn */
- { 0, 1, 0, 0, LK_SHARED }, /* Getattr */
- { 0, 1, 0, 0, LK_EXCLUSIVE }, /* GetFH */
- { 2, 1, 1, 1, LK_EXCLUSIVE }, /* Link */
- { 0, 1, 0, 0, LK_EXCLUSIVE }, /* Lock */
- { 0, 1, 0, 0, LK_EXCLUSIVE }, /* LockT */
- { 0, 1, 0, 0, LK_EXCLUSIVE }, /* LockU */
- { 1, 1, 0, 0, LK_EXCLUSIVE }, /* Lookup */
- { 1, 1, 0, 0, LK_EXCLUSIVE }, /* Lookupp */
- { 0, 1, 0, 0, LK_EXCLUSIVE }, /* NVerify */
- { 1, 1, 0, 1, LK_EXCLUSIVE }, /* Open */
- { 1, 1, 0, 0, LK_EXCLUSIVE }, /* OpenAttr */
- { 0, 1, 0, 0, LK_EXCLUSIVE }, /* OpenConfirm */
- { 0, 1, 0, 0, LK_EXCLUSIVE }, /* OpenDowngrade */
- { 1, 0, 0, 0, LK_EXCLUSIVE }, /* PutFH */
- { 1, 0, 0, 0, LK_EXCLUSIVE }, /* PutPubFH */
- { 1, 0, 0, 0, LK_EXCLUSIVE }, /* PutRootFH */
- { 0, 1, 0, 0, LK_SHARED }, /* Read */
- { 0, 1, 0, 0, LK_SHARED }, /* Readdir */
- { 0, 1, 0, 0, LK_SHARED }, /* ReadLink */
- { 0, 2, 1, 1, LK_EXCLUSIVE }, /* Remove */
- { 2, 1, 1, 1, LK_EXCLUSIVE }, /* Rename */
- { 0, 0, 0, 0, LK_EXCLUSIVE }, /* Renew */
- { 0, 0, 0, 0, LK_EXCLUSIVE }, /* RestoreFH */
- { 0, 1, 0, 0, LK_EXCLUSIVE }, /* SaveFH */
- { 0, 1, 0, 0, LK_EXCLUSIVE }, /* SecInfo */
- { 0, 2, 1, 1, LK_EXCLUSIVE }, /* Setattr */
- { 0, 0, 0, 0, LK_EXCLUSIVE }, /* SetClientID */
- { 0, 0, 0, 0, LK_EXCLUSIVE }, /* SetClientIDConfirm */
- { 0, 1, 0, 0, LK_EXCLUSIVE }, /* Verify */
- { 0, 2, 1, 1, LK_EXCLUSIVE }, /* Write */
- { 0, 0, 0, 0, LK_EXCLUSIVE }, /* ReleaseLockOwner */
+struct nfsv4_opflag nfsv4_opflag[NFSV41_NOPS] = {
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* undef */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* undef */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* undef */
+ { 0, 1, 0, 0, LK_SHARED, 1 }, /* Access */
+ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* Close */
+ { 0, 2, 0, 1, LK_EXCLUSIVE, 1 }, /* Commit */
+ { 1, 2, 1, 1, LK_EXCLUSIVE, 1 }, /* Create */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* Delegpurge */
+ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* Delegreturn */
+ { 0, 1, 0, 0, LK_SHARED, 1 }, /* Getattr */
+ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* GetFH */
+ { 2, 1, 1, 1, LK_EXCLUSIVE, 1 }, /* Link */
+ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* Lock */
+ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* LockT */
+ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* LockU */
+ { 1, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* Lookup */
+ { 1, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* Lookupp */
+ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* NVerify */
+ { 1, 1, 0, 1, LK_EXCLUSIVE, 1 }, /* Open */
+ { 1, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* OpenAttr */
+ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* OpenConfirm */
+ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* OpenDowngrade */
+ { 1, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* PutFH */
+ { 1, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* PutPubFH */
+ { 1, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* PutRootFH */
+ { 0, 1, 0, 0, LK_SHARED, 1 }, /* Read */
+ { 0, 1, 0, 0, LK_SHARED, 1 }, /* Readdir */
+ { 0, 1, 0, 0, LK_SHARED, 1 }, /* ReadLink */
+ { 0, 2, 1, 1, LK_EXCLUSIVE, 1 }, /* Remove */
+ { 2, 1, 1, 1, LK_EXCLUSIVE, 1 }, /* Rename */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* Renew */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* RestoreFH */
+ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* SaveFH */
+ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* SecInfo */
+ { 0, 2, 1, 1, LK_EXCLUSIVE, 1 }, /* Setattr */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* SetClientID */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* SetClientIDConfirm */
+ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* Verify */
+ { 0, 2, 1, 1, LK_EXCLUSIVE, 1 }, /* Write */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* ReleaseLockOwner */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* Backchannel Ctrl */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* Bind Conn to Sess */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 0 }, /* Exchange ID */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 0 }, /* Create Session */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 0 }, /* Destroy Session */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* Free StateID */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* Get Dir Deleg */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* Get Device Info */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* Get Device List */
+ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* Layout Commit */
+ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* Layout Get */
+ { 0, 1, 0, 0, LK_EXCLUSIVE, 1 }, /* Layout Return */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* Secinfo No name */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* Sequence */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* Set SSV */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* Test StateID */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* Want Delegation */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 0 }, /* Destroy ClientID */
+ { 0, 0, 0, 0, LK_EXCLUSIVE, 1 }, /* Reclaim Complete */
};
#endif /* !APPLEKEXT */
@@ -147,9 +166,9 @@ static struct nfsuserlruhead nfsuserlruhead;
* marked 0 in this array, the code will still work, just not quite as
* efficiently.)
*/
-static int nfs_bigreply[NFS_NPROCS] = { 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0,
+int nfs_bigreply[NFSV41_NPROCS] = { 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0 };
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 };
/* local functions */
static int nfsrv_skipace(struct nfsrv_descript *nd, int *acesizep);
@@ -382,7 +401,7 @@ nfsm_strtom(struct nfsrv_descript *nd, const char *cp, int siz)
while (siz > 0) {
if (left == 0) {
if (siz > ncl_mbuf_mlen)
- NFSMCLGET(m1, M_WAIT);
+ NFSMCLGET(m1, M_WAITOK);
else
NFSMGET(m1);
mbuf_setlen(m1, 0);
@@ -1857,7 +1876,7 @@ nfsv4_getref(struct nfsv4lock *lp, int *isleptp, void *mutex,
if (isleptp)
*isleptp = 1;
(void) nfsmsleep(&lp->nfslock_lock, mutex,
- PZERO - 1, "nfsv4lck", NULL);
+ PZERO - 1, "nfsv4gr", NULL);
}
if (mp != NULL && (mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0)
return;
@@ -3016,7 +3035,7 @@ nfsrv_getuser(int procnum, uid_t uid, gid_t gid, char *name, NFSPROC_T *p)
(void) nfsm_strtom(nd, name, len);
}
error = newnfs_request(nd, NULL, NULL, &nfsrv_nfsuserdsock, NULL, NULL,
- cred, RPCPROG_NFSUSERD, RPCNFSUSERD_VERS, NULL, 0, NULL);
+ cred, RPCPROG_NFSUSERD, RPCNFSUSERD_VERS, NULL, 0, NULL, NULL);
NFSFREECRED(cred);
if (!error) {
mbuf_freem(nd->nd_mrep);
@@ -3455,7 +3474,7 @@ nfsrvd_rephead(struct nfsrv_descript *nd)
*/
if ((nd->nd_flag & ND_GSSINITREPLY) == 0 &&
nfs_bigreply[nd->nd_procnum]) {
- NFSMCLGET(mreq, M_WAIT);
+ NFSMCLGET(mreq, M_WAITOK);
nd->nd_mreq = mreq;
nd->nd_mb = mreq;
} else {
@@ -3510,3 +3529,240 @@ newnfs_sndunlock(int *flagp)
NFSUNLOCKSOCK();
}
+APPLESTATIC int
+nfsv4_getipaddr(struct nfsrv_descript *nd, struct sockaddr_storage *sa,
+ int *isudp)
+{
+ struct sockaddr_in *sad;
+ struct sockaddr_in6 *sad6;
+ struct in_addr saddr;
+ uint32_t portnum, *tl;
+ int af = 0, i, j, k;
+ char addr[64], protocol[5], *cp;
+ int cantparse = 0, error = 0;
+ uint16_t portv;
+
+ NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
+ i = fxdr_unsigned(int, *tl);
+ if (i >= 3 && i <= 4) {
+ error = nfsrv_mtostr(nd, protocol, i);
+ if (error)
+ goto nfsmout;
+ if (strcmp(protocol, "tcp") == 0) {
+ af = AF_INET;
+ *isudp = 0;
+ } else if (strcmp(protocol, "udp") == 0) {
+ af = AF_INET;
+ *isudp = 1;
+ } else if (strcmp(protocol, "tcp6") == 0) {
+ af = AF_INET6;
+ *isudp = 0;
+ } else if (strcmp(protocol, "udp6") == 0) {
+ af = AF_INET6;
+ *isudp = 1;
+ } else
+ cantparse = 1;
+ } else {
+ cantparse = 1;
+ if (i > 0) {
+ error = nfsm_advance(nd, NFSM_RNDUP(i), -1);
+ if (error)
+ goto nfsmout;
+ }
+ }
+ NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
+ i = fxdr_unsigned(int, *tl);
+ if (i < 0) {
+ error = NFSERR_BADXDR;
+ goto nfsmout;
+ } else if (cantparse == 0 && i >= 11 && i < 64) {
+ /*
+ * The shortest address is 11chars and the longest is < 64.
+ */
+ error = nfsrv_mtostr(nd, addr, i);
+ if (error)
+ goto nfsmout;
+
+ /* Find the port# at the end and extract that. */
+ i = strlen(addr);
+ k = 0;
+ cp = &addr[i - 1];
+ /* Count back two '.'s from end to get port# field. */
+ for (j = 0; j < i; j++) {
+ if (*cp == '.') {
+ k++;
+ if (k == 2)
+ break;
+ }
+ cp--;
+ }
+ if (k == 2) {
+ /*
+ * The NFSv4 port# is appended as .N.N, where N is
+ * a decimal # in the range 0-255, just like an inet4
+ * address. Cheat and use inet_aton(), which will
+ * return a Class A address and then shift the high
+ * order 8bits over to convert it to the port#.
+ */
+ *cp++ = '\0';
+ if (inet_aton(cp, &saddr) == 1) {
+ portnum = ntohl(saddr.s_addr);
+ portv = (uint16_t)((portnum >> 16) |
+ (portnum & 0xff));
+ } else
+ cantparse = 1;
+ } else
+ cantparse = 1;
+ if (cantparse == 0) {
+ if (af == AF_INET) {
+ sad = (struct sockaddr_in *)sa;
+ if (inet_pton(af, addr, &sad->sin_addr) == 1) {
+ sad->sin_len = sizeof(*sad);
+ sad->sin_family = AF_INET;
+ sad->sin_port = htons(portv);
+ return (0);
+ }
+ } else {
+ sad6 = (struct sockaddr_in6 *)sa;
+ if (inet_pton(af, addr, &sad6->sin6_addr)
+ == 1) {
+ sad6->sin6_len = sizeof(*sad6);
+ sad6->sin6_family = AF_INET6;
+ sad6->sin6_port = htons(portv);
+ return (0);
+ }
+ }
+ }
+ } else {
+ if (i > 0) {
+ error = nfsm_advance(nd, NFSM_RNDUP(i), -1);
+ if (error)
+ goto nfsmout;
+ }
+ }
+ error = EPERM;
+nfsmout:
+ return (error);
+}
+
+/*
+ * Handle an NFSv4.1 Sequence request for the session.
+ */
+int
+nfsv4_seqsession(uint32_t seqid, uint32_t slotid, uint32_t highslot,
+ struct nfsslot *slots, struct mbuf **reply, uint16_t maxslot)
+{
+ int error;
+
+ error = 0;
+ *reply = NULL;
+ if (slotid > maxslot)
+ return (NFSERR_BADSLOT);
+ if (seqid == slots[slotid].nfssl_seq) {
+ /* A retry. */
+ if (slots[slotid].nfssl_inprog != 0)
+ error = NFSERR_DELAY;
+ else if (slots[slotid].nfssl_reply != NULL) {
+ *reply = slots[slotid].nfssl_reply;
+ slots[slotid].nfssl_reply = NULL;
+ slots[slotid].nfssl_inprog = 1;
+ } else
+ error = NFSERR_SEQMISORDERED;
+ } else if ((slots[slotid].nfssl_seq + 1) == seqid) {
+ m_freem(slots[slotid].nfssl_reply);
+ slots[slotid].nfssl_reply = NULL;
+ slots[slotid].nfssl_inprog = 1;
+ slots[slotid].nfssl_seq++;
+ } else
+ error = NFSERR_SEQMISORDERED;
+ return (error);
+}
+
+/*
+ * Cache this reply for the slot.
+ */
+void
+nfsv4_seqsess_cacherep(uint32_t slotid, struct nfsslot *slots, struct mbuf *rep)
+{
+
+ slots[slotid].nfssl_reply = rep;
+ slots[slotid].nfssl_inprog = 0;
+}
+
+/*
+ * Generate the xdr for an NFSv4.1 Sequence Operation.
+ */
+APPLESTATIC void
+nfsv4_setsequence(struct nfsrv_descript *nd, struct nfsclsession *sep,
+ int dont_replycache)
+{
+ uint32_t *tl, slotseq = 0;
+ int i, maxslot, slotpos;
+ uint64_t bitval;
+ uint8_t sessionid[NFSX_V4SESSIONID];
+
+ /* Find an unused slot. */
+ slotpos = -1;
+ maxslot = -1;
+ mtx_lock(&sep->nfsess_mtx);
+ do {
+ bitval = 1;
+ for (i = 0; i < sep->nfsess_foreslots; i++) {
+ if ((bitval & sep->nfsess_slots) == 0) {
+ slotpos = i;
+ sep->nfsess_slots |= bitval;
+ sep->nfsess_slotseq[i]++;
+ slotseq = sep->nfsess_slotseq[i];
+ break;
+ }
+ bitval <<= 1;
+ }
+ if (slotpos == -1)
+ (void)mtx_sleep(&sep->nfsess_slots, &sep->nfsess_mtx,
+ PZERO, "nfsclseq", 0);
+ } while (slotpos == -1);
+ /* Now, find the highest slot in use. (nfsc_slots is 64bits) */
+ bitval = 1;
+ for (i = 0; i < 64; i++) {
+ if ((bitval & sep->nfsess_slots) != 0)
+ maxslot = i;
+ bitval <<= 1;
+ }
+ bcopy(sep->nfsess_sessionid, sessionid, NFSX_V4SESSIONID);
+ mtx_unlock(&sep->nfsess_mtx);
+ KASSERT(maxslot >= 0, ("nfscl_setsequence neg maxslot"));
+
+ /* Build the Sequence arguments. */
+ NFSM_BUILD(tl, uint32_t *, NFSX_V4SESSIONID + 4 * NFSX_UNSIGNED);
+ bcopy(sessionid, tl, NFSX_V4SESSIONID);
+ tl += NFSX_V4SESSIONID / NFSX_UNSIGNED;
+ nd->nd_slotseq = tl;
+ *tl++ = txdr_unsigned(slotseq);
+ *tl++ = txdr_unsigned(slotpos);
+ *tl++ = txdr_unsigned(maxslot);
+ if (dont_replycache == 0)
+ *tl = newnfs_true;
+ else
+ *tl = newnfs_false;
+ nd->nd_flag |= ND_HASSEQUENCE;
+}
+
+/*
+ * Free a session slot.
+ */
+APPLESTATIC void
+nfsv4_freeslot(struct nfsclsession *sep, int slot)
+{
+ uint64_t bitval;
+
+ bitval = 1;
+ if (slot > 0)
+ bitval <<= slot;
+ mtx_lock(&sep->nfsess_mtx);
+ if ((bitval & sep->nfsess_slots) == 0)
+ printf("freeing free slot!!\n");
+ sep->nfsess_slots &= ~bitval;
+ wakeup(&sep->nfsess_slots);
+ mtx_unlock(&sep->nfsess_mtx);
+}
+
diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h
index 8e68d42..a13f880 100644
--- a/sys/fs/nfs/nfs_var.h
+++ b/sys/fs/nfs/nfs_var.h
@@ -69,9 +69,12 @@ struct nfsclowner;
struct nfsclopen;
struct nfsclopenhead;
struct nfsclclient;
+struct nfsclsession;
struct nfscllockowner;
struct nfscllock;
struct nfscldeleg;
+struct nfscllayout;
+struct nfscldevinfo;
struct nfsv4lock;
struct nfsvattr;
struct nfs_vattr;
@@ -257,11 +260,18 @@ int nfsrv_mtostr(struct nfsrv_descript *, char *, int);
int nfsrv_checkutf8(u_int8_t *, int);
int newnfs_sndlock(int *);
void newnfs_sndunlock(int *);
+int nfsv4_getipaddr(struct nfsrv_descript *, struct sockaddr_storage *,
+ int *);
+int nfsv4_seqsession(uint32_t, uint32_t, uint32_t, struct nfsslot *,
+ struct mbuf **, uint16_t);
+void nfsv4_seqsess_cacherep(uint32_t, struct nfsslot *, struct mbuf *);
+void nfsv4_setsequence(struct nfsrv_descript *, struct nfsclsession *, int);
+void nfsv4_freeslot(struct nfsclsession *, int);
/* nfs_clcomsubs.c */
void nfsm_uiombuf(struct nfsrv_descript *, struct uio *, int);
void nfscl_reqstart(struct nfsrv_descript *, int, struct nfsmount *,
- u_int8_t *, int, u_int32_t **);
+ u_int8_t *, int, u_int32_t **, struct nfsclsession *);
nfsuint64 *nfscl_getcookie(struct nfsnode *, off_t off, int);
void nfscl_fillsattr(struct nfsrv_descript *, struct vattr *,
vnode_t, int, u_int32_t);
@@ -360,12 +370,12 @@ int nfsrpc_closerpc(struct nfsrv_descript *, struct nfsmount *,
struct nfsclopen *, struct ucred *, NFSPROC_T *, int);
int nfsrpc_openconfirm(vnode_t, u_int8_t *, int, struct nfsclopen *,
struct ucred *, NFSPROC_T *);
-int nfsrpc_setclient(struct nfsmount *, struct nfsclclient *,
+int nfsrpc_setclient(struct nfsmount *, struct nfsclclient *, int,
struct ucred *, NFSPROC_T *);
int nfsrpc_getattr(vnode_t, struct ucred *, NFSPROC_T *,
struct nfsvattr *, void *);
int nfsrpc_getattrnovp(struct nfsmount *, u_int8_t *, int, int,
- struct ucred *, NFSPROC_T *, struct nfsvattr *, u_int64_t *);
+ struct ucred *, NFSPROC_T *, struct nfsvattr *, u_int64_t *, uint32_t *);
int nfsrpc_setattr(vnode_t, struct vattr *, NFSACL_T *, struct ucred *,
NFSPROC_T *, struct nfsvattr *, int *, void *);
int nfsrpc_lookup(vnode_t, char *, int, struct ucred *, NFSPROC_T *,
@@ -404,7 +414,7 @@ int nfsrpc_readdir(vnode_t, struct uio *, nfsuint64 *, struct ucred *,
int nfsrpc_readdirplus(vnode_t, struct uio *, nfsuint64 *,
struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, int *, void *);
int nfsrpc_commit(vnode_t, u_quad_t, int, struct ucred *,
- NFSPROC_T *, u_char *, struct nfsvattr *, int *, void *);
+ NFSPROC_T *, struct nfsvattr *, int *, void *);
int nfsrpc_advlock(vnode_t, off_t, int, struct flock *, int,
struct ucred *, NFSPROC_T *, void *, int);
int nfsrpc_lockt(struct nfsrv_descript *, vnode_t,
@@ -419,7 +429,7 @@ int nfsrpc_fsinfo(vnode_t, struct nfsfsinfo *, struct ucred *,
NFSPROC_T *, struct nfsvattr *, int *, void *);
int nfsrpc_pathconf(vnode_t, struct nfsv3_pathconf *,
struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, void *);
-int nfsrpc_renew(struct nfsclclient *, struct ucred *,
+int nfsrpc_renew(struct nfsclclient *, struct nfsclds *, struct ucred *,
NFSPROC_T *);
int nfsrpc_rellockown(struct nfsmount *, struct nfscllockowner *, uint8_t *,
int, struct ucred *, NFSPROC_T *);
@@ -429,16 +439,42 @@ int nfsrpc_delegreturn(struct nfscldeleg *, struct ucred *,
struct nfsmount *, NFSPROC_T *, int);
int nfsrpc_getacl(vnode_t, struct ucred *, NFSPROC_T *, NFSACL_T *, void *);
int nfsrpc_setacl(vnode_t, struct ucred *, NFSPROC_T *, NFSACL_T *, void *);
+int nfsrpc_exchangeid(struct nfsmount *, struct nfsclclient *,
+ struct nfssockreq *, uint32_t, struct nfsclds **, struct ucred *,
+ NFSPROC_T *);
+int nfsrpc_createsession(struct nfsmount *, struct nfsclsession *,
+ struct nfssockreq *, uint32_t, int, struct ucred *, NFSPROC_T *);
+int nfsrpc_destroysession(struct nfsmount *, struct nfsclclient *,
+ struct ucred *, NFSPROC_T *);
+int nfsrpc_destroyclient(struct nfsmount *, struct nfsclclient *,
+ struct ucred *, NFSPROC_T *);
+int nfsrpc_layoutget(struct nfsmount *, uint8_t *, int, int, uint64_t, uint64_t,
+ uint64_t, int, nfsv4stateid_t *, int *, struct nfsclflayouthead *,
+ struct ucred *, NFSPROC_T *, void *);
+int nfsrpc_getdeviceinfo(struct nfsmount *, uint8_t *, int, uint32_t *,
+ struct nfscldevinfo **, struct ucred *, NFSPROC_T *);
+int nfsrpc_layoutcommit(struct nfsmount *, uint8_t *, int, int,
+ uint64_t, uint64_t, uint64_t, nfsv4stateid_t *, int, int, uint8_t *,
+ struct ucred *, NFSPROC_T *, void *);
+int nfsrpc_layoutreturn(struct nfsmount *, uint8_t *, int, int, int, uint32_t,
+ int, uint64_t, uint64_t, nfsv4stateid_t *, int, uint32_t *, struct ucred *,
+ NFSPROC_T *, void *);
+int nfsrpc_reclaimcomplete(struct nfsmount *, struct ucred *, NFSPROC_T *);
+int nfscl_doiods(vnode_t, struct uio *, int *, int *, uint32_t,
+ struct ucred *, NFSPROC_T *);
+int nfscl_findlayoutforio(struct nfscllayout *, uint64_t, uint32_t,
+ struct nfsclflayout **);
+void nfscl_freenfsclds(struct nfsclds *);
/* nfs_clstate.c */
int nfscl_open(vnode_t, u_int8_t *, int, u_int32_t, int,
struct ucred *, NFSPROC_T *, struct nfsclowner **, struct nfsclopen **,
int *, int *, int);
-int nfscl_getstateid(vnode_t, u_int8_t *, int, u_int32_t, struct ucred *,
+int nfscl_getstateid(vnode_t, u_int8_t *, int, u_int32_t, int, struct ucred *,
NFSPROC_T *, nfsv4stateid_t *, void **);
void nfscl_ownerrelease(struct nfsclowner *, int, int, int);
void nfscl_openrelease(struct nfsclopen *, int, int);
-int nfscl_getcl(vnode_t, struct ucred *, NFSPROC_T *,
+int nfscl_getcl(struct mount *, struct ucred *, NFSPROC_T *, int,
struct nfsclclient **);
struct nfsclclient *nfscl_findcl(struct nfsmount *);
void nfscl_clientrelease(struct nfsclclient *);
@@ -490,6 +526,21 @@ void nfscl_deleggetmodtime(vnode_t, struct timespec *);
int nfscl_tryclose(struct nfsclopen *, struct ucred *,
struct nfsmount *, NFSPROC_T *);
void nfscl_cleanup(NFSPROC_T *);
+int nfscl_layout(struct nfsmount *, vnode_t, u_int8_t *, int, nfsv4stateid_t *,
+ int, struct nfsclflayouthead *, struct nfscllayout **, struct ucred *,
+ NFSPROC_T *);
+struct nfscllayout *nfscl_getlayout(struct nfsclclient *, uint8_t *, int,
+ uint64_t, struct nfsclflayout **, int *);
+void nfscl_rellayout(struct nfscllayout *, int);
+struct nfscldevinfo *nfscl_getdevinfo(struct nfsclclient *, uint8_t *,
+ struct nfscldevinfo *);
+void nfscl_reldevinfo(struct nfscldevinfo *);
+int nfscl_adddevinfo(struct nfsmount *, struct nfscldevinfo *,
+ struct nfsclflayout *);
+void nfscl_freelayout(struct nfscllayout *);
+void nfscl_freeflayout(struct nfsclflayout *);
+void nfscl_freedevinfo(struct nfscldevinfo *);
+int nfscl_layoutcommit(vnode_t, NFSPROC_T *);
/* nfs_clport.c */
int nfscl_nget(mount_t, vnode_t, struct nfsfh *,
@@ -588,7 +639,8 @@ void newnfs_restore_sigmask(struct thread *, sigset_t *);
int newnfs_msleep(struct thread *, void *, struct mtx *, int, char *, int);
int newnfs_request(struct nfsrv_descript *, struct nfsmount *,
struct nfsclient *, struct nfssockreq *, vnode_t, NFSPROC_T *,
- struct ucred *, u_int32_t, u_int32_t, u_char *, int, u_int64_t *);
+ struct ucred *, u_int32_t, u_int32_t, u_char *, int, u_int64_t *,
+ struct nfsclsession *);
int newnfs_connect(struct nfsmount *, struct nfssockreq *,
struct ucred *, NFSPROC_T *, int);
void newnfs_disconnect(struct nfssockreq *);
diff --git a/sys/fs/nfs/nfscl.h b/sys/fs/nfs/nfscl.h
index 1ff4d8b..bda8d48 100644
--- a/sys/fs/nfs/nfscl.h
+++ b/sys/fs/nfs/nfscl.h
@@ -49,7 +49,7 @@ struct nfsv4node {
*/
#define NFSCL_REQSTART(n, p, v) \
nfscl_reqstart((n), (p), VFSTONFS((v)->v_mount), \
- VTONFS(v)->n_fhp->nfh_fh, VTONFS(v)->n_fhp->nfh_len, NULL)
+ VTONFS(v)->n_fhp->nfh_fh, VTONFS(v)->n_fhp->nfh_len, NULL, NULL)
/*
* These two macros convert between a lease duration and renew interval.
diff --git a/sys/fs/nfs/nfsclstate.h b/sys/fs/nfs/nfsclstate.h
index 868e7cf..aa2bfee 100644
--- a/sys/fs/nfs/nfsclstate.h
+++ b/sys/fs/nfs/nfsclstate.h
@@ -40,26 +40,75 @@ LIST_HEAD(nfsclhead, nfsclclient);
LIST_HEAD(nfsclownerhead, nfsclowner);
TAILQ_HEAD(nfscldeleghead, nfscldeleg);
LIST_HEAD(nfscldeleghash, nfscldeleg);
+TAILQ_HEAD(nfscllayouthead, nfscllayout);
+LIST_HEAD(nfscllayouthash, nfscllayout);
+LIST_HEAD(nfsclflayouthead, nfsclflayout);
+LIST_HEAD(nfscldevinfohead, nfscldevinfo);
+LIST_HEAD(nfsclrecalllayouthead, nfsclrecalllayout);
#define NFSCLDELEGHASHSIZE 256
-#define NFSCLDELEGHASH(c, f, l) \
+#define NFSCLDELEGHASH(c, f, l) \
(&((c)->nfsc_deleghash[ncl_hash((f), (l)) % NFSCLDELEGHASHSIZE]))
+#define NFSCLLAYOUTHASHSIZE 256
+#define NFSCLLAYOUTHASH(c, f, l) \
+ (&((c)->nfsc_layouthash[ncl_hash((f), (l)) % NFSCLLAYOUTHASHSIZE]))
+
+/* Structure for NFSv4.1 session stuff. */
+struct nfsclsession {
+ struct mtx nfsess_mtx;
+ struct nfsslot nfsess_cbslots[NFSV4_CBSLOTS];
+ nfsquad_t nfsess_clientid;
+ uint32_t nfsess_slotseq[64]; /* Max for 64bit nm_slots */
+ uint64_t nfsess_slots;
+ uint32_t nfsess_sequenceid;
+ uint32_t nfsess_maxcache; /* Max size for cached reply. */
+ uint16_t nfsess_foreslots;
+ uint16_t nfsess_backslots;
+ uint8_t nfsess_sessionid[NFSX_V4SESSIONID];
+};
+
+/*
+ * This structure holds the session, clientid and related information
+ * needed for an NFSv4.1 Meta Data Server (MDS) or Data Server (DS).
+ * It is malloc'd to the correct length.
+ */
+struct nfsclds {
+ TAILQ_ENTRY(nfsclds) nfsclds_list;
+ struct nfsclsession nfsclds_sess;
+ struct mtx nfsclds_mtx;
+ struct nfssockreq *nfsclds_sockp;
+ time_t nfsclds_expire;
+ uint16_t nfsclds_flags;
+ uint16_t nfsclds_servownlen;
+ uint8_t nfsclds_verf[NFSX_VERF];
+ uint8_t nfsclds_serverown[0];
+};
+
+/*
+ * Flags for nfsclds_flags.
+ */
+#define NFSCLDS_HASWRITEVERF 0x0001
+#define NFSCLDS_MDS 0x0002
+#define NFSCLDS_DS 0x0004
struct nfsclclient {
LIST_ENTRY(nfsclclient) nfsc_list;
struct nfsclownerhead nfsc_owner;
struct nfscldeleghead nfsc_deleg;
struct nfscldeleghash nfsc_deleghash[NFSCLDELEGHASHSIZE];
- struct nfsv4lock nfsc_lock;
- struct proc *nfsc_renewthread;
- struct nfsmount *nfsc_nmp;
- nfsquad_t nfsc_clientid;
- time_t nfsc_expire;
- u_int32_t nfsc_clientidrev;
- u_int32_t nfsc_renew;
- u_int32_t nfsc_cbident;
- u_int16_t nfsc_flags;
- u_int16_t nfsc_idlen;
- u_int8_t nfsc_id[1]; /* Malloc'd to correct length */
+ struct nfscllayouthead nfsc_layout;
+ struct nfscllayouthash nfsc_layouthash[NFSCLLAYOUTHASHSIZE];
+ struct nfscldevinfohead nfsc_devinfo;
+ struct nfsv4lock nfsc_lock;
+ struct proc *nfsc_renewthread;
+ struct nfsmount *nfsc_nmp;
+ time_t nfsc_expire;
+ u_int32_t nfsc_clientidrev;
+ u_int32_t nfsc_rev;
+ u_int32_t nfsc_renew;
+ u_int32_t nfsc_cbident;
+ u_int16_t nfsc_flags;
+ u_int16_t nfsc_idlen;
+ u_int8_t nfsc_id[1]; /* Malloc'd to correct length */
};
/*
@@ -176,6 +225,141 @@ struct nfscllockownerfh {
};
/*
+ * MALLOC'd to the correct length to accommodate the file handle.
+ */
+struct nfscllayout {
+ TAILQ_ENTRY(nfscllayout) nfsly_list;
+ LIST_ENTRY(nfscllayout) nfsly_hash;
+ nfsv4stateid_t nfsly_stateid;
+ struct nfsv4lock nfsly_lock;
+ uint64_t nfsly_filesid[2];
+ uint64_t nfsly_lastbyte;
+ struct nfsclflayouthead nfsly_flayread;
+ struct nfsclflayouthead nfsly_flayrw;
+ struct nfsclrecalllayouthead nfsly_recall;
+ time_t nfsly_timestamp;
+ struct nfsclclient *nfsly_clp;
+ uint16_t nfsly_flags;
+ uint16_t nfsly_fhlen;
+ uint8_t nfsly_fh[1];
+};
+
+/*
+ * Flags for nfsly_flags.
+ */
+#define NFSLY_FILES 0x0001
+#define NFSLY_BLOCK 0x0002
+#define NFSLY_OBJECT 0x0004
+#define NFSLY_RECALL 0x0008
+#define NFSLY_RECALLFILE 0x0010
+#define NFSLY_RECALLFSID 0x0020
+#define NFSLY_RECALLALL 0x0040
+#define NFSLY_RETONCLOSE 0x0080
+#define NFSLY_WRITTEN 0x0100 /* Has been used to write to a DS. */
+
+/*
+ * MALLOC'd to the correct length to accommodate the file handle list.
+ * These hang off of nfsly_flayread and nfsly_flayrw, sorted in increasing
+ * offset order.
+ * The nfsly_flayread list holds the ones with iomode == NFSLAYOUTIOMODE_READ,
+ * whereas the nfsly_flayrw holds the ones with iomode == NFSLAYOUTIOMODE_RW.
+ */
+struct nfsclflayout {
+ LIST_ENTRY(nfsclflayout) nfsfl_list;
+ uint8_t nfsfl_dev[NFSX_V4DEVICEID];
+ uint64_t nfsfl_off;
+ uint64_t nfsfl_end;
+ uint64_t nfsfl_patoff;
+ struct nfscldevinfo *nfsfl_devp;
+ uint32_t nfsfl_iomode;
+ uint32_t nfsfl_util;
+ uint32_t nfsfl_stripe1;
+ uint16_t nfsfl_flags;
+ uint16_t nfsfl_fhcnt;
+ struct nfsfh *nfsfl_fh[1]; /* FH list for DS */
+};
+
+/*
+ * Flags for nfsfl_flags.
+ */
+#define NFSFL_RECALL 0x0001 /* File layout has been recalled */
+
+/*
+ * Structure that is used to store a LAYOUTRECALL.
+ */
+struct nfsclrecalllayout {
+ LIST_ENTRY(nfsclrecalllayout) nfsrecly_list;
+ uint64_t nfsrecly_off;
+ uint64_t nfsrecly_len;
+ int nfsrecly_recalltype;
+ uint32_t nfsrecly_iomode;
+ uint32_t nfsrecly_stateseqid;
+};
+
+/*
+ * Stores the NFSv4.1 Device Info. Malloc'd to the correct length to
+ * store the list of network connections and list of indices.
+ * nfsdi_data[] is allocated the following way:
+ * - nfsdi_addrcnt * struct nfsclds
+ * - stripe indices, each stored as one byte, since there can be many
+ * of them. (This implies a limit of 256 on nfsdi_addrcnt, since the
+ * indices select which address.)
+ */
+struct nfscldevinfo {
+ LIST_ENTRY(nfscldevinfo) nfsdi_list;
+ uint8_t nfsdi_deviceid[NFSX_V4DEVICEID];
+ struct nfsclclient *nfsdi_clp;
+ uint32_t nfsdi_refcnt;
+ uint32_t nfsdi_layoutrefs;
+ uint16_t nfsdi_stripecnt;
+ uint16_t nfsdi_addrcnt;
+ struct nfsclds *nfsdi_data[0];
+};
+
+/* These inline functions return values from nfsdi_data[]. */
+/*
+ * Return a pointer to the address at "pos".
+ */
+static __inline struct nfsclds **
+nfsfldi_addr(struct nfscldevinfo *ndi, int pos)
+{
+
+ if (pos >= ndi->nfsdi_addrcnt)
+ return (NULL);
+ return (&ndi->nfsdi_data[pos]);
+}
+
+/*
+ * Return the Nth ("pos") stripe index.
+ */
+static __inline int
+nfsfldi_stripeindex(struct nfscldevinfo *ndi, int pos)
+{
+ uint8_t *valp;
+
+ if (pos >= ndi->nfsdi_stripecnt)
+ return (-1);
+ valp = (uint8_t *)&ndi->nfsdi_data[ndi->nfsdi_addrcnt];
+ valp += pos;
+ return ((int)*valp);
+}
+
+/*
+ * Set the Nth ("pos") stripe index to "val".
+ */
+static __inline void
+nfsfldi_setstripeindex(struct nfscldevinfo *ndi, int pos, uint8_t val)
+{
+ uint8_t *valp;
+
+ if (pos >= ndi->nfsdi_stripecnt)
+ return;
+ valp = (uint8_t *)&ndi->nfsdi_data[ndi->nfsdi_addrcnt];
+ valp += pos;
+ *valp = val;
+}
+
+/*
* Macro for incrementing the seqid#.
*/
#define NFSCL_INCRSEQID(s, n) do { \
diff --git a/sys/fs/nfs/nfsm_subs.h b/sys/fs/nfs/nfsm_subs.h
index a2777a0..6e91b99 100644
--- a/sys/fs/nfs/nfsm_subs.h
+++ b/sys/fs/nfs/nfsm_subs.h
@@ -73,7 +73,7 @@ nfsm_build(struct nfsrv_descript *nd, int siz)
struct mbuf *mb2;
if (siz > M_TRAILINGSPACE(nd->nd_mb)) {
- NFSMCLGET(mb2, M_DONTWAIT);
+ NFSMCLGET(mb2, M_NOWAIT);
if (siz > MLEN)
panic("build > MLEN");
mbuf_setlen(mb2, 0);
diff --git a/sys/fs/nfs/nfsport.h b/sys/fs/nfs/nfsport.h
index eb026bc..3f22b7a 100644
--- a/sys/fs/nfs/nfsport.h
+++ b/sys/fs/nfs/nfsport.h
@@ -228,6 +228,34 @@
*/
#define NFSV4OP_NOPS 40
+/*
+ * Additional Ops for NFSv4.1.
+ */
+#define NFSV4OP_BACKCHANNELCTL 40
+#define NFSV4OP_BINDCONNTOSESS 41
+#define NFSV4OP_EXCHANGEID 42
+#define NFSV4OP_CREATESESSION 43
+#define NFSV4OP_DESTROYSESSION 44
+#define NFSV4OP_FREESTATEID 45
+#define NFSV4OP_GETDIRDELEG 46
+#define NFSV4OP_GETDEVINFO 47
+#define NFSV4OP_GETDEVLIST 48
+#define NFSV4OP_LAYOUTCOMMIT 49
+#define NFSV4OP_LAYOUTGET 50
+#define NFSV4OP_LAYOUTRETURN 51
+#define NFSV4OP_SECINFONONAME 52
+#define NFSV4OP_SEQUENCE 53
+#define NFSV4OP_SETSSV 54
+#define NFSV4OP_TESTSTATEID 55
+#define NFSV4OP_WANTDELEG 56
+#define NFSV4OP_DESTROYCLIENTID 57
+#define NFSV4OP_RECLAIMCOMPL 58
+
+/*
+ * Must be one more than last op#.
+ */
+#define NFSV41_NOPS 59
+
/* Quirky case if the illegal op code */
#define NFSV4OP_OPILLEGAL 10044
@@ -261,6 +289,20 @@
#define NFSV4OP_CBNOPS 5
/*
+ * Additional Callback Ops for NFSv4.1 only. Not yet in nfsstats.
+ */
+#define NFSV4OP_CBLAYOUTRECALL 5
+#define NFSV4OP_CBNOTIFY 6
+#define NFSV4OP_CBPUSHDELEG 7
+#define NFSV4OP_CBRECALLANY 8
+#define NFSV4OP_CBRECALLOBJAVAIL 9
+#define NFSV4OP_CBRECALLSLOT 10
+#define NFSV4OP_CBSEQUENCE 11
+#define NFSV4OP_CBWANTCANCELLED 12
+#define NFSV4OP_CBNOTIFYLOCK 13
+#define NFSV4OP_CBNOTIFYDEVID 14
+
+/*
* The lower numbers -> 21 are used by NFSv2 and v3. These define higher
* numbers used by NFSv4.
* NFS_V3NPROCS is one greater than the last V3 op and NFS_NPROCS is
@@ -293,6 +335,27 @@
* Must be defined as one higher than the last Proc# above.
*/
#define NFSV4_NPROCS 41
+
+/* Additional procedures for NFSv4.1. */
+#define NFSPROC_EXCHANGEID 41
+#define NFSPROC_CREATESESSION 42
+#define NFSPROC_DESTROYSESSION 43
+#define NFSPROC_DESTROYCLIENT 44
+#define NFSPROC_FREESTATEID 45
+#define NFSPROC_LAYOUTGET 46
+#define NFSPROC_GETDEVICEINFO 47
+#define NFSPROC_LAYOUTCOMMIT 48
+#define NFSPROC_LAYOUTRETURN 49
+#define NFSPROC_RECLAIMCOMPL 50
+#define NFSPROC_WRITEDS 51
+#define NFSPROC_READDS 52
+#define NFSPROC_COMMITDS 53
+
+/*
+ * Must be defined as one higher than the last NFSv4.1 Proc# above.
+ */
+#define NFSV41_NPROCS 54
+
#endif /* NFS_V3NPROCS */
/*
@@ -368,13 +431,13 @@ struct ext_nfsstats {
#include <fs/nfs/rpcv2.h>
#include <fs/nfs/nfsproto.h>
#include <fs/nfs/nfs.h>
+#include <fs/nfs/nfsclstate.h>
#include <fs/nfs/nfs_var.h>
#include <fs/nfs/nfsm_subs.h>
#include <fs/nfs/nfsrvcache.h>
#include <fs/nfs/nfsrvstate.h>
#include <fs/nfs/xdr_subs.h>
#include <fs/nfs/nfscl.h>
-#include <fs/nfs/nfsclstate.h>
#include <nfsclient/nfsargs.h>
#include <fs/nfsclient/nfsmount.h>
@@ -583,6 +646,8 @@ void nfsrvd_rcv(struct socket *, void *, int);
#define NFSPROCLISTUNLOCK() sx_sunlock(&allproc_lock)
#define NFSLOCKSOCKREQ(r) mtx_lock(&((r)->nr_mtx))
#define NFSUNLOCKSOCKREQ(r) mtx_unlock(&((r)->nr_mtx))
+#define NFSLOCKDS(d) mtx_lock(&((d)->nfsclds_mtx))
+#define NFSUNLOCKDS(d) mtx_unlock(&((d)->nfsclds_mtx))
/*
* Use these macros to initialize/free a mutex.
@@ -672,6 +737,12 @@ MALLOC_DECLARE(M_NEWNFSV4NODE);
MALLOC_DECLARE(M_NEWNFSDIRECTIO);
MALLOC_DECLARE(M_NEWNFSMNT);
MALLOC_DECLARE(M_NEWNFSDROLLBACK);
+MALLOC_DECLARE(M_NEWNFSLAYOUT);
+MALLOC_DECLARE(M_NEWNFSFLAYOUT);
+MALLOC_DECLARE(M_NEWNFSDEVINFO);
+MALLOC_DECLARE(M_NEWNFSSOCKREQ);
+MALLOC_DECLARE(M_NEWNFSCLDS);
+MALLOC_DECLARE(M_NEWNFSLAYRECALL);
#define M_NFSRVCACHE M_NEWNFSRVCACHE
#define M_NFSDCLIENT M_NEWNFSDCLIENT
#define M_NFSDSTATE M_NEWNFSDSTATE
@@ -691,6 +762,12 @@ MALLOC_DECLARE(M_NEWNFSDROLLBACK);
#define M_NFSV4NODE M_NEWNFSV4NODE
#define M_NFSDIRECTIO M_NEWNFSDIRECTIO
#define M_NFSDROLLBACK M_NEWNFSDROLLBACK
+#define M_NFSLAYOUT M_NEWNFSLAYOUT
+#define M_NFSFLAYOUT M_NEWNFSFLAYOUT
+#define M_NFSDEVINFO M_NEWNFSDEVINFO
+#define M_NFSSOCKREQ M_NEWNFSSOCKREQ
+#define M_NFSCLDS M_NEWNFSCLDS
+#define M_NFSLAYRECALL M_NEWNFSLAYRECALL
#define NFSINT_SIGMASK(set) \
(SIGISMEMBER(set, SIGINT) || SIGISMEMBER(set, SIGTERM) || \
@@ -759,12 +836,16 @@ void newnfs_realign(struct mbuf **);
*/
#define NFSSTA_HASWRITEVERF 0x00040000 /* Has write verifier */
#define NFSSTA_GOTFSINFO 0x00100000 /* Got the fsinfo */
+#define NFSSTA_NOLAYOUTCOMMIT 0x04000000 /* Don't do LayoutCommit */
+#define NFSSTA_SESSPERSIST 0x08000000 /* Has a persistent session */
#define NFSSTA_TIMEO 0x10000000 /* Experiencing a timeout */
#define NFSSTA_LOCKTIMEO 0x20000000 /* Experiencing a lockd timeout */
#define NFSSTA_HASSETFSID 0x40000000 /* Has set the fsid */
+#define NFSSTA_PNFS 0x80000000 /* pNFS is enabled */
#define NFSHASNFSV3(n) ((n)->nm_flag & NFSMNT_NFSV3)
#define NFSHASNFSV4(n) ((n)->nm_flag & NFSMNT_NFSV4)
+#define NFSHASNFSV4N(n) ((n)->nm_minorvers > 0)
#define NFSHASNFSV3OR4(n) ((n)->nm_flag & (NFSMNT_NFSV3 | NFSMNT_NFSV4))
#define NFSHASGOTFSINFO(n) ((n)->nm_state & NFSSTA_GOTFSINFO)
#define NFSHASHASSETFSID(n) ((n)->nm_state & NFSSTA_HASSETFSID)
@@ -781,6 +862,10 @@ void newnfs_realign(struct mbuf **);
#define NFSHASPRIVACY(n) ((n)->nm_flag & NFSMNT_PRIVACY)
#define NFSSETWRITEVERF(n) ((n)->nm_state |= NFSSTA_HASWRITEVERF)
#define NFSSETHASSETFSID(n) ((n)->nm_state |= NFSSTA_HASSETFSID)
+#define NFSHASPNFSOPT(n) ((n)->nm_flag & NFSMNT_PNFS)
+#define NFSHASNOLAYOUTCOMMIT(n) ((n)->nm_state & NFSSTA_NOLAYOUTCOMMIT)
+#define NFSHASSESSPERSIST(n) ((n)->nm_state & NFSSTA_SESSPERSIST)
+#define NFSHASPNFS(n) ((n)->nm_state & NFSSTA_PNFS)
/*
* Gets the stats field out of the mount structure.
diff --git a/sys/fs/nfs/nfsproto.h b/sys/fs/nfs/nfsproto.h
index 5ae2e3d..6836661 100644
--- a/sys/fs/nfs/nfsproto.h
+++ b/sys/fs/nfs/nfsproto.h
@@ -62,7 +62,9 @@
#define NFS_MINPACKET 20
#define NFS_FABLKSIZE 512 /* Size in bytes of a block wrt fa_blocks */
#define NFSV4_MINORVERSION 0 /* V4 Minor version */
+#define NFSV41_MINORVERSION 1 /* V4 Minor version */
#define NFSV4_CBVERS 1 /* V4 CB Version */
+#define NFSV41_CBVERS 4 /* V4.1 CB Version */
#define NFSV4_SMALLSTR 50 /* Strings small enough for stack */
/* Stat numbers for rpc returns (version 2, 3 and 4) */
@@ -145,6 +147,46 @@
#define NFSERR_ADMINREVOKED 10047
#define NFSERR_CBPATHDOWN 10048
+/* NFSv4.1 specific errors. */
+#define NFSERR_BADIOMODE 10049
+#define NFSERR_BADLAYOUT 10050
+#define NFSERR_BADSESSIONDIGEST 10051
+#define NFSERR_BADSESSION 10052
+#define NFSERR_BADSLOT 10053
+#define NFSERR_COMPLETEALREADY 10054
+#define NFSERR_NOTBNDTOSESS 10055
+#define NFSERR_DELEGALREADYWANT 10056
+#define NFSERR_BACKCHANBUSY 10057
+#define NFSERR_LAYOUTTRYLATER 10058
+#define NFSERR_LAYOUTUNAVAIL 10059
+#define NFSERR_NOMATCHLAYOUT 10060
+#define NFSERR_RECALLCONFLICT 10061
+#define NFSERR_UNKNLAYOUTTYPE 10062
+#define NFSERR_SEQMISORDERED 10063
+#define NFSERR_SEQUENCEPOS 10064
+#define NFSERR_REQTOOBIG 10065
+#define NFSERR_REPTOOBIG 10066
+#define NFSERR_REPTOOBIGTOCACHE 10067
+#define NFSERR_RETRYUNCACHEDREP 10068
+#define NFSERR_UNSAFECOMPOUND 10069
+#define NFSERR_TOOMANYOPS 10070
+#define NFSERR_OPNOTINSESS 10071
+#define NFSERR_HASHALGUNSUPP 10072
+#define NFSERR_CLIENTIDBUSY 10074
+#define NFSERR_PNFSIOHOLE 10075
+#define NFSERR_SEQFALSERETRY 10076
+#define NFSERR_BADHIGHSLOT 10077
+#define NFSERR_DEADSESSION 10078
+#define NFSERR_ENCRALGUNSUPP 10079
+#define NFSERR_PNFSNOLAYOUT 10080
+#define NFSERR_NOTONLYOP 10081
+#define NFSERR_WRONGCRED 10082
+#define NFSERR_WRONGTYPE 10083
+#define NFSERR_DIRDELEGUNAVAIL 10084
+#define NFSERR_REJECTDELEG 10085
+#define NFSERR_RETURNCONFLICT 10086
+#define NFSERR_DELEGREVOKED 10087
+
#define NFSERR_STALEWRITEVERF 30001 /* Fake return for nfs_commit() */
#define NFSERR_DONTREPLY 30003 /* Don't process request */
#define NFSERR_RETVOID 30004 /* Return void, not error */
@@ -189,6 +231,8 @@
#define NFSX_V4SPECDATA (2 * NFSX_UNSIGNED)
#define NFSX_V4TIME (NFSX_HYPER + NFSX_UNSIGNED)
#define NFSX_V4SETTIME (NFSX_UNSIGNED + NFSX_V4TIME)
+#define NFSX_V4SESSIONID 16
+#define NFSX_V4DEVICEID 16
/* sizes common to multiple NFS versions */
#define NFSX_FHMAX (NFSX_V4FHMAX)
@@ -258,6 +302,27 @@
* Must be defined as one higher than the last Proc# above.
*/
#define NFSV4_NPROCS 41
+
+/* Additional procedures for NFSv4.1. */
+#define NFSPROC_EXCHANGEID 41
+#define NFSPROC_CREATESESSION 42
+#define NFSPROC_DESTROYSESSION 43
+#define NFSPROC_DESTROYCLIENT 44
+#define NFSPROC_FREESTATEID 45
+#define NFSPROC_LAYOUTGET 46
+#define NFSPROC_GETDEVICEINFO 47
+#define NFSPROC_LAYOUTCOMMIT 48
+#define NFSPROC_LAYOUTRETURN 49
+#define NFSPROC_RECLAIMCOMPL 50
+#define NFSPROC_WRITEDS 51
+#define NFSPROC_READDS 52
+#define NFSPROC_COMMITDS 53
+
+/*
+ * Must be defined as one higher than the last NFSv4.1 Proc# above.
+ */
+#define NFSV41_NPROCS 54
+
#endif /* NFS_V3NPROCS */
/*
@@ -269,10 +334,10 @@
/*
* NFSPROC_NOOP is a fake op# that can't be the same as any V2/3/4 Procedure
- * or Operation#. Since the NFS V4 Op #s go higher, use NFSV4OP_NOPS, which
+ * or Operation#. Since the NFS V4 Op #s go higher, use NFSV41_NOPS, which
* is one greater than the highest Op#.
*/
-#define NFSPROC_NOOP NFSV4OP_NOPS
+#define NFSPROC_NOOP NFSV41_NOPS
/* Actual Version 2 procedure numbers */
#define NFSV2PROC_NULL 0
@@ -406,6 +471,7 @@
#define NFSSTATEID_PUTALLZERO 0
#define NFSSTATEID_PUTALLONE 1
#define NFSSTATEID_PUTSTATEID 2
+#define NFSSTATEID_PUTSEQIDZERO 3
/*
* Bits for share access and deny.
@@ -462,12 +528,70 @@
#define NFSCREATE_UNCHECKED 0
#define NFSCREATE_GUARDED 1
#define NFSCREATE_EXCLUSIVE 2
+#define NFSCREATE_EXCLUSIVE41 3
#define NFSV3FSINFO_LINK 0x01
#define NFSV3FSINFO_SYMLINK 0x02
#define NFSV3FSINFO_HOMOGENEOUS 0x08
#define NFSV3FSINFO_CANSETTIME 0x10
+/* Flags for Exchange ID */
+#define NFSV4EXCH_SUPPMOVEDREFER 0x00000001
+#define NFSV4EXCH_SUPPMOVEDMIGR 0x00000002
+#define NFSV4EXCH_BINDPRINCSTATEID 0x00000100
+#define NFSV4EXCH_USENONPNFS 0x00010000
+#define NFSV4EXCH_USEPNFSMDS 0x00020000
+#define NFSV4EXCH_USEPNFSDS 0x00040000
+#define NFSV4EXCH_MASKPNFS 0x00070000
+#define NFSV4EXCH_UPDCONFIRMEDRECA 0x40000000
+#define NFSV4EXCH_CONFIRMEDR 0x80000000
+
+/* State Protects */
+#define NFSV4EXCH_SP4NONE 0
+#define NFSV4EXCH_SP4MACHCRED 1
+#define NFSV4EXCH_SP4SSV 2
+
+/* Flags for Create Session */
+#define NFSV4CRSESS_PERSIST 0x00000001
+#define NFSV4CRSESS_CONNBACKCHAN 0x00000002
+#define NFSV4CRSESS_CONNRDMA 0x00000004
+
+/* Flags for Sequence */
+#define NFSV4SEQ_CBPATHDOWN 0x00000001
+#define NFSV4SEQ_CBGSSCONTEXPIRING 0x00000002
+#define NFSV4SEQ_CBGSSCONTEXPIRED 0x00000004
+#define NFSV4SEQ_EXPIREDALLSTATEREVOKED 0x00000008
+#define NFSV4SEQ_EXPIREDSOMESTATEREVOKED 0x00000010
+#define NFSV4SEQ_ADMINSTATEREVOKED 0x00000020
+#define NFSV4SEQ_RECALLABLESTATEREVOKED 0x00000040
+#define NFSV4SEQ_LEASEMOVED 0x00000080
+#define NFSV4SEQ_RESTARTRECLAIMNEEDED 0x00000100
+#define NFSV4SEQ_CBPATHDOWNSESSION 0x00000200
+#define NFSV4SEQ_BACKCHANNELFAULT 0x00000400
+#define NFSV4SEQ_DEVIDCHANGED 0x00000800
+#define NFSV4SEQ_DEVIDDELETED 0x00001000
+
+/* Flags for Layout. */
+#define NFSLAYOUTRETURN_FILE 1
+#define NFSLAYOUTRETURN_FSID 2
+#define NFSLAYOUTRETURN_ALL 3
+
+#define NFSLAYOUT_NFSV4_1_FILES 0x1
+#define NFSLAYOUT_OSD2_OBJECTS 0x2
+#define NFSLAYOUT_BLOCK_VOLUME 0x3
+
+#define NFSLAYOUTIOMODE_READ 1
+#define NFSLAYOUTIOMODE_RW 2
+#define NFSLAYOUTIOMODE_ANY 3
+
+/* Flags for Get Device Info. */
+#define NFSDEVICEIDNOTIFY_CHANGEBIT 0x1
+#define NFSDEVICEIDNOTIFY_DELETEBIT 0x2
+
+/* Flags for File Layout. */
+#define NFSFLAYUTIL_DENSE 0x1
+#define NFSFLAYUTIL_COMMIT_THRU_MDS 0x2
+
/* Conversion macros */
#define vtonfsv2_mode(t,m) \
txdr_unsigned(((t) == VFIFO) ? MAKEIMODE(VCHR, (m)) : \
diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c
index 26286c5..dba3bc9 100644
--- a/sys/fs/nfsclient/nfs_clbio.c
+++ b/sys/fs/nfsclient/nfs_clbio.c
@@ -1371,6 +1371,8 @@ ncl_vinvalbuf(struct vnode *vp, int flags, struct thread *td, int intrflg)
goto out;
error = vinvalbuf(vp, flags, 0, slptimeo);
}
+ if (NFSHASPNFS(nmp))
+ nfscl_layoutcommit(vp, td);
mtx_lock(&np->n_mtx);
if (np->n_directio_asyncwr == 0)
np->n_flag &= ~NMODIFIED;
diff --git a/sys/fs/nfsclient/nfs_clcomsubs.c b/sys/fs/nfsclient/nfs_clcomsubs.c
index 28d8ba1..073c6cc 100644
--- a/sys/fs/nfsclient/nfs_clcomsubs.c
+++ b/sys/fs/nfsclient/nfs_clcomsubs.c
@@ -43,10 +43,11 @@ __FBSDID("$FreeBSD$");
#include <fs/nfs/nfsport.h>
extern struct nfsstats newnfsstats;
-extern struct nfsv4_opflag nfsv4_opflag[NFSV4OP_NOPS];
+extern struct nfsv4_opflag nfsv4_opflag[NFSV41_NOPS];
extern int ncl_mbuf_mlen;
extern enum vtype newnv2tov_type[8];
extern enum vtype nv34tov_type[8];
+extern int nfs_bigreply[NFSV41_NPROCS];
NFSCLSTATEMUTEX;
#endif /* !APPLEKEXT */
@@ -56,7 +57,7 @@ static struct {
int opcnt;
const u_char *tag;
int taglen;
-} nfsv4_opmap[NFS_NPROCS] = {
+} nfsv4_opmap[NFSV41_NPROCS] = {
{ 0, 1, "Null", 4 },
{ NFSV4OP_GETATTR, 1, "Getattr", 7, },
{ NFSV4OP_SETATTR, 2, "Setattr", 7, },
@@ -98,15 +99,28 @@ static struct {
{ NFSV4OP_DELEGRETURN, 9, "DelegRename2", 12, },
{ NFSV4OP_GETATTR, 1, "Getacl", 6, },
{ NFSV4OP_SETATTR, 1, "Setacl", 6, },
+ { NFSV4OP_EXCHANGEID, 1, "ExchangeID", 10, },
+ { NFSV4OP_CREATESESSION, 1, "CreateSession", 13, },
+ { NFSV4OP_DESTROYSESSION, 1, "DestroySession", 14, },
+ { NFSV4OP_DESTROYCLIENTID, 1, "DestroyClient", 13, },
+ { NFSV4OP_FREESTATEID, 1, "FreeStateID", 11, },
+ { NFSV4OP_LAYOUTGET, 1, "LayoutGet", 9, },
+ { NFSV4OP_GETDEVINFO, 1, "GetDeviceInfo", 13, },
+ { NFSV4OP_LAYOUTCOMMIT, 1, "LayoutCommit", 12, },
+ { NFSV4OP_LAYOUTRETURN, 1, "LayoutReturn", 12, },
+ { NFSV4OP_RECLAIMCOMPL, 1, "ReclaimComplete", 15, },
+ { NFSV4OP_WRITE, 1, "WriteDS", 7, },
+ { NFSV4OP_READ, 1, "ReadDS", 6, },
+ { NFSV4OP_COMMIT, 1, "CommitDS", 8, },
};
-
/*
* NFS RPCS that have large request message size.
*/
-static int nfs_bigrequest[NFS_NPROCS] = {
+static int nfs_bigrequest[NFSV41_NPROCS] = {
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1, 0, 0
};
/*
@@ -115,7 +129,7 @@ static int nfs_bigrequest[NFS_NPROCS] = {
*/
APPLESTATIC void
nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp,
- u_int8_t *nfhp, int fhlen, u_int32_t **opcntpp)
+ u_int8_t *nfhp, int fhlen, u_int32_t **opcntpp, struct nfsclsession *sep)
{
struct mbuf *mb;
u_int32_t *tl;
@@ -125,9 +139,12 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp,
/*
* First, fill in some of the fields of nd.
*/
- if (NFSHASNFSV4(nmp))
+ nd->nd_slotseq = NULL;
+ if (NFSHASNFSV4(nmp)) {
nd->nd_flag = ND_NFSV4 | ND_NFSCL;
- else if (NFSHASNFSV3(nmp))
+ if (NFSHASNFSV4N(nmp))
+ nd->nd_flag |= ND_NFSV41;
+ } else if (NFSHASNFSV3(nmp))
nd->nd_flag = ND_NFSV3 | ND_NFSCL;
else
nd->nd_flag = ND_NFSV2 | ND_NFSCL;
@@ -138,7 +155,7 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp,
* Get the first mbuf for the request.
*/
if (nfs_bigrequest[procnum])
- NFSMCLGET(mb, M_WAIT);
+ NFSMCLGET(mb, M_WAITOK);
else
NFSMGET(mb);
mbuf_setlen(mb, 0);
@@ -151,33 +168,71 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp,
if (nd->nd_flag & ND_NFSV4) {
opcnt = nfsv4_opmap[procnum].opcnt +
nfsv4_opflag[nfsv4_opmap[procnum].op].needscfh;
+ if ((nd->nd_flag & ND_NFSV41) != 0) {
+ opcnt += nfsv4_opflag[nfsv4_opmap[procnum].op].needsseq;
+ if (procnum == NFSPROC_RENEW)
+ /*
+ * For the special case of Renew, just do a
+ * Sequence Op.
+ */
+ opcnt = 1;
+ else if (procnum == NFSPROC_WRITEDS ||
+ procnum == NFSPROC_COMMITDS)
+ /*
+ * For the special case of a Writeor Commit to
+ * a DS, the opcnt == 3, for Sequence, PutFH,
+ * Write/Commit.
+ */
+ opcnt = 3;
+ }
/*
* What should the tag really be?
*/
(void) nfsm_strtom(nd, nfsv4_opmap[procnum].tag,
nfsv4_opmap[procnum].taglen);
- NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED);
- *tl++ = txdr_unsigned(NFSV4_MINORVERSION);
+ NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
+ if ((nd->nd_flag & ND_NFSV41) != 0)
+ *tl++ = txdr_unsigned(NFSV41_MINORVERSION);
+ else
+ *tl++ = txdr_unsigned(NFSV4_MINORVERSION);
if (opcntpp != NULL)
*opcntpp = tl;
- *tl++ = txdr_unsigned(opcnt);
+ *tl = txdr_unsigned(opcnt);
+ if ((nd->nd_flag & ND_NFSV41) != 0 &&
+ nfsv4_opflag[nfsv4_opmap[procnum].op].needsseq > 0) {
+ NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
+ *tl = txdr_unsigned(NFSV4OP_SEQUENCE);
+ if (sep == NULL)
+ nfsv4_setsequence(nd, NFSMNT_MDSSESSION(nmp),
+ nfs_bigreply[procnum]);
+ else
+ nfsv4_setsequence(nd, sep,
+ nfs_bigreply[procnum]);
+ }
if (nfsv4_opflag[nfsv4_opmap[procnum].op].needscfh > 0) {
+ NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
*tl = txdr_unsigned(NFSV4OP_PUTFH);
(void) nfsm_fhtom(nd, nfhp, fhlen, 0);
- if (nfsv4_opflag[nfsv4_opmap[procnum].op].needscfh==2){
+ if (nfsv4_opflag[nfsv4_opmap[procnum].op].needscfh
+ == 2 && procnum != NFSPROC_WRITEDS &&
+ procnum != NFSPROC_COMMITDS) {
NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
*tl = txdr_unsigned(NFSV4OP_GETATTR);
NFSWCCATTR_ATTRBIT(&attrbits);
(void) nfsrv_putattrbit(nd, &attrbits);
nd->nd_flag |= ND_V4WCCATTR;
}
+ }
+ if (procnum != NFSPROC_RENEW ||
+ (nd->nd_flag & ND_NFSV41) == 0) {
NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
+ *tl = txdr_unsigned(nfsv4_opmap[procnum].op);
}
- *tl = txdr_unsigned(nfsv4_opmap[procnum].op);
} else {
(void) nfsm_fhtom(nd, nfhp, fhlen, 0);
}
- NFSINCRGLOBAL(newnfsstats.rpccnt[procnum]);
+ if (procnum < NFSV4_NPROCS)
+ NFSINCRGLOBAL(newnfsstats.rpccnt[procnum]);
}
#ifndef APPLE
@@ -212,7 +267,7 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz)
mlen = M_TRAILINGSPACE(mp);
if (mlen == 0) {
if (clflg)
- NFSMCLGET(mp, M_WAIT);
+ NFSMCLGET(mp, M_WAITOK);
else
NFSMGET(mp);
mbuf_setlen(mp, 0);
@@ -453,6 +508,11 @@ nfsm_stateidtom(struct nfsrv_descript *nd, nfsv4stateid_t *stateidp, int flag)
st->other[0] = 0xffffffff;
st->other[1] = 0xffffffff;
st->other[2] = 0xffffffff;
+ } else if (flag == NFSSTATEID_PUTSEQIDZERO) {
+ st->seqid = 0;
+ st->other[0] = stateidp->other[0];
+ st->other[1] = stateidp->other[1];
+ st->other[2] = stateidp->other[2];
} else {
st->seqid = stateidp->seqid;
st->other[0] = stateidp->other[0];
diff --git a/sys/fs/nfsclient/nfs_clkdtrace.c b/sys/fs/nfsclient/nfs_clkdtrace.c
index c7db3a4..cf3d8b0 100644
--- a/sys/fs/nfsclient/nfs_clkdtrace.c
+++ b/sys/fs/nfsclient/nfs_clkdtrace.c
@@ -92,7 +92,7 @@ struct dtnfsclient_rpc {
* This table is indexed by NFSv3 procedure number, but also used for NFSv2
* procedure names and NFSv4 operations.
*/
-static struct dtnfsclient_rpc dtnfsclient_rpcs[NFS_NPROCS + 1] = {
+static struct dtnfsclient_rpc dtnfsclient_rpcs[NFSV41_NPROCS + 1] = {
{ "null", "null", "null" },
{ "getattr", "getattr", "getattr" },
{ "setattr", "setattr", "setattr" },
@@ -196,17 +196,17 @@ extern uint32_t nfscl_attrcache_load_done_id;
* stored in one of these two NFS client-allocated arrays; 0 indicates that
* the event is not being traced so probes should not be called.
*
- * For simplicity, we allocate both v2, v3 and v4 arrays as NFS_NPROCS + 1, and
- * the v2, v3 arrays are simply sparse.
+ * For simplicity, we allocate both v2, v3 and v4 arrays as NFSV41_NPROCS + 1,
+ * and the v2, v3 arrays are simply sparse.
*/
-extern uint32_t nfscl_nfs2_start_probes[NFS_NPROCS + 1];
-extern uint32_t nfscl_nfs2_done_probes[NFS_NPROCS + 1];
+extern uint32_t nfscl_nfs2_start_probes[NFSV41_NPROCS + 1];
+extern uint32_t nfscl_nfs2_done_probes[NFSV41_NPROCS + 1];
-extern uint32_t nfscl_nfs3_start_probes[NFS_NPROCS + 1];
-extern uint32_t nfscl_nfs3_done_probes[NFS_NPROCS + 1];
+extern uint32_t nfscl_nfs3_start_probes[NFSV41_NPROCS + 1];
+extern uint32_t nfscl_nfs3_done_probes[NFSV41_NPROCS + 1];
-extern uint32_t nfscl_nfs4_start_probes[NFS_NPROCS + 1];
-extern uint32_t nfscl_nfs4_done_probes[NFS_NPROCS + 1];
+extern uint32_t nfscl_nfs4_start_probes[NFSV41_NPROCS + 1];
+extern uint32_t nfscl_nfs4_done_probes[NFSV41_NPROCS + 1];
/*
* Look up a DTrace probe ID to see if it's associated with a "done" event --
@@ -217,7 +217,7 @@ dtnfs234_isdoneprobe(dtrace_id_t id)
{
int i;
- for (i = 0; i < NFS_NPROCS + 1; i++) {
+ for (i = 0; i < NFSV41_NPROCS + 1; i++) {
if (dtnfsclient_rpcs[i].nr_v4_id_done == id ||
dtnfsclient_rpcs[i].nr_v3_id_done == id ||
dtnfsclient_rpcs[i].nr_v2_id_done == id)
@@ -401,7 +401,7 @@ dtnfsclient_provide(void *arg, dtrace_probedesc_t *desc)
* Register NFSv2 RPC procedures; note sparseness check for each slot
* in the NFSv3, NFSv4 procnum-indexed array.
*/
- for (i = 0; i < NFS_NPROCS + 1; i++) {
+ for (i = 0; i < NFSV41_NPROCS + 1; i++) {
if (dtnfsclient_rpcs[i].nr_v2_name != NULL &&
dtrace_probe_lookup(dtnfsclient_id, dtnfsclient_nfs2_str,
dtnfsclient_rpcs[i].nr_v2_name, dtnfsclient_start_str) ==
@@ -430,7 +430,7 @@ dtnfsclient_provide(void *arg, dtrace_probedesc_t *desc)
* Register NFSv3 RPC procedures; note sparseness check for each slot
* in the NFSv4 procnum-indexed array.
*/
- for (i = 0; i < NFS_NPROCS + 1; i++) {
+ for (i = 0; i < NFSV41_NPROCS + 1; i++) {
if (dtnfsclient_rpcs[i].nr_v3_name != NULL &&
dtrace_probe_lookup(dtnfsclient_id, dtnfsclient_nfs3_str,
dtnfsclient_rpcs[i].nr_v3_name, dtnfsclient_start_str) ==
@@ -458,7 +458,7 @@ dtnfsclient_provide(void *arg, dtrace_probedesc_t *desc)
/*
* Register NFSv4 RPC procedures.
*/
- for (i = 0; i < NFS_NPROCS + 1; i++) {
+ for (i = 0; i < NFSV41_NPROCS + 1; i++) {
if (dtrace_probe_lookup(dtnfsclient_id, dtnfsclient_nfs4_str,
dtnfsclient_rpcs[i].nr_v4_name, dtnfsclient_start_str) ==
0) {
diff --git a/sys/fs/nfsclient/nfs_clkrpc.c b/sys/fs/nfsclient/nfs_clkrpc.c
index fceb36d..71889fc 100644
--- a/sys/fs/nfsclient/nfs_clkrpc.c
+++ b/sys/fs/nfsclient/nfs_clkrpc.c
@@ -45,12 +45,13 @@ __FBSDID("$FreeBSD$");
NFSDLOCKMUTEX;
-SVCPOOL *nfscbd_pool;
+extern SVCPOOL *nfscbd_pool;
static int nfs_cbproc(struct nfsrv_descript *, u_int32_t);
extern u_long sb_max_adj;
extern int nfs_numnfscbd;
+extern int nfscl_debuglevel;
/*
* NFS client system calls for handling callbacks.
@@ -90,6 +91,7 @@ nfscb_program(struct svc_req *rqst, SVCXPRT *xprt)
nd.nd_mreq = NULL;
nd.nd_cred = NULL;
+ NFSCL_DEBUG(1, "cbproc=%d\n",nd.nd_procnum);
if (nd.nd_procnum != NFSPROC_NULL) {
if (!svc_getcred(rqst, &nd.nd_cred, &credflavor)) {
svcerr_weakauth(rqst);
@@ -133,9 +135,10 @@ nfscb_program(struct svc_req *rqst, SVCXPRT *xprt)
svcerr_auth(rqst, nd.nd_repstat & ~NFSERR_AUTHERR);
if (nd.nd_mreq != NULL)
m_freem(nd.nd_mreq);
- } else if (!svc_sendreply_mbuf(rqst, nd.nd_mreq)) {
+ } else if (!svc_sendreply_mbuf(rqst, nd.nd_mreq))
svcerr_systemerr(rqst);
- }
+ else
+ NFSCL_DEBUG(1, "cbrep sent\n");
svc_freereq(rqst);
}
@@ -271,13 +274,15 @@ nfsrvd_cbinit(int terminating)
NFSD_LOCK_ASSERT();
if (terminating) {
+ /* Wait for any xprt registrations to complete. */
+ while (nfs_numnfscbd > 0)
+ msleep(&nfs_numnfscbd, NFSDLOCKMUTEXPTR, PZERO,
+ "nfscbdt", 0);
NFSD_UNLOCK();
svcpool_destroy(nfscbd_pool);
nfscbd_pool = NULL;
- NFSD_LOCK();
- }
-
- NFSD_UNLOCK();
+ } else
+ NFSD_UNLOCK();
nfscbd_pool = svcpool_create("nfscbd", NULL);
nfscbd_pool->sp_rcache = NULL;
diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c
index fe28975..145ff63 100644
--- a/sys/fs/nfsclient/nfs_clport.c
+++ b/sys/fs/nfsclient/nfs_clport.c
@@ -853,7 +853,7 @@ nfscl_request(struct nfsrv_descript *nd, struct vnode *vp, NFSPROC_T *p,
else
vers = NFS_VER2;
ret = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, vp, p, cred,
- NFS_PROG, vers, NULL, 1, NULL);
+ NFS_PROG, vers, NULL, 1, NULL, NULL);
return (ret);
}
@@ -1112,10 +1112,15 @@ nfscl_maperr(struct thread *td, int error, uid_t uid, gid_t gid)
"No name and/or group mapping for uid,gid:(%d,%d)\n",
uid, gid);
return (EPERM);
+ case NFSERR_BADNAME:
+ case NFSERR_BADCHAR:
+ printf("nfsv4 char/name not handled by server\n");
+ return (ENOENT);
case NFSERR_STALECLIENTID:
case NFSERR_STALESTATEID:
case NFSERR_EXPIRED:
case NFSERR_BADSTATEID:
+ case NFSERR_BADSESSION:
printf("nfsv4 recover err returned %d\n", error);
return (EIO);
case NFSERR_BADHANDLE:
@@ -1131,8 +1136,6 @@ nfscl_maperr(struct thread *td, int error, uid_t uid, gid_t gid)
case NFSERR_LEASEMOVED:
case NFSERR_RECLAIMBAD:
case NFSERR_BADXDR:
- case NFSERR_BADCHAR:
- case NFSERR_BADNAME:
case NFSERR_OPILLEGAL:
printf("nfsv4 client/server protocol prob err=%d\n",
error);
diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c
index 7da93cf..be0476a 100644
--- a/sys/fs/nfsclient/nfs_clrpcops.c
+++ b/sys/fs/nfsclient/nfs_clrpcops.c
@@ -67,6 +67,19 @@ int nfstest_openallsetattr = 0;
#define DIRHDSIZ (sizeof (struct dirent) - (MAXNAMLEN + 1))
+/*
+ * nfscl_getsameserver() can return one of three values:
+ * NFSDSP_USETHISSESSION - Use this session for the DS.
+ * NFSDSP_SEQTHISSESSION - Use the nfsclds_sequence field of this dsp for new
+ * session.
+ * NFSDSP_NOTFOUND - No matching server was found.
+ */
+enum nfsclds_state {
+ NFSDSP_USETHISSESSION = 0,
+ NFSDSP_SEQTHISSESSION = 1,
+ NFSDSP_NOTFOUND = 2,
+};
+
static int nfsrpc_setattrrpc(vnode_t , struct vattr *, nfsv4stateid_t *,
struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, void *);
static int nfsrpc_readrpc(vnode_t , struct uio *, struct ucred *,
@@ -86,6 +99,27 @@ static int nfsrpc_locku(struct nfsrv_descript *, struct nfsmount *,
u_int32_t, struct ucred *, NFSPROC_T *, int);
static int nfsrpc_setaclrpc(vnode_t, struct ucred *, NFSPROC_T *,
struct acl *, nfsv4stateid_t *, void *);
+static int nfsrpc_getlayout(struct nfsmount *, vnode_t, struct nfsfh *, int,
+ uint32_t *, nfsv4stateid_t *, uint64_t, struct nfscllayout **,
+ struct ucred *, NFSPROC_T *);
+static int nfsrpc_fillsa(struct nfsmount *, struct sockaddr_storage *,
+ struct nfsclds **, NFSPROC_T *);
+static void nfscl_initsessionslots(struct nfsclsession *);
+static int nfscl_doflayoutio(vnode_t, struct uio *, int *, int *, int *,
+ nfsv4stateid_t *, int, struct nfscldevinfo *, struct nfscllayout *,
+ struct nfsclflayout *, uint64_t, uint64_t, struct ucred *, NFSPROC_T *);
+static int nfsrpc_readds(vnode_t, struct uio *, nfsv4stateid_t *, int *,
+ struct nfsclds *, uint64_t, int, struct nfsfh *, struct ucred *,
+ NFSPROC_T *);
+static int nfsrpc_writeds(vnode_t, struct uio *, int *, int *,
+ nfsv4stateid_t *, struct nfsclds *, uint64_t, int,
+ struct nfsfh *, int, struct ucred *, NFSPROC_T *);
+static enum nfsclds_state nfscl_getsameserver(struct nfsmount *,
+ struct nfsclds *, struct nfsclds **);
+#ifdef notyet
+static int nfsrpc_commitds(vnode_t, uint64_t, int, struct nfsclds *,
+ struct nfsfh *, struct ucred *, NFSPROC_T *, void *);
+#endif
/*
* nfs null call from vfs.
@@ -308,7 +342,8 @@ else printf(" fhl=0\n");
op->nfso_opencnt++;
nfscl_openrelease(op, error, newone);
if (error == NFSERR_GRACE || error == NFSERR_STALECLIENTID ||
- error == NFSERR_STALEDONTRECOVER || error == NFSERR_DELAY) {
+ error == NFSERR_STALEDONTRECOVER || error == NFSERR_DELAY ||
+ error == NFSERR_BADSESSION) {
(void) nfs_catnap(PZERO, error, "nfs_open");
} else if ((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID)
&& clidrev != 0) {
@@ -317,6 +352,7 @@ else printf(" fhl=0\n");
}
} while (error == NFSERR_GRACE || error == NFSERR_STALECLIENTID ||
error == NFSERR_STALEDONTRECOVER || error == NFSERR_DELAY ||
+ error == NFSERR_BADSESSION ||
((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID) &&
expireret == 0 && clidrev != 0 && retrycnt < 4));
if (error && retrycnt >= 4)
@@ -344,13 +380,13 @@ nfsrpc_openrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, int fhlen,
dp = *dpp;
*dpp = NULL;
- nfscl_reqstart(nd, NFSPROC_OPEN, nmp, nfhp, fhlen, NULL);
+ nfscl_reqstart(nd, NFSPROC_OPEN, nmp, nfhp, fhlen, NULL, NULL);
NFSM_BUILD(tl, u_int32_t *, 5 * NFSX_UNSIGNED);
*tl++ = txdr_unsigned(op->nfso_own->nfsow_seqid);
*tl++ = txdr_unsigned(mode & NFSV4OPEN_ACCESSBOTH);
*tl++ = txdr_unsigned((mode >> NFSLCK_SHIFT) & NFSV4OPEN_DENYBOTH);
- *tl++ = op->nfso_own->nfsow_clp->nfsc_clientid.lval[0];
- *tl = op->nfso_own->nfsow_clp->nfsc_clientid.lval[1];
+ *tl++ = NFSMNT_MDSSESSION(nmp)->nfsess_clientid.lval[0];
+ *tl = NFSMNT_MDSSESSION(nmp)->nfsess_clientid.lval[1];
(void) nfsm_strtom(nd, op->nfso_own->nfsow_owner, NFSV4CL_LOCKNAMELEN);
NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
*tl++ = txdr_unsigned(NFSV4OPEN_NOCREATE);
@@ -362,7 +398,10 @@ nfsrpc_openrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, int fhlen,
if (dp != NULL) {
*tl = txdr_unsigned(NFSV4OPEN_CLAIMDELEGATECUR);
NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID);
- *tl++ = dp->nfsdl_stateid.seqid;
+ if (NFSHASNFSV4N(nmp))
+ *tl++ = 0;
+ else
+ *tl++ = dp->nfsdl_stateid.seqid;
*tl++ = dp->nfsdl_stateid.other[0];
*tl++ = dp->nfsdl_stateid.other[1];
*tl = dp->nfsdl_stateid.other[2];
@@ -380,7 +419,7 @@ nfsrpc_openrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, int fhlen,
if (syscred)
nd->nd_flag |= ND_USEGSSNAME;
error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, vp, p, cred,
- NFS_PROG, NFS_VER4, NULL, 1, NULL);
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);
if (error)
return (error);
NFSCL_INCRSEQID(op->nfso_own->nfsow_seqid, nd);
@@ -501,14 +540,15 @@ nfsrpc_openrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, int fhlen,
if (ndp != NULL)
FREE((caddr_t)ndp, M_NFSCLDELEG);
if (ret == NFSERR_STALECLIENTID ||
- ret == NFSERR_STALEDONTRECOVER)
+ ret == NFSERR_STALEDONTRECOVER ||
+ ret == NFSERR_BADSESSION)
error = ret;
}
}
}
if (nd->nd_repstat != 0 && error == 0)
error = nd->nd_repstat;
- if (error == NFSERR_STALECLIENTID)
+ if (error == NFSERR_STALECLIENTID || error == NFSERR_BADSESSION)
nfscl_initiate_recovery(op->nfso_own->nfsow_clp);
nfsmout:
if (!error)
@@ -532,7 +572,10 @@ nfsrpc_opendowngrade(vnode_t vp, u_int32_t mode, struct nfsclopen *op,
NFSCL_REQSTART(nd, NFSPROC_OPENDOWNGRADE, vp);
NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID + 3 * NFSX_UNSIGNED);
- *tl++ = op->nfso_stateid.seqid;
+ if (NFSHASNFSV4N(VFSTONFS(vnode_mount(vp))))
+ *tl++ = 0;
+ else
+ *tl++ = op->nfso_stateid.seqid;
*tl++ = op->nfso_stateid.other[0];
*tl++ = op->nfso_stateid.other[1];
*tl++ = op->nfso_stateid.other[2];
@@ -552,7 +595,7 @@ nfsrpc_opendowngrade(vnode_t vp, u_int32_t mode, struct nfsclopen *op,
}
if (nd->nd_repstat && error == 0)
error = nd->nd_repstat;
- if (error == NFSERR_STALESTATEID)
+ if (error == NFSERR_STALESTATEID || error == NFSERR_BADSESSION)
nfscl_initiate_recovery(op->nfso_own->nfsow_clp);
nfsmout:
mbuf_freem(nd->nd_mrep);
@@ -690,24 +733,27 @@ nfsrpc_closerpc(struct nfsrv_descript *nd, struct nfsmount *nmp,
int error;
nfscl_reqstart(nd, NFSPROC_CLOSE, nmp, op->nfso_fh,
- op->nfso_fhlen, NULL);
+ op->nfso_fhlen, NULL, NULL);
NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED + NFSX_STATEID);
*tl++ = txdr_unsigned(op->nfso_own->nfsow_seqid);
- *tl++ = op->nfso_stateid.seqid;
+ if (NFSHASNFSV4N(nmp))
+ *tl++ = 0;
+ else
+ *tl++ = op->nfso_stateid.seqid;
*tl++ = op->nfso_stateid.other[0];
*tl++ = op->nfso_stateid.other[1];
*tl = op->nfso_stateid.other[2];
if (syscred)
nd->nd_flag |= ND_USEGSSNAME;
error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred,
- NFS_PROG, NFS_VER4, NULL, 1, NULL);
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);
if (error)
return (error);
NFSCL_INCRSEQID(op->nfso_own->nfsow_seqid, nd);
if (nd->nd_repstat == 0)
NFSM_DISSECT(tl, u_int32_t *, NFSX_STATEID);
error = nd->nd_repstat;
- if (error == NFSERR_STALESTATEID)
+ if (error == NFSERR_STALESTATEID || error == NFSERR_BADSESSION)
nfscl_initiate_recovery(op->nfso_own->nfsow_clp);
nfsmout:
mbuf_freem(nd->nd_mrep);
@@ -723,10 +769,13 @@ nfsrpc_openconfirm(vnode_t vp, u_int8_t *nfhp, int fhlen,
{
u_int32_t *tl;
struct nfsrv_descript nfsd, *nd = &nfsd;
+ struct nfsmount *nmp;
int error;
- nfscl_reqstart(nd, NFSPROC_OPENCONFIRM, VFSTONFS(vnode_mount(vp)),
- nfhp, fhlen, NULL);
+ nmp = VFSTONFS(vnode_mount(vp));
+ if (NFSHASNFSV4N(nmp))
+ return (0); /* No confirmation for NFSv4.1. */
+ nfscl_reqstart(nd, NFSPROC_OPENCONFIRM, nmp, nfhp, fhlen, NULL, NULL);
NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED + NFSX_STATEID);
*tl++ = op->nfso_stateid.seqid;
*tl++ = op->nfso_stateid.other[0];
@@ -745,7 +794,7 @@ nfsrpc_openconfirm(vnode_t vp, u_int8_t *nfhp, int fhlen,
op->nfso_stateid.other[2] = *tl;
}
error = nd->nd_repstat;
- if (error == NFSERR_STALESTATEID)
+ if (error == NFSERR_STALESTATEID || error == NFSERR_BADSESSION)
nfscl_initiate_recovery(op->nfso_own->nfsow_clp);
nfsmout:
mbuf_freem(nd->nd_mrep);
@@ -757,7 +806,7 @@ nfsmout:
* when a mount has just occurred and when the server replies NFSERR_EXPIRED.
*/
APPLESTATIC int
-nfsrpc_setclient(struct nfsmount *nmp, struct nfsclclient *clp,
+nfsrpc_setclient(struct nfsmount *nmp, struct nfsclclient *clp, int reclaim,
struct ucred *cred, NFSPROC_T *p)
{
u_int32_t *tl;
@@ -770,13 +819,58 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclclient *clp,
nfsquad_t confirm;
u_int32_t lease;
static u_int32_t rev = 0;
+ struct nfsclds *dsp, *ndsp, *tdsp;
if (nfsboottime.tv_sec == 0)
NFSSETBOOTTIME(nfsboottime);
- nfscl_reqstart(nd, NFSPROC_SETCLIENTID, nmp, NULL, 0, NULL);
+ clp->nfsc_rev = rev++;
+ if (NFSHASNFSV4N(nmp)) {
+ error = nfsrpc_exchangeid(nmp, clp, &nmp->nm_sockreq,
+ NFSV4EXCH_USEPNFSMDS | NFSV4EXCH_USENONPNFS, &dsp, cred, p);
+ NFSCL_DEBUG(1, "aft exch=%d\n", error);
+ if (error == 0) {
+ error = nfsrpc_createsession(nmp, &dsp->nfsclds_sess,
+ &nmp->nm_sockreq,
+ dsp->nfsclds_sess.nfsess_sequenceid, 1, cred, p);
+ if (error == 0) {
+ NFSLOCKMNT(nmp);
+ TAILQ_FOREACH_SAFE(tdsp, &nmp->nm_sess,
+ nfsclds_list, ndsp)
+ nfscl_freenfsclds(tdsp);
+ TAILQ_INIT(&nmp->nm_sess);
+ TAILQ_INSERT_HEAD(&nmp->nm_sess, dsp,
+ nfsclds_list);
+ NFSUNLOCKMNT(nmp);
+ } else
+ nfscl_freenfsclds(dsp);
+ NFSCL_DEBUG(1, "aft createsess=%d\n", error);
+ }
+ if (error == 0 && reclaim == 0) {
+ error = nfsrpc_reclaimcomplete(nmp, cred, p);
+ NFSCL_DEBUG(1, "aft reclaimcomp=%d\n", error);
+ if (error == NFSERR_COMPLETEALREADY ||
+ error == NFSERR_NOTSUPP)
+ /* Ignore this error. */
+ error = 0;
+ }
+ return (error);
+ }
+
+ /*
+ * Allocate a single session structure for NFSv4.0, because some of
+ * the fields are used by NFSv4.0 although it doesn't do a session.
+ */
+ dsp = malloc(sizeof(struct nfsclds), M_NFSCLDS, M_WAITOK | M_ZERO);
+ mtx_init(&dsp->nfsclds_mtx, "nfsds", NULL, MTX_DEF);
+ mtx_init(&dsp->nfsclds_sess.nfsess_mtx, "nfssession", NULL, MTX_DEF);
+ NFSLOCKMNT(nmp);
+ TAILQ_INSERT_HEAD(&nmp->nm_sess, dsp, nfsclds_list);
+ NFSUNLOCKMNT(nmp);
+
+ nfscl_reqstart(nd, NFSPROC_SETCLIENTID, nmp, NULL, 0, NULL, NULL);
NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
*tl++ = txdr_unsigned(nfsboottime.tv_sec);
- *tl = txdr_unsigned(rev++);
+ *tl = txdr_unsigned(clp->nfsc_rev);
(void) nfsm_strtom(nd, clp->nfsc_id, clp->nfsc_idlen);
/*
@@ -827,13 +921,13 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclclient *clp,
*tl = txdr_unsigned(clp->nfsc_cbident);
nd->nd_flag |= ND_USEGSSNAME;
error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred,
- NFS_PROG, NFS_VER4, NULL, 1, NULL);
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);
if (error)
return (error);
if (nd->nd_repstat == 0) {
NFSM_DISSECT(tl, u_int32_t *, 4 * NFSX_UNSIGNED);
- clp->nfsc_clientid.lval[0] = *tl++;
- clp->nfsc_clientid.lval[1] = *tl++;
+ NFSMNT_MDSSESSION(nmp)->nfsess_clientid.lval[0] = *tl++;
+ NFSMNT_MDSSESSION(nmp)->nfsess_clientid.lval[1] = *tl++;
confirm.lval[0] = *tl++;
confirm.lval[1] = *tl;
mbuf_freem(nd->nd_mrep);
@@ -842,28 +936,29 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclclient *clp,
/*
* and confirm it.
*/
- nfscl_reqstart(nd, NFSPROC_SETCLIENTIDCFRM, nmp, NULL, 0, NULL);
+ nfscl_reqstart(nd, NFSPROC_SETCLIENTIDCFRM, nmp, NULL, 0, NULL,
+ NULL);
NFSM_BUILD(tl, u_int32_t *, 4 * NFSX_UNSIGNED);
- *tl++ = clp->nfsc_clientid.lval[0];
- *tl++ = clp->nfsc_clientid.lval[1];
+ *tl++ = NFSMNT_MDSSESSION(nmp)->nfsess_clientid.lval[0];
+ *tl++ = NFSMNT_MDSSESSION(nmp)->nfsess_clientid.lval[1];
*tl++ = confirm.lval[0];
*tl = confirm.lval[1];
nd->nd_flag |= ND_USEGSSNAME;
error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p,
- cred, NFS_PROG, NFS_VER4, NULL, 1, NULL);
+ cred, NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);
if (error)
return (error);
mbuf_freem(nd->nd_mrep);
nd->nd_mrep = NULL;
if (nd->nd_repstat == 0) {
nfscl_reqstart(nd, NFSPROC_GETATTR, nmp, nmp->nm_fh,
- nmp->nm_fhsize, NULL);
+ nmp->nm_fhsize, NULL, NULL);
NFSZERO_ATTRBIT(&attrbits);
NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_LEASETIME);
(void) nfsrv_putattrbit(nd, &attrbits);
nd->nd_flag |= ND_USEGSSNAME;
error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p,
- cred, NFS_PROG, NFS_VER4, NULL, 1, NULL);
+ cred, NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);
if (error)
return (error);
if (nd->nd_repstat == 0) {
@@ -917,16 +1012,18 @@ nfsrpc_getattr(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
*/
APPLESTATIC int
nfsrpc_getattrnovp(struct nfsmount *nmp, u_int8_t *fhp, int fhlen, int syscred,
- struct ucred *cred, NFSPROC_T *p, struct nfsvattr *nap, u_int64_t *xidp)
+ struct ucred *cred, NFSPROC_T *p, struct nfsvattr *nap, u_int64_t *xidp,
+ uint32_t *leasep)
{
struct nfsrv_descript nfsd, *nd = &nfsd;
int error, vers = NFS_VER2;
nfsattrbit_t attrbits;
- nfscl_reqstart(nd, NFSPROC_GETATTR, nmp, fhp, fhlen, NULL);
+ nfscl_reqstart(nd, NFSPROC_GETATTR, nmp, fhp, fhlen, NULL, NULL);
if (nd->nd_flag & ND_NFSV4) {
vers = NFS_VER4;
NFSGETATTR_ATTRBIT(&attrbits);
+ NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_LEASETIME);
(void) nfsrv_putattrbit(nd, &attrbits);
} else if (nd->nd_flag & ND_NFSV3) {
vers = NFS_VER3;
@@ -934,12 +1031,17 @@ nfsrpc_getattrnovp(struct nfsmount *nmp, u_int8_t *fhp, int fhlen, int syscred,
if (syscred)
nd->nd_flag |= ND_USEGSSNAME;
error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred,
- NFS_PROG, vers, NULL, 1, xidp);
+ NFS_PROG, vers, NULL, 1, xidp, NULL);
if (error)
return (error);
- if (!nd->nd_repstat)
- error = nfsm_loadattr(nd, nap);
- else
+ if (nd->nd_repstat == 0) {
+ if ((nd->nd_flag & ND_NFSV4) != 0)
+ error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, 0, NULL, leasep, NULL,
+ NULL, NULL);
+ else
+ error = nfsm_loadattr(nd, nap);
+ } else
error = nd->nd_repstat;
mbuf_freem(nd->nd_mrep);
return (error);
@@ -973,7 +1075,7 @@ nfsrpc_setattr(vnode_t vp, struct vattr *vap, NFSACL_T *aclp,
if (NFSHASNFSV4(nmp)) {
nfhp = VTONFS(vp)->n_fhp;
error = nfscl_getstateid(vp, nfhp->nfh_fh,
- nfhp->nfh_len, mode, cred, p, &stateid, &lckp);
+ nfhp->nfh_len, mode, 0, cred, p, &stateid, &lckp);
if (error && vnode_vtype(vp) == VREG &&
(mode == NFSV4OPEN_ACCESSWRITE ||
nfstest_openallsetattr)) {
@@ -990,7 +1092,7 @@ nfsrpc_setattr(vnode_t vp, struct vattr *vap, NFSACL_T *aclp,
if (!openerr)
(void) nfscl_getstateid(vp,
nfhp->nfh_fh, nfhp->nfh_len,
- mode, cred, p, &stateid, &lckp);
+ mode, 0, cred, p, &stateid, &lckp);
}
}
if (vap != NULL)
@@ -999,7 +1101,7 @@ nfsrpc_setattr(vnode_t vp, struct vattr *vap, NFSACL_T *aclp,
else
error = nfsrpc_setaclrpc(vp, cred, p, aclp, &stateid,
stuff);
- if (error == NFSERR_STALESTATEID)
+ if (error == NFSERR_STALESTATEID || error == NFSERR_BADSESSION)
nfscl_initiate_recovery(nmp->nm_clp);
if (lckp != NULL)
nfscl_lockderef(lckp);
@@ -1007,7 +1109,7 @@ nfsrpc_setattr(vnode_t vp, struct vattr *vap, NFSACL_T *aclp,
(void) nfsrpc_close(vp, 0, p);
if (error == NFSERR_GRACE || error == NFSERR_STALESTATEID ||
error == NFSERR_STALEDONTRECOVER || error == NFSERR_DELAY ||
- error == NFSERR_OLDSTATEID) {
+ error == NFSERR_OLDSTATEID || error == NFSERR_BADSESSION) {
(void) nfs_catnap(PZERO, error, "nfs_setattr");
} else if ((error == NFSERR_EXPIRED ||
error == NFSERR_BADSTATEID) && clidrev != 0) {
@@ -1016,6 +1118,7 @@ nfsrpc_setattr(vnode_t vp, struct vattr *vap, NFSACL_T *aclp,
retrycnt++;
} while (error == NFSERR_GRACE || error == NFSERR_STALESTATEID ||
error == NFSERR_STALEDONTRECOVER || error == NFSERR_DELAY ||
+ error == NFSERR_BADSESSION ||
(error == NFSERR_OLDSTATEID && retrycnt < 20) ||
((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID) &&
expireret == 0 && clidrev != 0 && retrycnt < 4));
@@ -1242,16 +1345,17 @@ nfsrpc_read(vnode_t vp, struct uio *uiop, struct ucred *cred,
lckp = NULL;
if (NFSHASNFSV4(nmp))
(void)nfscl_getstateid(vp, nfhp->nfh_fh, nfhp->nfh_len,
- NFSV4OPEN_ACCESSREAD, newcred, p, &stateid, &lckp);
+ NFSV4OPEN_ACCESSREAD, 0, newcred, p, &stateid,
+ &lckp);
error = nfsrpc_readrpc(vp, uiop, newcred, &stateid, p, nap,
attrflagp, stuff);
- if (error == NFSERR_STALESTATEID)
+ if (error == NFSERR_STALESTATEID || error == NFSERR_BADSESSION)
nfscl_initiate_recovery(nmp->nm_clp);
if (lckp != NULL)
nfscl_lockderef(lckp);
if (error == NFSERR_GRACE || error == NFSERR_STALESTATEID ||
error == NFSERR_STALEDONTRECOVER || error == NFSERR_DELAY ||
- error == NFSERR_OLDSTATEID) {
+ error == NFSERR_OLDSTATEID || error == NFSERR_BADSESSION) {
(void) nfs_catnap(PZERO, error, "nfs_read");
} else if ((error == NFSERR_EXPIRED ||
error == NFSERR_BADSTATEID) && clidrev != 0) {
@@ -1260,6 +1364,7 @@ nfsrpc_read(vnode_t vp, struct uio *uiop, struct ucred *cred,
retrycnt++;
} while (error == NFSERR_GRACE || error == NFSERR_STALESTATEID ||
error == NFSERR_STALEDONTRECOVER || error == NFSERR_DELAY ||
+ error == NFSERR_BADSESSION ||
(error == NFSERR_OLDSTATEID && retrycnt < 20) ||
((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID) &&
expireret == 0 && clidrev != 0 && retrycnt < 4));
@@ -1395,7 +1500,8 @@ nfsrpc_write(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit,
nostateid = 0;
if (NFSHASNFSV4(nmp)) {
(void)nfscl_getstateid(vp, nfhp->nfh_fh, nfhp->nfh_len,
- NFSV4OPEN_ACCESSWRITE, newcred, p, &stateid, &lckp);
+ NFSV4OPEN_ACCESSWRITE, 0, newcred, p, &stateid,
+ &lckp);
if (stateid.other[0] == 0 && stateid.other[1] == 0 &&
stateid.other[2] == 0) {
nostateid = 1;
@@ -1413,13 +1519,13 @@ nfsrpc_write(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit,
else
error = nfsrpc_writerpc(vp, uiop, iomode, must_commit,
newcred, &stateid, p, nap, attrflagp, stuff);
- if (error == NFSERR_STALESTATEID)
+ if (error == NFSERR_STALESTATEID || error == NFSERR_BADSESSION)
nfscl_initiate_recovery(nmp->nm_clp);
if (lckp != NULL)
nfscl_lockderef(lckp);
if (error == NFSERR_GRACE || error == NFSERR_STALESTATEID ||
error == NFSERR_STALEDONTRECOVER || error == NFSERR_DELAY ||
- error == NFSERR_OLDSTATEID) {
+ error == NFSERR_OLDSTATEID || error == NFSERR_BADSESSION) {
(void) nfs_catnap(PZERO, error, "nfs_write");
} else if ((error == NFSERR_EXPIRED ||
error == NFSERR_BADSTATEID) && clidrev != 0) {
@@ -1427,13 +1533,13 @@ nfsrpc_write(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit,
}
retrycnt++;
} while (error == NFSERR_GRACE || error == NFSERR_DELAY ||
- ((error == NFSERR_STALESTATEID ||
+ ((error == NFSERR_STALESTATEID || error == NFSERR_BADSESSION ||
error == NFSERR_STALEDONTRECOVER) && called_from_strategy == 0) ||
(error == NFSERR_OLDSTATEID && retrycnt < 20) ||
((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID) &&
expireret == 0 && clidrev != 0 && retrycnt < 4));
if (error != 0 && (retrycnt >= 4 ||
- ((error == NFSERR_STALESTATEID ||
+ ((error == NFSERR_STALESTATEID || error == NFSERR_BADSESSION ||
error == NFSERR_STALEDONTRECOVER) && called_from_strategy != 0)))
error = EIO;
if (NFSHASNFSV4(nmp))
@@ -1747,7 +1853,8 @@ nfsrpc_create(vnode_t dvp, char *name, int namelen, struct vattr *vap,
(*nfhpp)->nfh_fh, (*nfhpp)->nfh_len, cred, p, &dp);
nfscl_ownerrelease(owp, error, newone, unlocked);
if (error == NFSERR_GRACE || error == NFSERR_STALECLIENTID ||
- error == NFSERR_STALEDONTRECOVER || error == NFSERR_DELAY) {
+ error == NFSERR_STALEDONTRECOVER || error == NFSERR_DELAY ||
+ error == NFSERR_BADSESSION) {
(void) nfs_catnap(PZERO, error, "nfs_open");
} else if ((error == NFSERR_EXPIRED ||
error == NFSERR_BADSTATEID) && clidrev != 0) {
@@ -1756,6 +1863,7 @@ nfsrpc_create(vnode_t dvp, char *name, int namelen, struct vattr *vap,
}
} while (error == NFSERR_GRACE || error == NFSERR_STALECLIENTID ||
error == NFSERR_STALEDONTRECOVER || error == NFSERR_DELAY ||
+ error == NFSERR_BADSESSION ||
((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID) &&
expireret == 0 && clidrev != 0 && retrycnt < 4));
if (error && retrycnt >= 4)
@@ -1836,7 +1944,9 @@ nfsrpc_createv4(vnode_t dvp, char *name, int namelen, struct vattr *vap,
nfsattrbit_t attrbits;
nfsv4stateid_t stateid;
u_int32_t rflags;
+ struct nfsmount *nmp;
+ nmp = VFSTONFS(dvp->v_mount);
*unlockedp = 0;
*nfhpp = NULL;
*dpp = NULL;
@@ -1853,16 +1963,32 @@ nfsrpc_createv4(vnode_t dvp, char *name, int namelen, struct vattr *vap,
*tl++ = txdr_unsigned(NFSV4OPEN_ACCESSWRITE |
NFSV4OPEN_ACCESSREAD);
*tl++ = txdr_unsigned(NFSV4OPEN_DENYNONE);
- *tl++ = owp->nfsow_clp->nfsc_clientid.lval[0];
- *tl = owp->nfsow_clp->nfsc_clientid.lval[1];
+ *tl++ = NFSMNT_MDSSESSION(nmp)->nfsess_clientid.lval[0];
+ *tl = NFSMNT_MDSSESSION(nmp)->nfsess_clientid.lval[1];
(void) nfsm_strtom(nd, owp->nfsow_owner, NFSV4CL_LOCKNAMELEN);
NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
*tl++ = txdr_unsigned(NFSV4OPEN_CREATE);
if (fmode & O_EXCL) {
- *tl = txdr_unsigned(NFSCREATE_EXCLUSIVE);
- NFSM_BUILD(tl, u_int32_t *, NFSX_VERF);
- *tl++ = cverf.lval[0];
- *tl = cverf.lval[1];
+ if (NFSHASNFSV4N(nmp)) {
+ if (NFSHASSESSPERSIST(nmp)) {
+ /* Use GUARDED for persistent sessions. */
+ *tl = txdr_unsigned(NFSCREATE_GUARDED);
+ nfscl_fillsattr(nd, vap, dvp, 0, 0);
+ } else {
+ /* Otherwise, use EXCLUSIVE4_1. */
+ *tl = txdr_unsigned(NFSCREATE_EXCLUSIVE41);
+ NFSM_BUILD(tl, u_int32_t *, NFSX_VERF);
+ *tl++ = cverf.lval[0];
+ *tl = cverf.lval[1];
+ nfscl_fillsattr(nd, vap, dvp, 0, 0);
+ }
+ } else {
+ /* NFSv4.0 */
+ *tl = txdr_unsigned(NFSCREATE_EXCLUSIVE);
+ NFSM_BUILD(tl, u_int32_t *, NFSX_VERF);
+ *tl++ = cverf.lval[0];
+ *tl = cverf.lval[1];
+ }
} else {
*tl = txdr_unsigned(NFSCREATE_UNCHECKED);
nfscl_fillsattr(nd, vap, dvp, 0, 0);
@@ -2009,7 +2135,8 @@ nfsrpc_createv4(vnode_t dvp, char *name, int namelen, struct vattr *vap,
if (dp != NULL)
FREE((caddr_t)dp, M_NFSCLDELEG);
if (ret == NFSERR_STALECLIENTID ||
- ret == NFSERR_STALEDONTRECOVER)
+ ret == NFSERR_STALEDONTRECOVER ||
+ ret == NFSERR_BADSESSION)
error = ret;
}
}
@@ -2018,7 +2145,7 @@ nfsrpc_createv4(vnode_t dvp, char *name, int namelen, struct vattr *vap,
}
if (nd->nd_repstat != 0 && error == 0)
error = nd->nd_repstat;
- if (error == NFSERR_STALECLIENTID)
+ if (error == NFSERR_STALECLIENTID || error == NFSERR_BADSESSION)
nfscl_initiate_recovery(owp->nfsow_clp);
nfsmout:
if (!error)
@@ -2055,7 +2182,10 @@ tryagain:
NFSCL_REQSTART(nd, NFSPROC_RETDELEGREMOVE, vp);
NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID +
NFSX_UNSIGNED);
- *tl++ = dstateid.seqid;
+ if (NFSHASNFSV4N(nmp))
+ *tl++ = 0;
+ else
+ *tl++ = dstateid.seqid;
*tl++ = dstateid.other[0];
*tl++ = dstateid.other[1];
*tl++ = dstateid.other[2];
@@ -2138,7 +2268,10 @@ tryagain:
}
if (gotfd) {
NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID);
- *tl++ = fdstateid.seqid;
+ if (NFSHASNFSV4N(nmp))
+ *tl++ = 0;
+ else
+ *tl++ = fdstateid.seqid;
*tl++ = fdstateid.other[0];
*tl++ = fdstateid.other[1];
*tl = fdstateid.other[2];
@@ -2154,7 +2287,10 @@ tryagain:
}
if (gottd) {
NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID);
- *tl++ = tdstateid.seqid;
+ if (NFSHASNFSV4N(nmp))
+ *tl++ = 0;
+ else
+ *tl++ = tdstateid.seqid;
*tl++ = tdstateid.other[0];
*tl++ = tdstateid.other[1];
*tl = tdstateid.other[2];
@@ -3421,13 +3557,13 @@ nfsmout:
*/
APPLESTATIC int
nfsrpc_commit(vnode_t vp, u_quad_t offset, int cnt, struct ucred *cred,
- NFSPROC_T *p, u_char *verfp, struct nfsvattr *nap, int *attrflagp,
- void *stuff)
+ NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp, void *stuff)
{
u_int32_t *tl;
struct nfsrv_descript nfsd, *nd = &nfsd;
nfsattrbit_t attrbits;
int error;
+ struct nfsmount *nmp = VFSTONFS(vnode_mount(vp));
*attrflagp = 0;
NFSCL_REQSTART(nd, NFSPROC_COMMIT, vp);
@@ -3450,7 +3586,12 @@ nfsrpc_commit(vnode_t vp, u_quad_t offset, int cnt, struct ucred *cred,
error = nfscl_wcc_data(nd, vp, nap, attrflagp, NULL, stuff);
if (!error && !nd->nd_repstat) {
NFSM_DISSECT(tl, u_int32_t *, NFSX_VERF);
- NFSBCOPY((caddr_t)tl, verfp, NFSX_VERF);
+ NFSLOCKMNT(nmp);
+ if (NFSBCMP(nmp->nm_verf, tl, NFSX_VERF)) {
+ NFSBCOPY(tl, nmp->nm_verf, NFSX_VERF);
+ nd->nd_repstat = NFSERR_STALEWRITEVERF;
+ }
+ NFSUNLOCKMNT(nmp);
if (nd->nd_flag & ND_NFSV4)
error = nfscl_postop_attr(nd, nap, attrflagp, stuff);
}
@@ -3516,7 +3657,7 @@ nfsrpc_advlock(vnode_t vp, off_t size, int op, struct flock *fl,
do {
nd->nd_repstat = 0;
if (op == F_GETLK) {
- error = nfscl_getcl(vp, cred, p, &clp);
+ error = nfscl_getcl(vnode_mount(vp), cred, p, 1, &clp);
if (error)
return (error);
error = nfscl_lockt(vp, clp, off, len, fl, p, id, flags);
@@ -3533,7 +3674,7 @@ nfsrpc_advlock(vnode_t vp, off_t size, int op, struct flock *fl,
* We must loop around for all lockowner cases.
*/
callcnt = 0;
- error = nfscl_getcl(vp, cred, p, &clp);
+ error = nfscl_getcl(vnode_mount(vp), cred, p, 1, &clp);
if (error)
return (error);
do {
@@ -3610,7 +3751,8 @@ nfsrpc_advlock(vnode_t vp, off_t size, int op, struct flock *fl,
error = nd->nd_repstat;
if (error == NFSERR_GRACE || error == NFSERR_STALESTATEID ||
error == NFSERR_STALEDONTRECOVER ||
- error == NFSERR_STALECLIENTID || error == NFSERR_DELAY) {
+ error == NFSERR_STALECLIENTID || error == NFSERR_DELAY ||
+ error == NFSERR_BADSESSION) {
(void) nfs_catnap(PZERO, error, "nfs_advlock");
} else if ((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID)
&& clidrev != 0) {
@@ -3620,6 +3762,7 @@ nfsrpc_advlock(vnode_t vp, off_t size, int op, struct flock *fl,
} while (error == NFSERR_GRACE ||
error == NFSERR_STALECLIENTID || error == NFSERR_DELAY ||
error == NFSERR_STALEDONTRECOVER || error == NFSERR_STALESTATEID ||
+ error == NFSERR_BADSESSION ||
((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID) &&
expireret == 0 && clidrev != 0 && retrycnt < 4));
if (error && retrycnt >= 4)
@@ -3639,7 +3782,9 @@ nfsrpc_lockt(struct nfsrv_descript *nd, vnode_t vp,
int error, type, size;
uint8_t own[NFSV4CL_LOCKNAMELEN + NFSX_V4FHMAX];
struct nfsnode *np;
+ struct nfsmount *nmp;
+ nmp = VFSTONFS(vp->v_mount);
NFSCL_REQSTART(nd, NFSPROC_LOCKT, vp);
NFSM_BUILD(tl, u_int32_t *, 7 * NFSX_UNSIGNED);
if (fl->l_type == F_RDLCK)
@@ -3650,8 +3795,8 @@ nfsrpc_lockt(struct nfsrv_descript *nd, vnode_t vp,
tl += 2;
txdr_hyper(len, tl);
tl += 2;
- *tl++ = clp->nfsc_clientid.lval[0];
- *tl = clp->nfsc_clientid.lval[1];
+ *tl++ = NFSMNT_MDSSESSION(nmp)->nfsess_clientid.lval[0];
+ *tl = NFSMNT_MDSSESSION(nmp)->nfsess_clientid.lval[1];
nfscl_filllockowner(id, own, flags);
np = VTONFS(vp);
NFSBCOPY(np->n_fhp->nfh_fh, &own[NFSV4CL_LOCKNAMELEN],
@@ -3691,7 +3836,8 @@ nfsrpc_lockt(struct nfsrv_descript *nd, vnode_t vp,
error = EBADRPC;
if (!error)
error = nfsm_advance(nd, NFSM_RNDUP(size), -1);
- } else if (nd->nd_repstat == NFSERR_STALECLIENTID)
+ } else if (nd->nd_repstat == NFSERR_STALECLIENTID ||
+ nd->nd_repstat == NFSERR_BADSESSION)
nfscl_initiate_recovery(clp);
nfsmout:
mbuf_freem(nd->nd_mrep);
@@ -3710,7 +3856,7 @@ nfsrpc_locku(struct nfsrv_descript *nd, struct nfsmount *nmp,
int error;
nfscl_reqstart(nd, NFSPROC_LOCKU, nmp, lp->nfsl_open->nfso_fh,
- lp->nfsl_open->nfso_fhlen, NULL);
+ lp->nfsl_open->nfso_fhlen, NULL, NULL);
NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID + 6 * NFSX_UNSIGNED);
*tl++ = txdr_unsigned(type);
*tl = txdr_unsigned(lp->nfsl_seqid);
@@ -3718,7 +3864,10 @@ nfsrpc_locku(struct nfsrv_descript *nd, struct nfsmount *nmp,
(arc4random() % nfstest_outofseq) == 0)
*tl = txdr_unsigned(lp->nfsl_seqid + 1);
tl++;
- *tl++ = lp->nfsl_stateid.seqid;
+ if (NFSHASNFSV4N(nmp))
+ *tl++ = 0;
+ else
+ *tl++ = lp->nfsl_stateid.seqid;
*tl++ = lp->nfsl_stateid.other[0];
*tl++ = lp->nfsl_stateid.other[1];
*tl++ = lp->nfsl_stateid.other[2];
@@ -3728,7 +3877,7 @@ nfsrpc_locku(struct nfsrv_descript *nd, struct nfsmount *nmp,
if (syscred)
nd->nd_flag |= ND_USEGSSNAME;
error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred,
- NFS_PROG, NFS_VER4, NULL, 1, NULL);
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);
NFSCL_INCRSEQID(lp->nfsl_seqid, nd);
if (error)
return (error);
@@ -3738,7 +3887,8 @@ nfsrpc_locku(struct nfsrv_descript *nd, struct nfsmount *nmp,
lp->nfsl_stateid.other[0] = *tl++;
lp->nfsl_stateid.other[1] = *tl++;
lp->nfsl_stateid.other[2] = *tl;
- } else if (nd->nd_repstat == NFSERR_STALESTATEID)
+ } else if (nd->nd_repstat == NFSERR_STALESTATEID ||
+ nd->nd_repstat == NFSERR_BADSESSION)
nfscl_initiate_recovery(lp->nfsl_open->nfso_own->nfsow_clp);
nfsmout:
mbuf_freem(nd->nd_mrep);
@@ -3758,7 +3908,7 @@ nfsrpc_lock(struct nfsrv_descript *nd, struct nfsmount *nmp, vnode_t vp,
int error, size;
uint8_t own[NFSV4CL_LOCKNAMELEN + NFSX_V4FHMAX];
- nfscl_reqstart(nd, NFSPROC_LOCK, nmp, nfhp, fhlen, NULL);
+ nfscl_reqstart(nd, NFSPROC_LOCK, nmp, nfhp, fhlen, NULL, NULL);
NFSM_BUILD(tl, u_int32_t *, 7 * NFSX_UNSIGNED);
if (type == F_RDLCK)
*tl++ = txdr_unsigned(NFSV4LOCKT_READ);
@@ -3774,20 +3924,26 @@ nfsrpc_lock(struct nfsrv_descript *nd, struct nfsmount *nmp, vnode_t vp,
NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID +
2 * NFSX_UNSIGNED + NFSX_HYPER);
*tl++ = txdr_unsigned(lp->nfsl_open->nfso_own->nfsow_seqid);
- *tl++ = lp->nfsl_open->nfso_stateid.seqid;
+ if (NFSHASNFSV4N(nmp))
+ *tl++ = 0;
+ else
+ *tl++ = lp->nfsl_open->nfso_stateid.seqid;
*tl++ = lp->nfsl_open->nfso_stateid.other[0];
*tl++ = lp->nfsl_open->nfso_stateid.other[1];
*tl++ = lp->nfsl_open->nfso_stateid.other[2];
*tl++ = txdr_unsigned(lp->nfsl_seqid);
- *tl++ = lp->nfsl_open->nfso_own->nfsow_clp->nfsc_clientid.lval[0];
- *tl = lp->nfsl_open->nfso_own->nfsow_clp->nfsc_clientid.lval[1];
+ *tl++ = NFSMNT_MDSSESSION(nmp)->nfsess_clientid.lval[0];
+ *tl = NFSMNT_MDSSESSION(nmp)->nfsess_clientid.lval[1];
NFSBCOPY(lp->nfsl_owner, own, NFSV4CL_LOCKNAMELEN);
NFSBCOPY(nfhp, &own[NFSV4CL_LOCKNAMELEN], fhlen);
(void)nfsm_strtom(nd, own, NFSV4CL_LOCKNAMELEN + fhlen);
} else {
*tl = newnfs_false;
NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID + NFSX_UNSIGNED);
- *tl++ = lp->nfsl_stateid.seqid;
+ if (NFSHASNFSV4N(nmp))
+ *tl++ = 0;
+ else
+ *tl++ = lp->nfsl_stateid.seqid;
*tl++ = lp->nfsl_stateid.other[0];
*tl++ = lp->nfsl_stateid.other[1];
*tl++ = lp->nfsl_stateid.other[2];
@@ -3799,7 +3955,7 @@ nfsrpc_lock(struct nfsrv_descript *nd, struct nfsmount *nmp, vnode_t vp,
if (syscred)
nd->nd_flag |= ND_USEGSSNAME;
error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, vp, p, cred,
- NFS_PROG, NFS_VER4, NULL, 1, NULL);
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);
if (error)
return (error);
if (newone)
@@ -3818,7 +3974,8 @@ nfsrpc_lock(struct nfsrv_descript *nd, struct nfsmount *nmp, vnode_t vp,
error = EBADRPC;
if (!error)
error = nfsm_advance(nd, NFSM_RNDUP(size), -1);
- } else if (nd->nd_repstat == NFSERR_STALESTATEID)
+ } else if (nd->nd_repstat == NFSERR_STALESTATEID ||
+ nd->nd_repstat == NFSERR_BADSESSION)
nfscl_initiate_recovery(lp->nfsl_open->nfso_own->nfsow_clp);
nfsmout:
mbuf_freem(nd->nd_mrep);
@@ -4009,24 +4166,34 @@ nfsmout:
* This function performs the Renew RPC.
*/
APPLESTATIC int
-nfsrpc_renew(struct nfsclclient *clp, struct ucred *cred, NFSPROC_T *p)
+nfsrpc_renew(struct nfsclclient *clp, struct nfsclds *dsp, struct ucred *cred,
+ NFSPROC_T *p)
{
u_int32_t *tl;
struct nfsrv_descript nfsd;
struct nfsrv_descript *nd = &nfsd;
struct nfsmount *nmp;
int error;
+ struct nfssockreq *nrp;
nmp = clp->nfsc_nmp;
if (nmp == NULL)
return (0);
- nfscl_reqstart(nd, NFSPROC_RENEW, nmp, NULL, 0, NULL);
- NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
- *tl++ = clp->nfsc_clientid.lval[0];
- *tl = clp->nfsc_clientid.lval[1];
+ nfscl_reqstart(nd, NFSPROC_RENEW, nmp, NULL, 0, NULL,
+ &dsp->nfsclds_sess);
+ if (!NFSHASNFSV4N(nmp)) {
+ /* NFSv4.1 just uses a Sequence Op and not a Renew. */
+ NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
+ *tl++ = NFSMNT_MDSSESSION(nmp)->nfsess_clientid.lval[0];
+ *tl = NFSMNT_MDSSESSION(nmp)->nfsess_clientid.lval[1];
+ }
+ nrp = dsp->nfsclds_sockp;
+ if (nrp == NULL)
+ /* If NULL, use the MDS socket. */
+ nrp = &nmp->nm_sockreq;
nd->nd_flag |= ND_USEGSSNAME;
- error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred,
- NFS_PROG, NFS_VER4, NULL, 1, NULL);
+ error = newnfs_request(nd, nmp, NULL, nrp, NULL, p, cred,
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, &dsp->nfsclds_sess);
if (error)
return (error);
error = nd->nd_repstat;
@@ -4046,16 +4213,24 @@ nfsrpc_rellockown(struct nfsmount *nmp, struct nfscllockowner *lp,
int error;
uint8_t own[NFSV4CL_LOCKNAMELEN + NFSX_V4FHMAX];
- nfscl_reqstart(nd, NFSPROC_RELEASELCKOWN, nmp, NULL, 0, NULL);
- NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
- *tl++ = nmp->nm_clp->nfsc_clientid.lval[0];
- *tl = nmp->nm_clp->nfsc_clientid.lval[1];
- NFSBCOPY(lp->nfsl_owner, own, NFSV4CL_LOCKNAMELEN);
- NFSBCOPY(fh, &own[NFSV4CL_LOCKNAMELEN], fhlen);
- (void)nfsm_strtom(nd, own, NFSV4CL_LOCKNAMELEN + fhlen);
+ if (NFSHASNFSV4N(nmp)) {
+ /* For NFSv4.1, do a FreeStateID. */
+ nfscl_reqstart(nd, NFSPROC_FREESTATEID, nmp, NULL, 0, NULL,
+ NULL);
+ nfsm_stateidtom(nd, &lp->nfsl_stateid, NFSSTATEID_PUTSTATEID);
+ } else {
+ nfscl_reqstart(nd, NFSPROC_RELEASELCKOWN, nmp, NULL, 0, NULL,
+ NULL);
+ NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
+ *tl++ = NFSMNT_MDSSESSION(nmp)->nfsess_clientid.lval[0];
+ *tl = NFSMNT_MDSSESSION(nmp)->nfsess_clientid.lval[1];
+ NFSBCOPY(lp->nfsl_owner, own, NFSV4CL_LOCKNAMELEN);
+ NFSBCOPY(fh, &own[NFSV4CL_LOCKNAMELEN], fhlen);
+ (void)nfsm_strtom(nd, own, NFSV4CL_LOCKNAMELEN + fhlen);
+ }
nd->nd_flag |= ND_USEGSSNAME;
error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred,
- NFS_PROG, NFS_VER4, NULL, 1, NULL);
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);
if (error)
return (error);
error = nd->nd_repstat;
@@ -4077,7 +4252,7 @@ nfsrpc_getdirpath(struct nfsmount *nmp, u_char *dirpath, struct ucred *cred,
int error, cnt, len, setnil;
u_int32_t *opcntp;
- nfscl_reqstart(nd, NFSPROC_PUTROOTFH, nmp, NULL, 0, &opcntp);
+ nfscl_reqstart(nd, NFSPROC_PUTROOTFH, nmp, NULL, 0, &opcntp, NULL);
cp = dirpath;
cnt = 0;
do {
@@ -4101,12 +4276,16 @@ nfsrpc_getdirpath(struct nfsmount *nmp, u_char *dirpath, struct ucred *cred,
*cp2++ = '/';
cp = cp2;
} while (*cp != '\0');
- *opcntp = txdr_unsigned(2 + cnt);
+ if (NFSHASNFSV4N(nmp))
+ /* Has a Sequence Op done by nfscl_reqstart(). */
+ *opcntp = txdr_unsigned(3 + cnt);
+ else
+ *opcntp = txdr_unsigned(2 + cnt);
NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
*tl = txdr_unsigned(NFSV4OP_GETFH);
nd->nd_flag |= ND_USEGSSNAME;
error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred,
- NFS_PROG, NFS_VER4, NULL, 1, NULL);
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);
if (error)
return (error);
if (nd->nd_repstat == 0) {
@@ -4140,16 +4319,19 @@ nfsrpc_delegreturn(struct nfscldeleg *dp, struct ucred *cred,
int error;
nfscl_reqstart(nd, NFSPROC_DELEGRETURN, nmp, dp->nfsdl_fh,
- dp->nfsdl_fhlen, NULL);
+ dp->nfsdl_fhlen, NULL, NULL);
NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID);
- *tl++ = dp->nfsdl_stateid.seqid;
+ if (NFSHASNFSV4N(nmp))
+ *tl++ = 0;
+ else
+ *tl++ = dp->nfsdl_stateid.seqid;
*tl++ = dp->nfsdl_stateid.other[0];
*tl++ = dp->nfsdl_stateid.other[1];
*tl = dp->nfsdl_stateid.other[2];
if (syscred)
nd->nd_flag |= ND_USEGSSNAME;
error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred,
- NFS_PROG, NFS_VER4, NULL, 1, NULL);
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);
if (error)
return (error);
error = nd->nd_repstat;
@@ -4230,3 +4412,1466 @@ nfsrpc_setaclrpc(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
mbuf_freem(nd->nd_mrep);
return (nd->nd_repstat);
}
+
+/*
+ * Do the NFSv4.1 Exchange ID.
+ */
+int
+nfsrpc_exchangeid(struct nfsmount *nmp, struct nfsclclient *clp,
+ struct nfssockreq *nrp, uint32_t exchflags, struct nfsclds **dspp,
+ struct ucred *cred, NFSPROC_T *p)
+{
+ uint32_t *tl, v41flags;
+ struct nfsrv_descript nfsd;
+ struct nfsrv_descript *nd = &nfsd;
+ struct nfsclds *dsp;
+ struct timespec verstime;
+ int error, len;
+
+ *dspp = NULL;
+ nfscl_reqstart(nd, NFSPROC_EXCHANGEID, nmp, NULL, 0, NULL, NULL);
+ NFSM_BUILD(tl, uint32_t *, 2 * NFSX_UNSIGNED);
+ *tl++ = txdr_unsigned(nfsboottime.tv_sec); /* Client owner */
+ *tl = txdr_unsigned(clp->nfsc_rev);
+ (void) nfsm_strtom(nd, clp->nfsc_id, clp->nfsc_idlen);
+
+ NFSM_BUILD(tl, uint32_t *, 3 * NFSX_UNSIGNED);
+ *tl++ = txdr_unsigned(exchflags);
+ *tl++ = txdr_unsigned(NFSV4EXCH_SP4NONE);
+
+ /* Set the implementation id4 */
+ *tl = txdr_unsigned(1);
+ (void) nfsm_strtom(nd, "freebsd.org", strlen("freebsd.org"));
+ (void) nfsm_strtom(nd, version, strlen(version));
+ NFSM_BUILD(tl, uint32_t *, NFSX_V4TIME);
+ verstime.tv_sec = 1293840000; /* Jan 1, 2011 */
+ verstime.tv_nsec = 0;
+ txdr_nfsv4time(&verstime, tl);
+ nd->nd_flag |= ND_USEGSSNAME;
+ error = newnfs_request(nd, nmp, NULL, nrp, NULL, p, cred,
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);
+ NFSCL_DEBUG(1, "exchangeid err=%d reps=%d\n", error,
+ (int)nd->nd_repstat);
+ if (error != 0)
+ return (error);
+ if (nd->nd_repstat == 0) {
+ NFSM_DISSECT(tl, uint32_t *, 6 * NFSX_UNSIGNED + NFSX_HYPER);
+ len = fxdr_unsigned(int, *(tl + 7));
+ if (len < 0 || len > NFSV4_OPAQUELIMIT) {
+ error = NFSERR_BADXDR;
+ goto nfsmout;
+ }
+ dsp = malloc(sizeof(struct nfsclds) + len, M_NFSCLDS,
+ M_WAITOK | M_ZERO);
+ dsp->nfsclds_expire = NFSD_MONOSEC + clp->nfsc_renew;
+ dsp->nfsclds_servownlen = len;
+ dsp->nfsclds_sess.nfsess_clientid.lval[0] = *tl++;
+ dsp->nfsclds_sess.nfsess_clientid.lval[1] = *tl++;
+ dsp->nfsclds_sess.nfsess_sequenceid =
+ fxdr_unsigned(uint32_t, *tl++);
+ v41flags = fxdr_unsigned(uint32_t, *tl);
+ if ((v41flags & NFSV4EXCH_USEPNFSMDS) != 0 &&
+ NFSHASPNFSOPT(nmp)) {
+ NFSCL_DEBUG(1, "set PNFS\n");
+ NFSLOCKMNT(nmp);
+ nmp->nm_state |= NFSSTA_PNFS;
+ NFSUNLOCKMNT(nmp);
+ dsp->nfsclds_flags |= NFSCLDS_MDS;
+ }
+ if ((v41flags & NFSV4EXCH_USEPNFSDS) != 0)
+ dsp->nfsclds_flags |= NFSCLDS_DS;
+ if (len > 0)
+ nd->nd_repstat = nfsrv_mtostr(nd,
+ dsp->nfsclds_serverown, len);
+ if (nd->nd_repstat == 0) {
+ mtx_init(&dsp->nfsclds_mtx, "nfsds", NULL, MTX_DEF);
+ mtx_init(&dsp->nfsclds_sess.nfsess_mtx, "nfssession",
+ NULL, MTX_DEF);
+ nfscl_initsessionslots(&dsp->nfsclds_sess);
+ *dspp = dsp;
+ } else
+ free(dsp, M_NFSCLDS);
+ }
+ error = nd->nd_repstat;
+nfsmout:
+ mbuf_freem(nd->nd_mrep);
+ return (error);
+}
+
+/*
+ * Do the NFSv4.1 Create Session.
+ */
+int
+nfsrpc_createsession(struct nfsmount *nmp, struct nfsclsession *sep,
+ struct nfssockreq *nrp, uint32_t sequenceid, int mds, struct ucred *cred,
+ NFSPROC_T *p)
+{
+ uint32_t crflags, *tl;
+ struct nfsrv_descript nfsd;
+ struct nfsrv_descript *nd = &nfsd;
+ int error, irdcnt;
+
+ nfscl_reqstart(nd, NFSPROC_CREATESESSION, nmp, NULL, 0, NULL, NULL);
+ NFSM_BUILD(tl, uint32_t *, 4 * NFSX_UNSIGNED);
+ *tl++ = sep->nfsess_clientid.lval[0];
+ *tl++ = sep->nfsess_clientid.lval[1];
+ *tl++ = txdr_unsigned(sequenceid);
+ crflags = (NFSMNT_RDONLY(nmp->nm_mountp) ? 0 : NFSV4CRSESS_PERSIST);
+ if (nfscl_enablecallb != 0 && nfs_numnfscbd > 0)
+ crflags |= NFSV4CRSESS_CONNBACKCHAN;
+ *tl = txdr_unsigned(crflags);
+
+ /* Fill in fore channel attributes. */
+ NFSM_BUILD(tl, uint32_t *, 7 * NFSX_UNSIGNED);
+ *tl++ = 0; /* Header pad size */
+ *tl++ = txdr_unsigned(100000); /* Max request size */
+ *tl++ = txdr_unsigned(100000); /* Max response size */
+ *tl++ = txdr_unsigned(4096); /* Max response size cached */
+ *tl++ = txdr_unsigned(20); /* Max operations */
+ *tl++ = txdr_unsigned(64); /* Max slots */
+ *tl = 0; /* No rdma ird */
+
+ /* Fill in back channel attributes. */
+ NFSM_BUILD(tl, uint32_t *, 7 * NFSX_UNSIGNED);
+ *tl++ = 0; /* Header pad size */
+ *tl++ = txdr_unsigned(10000); /* Max request size */
+ *tl++ = txdr_unsigned(10000); /* Max response size */
+ *tl++ = txdr_unsigned(4096); /* Max response size cached */
+ *tl++ = txdr_unsigned(4); /* Max operations */
+ *tl++ = txdr_unsigned(NFSV4_CBSLOTS); /* Max slots */
+ *tl = 0; /* No rdma ird */
+
+ NFSM_BUILD(tl, uint32_t *, 8 * NFSX_UNSIGNED);
+ *tl++ = txdr_unsigned(NFS_CALLBCKPROG); /* Call back prog # */
+
+ /* Allow AUTH_SYS callbacks as uid, gid == 0. */
+ *tl++ = txdr_unsigned(1); /* Auth_sys only */
+ *tl++ = txdr_unsigned(AUTH_SYS); /* AUTH_SYS type */
+ *tl++ = txdr_unsigned(nfsboottime.tv_sec); /* time stamp */
+ *tl++ = 0; /* Null machine name */
+ *tl++ = 0; /* Uid == 0 */
+ *tl++ = 0; /* Gid == 0 */
+ *tl = 0; /* No additional gids */
+ nd->nd_flag |= ND_USEGSSNAME;
+ error = newnfs_request(nd, nmp, NULL, nrp, NULL, p, cred, NFS_PROG,
+ NFS_VER4, NULL, 1, NULL, NULL);
+ if (error != 0)
+ return (error);
+ if (nd->nd_repstat == 0) {
+ NFSM_DISSECT(tl, uint32_t *, NFSX_V4SESSIONID +
+ 2 * NFSX_UNSIGNED);
+ bcopy(tl, sep->nfsess_sessionid, NFSX_V4SESSIONID);
+ tl += NFSX_V4SESSIONID / NFSX_UNSIGNED;
+ sep->nfsess_sequenceid = fxdr_unsigned(uint32_t, *tl++);
+ crflags = fxdr_unsigned(uint32_t, *tl);
+ if ((crflags & NFSV4CRSESS_PERSIST) != 0 && mds != 0) {
+ NFSLOCKMNT(nmp);
+ nmp->nm_state |= NFSSTA_SESSPERSIST;
+ NFSUNLOCKMNT(nmp);
+ }
+
+ /* Get the fore channel slot count. */
+ NFSM_DISSECT(tl, uint32_t *, 7 * NFSX_UNSIGNED);
+ tl += 3; /* Skip the other counts. */
+ sep->nfsess_maxcache = fxdr_unsigned(int, *tl++);
+ tl++;
+ sep->nfsess_foreslots = fxdr_unsigned(uint16_t, *tl++);
+ NFSCL_DEBUG(4, "fore slots=%d\n", (int)sep->nfsess_foreslots);
+ irdcnt = fxdr_unsigned(int, *tl);
+ if (irdcnt > 0)
+ NFSM_DISSECT(tl, uint32_t *, irdcnt * NFSX_UNSIGNED);
+
+ /* and the back channel slot count. */
+ NFSM_DISSECT(tl, uint32_t *, 7 * NFSX_UNSIGNED);
+ tl += 5;
+ sep->nfsess_backslots = fxdr_unsigned(uint16_t, *tl);
+ NFSCL_DEBUG(4, "back slots=%d\n", (int)sep->nfsess_backslots);
+ }
+ error = nd->nd_repstat;
+nfsmout:
+ mbuf_freem(nd->nd_mrep);
+ return (error);
+}
+
+/*
+ * Do the NFSv4.1 Destroy Session.
+ */
+int
+nfsrpc_destroysession(struct nfsmount *nmp, struct nfsclclient *clp,
+ struct ucred *cred, NFSPROC_T *p)
+{
+ uint32_t *tl;
+ struct nfsrv_descript nfsd;
+ struct nfsrv_descript *nd = &nfsd;
+ int error;
+
+ nfscl_reqstart(nd, NFSPROC_DESTROYSESSION, nmp, NULL, 0, NULL, NULL);
+ NFSM_BUILD(tl, uint32_t *, NFSX_V4SESSIONID);
+ bcopy(NFSMNT_MDSSESSION(nmp)->nfsess_sessionid, tl, NFSX_V4SESSIONID);
+ nd->nd_flag |= ND_USEGSSNAME;
+ error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred,
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);
+ if (error != 0)
+ return (error);
+ error = nd->nd_repstat;
+ mbuf_freem(nd->nd_mrep);
+ return (error);
+}
+
+/*
+ * Do the NFSv4.1 Destroy Client.
+ */
+int
+nfsrpc_destroyclient(struct nfsmount *nmp, struct nfsclclient *clp,
+ struct ucred *cred, NFSPROC_T *p)
+{
+ uint32_t *tl;
+ struct nfsrv_descript nfsd;
+ struct nfsrv_descript *nd = &nfsd;
+ int error;
+
+ nfscl_reqstart(nd, NFSPROC_DESTROYCLIENT, nmp, NULL, 0, NULL, NULL);
+ NFSM_BUILD(tl, uint32_t *, 2 * NFSX_UNSIGNED);
+ *tl++ = NFSMNT_MDSSESSION(nmp)->nfsess_clientid.lval[0];
+ *tl = NFSMNT_MDSSESSION(nmp)->nfsess_clientid.lval[1];
+ nd->nd_flag |= ND_USEGSSNAME;
+ error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred,
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);
+ if (error != 0)
+ return (error);
+ error = nd->nd_repstat;
+ mbuf_freem(nd->nd_mrep);
+ return (error);
+}
+
+/*
+ * Do the NFSv4.1 LayoutGet.
+ */
+int
+nfsrpc_layoutget(struct nfsmount *nmp, uint8_t *fhp, int fhlen, int iomode,
+ uint64_t offset, uint64_t len, uint64_t minlen, int layoutlen,
+ nfsv4stateid_t *stateidp, int *retonclosep, struct nfsclflayouthead *flhp,
+ struct ucred *cred, NFSPROC_T *p, void *stuff)
+{
+ uint32_t *tl;
+ struct nfsrv_descript nfsd, *nd = &nfsd;
+ struct nfsfh *nfhp;
+ struct nfsclflayout *flp, *prevflp, *tflp;
+ int cnt, error, gotiomode, fhcnt, nfhlen, i, j;
+ uint8_t *cp;
+ uint64_t retlen;
+
+ flp = NULL;
+ gotiomode = -1;
+ nfscl_reqstart(nd, NFSPROC_LAYOUTGET, nmp, fhp, fhlen, NULL, NULL);
+ NFSM_BUILD(tl, uint32_t *, 4 * NFSX_UNSIGNED + 3 * NFSX_HYPER +
+ NFSX_STATEID);
+ *tl++ = newnfs_false; /* Don't signal availability. */
+ *tl++ = txdr_unsigned(NFSLAYOUT_NFSV4_1_FILES);
+ *tl++ = txdr_unsigned(iomode);
+ txdr_hyper(offset, tl);
+ tl += 2;
+ txdr_hyper(len, tl);
+ tl += 2;
+ txdr_hyper(minlen, tl);
+ tl += 2;
+ *tl++ = txdr_unsigned(stateidp->seqid);
+ NFSCL_DEBUG(4, "layget seq=%d\n", (int)stateidp->seqid);
+ *tl++ = stateidp->other[0];
+ *tl++ = stateidp->other[1];
+ *tl++ = stateidp->other[2];
+ *tl = txdr_unsigned(layoutlen);
+ nd->nd_flag |= ND_USEGSSNAME;
+ error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred,
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);
+ if (error != 0)
+ return (error);
+ if (nd->nd_repstat == 0) {
+ NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED + NFSX_STATEID);
+ if (*tl++ != 0)
+ *retonclosep = 1;
+ else
+ *retonclosep = 0;
+ stateidp->seqid = fxdr_unsigned(uint32_t, *tl++);
+ NFSCL_DEBUG(4, "retoncls=%d stseq=%d\n", *retonclosep,
+ (int)stateidp->seqid);
+ stateidp->other[0] = *tl++;
+ stateidp->other[1] = *tl++;
+ stateidp->other[2] = *tl++;
+ cnt = fxdr_unsigned(int, *tl);
+ NFSCL_DEBUG(4, "layg cnt=%d\n", cnt);
+ if (cnt <= 0 || cnt > 10000) {
+ /* Don't accept more than 10000 layouts in reply. */
+ error = NFSERR_BADXDR;
+ goto nfsmout;
+ }
+ for (i = 0; i < cnt; i++) {
+ /* Dissect all the way to the file handle cnt. */
+ NFSM_DISSECT(tl, uint32_t *, 3 * NFSX_HYPER +
+ 6 * NFSX_UNSIGNED + NFSX_V4DEVICEID);
+ fhcnt = fxdr_unsigned(int, *(tl + 11 +
+ NFSX_V4DEVICEID / NFSX_UNSIGNED));
+ NFSCL_DEBUG(4, "fhcnt=%d\n", fhcnt);
+ if (fhcnt < 0 || fhcnt > 100) {
+ /* Don't accept more than 100 file handles. */
+ error = NFSERR_BADXDR;
+ goto nfsmout;
+ }
+ if (fhcnt > 1)
+ flp = malloc(sizeof(*flp) + (fhcnt - 1) *
+ sizeof(struct nfsfh *),
+ M_NFSFLAYOUT, M_WAITOK);
+ else
+ flp = malloc(sizeof(*flp),
+ M_NFSFLAYOUT, M_WAITOK);
+ flp->nfsfl_flags = 0;
+ flp->nfsfl_fhcnt = 0;
+ flp->nfsfl_devp = NULL;
+ flp->nfsfl_off = fxdr_hyper(tl); tl += 2;
+ retlen = fxdr_hyper(tl); tl += 2;
+ if (flp->nfsfl_off + retlen < flp->nfsfl_off)
+ flp->nfsfl_end = UINT64_MAX - flp->nfsfl_off;
+ else
+ flp->nfsfl_end = flp->nfsfl_off + retlen;
+ flp->nfsfl_iomode = fxdr_unsigned(int, *tl++);
+ if (gotiomode == -1)
+ gotiomode = flp->nfsfl_iomode;
+ NFSCL_DEBUG(4, "layg reqiom=%d retiom=%d\n", iomode,
+ (int)flp->nfsfl_iomode);
+ if (fxdr_unsigned(int, *tl++) !=
+ NFSLAYOUT_NFSV4_1_FILES) {
+ printf("NFSv4.1: got non-files layout\n");
+ error = NFSERR_BADXDR;
+ goto nfsmout;
+ }
+ NFSBCOPY(++tl, flp->nfsfl_dev, NFSX_V4DEVICEID);
+ tl += (NFSX_V4DEVICEID / NFSX_UNSIGNED);
+ flp->nfsfl_util = fxdr_unsigned(uint32_t, *tl++);
+ NFSCL_DEBUG(4, "flutil=0x%x\n", flp->nfsfl_util);
+ flp->nfsfl_stripe1 = fxdr_unsigned(uint32_t, *tl++);
+ flp->nfsfl_patoff = fxdr_hyper(tl); tl += 2;
+ if (fxdr_unsigned(int, *tl) != fhcnt) {
+ printf("EEK! bad fhcnt\n");
+ error = NFSERR_BADXDR;
+ goto nfsmout;
+ }
+ for (j = 0; j < fhcnt; j++) {
+ NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED);
+ nfhlen = fxdr_unsigned(int, *tl);
+ if (nfhlen <= 0 || nfhlen > NFSX_V4FHMAX) {
+ error = NFSERR_BADXDR;
+ goto nfsmout;
+ }
+ nfhp = malloc(sizeof(*nfhp) + nfhlen - 1,
+ M_NFSFH, M_WAITOK);
+ flp->nfsfl_fh[j] = nfhp;
+ flp->nfsfl_fhcnt++;
+ nfhp->nfh_len = nfhlen;
+ NFSM_DISSECT(cp, uint8_t *, NFSM_RNDUP(nfhlen));
+ NFSBCOPY(cp, nfhp->nfh_fh, nfhlen);
+ }
+ if (flp->nfsfl_iomode == gotiomode) {
+ /* Keep the list in increasing offset order. */
+ tflp = LIST_FIRST(flhp);
+ prevflp = NULL;
+ while (tflp != NULL &&
+ tflp->nfsfl_off < flp->nfsfl_off) {
+ prevflp = tflp;
+ tflp = LIST_NEXT(tflp, nfsfl_list);
+ }
+ if (prevflp == NULL)
+ LIST_INSERT_HEAD(flhp, flp, nfsfl_list);
+ else
+ LIST_INSERT_AFTER(prevflp, flp,
+ nfsfl_list);
+ } else {
+ printf("nfscl_layoutget(): got wrong iomode\n");
+ nfscl_freeflayout(flp);
+ }
+ flp = NULL;
+ }
+ }
+ if (nd->nd_repstat != 0 && error == 0)
+ error = nd->nd_repstat;
+nfsmout:
+ if (error != 0 && flp != NULL)
+ nfscl_freeflayout(flp);
+ mbuf_freem(nd->nd_mrep);
+ return (error);
+}
+
+/*
+ * Do the NFSv4.1 Get Device Info.
+ */
+int
+nfsrpc_getdeviceinfo(struct nfsmount *nmp, uint8_t *deviceid, int layouttype,
+ uint32_t *notifybitsp, struct nfscldevinfo **ndip, struct ucred *cred,
+ NFSPROC_T *p)
+{
+ uint32_t cnt, *tl;
+ struct nfsrv_descript nfsd;
+ struct nfsrv_descript *nd = &nfsd;
+ struct sockaddr_storage ss;
+ struct nfsclds *dsp = NULL, **dspp;
+ struct nfscldevinfo *ndi;
+ int addrcnt, bitcnt, error, i, isudp, j, pos, safilled, stripecnt;
+ uint8_t stripeindex;
+
+ *ndip = NULL;
+ ndi = NULL;
+ nfscl_reqstart(nd, NFSPROC_GETDEVICEINFO, nmp, NULL, 0, NULL, NULL);
+ NFSM_BUILD(tl, uint32_t *, NFSX_V4DEVICEID + 3 * NFSX_UNSIGNED);
+ NFSBCOPY(deviceid, tl, NFSX_V4DEVICEID);
+ tl += (NFSX_V4DEVICEID / NFSX_UNSIGNED);
+ *tl++ = txdr_unsigned(layouttype);
+ *tl++ = txdr_unsigned(100000);
+ if (notifybitsp != NULL && *notifybitsp != 0) {
+ *tl = txdr_unsigned(1); /* One word of bits. */
+ NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED);
+ *tl = txdr_unsigned(*notifybitsp);
+ } else
+ *tl = txdr_unsigned(0);
+ nd->nd_flag |= ND_USEGSSNAME;
+ error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred,
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);
+ if (error != 0)
+ return (error);
+ if (nd->nd_repstat == 0) {
+ NFSM_DISSECT(tl, uint32_t *, 3 * NFSX_UNSIGNED);
+ if (layouttype != fxdr_unsigned(int, *tl++))
+ printf("EEK! devinfo layout type not same!\n");
+ stripecnt = fxdr_unsigned(int, *++tl);
+ NFSCL_DEBUG(4, "stripecnt=%d\n", stripecnt);
+ if (stripecnt < 1 || stripecnt > 4096) {
+ printf("NFS devinfo stripecnt %d: out of range\n",
+ stripecnt);
+ error = NFSERR_BADXDR;
+ goto nfsmout;
+ }
+ NFSM_DISSECT(tl, uint32_t *, (stripecnt + 1) * NFSX_UNSIGNED);
+ addrcnt = fxdr_unsigned(int, *(tl + stripecnt));
+ NFSCL_DEBUG(4, "addrcnt=%d\n", addrcnt);
+ if (addrcnt < 1 || addrcnt > 128) {
+ printf("NFS devinfo addrcnt %d: out of range\n",
+ addrcnt);
+ error = NFSERR_BADXDR;
+ goto nfsmout;
+ }
+
+ /*
+ * Now we know how many stripe indices and addresses, so
+ * we can allocate the structure the correct size.
+ */
+ i = (stripecnt * sizeof(uint8_t)) / sizeof(struct nfsclds *)
+ + 1;
+ NFSCL_DEBUG(4, "stripeindices=%d\n", i);
+ ndi = malloc(sizeof(*ndi) + (addrcnt + i) *
+ sizeof(struct nfsclds *), M_NFSDEVINFO, M_WAITOK | M_ZERO);
+ NFSBCOPY(deviceid, ndi->nfsdi_deviceid, NFSX_V4DEVICEID);
+ ndi->nfsdi_refcnt = 0;
+ ndi->nfsdi_stripecnt = stripecnt;
+ ndi->nfsdi_addrcnt = addrcnt;
+ /* Fill in the stripe indices. */
+ for (i = 0; i < stripecnt; i++) {
+ stripeindex = fxdr_unsigned(uint8_t, *tl++);
+ NFSCL_DEBUG(4, "stripeind=%d\n", stripeindex);
+ if (stripeindex >= addrcnt) {
+ printf("NFS devinfo stripeindex %d: too big\n",
+ (int)stripeindex);
+ error = NFSERR_BADXDR;
+ goto nfsmout;
+ }
+ nfsfldi_setstripeindex(ndi, i, stripeindex);
+ }
+
+ /* Now, dissect the server address(es). */
+ safilled = 0;
+ for (i = 0; i < addrcnt; i++) {
+ NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED);
+ cnt = fxdr_unsigned(uint32_t, *tl);
+ if (cnt == 0) {
+ printf("NFS devinfo 0 len addrlist\n");
+ error = NFSERR_BADXDR;
+ goto nfsmout;
+ }
+ dspp = nfsfldi_addr(ndi, i);
+ pos = arc4random() % cnt; /* Choose one. */
+ safilled = 0;
+ for (j = 0; j < cnt; j++) {
+ error = nfsv4_getipaddr(nd, &ss, &isudp);
+ if (error != 0 && error != EPERM) {
+ error = NFSERR_BADXDR;
+ goto nfsmout;
+ }
+ if (error == 0 && isudp == 0) {
+ /*
+ * The algorithm is:
+ * - use "pos" entry if it is of the
+ * same af_family or none of them
+ * is of the same af_family
+ * else
+ * - use the first one of the same
+ * af_family.
+ */
+ if ((safilled == 0 && ss.ss_family ==
+ nmp->nm_nam->sa_family) ||
+ (j == pos &&
+ (safilled == 0 || ss.ss_family ==
+ nmp->nm_nam->sa_family)) ||
+ (safilled == 1 && ss.ss_family ==
+ nmp->nm_nam->sa_family)) {
+ error = nfsrpc_fillsa(nmp, &ss,
+ &dsp, p);
+ if (error == 0) {
+ *dspp = dsp;
+ if (ss.ss_family ==
+ nmp->nm_nam->sa_family)
+ safilled = 2;
+ else
+ safilled = 1;
+ }
+ }
+ }
+ }
+ if (safilled == 0)
+ break;
+ }
+
+ /* And the notify bits. */
+ NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED);
+ if (safilled != 0) {
+ bitcnt = fxdr_unsigned(int, *tl);
+ if (bitcnt > 0) {
+ NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED);
+ if (notifybitsp != NULL)
+ *notifybitsp =
+ fxdr_unsigned(uint32_t, *tl);
+ }
+ *ndip = ndi;
+ } else
+ error = EPERM;
+ }
+ if (nd->nd_repstat != 0)
+ error = nd->nd_repstat;
+nfsmout:
+ if (error != 0 && ndi != NULL)
+ nfscl_freedevinfo(ndi);
+ mbuf_freem(nd->nd_mrep);
+ return (error);
+}
+
+/*
+ * Do the NFSv4.1 LayoutCommit.
+ */
+int
+nfsrpc_layoutcommit(struct nfsmount *nmp, uint8_t *fh, int fhlen, int reclaim,
+ uint64_t off, uint64_t len, uint64_t lastbyte, nfsv4stateid_t *stateidp,
+ int layouttype, int layoutupdatecnt, uint8_t *layp, struct ucred *cred,
+ NFSPROC_T *p, void *stuff)
+{
+ uint32_t *tl;
+ struct nfsrv_descript nfsd, *nd = &nfsd;
+ int error, outcnt, i;
+ uint8_t *cp;
+
+ nfscl_reqstart(nd, NFSPROC_LAYOUTCOMMIT, nmp, fh, fhlen, NULL, NULL);
+ NFSM_BUILD(tl, uint32_t *, 5 * NFSX_UNSIGNED + 3 * NFSX_HYPER +
+ NFSX_STATEID);
+ txdr_hyper(off, tl);
+ tl += 2;
+ txdr_hyper(len, tl);
+ tl += 2;
+ if (reclaim != 0)
+ *tl++ = newnfs_true;
+ else
+ *tl++ = newnfs_false;
+ *tl++ = txdr_unsigned(stateidp->seqid);
+ *tl++ = stateidp->other[0];
+ *tl++ = stateidp->other[1];
+ *tl++ = stateidp->other[2];
+ *tl++ = newnfs_true;
+ if (lastbyte < off)
+ lastbyte = off;
+ else if (lastbyte >= (off + len))
+ lastbyte = off + len - 1;
+ txdr_hyper(lastbyte, tl);
+ tl += 2;
+ *tl++ = newnfs_false;
+ *tl++ = txdr_unsigned(layouttype);
+ *tl = txdr_unsigned(layoutupdatecnt);
+ if (layoutupdatecnt > 0) {
+ KASSERT(layouttype != NFSLAYOUT_NFSV4_1_FILES,
+ ("Must be nil for Files Layout"));
+ outcnt = NFSM_RNDUP(layoutupdatecnt);
+ NFSM_BUILD(cp, uint8_t *, outcnt);
+ NFSBCOPY(layp, cp, layoutupdatecnt);
+ cp += layoutupdatecnt;
+ for (i = 0; i < (outcnt - layoutupdatecnt); i++)
+ *cp++ = 0x0;
+ }
+ nd->nd_flag |= ND_USEGSSNAME;
+ error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred,
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);
+ if (error != 0)
+ return (error);
+ error = nd->nd_repstat;
+ mbuf_freem(nd->nd_mrep);
+ return (error);
+}
+
+/*
+ * Do the NFSv4.1 LayoutReturn.
+ */
+int
+nfsrpc_layoutreturn(struct nfsmount *nmp, uint8_t *fh, int fhlen, int reclaim,
+ int layouttype, uint32_t iomode, int layoutreturn, uint64_t offset,
+ uint64_t len, nfsv4stateid_t *stateidp, int layoutcnt, uint32_t *layp,
+ struct ucred *cred, NFSPROC_T *p, void *stuff)
+{
+ uint32_t *tl;
+ struct nfsrv_descript nfsd, *nd = &nfsd;
+ int error, outcnt, i;
+ uint8_t *cp;
+
+ nfscl_reqstart(nd, NFSPROC_LAYOUTRETURN, nmp, fh, fhlen, NULL, NULL);
+ NFSM_BUILD(tl, uint32_t *, 4 * NFSX_UNSIGNED);
+ if (reclaim != 0)
+ *tl++ = newnfs_true;
+ else
+ *tl++ = newnfs_false;
+ *tl++ = txdr_unsigned(layouttype);
+ *tl++ = txdr_unsigned(iomode);
+ *tl = txdr_unsigned(layoutreturn);
+ if (layoutreturn == NFSLAYOUTRETURN_FILE) {
+ NFSM_BUILD(tl, uint32_t *, 2 * NFSX_HYPER + NFSX_STATEID +
+ NFSX_UNSIGNED);
+ txdr_hyper(offset, tl);
+ tl += 2;
+ txdr_hyper(len, tl);
+ tl += 2;
+ NFSCL_DEBUG(4, "layoutret stseq=%d\n", (int)stateidp->seqid);
+ *tl++ = txdr_unsigned(stateidp->seqid);
+ *tl++ = stateidp->other[0];
+ *tl++ = stateidp->other[1];
+ *tl++ = stateidp->other[2];
+ *tl = txdr_unsigned(layoutcnt);
+ if (layoutcnt > 0) {
+ outcnt = NFSM_RNDUP(layoutcnt);
+ NFSM_BUILD(cp, uint8_t *, outcnt);
+ NFSBCOPY(layp, cp, layoutcnt);
+ cp += layoutcnt;
+ for (i = 0; i < (outcnt - layoutcnt); i++)
+ *cp++ = 0x0;
+ }
+ }
+ nd->nd_flag |= ND_USEGSSNAME;
+ error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred,
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);
+ if (error != 0)
+ return (error);
+ if (nd->nd_repstat == 0) {
+ NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED);
+ if (*tl != 0) {
+ NFSM_DISSECT(tl, uint32_t *, NFSX_STATEID);
+ stateidp->seqid = fxdr_unsigned(uint32_t, *tl++);
+ stateidp->other[0] = *tl++;
+ stateidp->other[1] = *tl++;
+ stateidp->other[2] = *tl;
+ }
+ } else
+ error = nd->nd_repstat;
+nfsmout:
+ mbuf_freem(nd->nd_mrep);
+ return (error);
+}
+
+/*
+ * Acquire a layout and devinfo, if possible. The caller must have acquired
+ * a reference count on the nfsclclient structure before calling this.
+ * Return the layout in lypp with a reference count on it, if successful.
+ */
+static int
+nfsrpc_getlayout(struct nfsmount *nmp, vnode_t vp, struct nfsfh *nfhp,
+ int iomode, uint32_t *notifybitsp, nfsv4stateid_t *stateidp, uint64_t off,
+ struct nfscllayout **lypp, struct ucred *cred, NFSPROC_T *p)
+{
+ struct nfscllayout *lyp;
+ struct nfsclflayout *flp, *tflp;
+ struct nfscldevinfo *dip;
+ struct nfsclflayouthead flh;
+ int error = 0, islocked, layoutlen, recalled, retonclose;
+ nfsv4stateid_t stateid;
+
+ *lypp = NULL;
+ /*
+ * If lyp is returned non-NULL, there will be a refcnt (shared lock)
+ * on it, iff flp != NULL or a lock (exclusive lock) on it iff
+ * flp == NULL.
+ */
+ lyp = nfscl_getlayout(nmp->nm_clp, nfhp->nfh_fh, nfhp->nfh_len,
+ off, &flp, &recalled);
+ islocked = 0;
+ if (lyp == NULL || flp == NULL) {
+ if (recalled != 0)
+ return (EIO);
+ LIST_INIT(&flh);
+ layoutlen = NFSMNT_MDSSESSION(nmp)->nfsess_maxcache -
+ (NFSX_STATEID + 3 * NFSX_UNSIGNED);
+ if (lyp == NULL) {
+ stateid.seqid = 0;
+ stateid.other[0] = stateidp->other[0];
+ stateid.other[1] = stateidp->other[1];
+ stateid.other[2] = stateidp->other[2];
+ error = nfsrpc_layoutget(nmp, nfhp->nfh_fh,
+ nfhp->nfh_len, iomode, (uint64_t)0, INT64_MAX,
+ (uint64_t)0, layoutlen, &stateid, &retonclose,
+ &flh, cred, p, NULL);
+ } else {
+ islocked = 1;
+ stateid.seqid = lyp->nfsly_stateid.seqid;
+ stateid.other[0] = lyp->nfsly_stateid.other[0];
+ stateid.other[1] = lyp->nfsly_stateid.other[1];
+ stateid.other[2] = lyp->nfsly_stateid.other[2];
+ error = nfsrpc_layoutget(nmp, nfhp->nfh_fh,
+ nfhp->nfh_len, iomode, off, INT64_MAX,
+ (uint64_t)0, layoutlen, &stateid, &retonclose,
+ &flh, cred, p, NULL);
+ }
+ if (error == 0)
+ LIST_FOREACH(tflp, &flh, nfsfl_list) {
+ error = nfscl_adddevinfo(nmp, NULL, tflp);
+ if (error != 0) {
+ error = nfsrpc_getdeviceinfo(nmp,
+ tflp->nfsfl_dev,
+ NFSLAYOUT_NFSV4_1_FILES,
+ notifybitsp, &dip, cred, p);
+ if (error != 0)
+ break;
+ error = nfscl_adddevinfo(nmp, dip,
+ tflp);
+ if (error != 0)
+ printf(
+ "getlayout: cannot add\n");
+ }
+ }
+ if (error == 0) {
+ /*
+ * nfscl_layout() always returns with the nfsly_lock
+ * set to a refcnt (shared lock).
+ */
+ error = nfscl_layout(nmp, vp, nfhp->nfh_fh,
+ nfhp->nfh_len, &stateid, retonclose, &flh, &lyp,
+ cred, p);
+ if (error == 0)
+ *lypp = lyp;
+ } else if (islocked != 0)
+ nfsv4_unlock(&lyp->nfsly_lock, 0);
+ } else
+ *lypp = lyp;
+ return (error);
+}
+
+/*
+ * Do a TCP connection plus exchange id and create session.
+ * If successful, a "struct nfsclds" is linked into the list for the
+ * mount point and a pointer to it is returned.
+ */
+static int
+nfsrpc_fillsa(struct nfsmount *nmp, struct sockaddr_storage *ssp,
+ struct nfsclds **dspp, NFSPROC_T *p)
+{
+ struct sockaddr_in *msad, *sad, *ssd;
+ struct sockaddr_in6 *msad6, *sad6, *ssd6;
+ struct nfsclclient *clp;
+ struct nfssockreq *nrp;
+ struct nfsclds *dsp, *tdsp;
+ int error;
+ enum nfsclds_state retv;
+ uint32_t sequenceid;
+
+ KASSERT(nmp->nm_sockreq.nr_cred != NULL,
+ ("nfsrpc_fillsa: NULL nr_cred"));
+ NFSLOCKCLSTATE();
+ clp = nmp->nm_clp;
+ NFSUNLOCKCLSTATE();
+ if (clp == NULL)
+ return (EPERM);
+ if (ssp->ss_family == AF_INET) {
+ ssd = (struct sockaddr_in *)ssp;
+ NFSLOCKMNT(nmp);
+
+ /*
+ * Check to see if we already have a session for this
+ * address that is usable for a DS.
+ * Note that the MDS's address is in a different place
+ * than the sessions already acquired for DS's.
+ */
+ msad = (struct sockaddr_in *)nmp->nm_sockreq.nr_nam;
+ tdsp = TAILQ_FIRST(&nmp->nm_sess);
+ while (tdsp != NULL) {
+ if (msad != NULL && msad->sin_family == AF_INET &&
+ ssd->sin_addr.s_addr == msad->sin_addr.s_addr &&
+ ssd->sin_port == msad->sin_port &&
+ (tdsp->nfsclds_flags & NFSCLDS_DS) != 0) {
+ *dspp = tdsp;
+ NFSUNLOCKMNT(nmp);
+ NFSCL_DEBUG(4, "fnd same addr\n");
+ return (0);
+ }
+ tdsp = TAILQ_NEXT(tdsp, nfsclds_list);
+ if (tdsp != NULL && tdsp->nfsclds_sockp != NULL)
+ msad = (struct sockaddr_in *)
+ tdsp->nfsclds_sockp->nr_nam;
+ else
+ msad = NULL;
+ }
+ NFSUNLOCKMNT(nmp);
+
+ /* No IP address match, so look for new/trunked one. */
+ sad = malloc(sizeof(*sad), M_SONAME, M_WAITOK | M_ZERO);
+ sad->sin_len = sizeof(*sad);
+ sad->sin_family = AF_INET;
+ sad->sin_port = ssd->sin_port;
+ sad->sin_addr.s_addr = ssd->sin_addr.s_addr;
+ nrp = malloc(sizeof(*nrp), M_NFSSOCKREQ, M_WAITOK | M_ZERO);
+ nrp->nr_nam = (struct sockaddr *)sad;
+ } else if (ssp->ss_family == AF_INET6) {
+ ssd6 = (struct sockaddr_in6 *)ssp;
+ NFSLOCKMNT(nmp);
+
+ /*
+ * Check to see if we already have a session for this
+ * address that is usable for a DS.
+ * Note that the MDS's address is in a different place
+ * than the sessions already acquired for DS's.
+ */
+ msad6 = (struct sockaddr_in6 *)nmp->nm_sockreq.nr_nam;
+ tdsp = TAILQ_FIRST(&nmp->nm_sess);
+ while (tdsp != NULL) {
+ if (msad6 != NULL && msad6->sin6_family == AF_INET6 &&
+ IN6_ARE_ADDR_EQUAL(&ssd6->sin6_addr,
+ &msad6->sin6_addr) &&
+ ssd6->sin6_port == msad6->sin6_port &&
+ (tdsp->nfsclds_flags & NFSCLDS_DS) != 0) {
+ *dspp = tdsp;
+ NFSUNLOCKMNT(nmp);
+ return (0);
+ }
+ tdsp = TAILQ_NEXT(tdsp, nfsclds_list);
+ if (tdsp != NULL && tdsp->nfsclds_sockp != NULL)
+ msad6 = (struct sockaddr_in6 *)
+ tdsp->nfsclds_sockp->nr_nam;
+ else
+ msad6 = NULL;
+ }
+ NFSUNLOCKMNT(nmp);
+
+ /* No IP address match, so look for new/trunked one. */
+ sad6 = malloc(sizeof(*sad6), M_SONAME, M_WAITOK | M_ZERO);
+ sad6->sin6_len = sizeof(*sad6);
+ sad6->sin6_family = AF_INET6;
+ sad6->sin6_port = ssd6->sin6_port;
+ NFSBCOPY(&ssd6->sin6_addr, &sad6->sin6_addr,
+ sizeof(struct in6_addr));
+ nrp = malloc(sizeof(*nrp), M_NFSSOCKREQ, M_WAITOK | M_ZERO);
+ nrp->nr_nam = (struct sockaddr *)sad6;
+ } else
+ return (EPERM);
+
+ nrp->nr_sotype = SOCK_STREAM;
+ mtx_init(&nrp->nr_mtx, "nfssock", NULL, MTX_DEF);
+ nrp->nr_prog = NFS_PROG;
+ nrp->nr_vers = NFS_VER4;
+
+ /*
+ * Use the credentials that were used for the mount, which are
+ * in nmp->nm_sockreq.nr_cred for newnfs_connect() etc.
+ * Ref. counting the credentials with crhold() is probably not
+ * necessary, since nm_sockreq.nr_cred won't be crfree()'d until
+ * unmount, but I did it anyhow.
+ */
+ nrp->nr_cred = crhold(nmp->nm_sockreq.nr_cred);
+ error = newnfs_connect(nmp, nrp, NULL, p, 0);
+ NFSCL_DEBUG(3, "DS connect=%d\n", error);
+
+ /* Now, do the exchangeid and create session. */
+ if (error == 0)
+ error = nfsrpc_exchangeid(nmp, clp, nrp, NFSV4EXCH_USEPNFSDS,
+ &dsp, nrp->nr_cred, p);
+ NFSCL_DEBUG(3, "DS exchangeid=%d\n", error);
+ if (error == 0) {
+ dsp->nfsclds_sockp = nrp;
+ NFSLOCKMNT(nmp);
+ retv = nfscl_getsameserver(nmp, dsp, &tdsp);
+ NFSCL_DEBUG(3, "getsame ret=%d\n", retv);
+ if (retv == NFSDSP_USETHISSESSION) {
+ NFSUNLOCKMNT(nmp);
+ /*
+ * If there is already a session for this server,
+ * use it.
+ */
+ (void)newnfs_disconnect(nrp);
+ nfscl_freenfsclds(dsp);
+ *dspp = tdsp;
+ return (0);
+ }
+ if (retv == NFSDSP_SEQTHISSESSION)
+ sequenceid = tdsp->nfsclds_sess.nfsess_sequenceid;
+ else
+ sequenceid = dsp->nfsclds_sess.nfsess_sequenceid;
+ NFSUNLOCKMNT(nmp);
+ error = nfsrpc_createsession(nmp, &dsp->nfsclds_sess,
+ nrp, sequenceid, 0, nrp->nr_cred, p);
+ NFSCL_DEBUG(3, "DS createsess=%d\n", error);
+ } else {
+ NFSFREECRED(nrp->nr_cred);
+ NFSFREEMUTEX(&nrp->nr_mtx);
+ free(nrp->nr_nam, M_SONAME);
+ free(nrp, M_NFSSOCKREQ);
+ }
+ if (error == 0) {
+ NFSCL_DEBUG(3, "add DS session\n");
+ /*
+ * Put it at the end of the list. That way the list
+ * is ordered by when the entry was added. This matters
+ * since the one done first is the one that should be
+ * used for sequencid'ing any subsequent create sessions.
+ */
+ NFSLOCKMNT(nmp);
+ TAILQ_INSERT_TAIL(&nmp->nm_sess, dsp, nfsclds_list);
+ NFSUNLOCKMNT(nmp);
+ *dspp = dsp;
+ } else if (dsp != NULL)
+ nfscl_freenfsclds(dsp);
+ return (error);
+}
+
+/*
+ * Do the NFSv4.1 Reclaim Complete.
+ */
+int
+nfsrpc_reclaimcomplete(struct nfsmount *nmp, struct ucred *cred, NFSPROC_T *p)
+{
+ uint32_t *tl;
+ struct nfsrv_descript nfsd;
+ struct nfsrv_descript *nd = &nfsd;
+ int error;
+
+ nfscl_reqstart(nd, NFSPROC_RECLAIMCOMPL, nmp, NULL, 0, NULL, NULL);
+ NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED);
+ *tl = newnfs_false;
+ nd->nd_flag |= ND_USEGSSNAME;
+ error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred,
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);
+ if (error != 0)
+ return (error);
+ error = nd->nd_repstat;
+ mbuf_freem(nd->nd_mrep);
+ return (error);
+}
+
+/*
+ * Initialize the slot tables for a session.
+ */
+static void
+nfscl_initsessionslots(struct nfsclsession *sep)
+{
+ int i;
+
+ for (i = 0; i < NFSV4_CBSLOTS; i++) {
+ if (sep->nfsess_cbslots[i].nfssl_reply != NULL)
+ m_freem(sep->nfsess_cbslots[i].nfssl_reply);
+ NFSBZERO(&sep->nfsess_cbslots[i], sizeof(struct nfsslot));
+ }
+ for (i = 0; i < 64; i++)
+ sep->nfsess_slotseq[i] = 0;
+ sep->nfsess_slots = 0;
+}
+
+/*
+ * Called to try and do an I/O operation via an NFSv4.1 Data Server (DS).
+ */
+int
+nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit,
+ uint32_t rwaccess, struct ucred *cred, NFSPROC_T *p)
+{
+ struct nfsnode *np = VTONFS(vp);
+ struct nfsmount *nmp = VFSTONFS(vnode_mount(vp));
+ struct nfscllayout *layp;
+ struct nfscldevinfo *dip;
+ struct nfsclflayout *rflp;
+ nfsv4stateid_t stateid;
+ struct ucred *newcred;
+ uint64_t lastbyte, len, off, oresid, xfer;
+ int eof, error, iolaymode, recalled;
+ void *lckp;
+
+ if (!NFSHASPNFS(nmp) || nfscl_enablecallb == 0 || nfs_numnfscbd == 0 ||
+ (np->n_flag & NNOLAYOUT) != 0)
+ return (EIO);
+ /* Now, get a reference cnt on the clientid for this mount. */
+ if (nfscl_getref(nmp) == 0)
+ return (EIO);
+
+ /* Find an appropriate stateid. */
+ newcred = NFSNEWCRED(cred);
+ error = nfscl_getstateid(vp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len,
+ rwaccess, 1, newcred, p, &stateid, &lckp);
+ if (error != 0) {
+ NFSFREECRED(newcred);
+ nfscl_relref(nmp);
+ return (error);
+ }
+ /* Search for a layout for this file. */
+ off = uiop->uio_offset;
+ layp = nfscl_getlayout(nmp->nm_clp, np->n_fhp->nfh_fh,
+ np->n_fhp->nfh_len, off, &rflp, &recalled);
+ if (layp == NULL || rflp == NULL) {
+ if (recalled != 0) {
+ NFSFREECRED(newcred);
+ nfscl_relref(nmp);
+ return (EIO);
+ }
+ if (layp != NULL) {
+ nfscl_rellayout(layp, (rflp == NULL) ? 1 : 0);
+ layp = NULL;
+ }
+ /* Try and get a Layout, if it is supported. */
+ if (rwaccess == NFSV4OPEN_ACCESSWRITE ||
+ (np->n_flag & NWRITEOPENED) != 0)
+ iolaymode = NFSLAYOUTIOMODE_RW;
+ else
+ iolaymode = NFSLAYOUTIOMODE_READ;
+ error = nfsrpc_getlayout(nmp, vp, np->n_fhp, iolaymode,
+ NULL, &stateid, off, &layp, newcred, p);
+ if (error != 0) {
+ NFSLOCKNODE(np);
+ np->n_flag |= NNOLAYOUT;
+ NFSUNLOCKNODE(np);
+ if (lckp != NULL)
+ nfscl_lockderef(lckp);
+ NFSFREECRED(newcred);
+ if (layp != NULL)
+ nfscl_rellayout(layp, 0);
+ nfscl_relref(nmp);
+ return (error);
+ }
+ }
+
+ /*
+ * Loop around finding a layout that works for the first part of
+ * this I/O operation, and then call the function that actually
+ * does the RPC.
+ */
+ eof = 0;
+ len = (uint64_t)uiop->uio_resid;
+ while (len > 0 && error == 0 && eof == 0) {
+ off = uiop->uio_offset;
+ error = nfscl_findlayoutforio(layp, off, rwaccess, &rflp);
+ if (error == 0) {
+ oresid = xfer = (uint64_t)uiop->uio_resid;
+ if (xfer > (rflp->nfsfl_end - rflp->nfsfl_off))
+ xfer = rflp->nfsfl_end - rflp->nfsfl_off;
+ dip = nfscl_getdevinfo(nmp->nm_clp, rflp->nfsfl_dev,
+ rflp->nfsfl_devp);
+ if (dip != NULL) {
+ error = nfscl_doflayoutio(vp, uiop, iomode,
+ must_commit, &eof, &stateid, rwaccess, dip,
+ layp, rflp, off, xfer, newcred, p);
+ nfscl_reldevinfo(dip);
+ lastbyte = off + xfer - 1;
+ if (error == 0) {
+ NFSLOCKCLSTATE();
+ if (lastbyte > layp->nfsly_lastbyte)
+ layp->nfsly_lastbyte = lastbyte;
+ NFSUNLOCKCLSTATE();
+ }
+ } else
+ error = EIO;
+ if (error == 0)
+ len -= (oresid - (uint64_t)uiop->uio_resid);
+ }
+ }
+ if (lckp != NULL)
+ nfscl_lockderef(lckp);
+ NFSFREECRED(newcred);
+ nfscl_rellayout(layp, 0);
+ nfscl_relref(nmp);
+ return (error);
+}
+
+/*
+ * Find a file layout that will handle the first bytes of the requested
+ * range and return the information from it needed to to the I/O operation.
+ */
+int
+nfscl_findlayoutforio(struct nfscllayout *lyp, uint64_t off, uint32_t rwaccess,
+ struct nfsclflayout **retflpp)
+{
+ struct nfsclflayout *flp, *nflp, *rflp;
+ uint32_t rw;
+
+ rflp = NULL;
+ rw = rwaccess;
+ /* For reading, do the Read list first and then the Write list. */
+ do {
+ if (rw == NFSV4OPEN_ACCESSREAD)
+ flp = LIST_FIRST(&lyp->nfsly_flayread);
+ else
+ flp = LIST_FIRST(&lyp->nfsly_flayrw);
+ while (flp != NULL) {
+ nflp = LIST_NEXT(flp, nfsfl_list);
+ if (flp->nfsfl_off > off)
+ break;
+ if (flp->nfsfl_end > off &&
+ (rflp == NULL || rflp->nfsfl_end < flp->nfsfl_end))
+ rflp = flp;
+ flp = nflp;
+ }
+ if (rw == NFSV4OPEN_ACCESSREAD)
+ rw = NFSV4OPEN_ACCESSWRITE;
+ else
+ rw = 0;
+ } while (rw != 0);
+ if (rflp != NULL) {
+ /* This one covers the most bytes starting at off. */
+ *retflpp = rflp;
+ return (0);
+ }
+ return (EIO);
+}
+
+/*
+ * Do I/O using an NFSv4.1 file layout.
+ */
+static int
+nfscl_doflayoutio(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit,
+ int *eofp, nfsv4stateid_t *stateidp, int rwflag, struct nfscldevinfo *dp,
+ struct nfscllayout *lyp, struct nfsclflayout *flp, uint64_t off,
+ uint64_t len, struct ucred *cred, NFSPROC_T *p)
+{
+ uint64_t io_off, rel_off, stripe_unit_size, transfer, xfer;
+ int commit_thru_mds, error = 0, stripe_index, stripe_pos;
+ struct nfsnode *np;
+ struct nfsfh *fhp;
+ struct nfsclds **dspp;
+
+ np = VTONFS(vp);
+ rel_off = off - flp->nfsfl_patoff;
+ stripe_unit_size = (flp->nfsfl_util >> 6) & 0x3ffffff;
+ stripe_pos = (rel_off / stripe_unit_size + flp->nfsfl_stripe1) %
+ dp->nfsdi_stripecnt;
+ transfer = stripe_unit_size - (rel_off % stripe_unit_size);
+
+ /* Loop around, doing I/O for each stripe unit. */
+ while (len > 0 && error == 0) {
+ stripe_index = nfsfldi_stripeindex(dp, stripe_pos);
+ dspp = nfsfldi_addr(dp, stripe_index);
+ if (len > transfer)
+ xfer = transfer;
+ else
+ xfer = len;
+ if ((flp->nfsfl_util & NFSFLAYUTIL_DENSE) != 0) {
+ /* Dense layout. */
+ if (stripe_pos >= flp->nfsfl_fhcnt)
+ return (EIO);
+ fhp = flp->nfsfl_fh[stripe_pos];
+ io_off = (rel_off / (stripe_unit_size *
+ dp->nfsdi_stripecnt)) * stripe_unit_size +
+ rel_off % stripe_unit_size;
+ } else {
+ /* Sparse layout. */
+ if (flp->nfsfl_fhcnt > 1) {
+ if (stripe_index >= flp->nfsfl_fhcnt)
+ return (EIO);
+ fhp = flp->nfsfl_fh[stripe_index];
+ } else if (flp->nfsfl_fhcnt == 1)
+ fhp = flp->nfsfl_fh[0];
+ else
+ fhp = np->n_fhp;
+ io_off = off;
+ }
+ if ((flp->nfsfl_util & NFSFLAYUTIL_COMMIT_THRU_MDS) != 0)
+ commit_thru_mds = 1;
+ else
+ commit_thru_mds = 0;
+ if (rwflag == FREAD)
+ error = nfsrpc_readds(vp, uiop, stateidp, eofp, *dspp,
+ io_off, xfer, fhp, cred, p);
+ else {
+ error = nfsrpc_writeds(vp, uiop, iomode, must_commit,
+ stateidp, *dspp, io_off, xfer, fhp, commit_thru_mds,
+ cred, p);
+ if (error == 0) {
+ NFSLOCKCLSTATE();
+ lyp->nfsly_flags |= NFSLY_WRITTEN;
+ NFSUNLOCKCLSTATE();
+ }
+ }
+ if (error == 0) {
+ transfer = stripe_unit_size;
+ stripe_pos = (stripe_pos + 1) % dp->nfsdi_stripecnt;
+ len -= xfer;
+ off += xfer;
+ }
+ }
+ return (error);
+}
+
+/*
+ * The actual read RPC done to a DS.
+ */
+static int
+nfsrpc_readds(vnode_t vp, struct uio *uiop, nfsv4stateid_t *stateidp, int *eofp,
+ struct nfsclds *dsp, uint64_t io_off, int len, struct nfsfh *fhp,
+ struct ucred *cred, NFSPROC_T *p)
+{
+ uint32_t *tl;
+ int error, retlen;
+ struct nfsrv_descript nfsd;
+ struct nfsmount *nmp = VFSTONFS(vnode_mount(vp));
+ struct nfsrv_descript *nd = &nfsd;
+ struct nfssockreq *nrp;
+
+ nd->nd_mrep = NULL;
+ nfscl_reqstart(nd, NFSPROC_READDS, nmp, fhp->nfh_fh, fhp->nfh_len,
+ NULL, &dsp->nfsclds_sess);
+ nfsm_stateidtom(nd, stateidp, NFSSTATEID_PUTSEQIDZERO);
+ NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED * 3);
+ txdr_hyper(io_off, tl);
+ *(tl + 2) = txdr_unsigned(len);
+ nrp = dsp->nfsclds_sockp;
+ if (nrp == NULL)
+ /* If NULL, use the MDS socket. */
+ nrp = &nmp->nm_sockreq;
+ error = newnfs_request(nd, nmp, NULL, nrp, vp, p, cred,
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, &dsp->nfsclds_sess);
+ if (error != 0)
+ return (error);
+ if (nd->nd_repstat != 0) {
+ error = nd->nd_repstat;
+ goto nfsmout;
+ }
+ NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED);
+ *eofp = fxdr_unsigned(int, *tl);
+ NFSM_STRSIZ(retlen, len);
+ error = nfsm_mbufuio(nd, uiop, retlen);
+nfsmout:
+ if (nd->nd_mrep != NULL)
+ mbuf_freem(nd->nd_mrep);
+ return (error);
+}
+
+/*
+ * The actual write RPC done to a DS.
+ */
+static int
+nfsrpc_writeds(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit,
+ nfsv4stateid_t *stateidp, struct nfsclds *dsp, uint64_t io_off, int len,
+ struct nfsfh *fhp, int commit_thru_mds, struct ucred *cred, NFSPROC_T *p)
+{
+ uint32_t *tl;
+ struct nfsmount *nmp = VFSTONFS(vnode_mount(vp));
+ int error, rlen, commit, committed = NFSWRITE_FILESYNC;
+ int32_t backup;
+ struct nfsrv_descript nfsd;
+ struct nfsrv_descript *nd = &nfsd;
+ struct nfssockreq *nrp;
+
+ KASSERT(uiop->uio_iovcnt == 1, ("nfs: writerpc iovcnt > 1"));
+ nd->nd_mrep = NULL;
+ nfscl_reqstart(nd, NFSPROC_WRITEDS, nmp, fhp->nfh_fh, fhp->nfh_len,
+ NULL, &dsp->nfsclds_sess);
+ nfsm_stateidtom(nd, stateidp, NFSSTATEID_PUTSEQIDZERO);
+ NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + 2 * NFSX_UNSIGNED);
+ txdr_hyper(io_off, tl);
+ tl += 2;
+ *tl++ = txdr_unsigned(*iomode);
+ *tl = txdr_unsigned(len);
+ nfsm_uiombuf(nd, uiop, len);
+ nrp = dsp->nfsclds_sockp;
+ if (nrp == NULL)
+ /* If NULL, use the MDS socket. */
+ nrp = &nmp->nm_sockreq;
+ error = newnfs_request(nd, nmp, NULL, nrp, vp, p, cred,
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, &dsp->nfsclds_sess);
+ if (error != 0)
+ return (error);
+ if (nd->nd_repstat != 0) {
+ /*
+ * In case the rpc gets retried, roll
+ * the uio fileds changed by nfsm_uiombuf()
+ * back.
+ */
+ uiop->uio_offset -= len;
+ uio_uio_resid_add(uiop, len);
+ uio_iov_base_add(uiop, -len);
+ uio_iov_len_add(uiop, len);
+ error = nd->nd_repstat;
+ } else {
+ NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED + NFSX_VERF);
+ rlen = fxdr_unsigned(int, *tl++);
+ if (rlen == 0) {
+ error = NFSERR_IO;
+ goto nfsmout;
+ } else if (rlen < len) {
+ backup = len - rlen;
+ uio_iov_base_add(uiop, -(backup));
+ uio_iov_len_add(uiop, backup);
+ uiop->uio_offset -= backup;
+ uio_uio_resid_add(uiop, backup);
+ len = rlen;
+ }
+ commit = fxdr_unsigned(int, *tl++);
+
+ /*
+ * Return the lowest committment level
+ * obtained by any of the RPCs.
+ */
+ if (committed == NFSWRITE_FILESYNC)
+ committed = commit;
+ else if (committed == NFSWRITE_DATASYNC &&
+ commit == NFSWRITE_UNSTABLE)
+ committed = commit;
+ if (commit_thru_mds != 0) {
+ NFSLOCKMNT(nmp);
+ if (!NFSHASWRITEVERF(nmp)) {
+ NFSBCOPY(tl, nmp->nm_verf, NFSX_VERF);
+ NFSSETWRITEVERF(nmp);
+ } else if (NFSBCMP(tl, nmp->nm_verf, NFSX_VERF)) {
+ *must_commit = 1;
+ NFSBCOPY(tl, nmp->nm_verf, NFSX_VERF);
+ }
+ NFSUNLOCKMNT(nmp);
+ } else {
+ NFSLOCKDS(dsp);
+ if ((dsp->nfsclds_flags & NFSCLDS_HASWRITEVERF) == 0) {
+ NFSBCOPY(tl, dsp->nfsclds_verf, NFSX_VERF);
+ dsp->nfsclds_flags |= NFSCLDS_HASWRITEVERF;
+ } else if (NFSBCMP(tl, dsp->nfsclds_verf, NFSX_VERF)) {
+ *must_commit = 1;
+ NFSBCOPY(tl, dsp->nfsclds_verf, NFSX_VERF);
+ }
+ NFSUNLOCKDS(dsp);
+ }
+ }
+nfsmout:
+ if (nd->nd_mrep != NULL)
+ mbuf_freem(nd->nd_mrep);
+ *iomode = committed;
+ if (nd->nd_repstat != 0 && error == 0)
+ error = nd->nd_repstat;
+ return (error);
+}
+
+/*
+ * Free up the nfsclds structure.
+ */
+void
+nfscl_freenfsclds(struct nfsclds *dsp)
+{
+ int i;
+
+ if (dsp == NULL)
+ return;
+ if (dsp->nfsclds_sockp != NULL) {
+ NFSFREECRED(dsp->nfsclds_sockp->nr_cred);
+ NFSFREEMUTEX(&dsp->nfsclds_sockp->nr_mtx);
+ free(dsp->nfsclds_sockp->nr_nam, M_SONAME);
+ free(dsp->nfsclds_sockp, M_NFSSOCKREQ);
+ }
+ NFSFREEMUTEX(&dsp->nfsclds_mtx);
+ NFSFREEMUTEX(&dsp->nfsclds_sess.nfsess_mtx);
+ for (i = 0; i < NFSV4_CBSLOTS; i++) {
+ if (dsp->nfsclds_sess.nfsess_cbslots[i].nfssl_reply != NULL)
+ m_freem(
+ dsp->nfsclds_sess.nfsess_cbslots[i].nfssl_reply);
+ }
+ free(dsp, M_NFSCLDS);
+}
+
+static enum nfsclds_state
+nfscl_getsameserver(struct nfsmount *nmp, struct nfsclds *newdsp,
+ struct nfsclds **retdspp)
+{
+ struct nfsclds *dsp, *cur_dsp;
+
+ /*
+ * Search the list of nfsclds structures for one with the same
+ * server.
+ */
+ cur_dsp = NULL;
+ TAILQ_FOREACH(dsp, &nmp->nm_sess, nfsclds_list) {
+ if (dsp->nfsclds_servownlen == newdsp->nfsclds_servownlen &&
+ dsp->nfsclds_servownlen != 0 &&
+ !NFSBCMP(dsp->nfsclds_serverown, newdsp->nfsclds_serverown,
+ dsp->nfsclds_servownlen)) {
+ NFSCL_DEBUG(4, "fnd same fdsp=%p dsp=%p flg=0x%x\n",
+ TAILQ_FIRST(&nmp->nm_sess), dsp,
+ dsp->nfsclds_flags);
+ /* Server major id matches. */
+ if ((dsp->nfsclds_flags & NFSCLDS_DS) != 0) {
+ *retdspp = dsp;
+ return (NFSDSP_USETHISSESSION);
+ }
+
+ /*
+ * Note the first match, so it can be used for
+ * sequence'ing new sessions.
+ */
+ if (cur_dsp == NULL)
+ cur_dsp = dsp;
+ }
+ }
+ if (cur_dsp != NULL) {
+ *retdspp = cur_dsp;
+ return (NFSDSP_SEQTHISSESSION);
+ }
+ return (NFSDSP_NOTFOUND);
+}
+
+#ifdef notyet
+/*
+ * NFS commit rpc to a DS.
+ */
+static int
+nfsrpc_commitds(vnode_t vp, uint64_t offset, int cnt, struct nfsclds *dsp,
+ struct nfsfh *fhp, struct ucred *cred, NFSPROC_T *p, void *stuff)
+{
+ uint32_t *tl;
+ struct nfsrv_descript nfsd, *nd = &nfsd;
+ struct nfsmount *nmp = VFSTONFS(vnode_mount(vp));
+ struct nfssockreq *nrp;
+ int error;
+
+ nfscl_reqstart(nd, NFSPROC_COMMITDS, nmp, fhp->nfh_fh, fhp->nfh_len,
+ NULL, &dsp->nfsclds_sess);
+ NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + NFSX_UNSIGNED);
+ txdr_hyper(offset, tl);
+ tl += 2;
+ *tl = txdr_unsigned(cnt);
+ nrp = dsp->nfsclds_sockp;
+ if (nrp == NULL)
+ /* If NULL, use the MDS socket. */
+ nrp = &nmp->nm_sockreq;
+ error = newnfs_request(nd, nmp, NULL, nrp, vp, p, cred,
+ NFS_PROG, NFS_VER4, NULL, 1, NULL, &dsp->nfsclds_sess);
+ if (error)
+ return (error);
+ if (nd->nd_repstat == 0) {
+ NFSM_DISSECT(tl, u_int32_t *, NFSX_VERF);
+ NFSLOCKDS(dsp);
+ if (NFSBCMP(tl, dsp->nfsclds_verf, NFSX_VERF)) {
+ NFSBCOPY(tl, dsp->nfsclds_verf, NFSX_VERF);
+ error = NFSERR_STALEWRITEVERF;
+ }
+ NFSUNLOCKDS(dsp);
+ }
+nfsmout:
+ if (error == 0 && nd->nd_repstat != 0)
+ error = nd->nd_repstat;
+ mbuf_freem(nd->nd_mrep);
+ return (error);
+}
+#endif
+
diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c
index b54805d..8b5acb9 100644
--- a/sys/fs/nfsclient/nfs_clstate.c
+++ b/sys/fs/nfsclient/nfs_clstate.c
@@ -86,14 +86,18 @@ __FBSDID("$FreeBSD$");
*/
extern struct nfsstats newnfsstats;
extern struct nfsreqhead nfsd_reqq;
+extern u_int32_t newnfs_false, newnfs_true;
+extern int nfscl_debuglevel;
NFSREQSPINLOCK;
NFSCLSTATEMUTEX;
int nfscl_inited = 0;
struct nfsclhead nfsclhead; /* Head of clientid list */
int nfscl_deleghighwater = NFSCLDELEGHIGHWATER;
+int nfscl_layouthighwater = NFSCLLAYOUTHIGHWATER;
#endif /* !APPLEKEXT */
static int nfscl_delegcnt = 0;
+static int nfscl_layoutcnt = 0;
static int nfscl_getopen(struct nfsclownerhead *, u_int8_t *, int, u_int8_t *,
u_int8_t *, u_int32_t, struct nfscllockowner **, struct nfsclopen **);
static void nfscl_clrelease(struct nfsclclient *);
@@ -109,9 +113,16 @@ static int nfscl_updatelock(struct nfscllockowner *, struct nfscllock **,
struct nfscllock **, int);
static void nfscl_delegreturnall(struct nfsclclient *, NFSPROC_T *);
static u_int32_t nfscl_nextcbident(void);
-static mount_t nfscl_getmnt(u_int32_t);
+static mount_t nfscl_getmnt(int, uint8_t *, u_int32_t, struct nfsclclient **);
+static struct nfsclclient *nfscl_getclnt(u_int32_t);
+static struct nfsclclient *nfscl_getclntsess(uint8_t *);
static struct nfscldeleg *nfscl_finddeleg(struct nfsclclient *, u_int8_t *,
int);
+static void nfscl_retoncloselayout(struct nfsclclient *, uint8_t *, int);
+static void nfscl_reldevinfo_locked(struct nfscldevinfo *);
+static struct nfscllayout *nfscl_findlayout(struct nfsclclient *, u_int8_t *,
+ int);
+static struct nfscldevinfo *nfscl_finddevinfo(struct nfsclclient *, uint8_t *);
static int nfscl_checkconflict(struct nfscllockownerhead *, struct nfscllock *,
u_int8_t *, struct nfscllock **);
static void nfscl_freealllocks(struct nfscllockownerhead *, int);
@@ -145,6 +156,15 @@ static int nfscl_trydelegreturn(struct nfscldeleg *, struct ucred *,
struct nfsmount *, NFSPROC_T *);
static void nfscl_emptylockowner(struct nfscllockowner *,
struct nfscllockownerfhhead *);
+static void nfscl_mergeflayouts(struct nfsclflayouthead *,
+ struct nfsclflayouthead *);
+static int nfscl_layoutrecall(int, struct nfscllayout *, uint32_t, uint64_t,
+ uint64_t, uint32_t, struct nfsclrecalllayout *);
+static int nfscl_seq(uint32_t, uint32_t);
+static void nfscl_layoutreturn(struct nfsmount *, struct nfscllayout *,
+ struct ucred *, NFSPROC_T *);
+static void nfscl_dolayoutcommit(struct nfsmount *, struct nfscllayout *,
+ struct ucred *, NFSPROC_T *);
static short nfscberr_null[] = {
0,
@@ -214,7 +234,7 @@ nfscl_open(vnode_t vp, u_int8_t *nfhp, int fhlen, u_int32_t amode, int usedeleg,
if (nfhp != NULL)
MALLOC(nop, struct nfsclopen *, sizeof (struct nfsclopen) +
fhlen - 1, M_NFSCLOPEN, M_WAITOK);
- ret = nfscl_getcl(vp, cred, p, &clp);
+ ret = nfscl_getcl(vnode_mount(vp), cred, p, 1, &clp);
if (ret != 0) {
FREE((caddr_t)nowp, M_NFSCLOWNER);
if (nop != NULL)
@@ -451,7 +471,7 @@ nfscl_finddeleg(struct nfsclclient *clp, u_int8_t *fhp, int fhlen)
*/
APPLESTATIC int
nfscl_getstateid(vnode_t vp, u_int8_t *nfhp, int fhlen, u_int32_t mode,
- struct ucred *cred, NFSPROC_T *p, nfsv4stateid_t *stateidp,
+ int fords, struct ucred *cred, NFSPROC_T *p, nfsv4stateid_t *stateidp,
void **lckpp)
{
struct nfsclclient *clp;
@@ -466,11 +486,14 @@ nfscl_getstateid(vnode_t vp, u_int8_t *nfhp, int fhlen, u_int32_t mode,
*lckpp = NULL;
/*
* Initially, just set the special stateid of all zeros.
+ * (Don't do this for a DS, since the special stateid can't be used.)
*/
- stateidp->seqid = 0;
- stateidp->other[0] = 0;
- stateidp->other[1] = 0;
- stateidp->other[2] = 0;
+ if (fords == 0) {
+ stateidp->seqid = 0;
+ stateidp->other[0] = 0;
+ stateidp->other[1] = 0;
+ stateidp->other[2] = 0;
+ }
if (vnode_vtype(vp) != VREG)
return (EISDIR);
np = VTONFS(vp);
@@ -526,7 +549,8 @@ nfscl_getstateid(vnode_t vp, u_int8_t *nfhp, int fhlen, u_int32_t mode,
lp = NULL;
error = nfscl_getopen(&clp->nfsc_owner, nfhp, fhlen, own, own,
mode, &lp, &op);
- if (error == 0 && lp != NULL) {
+ if (error == 0 && lp != NULL && fords == 0) {
+ /* Don't return a lock stateid for a DS. */
stateidp->seqid =
lp->nfsl_stateid.seqid;
stateidp->other[0] =
@@ -697,21 +721,21 @@ nfscl_openrelease(struct nfsclopen *op, int error, int candelete)
* If the "cred" argument is NULL, a new clientid should not be created.
* If the "p" argument is NULL, a SetClientID/SetClientIDConfirm cannot
* be done.
+ * The start_renewthread argument tells nfscl_getcl() to start a renew
+ * thread if this creates a new clp.
* It always clpp with a reference count on it, unless returning an error.
*/
APPLESTATIC int
-nfscl_getcl(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
- struct nfsclclient **clpp)
+nfscl_getcl(struct mount *mp, struct ucred *cred, NFSPROC_T *p,
+ int start_renewthread, struct nfsclclient **clpp)
{
struct nfsclclient *clp;
struct nfsclclient *newclp = NULL;
- struct mount *mp;
struct nfsmount *nmp;
char uuid[HOSTUUIDLEN];
int igotlock = 0, error, trystalecnt, clidinusedelay, i;
u_int16_t idlen = 0;
- mp = vnode_mount(vp);
nmp = VFSTONFS(mp);
if (cred != NULL) {
getcredhostuuid(cred, uuid, sizeof uuid);
@@ -722,7 +746,7 @@ nfscl_getcl(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
idlen += sizeof (u_int64_t) + 16; /* 16 random bytes */
MALLOC(newclp, struct nfsclclient *,
sizeof (struct nfsclclient) + idlen - 1, M_NFSCLCLIENT,
- M_WAITOK);
+ M_WAITOK | M_ZERO);
}
NFSLOCKCLSTATE();
/*
@@ -743,12 +767,15 @@ nfscl_getcl(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
return (EACCES);
}
clp = newclp;
- NFSBZERO((caddr_t)clp, sizeof(struct nfsclclient) + idlen - 1);
clp->nfsc_idlen = idlen;
LIST_INIT(&clp->nfsc_owner);
TAILQ_INIT(&clp->nfsc_deleg);
+ TAILQ_INIT(&clp->nfsc_layout);
+ LIST_INIT(&clp->nfsc_devinfo);
for (i = 0; i < NFSCLDELEGHASHSIZE; i++)
LIST_INIT(&clp->nfsc_deleghash[i]);
+ for (i = 0; i < NFSCLLAYOUTHASHSIZE; i++)
+ LIST_INIT(&clp->nfsc_layouthash[i]);
clp->nfsc_flags = NFSCLFLAGS_INITED;
clp->nfsc_clientidrev = 1;
clp->nfsc_cbident = nfscl_nextcbident();
@@ -758,11 +785,12 @@ nfscl_getcl(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
nmp->nm_clp = clp;
clp->nfsc_nmp = nmp;
NFSUNLOCKCLSTATE();
- nfscl_start_renewthread(clp);
+ if (start_renewthread != 0)
+ nfscl_start_renewthread(clp);
} else {
NFSUNLOCKCLSTATE();
if (newclp != NULL)
- FREE((caddr_t)newclp, M_NFSCLCLIENT);
+ free(newclp, M_NFSCLCLIENT);
}
NFSLOCKCLSTATE();
while ((clp->nfsc_flags & NFSCLFLAGS_HASCLIENTID) == 0 && !igotlock &&
@@ -818,14 +846,15 @@ nfscl_getcl(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
clidinusedelay = 120;
trystalecnt = 3;
do {
- error = nfsrpc_setclient(VFSTONFS(vnode_mount(vp)),
- clp, cred, p);
+ error = nfsrpc_setclient(nmp, clp, 0, cred, p);
if (error == NFSERR_STALECLIENTID ||
error == NFSERR_STALEDONTRECOVER ||
+ error == NFSERR_BADSESSION ||
error == NFSERR_CLIDINUSE) {
(void) nfs_catnap(PZERO, error, "nfs_setcl");
}
} while (((error == NFSERR_STALECLIENTID ||
+ error == NFSERR_BADSESSION ||
error == NFSERR_STALEDONTRECOVER) && --trystalecnt > 0) ||
(error == NFSERR_CLIDINUSE && --clidinusedelay > 0));
if (error) {
@@ -942,7 +971,7 @@ nfscl_getbytelock(vnode_t vp, u_int64_t off, u_int64_t len,
if (recovery)
clp = rclp;
else
- error = nfscl_getcl(vp, cred, p, &clp);
+ error = nfscl_getcl(vnode_mount(vp), cred, p, 1, &clp);
}
if (error) {
FREE((caddr_t)nlp, M_NFSCLLOCKOWNER);
@@ -1277,7 +1306,7 @@ nfscl_checkwritelocked(vnode_t vp, struct flock *fl,
end = NFS64BITSSET;
}
- error = nfscl_getcl(vp, cred, p, &clp);
+ error = nfscl_getcl(vnode_mount(vp), cred, p, 1, &clp);
if (error)
return (1);
nfscl_filllockowner(id, own, flags);
@@ -1825,19 +1854,24 @@ nfscl_umount(struct nfsmount *nmp, NFSPROC_T *p)
LIST_REMOVE(clp, nfsc_list);
nfscl_delegreturnall(clp, p);
cred = newnfs_getcred();
- (void) nfsrpc_setclient(nmp, clp, cred, p);
+ if (NFSHASNFSV4N(nmp)) {
+ (void)nfsrpc_destroysession(nmp, clp, cred, p);
+ (void)nfsrpc_destroyclient(nmp, clp, cred, p);
+ } else
+ (void)nfsrpc_setclient(nmp, clp, 0, cred, p);
nfscl_cleanclient(clp);
nmp->nm_clp = NULL;
NFSFREECRED(cred);
- FREE((caddr_t)clp, M_NFSCLCLIENT);
+ free(clp, M_NFSCLCLIENT);
} else
NFSUNLOCKCLSTATE();
}
/*
* This function is called when a server replies with NFSERR_STALECLIENTID
- * or NFSERR_STALESTATEID. It traverses the clientid lists, doing Opens
- * and Locks with reclaim. If these fail, it deletes the corresponding state.
+ * NFSERR_STALESTATEID or NFSERR_BADSESSION. It traverses the clientid lists,
+ * doing Opens and Locks with reclaim. If these fail, it deletes the
+ * corresponding state.
*/
static void
nfscl_recover(struct nfsclclient *clp, struct ucred *cred, NFSPROC_T *p)
@@ -1854,7 +1888,8 @@ nfscl_recover(struct nfsclclient *clp, struct ucred *cred, NFSPROC_T *p)
struct nfsreq *rep;
u_int64_t len;
u_int32_t delegtype = NFSV4OPEN_DELEGATEWRITE, mode;
- int igotlock = 0, error, trycnt, firstlock, s;
+ int i, igotlock = 0, error, trycnt, firstlock, s;
+ struct nfscllayout *lyp, *nlyp;
/*
* First, lock the client structure, so everyone else will
@@ -1871,10 +1906,22 @@ nfscl_recover(struct nfsclclient *clp, struct ucred *cred, NFSPROC_T *p)
nmp = clp->nfsc_nmp;
if (nmp == NULL)
panic("nfscl recover");
+
+ /*
+ * For now, just get rid of all layouts. There may be a need
+ * to do LayoutCommit Ops with reclaim == true later.
+ */
+ TAILQ_FOREACH_SAFE(lyp, &clp->nfsc_layout, nfsly_list, nlyp)
+ nfscl_freelayout(lyp);
+ TAILQ_INIT(&clp->nfsc_layout);
+ for (i = 0; i < NFSCLLAYOUTHASHSIZE; i++)
+ LIST_INIT(&clp->nfsc_layouthash[i]);
+
trycnt = 5;
do {
- error = nfsrpc_setclient(nmp, clp, cred, p);
+ error = nfsrpc_setclient(nmp, clp, 1, cred, p);
} while ((error == NFSERR_STALECLIENTID ||
+ error == NFSERR_BADSESSION ||
error == NFSERR_STALEDONTRECOVER) && --trycnt > 0);
if (error) {
nfscl_cleanclient(clp);
@@ -1893,9 +1940,10 @@ nfscl_recover(struct nfsclclient *clp, struct ucred *cred, NFSPROC_T *p)
* Mark requests already queued on the server, so that they don't
* initiate another recovery cycle. Any requests already in the
* queue that handle state information will have the old stale
- * clientid/stateid and will get a NFSERR_STALESTATEID or
- * NFSERR_STALECLIENTID reply from the server. This will be
- * translated to NFSERR_STALEDONTRECOVER when R_DONTRECOVER is set.
+ * clientid/stateid and will get a NFSERR_STALESTATEID,
+ * NFSERR_STALECLIENTID or NFSERR_BADSESSION reply from the server.
+ * This will be translated to NFSERR_STALEDONTRECOVER when
+ * R_DONTRECOVER is set.
*/
s = splsoftclock();
NFSLOCKREQ();
@@ -2136,6 +2184,10 @@ nfscl_recover(struct nfsclclient *clp, struct ucred *cred, NFSPROC_T *p)
FREE((caddr_t)dp, M_NFSCLDELEG);
}
+ /* For NFSv4.1 or later, do a RECLAIM_COMPLETE. */
+ if (NFSHASNFSV4N(nmp))
+ (void)nfsrpc_reclaimcomplete(nmp, cred, p);
+
NFSLOCKCLSTATE();
clp->nfsc_flags &= ~NFSCLFLAGS_RECVRINPROG;
wakeup(&clp->nfsc_flags);
@@ -2190,8 +2242,9 @@ nfscl_hasexpired(struct nfsclclient *clp, u_int32_t clidrev, NFSPROC_T *p)
cred = newnfs_getcred();
trycnt = 5;
do {
- error = nfsrpc_setclient(nmp, clp, cred, p);
+ error = nfsrpc_setclient(nmp, clp, 0, cred, p);
} while ((error == NFSERR_STALECLIENTID ||
+ error == NFSERR_BADSESSION ||
error == NFSERR_STALEDONTRECOVER) && --trycnt > 0);
if (error) {
/*
@@ -2398,6 +2451,11 @@ nfscl_renewthread(struct nfsclclient *clp, NFSPROC_T *p)
static time_t prevsec = 0;
struct nfscllockownerfh *lfhp, *nlfhp;
struct nfscllockownerfhhead lfh;
+ struct nfscllayout *lyp, *nlyp;
+ struct nfscldevinfo *dip, *ndip;
+ struct nfscllayouthead rlh;
+ struct nfsclrecalllayout *recallp;
+ struct nfsclds *dsp;
cred = newnfs_getcred();
NFSLOCKCLSTATE();
@@ -2425,10 +2483,12 @@ nfscl_renewthread(struct nfsclclient *clp, NFSPROC_T *p)
(clp->nfsc_flags & NFSCLFLAGS_HASCLIENTID)) {
clp->nfsc_expire = NFSD_MONOSEC + clp->nfsc_renew;
clidrev = clp->nfsc_clientidrev;
- error = nfsrpc_renew(clp, cred, p);
+ error = nfsrpc_renew(clp,
+ TAILQ_FIRST(&clp->nfsc_nmp->nm_sess), cred, p);
if (error == NFSERR_CBPATHDOWN)
cbpathdown = 1;
- else if (error == NFSERR_STALECLIENTID) {
+ else if (error == NFSERR_STALECLIENTID ||
+ error == NFSERR_BADSESSION) {
NFSLOCKCLSTATE();
clp->nfsc_flags |= NFSCLFLAGS_RECOVER;
NFSUNLOCKCLSTATE();
@@ -2436,6 +2496,25 @@ nfscl_renewthread(struct nfsclclient *clp, NFSPROC_T *p)
(void) nfscl_hasexpired(clp, clidrev, p);
}
+ /* Do renews for any DS sessions. */
+checkdsrenew:
+ NFSLOCKMNT(clp->nfsc_nmp);
+ /* Skip first entry, since the MDS is handled above. */
+ dsp = TAILQ_FIRST(&clp->nfsc_nmp->nm_sess);
+ if (dsp != NULL)
+ dsp = TAILQ_NEXT(dsp, nfsclds_list);
+ while (dsp != NULL) {
+ if (dsp->nfsclds_expire <= NFSD_MONOSEC) {
+ dsp->nfsclds_expire = NFSD_MONOSEC +
+ clp->nfsc_renew;
+ NFSUNLOCKMNT(clp->nfsc_nmp);
+ (void)nfsrpc_renew(clp, dsp, cred, p);
+ goto checkdsrenew;
+ }
+ dsp = TAILQ_NEXT(dsp, nfsclds_list);
+ }
+ NFSUNLOCKMNT(clp->nfsc_nmp);
+
TAILQ_INIT(&dh);
NFSLOCKCLSTATE();
if (cbpathdown)
@@ -2542,8 +2621,90 @@ tryagain:
}
if (igotlock)
nfsv4_unlock(&clp->nfsc_lock, 0);
+
+ /*
+ * Do the recall on any layouts. To avoid trouble, always
+ * come back up here after having slept.
+ */
+ TAILQ_INIT(&rlh);
+tryagain2:
+ TAILQ_FOREACH_SAFE(lyp, &clp->nfsc_layout, nfsly_list, nlyp) {
+ if ((lyp->nfsly_flags & NFSLY_RECALL) != 0) {
+ /*
+ * Wait for outstanding I/O ops to be done.
+ */
+ if (lyp->nfsly_lock.nfslock_usecnt > 0 ||
+ (lyp->nfsly_lock.nfslock_lock &
+ NFSV4LOCK_LOCK) != 0) {
+ lyp->nfsly_lock.nfslock_lock |=
+ NFSV4LOCK_WANTED;
+ (void)nfsmsleep(&lyp->nfsly_lock,
+ NFSCLSTATEMUTEXPTR, PZERO, "nfslyp",
+ NULL);
+ goto tryagain2;
+ }
+ /* Move the layout to the recall list. */
+ TAILQ_REMOVE(&clp->nfsc_layout, lyp,
+ nfsly_list);
+ LIST_REMOVE(lyp, nfsly_hash);
+ TAILQ_INSERT_HEAD(&rlh, lyp, nfsly_list);
+
+ /* Handle any layout commits. */
+ if (!NFSHASNOLAYOUTCOMMIT(clp->nfsc_nmp) &&
+ (lyp->nfsly_flags & NFSLY_WRITTEN) != 0) {
+ lyp->nfsly_flags &= ~NFSLY_WRITTEN;
+ NFSUNLOCKCLSTATE();
+ NFSCL_DEBUG(3, "do layoutcommit\n");
+ nfscl_dolayoutcommit(clp->nfsc_nmp, lyp,
+ cred, p);
+ NFSLOCKCLSTATE();
+ goto tryagain2;
+ }
+ }
+ }
+
+ /* Now, look for stale layouts. */
+ lyp = TAILQ_LAST(&clp->nfsc_layout, nfscllayouthead);
+ while (lyp != NULL) {
+ nlyp = TAILQ_PREV(lyp, nfscllayouthead, nfsly_list);
+ if (lyp->nfsly_timestamp < NFSD_MONOSEC &&
+ (lyp->nfsly_flags & NFSLY_RECALL) == 0 &&
+ lyp->nfsly_lock.nfslock_usecnt == 0 &&
+ lyp->nfsly_lock.nfslock_lock == 0) {
+ NFSCL_DEBUG(4, "ret stale lay=%d\n",
+ nfscl_layoutcnt);
+ recallp = malloc(sizeof(*recallp),
+ M_NFSLAYRECALL, M_NOWAIT);
+ if (recallp == NULL)
+ break;
+ (void)nfscl_layoutrecall(NFSLAYOUTRETURN_FILE,
+ lyp, NFSLAYOUTIOMODE_ANY, 0, UINT64_MAX,
+ lyp->nfsly_stateid.seqid, recallp);
+ }
+ lyp = nlyp;
+ }
+
+ /*
+ * Free up any unreferenced device info structures.
+ */
+ LIST_FOREACH_SAFE(dip, &clp->nfsc_devinfo, nfsdi_list, ndip) {
+ if (dip->nfsdi_layoutrefs == 0 &&
+ dip->nfsdi_refcnt == 0) {
+ NFSCL_DEBUG(4, "freeing devinfo\n");
+ LIST_REMOVE(dip, nfsdi_list);
+ nfscl_freedevinfo(dip);
+ }
+ }
NFSUNLOCKCLSTATE();
+ /* Do layout return(s), as required. */
+ TAILQ_FOREACH_SAFE(lyp, &rlh, nfsly_list, nlyp) {
+ TAILQ_REMOVE(&rlh, lyp, nfsly_list);
+ NFSCL_DEBUG(4, "ret layout\n");
+ nfscl_layoutreturn(clp->nfsc_nmp, lyp, cred, p);
+ nfscl_freelayout(lyp);
+ }
+
/*
* Delegreturn any delegations cleaned out or recalled.
*/
@@ -2599,8 +2760,8 @@ tryagain:
}
/*
- * Initiate state recovery. Called when NFSERR_STALECLIENTID or
- * NFSERR_STALESTATEID is received.
+ * Initiate state recovery. Called when NFSERR_STALECLIENTID,
+ * NFSERR_STALESTATEID or NFSERR_BADSESSION is received.
*/
APPLESTATIC void
nfscl_initiate_recovery(struct nfsclclient *clp)
@@ -2832,7 +2993,7 @@ nfscl_getclose(vnode_t vp, struct nfsclclient **clpp)
struct nfsfh *nfhp;
int error, notdecr;
- error = nfscl_getcl(vp, NULL, NULL, &clp);
+ error = nfscl_getcl(vnode_mount(vp), NULL, NULL, 1, &clp);
if (error)
return (error);
*clpp = clp;
@@ -2906,7 +3067,7 @@ nfscl_doclose(vnode_t vp, struct nfsclclient **clpp, NFSPROC_T *p)
struct nfsfh *nfhp;
int error;
- error = nfscl_getcl(vp, NULL, NULL, &clp);
+ error = nfscl_getcl(vnode_mount(vp), NULL, NULL, 1, &clp);
if (error)
return (error);
*clpp = clp;
@@ -2930,6 +3091,9 @@ nfscl_doclose(vnode_t vp, struct nfsclclient **clpp, NFSPROC_T *p)
}
}
+ /* Return any layouts marked return on close. */
+ nfscl_retoncloselayout(clp, nfhp->nfh_fh, nfhp->nfh_len);
+
/* Now process the opens against the server. */
lookformore:
LIST_FOREACH(owp, &clp->nfsc_owner, nfsow_list) {
@@ -2979,11 +3143,11 @@ nfscl_delegreturnall(struct nfsclclient *clp, NFSPROC_T *p)
APPLESTATIC void
nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p)
{
- int i, op;
+ int clist, gotseq_ok, i, j, k, op, rcalls;
u_int32_t *tl;
struct nfsclclient *clp;
struct nfscldeleg *dp = NULL;
- int numops, taglen = -1, error = 0, trunc, ret = 0;
+ int numops, taglen = -1, error = 0, trunc;
u_int32_t minorvers, retops = 0, *retopsp = NULL, *repp, cbident;
u_char tag[NFSV4_SMALLSTR + 1], *tagstr;
vnode_t vp = NULL;
@@ -2993,7 +3157,16 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p)
mount_t mp;
nfsattrbit_t attrbits, rattrbits;
nfsv4stateid_t stateid;
-
+ uint32_t seqid, slotid = 0, highslot, cachethis;
+ uint8_t sessionid[NFSX_V4SESSIONID];
+ struct mbuf *rep;
+ struct nfscllayout *lyp;
+ uint64_t filesid[2], len, off;
+ int changed, gotone, laytype, recalltype;
+ uint32_t iomode;
+ struct nfsclrecalllayout *recallp = NULL;
+
+ gotseq_ok = 0;
nfsrvd_rephead(nd);
NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
taglen = fxdr_unsigned(int, *tl);
@@ -3019,7 +3192,7 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p)
NFSM_BUILD(retopsp, u_int32_t *, NFSX_UNSIGNED);
NFSM_DISSECT(tl, u_int32_t *, 3 * NFSX_UNSIGNED);
minorvers = fxdr_unsigned(u_int32_t, *tl++);
- if (minorvers != NFSV4_MINORVERSION)
+ if (minorvers != NFSV4_MINORVERSION && minorvers != NFSV41_MINORVERSION)
nd->nd_repstat = NFSERR_MINORVERMISMATCH;
cbident = fxdr_unsigned(u_int32_t, *tl++);
if (nd->nd_repstat)
@@ -3034,73 +3207,85 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p)
NFSM_BUILD(repp, u_int32_t *, 2 * NFSX_UNSIGNED);
*repp++ = *tl;
op = fxdr_unsigned(int, *tl);
- if (op < NFSV4OP_CBGETATTR || op > NFSV4OP_CBRECALL) {
+ if (op < NFSV4OP_CBGETATTR ||
+ (op > NFSV4OP_CBRECALL && minorvers == NFSV4_MINORVERSION) ||
+ (op > NFSV4OP_CBNOTIFYDEVID &&
+ minorvers == NFSV41_MINORVERSION)) {
nd->nd_repstat = NFSERR_OPILLEGAL;
*repp = nfscl_errmap(nd);
retops++;
break;
}
nd->nd_procnum = op;
- newnfsstats.cbrpccnt[nd->nd_procnum]++;
+ if (op < NFSV4OP_CBNOPS)
+ newnfsstats.cbrpccnt[nd->nd_procnum]++;
switch (op) {
case NFSV4OP_CBGETATTR:
- clp = NULL;
+ NFSCL_DEBUG(4, "cbgetattr\n");
+ mp = NULL;
+ vp = NULL;
error = nfsm_getfh(nd, &nfhp);
if (!error)
error = nfsrv_getattrbits(nd, &attrbits,
NULL, NULL);
+ if (error == 0 && i == 0 &&
+ minorvers != NFSV4_MINORVERSION)
+ error = NFSERR_OPNOTINSESS;
if (!error) {
- mp = nfscl_getmnt(cbident);
+ mp = nfscl_getmnt(minorvers, sessionid, cbident,
+ &clp);
if (mp == NULL)
error = NFSERR_SERVERFAULT;
}
if (!error) {
- dp = NULL;
- NFSLOCKCLSTATE();
- clp = nfscl_findcl(VFSTONFS(mp));
- if (clp != NULL)
- dp = nfscl_finddeleg(clp, nfhp->nfh_fh,
- nfhp->nfh_len);
- NFSUNLOCKCLSTATE();
- if (dp == NULL)
- error = NFSERR_SERVERFAULT;
- }
- if (!error) {
- ret = nfscl_ngetreopen(mp, nfhp->nfh_fh,
+ error = nfscl_ngetreopen(mp, nfhp->nfh_fh,
nfhp->nfh_len, p, &np);
- if (!ret)
+ if (!error)
vp = NFSTOV(np);
}
- if (nfhp != NULL)
- FREE((caddr_t)nfhp, M_NFSFH);
if (!error) {
NFSZERO_ATTRBIT(&rattrbits);
- if (NFSISSET_ATTRBIT(&attrbits,
- NFSATTRBIT_SIZE)) {
- if (!ret)
- va.va_size = np->n_size;
- else
- va.va_size = dp->nfsdl_size;
- NFSSETBIT_ATTRBIT(&rattrbits,
- NFSATTRBIT_SIZE);
- }
- if (NFSISSET_ATTRBIT(&attrbits,
- NFSATTRBIT_CHANGE)) {
- va.va_filerev = dp->nfsdl_change;
- if (ret || (np->n_flag & NDELEGMOD))
- va.va_filerev++;
- NFSSETBIT_ATTRBIT(&rattrbits,
- NFSATTRBIT_CHANGE);
- }
+ NFSLOCKCLSTATE();
+ dp = nfscl_finddeleg(clp, nfhp->nfh_fh,
+ nfhp->nfh_len);
+ if (dp != NULL) {
+ if (NFSISSET_ATTRBIT(&attrbits,
+ NFSATTRBIT_SIZE)) {
+ if (vp != NULL)
+ va.va_size = np->n_size;
+ else
+ va.va_size =
+ dp->nfsdl_size;
+ NFSSETBIT_ATTRBIT(&rattrbits,
+ NFSATTRBIT_SIZE);
+ }
+ if (NFSISSET_ATTRBIT(&attrbits,
+ NFSATTRBIT_CHANGE)) {
+ va.va_filerev =
+ dp->nfsdl_change;
+ if (vp == NULL ||
+ (np->n_flag & NDELEGMOD))
+ va.va_filerev++;
+ NFSSETBIT_ATTRBIT(&rattrbits,
+ NFSATTRBIT_CHANGE);
+ }
+ } else
+ error = NFSERR_SERVERFAULT;
+ NFSUNLOCKCLSTATE();
+ }
+ if (vp != NULL)
+ vrele(vp);
+ if (mp != NULL)
+ vfs_unbusy(mp);
+ if (nfhp != NULL)
+ FREE((caddr_t)nfhp, M_NFSFH);
+ if (!error)
(void) nfsv4_fillattr(nd, NULL, NULL, NULL, &va,
NULL, 0, &rattrbits, NULL, NULL, 0, 0, 0, 0,
(uint64_t)0);
- if (!ret)
- vrele(vp);
- }
break;
case NFSV4OP_CBRECALL:
- clp = NULL;
+ NFSCL_DEBUG(4, "cbrecall\n");
NFSM_DISSECT(tl, u_int32_t *, NFSX_STATEID +
NFSX_UNSIGNED);
stateid.seqid = *tl++;
@@ -3109,14 +3294,15 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p)
tl += (NFSX_STATEIDOTHER / NFSX_UNSIGNED);
trunc = fxdr_unsigned(int, *tl);
error = nfsm_getfh(nd, &nfhp);
- if (!error) {
- mp = nfscl_getmnt(cbident);
- if (mp == NULL)
- error = NFSERR_SERVERFAULT;
- }
+ if (error == 0 && i == 0 &&
+ minorvers != NFSV4_MINORVERSION)
+ error = NFSERR_OPNOTINSESS;
if (!error) {
NFSLOCKCLSTATE();
- clp = nfscl_findcl(VFSTONFS(mp));
+ if (minorvers == NFSV4_MINORVERSION)
+ clp = nfscl_getclnt(cbident);
+ else
+ clp = nfscl_getclntsess(sessionid);
if (clp != NULL) {
dp = nfscl_finddeleg(clp, nfhp->nfh_fh,
nfhp->nfh_len);
@@ -3134,6 +3320,195 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p)
if (nfhp != NULL)
FREE((caddr_t)nfhp, M_NFSFH);
break;
+ case NFSV4OP_CBLAYOUTRECALL:
+ NFSCL_DEBUG(4, "cblayrec\n");
+ nfhp = NULL;
+ NFSM_DISSECT(tl, uint32_t *, 4 * NFSX_UNSIGNED);
+ laytype = fxdr_unsigned(int, *tl++);
+ iomode = fxdr_unsigned(uint32_t, *tl++);
+ if (newnfs_true == *tl++)
+ changed = 1;
+ else
+ changed = 0;
+ recalltype = fxdr_unsigned(int, *tl);
+ recallp = malloc(sizeof(*recallp), M_NFSLAYRECALL,
+ M_WAITOK);
+ if (laytype != NFSLAYOUT_NFSV4_1_FILES)
+ error = NFSERR_NOMATCHLAYOUT;
+ else if (recalltype == NFSLAYOUTRETURN_FILE) {
+ error = nfsm_getfh(nd, &nfhp);
+ NFSCL_DEBUG(4, "retfile getfh=%d\n", error);
+ if (error != 0)
+ goto nfsmout;
+ NFSM_DISSECT(tl, u_int32_t *, 2 * NFSX_HYPER +
+ NFSX_STATEID);
+ off = fxdr_hyper(tl); tl += 2;
+ len = fxdr_hyper(tl); tl += 2;
+ stateid.seqid = fxdr_unsigned(uint32_t, *tl++);
+ NFSBCOPY(tl, stateid.other, NFSX_STATEIDOTHER);
+ if (minorvers == NFSV4_MINORVERSION)
+ error = NFSERR_NOTSUPP;
+ else if (i == 0)
+ error = NFSERR_OPNOTINSESS;
+ if (error == 0) {
+ NFSLOCKCLSTATE();
+ clp = nfscl_getclntsess(sessionid);
+ NFSCL_DEBUG(4, "cbly clp=%p\n", clp);
+ if (clp != NULL) {
+ lyp = nfscl_findlayout(clp,
+ nfhp->nfh_fh,
+ nfhp->nfh_len);
+ NFSCL_DEBUG(4, "cblyp=%p\n",
+ lyp);
+ if (lyp != NULL &&
+ (lyp->nfsly_flags &
+ NFSLY_FILES) != 0 &&
+ !NFSBCMP(stateid.other,
+ lyp->nfsly_stateid.other,
+ NFSX_STATEIDOTHER)) {
+ error =
+ nfscl_layoutrecall(
+ recalltype,
+ lyp, iomode, off,
+ len, stateid.seqid,
+ recallp);
+ recallp = NULL;
+ wakeup(clp);
+ NFSCL_DEBUG(4,
+ "aft layrcal=%d\n",
+ error);
+ } else
+ error =
+ NFSERR_NOMATCHLAYOUT;
+ } else
+ error = NFSERR_NOMATCHLAYOUT;
+ NFSUNLOCKCLSTATE();
+ }
+ free(nfhp, M_NFSFH);
+ } else if (recalltype == NFSLAYOUTRETURN_FSID) {
+ NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_HYPER);
+ filesid[0] = fxdr_hyper(tl); tl += 2;
+ filesid[1] = fxdr_hyper(tl); tl += 2;
+ gotone = 0;
+ NFSLOCKCLSTATE();
+ clp = nfscl_getclntsess(sessionid);
+ if (clp != NULL) {
+ TAILQ_FOREACH(lyp, &clp->nfsc_layout,
+ nfsly_list) {
+ if (lyp->nfsly_filesid[0] ==
+ filesid[0] &&
+ lyp->nfsly_filesid[1] ==
+ filesid[1]) {
+ error =
+ nfscl_layoutrecall(
+ recalltype,
+ lyp, iomode, 0,
+ UINT64_MAX,
+ lyp->nfsly_stateid.seqid,
+ recallp);
+ recallp = NULL;
+ gotone = 1;
+ }
+ }
+ if (gotone != 0)
+ wakeup(clp);
+ else
+ error = NFSERR_NOMATCHLAYOUT;
+ } else
+ error = NFSERR_NOMATCHLAYOUT;
+ NFSUNLOCKCLSTATE();
+ } else if (recalltype == NFSLAYOUTRETURN_ALL) {
+ gotone = 0;
+ NFSLOCKCLSTATE();
+ clp = nfscl_getclntsess(sessionid);
+ if (clp != NULL) {
+ TAILQ_FOREACH(lyp, &clp->nfsc_layout,
+ nfsly_list) {
+ error = nfscl_layoutrecall(
+ recalltype, lyp, iomode, 0,
+ UINT64_MAX,
+ lyp->nfsly_stateid.seqid,
+ recallp);
+ recallp = NULL;
+ gotone = 1;
+ }
+ if (gotone != 0)
+ wakeup(clp);
+ else
+ error = NFSERR_NOMATCHLAYOUT;
+ } else
+ error = NFSERR_NOMATCHLAYOUT;
+ NFSUNLOCKCLSTATE();
+ } else
+ error = NFSERR_NOMATCHLAYOUT;
+ if (recallp != NULL) {
+ free(recallp, M_NFSLAYRECALL);
+ recallp = NULL;
+ }
+ break;
+ case NFSV4OP_CBSEQUENCE:
+ NFSM_DISSECT(tl, uint32_t *, NFSX_V4SESSIONID +
+ 5 * NFSX_UNSIGNED);
+ bcopy(tl, sessionid, NFSX_V4SESSIONID);
+ tl += NFSX_V4SESSIONID / NFSX_UNSIGNED;
+ seqid = fxdr_unsigned(uint32_t, *tl++);
+ slotid = fxdr_unsigned(uint32_t, *tl++);
+ highslot = fxdr_unsigned(uint32_t, *tl++);
+ cachethis = *tl++;
+ /* Throw away the referring call stuff. */
+ clist = fxdr_unsigned(int, *tl);
+ for (j = 0; j < clist; j++) {
+ NFSM_DISSECT(tl, uint32_t *, NFSX_V4SESSIONID +
+ NFSX_UNSIGNED);
+ tl += NFSX_V4SESSIONID / NFSX_UNSIGNED;
+ rcalls = fxdr_unsigned(int, *tl);
+ for (k = 0; k < rcalls; k++) {
+ NFSM_DISSECT(tl, uint32_t *,
+ 2 * NFSX_UNSIGNED);
+ }
+ }
+ NFSLOCKCLSTATE();
+ if (i == 0) {
+ clp = nfscl_getclntsess(sessionid);
+ if (clp == NULL)
+ error = NFSERR_SERVERFAULT;
+ } else
+ error = NFSERR_SEQUENCEPOS;
+ if (error == 0)
+ error = nfsv4_seqsession(seqid, slotid,
+ highslot,
+ NFSMNT_MDSSESSION(clp->nfsc_nmp)->
+ nfsess_cbslots, &rep,
+ NFSMNT_MDSSESSION(clp->nfsc_nmp)->
+ nfsess_backslots);
+ NFSUNLOCKCLSTATE();
+ if (error == 0) {
+ gotseq_ok = 1;
+ if (rep != NULL) {
+ NFSCL_DEBUG(4, "Got cbretry\n");
+ m_freem(nd->nd_mreq);
+ nd->nd_mreq = rep;
+ rep = NULL;
+ goto out;
+ }
+ NFSM_BUILD(tl, uint32_t *,
+ NFSX_V4SESSIONID + 4 * NFSX_UNSIGNED);
+ bcopy(sessionid, tl, NFSX_V4SESSIONID);
+ tl += NFSX_V4SESSIONID / NFSX_UNSIGNED;
+ *tl++ = txdr_unsigned(seqid);
+ *tl++ = txdr_unsigned(slotid);
+ *tl++ = txdr_unsigned(NFSV4_CBSLOTS - 1);
+ *tl = txdr_unsigned(NFSV4_CBSLOTS - 1);
+ }
+ break;
+ default:
+ if (i == 0 && minorvers == NFSV41_MINORVERSION)
+ error = NFSERR_OPNOTINSESS;
+ else {
+ NFSCL_DEBUG(1, "unsupp callback %d\n", op);
+ error = NFSERR_NOTSUPP;
+ }
+ break;
};
if (error) {
if (error == EBADRPC || error == NFSERR_BADXDR) {
@@ -3151,6 +3526,8 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p)
*repp = 0; /* NFS4_OK */
}
nfsmout:
+ if (recallp != NULL)
+ free(recallp, M_NFSLAYRECALL);
if (error) {
if (error == EBADRPC || error == NFSERR_BADXDR)
nd->nd_repstat = NFSERR_BADXDR;
@@ -3165,6 +3542,21 @@ nfsmout:
*retopsp = txdr_unsigned(retops);
}
*nd->nd_errp = nfscl_errmap(nd);
+out:
+ if (gotseq_ok != 0) {
+ rep = m_copym(nd->nd_mreq, 0, M_COPYALL, M_WAITOK);
+ NFSLOCKCLSTATE();
+ clp = nfscl_getclntsess(sessionid);
+ if (clp != NULL) {
+ nfsv4_seqsess_cacherep(slotid,
+ NFSMNT_MDSSESSION(clp->nfsc_nmp)->nfsess_cbslots,
+ rep);
+ NFSUNLOCKCLSTATE();
+ } else {
+ NFSUNLOCKCLSTATE();
+ m_freem(rep);
+ }
+ }
}
/*
@@ -3204,26 +3596,68 @@ nfscl_nextcbident(void)
}
/*
- * Get the mount point related to a given cbident.
+ * Get the mount point related to a given cbident or session and busy it.
*/
static mount_t
-nfscl_getmnt(u_int32_t cbident)
+nfscl_getmnt(int minorvers, uint8_t *sessionid, u_int32_t cbident,
+ struct nfsclclient **clpp)
{
struct nfsclclient *clp;
- struct nfsmount *nmp;
+ mount_t mp;
+ int error;
+ *clpp = NULL;
NFSLOCKCLSTATE();
LIST_FOREACH(clp, &nfsclhead, nfsc_list) {
- if (clp->nfsc_cbident == cbident)
+ if (minorvers == NFSV4_MINORVERSION) {
+ if (clp->nfsc_cbident == cbident)
+ break;
+ } else if (!NFSBCMP(NFSMNT_MDSSESSION(clp->nfsc_nmp)->
+ nfsess_sessionid, sessionid, NFSX_V4SESSIONID))
break;
}
if (clp == NULL) {
NFSUNLOCKCLSTATE();
return (NULL);
}
- nmp = clp->nfsc_nmp;
+ mp = clp->nfsc_nmp->nm_mountp;
+ vfs_ref(mp);
NFSUNLOCKCLSTATE();
- return (nmp->nm_mountp);
+ error = vfs_busy(mp, 0);
+ vfs_rel(mp);
+ if (error != 0)
+ return (NULL);
+ *clpp = clp;
+ return (mp);
+}
+
+/*
+ * Get the clientid pointer related to a given cbident.
+ */
+static struct nfsclclient *
+nfscl_getclnt(u_int32_t cbident)
+{
+ struct nfsclclient *clp;
+
+ LIST_FOREACH(clp, &nfsclhead, nfsc_list)
+ if (clp->nfsc_cbident == cbident)
+ break;
+ return (clp);
+}
+
+/*
+ * Get the clientid pointer related to a given sessionid.
+ */
+static struct nfsclclient *
+nfscl_getclntsess(uint8_t *sessionid)
+{
+ struct nfsclclient *clp;
+
+ LIST_FOREACH(clp, &nfsclhead, nfsc_list)
+ if (!NFSBCMP(NFSMNT_MDSSESSION(clp->nfsc_nmp)->nfsess_sessionid,
+ sessionid, NFSX_V4SESSIONID))
+ break;
+ return (clp);
}
/*
@@ -3420,7 +3854,8 @@ nfscl_recalldeleg(struct nfsclclient *clp, struct nfsmount *nmp,
ret = nfscl_moveopen(vp, clp, nmp, lop,
owp, dp, cred, p);
if (ret == NFSERR_STALECLIENTID ||
- ret == NFSERR_STALEDONTRECOVER) {
+ ret == NFSERR_STALEDONTRECOVER ||
+ ret == NFSERR_BADSESSION) {
if (gotvp)
vrele(vp);
return (ret);
@@ -3451,7 +3886,8 @@ nfscl_recalldeleg(struct nfsclclient *clp, struct nfsmount *nmp,
if (ret) {
nfscl_freeopenowner(owp, 0);
if (ret == NFSERR_STALECLIENTID ||
- ret == NFSERR_STALEDONTRECOVER) {
+ ret == NFSERR_STALEDONTRECOVER ||
+ ret == NFSERR_BADSESSION) {
if (gotvp)
vrele(vp);
return (ret);
@@ -3475,7 +3911,8 @@ nfscl_recalldeleg(struct nfsclclient *clp, struct nfsmount *nmp,
ret = nfscl_relock(vp, clp, nmp, lp, lckp, cred, p);
if (ret == NFSERR_STALESTATEID ||
ret == NFSERR_STALEDONTRECOVER ||
- ret == NFSERR_STALECLIENTID) {
+ ret == NFSERR_STALECLIENTID ||
+ ret == NFSERR_BADSESSION) {
if (gotvp)
vrele(vp);
return (ret);
@@ -4223,10 +4660,549 @@ nfscl_errmap(struct nfsrv_descript *nd)
if (nd->nd_repstat == NFSERR_MINORVERMISMATCH ||
nd->nd_repstat == NFSERR_OPILLEGAL)
return (txdr_unsigned(nd->nd_repstat));
- errp = defaulterrp = nfscl_cberrmap[nd->nd_procnum];
+ if (nd->nd_procnum < NFSV4OP_CBNOPS)
+ errp = defaulterrp = nfscl_cberrmap[nd->nd_procnum];
+ else
+ return (txdr_unsigned(nd->nd_repstat));
while (*++errp)
if (*errp == (short)nd->nd_repstat)
return (txdr_unsigned(nd->nd_repstat));
return (txdr_unsigned(*defaulterrp));
}
+/*
+ * Called to find/add a layout to a client.
+ * This function returns the layout with a refcnt (shared lock) upon
+ * success (returns 0) or with no lock/refcnt on the layout when an
+ * error is returned.
+ * If a layout is passed in via lypp, it is locked (exclusively locked).
+ */
+APPLESTATIC int
+nfscl_layout(struct nfsmount *nmp, vnode_t vp, u_int8_t *fhp, int fhlen,
+ nfsv4stateid_t *stateidp, int retonclose,
+ struct nfsclflayouthead *fhlp, struct nfscllayout **lypp,
+ struct ucred *cred, NFSPROC_T *p)
+{
+ struct nfsclclient *clp;
+ struct nfscllayout *lyp, *tlyp;
+ struct nfsclflayout *flp;
+ struct nfsnode *np = VTONFS(vp);
+ mount_t mp;
+ int layout_passed_in;
+
+ mp = nmp->nm_mountp;
+ layout_passed_in = 1;
+ tlyp = NULL;
+ lyp = *lypp;
+ if (lyp == NULL) {
+ layout_passed_in = 0;
+ tlyp = malloc(sizeof(*tlyp) + fhlen - 1, M_NFSLAYOUT,
+ M_WAITOK | M_ZERO);
+ }
+
+ NFSLOCKCLSTATE();
+ clp = nmp->nm_clp;
+ if (clp == NULL) {
+ if (layout_passed_in != 0)
+ nfsv4_unlock(&lyp->nfsly_lock, 0);
+ NFSUNLOCKCLSTATE();
+ if (tlyp != NULL)
+ free(tlyp, M_NFSLAYOUT);
+ return (EPERM);
+ }
+ if (lyp == NULL) {
+ /*
+ * Although no lyp was passed in, another thread might have
+ * allocated one. If one is found, just increment it's ref
+ * count and return it.
+ */
+ lyp = nfscl_findlayout(clp, fhp, fhlen);
+ if (lyp == NULL) {
+ lyp = tlyp;
+ tlyp = NULL;
+ lyp->nfsly_stateid.seqid = stateidp->seqid;
+ lyp->nfsly_stateid.other[0] = stateidp->other[0];
+ lyp->nfsly_stateid.other[1] = stateidp->other[1];
+ lyp->nfsly_stateid.other[2] = stateidp->other[2];
+ lyp->nfsly_lastbyte = 0;
+ LIST_INIT(&lyp->nfsly_flayread);
+ LIST_INIT(&lyp->nfsly_flayrw);
+ LIST_INIT(&lyp->nfsly_recall);
+ lyp->nfsly_filesid[0] = np->n_vattr.na_filesid[0];
+ lyp->nfsly_filesid[1] = np->n_vattr.na_filesid[1];
+ lyp->nfsly_clp = clp;
+ lyp->nfsly_flags = (retonclose != 0) ?
+ (NFSLY_FILES | NFSLY_RETONCLOSE) : NFSLY_FILES;
+ lyp->nfsly_fhlen = fhlen;
+ NFSBCOPY(fhp, lyp->nfsly_fh, fhlen);
+ TAILQ_INSERT_HEAD(&clp->nfsc_layout, lyp, nfsly_list);
+ LIST_INSERT_HEAD(NFSCLLAYOUTHASH(clp, fhp, fhlen), lyp,
+ nfsly_hash);
+ lyp->nfsly_timestamp = NFSD_MONOSEC + 120;
+ nfscl_layoutcnt++;
+ } else {
+ if (retonclose != 0)
+ lyp->nfsly_flags |= NFSLY_RETONCLOSE;
+ TAILQ_REMOVE(&clp->nfsc_layout, lyp, nfsly_list);
+ TAILQ_INSERT_HEAD(&clp->nfsc_layout, lyp, nfsly_list);
+ lyp->nfsly_timestamp = NFSD_MONOSEC + 120;
+ }
+ nfsv4_getref(&lyp->nfsly_lock, NULL, NFSCLSTATEMUTEXPTR, mp);
+ if ((mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) {
+ NFSUNLOCKCLSTATE();
+ if (tlyp != NULL)
+ free(tlyp, M_NFSLAYOUT);
+ return (EPERM);
+ }
+ *lypp = lyp;
+ } else
+ lyp->nfsly_stateid.seqid = stateidp->seqid;
+
+ /* Merge the new list of File Layouts into the list. */
+ flp = LIST_FIRST(fhlp);
+ if (flp != NULL) {
+ if (flp->nfsfl_iomode == NFSLAYOUTIOMODE_READ)
+ nfscl_mergeflayouts(&lyp->nfsly_flayread, fhlp);
+ else
+ nfscl_mergeflayouts(&lyp->nfsly_flayrw, fhlp);
+ }
+ if (layout_passed_in != 0)
+ nfsv4_unlock(&lyp->nfsly_lock, 1);
+ NFSUNLOCKCLSTATE();
+ if (tlyp != NULL)
+ free(tlyp, M_NFSLAYOUT);
+ return (0);
+}
+
+/*
+ * Search for a layout by MDS file handle.
+ * If one is found, it is returned with a refcnt (shared lock) iff
+ * retflpp returned non-NULL and locked (exclusive locked) iff retflpp is
+ * returned NULL.
+ */
+struct nfscllayout *
+nfscl_getlayout(struct nfsclclient *clp, uint8_t *fhp, int fhlen,
+ uint64_t off, struct nfsclflayout **retflpp, int *recalledp)
+{
+ struct nfscllayout *lyp;
+ mount_t mp;
+ int error, igotlock;
+
+ mp = clp->nfsc_nmp->nm_mountp;
+ *recalledp = 0;
+ *retflpp = NULL;
+ NFSLOCKCLSTATE();
+ lyp = nfscl_findlayout(clp, fhp, fhlen);
+ if (lyp != NULL) {
+ if ((lyp->nfsly_flags & NFSLY_RECALL) == 0) {
+ TAILQ_REMOVE(&clp->nfsc_layout, lyp, nfsly_list);
+ TAILQ_INSERT_HEAD(&clp->nfsc_layout, lyp, nfsly_list);
+ lyp->nfsly_timestamp = NFSD_MONOSEC + 120;
+ error = nfscl_findlayoutforio(lyp, off,
+ NFSV4OPEN_ACCESSREAD, retflpp);
+ if (error == 0)
+ nfsv4_getref(&lyp->nfsly_lock, NULL,
+ NFSCLSTATEMUTEXPTR, mp);
+ else {
+ do {
+ igotlock = nfsv4_lock(&lyp->nfsly_lock,
+ 1, NULL, NFSCLSTATEMUTEXPTR, mp);
+ } while (igotlock == 0 &&
+ (mp->mnt_kern_flag & MNTK_UNMOUNTF) == 0);
+ *retflpp = NULL;
+ }
+ if ((mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) {
+ lyp = NULL;
+ *recalledp = 1;
+ }
+ } else {
+ lyp = NULL;
+ *recalledp = 1;
+ }
+ }
+ NFSUNLOCKCLSTATE();
+ return (lyp);
+}
+
+/*
+ * Search for a layout by MDS file handle. If one is found that is marked
+ * "return on close", delete it, since it should now be forgotten.
+ */
+static void
+nfscl_retoncloselayout(struct nfsclclient *clp, uint8_t *fhp, int fhlen)
+{
+ struct nfscllayout *lyp;
+
+tryagain:
+ lyp = nfscl_findlayout(clp, fhp, fhlen);
+ if (lyp != NULL && (lyp->nfsly_flags & NFSLY_RETONCLOSE) != 0) {
+ /*
+ * Wait for outstanding I/O ops to be done.
+ */
+ if (lyp->nfsly_lock.nfslock_usecnt != 0 ||
+ lyp->nfsly_lock.nfslock_lock != 0) {
+ lyp->nfsly_lock.nfslock_lock |= NFSV4LOCK_WANTED;
+ (void)mtx_sleep(&lyp->nfsly_lock,
+ NFSCLSTATEMUTEXPTR, PZERO, "nfslyc", 0);
+ goto tryagain;
+ }
+ nfscl_freelayout(lyp);
+ }
+}
+
+/*
+ * Dereference a layout.
+ */
+void
+nfscl_rellayout(struct nfscllayout *lyp, int exclocked)
+{
+
+ NFSLOCKCLSTATE();
+ if (exclocked != 0)
+ nfsv4_unlock(&lyp->nfsly_lock, 0);
+ else
+ nfsv4_relref(&lyp->nfsly_lock);
+ NFSUNLOCKCLSTATE();
+}
+
+/*
+ * Search for a devinfo by deviceid. If one is found, return it after
+ * acquiring a reference count on it.
+ */
+struct nfscldevinfo *
+nfscl_getdevinfo(struct nfsclclient *clp, uint8_t *deviceid,
+ struct nfscldevinfo *dip)
+{
+
+ NFSLOCKCLSTATE();
+ if (dip == NULL)
+ dip = nfscl_finddevinfo(clp, deviceid);
+ if (dip != NULL)
+ dip->nfsdi_refcnt++;
+ NFSUNLOCKCLSTATE();
+ return (dip);
+}
+
+/*
+ * Dereference a devinfo structure.
+ */
+static void
+nfscl_reldevinfo_locked(struct nfscldevinfo *dip)
+{
+
+ dip->nfsdi_refcnt--;
+ if (dip->nfsdi_refcnt == 0)
+ wakeup(&dip->nfsdi_refcnt);
+}
+
+/*
+ * Dereference a devinfo structure.
+ */
+void
+nfscl_reldevinfo(struct nfscldevinfo *dip)
+{
+
+ NFSLOCKCLSTATE();
+ nfscl_reldevinfo_locked(dip);
+ NFSUNLOCKCLSTATE();
+}
+
+/*
+ * Find a layout for this file handle. Return NULL upon failure.
+ */
+static struct nfscllayout *
+nfscl_findlayout(struct nfsclclient *clp, u_int8_t *fhp, int fhlen)
+{
+ struct nfscllayout *lyp;
+
+ LIST_FOREACH(lyp, NFSCLLAYOUTHASH(clp, fhp, fhlen), nfsly_hash)
+ if (lyp->nfsly_fhlen == fhlen &&
+ !NFSBCMP(lyp->nfsly_fh, fhp, fhlen))
+ break;
+ return (lyp);
+}
+
+/*
+ * Find a devinfo for this deviceid. Return NULL upon failure.
+ */
+static struct nfscldevinfo *
+nfscl_finddevinfo(struct nfsclclient *clp, uint8_t *deviceid)
+{
+ struct nfscldevinfo *dip;
+
+ LIST_FOREACH(dip, &clp->nfsc_devinfo, nfsdi_list)
+ if (NFSBCMP(dip->nfsdi_deviceid, deviceid, NFSX_V4DEVICEID)
+ == 0)
+ break;
+ return (dip);
+}
+
+/*
+ * Merge the new file layout list into the main one, maintaining it in
+ * increasing offset order.
+ */
+static void
+nfscl_mergeflayouts(struct nfsclflayouthead *fhlp,
+ struct nfsclflayouthead *newfhlp)
+{
+ struct nfsclflayout *flp, *nflp, *prevflp, *tflp;
+
+ flp = LIST_FIRST(fhlp);
+ prevflp = NULL;
+ LIST_FOREACH_SAFE(nflp, newfhlp, nfsfl_list, tflp) {
+ while (flp != NULL && flp->nfsfl_off < nflp->nfsfl_off) {
+ prevflp = flp;
+ flp = LIST_NEXT(flp, nfsfl_list);
+ }
+ if (prevflp == NULL)
+ LIST_INSERT_HEAD(fhlp, nflp, nfsfl_list);
+ else
+ LIST_INSERT_AFTER(prevflp, nflp, nfsfl_list);
+ prevflp = nflp;
+ }
+}
+
+/*
+ * Add this nfscldevinfo to the client, if it doesn't already exist.
+ * This function consumes the structure pointed at by dip, if not NULL.
+ */
+APPLESTATIC int
+nfscl_adddevinfo(struct nfsmount *nmp, struct nfscldevinfo *dip,
+ struct nfsclflayout *flp)
+{
+ struct nfsclclient *clp;
+ struct nfscldevinfo *tdip;
+
+ NFSLOCKCLSTATE();
+ clp = nmp->nm_clp;
+ if (clp == NULL) {
+ NFSUNLOCKCLSTATE();
+ if (dip != NULL)
+ free(dip, M_NFSDEVINFO);
+ return (ENODEV);
+ }
+ tdip = nfscl_finddevinfo(clp, flp->nfsfl_dev);
+ if (tdip != NULL) {
+ tdip->nfsdi_layoutrefs++;
+ flp->nfsfl_devp = tdip;
+ nfscl_reldevinfo_locked(tdip);
+ NFSUNLOCKCLSTATE();
+ if (dip != NULL)
+ free(dip, M_NFSDEVINFO);
+ return (0);
+ }
+ if (dip != NULL) {
+ LIST_INSERT_HEAD(&clp->nfsc_devinfo, dip, nfsdi_list);
+ dip->nfsdi_layoutrefs = 1;
+ flp->nfsfl_devp = dip;
+ }
+ NFSUNLOCKCLSTATE();
+ if (dip == NULL)
+ return (ENODEV);
+ return (0);
+}
+
+/*
+ * Free up a layout structure and associated file layout structure(s).
+ */
+APPLESTATIC void
+nfscl_freelayout(struct nfscllayout *layp)
+{
+ struct nfsclflayout *flp, *nflp;
+ struct nfsclrecalllayout *rp, *nrp;
+
+ LIST_FOREACH_SAFE(flp, &layp->nfsly_flayread, nfsfl_list, nflp) {
+ LIST_REMOVE(flp, nfsfl_list);
+ nfscl_freeflayout(flp);
+ }
+ LIST_FOREACH_SAFE(flp, &layp->nfsly_flayrw, nfsfl_list, nflp) {
+ LIST_REMOVE(flp, nfsfl_list);
+ nfscl_freeflayout(flp);
+ }
+ LIST_FOREACH_SAFE(rp, &layp->nfsly_recall, nfsrecly_list, nrp) {
+ LIST_REMOVE(rp, nfsrecly_list);
+ free(rp, M_NFSLAYRECALL);
+ }
+ nfscl_layoutcnt--;
+ free(layp, M_NFSLAYOUT);
+}
+
+/*
+ * Free up a file layout structure.
+ */
+APPLESTATIC void
+nfscl_freeflayout(struct nfsclflayout *flp)
+{
+ int i;
+
+ for (i = 0; i < flp->nfsfl_fhcnt; i++)
+ free(flp->nfsfl_fh[i], M_NFSFH);
+ if (flp->nfsfl_devp != NULL)
+ flp->nfsfl_devp->nfsdi_layoutrefs--;
+ free(flp, M_NFSFLAYOUT);
+}
+
+/*
+ * Free up a file layout devinfo structure.
+ */
+APPLESTATIC void
+nfscl_freedevinfo(struct nfscldevinfo *dip)
+{
+
+ free(dip, M_NFSDEVINFO);
+}
+
+/*
+ * Mark any layouts that match as recalled.
+ */
+static int
+nfscl_layoutrecall(int recalltype, struct nfscllayout *lyp, uint32_t iomode,
+ uint64_t off, uint64_t len, uint32_t stateseqid,
+ struct nfsclrecalllayout *recallp)
+{
+ struct nfsclrecalllayout *rp, *orp;
+
+ recallp->nfsrecly_recalltype = recalltype;
+ recallp->nfsrecly_iomode = iomode;
+ recallp->nfsrecly_stateseqid = stateseqid;
+ recallp->nfsrecly_off = off;
+ recallp->nfsrecly_len = len;
+ /*
+ * Order the list as file returns first, followed by fsid and any
+ * returns, both in increasing stateseqid order.
+ * Note that the seqids wrap around, so 1 is after 0xffffffff.
+ * (I'm not sure this is correct because I find RFC5661 confusing
+ * on this, but hopefully it will work ok.)
+ */
+ orp = NULL;
+ LIST_FOREACH(rp, &lyp->nfsly_recall, nfsrecly_list) {
+ orp = rp;
+ if ((recalltype == NFSLAYOUTRETURN_FILE &&
+ (rp->nfsrecly_recalltype != NFSLAYOUTRETURN_FILE ||
+ nfscl_seq(stateseqid, rp->nfsrecly_stateseqid) != 0)) ||
+ (recalltype != NFSLAYOUTRETURN_FILE &&
+ rp->nfsrecly_recalltype != NFSLAYOUTRETURN_FILE &&
+ nfscl_seq(stateseqid, rp->nfsrecly_stateseqid) != 0)) {
+ LIST_INSERT_BEFORE(rp, recallp, nfsrecly_list);
+ break;
+ }
+ }
+ if (rp == NULL) {
+ if (orp == NULL)
+ LIST_INSERT_HEAD(&lyp->nfsly_recall, recallp,
+ nfsrecly_list);
+ else
+ LIST_INSERT_AFTER(orp, recallp, nfsrecly_list);
+ }
+ lyp->nfsly_flags |= NFSLY_RECALL;
+ return (0);
+}
+
+/*
+ * Compare the two seqids for ordering. The trick is that the seqids can
+ * wrap around from 0xffffffff->0, so check for the cases where one
+ * has wrapped around.
+ * Return 1 if seqid1 comes before seqid2, 0 otherwise.
+ */
+static int
+nfscl_seq(uint32_t seqid1, uint32_t seqid2)
+{
+
+ if (seqid2 > seqid1 && (seqid2 - seqid1) >= 0x7fffffff)
+ /* seqid2 has wrapped around. */
+ return (0);
+ if (seqid1 > seqid2 && (seqid1 - seqid2) >= 0x7fffffff)
+ /* seqid1 has wrapped around. */
+ return (1);
+ if (seqid1 <= seqid2)
+ return (1);
+ return (0);
+}
+
+/*
+ * Do a layout return for each of the recalls.
+ */
+static void
+nfscl_layoutreturn(struct nfsmount *nmp, struct nfscllayout *lyp,
+ struct ucred *cred, NFSPROC_T *p)
+{
+ struct nfsclrecalllayout *rp;
+ nfsv4stateid_t stateid;
+
+ NFSBCOPY(lyp->nfsly_stateid.other, stateid.other, NFSX_STATEIDOTHER);
+ LIST_FOREACH(rp, &lyp->nfsly_recall, nfsrecly_list) {
+ stateid.seqid = rp->nfsrecly_stateseqid;
+ (void)nfsrpc_layoutreturn(nmp, lyp->nfsly_fh,
+ lyp->nfsly_fhlen, 0, NFSLAYOUT_NFSV4_1_FILES,
+ rp->nfsrecly_iomode, rp->nfsrecly_recalltype,
+ rp->nfsrecly_off, rp->nfsrecly_len,
+ &stateid, 0, NULL, cred, p, NULL);
+ }
+}
+
+/*
+ * Do the layout commit for a file layout.
+ */
+static void
+nfscl_dolayoutcommit(struct nfsmount *nmp, struct nfscllayout *lyp,
+ struct ucred *cred, NFSPROC_T *p)
+{
+ int error;
+
+ error = nfsrpc_layoutcommit(nmp, lyp->nfsly_fh, lyp->nfsly_fhlen,
+ 0, 0, 0, lyp->nfsly_lastbyte, &lyp->nfsly_stateid,
+ NFSLAYOUT_NFSV4_1_FILES, 0, NULL, cred, p, NULL);
+ if (error == NFSERR_NOTSUPP) {
+ /* If the server doesn't want it, don't bother doing it. */
+ NFSLOCKMNT(nmp);
+ nmp->nm_state |= NFSSTA_NOLAYOUTCOMMIT;
+ NFSUNLOCKMNT(nmp);
+ }
+}
+
+/*
+ * Commit all layouts for a file (vnode).
+ */
+int
+nfscl_layoutcommit(vnode_t vp, NFSPROC_T *p)
+{
+ struct nfsclclient *clp;
+ struct nfscllayout *lyp;
+ struct nfsnode *np = VTONFS(vp);
+ mount_t mp;
+ struct nfsmount *nmp;
+
+ mp = vnode_mount(vp);
+ nmp = VFSTONFS(mp);
+ if (NFSHASNOLAYOUTCOMMIT(nmp))
+ return (0);
+ NFSLOCKCLSTATE();
+ clp = nmp->nm_clp;
+ if (clp == NULL) {
+ NFSUNLOCKCLSTATE();
+ return (EPERM);
+ }
+ lyp = nfscl_findlayout(clp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len);
+ if (lyp == NULL) {
+ NFSUNLOCKCLSTATE();
+ return (EPERM);
+ }
+ nfsv4_getref(&lyp->nfsly_lock, NULL, NFSCLSTATEMUTEXPTR, mp);
+ if ((mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) {
+ NFSUNLOCKCLSTATE();
+ return (EPERM);
+ }
+tryagain:
+ if ((lyp->nfsly_flags & NFSLY_WRITTEN) != 0) {
+ lyp->nfsly_flags &= ~NFSLY_WRITTEN;
+ NFSUNLOCKCLSTATE();
+ NFSCL_DEBUG(4, "do layoutcommit2\n");
+ nfscl_dolayoutcommit(clp->nfsc_nmp, lyp, NFSPROCCRED(p), p);
+ NFSLOCKCLSTATE();
+ goto tryagain;
+ }
+ nfsv4_relref(&lyp->nfsly_lock);
+ NFSUNLOCKCLSTATE();
+ return (0);
+}
+
diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c
index 41a6b78..83ce3cb 100644
--- a/sys/fs/nfsclient/nfs_clvfsops.c
+++ b/sys/fs/nfsclient/nfs_clvfsops.c
@@ -80,6 +80,8 @@ extern int nfscl_ticks;
extern struct timeval nfsboottime;
extern struct nfsstats newnfsstats;
extern int nfsrv_useacl;
+extern int nfscl_debuglevel;
+NFSCLSTATEMUTEX;
MALLOC_DEFINE(M_NEWNFSREQ, "newnfsclient_req", "New NFS request header");
MALLOC_DEFINE(M_NEWNFSMNT, "newnfsmnt", "New NFS mount struct");
@@ -104,7 +106,7 @@ static void nfs_decode_args(struct mount *mp, struct nfsmount *nmp,
static int mountnfs(struct nfs_args *, struct mount *,
struct sockaddr *, char *, u_char *, int, u_char *, int,
u_char *, int, struct vnode **, struct ucred *,
- struct thread *, int, int);
+ struct thread *, int, int, int);
static void nfs_getnlminfo(struct vnode *, uint8_t *, size_t *,
struct sockaddr_storage *, int *, off_t *,
struct timeval *);
@@ -296,9 +298,11 @@ nfs_statfs(struct mount *mp, struct statfs *sbp)
if (!error)
error = nfsrpc_statfs(vp, &sb, &fs, td->td_ucred, td, &nfsva,
&attrflag, NULL);
+ if (error != 0)
+ NFSCL_DEBUG(2, "statfs=%d\n", error);
if (attrflag == 0) {
ret = nfsrpc_getattrnovp(nmp, nmp->nm_fh, nmp->nm_fhsize, 1,
- td->td_ucred, td, &nfsva, NULL);
+ td->td_ucred, td, &nfsva, NULL, NULL);
if (ret) {
/*
* Just set default values to get things going.
@@ -521,7 +525,7 @@ nfs_mountdiskless(char *path,
nam = sodupsockaddr((struct sockaddr *)sin, M_WAITOK);
if ((error = mountnfs(args, mp, nam, path, NULL, 0, dirpath, dirlen,
NULL, 0, vpp, td->td_ucred, td, NFS_DEFAULT_NAMETIMEO,
- NFS_DEFAULT_NEGNAMETIMEO)) != 0) {
+ NFS_DEFAULT_NEGNAMETIMEO, 0)) != 0) {
printf("nfs_mountroot: mount %s on /: %d\n", path, error);
return (error);
}
@@ -715,8 +719,8 @@ static const char *nfs_opts[] = { "from", "nfs_args",
"readdirsize", "soft", "hard", "mntudp", "tcp", "udp", "wsize", "rsize",
"retrans", "acregmin", "acregmax", "acdirmin", "acdirmax", "resvport",
"readahead", "hostname", "timeout", "addr", "fh", "nfsv3", "sec",
- "principal", "nfsv4", "gssname", "allgssname", "dirpath",
- "nametimeo", "negnametimeo", "nocto", "wcommitsize",
+ "principal", "nfsv4", "gssname", "allgssname", "dirpath", "minorversion",
+ "nametimeo", "negnametimeo", "nocto", "pnfs", "wcommitsize",
NULL };
/*
@@ -763,6 +767,7 @@ nfs_mount(struct mount *mp)
char *opt, *name, *secname;
int nametimeo = NFS_DEFAULT_NAMETIMEO;
int negnametimeo = NFS_DEFAULT_NEGNAMETIMEO;
+ int minvers = 0;
int dirlen, has_nfs_args_opt, krbnamelen, srvkrbnamelen;
size_t hstlen;
@@ -836,6 +841,8 @@ nfs_mount(struct mount *mp)
args.flags |= NFSMNT_ALLGSSNAME;
if (vfs_getopt(mp->mnt_optnew, "nocto", NULL, NULL) == 0)
args.flags |= NFSMNT_NOCTO;
+ if (vfs_getopt(mp->mnt_optnew, "pnfs", NULL, NULL) == 0)
+ args.flags |= NFSMNT_PNFS;
if (vfs_getopt(mp->mnt_optnew, "readdirsize", (void **)&opt, NULL) == 0) {
if (opt == NULL) {
vfs_mount_error(mp, "illegal readdirsize");
@@ -988,6 +995,16 @@ nfs_mount(struct mount *mp)
goto out;
}
}
+ if (vfs_getopt(mp->mnt_optnew, "minorversion", (void **)&opt, NULL) ==
+ 0) {
+ ret = sscanf(opt, "%d", &minvers);
+ if (ret != 1 || minvers < 0 || minvers > 1 ||
+ (args.flags & NFSMNT_NFSV4) == 0) {
+ vfs_mount_error(mp, "illegal minorversion: %s", opt);
+ error = EINVAL;
+ goto out;
+ }
+ }
if (vfs_getopt(mp->mnt_optnew, "sec",
(void **) &secname, NULL) == 0)
nfs_sec_name(secname, &args.flags);
@@ -1132,7 +1149,7 @@ nfs_mount(struct mount *mp)
args.fh = nfh;
error = mountnfs(&args, mp, nam, hst, krbname, krbnamelen, dirpath,
dirlen, srvkrbname, srvkrbnamelen, &vp, td->td_ucred, td,
- nametimeo, negnametimeo);
+ nametimeo, negnametimeo, minvers);
out:
if (!error) {
MNT_ILOCK(mp);
@@ -1176,14 +1193,20 @@ static int
mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
char *hst, u_char *krbname, int krbnamelen, u_char *dirpath, int dirlen,
u_char *srvkrbname, int srvkrbnamelen, struct vnode **vpp,
- struct ucred *cred, struct thread *td, int nametimeo, int negnametimeo)
+ struct ucred *cred, struct thread *td, int nametimeo, int negnametimeo,
+ int minvers)
{
struct nfsmount *nmp;
struct nfsnode *np;
int error, trycnt, ret;
struct nfsvattr nfsva;
+ struct nfsclclient *clp;
+ struct nfsclds *dsp, *tdsp;
+ uint32_t lease;
static u_int64_t clval = 0;
+ NFSCL_DEBUG(3, "in mnt\n");
+ clp = NULL;
if (mp->mnt_flag & MNT_UPDATE) {
nmp = VFSTONFS(mp);
printf("%s: MNT_UPDATE is no longer handled here\n", __func__);
@@ -1259,6 +1282,10 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
nmp->nm_wcommitsize = hibufspace / (desiredvnodes / 1000);
else
nmp->nm_wcommitsize = hibufspace / 10;
+ if ((argp->flags & NFSMNT_NFSV4) != 0)
+ nmp->nm_minorvers = minvers;
+ else
+ nmp->nm_minorvers = 0;
nfs_decode_args(mp, nmp, argp, hst, cred, td);
@@ -1306,17 +1333,18 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
if ((error = newnfs_connect(nmp, &nmp->nm_sockreq, cred, td, 0)))
goto bad;
+ /* For NFSv4.1, get the clientid now. */
+ if (nmp->nm_minorvers > 0) {
+ NFSCL_DEBUG(3, "at getcl\n");
+ error = nfscl_getcl(mp, cred, td, 0, &clp);
+ NFSCL_DEBUG(3, "aft getcl=%d\n", error);
+ if (error != 0)
+ goto bad;
+ }
- /*
- * A reference count is needed on the nfsnode representing the
- * remote root. If this object is not persistent, then backward
- * traversals of the mount point (i.e. "..") will not work if
- * the nfsnode gets flushed out of the cache. Ufs does not have
- * this problem, because one can identify root inodes by their
- * number == ROOTINO (2).
- */
if (nmp->nm_fhsize == 0 && (nmp->nm_flag & NFSMNT_NFSV4) &&
nmp->nm_dirpathlen > 0) {
+ NFSCL_DEBUG(3, "in dirp\n");
/*
* If the fhsize on the mount point == 0 for V4, the mount
* path needs to be looked up.
@@ -1325,6 +1353,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
do {
error = nfsrpc_getdirpath(nmp, NFSMNT_DIRPATH(nmp),
cred, td);
+ NFSCL_DEBUG(3, "aft dirp=%d\n", error);
if (error)
(void) nfs_catnap(PZERO, error, "nfsgetdirp");
} while (error && --trycnt > 0);
@@ -1333,6 +1362,15 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
goto bad;
}
}
+
+ /*
+ * A reference count is needed on the nfsnode representing the
+ * remote root. If this object is not persistent, then backward
+ * traversals of the mount point (i.e. "..") will not work if
+ * the nfsnode gets flushed out of the cache. Ufs does not have
+ * this problem, because one can identify root inodes by their
+ * number == ROOTINO (2).
+ */
if (nmp->nm_fhsize > 0) {
/*
* Set f_iosize to NFS_DIRBLKSIZ so that bo_bsize gets set
@@ -1352,7 +1390,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
* (*vpp)->v_type with the correct value.
*/
ret = nfsrpc_getattrnovp(nmp, nmp->nm_fh, nmp->nm_fhsize, 1,
- cred, td, &nfsva, NULL);
+ cred, td, &nfsva, NULL, &lease);
if (ret) {
/*
* Just set default values to get things going.
@@ -1367,8 +1405,25 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
nfsva.na_vattr.va_gen = 1;
nfsva.na_vattr.va_blocksize = NFS_FABLKSIZE;
nfsva.na_vattr.va_size = 512 * 1024;
+ lease = 60;
}
(void) nfscl_loadattrcache(vpp, &nfsva, NULL, NULL, 0, 1);
+ if (nmp->nm_minorvers > 0) {
+ NFSCL_DEBUG(3, "lease=%d\n", (int)lease);
+ NFSLOCKCLSTATE();
+ clp->nfsc_renew = NFSCL_RENEW(lease);
+ clp->nfsc_expire = NFSD_MONOSEC + clp->nfsc_renew;
+ clp->nfsc_clientidrev++;
+ if (clp->nfsc_clientidrev == 0)
+ clp->nfsc_clientidrev++;
+ NFSUNLOCKCLSTATE();
+ /*
+ * Mount will succeed, so the renew thread can be
+ * started now.
+ */
+ nfscl_start_renewthread(clp);
+ nfscl_clientrelease(clp);
+ }
if (argp->flags & NFSMNT_NFSV3)
ncl_fsinfo(nmp, *vpp, cred, td);
@@ -1390,10 +1445,20 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
error = EIO;
bad:
+ if (clp != NULL)
+ nfscl_clientrelease(clp);
newnfs_disconnect(&nmp->nm_sockreq);
crfree(nmp->nm_sockreq.nr_cred);
mtx_destroy(&nmp->nm_sockreq.nr_mtx);
mtx_destroy(&nmp->nm_mtx);
+ if (nmp->nm_clp != NULL) {
+ NFSLOCKCLSTATE();
+ LIST_REMOVE(nmp->nm_clp, nfsc_list);
+ NFSUNLOCKCLSTATE();
+ free(nmp->nm_clp, M_NFSCLCLIENT);
+ }
+ TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp)
+ nfscl_freenfsclds(dsp);
FREE(nmp, M_NEWNFSMNT);
FREE(nam, M_SONAME);
return (error);
@@ -1408,6 +1473,7 @@ nfs_unmount(struct mount *mp, int mntflags)
struct thread *td;
struct nfsmount *nmp;
int error, flags = 0, trycnt = 0;
+ struct nfsclds *dsp, *tdsp;
td = curthread;
@@ -1448,6 +1514,8 @@ nfs_unmount(struct mount *mp, int mntflags)
mtx_destroy(&nmp->nm_sockreq.nr_mtx);
mtx_destroy(&nmp->nm_mtx);
+ TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp)
+ nfscl_freenfsclds(dsp);
FREE(nmp, M_NEWNFSMNT);
out:
return (error);
@@ -1675,6 +1743,12 @@ void nfscl_retopts(struct nfsmount *nmp, char *buffer, size_t buflen)
blen = buflen;
nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_NFSV4) != 0, "nfsv4", &buf,
&blen);
+ if ((nmp->nm_flag & NFSMNT_NFSV4) != 0) {
+ nfscl_printoptval(nmp, nmp->nm_minorvers, ",minorversion", &buf,
+ &blen);
+ nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_PNFS) != 0, ",pnfs",
+ &buf, &blen);
+ }
nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_NFSV3) != 0, "nfsv3", &buf,
&blen);
nfscl_printopt(nmp, (nmp->nm_flag & (NFSMNT_NFSV3 | NFSMNT_NFSV4)) == 0,
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c
index 12e018c..3a898f2 100644
--- a/sys/fs/nfsclient/nfs_clvnops.c
+++ b/sys/fs/nfsclient/nfs_clvnops.c
@@ -103,6 +103,7 @@ uint32_t nfscl_accesscache_load_done_id;
extern struct nfsstats newnfsstats;
extern int nfsrv_useacl;
+extern int nfscl_debuglevel;
MALLOC_DECLARE(M_NEWNFSREQ);
/*
@@ -606,6 +607,10 @@ nfs_open(struct vop_open_args *ap)
np->n_directio_opens++;
}
+ /* If opened for writing via NFSv4.1 or later, mark that for pNFS. */
+ if (NFSHASPNFS(VFSTONFS(vp->v_mount)) && (fmode & FWRITE) != 0)
+ np->n_flag |= NWRITEOPENED;
+
/*
* If this is an open for writing, capture a reference to the
* credentials, so they can be used by ncl_putpages(). Using
@@ -619,6 +624,7 @@ nfs_open(struct vop_open_args *ap)
} else
cred = NULL;
mtx_unlock(&np->n_mtx);
+
if (cred != NULL)
crfree(cred);
vnode_create_vobject(vp, vattr.va_size, ap->a_td);
@@ -1362,9 +1368,18 @@ ncl_readrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred)
{
int error, ret, attrflag;
struct nfsvattr nfsva;
+ struct nfsmount *nmp;
- error = nfsrpc_read(vp, uiop, cred, uiop->uio_td, &nfsva, &attrflag,
- NULL);
+ nmp = VFSTONFS(vnode_mount(vp));
+ error = EIO;
+ attrflag = 0;
+ if (NFSHASPNFS(nmp))
+ error = nfscl_doiods(vp, uiop, NULL, NULL,
+ NFSV4OPEN_ACCESSREAD, cred, uiop->uio_td);
+ NFSCL_DEBUG(4, "readrpc: aft doiods=%d\n", error);
+ if (error != 0)
+ error = nfsrpc_read(vp, uiop, cred, uiop->uio_td, &nfsva,
+ &attrflag, NULL);
if (attrflag) {
ret = nfscl_loadattrcache(&vp, &nfsva, NULL, NULL, 0, 1);
if (ret && !error)
@@ -1383,10 +1398,20 @@ ncl_writerpc(struct vnode *vp, struct uio *uiop, struct ucred *cred,
int *iomode, int *must_commit, int called_from_strategy)
{
struct nfsvattr nfsva;
- int error = 0, attrflag, ret;
+ int error, attrflag, ret;
+ struct nfsmount *nmp;
- error = nfsrpc_write(vp, uiop, iomode, must_commit, cred,
- uiop->uio_td, &nfsva, &attrflag, NULL, called_from_strategy);
+ nmp = VFSTONFS(vnode_mount(vp));
+ error = EIO;
+ attrflag = 0;
+ if (NFSHASPNFS(nmp))
+ error = nfscl_doiods(vp, uiop, iomode, must_commit,
+ NFSV4OPEN_ACCESSWRITE, cred, uiop->uio_td);
+ NFSCL_DEBUG(4, "writerpc: aft doiods=%d\n", error);
+ if (error != 0)
+ error = nfsrpc_write(vp, uiop, iomode, must_commit, cred,
+ uiop->uio_td, &nfsva, &attrflag, NULL,
+ called_from_strategy);
if (attrflag) {
if (VTONFS(vp)->n_flag & ND_NFSV4)
ret = nfscl_loadattrcache(&vp, &nfsva, NULL, NULL, 1,
@@ -2534,7 +2559,6 @@ ncl_commit(struct vnode *vp, u_quad_t offset, int cnt, struct ucred *cred,
struct nfsvattr nfsva;
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
int error, attrflag;
- u_char verf[NFSX_VERF];
mtx_lock(&nmp->nm_mtx);
if ((nmp->nm_state & NFSSTA_HASWRITEVERF) == 0) {
@@ -2542,21 +2566,13 @@ ncl_commit(struct vnode *vp, u_quad_t offset, int cnt, struct ucred *cred,
return (0);
}
mtx_unlock(&nmp->nm_mtx);
- error = nfsrpc_commit(vp, offset, cnt, cred, td, verf, &nfsva,
+ error = nfsrpc_commit(vp, offset, cnt, cred, td, &nfsva,
&attrflag, NULL);
- if (!error) {
- mtx_lock(&nmp->nm_mtx);
- if (NFSBCMP((caddr_t)nmp->nm_verf, verf, NFSX_VERF)) {
- NFSBCOPY(verf, (caddr_t)nmp->nm_verf, NFSX_VERF);
- error = NFSERR_STALEWRITEVERF;
- }
- mtx_unlock(&nmp->nm_mtx);
- if (!error && attrflag)
- (void) nfscl_loadattrcache(&vp, &nfsva, NULL, NULL,
- 0, 1);
- } else if (NFS_ISV4(vp)) {
+ if (attrflag != 0)
+ (void) nfscl_loadattrcache(&vp, &nfsva, NULL, NULL,
+ 0, 1);
+ if (error != 0 && NFS_ISV4(vp))
error = nfscl_maperr(td, error, (uid_t)0, (gid_t)0);
- }
return (error);
}
@@ -2928,6 +2944,8 @@ loop:
mtx_unlock(&np->n_mtx);
} else
BO_UNLOCK(bo);
+ if (NFSHASPNFS(nmp))
+ nfscl_layoutcommit(vp, td);
mtx_lock(&np->n_mtx);
if (np->n_flag & NWRITEERR) {
error = np->n_error;
diff --git a/sys/fs/nfsclient/nfsmount.h b/sys/fs/nfsclient/nfsmount.h
index 8068c28..f5b56bf 100644
--- a/sys/fs/nfsclient/nfsmount.h
+++ b/sys/fs/nfsclient/nfsmount.h
@@ -70,10 +70,12 @@ struct nfsmount {
int nm_negnametimeo; /* timeout for -ve entries (sec) */
/* Newnfs additions */
+ TAILQ_HEAD(, nfsclds) nm_sess; /* Session(s) for NFSv4.1. */
struct nfsclclient *nm_clp;
uid_t nm_uid; /* Uid for SetClientID etc. */
u_int64_t nm_clval; /* identifies which clientid */
u_int64_t nm_fsid[2]; /* NFSv4 fsid */
+ int nm_minorvers; /* Minor version # for NFSv4 */
u_int16_t nm_krbnamelen; /* Krb5 host principal, if any */
u_int16_t nm_dirpathlen; /* and mount dirpath, for V4 */
u_int16_t nm_srvkrbnamelen; /* and the server's target name */
@@ -107,6 +109,12 @@ struct nfsmount {
*/
#define VFSTONFS(mp) ((struct nfsmount *)((mp)->mnt_data))
+/*
+ * Get a pointer to the MDS session, which is always the first element
+ * in the list.
+ */
+#define NFSMNT_MDSSESSION(m) (&(TAILQ_FIRST(&((m)->nm_sess))->nfsclds_sess))
+
#ifndef NFS_DEFAULT_NAMETIMEO
#define NFS_DEFAULT_NAMETIMEO 60
#endif
diff --git a/sys/fs/nfsclient/nfsnode.h b/sys/fs/nfsclient/nfsnode.h
index 209945a..bbb67d7 100644
--- a/sys/fs/nfsclient/nfsnode.h
+++ b/sys/fs/nfsclient/nfsnode.h
@@ -155,6 +155,8 @@ struct nfsnode {
#define NREMOVEWANT 0x00004000 /* Want notification that remove is done */
#define NLOCK 0x00008000 /* Sleep lock the node */
#define NLOCKWANT 0x00010000 /* Want the sleep lock */
+#define NNOLAYOUT 0x00020000 /* Can't get a layout for this file */
+#define NWRITEOPENED 0x00040000 /* Has been opened for writing */
/*
* Convert between nfsnode pointers and vnode pointers
diff --git a/sys/fs/nfsserver/nfs_nfsdcache.c b/sys/fs/nfsserver/nfs_nfsdcache.c
index 0ee3b02..b979b35 100644
--- a/sys/fs/nfsserver/nfs_nfsdcache.c
+++ b/sys/fs/nfsserver/nfs_nfsdcache.c
@@ -364,7 +364,7 @@ loop:
newnfsstats.srvcache_nonidemdonehits++;
NFSUNLOCKCACHE();
nd->nd_mreq = m_copym(rp->rc_reply, 0,
- M_COPYALL, M_WAIT);
+ M_COPYALL, M_WAITOK);
ret = RC_REPLY;
rp->rc_timestamp = NFSD_MONOSEC +
NFSRVCACHE_UDPTIMEOUT;
@@ -437,7 +437,7 @@ nfsrvd_updatecache(struct nfsrv_descript *nd, struct socket *so)
if (!(rp->rc_flag & RC_REPMBUF))
panic("reply from cache");
nd->nd_mreq = m_copym(rp->rc_reply, 0,
- M_COPYALL, M_WAIT);
+ M_COPYALL, M_WAITOK);
rp->rc_timestamp = NFSD_MONOSEC + NFSRVCACHE_TCPTIMEOUT;
nfsrc_unlock(rp);
goto out;
@@ -473,7 +473,7 @@ nfsrvd_updatecache(struct nfsrv_descript *nd, struct socket *so)
nfsrc_tcpsavedreplies;
}
NFSUNLOCKCACHE();
- m = m_copym(nd->nd_mreq, 0, M_COPYALL, M_WAIT);
+ m = m_copym(nd->nd_mreq, 0, M_COPYALL, M_WAITOK);
NFSLOCKCACHE();
rp->rc_reply = m;
rp->rc_flag |= RC_REPMBUF;
@@ -654,7 +654,7 @@ tryagain:
nfsrc_marksametcpconn(rp->rc_sockref);
ret = RC_REPLY;
nd->nd_mreq = m_copym(rp->rc_reply, 0,
- M_COPYALL, M_WAIT);
+ M_COPYALL, M_WAITOK);
rp->rc_timestamp = NFSD_MONOSEC +
NFSRVCACHE_TCPTIMEOUT;
} else {
diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c
index 1234a4a..f56a292 100644
--- a/sys/fs/nfsserver/nfs_nfsdport.c
+++ b/sys/fs/nfsserver/nfs_nfsdport.c
@@ -565,7 +565,7 @@ nfsvno_readlink(struct vnode *vp, struct ucred *cred, struct thread *p,
i = 0;
while (len < NFS_MAXPATHLEN) {
NFSMGET(mp);
- MCLGET(mp, M_WAIT);
+ MCLGET(mp, M_WAITOK);
mp->m_len = NFSMSIZ(mp);
if (len == 0) {
mp3 = mp2 = mp;
@@ -635,7 +635,7 @@ nfsvno_read(struct vnode *vp, off_t off, int cnt, struct ucred *cred,
i = 0;
while (left > 0) {
NFSMGET(m);
- MCLGET(m, M_WAIT);
+ MCLGET(m, M_WAITOK);
m->m_len = 0;
siz = min(M_TRAILINGSPACE(m), left);
left -= siz;
diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c
index e9962c7..8b2f8b8 100644
--- a/sys/fs/nfsserver/nfs_nfsdstate.c
+++ b/sys/fs/nfsserver/nfs_nfsdstate.c
@@ -3726,7 +3726,7 @@ nfsrv_docallback(struct nfsclient *clp, int procnum,
/*
* Get the first mbuf for the request.
*/
- MGET(m, M_WAIT, MT_DATA);
+ MGET(m, M_WAITOK, MT_DATA);
mbuf_setlen(m, 0);
nd->nd_mreq = nd->nd_mb = m;
nd->nd_bpos = NFSMTOD(m, caddr_t);
@@ -3780,7 +3780,8 @@ nfsrv_docallback(struct nfsclient *clp, int procnum,
newnfs_sndunlock(&clp->lc_req.nr_lock);
if (!error) {
error = newnfs_request(nd, NULL, clp, &clp->lc_req, NULL,
- NULL, cred, clp->lc_program, NFSV4_CBVERS, NULL, 1, NULL);
+ NULL, cred, clp->lc_program, NFSV4_CBVERS, NULL, 1, NULL,
+ NULL);
}
NFSFREECRED(cred);
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c
index 0294887..c6a5da8 100644
--- a/sys/geom/geom_io.c
+++ b/sys/geom/geom_io.c
@@ -567,6 +567,9 @@ g_io_deliver(struct bio *bp, int error)
printf("ENOMEM %p on %p(%s)\n", bp, pp, pp->name);
bp->bio_children = 0;
bp->bio_inbed = 0;
+ bp->bio_driver1 = NULL;
+ bp->bio_driver2 = NULL;
+ bp->bio_pflags = 0;
g_io_request(bp, cp);
pace++;
return;
diff --git a/sys/geom/label/g_label.c b/sys/geom/label/g_label.c
index 0ea8850..66d228a 100644
--- a/sys/geom/label/g_label.c
+++ b/sys/geom/label/g_label.c
@@ -34,8 +34,10 @@ __FBSDID("$FreeBSD$");
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/bio.h>
+#include <sys/ctype.h>
#include <sys/malloc.h>
#include <sys/libkern.h>
+#include <sys/sbuf.h>
#include <sys/sysctl.h>
#include <geom/geom.h>
#include <geom/geom_slice.h>
@@ -138,6 +140,26 @@ g_label_is_name_ok(const char *label)
return (1);
}
+static void
+g_label_mangle_name(char *label, size_t size)
+{
+ struct sbuf *sb;
+ const u_char *c;
+
+ sb = sbuf_new(NULL, NULL, size, SBUF_FIXEDLEN);
+ for (c = label; *c != '\0'; c++) {
+ if (!isprint(*c) || isspace(*c) || *c =='"' || *c == '%')
+ sbuf_printf(sb, "%%%02X", *c);
+ else
+ sbuf_putc(sb, *c);
+ }
+ if (sbuf_finish(sb) != 0)
+ label[0] = '\0';
+ else
+ strlcpy(label, sbuf_data(sb), size);
+ sbuf_delete(sb);
+}
+
static struct g_geom *
g_label_create(struct gctl_req *req, struct g_class *mp, struct g_provider *pp,
const char *label, const char *dir, off_t mediasize)
@@ -323,6 +345,7 @@ g_label_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
continue;
g_topology_unlock();
g_labels[i]->ld_taste(cp, label, sizeof(label));
+ g_label_mangle_name(label, sizeof(label));
g_topology_lock();
if (label[0] == '\0')
continue;
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index c30e1a2..00b1c3f 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -498,7 +498,7 @@ proc0_init(void *dummy __unused)
strncpy(p->p_comm, "kernel", sizeof (p->p_comm));
strncpy(td->td_name, "swapper", sizeof (td->td_name));
- callout_init(&p->p_itcallout, CALLOUT_MPSAFE);
+ callout_init_mtx(&p->p_itcallout, &p->p_mtx, 0);
callout_init_mtx(&p->p_limco, &p->p_mtx, 0);
callout_init(&td->td_slpcallout, CALLOUT_MPSAFE);
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index 288fac5..c04d1da 100644
--- a/sys/kern/kern_conf.c
+++ b/sys/kern/kern_conf.c
@@ -698,6 +698,13 @@ prep_devname(struct cdev *dev, const char *fmt, va_list ap)
;
for (to = dev->si_name; *from != '\0'; from++, to++) {
+ /*
+ * Spaces and double quotation marks cause
+ * problems for the devctl(4) protocol.
+ * Reject names containing those characters.
+ */
+ if (isspace(*from) || *from == '"')
+ return (EINVAL);
/* Treat multiple sequential slashes as single. */
while (from[0] == '/' && from[1] == '/')
from++;
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 1eb18f1..6dae173 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -133,12 +133,26 @@ static int fill_socket_info(struct socket *so, struct kinfo_file *kif);
static int fill_vnode_info(struct vnode *vp, struct kinfo_file *kif);
/*
- * A process is initially started out with NDFILE descriptors stored within
- * this structure, selected to be enough for typical applications based on
- * the historical limit of 20 open files (and the usage of descriptors by
- * shells). If these descriptors are exhausted, a larger descriptor table
- * may be allocated, up to a process' resource limit; the internal arrays
- * are then unused.
+ * Each process has:
+ *
+ * - An array of open file descriptors (fd_ofiles)
+ * - An array of file flags (fd_ofileflags)
+ * - A bitmap recording which descriptors are in use (fd_map)
+ *
+ * A process starts out with NDFILE descriptors. The value of NDFILE has
+ * been selected based the historical limit of 20 open files, and an
+ * assumption that the majority of processes, especially short-lived
+ * processes like shells, will never need more.
+ *
+ * If this initial allocation is exhausted, a larger descriptor table and
+ * map are allocated dynamically, and the pointers in the process's struct
+ * filedesc are updated to point to those. This is repeated every time
+ * the process runs out of file descriptors (provided it hasn't hit its
+ * resource limit).
+ *
+ * Since threads may hold references to individual descriptor table
+ * entries, the tables are never freed. Instead, they are placed on a
+ * linked list and freed only when the struct filedesc is released.
*/
#define NDFILE 20
#define NDSLOTSIZE sizeof(NDSLOTTYPE)
@@ -148,34 +162,23 @@ static int fill_vnode_info(struct vnode *vp, struct kinfo_file *kif);
#define NDSLOTS(x) (((x) + NDENTRIES - 1) / NDENTRIES)
/*
- * Storage required per open file descriptor.
- */
-#define OFILESIZE (sizeof(struct file *) + sizeof(char))
-
-/*
- * Storage to hold unused ofiles that need to be reclaimed.
+ * SLIST entry used to keep track of ofiles which must be reclaimed when
+ * the process exits.
*/
struct freetable {
- struct file **ft_table;
+ struct file **ft_table;
SLIST_ENTRY(freetable) ft_next;
};
/*
- * Basic allocation of descriptors:
- * one of the above, plus arrays for NDFILE descriptors.
+ * Initial allocation: a filedesc structure + the head of SLIST used to
+ * keep track of old ofiles + enough space for NDFILE descriptors.
*/
struct filedesc0 {
- struct filedesc fd_fd;
- /*
- * ofiles which need to be reclaimed on free.
- */
- SLIST_HEAD(,freetable) fd_free;
- /*
- * These arrays are used when the number of open files is
- * <= NDFILE, and are then pointed to by the pointers above.
- */
- struct file *fd_dfiles[NDFILE];
- char fd_dfileflags[NDFILE];
+ struct filedesc fd_fd;
+ SLIST_HEAD(, freetable) fd_free;
+ struct file *fd_dfiles[NDFILE];
+ char fd_dfileflags[NDFILE];
NDSLOTTYPE fd_dmap[NDSLOTS(NDFILE)];
};
@@ -1414,58 +1417,74 @@ static void
fdgrowtable(struct filedesc *fdp, int nfd)
{
struct filedesc0 *fdp0;
- struct freetable *fo;
+ struct freetable *ft;
struct file **ntable;
struct file **otable;
- char *nfileflags;
+ char *nfileflags, *ofileflags;
int nnfiles, onfiles;
- NDSLOTTYPE *nmap;
+ NDSLOTTYPE *nmap, *omap;
FILEDESC_XLOCK_ASSERT(fdp);
KASSERT(fdp->fd_nfiles > 0,
("zero-length file table"));
- /* compute the size of the new table */
+ /* save old values */
onfiles = fdp->fd_nfiles;
+ otable = fdp->fd_ofiles;
+ ofileflags = fdp->fd_ofileflags;
+ omap = fdp->fd_map;
+
+ /* compute the size of the new table */
nnfiles = NDSLOTS(nfd) * NDENTRIES; /* round up */
if (nnfiles <= onfiles)
/* the table is already large enough */
return;
- /* allocate a new table and (if required) new bitmaps */
- ntable = malloc((nnfiles * OFILESIZE) + sizeof(struct freetable),
+ /*
+ * Allocate a new table and map. We need enough space for a) the
+ * file entries themselves, b) the file flags, and c) the struct
+ * freetable we will use when we decommission the table and place
+ * it on the freelist. We place the struct freetable in the
+ * middle so we don't have to worry about padding.
+ */
+ ntable = malloc(nnfiles * sizeof(*ntable) +
+ sizeof(struct freetable) +
+ nnfiles * sizeof(*nfileflags),
+ M_FILEDESC, M_ZERO | M_WAITOK);
+ nfileflags = (char *)&ntable[nnfiles] + sizeof(struct freetable);
+ nmap = malloc(NDSLOTS(nnfiles) * NDSLOTSIZE,
M_FILEDESC, M_ZERO | M_WAITOK);
- nfileflags = (char *)&ntable[nnfiles];
- if (NDSLOTS(nnfiles) > NDSLOTS(onfiles))
- nmap = malloc(NDSLOTS(nnfiles) * NDSLOTSIZE,
- M_FILEDESC, M_ZERO | M_WAITOK);
- else
- nmap = NULL;
- bcopy(fdp->fd_ofiles, ntable, onfiles * sizeof(*ntable));
- bcopy(fdp->fd_ofileflags, nfileflags, onfiles);
- otable = fdp->fd_ofiles;
- fdp->fd_ofileflags = nfileflags;
+ /* copy the old data over and point at the new tables */
+ memcpy(ntable, otable, onfiles * sizeof(*otable));
+ memcpy(nfileflags, ofileflags, onfiles * sizeof(*ofileflags));
+ memcpy(nmap, omap, NDSLOTS(onfiles) * sizeof(*omap));
+
+ /* update the pointers and counters */
+ fdp->fd_nfiles = nnfiles;
fdp->fd_ofiles = ntable;
+ fdp->fd_ofileflags = nfileflags;
+ fdp->fd_map = nmap;
+
/*
- * We must preserve ofiles until the process exits because we can't
- * be certain that no threads have references to the old table via
- * _fget().
+ * Do not free the old file table, as some threads may still
+ * reference entries within it. Instead, place it on a freelist
+ * which will be processed when the struct filedesc is released.
+ *
+ * Do, however, free the old map.
+ *
+ * Note that if onfiles == NDFILE, we're dealing with the original
+ * static allocation contained within (struct filedesc0 *)fdp,
+ * which must not be freed.
*/
if (onfiles > NDFILE) {
- fo = (struct freetable *)&otable[onfiles];
+ ft = (struct freetable *)&otable[onfiles];
fdp0 = (struct filedesc0 *)fdp;
- fo->ft_table = otable;
- SLIST_INSERT_HEAD(&fdp0->fd_free, fo, ft_next);
- }
- if (NDSLOTS(nnfiles) > NDSLOTS(onfiles)) {
- bcopy(fdp->fd_map, nmap, NDSLOTS(onfiles) * sizeof(*nmap));
- if (NDSLOTS(onfiles) > NDSLOTS(NDFILE))
- free(fdp->fd_map, M_FILEDESC);
- fdp->fd_map = nmap;
+ ft->ft_table = otable;
+ SLIST_INSERT_HEAD(&fdp0->fd_free, ft, ft_next);
+ free(omap, M_FILEDESC);
}
- fdp->fd_nfiles = nnfiles;
}
/*
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 5dc43ca..0d2709f 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -150,11 +150,7 @@ sys_vfork(struct thread *td, struct vfork_args *uap)
int error, flags;
struct proc *p2;
-#ifdef XEN
- flags = RFFDG | RFPROC; /* validate that this is still an issue */
-#else
flags = RFFDG | RFPROC | RFPPWAIT | RFMEM;
-#endif
error = fork1(td, flags, 0, &p2, NULL, 0);
if (error == 0) {
td->td_retval[0] = p2->p_pid;
@@ -591,7 +587,7 @@ do_fork(struct thread *td, int flags, struct proc *p2, struct thread *td2,
LIST_INIT(&p2->p_children);
LIST_INIT(&p2->p_orphans);
- callout_init(&p2->p_itcallout, CALLOUT_MPSAFE);
+ callout_init_mtx(&p2->p_itcallout, &p2->p_mtx, 0);
/*
* If PF_FORK is set, the child process inherits the
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
index 2ff64d5..c624283 100644
--- a/sys/kern/kern_jail.c
+++ b/sys/kern/kern_jail.c
@@ -4518,6 +4518,8 @@ prison_racct_detach(struct prison *pr)
sx_assert(&allprison_lock, SA_UNLOCKED);
+ if (pr->pr_prison_racct == NULL)
+ return;
prison_racct_free(pr->pr_prison_racct);
pr->pr_prison_racct = NULL;
}
diff --git a/sys/kern/kern_ktr.c b/sys/kern/kern_ktr.c
index 6498498..a83cedf 100644
--- a/sys/kern/kern_ktr.c
+++ b/sys/kern/kern_ktr.c
@@ -112,7 +112,7 @@ static SYSCTL_NODE(_debug, OID_AUTO, ktr, CTLFLAG_RD, 0, "KTR options");
SYSCTL_INT(_debug_ktr, OID_AUTO, version, CTLFLAG_RD,
&ktr_version, 0, "Version of the KTR interface");
-SYSCTL_INT(_debug_ktr, OID_AUTO, compile, CTLFLAG_RD,
+SYSCTL_UINT(_debug_ktr, OID_AUTO, compile, CTLFLAG_RD,
&ktr_compile, 0, "Bitmask of KTR event classes compiled into the kernel");
static void
@@ -190,8 +190,8 @@ sysctl_debug_ktr_mask(SYSCTL_HANDLER_ARGS)
return (error);
}
-SYSCTL_PROC(_debug_ktr, OID_AUTO, mask, CTLTYPE_INT|CTLFLAG_RW, 0, 0,
- sysctl_debug_ktr_mask, "I",
+SYSCTL_PROC(_debug_ktr, OID_AUTO, mask, CTLTYPE_UINT|CTLFLAG_RW, 0, 0,
+ sysctl_debug_ktr_mask, "IU",
"Bitmask of KTR event classes for which logging is enabled");
static int
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index 8b428bd..98f0156 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -35,6 +35,7 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
+#include <sys/kdb.h>
#include <sys/ktr.h>
#include <sys/lock.h>
#include <sys/lock_profile.h>
@@ -477,7 +478,7 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk,
KASSERT((flags & LK_INTERLOCK) == 0 || ilk != NULL,
("%s: LK_INTERLOCK passed without valid interlock @ %s:%d",
__func__, file, line));
- KASSERT(!TD_IS_IDLETHREAD(curthread),
+ KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
("%s: idle thread %p on lockmgr %s @ %s:%d", __func__, curthread,
lk->lock_object.lo_name, file, line));
@@ -934,9 +935,19 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk,
}
break;
case LK_DOWNGRADE:
- _lockmgr_assert(lk, KA_XLOCKED | KA_NOTRECURSED, file, line);
+ _lockmgr_assert(lk, KA_XLOCKED, file, line);
LOCK_LOG_LOCK("XDOWNGRADE", &lk->lock_object, 0, 0, file, line);
WITNESS_DOWNGRADE(&lk->lock_object, 0, file, line);
+
+ /*
+ * Panic if the lock is recursed.
+ */
+ if (lockmgr_xlocked(lk) && lockmgr_recursed(lk)) {
+ if (flags & LK_INTERLOCK)
+ class->lc_unlock(ilk);
+ panic("%s: downgrade a recursed lockmgr %s @ %s:%d\n",
+ __func__, iwmesg, file, line);
+ }
TD_SLOCKS_INC(curthread);
/*
@@ -1254,7 +1265,14 @@ _lockmgr_disown(struct lock *lk, const char *file, int line)
return;
tid = (uintptr_t)curthread;
- _lockmgr_assert(lk, KA_XLOCKED | KA_NOTRECURSED, file, line);
+ _lockmgr_assert(lk, KA_XLOCKED, file, line);
+
+ /*
+ * Panic if the lock is recursed.
+ */
+ if (lockmgr_xlocked(lk) && lockmgr_recursed(lk))
+ panic("%s: disown a recursed lockmgr @ %s:%d\n",
+ __func__, file, line);
/*
* If the owner is already LK_KERNPROC just skip the whole operation.
diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c
index fe91e3e..3bdfd88 100644
--- a/sys/kern/kern_mbuf.c
+++ b/sys/kern/kern_mbuf.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2004, 2005,
- * Bosko Milekic <bmilekic@FreeBSD.org>. All rights reserved.
+ * Bosko Milekic <bmilekic@FreeBSD.org>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$");
* [ Cluster Zone ] [ Zone ] [ Mbuf Master Zone ]
* | \________ |
* [ Cluster Keg ] \ /
- * | [ Mbuf Keg ]
+ * | [ Mbuf Keg ]
* [ Cluster Slabs ] |
* | [ Mbuf Slabs ]
* \____________(VM)_________________/
@@ -137,8 +137,7 @@ tunable_mbinit(void *dummy)
TUNABLE_INT_FETCH("kern.ipc.nmbufs", &nmbufs);
if (nmbufs < nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16)
nmbufs = lmax(maxmbufmem / MSIZE / 5,
- nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16);
-
+ nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16);
}
SYSINIT(tunable_mbinit, SI_SUB_TUNABLES, SI_ORDER_MIDDLE, tunable_mbinit, NULL);
@@ -148,7 +147,7 @@ sysctl_nmbclusters(SYSCTL_HANDLER_ARGS)
int error, newnmbclusters;
newnmbclusters = nmbclusters;
- error = sysctl_handle_int(oidp, &newnmbclusters, 0, req);
+ error = sysctl_handle_int(oidp, &newnmbclusters, 0, req);
if (error == 0 && req->newptr) {
if (newnmbclusters > nmbclusters &&
nmbufs >= nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16) {
@@ -171,7 +170,7 @@ sysctl_nmbjumbop(SYSCTL_HANDLER_ARGS)
int error, newnmbjumbop;
newnmbjumbop = nmbjumbop;
- error = sysctl_handle_int(oidp, &newnmbjumbop, 0, req);
+ error = sysctl_handle_int(oidp, &newnmbjumbop, 0, req);
if (error == 0 && req->newptr) {
if (newnmbjumbop > nmbjumbop &&
nmbufs >= nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16) {
@@ -185,8 +184,7 @@ sysctl_nmbjumbop(SYSCTL_HANDLER_ARGS)
}
SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbop, CTLTYPE_INT|CTLFLAG_RW,
&nmbjumbop, 0, sysctl_nmbjumbop, "IU",
- "Maximum number of mbuf page size jumbo clusters allowed");
-
+ "Maximum number of mbuf page size jumbo clusters allowed");
static int
sysctl_nmbjumbo9(SYSCTL_HANDLER_ARGS)
@@ -194,7 +192,7 @@ sysctl_nmbjumbo9(SYSCTL_HANDLER_ARGS)
int error, newnmbjumbo9;
newnmbjumbo9 = nmbjumbo9;
- error = sysctl_handle_int(oidp, &newnmbjumbo9, 0, req);
+ error = sysctl_handle_int(oidp, &newnmbjumbo9, 0, req);
if (error == 0 && req->newptr) {
if (newnmbjumbo9 > nmbjumbo9&&
nmbufs >= nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16) {
@@ -208,7 +206,7 @@ sysctl_nmbjumbo9(SYSCTL_HANDLER_ARGS)
}
SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbo9, CTLTYPE_INT|CTLFLAG_RW,
&nmbjumbo9, 0, sysctl_nmbjumbo9, "IU",
- "Maximum number of mbuf 9k jumbo clusters allowed");
+ "Maximum number of mbuf 9k jumbo clusters allowed");
static int
sysctl_nmbjumbo16(SYSCTL_HANDLER_ARGS)
@@ -216,7 +214,7 @@ sysctl_nmbjumbo16(SYSCTL_HANDLER_ARGS)
int error, newnmbjumbo16;
newnmbjumbo16 = nmbjumbo16;
- error = sysctl_handle_int(oidp, &newnmbjumbo16, 0, req);
+ error = sysctl_handle_int(oidp, &newnmbjumbo16, 0, req);
if (error == 0 && req->newptr) {
if (newnmbjumbo16 > nmbjumbo16 &&
nmbufs >= nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16) {
@@ -238,7 +236,7 @@ sysctl_nmbufs(SYSCTL_HANDLER_ARGS)
int error, newnmbufs;
newnmbufs = nmbufs;
- error = sysctl_handle_int(oidp, &newnmbufs, 0, req);
+ error = sysctl_handle_int(oidp, &newnmbufs, 0, req);
if (error == 0 && req->newptr) {
if (newnmbufs > nmbufs) {
nmbufs = newnmbufs;
@@ -254,7 +252,6 @@ SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbuf, CTLTYPE_INT|CTLFLAG_RW,
&nmbufs, 0, sysctl_nmbufs, "IU",
"Maximum number of mbufs allowed");
-
SYSCTL_STRUCT(_kern_ipc, OID_AUTO, mbstat, CTLFLAG_RD, &mbstat, mbstat,
"Mbuf general information and statistics");
@@ -307,10 +304,9 @@ mbuf_init(void *dummy)
NULL, NULL,
#endif
MSIZE - 1, UMA_ZONE_MAXBUCKET);
- if (nmbufs > 0) {
- uma_zone_set_max(zone_mbuf, nmbufs);
- nmbufs = uma_zone_get_max(zone_mbuf);
- }
+ if (nmbufs > 0)
+ nmbufs = uma_zone_set_max(zone_mbuf, nmbufs);
+ uma_zone_set_warning(zone_mbuf, "kern.ipc.nmbufs limit reached");
zone_clust = uma_zcreate(MBUF_CLUSTER_MEM_NAME, MCLBYTES,
mb_ctor_clust, mb_dtor_clust,
@@ -320,10 +316,9 @@ mbuf_init(void *dummy)
NULL, NULL,
#endif
UMA_ALIGN_PTR, UMA_ZONE_REFCNT);
- if (nmbclusters > 0) {
- uma_zone_set_max(zone_clust, nmbclusters);
- nmbclusters = uma_zone_get_max(zone_clust);
- }
+ if (nmbclusters > 0)
+ nmbclusters = uma_zone_set_max(zone_clust, nmbclusters);
+ uma_zone_set_warning(zone_clust, "kern.ipc.nmbclusters limit reached");
zone_pack = uma_zsecond_create(MBUF_PACKET_MEM_NAME, mb_ctor_pack,
mb_dtor_pack, mb_zinit_pack, mb_zfini_pack, zone_mbuf);
@@ -337,10 +332,9 @@ mbuf_init(void *dummy)
NULL, NULL,
#endif
UMA_ALIGN_PTR, UMA_ZONE_REFCNT);
- if (nmbjumbop > 0) {
- uma_zone_set_max(zone_jumbop, nmbjumbop);
- nmbjumbop = uma_zone_get_max(zone_jumbop);
- }
+ if (nmbjumbop > 0)
+ nmbjumbop = uma_zone_set_max(zone_jumbop, nmbjumbop);
+ uma_zone_set_warning(zone_jumbop, "kern.ipc.nmbjumbop limit reached");
zone_jumbo9 = uma_zcreate(MBUF_JUMBO9_MEM_NAME, MJUM9BYTES,
mb_ctor_clust, mb_dtor_clust,
@@ -351,10 +345,9 @@ mbuf_init(void *dummy)
#endif
UMA_ALIGN_PTR, UMA_ZONE_REFCNT);
uma_zone_set_allocf(zone_jumbo9, mbuf_jumbo_alloc);
- if (nmbjumbo9 > 0) {
- uma_zone_set_max(zone_jumbo9, nmbjumbo9);
- nmbjumbo9 = uma_zone_get_max(zone_jumbo9);
- }
+ if (nmbjumbo9 > 0)
+ nmbjumbo9 = uma_zone_set_max(zone_jumbo9, nmbjumbo9);
+ uma_zone_set_warning(zone_jumbo9, "kern.ipc.nmbjumbo9 limit reached");
zone_jumbo16 = uma_zcreate(MBUF_JUMBO16_MEM_NAME, MJUM16BYTES,
mb_ctor_clust, mb_dtor_clust,
@@ -365,10 +358,9 @@ mbuf_init(void *dummy)
#endif
UMA_ALIGN_PTR, UMA_ZONE_REFCNT);
uma_zone_set_allocf(zone_jumbo16, mbuf_jumbo_alloc);
- if (nmbjumbo16 > 0) {
- uma_zone_set_max(zone_jumbo16, nmbjumbo16);
- nmbjumbo16 = uma_zone_get_max(zone_jumbo16);
- }
+ if (nmbjumbo16 > 0)
+ nmbjumbo16 = uma_zone_set_max(zone_jumbo16, nmbjumbo16);
+ uma_zone_set_warning(zone_jumbo16, "kern.ipc.nmbjumbo16 limit reached");
zone_ext_refcnt = uma_zcreate(MBUF_EXTREFCNT_MEM_NAME, sizeof(u_int),
NULL, NULL,
@@ -488,7 +480,7 @@ static void
mb_dtor_mbuf(void *mem, int size, void *arg)
{
struct mbuf *m;
- unsigned long flags;
+ unsigned long flags;
m = (struct mbuf *)mem;
flags = (unsigned long)arg;
diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c
index b0bc5c8..29864a8 100644
--- a/sys/kern/kern_mib.c
+++ b/sys/kern/kern_mib.c
@@ -377,15 +377,8 @@ SYSCTL_PROC(_kern, KERN_SECURELVL, securelevel,
/* Actual kernel configuration options. */
extern char kernconfstring[];
-static int
-sysctl_kern_config(SYSCTL_HANDLER_ARGS)
-{
- return (sysctl_handle_string(oidp, kernconfstring,
- strlen(kernconfstring), req));
-}
-
-SYSCTL_PROC(_kern, OID_AUTO, conftxt, CTLTYPE_STRING|CTLFLAG_RW,
- 0, 0, sysctl_kern_config, "", "Kernel configuration file");
+SYSCTL_STRING(_kern, OID_AUTO, conftxt, CTLFLAG_RD, kernconfstring, 0,
+ "Kernel configuration file");
#endif
static int
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c
index 2f13863..39f461e 100644
--- a/sys/kern/kern_mutex.c
+++ b/sys/kern/kern_mutex.c
@@ -210,7 +210,7 @@ __mtx_lock_flags(volatile uintptr_t *c, int opts, const char *file, int line)
m = mtxlock2mtx(c);
- KASSERT(!TD_IS_IDLETHREAD(curthread),
+ KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
("mtx_lock() by idle thread %p on sleep mutex %s @ %s:%d",
curthread, m->lock_object.lo_name, file, line));
KASSERT(m->mtx_lock != MTX_DESTROYED,
@@ -326,7 +326,7 @@ _mtx_trylock_flags_(volatile uintptr_t *c, int opts, const char *file, int line)
m = mtxlock2mtx(c);
- KASSERT(!TD_IS_IDLETHREAD(curthread),
+ KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
("mtx_trylock() by idle thread %p on sleep mutex %s @ %s:%d",
curthread, m->lock_object.lo_name, file, line));
KASSERT(m->mtx_lock != MTX_DESTROYED,
diff --git a/sys/kern/kern_priv.c b/sys/kern/kern_priv.c
index fd3a95c..2f70c2b 100644
--- a/sys/kern/kern_priv.c
+++ b/sys/kern/kern_priv.c
@@ -59,6 +59,11 @@ SYSCTL_INT(_security_bsd, OID_AUTO, suser_enabled, CTLFLAG_RW,
&suser_enabled, 0, "processes with uid 0 have privilege");
TUNABLE_INT("security.bsd.suser_enabled", &suser_enabled);
+static int unprivileged_mlock = 1;
+SYSCTL_INT(_security_bsd, OID_AUTO, unprivileged_mlock, CTLFLAG_RW|CTLFLAG_TUN,
+ &unprivileged_mlock, 0, "Allow non-root users to call mlock(2)");
+TUNABLE_INT("security.bsd.unprivileged_mlock", &unprivileged_mlock);
+
SDT_PROVIDER_DEFINE(priv);
SDT_PROBE_DEFINE1(priv, kernel, priv_check, priv_ok, priv-ok, "int");
SDT_PROBE_DEFINE1(priv, kernel, priv_check, priv_err, priv-err, "int");
@@ -93,6 +98,19 @@ priv_check_cred(struct ucred *cred, int priv, int flags)
if (error)
goto out;
+ if (unprivileged_mlock) {
+ /*
+ * Allow unprivileged users to call mlock(2)/munlock(2) and
+ * mlockall(2)/munlockall(2).
+ */
+ switch (priv) {
+ case PRIV_VM_MLOCK:
+ case PRIV_VM_MUNLOCK:
+ error = 0;
+ goto out;
+ }
+ }
+
/*
* Having determined if privilege is restricted by various policies,
* now determine if privilege is granted. At this point, any policy
diff --git a/sys/kern/kern_rmlock.c b/sys/kern/kern_rmlock.c
index 30400b1..ebf0f76 100644
--- a/sys/kern/kern_rmlock.c
+++ b/sys/kern/kern_rmlock.c
@@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <sys/kernel.h>
+#include <sys/kdb.h>
#include <sys/ktr.h>
#include <sys/lock.h>
#include <sys/mutex.h>
@@ -494,7 +495,7 @@ void _rm_wlock_debug(struct rmlock *rm, const char *file, int line)
if (SCHEDULER_STOPPED())
return;
- KASSERT(!TD_IS_IDLETHREAD(curthread),
+ KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
("rm_wlock() by idle thread %p on rmlock %s @ %s:%d",
curthread, rm->lock_object.lo_name, file, line));
WITNESS_CHECKORDER(&rm->lock_object, LOP_NEWORDER | LOP_EXCLUSIVE,
@@ -539,7 +540,7 @@ _rm_rlock_debug(struct rmlock *rm, struct rm_priotracker *tracker,
if (SCHEDULER_STOPPED())
return (1);
- KASSERT(!TD_IS_IDLETHREAD(curthread),
+ KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
("rm_rlock() by idle thread %p on rmlock %s @ %s:%d",
curthread, rm->lock_object.lo_name, file, line));
if (!trylock && (rm->lock_object.lo_flags & RM_SLEEPABLE))
diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c
index 60a7faa..38d0654 100644
--- a/sys/kern/kern_rwlock.c
+++ b/sys/kern/kern_rwlock.c
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
#include "opt_no_adaptive_rwlocks.h"
#include <sys/param.h>
+#include <sys/kdb.h>
#include <sys/ktr.h>
#include <sys/kernel.h>
#include <sys/lock.h>
@@ -258,7 +259,7 @@ _rw_wlock_cookie(volatile uintptr_t *c, const char *file, int line)
rw = rwlock2rw(c);
- KASSERT(!TD_IS_IDLETHREAD(curthread),
+ KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
("rw_wlock() by idle thread %p on rwlock %s @ %s:%d",
curthread, rw->lock_object.lo_name, file, line));
KASSERT(rw->rw_lock != RW_DESTROYED,
@@ -282,7 +283,7 @@ __rw_try_wlock(volatile uintptr_t *c, const char *file, int line)
rw = rwlock2rw(c);
- KASSERT(!TD_IS_IDLETHREAD(curthread),
+ KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
("rw_try_wlock() by idle thread %p on rwlock %s @ %s:%d",
curthread, rw->lock_object.lo_name, file, line));
KASSERT(rw->rw_lock != RW_DESTROYED,
@@ -364,7 +365,7 @@ __rw_rlock(volatile uintptr_t *c, const char *file, int line)
rw = rwlock2rw(c);
- KASSERT(!TD_IS_IDLETHREAD(curthread),
+ KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
("rw_rlock() by idle thread %p on rwlock %s @ %s:%d",
curthread, rw->lock_object.lo_name, file, line));
KASSERT(rw->rw_lock != RW_DESTROYED,
@@ -558,7 +559,7 @@ __rw_try_rlock(volatile uintptr_t *c, const char *file, int line)
rw = rwlock2rw(c);
- KASSERT(!TD_IS_IDLETHREAD(curthread),
+ KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
("rw_try_rlock() by idle thread %p on rwlock %s @ %s:%d",
curthread, rw->lock_object.lo_name, file, line));
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index b0e4839..fcbae28 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/kerneldump.h>
#include <sys/kthread.h>
+#include <sys/ktr.h>
#include <sys/malloc.h>
#include <sys/mount.h>
#include <sys/priv.h>
@@ -150,6 +151,7 @@ static void poweroff_wait(void *, int);
static void shutdown_halt(void *junk, int howto);
static void shutdown_panic(void *junk, int howto);
static void shutdown_reset(void *junk, int howto);
+static void vpanic(const char *fmt, va_list ap) __dead2;
/* register various local shutdown events */
static void
@@ -538,6 +540,134 @@ shutdown_reset(void *junk, int howto)
/* NOTREACHED */ /* assuming reset worked */
}
+#if defined(WITNESS) || defined(INVARIANTS)
+static int kassert_warn_only = 0;
+#ifdef KDB
+static int kassert_do_kdb = 0;
+#endif
+#ifdef KTR
+static int kassert_do_ktr = 0;
+#endif
+static int kassert_do_log = 1;
+static int kassert_log_pps_limit = 4;
+static int kassert_log_mute_at = 0;
+static int kassert_log_panic_at = 0;
+static int kassert_warnings = 0;
+
+SYSCTL_NODE(_debug, OID_AUTO, kassert, CTLFLAG_RW, NULL, "kassert options");
+
+SYSCTL_INT(_debug_kassert, OID_AUTO, warn_only, CTLFLAG_RW | CTLFLAG_TUN,
+ &kassert_warn_only, 0,
+ "KASSERT triggers a panic (1) or just a warning (0)");
+TUNABLE_INT("debug.kassert.warn_only", &kassert_warn_only);
+
+#ifdef KDB
+SYSCTL_INT(_debug_kassert, OID_AUTO, do_kdb, CTLFLAG_RW | CTLFLAG_TUN,
+ &kassert_do_kdb, 0, "KASSERT will enter the debugger");
+TUNABLE_INT("debug.kassert.do_kdb", &kassert_do_kdb);
+#endif
+
+#ifdef KTR
+SYSCTL_UINT(_debug_kassert, OID_AUTO, do_ktr, CTLFLAG_RW | CTLFLAG_TUN,
+ &kassert_do_ktr, 0,
+ "KASSERT does a KTR, set this to the KTRMASK you want");
+TUNABLE_INT("debug.kassert.do_ktr", &kassert_do_ktr);
+#endif
+
+SYSCTL_INT(_debug_kassert, OID_AUTO, do_log, CTLFLAG_RW | CTLFLAG_TUN,
+ &kassert_do_log, 0, "KASSERT triggers a panic (1) or just a warning (0)");
+TUNABLE_INT("debug.kassert.do_log", &kassert_do_log);
+
+SYSCTL_INT(_debug_kassert, OID_AUTO, warnings, CTLFLAG_RW | CTLFLAG_TUN,
+ &kassert_warnings, 0, "number of KASSERTs that have been triggered");
+TUNABLE_INT("debug.kassert.warnings", &kassert_warnings);
+
+SYSCTL_INT(_debug_kassert, OID_AUTO, log_panic_at, CTLFLAG_RW | CTLFLAG_TUN,
+ &kassert_log_panic_at, 0, "max number of KASSERTS before we will panic");
+TUNABLE_INT("debug.kassert.log_panic_at", &kassert_log_panic_at);
+
+SYSCTL_INT(_debug_kassert, OID_AUTO, log_pps_limit, CTLFLAG_RW | CTLFLAG_TUN,
+ &kassert_log_pps_limit, 0, "limit number of log messages per second");
+TUNABLE_INT("debug.kassert.log_pps_limit", &kassert_log_pps_limit);
+
+SYSCTL_INT(_debug_kassert, OID_AUTO, log_mute_at, CTLFLAG_RW | CTLFLAG_TUN,
+ &kassert_log_mute_at, 0, "max number of KASSERTS to log");
+TUNABLE_INT("debug.kassert.log_mute_at", &kassert_log_mute_at);
+
+static int kassert_sysctl_kassert(SYSCTL_HANDLER_ARGS);
+
+SYSCTL_PROC(_debug_kassert, OID_AUTO, kassert,
+ CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE, NULL, 0,
+ kassert_sysctl_kassert, "I", "set to trigger a test kassert");
+
+static int
+kassert_sysctl_kassert(SYSCTL_HANDLER_ARGS)
+{
+ int error, i;
+
+ error = sysctl_wire_old_buffer(req, sizeof(int));
+ if (error == 0) {
+ i = 0;
+ error = sysctl_handle_int(oidp, &i, 0, req);
+ }
+ if (error != 0 || req->newptr == NULL)
+ return (error);
+ KASSERT(0, ("kassert_sysctl_kassert triggered kassert %d", i));
+ return (0);
+}
+
+/*
+ * Called by KASSERT, this decides if we will panic
+ * or if we will log via printf and/or ktr.
+ */
+void
+kassert_panic(const char *fmt, ...)
+{
+ static char buf[256];
+ va_list ap;
+
+ va_start(ap, fmt);
+ (void)vsnprintf(buf, sizeof(buf), fmt, ap);
+ va_end(ap);
+
+ /*
+ * panic if we're not just warning, or if we've exceeded
+ * kassert_log_panic_at warnings.
+ */
+ if (!kassert_warn_only ||
+ (kassert_log_panic_at > 0 &&
+ kassert_warnings >= kassert_log_panic_at)) {
+ va_start(ap, fmt);
+ vpanic(fmt, ap);
+ /* NORETURN */
+ }
+#ifdef KTR
+ if (kassert_do_ktr)
+ CTR0(ktr_mask, buf);
+#endif /* KTR */
+ /*
+ * log if we've not yet met the mute limit.
+ */
+ if (kassert_do_log &&
+ (kassert_log_mute_at == 0 ||
+ kassert_warnings < kassert_log_mute_at)) {
+ static struct timeval lasterr;
+ static int curerr;
+
+ if (ppsratecheck(&lasterr, &curerr, kassert_log_pps_limit)) {
+ printf("KASSERT failed: %s\n", buf);
+ kdb_backtrace();
+ }
+ }
+#ifdef KDB
+ if (kassert_do_kdb) {
+ kdb_enter(KDB_WHY_KASSERT, buf);
+ }
+#endif
+ atomic_add_int(&kassert_warnings, 1);
+}
+#endif
+
/*
* Panic is called on unresolvable fatal errors. It prints "panic: mesg",
* and then reboots. If we are called twice, then we avoid trying to sync
@@ -546,12 +676,20 @@ shutdown_reset(void *junk, int howto)
void
panic(const char *fmt, ...)
{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vpanic(fmt, ap);
+}
+
+static void
+vpanic(const char *fmt, va_list ap)
+{
#ifdef SMP
cpuset_t other_cpus;
#endif
struct thread *td = curthread;
int bootopt, newpanic;
- va_list ap;
static char buf[256];
spinlock_enter();
@@ -587,7 +725,6 @@ panic(const char *fmt, ...)
newpanic = 1;
}
- va_start(ap, fmt);
if (newpanic) {
(void)vsnprintf(buf, sizeof(buf), fmt, ap);
panicstr = buf;
@@ -598,7 +735,6 @@ panic(const char *fmt, ...)
vprintf(fmt, ap);
printf("\n");
}
- va_end(ap);
#ifdef SMP
printf("cpuid = %d\n", PCPU_GET(cpuid));
#endif
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 541ea2b..9c52707 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -106,7 +106,6 @@ SDT_PROBE_ARGTYPE(proc, kernel, , signal_discard, 1, "struct proc *");
SDT_PROBE_ARGTYPE(proc, kernel, , signal_discard, 2, "int");
static int coredump(struct thread *);
-static char *expand_name(const char *, uid_t, pid_t, struct thread *, int);
static int killpg1(struct thread *td, int sig, int pgid, int all,
ksiginfo_t *ksi);
static int issignal(struct thread *td, int stop_allowed);
@@ -202,37 +201,37 @@ SYSCTL_INT(_kern, OID_AUTO, nodump_coredump, CTLFLAG_RW, &set_core_nodump_flag,
#define SA_CANTMASK 0x40 /* non-maskable, catchable */
static int sigproptbl[NSIG] = {
- SA_KILL, /* SIGHUP */
- SA_KILL, /* SIGINT */
- SA_KILL|SA_CORE, /* SIGQUIT */
- SA_KILL|SA_CORE, /* SIGILL */
- SA_KILL|SA_CORE, /* SIGTRAP */
- SA_KILL|SA_CORE, /* SIGABRT */
- SA_KILL|SA_CORE, /* SIGEMT */
- SA_KILL|SA_CORE, /* SIGFPE */
- SA_KILL, /* SIGKILL */
- SA_KILL|SA_CORE, /* SIGBUS */
- SA_KILL|SA_CORE, /* SIGSEGV */
- SA_KILL|SA_CORE, /* SIGSYS */
- SA_KILL, /* SIGPIPE */
- SA_KILL, /* SIGALRM */
- SA_KILL, /* SIGTERM */
- SA_IGNORE, /* SIGURG */
- SA_STOP, /* SIGSTOP */
- SA_STOP|SA_TTYSTOP, /* SIGTSTP */
- SA_IGNORE|SA_CONT, /* SIGCONT */
- SA_IGNORE, /* SIGCHLD */
- SA_STOP|SA_TTYSTOP, /* SIGTTIN */
- SA_STOP|SA_TTYSTOP, /* SIGTTOU */
- SA_IGNORE, /* SIGIO */
- SA_KILL, /* SIGXCPU */
- SA_KILL, /* SIGXFSZ */
- SA_KILL, /* SIGVTALRM */
- SA_KILL, /* SIGPROF */
- SA_IGNORE, /* SIGWINCH */
- SA_IGNORE, /* SIGINFO */
- SA_KILL, /* SIGUSR1 */
- SA_KILL, /* SIGUSR2 */
+ SA_KILL, /* SIGHUP */
+ SA_KILL, /* SIGINT */
+ SA_KILL|SA_CORE, /* SIGQUIT */
+ SA_KILL|SA_CORE, /* SIGILL */
+ SA_KILL|SA_CORE, /* SIGTRAP */
+ SA_KILL|SA_CORE, /* SIGABRT */
+ SA_KILL|SA_CORE, /* SIGEMT */
+ SA_KILL|SA_CORE, /* SIGFPE */
+ SA_KILL, /* SIGKILL */
+ SA_KILL|SA_CORE, /* SIGBUS */
+ SA_KILL|SA_CORE, /* SIGSEGV */
+ SA_KILL|SA_CORE, /* SIGSYS */
+ SA_KILL, /* SIGPIPE */
+ SA_KILL, /* SIGALRM */
+ SA_KILL, /* SIGTERM */
+ SA_IGNORE, /* SIGURG */
+ SA_STOP, /* SIGSTOP */
+ SA_STOP|SA_TTYSTOP, /* SIGTSTP */
+ SA_IGNORE|SA_CONT, /* SIGCONT */
+ SA_IGNORE, /* SIGCHLD */
+ SA_STOP|SA_TTYSTOP, /* SIGTTIN */
+ SA_STOP|SA_TTYSTOP, /* SIGTTOU */
+ SA_IGNORE, /* SIGIO */
+ SA_KILL, /* SIGXCPU */
+ SA_KILL, /* SIGXFSZ */
+ SA_KILL, /* SIGVTALRM */
+ SA_KILL, /* SIGPROF */
+ SA_IGNORE, /* SIGWINCH */
+ SA_IGNORE, /* SIGINFO */
+ SA_KILL, /* SIGUSR1 */
+ SA_KILL, /* SIGUSR2 */
};
static void reschedule_signals(struct proc *p, sigset_t block, int flags);
@@ -3018,11 +3017,11 @@ SYSCTL_PROC(_debug, OID_AUTO, ncores, CTLTYPE_INT|CTLFLAG_RW,
#if defined(COMPRESS_USER_CORES)
int compress_user_cores = 1;
SYSCTL_INT(_kern, OID_AUTO, compress_user_cores, CTLFLAG_RW,
- &compress_user_cores, 0, "");
+ &compress_user_cores, 0, "Compression of user corefiles");
int compress_user_cores_gzlevel = -1; /* default level */
SYSCTL_INT(_kern, OID_AUTO, compress_user_cores_gzlevel, CTLFLAG_RW,
- &compress_user_cores_gzlevel, -1, "user core gz compression level");
+ &compress_user_cores_gzlevel, -1, "Corefile gzip compression level");
#define GZ_SUFFIX ".gz"
#define GZ_SUFFIX_LEN 3
@@ -3031,11 +3030,12 @@ SYSCTL_INT(_kern, OID_AUTO, compress_user_cores_gzlevel, CTLFLAG_RW,
static char corefilename[MAXPATHLEN] = {"%N.core"};
TUNABLE_STR("kern.corefile", corefilename, sizeof(corefilename));
SYSCTL_STRING(_kern, OID_AUTO, corefile, CTLFLAG_RW, corefilename,
- sizeof(corefilename), "process corefile name format string");
+ sizeof(corefilename), "Process corefile name format string");
/*
- * expand_name(name, uid, pid, td, compress)
- * Expand the name described in corefilename, using name, uid, and pid.
+ * corefile_open(comm, uid, pid, td, compress, vpp, namep)
+ * Expand the name described in corefilename, using name, uid, and pid
+ * and open/create core file.
* corefilename is a printf-like string, with three format specifiers:
* %N name of process ("name")
* %P process id (pid)
@@ -3044,25 +3044,22 @@ SYSCTL_STRING(_kern, OID_AUTO, corefile, CTLFLAG_RW, corefilename,
* by using "/dev/null", or all core files can be stored in "/cores/%U/%N-%P".
* This is controlled by the sysctl variable kern.corefile (see above).
*/
-static char *
-expand_name(const char *name, uid_t uid, pid_t pid, struct thread *td,
- int compress)
+static int
+corefile_open(const char *comm, uid_t uid, pid_t pid, struct thread *td,
+ int compress, struct vnode **vpp, char **namep)
{
+ struct nameidata nd;
struct sbuf sb;
const char *format;
- char *temp;
- size_t i;
- int indexpos;
- char *hostname;
+ char *hostname, *name;
+ int indexpos, i, error, cmode, flags, oflags;
hostname = NULL;
format = corefilename;
- temp = malloc(MAXPATHLEN, M_TEMP, M_NOWAIT | M_ZERO);
- if (temp == NULL)
- return (NULL);
+ name = malloc(MAXPATHLEN, M_TEMP, M_WAITOK | M_ZERO);
indexpos = -1;
- (void)sbuf_new(&sb, temp, MAXPATHLEN, SBUF_FIXEDLEN);
- for (i = 0; format[i]; i++) {
+ (void)sbuf_new(&sb, name, MAXPATHLEN, SBUF_FIXEDLEN);
+ for (i = 0; format[i] != '\0'; i++) {
switch (format[i]) {
case '%': /* Format character */
i++;
@@ -3073,27 +3070,18 @@ expand_name(const char *name, uid_t uid, pid_t pid, struct thread *td,
case 'H': /* hostname */
if (hostname == NULL) {
hostname = malloc(MAXHOSTNAMELEN,
- M_TEMP, M_NOWAIT);
- if (hostname == NULL) {
- log(LOG_ERR,
- "pid %ld (%s), uid (%lu): "
- "unable to alloc memory "
- "for corefile hostname\n",
- (long)pid, name,
- (u_long)uid);
- goto nomem;
- }
- }
+ M_TEMP, M_WAITOK);
+ }
getcredhostname(td->td_ucred, hostname,
MAXHOSTNAMELEN);
sbuf_printf(&sb, "%s", hostname);
break;
- case 'I': /* autoincrementing index */
+ case 'I': /* autoincrementing index */
sbuf_printf(&sb, "0");
indexpos = sbuf_len(&sb) - 1;
break;
case 'N': /* process name */
- sbuf_printf(&sb, "%s", name);
+ sbuf_printf(&sb, "%s", comm);
break;
case 'P': /* process id */
sbuf_printf(&sb, "%u", pid);
@@ -3105,6 +3093,7 @@ expand_name(const char *name, uid_t uid, pid_t pid, struct thread *td,
log(LOG_ERR,
"Unknown format character %c in "
"corename `%s'\n", format[i], format);
+ break;
}
break;
default:
@@ -3113,21 +3102,22 @@ expand_name(const char *name, uid_t uid, pid_t pid, struct thread *td,
}
free(hostname, M_TEMP);
#ifdef COMPRESS_USER_CORES
- if (compress) {
+ if (compress)
sbuf_printf(&sb, GZ_SUFFIX);
- }
#endif
if (sbuf_error(&sb) != 0) {
log(LOG_ERR, "pid %ld (%s), uid (%lu): corename is too "
- "long\n", (long)pid, name, (u_long)uid);
-nomem:
+ "long\n", (long)pid, comm, (u_long)uid);
sbuf_delete(&sb);
- free(temp, M_TEMP);
- return (NULL);
+ free(name, M_TEMP);
+ return (ENOMEM);
}
sbuf_finish(&sb);
sbuf_delete(&sb);
+ cmode = S_IRUSR | S_IWUSR;
+ oflags = VN_OPEN_NOAUDIT | (capmode_coredump ? VN_OPEN_NOCAPCHECK : 0);
+
/*
* If the core format has a %I in it, then we need to check
* for existing corefiles before returning a name.
@@ -3135,19 +3125,10 @@ nomem:
* non-existing core file name to use.
*/
if (indexpos != -1) {
- struct nameidata nd;
- int error, n;
- int flags = O_CREAT | O_EXCL | FWRITE | O_NOFOLLOW;
- int cmode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP;
- int oflags = 0;
-
- if (capmode_coredump)
- oflags = VN_OPEN_NOCAPCHECK;
-
- for (n = 0; n < num_cores; n++) {
- temp[indexpos] = '0' + n;
- NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE,
- temp, td);
+ for (i = 0; i < num_cores; i++) {
+ flags = O_CREAT | O_EXCL | FWRITE | O_NOFOLLOW;
+ name[indexpos] = '0' + i;
+ NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, td);
error = vn_open_cred(&nd, &flags, cmode, oflags,
td->td_ucred, NULL);
if (error) {
@@ -3155,27 +3136,28 @@ nomem:
continue;
log(LOG_ERR,
"pid %d (%s), uid (%u): Path `%s' failed "
- "on initial open test, error = %d\n",
- pid, name, uid, temp, error);
- free(temp, M_TEMP);
- return (NULL);
- }
- NDFREE(&nd, NDF_ONLY_PNBUF);
- VOP_UNLOCK(nd.ni_vp, 0);
- error = vn_close(nd.ni_vp, FWRITE, td->td_ucred, td);
- if (error) {
- log(LOG_ERR,
- "pid %d (%s), uid (%u): Path `%s' failed "
- "on close after initial open test, "
- "error = %d\n",
- pid, name, uid, temp, error);
- free(temp, M_TEMP);
- return (NULL);
+ "on initial open test, error = %d\n",
+ pid, comm, uid, name, error);
}
- break;
+ goto out;
}
}
- return (temp);
+
+ flags = O_CREAT | FWRITE | O_NOFOLLOW;
+ NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, td);
+ error = vn_open_cred(&nd, &flags, cmode, oflags, td->td_ucred, NULL);
+out:
+ if (error) {
+#ifdef AUDIT
+ audit_proc_coredump(td, name, error);
+#endif
+ free(name, M_TEMP);
+ return (error);
+ }
+ NDFREE(&nd, NDF_ONLY_PNBUF);
+ *vpp = nd.ni_vp;
+ *namep = name;
+ return (0);
}
/*
@@ -3190,12 +3172,11 @@ static int
coredump(struct thread *td)
{
struct proc *p = td->td_proc;
- register struct vnode *vp;
- register struct ucred *cred = td->td_ucred;
+ struct ucred *cred = td->td_ucred;
+ struct vnode *vp;
struct flock lf;
- struct nameidata nd;
struct vattr vattr;
- int error, error1, flags, locked;
+ int error, error1, locked;
struct mount *mp;
char *name; /* name of corefile */
off_t limit;
@@ -3210,22 +3191,8 @@ coredump(struct thread *td)
MPASS((p->p_flag & P_HADTHREADS) == 0 || p->p_singlethread == td);
_STOPEVENT(p, S_CORE, 0);
- name = expand_name(p->p_comm, td->td_ucred->cr_uid, p->p_pid, td,
- compress);
- if (name == NULL) {
- PROC_UNLOCK(p);
-#ifdef AUDIT
- audit_proc_coredump(td, NULL, EINVAL);
-#endif
- return (EINVAL);
- }
- if (((sugid_coredump == 0) && p->p_flag & P_SUGID) ||
- do_coredump == 0) {
+ if (!do_coredump || (!sugid_coredump && (p->p_flag & P_SUGID) != 0)) {
PROC_UNLOCK(p);
-#ifdef AUDIT
- audit_proc_coredump(td, name, EFAULT);
-#endif
- free(name, M_TEMP);
return (EFAULT);
}
@@ -3240,33 +3207,19 @@ coredump(struct thread *td)
limit = (off_t)lim_cur(p, RLIMIT_CORE);
if (limit == 0 || racct_get_available(p, RACCT_CORE) == 0) {
PROC_UNLOCK(p);
-#ifdef AUDIT
- audit_proc_coredump(td, name, EFBIG);
-#endif
- free(name, M_TEMP);
return (EFBIG);
}
PROC_UNLOCK(p);
restart:
- NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, td);
- flags = O_CREAT | FWRITE | O_NOFOLLOW;
- error = vn_open_cred(&nd, &flags, S_IRUSR | S_IWUSR,
- VN_OPEN_NOAUDIT | (capmode_coredump ? VN_OPEN_NOCAPCHECK : 0),
- cred, NULL);
- if (error) {
-#ifdef AUDIT
- audit_proc_coredump(td, name, error);
-#endif
- free(name, M_TEMP);
+ error = corefile_open(p->p_comm, cred->cr_uid, p->p_pid, td, compress,
+ &vp, &name);
+ if (error != 0)
return (error);
- }
- NDFREE(&nd, NDF_ONLY_PNBUF);
- vp = nd.ni_vp;
/* Don't dump to non-regular files or files with links. */
- if (vp->v_type != VREG ||
- VOP_GETATTR(vp, &vattr, cred) || vattr.va_nlink != 1) {
+ if (vp->v_type != VREG || VOP_GETATTR(vp, &vattr, cred) != 0 ||
+ vattr.va_nlink != 1) {
VOP_UNLOCK(vp, 0);
error = EFAULT;
goto close;
diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c
index 885dc22..d0009b1 100644
--- a/sys/kern/kern_switch.c
+++ b/sys/kern/kern_switch.c
@@ -176,6 +176,12 @@ retry:
/*
* Kernel thread preemption implementation. Critical sections mark
* regions of code in which preemptions are not allowed.
+ *
+ * It might seem a good idea to inline critical_enter() but, in order
+ * to prevent instructions reordering by the compiler, a __compiler_membar()
+ * would have to be used here (the same as sched_pin()). The performance
+ * penalty imposed by the membar could, then, produce slower code than
+ * the function call itself, for most cases.
*/
void
critical_enter(void)
diff --git a/sys/kern/kern_sx.c b/sys/kern/kern_sx.c
index af2391f..e469b1a 100644
--- a/sys/kern/kern_sx.c
+++ b/sys/kern/kern_sx.c
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/kdb.h>
#include <sys/ktr.h>
#include <sys/lock.h>
#include <sys/mutex.h>
@@ -249,7 +250,7 @@ _sx_slock(struct sx *sx, int opts, const char *file, int line)
if (SCHEDULER_STOPPED())
return (0);
- KASSERT(!TD_IS_IDLETHREAD(curthread),
+ KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
("sx_slock() by idle thread %p on sx %s @ %s:%d",
curthread, sx->lock_object.lo_name, file, line));
KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
@@ -273,7 +274,7 @@ sx_try_slock_(struct sx *sx, const char *file, int line)
if (SCHEDULER_STOPPED())
return (1);
- KASSERT(!TD_IS_IDLETHREAD(curthread),
+ KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
("sx_try_slock() by idle thread %p on sx %s @ %s:%d",
curthread, sx->lock_object.lo_name, file, line));
@@ -302,7 +303,7 @@ _sx_xlock(struct sx *sx, int opts, const char *file, int line)
if (SCHEDULER_STOPPED())
return (0);
- KASSERT(!TD_IS_IDLETHREAD(curthread),
+ KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
("sx_xlock() by idle thread %p on sx %s @ %s:%d",
curthread, sx->lock_object.lo_name, file, line));
KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
@@ -328,7 +329,7 @@ sx_try_xlock_(struct sx *sx, const char *file, int line)
if (SCHEDULER_STOPPED())
return (1);
- KASSERT(!TD_IS_IDLETHREAD(curthread),
+ KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
("sx_try_xlock() by idle thread %p on sx %s @ %s:%d",
curthread, sx->lock_object.lo_name, file, line));
KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c
index c0e7831..97c288d 100644
--- a/sys/kern/kern_time.c
+++ b/sys/kern/kern_time.c
@@ -788,13 +788,11 @@ realitexpire(void *arg)
struct timeval ctv, ntv;
p = (struct proc *)arg;
- PROC_LOCK(p);
kern_psignal(p, SIGALRM);
if (!timevalisset(&p->p_realtimer.it_interval)) {
timevalclear(&p->p_realtimer.it_value);
if (p->p_flag & P_WEXIT)
wakeup(&p->p_itcallout);
- PROC_UNLOCK(p);
return;
}
for (;;) {
@@ -806,7 +804,6 @@ realitexpire(void *arg)
timevalsub(&ntv, &ctv);
callout_reset(&p->p_itcallout, tvtohz(&ntv) - 1,
realitexpire, p);
- PROC_UNLOCK(p);
return;
}
}
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index e3e1e9d..80933fa 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -84,7 +84,7 @@ SYSCTL_INT(_debug, OID_AUTO, to_avg_mpcalls, CTLFLAG_RD, &avg_mpcalls, 0,
* TODO:
* allocate more timeout table slots when table overflows.
*/
-int callwheelsize, callwheelbits, callwheelmask;
+int callwheelsize, callwheelmask;
/*
* The callout cpu migration entity represents informations necessary for
@@ -218,12 +218,10 @@ kern_timeout_callwheel_alloc(caddr_t v)
timeout_cpu = PCPU_GET(cpuid);
cc = CC_CPU(timeout_cpu);
/*
- * Calculate callout wheel size
+ * Calculate callout wheel size, should be next power of two higher
+ * than 'ncallout'.
*/
- for (callwheelsize = 1, callwheelbits = 0;
- callwheelsize < ncallout;
- callwheelsize <<= 1, ++callwheelbits)
- ;
+ callwheelsize = 1 << fls(ncallout);
callwheelmask = callwheelsize - 1;
cc->cc_callout = (struct callout *)v;
@@ -441,15 +439,13 @@ static void
callout_cc_del(struct callout *c, struct callout_cpu *cc)
{
- if (cc->cc_next == c)
- cc->cc_next = TAILQ_NEXT(c, c_links.tqe);
- if (c->c_flags & CALLOUT_LOCAL_ALLOC) {
- c->c_func = NULL;
- SLIST_INSERT_HEAD(&cc->cc_callfree, c, c_links.sle);
- }
+ if ((c->c_flags & CALLOUT_LOCAL_ALLOC) == 0)
+ return;
+ c->c_func = NULL;
+ SLIST_INSERT_HEAD(&cc->cc_callfree, c, c_links.sle);
}
-static struct callout *
+static void
softclock_call_cc(struct callout *c, struct callout_cpu *cc, int *mpcalls,
int *lockcalls, int *gcalls)
{
@@ -471,7 +467,9 @@ softclock_call_cc(struct callout *c, struct callout_cpu *cc, int *mpcalls,
static timeout_t *lastfunc;
#endif
- cc->cc_next = TAILQ_NEXT(c, c_links.tqe);
+ KASSERT((c->c_flags & (CALLOUT_PENDING | CALLOUT_ACTIVE)) ==
+ (CALLOUT_PENDING | CALLOUT_ACTIVE),
+ ("softclock_call_cc: pend|act %p %x", c, c->c_flags));
class = (c->c_lock != NULL) ? LOCK_CLASS(c->c_lock) : NULL;
sharedlock = (c->c_flags & CALLOUT_SHAREDLOCK) ? 0 : 1;
c_lock = c->c_lock;
@@ -539,20 +537,7 @@ softclock_call_cc(struct callout *c, struct callout_cpu *cc, int *mpcalls,
class->lc_unlock(c_lock);
skip:
CC_LOCK(cc);
- /*
- * If the current callout is locally allocated (from
- * timeout(9)) then put it on the freelist.
- *
- * Note: we need to check the cached copy of c_flags because
- * if it was not local, then it's not safe to deref the
- * callout pointer.
- */
- if (c_flags & CALLOUT_LOCAL_ALLOC) {
- KASSERT(c->c_flags == CALLOUT_LOCAL_ALLOC,
- ("corrupted callout"));
- c->c_func = NULL;
- SLIST_INSERT_HEAD(&cc->cc_callfree, c, c_links.sle);
- }
+ KASSERT(cc->cc_curr == c, ("mishandled cc_curr"));
cc->cc_curr = NULL;
if (cc->cc_waiting) {
/*
@@ -561,13 +546,22 @@ skip:
* If the callout was scheduled for
* migration just cancel it.
*/
- if (cc_cme_migrating(cc))
+ if (cc_cme_migrating(cc)) {
cc_cme_cleanup(cc);
+
+ /*
+ * It should be assert here that the callout is not
+ * destroyed but that is not easy.
+ */
+ c->c_flags &= ~CALLOUT_DFRMIGRATION;
+ }
cc->cc_waiting = 0;
CC_UNLOCK(cc);
wakeup(&cc->cc_waiting);
CC_LOCK(cc);
} else if (cc_cme_migrating(cc)) {
+ KASSERT((c_flags & CALLOUT_LOCAL_ALLOC) == 0,
+ ("Migrating legacy callout %p", c));
#ifdef SMP
/*
* If the callout was scheduled for
@@ -580,23 +574,20 @@ skip:
cc_cme_cleanup(cc);
/*
- * Handle deferred callout stops
+ * It should be assert here that the callout is not destroyed
+ * but that is not easy.
+ *
+ * As first thing, handle deferred callout stops.
*/
if ((c->c_flags & CALLOUT_DFRMIGRATION) == 0) {
CTR3(KTR_CALLOUT,
"deferred cancelled %p func %p arg %p",
c, new_func, new_arg);
callout_cc_del(c, cc);
- goto nextc;
+ return;
}
-
c->c_flags &= ~CALLOUT_DFRMIGRATION;
- /*
- * It should be assert here that the
- * callout is not destroyed but that
- * is not easy.
- */
new_cc = callout_cpu_switch(c, cc, new_cpu);
callout_cc_add(c, new_cc, new_ticks, new_func, new_arg,
new_cpu);
@@ -606,10 +597,19 @@ skip:
panic("migration should not happen");
#endif
}
-#ifdef SMP
-nextc:
-#endif
- return (cc->cc_next);
+ /*
+ * If the current callout is locally allocated (from
+ * timeout(9)) then put it on the freelist.
+ *
+ * Note: we need to check the cached copy of c_flags because
+ * if it was not local, then it's not safe to deref the
+ * callout pointer.
+ */
+ KASSERT((c_flags & CALLOUT_LOCAL_ALLOC) == 0 ||
+ c->c_flags == CALLOUT_LOCAL_ALLOC,
+ ("corrupted callout"));
+ if (c_flags & CALLOUT_LOCAL_ALLOC)
+ callout_cc_del(c, cc);
}
/*
@@ -676,10 +676,12 @@ softclock(void *arg)
steps = 0;
}
} else {
+ cc->cc_next = TAILQ_NEXT(c, c_links.tqe);
TAILQ_REMOVE(bucket, c, c_links.tqe);
- c = softclock_call_cc(c, cc, &mpcalls,
+ softclock_call_cc(c, cc, &mpcalls,
&lockcalls, &gcalls);
steps = 0;
+ c = cc->cc_next;
}
}
}
@@ -1024,6 +1026,8 @@ again:
CTR3(KTR_CALLOUT, "cancelled %p func %p arg %p",
c, c->c_func, c->c_arg);
+ if (cc->cc_next == c)
+ cc->cc_next = TAILQ_NEXT(c, c_links.tqe);
TAILQ_REMOVE(&cc->cc_callwheel[c->c_time & callwheelmask], c,
c_links.tqe);
callout_cc_del(c, cc);
diff --git a/sys/kern/subr_busdma_bufalloc.c b/sys/kern/subr_busdma_bufalloc.c
new file mode 100644
index 0000000..9406d95
--- /dev/null
+++ b/sys/kern/subr_busdma_bufalloc.c
@@ -0,0 +1,174 @@
+/*-
+ * Copyright (c) 2012 Ian Lepore
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+/*
+ * Buffer allocation support routines for bus_dmamem_alloc implementations.
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/busdma_bufalloc.h>
+#include <sys/malloc.h>
+
+#include <vm/vm.h>
+#include <vm/vm_extern.h>
+#include <vm/vm_kern.h>
+#include <vm/uma.h>
+
+/*
+ * We manage buffer zones up to a page in size. Buffers larger than a page can
+ * be managed by one of the kernel's page-oriented memory allocation routines as
+ * efficiently as what we can do here. Also, a page is the largest size for
+ * which we can g'tee contiguity when using uma, and contiguity is one of the
+ * requirements we have to fulfill.
+ */
+#define MIN_ZONE_BUFSIZE 32
+#define MAX_ZONE_BUFSIZE PAGE_SIZE
+
+/*
+ * The static array of 12 bufzones is big enough to handle all the zones for the
+ * smallest supported allocation size of 32 through the largest supported page
+ * size of 64K. If you up the biggest page size number, up the array size too.
+ * Basically the size of the array needs to be log2(maxsize)-log2(minsize)+1,
+ * but I don't know of an easy way to express that as a compile-time constant.
+ */
+#if PAGE_SIZE > 65536
+#error Unsupported page size
+#endif
+
+struct busdma_bufalloc {
+ bus_size_t min_size;
+ size_t num_zones;
+ struct busdma_bufzone buf_zones[12];
+};
+
+busdma_bufalloc_t
+busdma_bufalloc_create(const char *name, bus_size_t minimum_alignment,
+ uma_alloc alloc_func, uma_free free_func, u_int32_t zcreate_flags)
+{
+ struct busdma_bufalloc *ba;
+ struct busdma_bufzone *bz;
+ int i;
+ bus_size_t cursize;
+
+ ba = malloc(sizeof(struct busdma_bufalloc), M_DEVBUF,
+ M_ZERO | M_WAITOK);
+
+ ba->min_size = MAX(MIN_ZONE_BUFSIZE, minimum_alignment);
+
+ /*
+ * Each uma zone is created with an alignment of size-1, meaning that
+ * the alignment is equal to the size (I.E., 64 byte buffers are aligned
+ * to 64 byte boundaries, etc). This allows for a fast efficient test
+ * when deciding whether a pool buffer meets the constraints of a given
+ * tag used for allocation: the buffer is usable if tag->alignment <=
+ * bufzone->size.
+ */
+ for (i = 0, bz = ba->buf_zones, cursize = ba->min_size;
+ i < nitems(ba->buf_zones) && cursize <= MAX_ZONE_BUFSIZE;
+ ++i, ++bz, cursize <<= 1) {
+ snprintf(bz->name, sizeof(bz->name), "dma %.10s %lu",
+ name, cursize);
+ bz->size = cursize;
+ bz->umazone = uma_zcreate(bz->name, bz->size,
+ NULL, NULL, NULL, NULL, bz->size - 1, zcreate_flags);
+ if (bz->umazone == NULL) {
+ busdma_bufalloc_destroy(ba);
+ return (NULL);
+ }
+ if (alloc_func != NULL)
+ uma_zone_set_allocf(bz->umazone, alloc_func);
+ if (free_func != NULL)
+ uma_zone_set_freef(bz->umazone, free_func);
+ ++ba->num_zones;
+ }
+
+ return (ba);
+}
+
+void
+busdma_bufalloc_destroy(busdma_bufalloc_t ba)
+{
+ struct busdma_bufzone *bz;
+ int i;
+
+ if (ba == NULL)
+ return;
+
+ for (i = 0, bz = ba->buf_zones; i < ba->num_zones; ++i, ++bz) {
+ uma_zdestroy(bz->umazone);
+ }
+
+ free(ba, M_DEVBUF);
+}
+
+struct busdma_bufzone *
+busdma_bufalloc_findzone(busdma_bufalloc_t ba, bus_size_t size)
+{
+ struct busdma_bufzone *bz;
+ int i;
+
+ if (size > MAX_ZONE_BUFSIZE)
+ return (NULL);
+
+ for (i = 0, bz = ba->buf_zones; i < ba->num_zones; ++i, ++bz) {
+ if (bz->size >= size)
+ return (bz);
+ }
+
+ panic("Didn't find a buffer zone of the right size");
+}
+
+void *
+busdma_bufalloc_alloc_uncacheable(uma_zone_t zone, int size, u_int8_t *pflag,
+ int wait)
+{
+#ifdef VM_MEMATTR_UNCACHEABLE
+
+ /* Inform UMA that this allocator uses kernel_map/object. */
+ *pflag = UMA_SLAB_KERNEL;
+
+ return ((void *)kmem_alloc_attr(kernel_map, size, wait, 0,
+ BUS_SPACE_MAXADDR, VM_MEMATTR_UNCACHEABLE));
+
+#else
+
+ panic("VM_MEMATTR_UNCACHEABLE unavailable");
+
+#endif /* VM_MEMATTR_UNCACHEABLE */
+}
+
+void
+busdma_bufalloc_free_uncacheable(void *item, int size, u_int8_t pflag)
+{
+
+ kmem_free(kernel_map, (vm_offset_t)item, size);
+}
+
diff --git a/sys/kern/subr_mchain.c b/sys/kern/subr_mchain.c
index cd2a5f3..e9d7d22 100644
--- a/sys/kern/subr_mchain.c
+++ b/sys/kern/subr_mchain.c
@@ -59,7 +59,7 @@ mb_init(struct mbchain *mbp)
{
struct mbuf *m;
- m = m_gethdr(M_WAIT, MT_DATA);
+ m = m_gethdr(M_WAITOK, MT_DATA);
m->m_len = 0;
mb_initm(mbp, m);
return (0);
@@ -114,7 +114,7 @@ mb_reserve(struct mbchain *mbp, int size)
panic("mb_reserve: size = %d\n", size);
m = mbp->mb_cur;
if (mbp->mb_mleft < size) {
- mn = m_get(M_WAIT, MT_DATA);
+ mn = m_get(M_WAITOK, MT_DATA);
mbp->mb_cur = m->m_next = mn;
m = mn;
m->m_len = 0;
@@ -205,7 +205,7 @@ mb_put_mem(struct mbchain *mbp, c_caddr_t source, int size, int type)
while (size > 0) {
if (mleft == 0) {
if (m->m_next == NULL)
- m = m_getm(m, size, M_WAIT, MT_DATA);
+ m = m_getm(m, size, M_WAITOK, MT_DATA);
else
m = m->m_next;
mleft = M_TRAILINGSPACE(m);
@@ -307,7 +307,7 @@ md_init(struct mdchain *mdp)
{
struct mbuf *m;
- m = m_gethdr(M_WAIT, MT_DATA);
+ m = m_gethdr(M_WAITOK, MT_DATA);
m->m_len = 0;
md_initm(mdp, m);
return (0);
@@ -514,7 +514,7 @@ md_get_mbuf(struct mdchain *mdp, int size, struct mbuf **ret)
{
struct mbuf *m = mdp->md_cur, *rm;
- rm = m_copym(m, mdp->md_pos - mtod(m, u_char*), size, M_WAIT);
+ rm = m_copym(m, mdp->md_pos - mtod(m, u_char*), size, M_WAITOK);
md_get_mem(mdp, NULL, size, MB_MZERO);
*ret = rm;
return (0);
diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c
index 2ca0051..510033f 100644
--- a/sys/kern/subr_param.c
+++ b/sys/kern/subr_param.c
@@ -333,8 +333,8 @@ init_param2(long physpages)
* available kernel memory (physical or kmem).
* At most it can be 3/4 of available kernel memory.
*/
- realmem = qmin(physpages * PAGE_SIZE,
- VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS);
+ realmem = qmin((quad_t)physpages * PAGE_SIZE,
+ VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS);
maxmbufmem = realmem / 2;
TUNABLE_QUAD_FETCH("kern.maxmbufmem", &maxmbufmem);
if (maxmbufmem > (realmem / 4) * 3)
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index 3b27dce..3614798 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -766,8 +766,9 @@ quiesce_cpus(cpuset_t map, const char *wmesg, int prio)
thread_unlock(curthread);
while (gen[cpu] == pcpu->pc_idlethread->td_generation) {
error = tsleep(quiesce_cpus, prio, wmesg, 1);
- if (error)
+ if (error != EWOULDBLOCK)
goto out;
+ error = 0;
}
}
out:
diff --git a/sys/kern/subr_syscall.c b/sys/kern/subr_syscall.c
index fe5cd0e..3d6dc5a 100644
--- a/sys/kern/subr_syscall.c
+++ b/sys/kern/subr_syscall.c
@@ -77,13 +77,12 @@ syscallenter(struct thread *td, struct syscall_args *sa)
if (KTRPOINT(td, KTR_SYSCALL))
ktrsyscall(sa->code, sa->narg, sa->args);
#endif
-
- CTR6(KTR_SYSC,
-"syscall: td=%p pid %d %s (%#lx, %#lx, %#lx)",
- td, td->td_proc->p_pid, syscallname(p, sa->code),
- sa->args[0], sa->args[1], sa->args[2]);
+ KTR_START4(KTR_SYSC, "syscall", syscallname(p, sa->code),
+ (uintptr_t)td, "pid:%d", td->td_proc->p_pid, "arg0:%p", sa->args[0],
+ "arg1:%p", sa->args[1], "arg2:%p", sa->args[2]);
if (error == 0) {
+
STOPEVENT(p, S_SCE, sa->narg);
if (p->p_flag & P_TRACED && p->p_stops & S_PT_SCE) {
PROC_LOCK(p);
@@ -150,10 +149,12 @@ syscallenter(struct thread *td, struct syscall_args *sa)
sa->callp, NULL, (error) ? -1 : td->td_retval[0]);
#endif
syscall_thread_exit(td, sa->callp);
- CTR4(KTR_SYSC, "syscall: p=%p error=%d return %#lx %#lx",
- p, error, td->td_retval[0], td->td_retval[1]);
}
retval:
+ KTR_STOP4(KTR_SYSC, "syscall", syscallname(p, sa->code),
+ (uintptr_t)td, "pid:%d", td->td_proc->p_pid, "error:%d", error,
+ "retval0:%#lx", td->td_retval[0], "retval1:%#lx",
+ td->td_retval[1]);
if (traced) {
PROC_LOCK(p);
td->td_dbgflags &= ~TDB_SCE;
@@ -176,9 +177,6 @@ syscallret(struct thread *td, int error, struct syscall_args *sa __unused)
*/
userret(td, td->td_frame);
- CTR4(KTR_SYSC, "syscall %s exit thread %p pid %d proc %s",
- syscallname(p, sa->code), td, td->td_proc->p_pid, td->td_name);
-
#ifdef KTRACE
if (KTRPOINT(td, KTR_SYSRET)) {
ktrsysret(sa->code, (td->td_pflags & TDP_NERRNO) == 0 ?
diff --git a/sys/kern/subr_uio.c b/sys/kern/subr_uio.c
index d518cc3..7b593487 100644
--- a/sys/kern/subr_uio.c
+++ b/sys/kern/subr_uio.c
@@ -389,7 +389,6 @@ again:
case UIO_SYSSPACE:
iov_base = iov->iov_base;
*iov_base = c;
- iov->iov_base = iov_base;
break;
case UIO_NOCOPY:
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c
index c2aed86..3cbf51a 100644
--- a/sys/kern/subr_witness.c
+++ b/sys/kern/subr_witness.c
@@ -822,16 +822,16 @@ witness_init(struct lock_object *lock, const char *type)
class = LOCK_CLASS(lock);
if ((lock->lo_flags & LO_RECURSABLE) != 0 &&
(class->lc_flags & LC_RECURSABLE) == 0)
- panic("%s: lock (%s) %s can not be recursable", __func__,
- class->lc_name, lock->lo_name);
+ kassert_panic("%s: lock (%s) %s can not be recursable",
+ __func__, class->lc_name, lock->lo_name);
if ((lock->lo_flags & LO_SLEEPABLE) != 0 &&
(class->lc_flags & LC_SLEEPABLE) == 0)
- panic("%s: lock (%s) %s can not be sleepable", __func__,
- class->lc_name, lock->lo_name);
+ kassert_panic("%s: lock (%s) %s can not be sleepable",
+ __func__, class->lc_name, lock->lo_name);
if ((lock->lo_flags & LO_UPGRADABLE) != 0 &&
(class->lc_flags & LC_UPGRADABLE) == 0)
- panic("%s: lock (%s) %s can not be upgradable", __func__,
- class->lc_name, lock->lo_name);
+ kassert_panic("%s: lock (%s) %s can not be upgradable",
+ __func__, class->lc_name, lock->lo_name);
/*
* If we shouldn't watch this lock, then just clear lo_witness.
@@ -847,7 +847,8 @@ witness_init(struct lock_object *lock, const char *type)
pending_locks[pending_cnt].wh_lock = lock;
pending_locks[pending_cnt++].wh_type = type;
if (pending_cnt > WITNESS_PENDLIST)
- panic("%s: pending locks list is too small, bump it\n",
+ panic("%s: pending locks list is too small, "
+ "increase WITNESS_PENDLIST\n",
__func__);
} else
lock->lo_witness = enroll(type, class);
@@ -1073,7 +1074,8 @@ witness_checkorder(struct lock_object *lock, int flags, const char *file,
* all spin locks.
*/
if (td->td_critnest != 0 && !kdb_active)
- panic("blockable sleep lock (%s) %s @ %s:%d",
+ kassert_panic("acquiring blockable sleep lock with "
+ "spinlock or critical section held (%s) %s @ %s:%d",
class->lc_name, lock->lo_name,
fixup_filename(file), line);
@@ -1117,7 +1119,7 @@ witness_checkorder(struct lock_object *lock, int flags, const char *file,
fixup_filename(file), line);
printf("while exclusively locked from %s:%d\n",
fixup_filename(lock1->li_file), lock1->li_line);
- panic("share->excl");
+ kassert_panic("share->excl");
}
if ((lock1->li_flags & LI_EXCLUSIVE) == 0 &&
(flags & LOP_EXCLUSIVE) != 0) {
@@ -1126,7 +1128,7 @@ witness_checkorder(struct lock_object *lock, int flags, const char *file,
fixup_filename(file), line);
printf("while share locked from %s:%d\n",
fixup_filename(lock1->li_file), lock1->li_line);
- panic("excl->share");
+ kassert_panic("excl->share");
}
return;
}
@@ -1433,26 +1435,32 @@ witness_upgrade(struct lock_object *lock, int flags, const char *file, int line)
class = LOCK_CLASS(lock);
if (witness_watch) {
if ((lock->lo_flags & LO_UPGRADABLE) == 0)
- panic("upgrade of non-upgradable lock (%s) %s @ %s:%d",
+ kassert_panic(
+ "upgrade of non-upgradable lock (%s) %s @ %s:%d",
class->lc_name, lock->lo_name,
fixup_filename(file), line);
if ((class->lc_flags & LC_SLEEPLOCK) == 0)
- panic("upgrade of non-sleep lock (%s) %s @ %s:%d",
+ kassert_panic(
+ "upgrade of non-sleep lock (%s) %s @ %s:%d",
class->lc_name, lock->lo_name,
fixup_filename(file), line);
}
instance = find_instance(curthread->td_sleeplocks, lock);
- if (instance == NULL)
- panic("upgrade of unlocked lock (%s) %s @ %s:%d",
+ if (instance == NULL) {
+ kassert_panic("upgrade of unlocked lock (%s) %s @ %s:%d",
class->lc_name, lock->lo_name,
fixup_filename(file), line);
+ return;
+ }
if (witness_watch) {
if ((instance->li_flags & LI_EXCLUSIVE) != 0)
- panic("upgrade of exclusive lock (%s) %s @ %s:%d",
+ kassert_panic(
+ "upgrade of exclusive lock (%s) %s @ %s:%d",
class->lc_name, lock->lo_name,
fixup_filename(file), line);
if ((instance->li_flags & LI_RECURSEMASK) != 0)
- panic("upgrade of recursed lock (%s) %s r=%d @ %s:%d",
+ kassert_panic(
+ "upgrade of recursed lock (%s) %s r=%d @ %s:%d",
class->lc_name, lock->lo_name,
instance->li_flags & LI_RECURSEMASK,
fixup_filename(file), line);
@@ -1473,26 +1481,32 @@ witness_downgrade(struct lock_object *lock, int flags, const char *file,
class = LOCK_CLASS(lock);
if (witness_watch) {
if ((lock->lo_flags & LO_UPGRADABLE) == 0)
- panic("downgrade of non-upgradable lock (%s) %s @ %s:%d",
+ kassert_panic(
+ "downgrade of non-upgradable lock (%s) %s @ %s:%d",
class->lc_name, lock->lo_name,
fixup_filename(file), line);
if ((class->lc_flags & LC_SLEEPLOCK) == 0)
- panic("downgrade of non-sleep lock (%s) %s @ %s:%d",
+ kassert_panic(
+ "downgrade of non-sleep lock (%s) %s @ %s:%d",
class->lc_name, lock->lo_name,
fixup_filename(file), line);
}
instance = find_instance(curthread->td_sleeplocks, lock);
- if (instance == NULL)
- panic("downgrade of unlocked lock (%s) %s @ %s:%d",
+ if (instance == NULL) {
+ kassert_panic("downgrade of unlocked lock (%s) %s @ %s:%d",
class->lc_name, lock->lo_name,
fixup_filename(file), line);
+ return;
+ }
if (witness_watch) {
if ((instance->li_flags & LI_EXCLUSIVE) == 0)
- panic("downgrade of shared lock (%s) %s @ %s:%d",
+ kassert_panic(
+ "downgrade of shared lock (%s) %s @ %s:%d",
class->lc_name, lock->lo_name,
fixup_filename(file), line);
if ((instance->li_flags & LI_RECURSEMASK) != 0)
- panic("downgrade of recursed lock (%s) %s r=%d @ %s:%d",
+ kassert_panic(
+ "downgrade of recursed lock (%s) %s r=%d @ %s:%d",
class->lc_name, lock->lo_name,
instance->li_flags & LI_RECURSEMASK,
fixup_filename(file), line);
@@ -1534,11 +1548,13 @@ witness_unlock(struct lock_object *lock, int flags, const char *file, int line)
* We have to make sure we flush these queues, so just search for
* eventual register locks and remove them.
*/
- if (witness_watch > 0)
- panic("lock (%s) %s not locked @ %s:%d", class->lc_name,
+ if (witness_watch > 0) {
+ kassert_panic("lock (%s) %s not locked @ %s:%d", class->lc_name,
lock->lo_name, fixup_filename(file), line);
- else
return;
+ } else {
+ return;
+ }
found:
/* First, check for shared/exclusive mismatches. */
@@ -1548,7 +1564,7 @@ found:
lock->lo_name, fixup_filename(file), line);
printf("while exclusively locked from %s:%d\n",
fixup_filename(instance->li_file), instance->li_line);
- panic("excl->ushare");
+ kassert_panic("excl->ushare");
}
if ((instance->li_flags & LI_EXCLUSIVE) == 0 && witness_watch > 0 &&
(flags & LOP_EXCLUSIVE) != 0) {
@@ -1557,7 +1573,7 @@ found:
printf("while share locked from %s:%d\n",
fixup_filename(instance->li_file),
instance->li_line);
- panic("share->uexcl");
+ kassert_panic("share->uexcl");
}
/* If we are recursed, unrecurse. */
if ((instance->li_flags & LI_RECURSEMASK) > 0) {
@@ -1571,7 +1587,7 @@ found:
if ((instance->li_flags & LI_NORELEASE) != 0 && witness_watch > 0) {
printf("forbidden unlock of (%s) %s @ %s:%d\n", class->lc_name,
lock->lo_name, fixup_filename(file), line);
- panic("lock marked norelease");
+ kassert_panic("lock marked norelease");
}
/* Otherwise, remove this item from the list. */
@@ -1626,7 +1642,8 @@ witness_thread_exit(struct thread *td)
witness_list_lock(&lle->ll_children[i], printf);
}
- panic("Thread %p cannot exit while holding sleeplocks\n", td);
+ kassert_panic(
+ "Thread %p cannot exit while holding sleeplocks\n", td);
}
witness_lock_list_free(lle);
}
@@ -1707,7 +1724,7 @@ witness_warn(int flags, struct lock_object *lock, const char *fmt, ...)
} else
sched_unpin();
if (flags & WARN_PANIC && n)
- panic("%s", __func__);
+ kassert_panic("%s", __func__);
else
witness_debugger(n);
return (n);
@@ -1750,11 +1767,13 @@ enroll(const char *description, struct lock_class *lock_class)
return (NULL);
else
typelist = &w_spin;
- } else if ((lock_class->lc_flags & LC_SLEEPLOCK))
+ } else if ((lock_class->lc_flags & LC_SLEEPLOCK)) {
typelist = &w_sleep;
- else
- panic("lock class %s is not sleep or spin",
+ } else {
+ kassert_panic("lock class %s is not sleep or spin",
lock_class->lc_name);
+ return (NULL);
+ }
mtx_lock_spin(&w_mtx);
w = witness_hash_get(description);
@@ -1784,7 +1803,7 @@ found:
w->w_refcount++;
mtx_unlock_spin(&w_mtx);
if (lock_class != w->w_class)
- panic(
+ kassert_panic(
"lock (%s) %s does not match earlier (%s) lock",
description, lock_class->lc_name,
w->w_class->lc_name);
@@ -1910,18 +1929,26 @@ adopt(struct witness *parent, struct witness *child)
static void
itismychild(struct witness *parent, struct witness *child)
{
+ int unlocked;
MPASS(child != NULL && parent != NULL);
if (witness_cold == 0)
mtx_assert(&w_mtx, MA_OWNED);
if (!witness_lock_type_equal(parent, child)) {
- if (witness_cold == 0)
+ if (witness_cold == 0) {
+ unlocked = 1;
mtx_unlock_spin(&w_mtx);
- panic("%s: parent \"%s\" (%s) and child \"%s\" (%s) are not "
+ } else {
+ unlocked = 0;
+ }
+ kassert_panic(
+ "%s: parent \"%s\" (%s) and child \"%s\" (%s) are not "
"the same lock type", __func__, parent->w_name,
parent->w_class->lc_name, child->w_name,
child->w_class->lc_name);
+ if (unlocked)
+ mtx_lock_spin(&w_mtx);
}
adopt(parent, child);
}
@@ -2191,9 +2218,11 @@ witness_save(struct lock_object *lock, const char **filep, int *linep)
lock_list = PCPU_GET(spinlocks);
}
instance = find_instance(lock_list, lock);
- if (instance == NULL)
- panic("%s: lock (%s) %s not locked", __func__,
+ if (instance == NULL) {
+ kassert_panic("%s: lock (%s) %s not locked", __func__,
class->lc_name, lock->lo_name);
+ return;
+ }
*filep = instance->li_file;
*linep = instance->li_line;
}
@@ -2225,10 +2254,12 @@ witness_restore(struct lock_object *lock, const char *file, int line)
}
instance = find_instance(lock_list, lock);
if (instance == NULL)
- panic("%s: lock (%s) %s not locked", __func__,
+ kassert_panic("%s: lock (%s) %s not locked", __func__,
class->lc_name, lock->lo_name);
lock->lo_witness->w_file = file;
lock->lo_witness->w_line = line;
+ if (instance == NULL)
+ return;
instance->li_file = file;
instance->li_line = line;
}
@@ -2249,13 +2280,14 @@ witness_assert(const struct lock_object *lock, int flags, const char *file,
else if ((class->lc_flags & LC_SPINLOCK) != 0)
instance = find_instance(PCPU_GET(spinlocks), lock);
else {
- panic("Lock (%s) %s is not sleep or spin!",
+ kassert_panic("Lock (%s) %s is not sleep or spin!",
class->lc_name, lock->lo_name);
+ return;
}
switch (flags) {
case LA_UNLOCKED:
if (instance != NULL)
- panic("Lock (%s) %s locked @ %s:%d.",
+ kassert_panic("Lock (%s) %s locked @ %s:%d.",
class->lc_name, lock->lo_name,
fixup_filename(file), line);
break;
@@ -2269,34 +2301,36 @@ witness_assert(const struct lock_object *lock, int flags, const char *file,
case LA_XLOCKED | LA_RECURSED:
case LA_XLOCKED | LA_NOTRECURSED:
if (instance == NULL) {
- panic("Lock (%s) %s not locked @ %s:%d.",
+ kassert_panic("Lock (%s) %s not locked @ %s:%d.",
class->lc_name, lock->lo_name,
fixup_filename(file), line);
break;
}
if ((flags & LA_XLOCKED) != 0 &&
(instance->li_flags & LI_EXCLUSIVE) == 0)
- panic("Lock (%s) %s not exclusively locked @ %s:%d.",
+ kassert_panic(
+ "Lock (%s) %s not exclusively locked @ %s:%d.",
class->lc_name, lock->lo_name,
fixup_filename(file), line);
if ((flags & LA_SLOCKED) != 0 &&
(instance->li_flags & LI_EXCLUSIVE) != 0)
- panic("Lock (%s) %s exclusively locked @ %s:%d.",
+ kassert_panic(
+ "Lock (%s) %s exclusively locked @ %s:%d.",
class->lc_name, lock->lo_name,
fixup_filename(file), line);
if ((flags & LA_RECURSED) != 0 &&
(instance->li_flags & LI_RECURSEMASK) == 0)
- panic("Lock (%s) %s not recursed @ %s:%d.",
+ kassert_panic("Lock (%s) %s not recursed @ %s:%d.",
class->lc_name, lock->lo_name,
fixup_filename(file), line);
if ((flags & LA_NOTRECURSED) != 0 &&
(instance->li_flags & LI_RECURSEMASK) != 0)
- panic("Lock (%s) %s recursed @ %s:%d.",
+ kassert_panic("Lock (%s) %s recursed @ %s:%d.",
class->lc_name, lock->lo_name,
fixup_filename(file), line);
break;
default:
- panic("Invalid lock assertion at %s:%d.",
+ kassert_panic("Invalid lock assertion at %s:%d.",
fixup_filename(file), line);
}
@@ -2321,9 +2355,11 @@ witness_setflag(struct lock_object *lock, int flag, int set)
lock_list = PCPU_GET(spinlocks);
}
instance = find_instance(lock_list, lock);
- if (instance == NULL)
- panic("%s: lock (%s) %s not locked", __func__,
+ if (instance == NULL) {
+ kassert_panic("%s: lock (%s) %s not locked", __func__,
class->lc_name, lock->lo_name);
+ return;
+ }
if (set)
instance->li_flags |= flag;
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c
index f47cb03..b97ff7f 100644
--- a/sys/kern/sys_generic.c
+++ b/sys/kern/sys_generic.c
@@ -536,7 +536,8 @@ dofilewrite(td, fd, fp, auio, offset, flags)
ktruio = cloneuio(auio);
#endif
cnt = auio->uio_resid;
- if (fp->f_type == DTYPE_VNODE)
+ if (fp->f_type == DTYPE_VNODE &&
+ (fp->f_vnread_flags & FDEVFS_VNODE) == 0)
bwillwrite();
if ((error = fo_write(fp, auio, td->td_ucred, flags, td))) {
if (auio->uio_resid != cnt && (error == ERESTART ||
diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c
index c133fcb..c146232 100644
--- a/sys/kern/uipc_domain.c
+++ b/sys/kern/uipc_domain.c
@@ -46,8 +46,6 @@ __FBSDID("$FreeBSD$");
#include <net/vnet.h>
-#include <vm/uma.h>
-
/*
* System initialization
*
@@ -270,21 +268,31 @@ domainfinalize(void *dummy)
callout_reset(&pfslow_callout, 1, pfslowtimo, NULL);
}
+struct domain *
+pffinddomain(int family)
+{
+ struct domain *dp;
+
+ for (dp = domains; dp != NULL; dp = dp->dom_next)
+ if (dp->dom_family == family)
+ return (dp);
+ return (NULL);
+}
+
struct protosw *
pffindtype(int family, int type)
{
struct domain *dp;
struct protosw *pr;
- for (dp = domains; dp; dp = dp->dom_next)
- if (dp->dom_family == family)
- goto found;
- return (0);
-found:
+ dp = pffinddomain(family);
+ if (dp == NULL)
+ return (NULL);
+
for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
if (pr->pr_type && pr->pr_type == type)
return (pr);
- return (0);
+ return (NULL);
}
struct protosw *
@@ -292,21 +300,22 @@ pffindproto(int family, int protocol, int type)
{
struct domain *dp;
struct protosw *pr;
- struct protosw *maybe = 0;
+ struct protosw *maybe;
+ maybe = NULL;
if (family == 0)
- return (0);
- for (dp = domains; dp; dp = dp->dom_next)
- if (dp->dom_family == family)
- goto found;
- return (0);
-found:
+ return (NULL);
+
+ dp = pffinddomain(family);
+ if (dp == NULL)
+ return (NULL);
+
for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) {
if ((pr->pr_protocol == protocol) && (pr->pr_type == type))
return (pr);
if (type == SOCK_RAW && pr->pr_type == SOCK_RAW &&
- pr->pr_protocol == 0 && maybe == (struct protosw *)0)
+ pr->pr_protocol == 0 && maybe == NULL)
maybe = pr;
}
return (maybe);
@@ -334,12 +343,10 @@ pf_proto_register(int family, struct protosw *npr)
return (ENXIO);
/* Try to find the specified domain based on the family. */
- for (dp = domains; dp; dp = dp->dom_next)
- if (dp->dom_family == family)
- goto found;
- return (EPFNOSUPPORT);
+ dp = pffinddomain(family);
+ if (dp == NULL)
+ return (EPFNOSUPPORT);
-found:
/* Initialize backpointer to struct domain. */
npr->pr_domain = dp;
fpr = NULL;
@@ -405,12 +412,10 @@ pf_proto_unregister(int family, int protocol, int type)
return (EPROTOTYPE);
/* Try to find the specified domain based on the family type. */
- for (dp = domains; dp; dp = dp->dom_next)
- if (dp->dom_family == family)
- goto found;
- return (EPFNOSUPPORT);
+ dp = pffinddomain(family);
+ if (dp == NULL)
+ return (EPFNOSUPPORT);
-found:
dpr = NULL;
/* Lock out everyone else while we are manipulating the protosw. */
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index 4130361..ab6163d 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -520,7 +520,7 @@ m_prepend(struct mbuf *m, int len, int how)
/*
* Make a copy of an mbuf chain starting "off0" bytes from the beginning,
* continuing for "len" bytes. If len is M_COPYALL, copy to end of mbuf.
- * The wait parameter is a choice of M_WAIT/M_DONTWAIT from caller.
+ * The wait parameter is a choice of M_WAITOK/M_NOWAIT from caller.
* Note that the copy is read-only, because clusters are not copied,
* only their reference counts are incremented.
*/
@@ -1028,7 +1028,7 @@ m_pullup(struct mbuf *n, int len)
} else {
if (len > MHLEN)
goto bad;
- MGET(m, M_DONTWAIT, n->m_type);
+ MGET(m, M_NOWAIT, n->m_type);
if (m == NULL)
goto bad;
m->m_len = 0;
@@ -1076,7 +1076,7 @@ m_copyup(struct mbuf *n, int len, int dstoff)
if (len > (MHLEN - dstoff))
goto bad;
- MGET(m, M_DONTWAIT, n->m_type);
+ MGET(m, M_NOWAIT, n->m_type);
if (m == NULL)
goto bad;
m->m_len = 0;
@@ -1195,10 +1195,10 @@ m_devget(char *buf, int totlen, int off, struct ifnet *ifp,
while (totlen > 0) {
if (top == NULL) { /* First one, must be PKTHDR */
if (totlen + off >= MINCLSIZE) {
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
len = MCLBYTES;
} else {
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
len = MHLEN;
/* Place initial small packet/header at end of mbuf */
@@ -1213,10 +1213,10 @@ m_devget(char *buf, int totlen, int off, struct ifnet *ifp,
m->m_pkthdr.len = totlen;
} else {
if (totlen + off >= MINCLSIZE) {
- m = m_getcl(M_DONTWAIT, MT_DATA, 0);
+ m = m_getcl(M_NOWAIT, MT_DATA, 0);
len = MCLBYTES;
} else {
- m = m_get(M_DONTWAIT, MT_DATA);
+ m = m_get(M_NOWAIT, MT_DATA);
len = MLEN;
}
if (m == NULL) {
@@ -1260,7 +1260,7 @@ m_copyback(struct mbuf *m0, int off, int len, c_caddr_t cp)
off -= mlen;
totlen += mlen;
if (m->m_next == NULL) {
- n = m_get(M_DONTWAIT, m->m_type);
+ n = m_get(M_NOWAIT, m->m_type);
if (n == NULL)
goto out;
bzero(mtod(n, caddr_t), MLEN);
@@ -1284,7 +1284,7 @@ m_copyback(struct mbuf *m0, int off, int len, c_caddr_t cp)
if (len == 0)
break;
if (m->m_next == NULL) {
- n = m_get(M_DONTWAIT, m->m_type);
+ n = m_get(M_NOWAIT, m->m_type);
if (n == NULL)
break;
n->m_len = min(MLEN, len);
@@ -1328,7 +1328,7 @@ m_append(struct mbuf *m0, int len, c_caddr_t cp)
* Allocate a new mbuf; could check space
* and allocate a cluster instead.
*/
- n = m_get(M_DONTWAIT, m->m_type);
+ n = m_get(M_NOWAIT, m->m_type);
if (n == NULL)
break;
n->m_len = min(MLEN, remainder);
diff --git a/sys/kern/uipc_mbuf2.c b/sys/kern/uipc_mbuf2.c
index 96be658..e32e2a1 100644
--- a/sys/kern/uipc_mbuf2.c
+++ b/sys/kern/uipc_mbuf2.c
@@ -171,7 +171,7 @@ m_pulldown(struct mbuf *m, int off, int len, int *offp)
* chop the current mbuf into two pieces, set off to 0.
*/
if (len <= n->m_len - off) {
- o = m_dup1(n, off, n->m_len - off, M_DONTWAIT);
+ o = m_dup1(n, off, n->m_len - off, M_NOWAIT);
if (o == NULL) {
m_freem(m);
return NULL; /* ENOBUFS */
@@ -231,9 +231,9 @@ m_pulldown(struct mbuf *m, int off, int len, int *offp)
* on both end.
*/
if (len > MLEN)
- o = m_getcl(M_DONTWAIT, m->m_type, 0);
+ o = m_getcl(M_NOWAIT, m->m_type, 0);
else
- o = m_get(M_DONTWAIT, m->m_type);
+ o = m_get(M_NOWAIT, m->m_type);
if (!o) {
m_freem(m);
return NULL; /* ENOBUFS */
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c
index 272f939..6325840 100644
--- a/sys/kern/uipc_sockbuf.c
+++ b/sys/kern/uipc_sockbuf.c
@@ -188,7 +188,7 @@ sowakeup(struct socket *so, struct sockbuf *sb)
}
KNOTE_LOCKED(&sb->sb_sel.si_note, 0);
if (sb->sb_upcall != NULL) {
- ret = sb->sb_upcall(so, sb->sb_upcallarg, M_DONTWAIT);
+ ret = sb->sb_upcall(so, sb->sb_upcallarg, M_NOWAIT);
if (ret == SU_ISCONNECTED) {
KASSERT(sb == &so->so_rcv,
("SO_SND upcall returned SU_ISCONNECTED"));
@@ -644,7 +644,7 @@ sbappendaddr_locked(struct sockbuf *sb, const struct sockaddr *asa,
if (asa->sa_len > MLEN)
return (0);
#endif
- MGET(m, M_DONTWAIT, MT_SONAME);
+ MGET(m, M_NOWAIT, MT_SONAME);
if (m == 0)
return (0);
m->m_len = asa->sa_len;
@@ -1002,9 +1002,9 @@ sbcreatecontrol(caddr_t p, int size, int type, int level)
if (CMSG_SPACE((u_int)size) > MCLBYTES)
return ((struct mbuf *) NULL);
if (CMSG_SPACE((u_int)size) > MLEN)
- m = m_getcl(M_DONTWAIT, MT_CONTROL, 0);
+ m = m_getcl(M_NOWAIT, MT_CONTROL, 0);
else
- m = m_get(M_DONTWAIT, MT_CONTROL);
+ m = m_get(M_NOWAIT, MT_CONTROL);
if (m == NULL)
return ((struct mbuf *) NULL);
cp = mtod(m, struct cmsghdr *);
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 4416eca..de8ae5a 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -92,7 +92,7 @@
* from a listen queue to a file descriptor, in order to prevent garbage
* collection of the socket at an untimely moment. For a number of reasons,
* these interfaces are not preferred, and should be avoided.
- *
+ *
* NOTE: With regard to VNETs the general rule is that callers do not set
* curvnet. Exceptions to this rule include soabort(), sodisconnect(),
* sofree() (and with that sorele(), sotryfree()), as well as sonewconn()
@@ -259,25 +259,26 @@ SYSCTL_NODE(_kern, KERN_IPC, ipc, CTLFLAG_RW, 0, "IPC");
* Initialize the socket subsystem and set up the socket
* memory allocator.
*/
-uma_zone_t socket_zone;
+static uma_zone_t socket_zone;
int maxsockets;
static void
socket_zone_change(void *tag)
{
- uma_zone_set_max(socket_zone, maxsockets);
+ maxsockets = uma_zone_set_max(socket_zone, maxsockets);
}
static void
socket_init(void *tag)
{
- socket_zone = uma_zcreate("socket", sizeof(struct socket), NULL, NULL,
- NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
- uma_zone_set_max(socket_zone, maxsockets);
- EVENTHANDLER_REGISTER(maxsockets_change, socket_zone_change, NULL,
- EVENTHANDLER_PRI_FIRST);
+ socket_zone = uma_zcreate("socket", sizeof(struct socket), NULL, NULL,
+ NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
+ maxsockets = uma_zone_set_max(socket_zone, maxsockets);
+ uma_zone_set_warning(socket_zone, "kern.ipc.maxsockets limit reached");
+ EVENTHANDLER_REGISTER(maxsockets_change, socket_zone_change, NULL,
+ EVENTHANDLER_PRI_FIRST);
}
SYSINIT(socket, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY, socket_init, NULL);
@@ -425,7 +426,16 @@ socreate(int dom, struct socket **aso, int type, int proto,
else
prp = pffindtype(dom, type);
- if (prp == NULL || prp->pr_usrreqs->pru_attach == NULL ||
+ if (prp == NULL) {
+ /* No support for domain. */
+ if (pffinddomain(dom) == NULL)
+ return (EAFNOSUPPORT);
+ /* No support for socket type. */
+ if (proto == 0 && type != 0)
+ return (EPROTOTYPE);
+ return (EPROTONOSUPPORT);
+ }
+ if (prp->pr_usrreqs->pru_attach == NULL ||
prp->pr_usrreqs->pru_attach == pru_attach_notsupp)
return (EPROTONOSUPPORT);
@@ -710,8 +720,10 @@ sofree(struct socket *so)
("sofree: so_head == NULL, but still SQ_COMP(%d) or SQ_INCOMP(%d)",
so->so_qstate & SQ_COMP, so->so_qstate & SQ_INCOMP));
if (so->so_options & SO_ACCEPTCONN) {
- KASSERT((TAILQ_EMPTY(&so->so_comp)), ("sofree: so_comp populated"));
- KASSERT((TAILQ_EMPTY(&so->so_incomp)), ("sofree: so_incomp populated"));
+ KASSERT((TAILQ_EMPTY(&so->so_comp)),
+ ("sofree: so_comp populated"));
+ KASSERT((TAILQ_EMPTY(&so->so_incomp)),
+ ("sofree: so_incomp populated"));
}
SOCK_UNLOCK(so);
ACCEPT_UNLOCK();
@@ -777,7 +789,8 @@ soclose(struct socket *so)
goto drop;
while (so->so_state & SS_ISCONNECTED) {
error = tsleep(&so->so_timeo,
- PSOCK | PCATCH, "soclos", so->so_linger * hz);
+ PSOCK | PCATCH, "soclos",
+ so->so_linger * hz);
if (error)
break;
}
@@ -947,7 +960,7 @@ struct so_zerocopy_stats so_zerocp_stats = {0,0,0};
/*
* sosend_copyin() is only used if zero copy sockets are enabled. Otherwise
* sosend_dgram() and sosend_generic() use m_uiotombuf().
- *
+ *
* sosend_copyin() accepts a uio and prepares an mbuf chain holding part or
* all of the data referenced by the uio. If desired, it uses zero-copy.
* *space will be updated to reflect data copied in.
@@ -998,7 +1011,7 @@ sosend_copyin(struct uio *uio, struct mbuf **retmp, int atomic, long *space,
}
} else {
if (top == NULL) {
- m = m_gethdr(M_WAIT, MT_DATA);
+ m = m_gethdr(M_WAITOK, MT_DATA);
m->m_pkthdr.len = 0;
m->m_pkthdr.rcvif = NULL;
@@ -1010,7 +1023,7 @@ sosend_copyin(struct uio *uio, struct mbuf **retmp, int atomic, long *space,
if (atomic && m && len < MHLEN)
MH_ALIGN(m, len);
} else {
- m = m_get(M_WAIT, MT_DATA);
+ m = m_get(M_WAITOK, MT_DATA);
len = min(min(MLEN, resid), *space);
}
}
@@ -1433,7 +1446,7 @@ soreceive_rcvoob(struct socket *so, struct uio *uio, int flags)
KASSERT(flags & MSG_OOB, ("soreceive_rcvoob: (flags & MSG_OOB) == 0"));
VNET_SO_ASSERT(so);
- m = m_get(M_WAIT, MT_DATA);
+ m = m_get(M_WAITOK, MT_DATA);
error = (*pr->pr_usrreqs->pru_rcvoob)(so, m, flags & MSG_PEEK);
if (error)
goto bad;
@@ -1449,8 +1462,7 @@ soreceive_rcvoob(struct socket *so, struct uio *uio, int flags)
disposable = 0;
error = uiomoveco(mtod(m, void *),
- min(uio->uio_resid, m->m_len),
- uio, disposable);
+ min(uio->uio_resid, m->m_len), uio, disposable);
} else
#endif /* SOCKET_RECV_PFLIP */
error = uiomove(mtod(m, void *),
@@ -1485,20 +1497,19 @@ sockbuf_pushsync(struct sockbuf *sb, struct mbuf *nextrecord)
else
sb->sb_mb = nextrecord;
- /*
- * Now update any dependent socket buffer fields to reflect the new
- * state. This is an expanded inline of SB_EMPTY_FIXUP(), with the
+ /*
+ * Now update any dependent socket buffer fields to reflect the new
+ * state. This is an expanded inline of SB_EMPTY_FIXUP(), with the
* addition of a second clause that takes care of the case where
* sb_mb has been updated, but remains the last record.
- */
- if (sb->sb_mb == NULL) {
- sb->sb_mbtail = NULL;
- sb->sb_lastrecord = NULL;
- } else if (sb->sb_mb->m_nextpkt == NULL)
- sb->sb_lastrecord = sb->sb_mb;
+ */
+ if (sb->sb_mb == NULL) {
+ sb->sb_mbtail = NULL;
+ sb->sb_lastrecord = NULL;
+ } else if (sb->sb_mb->m_nextpkt == NULL)
+ sb->sb_lastrecord = sb->sb_mb;
}
-
/*
* Implement receive operations on a socket. We depend on the way that
* records are added to the sockbuf by sbappend. In particular, each record
@@ -1748,7 +1759,7 @@ dontblock:
/*
* If the type of mbuf has changed since the last mbuf
* examined ('type'), end the receive operation.
- */
+ */
SOCKBUF_LOCK_ASSERT(&so->so_rcv);
if (m->m_type == MT_OOBDATA || m->m_type == MT_CONTROL) {
if (type != m->m_type)
@@ -1787,8 +1798,7 @@ dontblock:
disposable = 0;
error = uiomoveco(mtod(m, char *) + moff,
- (int)len, uio,
- disposable);
+ (int)len, uio, disposable);
} else
#endif /* SOCKET_RECV_PFLIP */
error = uiomove(mtod(m, char *) + moff, (int)len, uio);
@@ -1841,26 +1851,26 @@ dontblock:
int copy_flag;
if (flags & MSG_DONTWAIT)
- copy_flag = M_DONTWAIT;
+ copy_flag = M_NOWAIT;
else
copy_flag = M_WAIT;
- if (copy_flag == M_WAIT)
+ if (copy_flag == M_WAITOK)
SOCKBUF_UNLOCK(&so->so_rcv);
*mp = m_copym(m, 0, len, copy_flag);
- if (copy_flag == M_WAIT)
+ if (copy_flag == M_WAITOK)
SOCKBUF_LOCK(&so->so_rcv);
- if (*mp == NULL) {
- /*
- * m_copym() couldn't
+ if (*mp == NULL) {
+ /*
+ * m_copym() couldn't
* allocate an mbuf. Adjust
* uio_resid back (it was
* adjusted down by len
* bytes, which we didn't end
* up "copying" over).
- */
- uio->uio_resid += len;
- break;
- }
+ */
+ uio->uio_resid += len;
+ break;
+ }
}
m->m_data += len;
m->m_len -= len;
@@ -1893,7 +1903,8 @@ dontblock:
while (flags & MSG_WAITALL && m == NULL && uio->uio_resid > 0 &&
!sosendallatonce(so) && nextrecord == NULL) {
SOCKBUF_LOCK_ASSERT(&so->so_rcv);
- if (so->so_error || so->so_rcv.sb_state & SBS_CANTRCVMORE)
+ if (so->so_error ||
+ so->so_rcv.sb_state & SBS_CANTRCVMORE)
break;
/*
* Notify the protocol that some data has been
@@ -2114,7 +2125,7 @@ deliver:
KASSERT(sb->sb_mb != NULL,
("%s: len > 0 && sb->sb_mb empty", __func__));
- m = m_copym(sb->sb_mb, 0, len, M_DONTWAIT);
+ m = m_copym(sb->sb_mb, 0, len, M_NOWAIT);
if (m == NULL)
len = 0; /* Don't flush data from sockbuf. */
else
@@ -2382,9 +2393,8 @@ soshutdown(struct socket *so, int how)
return (EINVAL);
CURVNET_SET(so->so_vnet);
- if (pr->pr_usrreqs->pru_flush != NULL) {
- (*pr->pr_usrreqs->pru_flush)(so, how);
- }
+ if (pr->pr_usrreqs->pru_flush != NULL)
+ (*pr->pr_usrreqs->pru_flush)(so, how);
if (how != SHUT_WR)
sorflush(so);
if (how != SHUT_RD) {
@@ -2551,7 +2561,7 @@ sosetopt(struct socket *so, struct sockopt *sopt)
case SO_NO_DDP:
case SO_NO_OFFLOAD:
error = sooptcopyin(sopt, &optval, sizeof optval,
- sizeof optval);
+ sizeof optval);
if (error)
goto bad;
SOCK_LOCK(so);
@@ -2564,7 +2574,7 @@ sosetopt(struct socket *so, struct sockopt *sopt)
case SO_SETFIB:
error = sooptcopyin(sopt, &optval, sizeof optval,
- sizeof optval);
+ sizeof optval);
if (error)
goto bad;
@@ -2582,7 +2592,7 @@ sosetopt(struct socket *so, struct sockopt *sopt)
case SO_USER_COOKIE:
error = sooptcopyin(sopt, &val32, sizeof val32,
- sizeof val32);
+ sizeof val32);
if (error)
goto bad;
so->so_user_cookie = val32;
@@ -2593,7 +2603,7 @@ sosetopt(struct socket *so, struct sockopt *sopt)
case SO_SNDLOWAT:
case SO_RCVLOWAT:
error = sooptcopyin(sopt, &optval, sizeof optval,
- sizeof optval);
+ sizeof optval);
if (error)
goto bad;
@@ -2901,11 +2911,11 @@ soopt_getm(struct sockopt *sopt, struct mbuf **mp)
struct mbuf *m, *m_prev;
int sopt_size = sopt->sopt_valsize;
- MGET(m, sopt->sopt_td ? M_WAIT : M_DONTWAIT, MT_DATA);
+ MGET(m, sopt->sopt_td ? M_WAITOK : M_NOWAIT, MT_DATA);
if (m == NULL)
return ENOBUFS;
if (sopt_size > MLEN) {
- MCLGET(m, sopt->sopt_td ? M_WAIT : M_DONTWAIT);
+ MCLGET(m, sopt->sopt_td ? M_WAITOK : M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
return ENOBUFS;
@@ -2919,14 +2929,14 @@ soopt_getm(struct sockopt *sopt, struct mbuf **mp)
m_prev = m;
while (sopt_size) {
- MGET(m, sopt->sopt_td ? M_WAIT : M_DONTWAIT, MT_DATA);
+ MGET(m, sopt->sopt_td ? M_WAITOK : M_NOWAIT, MT_DATA);
if (m == NULL) {
m_freem(*mp);
return ENOBUFS;
}
if (sopt_size > MLEN) {
- MCLGET(m, sopt->sopt_td != NULL ? M_WAIT :
- M_DONTWAIT);
+ MCLGET(m, sopt->sopt_td != NULL ? M_WAITOK :
+ M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_freem(m);
m_freem(*mp);
@@ -2955,7 +2965,7 @@ soopt_mcopyin(struct sockopt *sopt, struct mbuf *m)
int error;
error = copyin(sopt->sopt_val, mtod(m, char *),
- m->m_len);
+ m->m_len);
if (error != 0) {
m_freem(m0);
return(error);
@@ -2984,17 +2994,17 @@ soopt_mcopyout(struct sockopt *sopt, struct mbuf *m)
int error;
error = copyout(mtod(m, char *), sopt->sopt_val,
- m->m_len);
+ m->m_len);
if (error != 0) {
m_freem(m0);
return(error);
}
} else
bcopy(mtod(m, char *), sopt->sopt_val, m->m_len);
- sopt->sopt_valsize -= m->m_len;
- sopt->sopt_val = (char *)sopt->sopt_val + m->m_len;
- valsize += m->m_len;
- m = m->m_next;
+ sopt->sopt_valsize -= m->m_len;
+ sopt->sopt_val = (char *)sopt->sopt_val + m->m_len;
+ valsize += m->m_len;
+ m = m->m_next;
}
if (m != NULL) {
/* enough soopt buffer should be given from user-land */
@@ -3322,7 +3332,7 @@ filt_solisten(struct knote *kn, long hint)
struct socket *so = kn->kn_fp->f_data;
kn->kn_data = so->so_qlen;
- return (! TAILQ_EMPTY(&so->so_comp));
+ return (!TAILQ_EMPTY(&so->so_comp));
}
int
@@ -3381,7 +3391,7 @@ soisconnecting(struct socket *so)
void
soisconnected(struct socket *so)
{
- struct socket *head;
+ struct socket *head;
int ret;
restart:
@@ -3409,7 +3419,7 @@ restart:
head->so_accf->so_accept_filter_arg);
so->so_options &= ~SO_ACCEPTFILTER;
ret = head->so_accf->so_accept_filter->accf_callback(so,
- head->so_accf->so_accept_filter_arg, M_DONTWAIT);
+ head->so_accf->so_accept_filter_arg, M_NOWAIT);
if (ret == SU_ISCONNECTED)
soupcall_clear(so, SO_RCV);
SOCK_UNLOCK(so);
@@ -3486,7 +3496,7 @@ soupcall_set(struct socket *so, int which,
int (*func)(struct socket *, void *, int), void *arg)
{
struct sockbuf *sb;
-
+
switch (which) {
case SO_RCV:
sb = &so->so_rcv;
@@ -3570,9 +3580,10 @@ sotoxsocket(struct socket *so, struct xsocket *xso)
*/
void
-so_listeners_apply_all(struct socket *so, void (*func)(struct socket *, void *), void *arg)
+so_listeners_apply_all(struct socket *so, void (*func)(struct socket *, void *),
+ void *arg)
{
-
+
TAILQ_FOREACH(so, &so->so_comp, so_list)
func(so, arg);
}
@@ -3692,11 +3703,13 @@ so_sowwakeup_locked(struct socket *so)
void
so_lock(struct socket *so)
{
+
SOCK_LOCK(so);
}
void
so_unlock(struct socket *so)
{
+
SOCK_UNLOCK(so);
}
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 8ecaa02..b29c2c6 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -722,7 +722,7 @@ sendit(td, s, mp, flags)
if (mp->msg_flags == MSG_COMPAT) {
struct cmsghdr *cm;
- M_PREPEND(control, sizeof(*cm), M_WAIT);
+ M_PREPEND(control, sizeof(*cm), M_WAITOK);
cm = mtod(control, struct cmsghdr *);
cm->cmsg_len = control->m_len;
cm->cmsg_level = SOL_SOCKET;
@@ -1661,9 +1661,9 @@ sockargs(mp, buf, buflen, type)
if ((u_int)buflen > MCLBYTES)
return (EINVAL);
}
- m = m_get(M_WAIT, type);
+ m = m_get(M_WAITOK, type);
if ((u_int)buflen > MLEN)
- MCLGET(m, M_WAIT);
+ MCLGET(m, M_WAITOK);
m->m_len = buflen;
error = copyin(buf, mtod(m, caddr_t), (u_int)buflen);
if (error)
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index c60b177..c732c70 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1778,6 +1778,7 @@ unp_init(void)
if (unp_zone == NULL)
panic("unp_init");
uma_zone_set_max(unp_zone, maxsockets);
+ uma_zone_set_warning(unp_zone, "kern.ipc.maxsockets limit reached");
EVENTHANDLER_REGISTER(maxsockets_change, unp_zone_change,
NULL, EVENTHANDLER_PRI_ANY);
LIST_INIT(&unp_dhead);
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 0480bd4..96c8442 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -2107,15 +2107,16 @@ restart:
if (maxsize != bp->b_kvasize) {
vm_offset_t addr = 0;
+ int rv;
bfreekva(bp);
vm_map_lock(buffer_map);
if (vm_map_findspace(buffer_map,
- vm_map_min(buffer_map), maxsize, &addr)) {
+ vm_map_min(buffer_map), maxsize, &addr)) {
/*
- * Uh oh. Buffer map is to fragmented. We
- * must defragment the map.
+ * Buffer map is too fragmented.
+ * We must defragment the map.
*/
atomic_add_int(&bufdefragcnt, 1);
vm_map_unlock(buffer_map);
@@ -2124,22 +2125,21 @@ restart:
brelse(bp);
goto restart;
}
- if (addr) {
- vm_map_insert(buffer_map, NULL, 0,
- addr, addr + maxsize,
- VM_PROT_ALL, VM_PROT_ALL, MAP_NOFAULT);
-
- bp->b_kvabase = (caddr_t) addr;
- bp->b_kvasize = maxsize;
- atomic_add_long(&bufspace, bp->b_kvasize);
- atomic_add_int(&bufreusecnt, 1);
- }
+ rv = vm_map_insert(buffer_map, NULL, 0, addr,
+ addr + maxsize, VM_PROT_ALL, VM_PROT_ALL,
+ MAP_NOFAULT);
+ KASSERT(rv == KERN_SUCCESS,
+ ("vm_map_insert(buffer_map) rv %d", rv));
vm_map_unlock(buffer_map);
+ bp->b_kvabase = (caddr_t)addr;
+ bp->b_kvasize = maxsize;
+ atomic_add_long(&bufspace, bp->b_kvasize);
+ atomic_add_int(&bufreusecnt, 1);
}
bp->b_saveaddr = bp->b_kvabase;
bp->b_data = bp->b_saveaddr;
}
- return(bp);
+ return (bp);
}
/*
@@ -2209,7 +2209,7 @@ buf_daemon()
while (numdirtybuffers > lodirtybuffers) {
if (buf_do_flush(NULL) == 0)
break;
- kern_yield(PRI_UNCHANGED);
+ kern_yield(PRI_USER);
}
lodirtybuffers = lodirtysave;
@@ -2605,8 +2605,6 @@ loop:
* If this check ever becomes a bottleneck it may be better to
* move it into the else, when gbincore() fails. At the moment
* it isn't a problem.
- *
- * XXX remove if 0 sections (clean this up after its proven)
*/
if (numfreebuffers == 0) {
if (TD_IS_IDLETHREAD(curthread))
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index 4185211..114c23e 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -208,7 +208,7 @@ vfs_hang_addrlist(struct mount *mp, struct netexport *nep,
np->netc_anon = crget();
np->netc_anon->cr_uid = argp->ex_anon.cr_uid;
crsetgroups(np->netc_anon, argp->ex_anon.cr_ngroups,
- np->netc_anon->cr_groups);
+ argp->ex_anon.cr_groups);
np->netc_anon->cr_prison = &prison0;
prison_hold(np->netc_anon->cr_prison);
np->netc_numsecflavors = argp->ex_numsecflavors;
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 25b79ae..5926e15 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -559,7 +559,7 @@ vfs_donmount(struct thread *td, uint64_t fsflags, struct uio *fsoptions)
if (error || fstype[fstypelen - 1] != '\0') {
error = EINVAL;
if (errmsg != NULL)
- strncpy(errmsg, "Invalid fstype", errmsg_len);
+ strlcpy(errmsg, "Invalid fstype", errmsg_len);
goto bail;
}
fspathlen = 0;
@@ -567,7 +567,7 @@ vfs_donmount(struct thread *td, uint64_t fsflags, struct uio *fsoptions)
if (error || fspath[fspathlen - 1] != '\0') {
error = EINVAL;
if (errmsg != NULL)
- strncpy(errmsg, "Invalid fspath", errmsg_len);
+ strlcpy(errmsg, "Invalid fspath", errmsg_len);
goto bail;
}
@@ -711,7 +711,7 @@ sys_mount(td, uap)
int error;
/*
- * Mount flags are now 64-bits. On 32-bit archtectures only
+ * Mount flags are now 64-bits. On 32-bit architectures only
* 32-bits are passed in, but from here on everything handles
* 64-bit flags correctly.
*/
@@ -1447,7 +1447,7 @@ vfs_filteropt(struct vfsoptlist *opts, const char **legal)
if (ret != 0) {
TAILQ_FOREACH(opt, opts, link) {
if (strcmp(opt->name, "errmsg") == 0) {
- strncpy((char *)opt->value, errmsg, opt->len);
+ strlcpy((char *)opt->value, errmsg, opt->len);
break;
}
}
@@ -1724,7 +1724,7 @@ __mnt_vnode_next(struct vnode **mvp, struct mount *mp)
KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch"));
if (should_yield()) {
MNT_IUNLOCK(mp);
- kern_yield(PRI_UNCHANGED);
+ kern_yield(PRI_USER);
MNT_ILOCK(mp);
}
vp = TAILQ_NEXT(*mvp, v_nmntvnodes);
diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c
index 83948f2..147926e 100644
--- a/sys/kern/vfs_mountroot.c
+++ b/sys/kern/vfs_mountroot.c
@@ -672,10 +672,11 @@ parse_mount_dev_present(const char *dev)
return (error != 0) ? 0 : 1;
}
+#define ERRMSGL 255
static int
parse_mount(char **conf)
{
- char errmsg[255];
+ char *errmsg;
struct mntarg *ma;
char *dev, *fs, *opts, *tok;
int delay, error, timeout;
@@ -707,7 +708,7 @@ parse_mount(char **conf)
printf("Trying to mount root from %s:%s [%s]...\n", fs, dev,
(opts != NULL) ? opts : "");
- bzero(errmsg, sizeof(errmsg));
+ errmsg = malloc(ERRMSGL, M_TEMP, M_WAITOK | M_ZERO);
if (vfs_byname(fs) == NULL) {
strlcpy(errmsg, "unknown file system", sizeof(errmsg));
@@ -734,7 +735,7 @@ parse_mount(char **conf)
ma = mount_arg(ma, "fstype", fs, -1);
ma = mount_arg(ma, "fspath", "/", -1);
ma = mount_arg(ma, "from", dev, -1);
- ma = mount_arg(ma, "errmsg", errmsg, sizeof(errmsg));
+ ma = mount_arg(ma, "errmsg", errmsg, ERRMSGL);
ma = mount_arg(ma, "ro", NULL, 0);
ma = parse_mountroot_options(ma, opts);
error = kernel_mount(ma, MNT_ROOTFS);
@@ -748,11 +749,13 @@ parse_mount(char **conf)
printf(".\n");
}
free(fs, M_TEMP);
+ free(errmsg, M_TEMP);
if (opts != NULL)
free(opts, M_TEMP);
/* kernel_mount can return -1 on error. */
return ((error < 0) ? EDOOFUS : error);
}
+#undef ERRMSGL
static int
vfs_mountroot_parse(struct sbuf *sb, struct mount *mpdevfs)
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 2c470df..7c243b6 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$");
#include <sys/reboot.h>
#include <sys/sched.h>
#include <sys/sleepqueue.h>
+#include <sys/smp.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
#include <sys/syslog.h>
@@ -740,7 +741,7 @@ next_iter:
continue;
MNT_IUNLOCK(mp);
yield:
- kern_yield(PRI_UNCHANGED);
+ kern_yield(PRI_USER);
relock_mnt:
MNT_ILOCK(mp);
}
@@ -852,7 +853,7 @@ vnlru_proc(void)
vnlru_nowhere++;
tsleep(vnlruproc, PPAUSE, "vlrup", hz * 3);
} else
- kern_yield(PRI_UNCHANGED);
+ kern_yield(PRI_USER);
}
}
@@ -4634,7 +4635,7 @@ __mnt_vnode_next_all(struct vnode **mvp, struct mount *mp)
struct vnode *vp;
if (should_yield())
- kern_yield(PRI_UNCHANGED);
+ kern_yield(PRI_USER);
MNT_ILOCK(mp);
KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch"));
vp = TAILQ_NEXT(*mvp, v_nmntvnodes);
@@ -4710,30 +4711,48 @@ __mnt_vnode_markerfree_all(struct vnode **mvp, struct mount *mp)
* These are helper functions for filesystems to traverse their
* active vnodes. See MNT_VNODE_FOREACH_ACTIVE() in sys/mount.h
*/
-struct vnode *
-__mnt_vnode_next_active(struct vnode **mvp, struct mount *mp)
+static void
+mnt_vnode_markerfree_active(struct vnode **mvp, struct mount *mp)
{
- struct vnode *vp, *nvp;
- if (should_yield())
- kern_yield(PRI_UNCHANGED);
+ KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch"));
+
MNT_ILOCK(mp);
-restart:
- mtx_lock(&vnode_free_list_mtx);
+ MNT_REL(mp);
+ MNT_IUNLOCK(mp);
+ free(*mvp, M_VNODE_MARKER);
+ *mvp = NULL;
+}
+
+static struct vnode *
+mnt_vnode_next_active(struct vnode **mvp, struct mount *mp)
+{
+ struct vnode *vp, *nvp;
+
+ mtx_assert(&vnode_free_list_mtx, MA_OWNED);
KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch"));
+restart:
vp = TAILQ_NEXT(*mvp, v_actfreelist);
+ TAILQ_REMOVE(&mp->mnt_activevnodelist, *mvp, v_actfreelist);
while (vp != NULL) {
if (vp->v_type == VMARKER) {
vp = TAILQ_NEXT(vp, v_actfreelist);
continue;
}
if (!VI_TRYLOCK(vp)) {
- mtx_unlock(&vnode_free_list_mtx);
- kern_yield(PRI_UNCHANGED);
- goto restart;
+ if (mp_ncpus == 1 || should_yield()) {
+ TAILQ_INSERT_BEFORE(vp, *mvp, v_actfreelist);
+ mtx_unlock(&vnode_free_list_mtx);
+ kern_yield(PRI_USER);
+ mtx_lock(&vnode_free_list_mtx);
+ goto restart;
+ }
+ continue;
}
- if (vp->v_mount == mp && vp->v_type != VMARKER &&
- (vp->v_iflag & VI_DOOMED) == 0)
+ KASSERT(vp->v_type != VMARKER, ("locked marker %p", vp));
+ KASSERT(vp->v_mount == mp || vp->v_mount == NULL,
+ ("alien vnode on the active list %p %p", vp, mp));
+ if (vp->v_mount == mp && (vp->v_iflag & VI_DOOMED) == 0)
break;
nvp = TAILQ_NEXT(vp, v_actfreelist);
VI_UNLOCK(vp);
@@ -4743,86 +4762,58 @@ restart:
/* Check if we are done */
if (vp == NULL) {
mtx_unlock(&vnode_free_list_mtx);
- __mnt_vnode_markerfree_active(mvp, mp);
- /* MNT_IUNLOCK(mp); -- done in above function */
- mtx_assert(MNT_MTX(mp), MA_NOTOWNED);
+ mnt_vnode_markerfree_active(mvp, mp);
return (NULL);
}
- TAILQ_REMOVE(&mp->mnt_activevnodelist, *mvp, v_actfreelist);
TAILQ_INSERT_AFTER(&mp->mnt_activevnodelist, vp, *mvp, v_actfreelist);
mtx_unlock(&vnode_free_list_mtx);
- MNT_IUNLOCK(mp);
ASSERT_VI_LOCKED(vp, "active iter");
KASSERT((vp->v_iflag & VI_ACTIVE) != 0, ("Non-active vp %p", vp));
return (vp);
}
struct vnode *
+__mnt_vnode_next_active(struct vnode **mvp, struct mount *mp)
+{
+
+ if (should_yield())
+ kern_yield(PRI_USER);
+ mtx_lock(&vnode_free_list_mtx);
+ return (mnt_vnode_next_active(mvp, mp));
+}
+
+struct vnode *
__mnt_vnode_first_active(struct vnode **mvp, struct mount *mp)
{
- struct vnode *vp, *nvp;
+ struct vnode *vp;
*mvp = malloc(sizeof(struct vnode), M_VNODE_MARKER, M_WAITOK | M_ZERO);
MNT_ILOCK(mp);
MNT_REF(mp);
+ MNT_IUNLOCK(mp);
(*mvp)->v_type = VMARKER;
+ (*mvp)->v_mount = mp;
-restart:
mtx_lock(&vnode_free_list_mtx);
vp = TAILQ_FIRST(&mp->mnt_activevnodelist);
- while (vp != NULL) {
- if (vp->v_type == VMARKER) {
- vp = TAILQ_NEXT(vp, v_actfreelist);
- continue;
- }
- if (!VI_TRYLOCK(vp)) {
- mtx_unlock(&vnode_free_list_mtx);
- kern_yield(PRI_UNCHANGED);
- goto restart;
- }
- if (vp->v_mount == mp && vp->v_type != VMARKER &&
- (vp->v_iflag & VI_DOOMED) == 0)
- break;
- nvp = TAILQ_NEXT(vp, v_actfreelist);
- VI_UNLOCK(vp);
- vp = nvp;
- }
-
- /* Check if we are done */
if (vp == NULL) {
mtx_unlock(&vnode_free_list_mtx);
- MNT_REL(mp);
- MNT_IUNLOCK(mp);
- free(*mvp, M_VNODE_MARKER);
- *mvp = NULL;
+ mnt_vnode_markerfree_active(mvp, mp);
return (NULL);
}
- (*mvp)->v_mount = mp;
- TAILQ_INSERT_AFTER(&mp->mnt_activevnodelist, vp, *mvp, v_actfreelist);
- mtx_unlock(&vnode_free_list_mtx);
- MNT_IUNLOCK(mp);
- ASSERT_VI_LOCKED(vp, "active iter first");
- KASSERT((vp->v_iflag & VI_ACTIVE) != 0, ("Non-active vp %p", vp));
- return (vp);
+ TAILQ_INSERT_BEFORE(vp, *mvp, v_actfreelist);
+ return (mnt_vnode_next_active(mvp, mp));
}
void
__mnt_vnode_markerfree_active(struct vnode **mvp, struct mount *mp)
{
- if (*mvp == NULL) {
- MNT_IUNLOCK(mp);
+ if (*mvp == NULL)
return;
- }
- mtx_assert(MNT_MTX(mp), MA_OWNED);
-
- KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch"));
mtx_lock(&vnode_free_list_mtx);
TAILQ_REMOVE(&mp->mnt_activevnodelist, *mvp, v_actfreelist);
mtx_unlock(&vnode_free_list_mtx);
- MNT_REL(mp);
- MNT_IUNLOCK(mp);
- free(*mvp, M_VNODE_MARKER);
- *mvp = NULL;
+ mnt_vnode_markerfree_active(mvp, mp);
}
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 3f65b05..bbe837a 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -1434,6 +1434,40 @@ vn_closefile(fp, td)
* proceed. If a suspend request is in progress, we wait until the
* suspension is over, and then proceed.
*/
+static int
+vn_start_write_locked(struct mount *mp, int flags)
+{
+ int error;
+
+ mtx_assert(MNT_MTX(mp), MA_OWNED);
+ error = 0;
+
+ /*
+ * Check on status of suspension.
+ */
+ if ((curthread->td_pflags & TDP_IGNSUSP) == 0 ||
+ mp->mnt_susp_owner != curthread) {
+ while ((mp->mnt_kern_flag & MNTK_SUSPEND) != 0) {
+ if (flags & V_NOWAIT) {
+ error = EWOULDBLOCK;
+ goto unlock;
+ }
+ error = msleep(&mp->mnt_flag, MNT_MTX(mp),
+ (PUSER - 1) | (flags & PCATCH), "suspfs", 0);
+ if (error)
+ goto unlock;
+ }
+ }
+ if (flags & V_XSLEEP)
+ goto unlock;
+ mp->mnt_writeopcount++;
+unlock:
+ if (error != 0 || (flags & V_XSLEEP) != 0)
+ MNT_REL(mp);
+ MNT_IUNLOCK(mp);
+ return (error);
+}
+
int
vn_start_write(vp, mpp, flags)
struct vnode *vp;
@@ -1470,30 +1504,7 @@ vn_start_write(vp, mpp, flags)
if (vp == NULL)
MNT_REF(mp);
- /*
- * Check on status of suspension.
- */
- if ((curthread->td_pflags & TDP_IGNSUSP) == 0 ||
- mp->mnt_susp_owner != curthread) {
- while ((mp->mnt_kern_flag & MNTK_SUSPEND) != 0) {
- if (flags & V_NOWAIT) {
- error = EWOULDBLOCK;
- goto unlock;
- }
- error = msleep(&mp->mnt_flag, MNT_MTX(mp),
- (PUSER - 1) | (flags & PCATCH), "suspfs", 0);
- if (error)
- goto unlock;
- }
- }
- if (flags & V_XSLEEP)
- goto unlock;
- mp->mnt_writeopcount++;
-unlock:
- if (error != 0 || (flags & V_XSLEEP) != 0)
- MNT_REL(mp);
- MNT_IUNLOCK(mp);
- return (error);
+ return (vn_start_write_locked(mp, flags));
}
/*
@@ -1639,8 +1650,7 @@ vfs_write_suspend(mp)
* Request a filesystem to resume write operations.
*/
void
-vfs_write_resume(mp)
- struct mount *mp;
+vfs_write_resume_flags(struct mount *mp, int flags)
{
MNT_ILOCK(mp);
@@ -1652,10 +1662,26 @@ vfs_write_resume(mp)
wakeup(&mp->mnt_writeopcount);
wakeup(&mp->mnt_flag);
curthread->td_pflags &= ~TDP_IGNSUSP;
+ if ((flags & VR_START_WRITE) != 0) {
+ MNT_REF(mp);
+ mp->mnt_writeopcount++;
+ }
MNT_IUNLOCK(mp);
- VFS_SUSP_CLEAN(mp);
- } else
+ if ((flags & VR_NO_SUSPCLR) == 0)
+ VFS_SUSP_CLEAN(mp);
+ } else if ((flags & VR_START_WRITE) != 0) {
+ MNT_REF(mp);
+ vn_start_write_locked(mp, 0);
+ } else {
MNT_IUNLOCK(mp);
+ }
+}
+
+void
+vfs_write_resume(struct mount *mp)
+{
+
+ vfs_write_resume_flags(mp, 0);
}
/*
diff --git a/sys/kgssapi/gss_accept_sec_context.c b/sys/kgssapi/gss_accept_sec_context.c
index 59f2803..3758a4a 100644
--- a/sys/kgssapi/gss_accept_sec_context.c
+++ b/sys/kgssapi/gss_accept_sec_context.c
@@ -31,7 +31,9 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/kobj.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <kgssapi/gssapi.h>
#include <kgssapi/gssapi_impl.h>
@@ -58,9 +60,13 @@ OM_uint32 gss_accept_sec_context(OM_uint32 *minor_status,
gss_ctx_id_t ctx = *context_handle;
gss_name_t name;
gss_cred_id_t cred;
+ CLIENT *cl;
- if (!kgss_gssd_handle)
+ cl = kgss_gssd_client();
+ if (cl == NULL) {
+ *minor_status = 0;
return (GSS_S_FAILURE);
+ }
if (ctx)
args.ctx = ctx->handle;
@@ -74,7 +80,8 @@ OM_uint32 gss_accept_sec_context(OM_uint32 *minor_status,
args.input_chan_bindings = input_chan_bindings;
bzero(&res, sizeof(res));
- stat = gssd_accept_sec_context_1(&args, &res, kgss_gssd_handle);
+ stat = gssd_accept_sec_context_1(&args, &res, cl);
+ CLNT_RELEASE(cl);
if (stat != RPC_SUCCESS) {
*minor_status = stat;
return (GSS_S_FAILURE);
diff --git a/sys/kgssapi/gss_acquire_cred.c b/sys/kgssapi/gss_acquire_cred.c
index e5fe821..4a5f115 100644
--- a/sys/kgssapi/gss_acquire_cred.c
+++ b/sys/kgssapi/gss_acquire_cred.c
@@ -31,7 +31,9 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/kobj.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <sys/proc.h>
#include <kgssapi/gssapi.h>
@@ -55,8 +57,11 @@ gss_acquire_cred(OM_uint32 *minor_status,
enum clnt_stat stat;
gss_cred_id_t cred;
int i;
+ CLIENT *cl;
- if (!kgss_gssd_handle)
+ *minor_status = 0;
+ cl = kgss_gssd_client();
+ if (cl == NULL)
return (GSS_S_FAILURE);
args.uid = curthread->td_ucred->cr_uid;
@@ -69,7 +74,8 @@ gss_acquire_cred(OM_uint32 *minor_status,
args.cred_usage = cred_usage;
bzero(&res, sizeof(res));
- stat = gssd_acquire_cred_1(&args, &res, kgss_gssd_handle);
+ stat = gssd_acquire_cred_1(&args, &res, cl);
+ CLNT_RELEASE(cl);
if (stat != RPC_SUCCESS) {
*minor_status = stat;
return (GSS_S_FAILURE);
@@ -80,7 +86,6 @@ gss_acquire_cred(OM_uint32 *minor_status,
return (res.major_status);
}
- *minor_status = 0;
cred = malloc(sizeof(struct _gss_cred_id_t), M_GSSAPI, M_WAITOK);
cred->handle = res.output_cred;
*output_cred_handle = cred;
diff --git a/sys/kgssapi/gss_canonicalize_name.c b/sys/kgssapi/gss_canonicalize_name.c
index bea3dd8..940f64a 100644
--- a/sys/kgssapi/gss_canonicalize_name.c
+++ b/sys/kgssapi/gss_canonicalize_name.c
@@ -31,7 +31,9 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/kobj.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <kgssapi/gssapi.h>
#include <kgssapi/gssapi_impl.h>
@@ -48,15 +50,19 @@ gss_canonicalize_name(OM_uint32 *minor_status,
struct canonicalize_name_args args;
enum clnt_stat stat;
gss_name_t name;
+ CLIENT *cl;
- if (!kgss_gssd_handle)
+ *minor_status = 0;
+ cl = kgss_gssd_client();
+ if (cl == NULL)
return (GSS_S_FAILURE);
args.input_name = input_name->handle;
args.mech_type = mech_type;
bzero(&res, sizeof(res));
- stat = gssd_canonicalize_name_1(&args, &res, kgss_gssd_handle);
+ stat = gssd_canonicalize_name_1(&args, &res, cl);
+ CLNT_RELEASE(cl);
if (stat != RPC_SUCCESS) {
*minor_status = stat;
return (GSS_S_FAILURE);
@@ -69,7 +75,6 @@ gss_canonicalize_name(OM_uint32 *minor_status,
name = malloc(sizeof(struct _gss_name_t), M_GSSAPI, M_WAITOK);
name->handle = res.output_name;
- *minor_status = 0;
*output_name = name;
return (GSS_S_COMPLETE);
diff --git a/sys/kgssapi/gss_delete_sec_context.c b/sys/kgssapi/gss_delete_sec_context.c
index e1582a2..8689927 100644
--- a/sys/kgssapi/gss_delete_sec_context.c
+++ b/sys/kgssapi/gss_delete_sec_context.c
@@ -31,7 +31,9 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/kobj.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <kgssapi/gssapi.h>
#include <kgssapi/gssapi_impl.h>
@@ -46,6 +48,9 @@ gss_delete_sec_context(OM_uint32 *minor_status, gss_ctx_id_t *context_handle,
struct delete_sec_context_args args;
enum clnt_stat stat;
gss_ctx_id_t ctx;
+ CLIENT *cl;
+
+ *minor_status = 0;
if (!kgss_gssd_handle)
return (GSS_S_FAILURE);
@@ -60,9 +65,13 @@ gss_delete_sec_context(OM_uint32 *minor_status, gss_ctx_id_t *context_handle,
*/
if (ctx->handle) {
args.ctx = ctx->handle;
+ cl = kgss_gssd_client();
+ if (cl == NULL)
+ return (GSS_S_FAILURE);
bzero(&res, sizeof(res));
- stat = gssd_delete_sec_context_1(&args, &res, kgss_gssd_handle);
+ stat = gssd_delete_sec_context_1(&args, &res, cl);
+ CLNT_RELEASE(cl);
if (stat != RPC_SUCCESS) {
*minor_status = stat;
return (GSS_S_FAILURE);
@@ -85,7 +94,5 @@ gss_delete_sec_context(OM_uint32 *minor_status, gss_ctx_id_t *context_handle,
}
}
- *minor_status = 0;
-
return (GSS_S_COMPLETE);
}
diff --git a/sys/kgssapi/gss_display_status.c b/sys/kgssapi/gss_display_status.c
index 0b5b79d..e03a376 100644
--- a/sys/kgssapi/gss_display_status.c
+++ b/sys/kgssapi/gss_display_status.c
@@ -31,7 +31,9 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/kobj.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <kgssapi/gssapi.h>
#include <kgssapi/gssapi_impl.h>
@@ -49,8 +51,11 @@ gss_display_status(OM_uint32 *minor_status,
struct display_status_res res;
struct display_status_args args;
enum clnt_stat stat;
+ CLIENT *cl;
- if (!kgss_gssd_handle)
+ *minor_status = 0;
+ cl = kgss_gssd_client();
+ if (cl == NULL)
return (GSS_S_FAILURE);
args.status_value = status_value;
@@ -59,7 +64,8 @@ gss_display_status(OM_uint32 *minor_status,
args.message_context = *message_context;
bzero(&res, sizeof(res));
- stat = gssd_display_status_1(&args, &res, kgss_gssd_handle);
+ stat = gssd_display_status_1(&args, &res, cl);
+ CLNT_RELEASE(cl);
if (stat != RPC_SUCCESS) {
*minor_status = stat;
return (GSS_S_FAILURE);
@@ -70,7 +76,6 @@ gss_display_status(OM_uint32 *minor_status,
return (res.major_status);
}
- *minor_status = 0;
*message_context = res.message_context;
kgss_copy_buffer(&res.status_string, status_string);
xdr_free((xdrproc_t) xdr_display_status_res, &res);
diff --git a/sys/kgssapi/gss_export_name.c b/sys/kgssapi/gss_export_name.c
index 63c1e8a..23c3ed8 100644
--- a/sys/kgssapi/gss_export_name.c
+++ b/sys/kgssapi/gss_export_name.c
@@ -31,7 +31,9 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/kobj.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <kgssapi/gssapi.h>
#include <kgssapi/gssapi_impl.h>
@@ -45,14 +47,18 @@ gss_export_name(OM_uint32 *minor_status, gss_name_t input_name,
struct export_name_res res;
struct export_name_args args;
enum clnt_stat stat;
+ CLIENT *cl;
- if (!kgss_gssd_handle)
+ *minor_status = 0;
+ cl = kgss_gssd_client();
+ if (cl == NULL)
return (GSS_S_FAILURE);
args.input_name = input_name->handle;
bzero(&res, sizeof(res));
- stat = gssd_export_name_1(&args, &res, kgss_gssd_handle);
+ stat = gssd_export_name_1(&args, &res, cl);
+ CLNT_RELEASE(cl);
if (stat != RPC_SUCCESS) {
*minor_status = stat;
return (GSS_S_FAILURE);
@@ -63,7 +69,6 @@ gss_export_name(OM_uint32 *minor_status, gss_name_t input_name,
return (res.major_status);
}
- *minor_status = 0;
kgss_copy_buffer(&res.exported_name, exported_name);
xdr_free((xdrproc_t) xdr_export_name_res, &res);
diff --git a/sys/kgssapi/gss_impl.c b/sys/kgssapi/gss_impl.c
index d66b4a9..365a876 100644
--- a/sys/kgssapi/gss_impl.c
+++ b/sys/kgssapi/gss_impl.c
@@ -31,8 +31,10 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/kobj.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/module.h>
+#include <sys/mutex.h>
#include <sys/priv.h>
#include <sys/syscall.h>
#include <sys/sysent.h>
@@ -59,6 +61,7 @@ static bool_t gssd_syscall_registered = FALSE;
struct kgss_mech_list kgss_mechs;
CLIENT *kgss_gssd_handle;
+struct mtx kgss_gssd_lock;
static void
kgss_init(void *dummy)
@@ -92,14 +95,12 @@ sys_gssd_syscall(struct thread *td, struct gssd_syscall_args *uap)
struct netconfig *nconf;
char path[MAXPATHLEN];
int error;
+ CLIENT *cl, *oldcl;
error = priv_check(td, PRIV_NFS_DAEMON);
if (error)
return (error);
- if (kgss_gssd_handle)
- CLNT_DESTROY(kgss_gssd_handle);
-
error = copyinstr(uap->path, path, sizeof(path), NULL);
if (error)
return (error);
@@ -109,10 +110,20 @@ sys_gssd_syscall(struct thread *td, struct gssd_syscall_args *uap)
sun.sun_len = SUN_LEN(&sun);
nconf = getnetconfigent("local");
- kgss_gssd_handle = clnt_reconnect_create(nconf,
+ cl = clnt_reconnect_create(nconf,
(struct sockaddr *) &sun, GSSD, GSSDVERS,
RPC_MAXDATASIZE, RPC_MAXDATASIZE);
+ mtx_lock(&kgss_gssd_lock);
+ oldcl = kgss_gssd_handle;
+ kgss_gssd_handle = cl;
+ mtx_unlock(&kgss_gssd_lock);
+
+ if (oldcl != NULL) {
+ CLNT_CLOSE(oldcl);
+ CLNT_RELEASE(oldcl);
+ }
+
return (0);
}
@@ -249,6 +260,23 @@ kgss_copy_buffer(const gss_buffer_t from, gss_buffer_t to)
}
/*
+ * Acquire the kgss_gssd_handle and return it with a reference count,
+ * if it is available.
+ */
+CLIENT *
+kgss_gssd_client(void)
+{
+ CLIENT *cl;
+
+ mtx_lock(&kgss_gssd_lock);
+ cl = kgss_gssd_handle;
+ if (cl != NULL)
+ CLNT_ACQUIRE(cl);
+ mtx_unlock(&kgss_gssd_lock);
+ return (cl);
+}
+
+/*
* Kernel module glue
*/
static int
@@ -280,6 +308,7 @@ kgssapi_modevent(module_t mod, int type, void *data)
rpc_gss_get_principal_name;
rpc_gss_entries.rpc_gss_svc_max_data_length =
rpc_gss_svc_max_data_length;
+ mtx_init(&kgss_gssd_lock, "kgss_gssd_lock", NULL, MTX_DEF);
break;
case MOD_UNLOAD:
/*
diff --git a/sys/kgssapi/gss_import_name.c b/sys/kgssapi/gss_import_name.c
index c8019c5..d3a2240 100644
--- a/sys/kgssapi/gss_import_name.c
+++ b/sys/kgssapi/gss_import_name.c
@@ -31,7 +31,9 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/kobj.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <kgssapi/gssapi.h>
#include <kgssapi/gssapi_impl.h>
@@ -48,18 +50,21 @@ gss_import_name(OM_uint32 *minor_status,
struct import_name_args args;
enum clnt_stat stat;
gss_name_t name;
+ CLIENT *cl;
*minor_status = 0;
*output_name = GSS_C_NO_NAME;
- if (!kgss_gssd_handle)
+ cl = kgss_gssd_client();
+ if (cl == NULL)
return (GSS_S_FAILURE);
args.input_name_buffer = *input_name_buffer;
args.input_name_type = input_name_type;
bzero(&res, sizeof(res));
- stat = gssd_import_name_1(&args, &res, kgss_gssd_handle);
+ stat = gssd_import_name_1(&args, &res, cl);
+ CLNT_RELEASE(cl);
if (stat != RPC_SUCCESS) {
*minor_status = stat;
return (GSS_S_FAILURE);
diff --git a/sys/kgssapi/gss_init_sec_context.c b/sys/kgssapi/gss_init_sec_context.c
index 0b7cee3..64999e4 100644
--- a/sys/kgssapi/gss_init_sec_context.c
+++ b/sys/kgssapi/gss_init_sec_context.c
@@ -31,7 +31,9 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/kobj.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <sys/proc.h>
#include <kgssapi/gssapi.h>
@@ -60,10 +62,12 @@ gss_init_sec_context(OM_uint32 * minor_status,
struct init_sec_context_args args;
enum clnt_stat stat;
gss_ctx_id_t ctx = *context_handle;
+ CLIENT *cl;
*minor_status = 0;
- if (!kgss_gssd_handle)
+ cl = kgss_gssd_client();
+ if (cl == NULL)
return (GSS_S_FAILURE);
args.uid = curthread->td_ucred->cr_uid;
@@ -88,7 +92,8 @@ gss_init_sec_context(OM_uint32 * minor_status,
}
bzero(&res, sizeof(res));
- stat = gssd_init_sec_context_1(&args, &res, kgss_gssd_handle);
+ stat = gssd_init_sec_context_1(&args, &res, cl);
+ CLNT_RELEASE(cl);
if (stat != RPC_SUCCESS) {
*minor_status = stat;
return (GSS_S_FAILURE);
diff --git a/sys/kgssapi/gss_pname_to_uid.c b/sys/kgssapi/gss_pname_to_uid.c
index b83fd73..45ead36 100644
--- a/sys/kgssapi/gss_pname_to_uid.c
+++ b/sys/kgssapi/gss_pname_to_uid.c
@@ -31,7 +31,9 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/kobj.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <kgssapi/gssapi.h>
#include <kgssapi/gssapi_impl.h>
@@ -45,20 +47,23 @@ gss_pname_to_uid(OM_uint32 *minor_status, const gss_name_t pname,
struct pname_to_uid_res res;
struct pname_to_uid_args args;
enum clnt_stat stat;
+ CLIENT *cl;
*minor_status = 0;
- if (!kgss_gssd_handle)
- return (GSS_S_FAILURE);
-
if (pname == GSS_C_NO_NAME)
return (GSS_S_BAD_NAME);
+ cl = kgss_gssd_client();
+ if (cl == NULL)
+ return (GSS_S_FAILURE);
+
args.pname = pname->handle;
args.mech = mech;
bzero(&res, sizeof(res));
- stat = gssd_pname_to_uid_1(&args, &res, kgss_gssd_handle);
+ stat = gssd_pname_to_uid_1(&args, &res, cl);
+ CLNT_RELEASE(cl);
if (stat != RPC_SUCCESS) {
*minor_status = stat;
return (GSS_S_FAILURE);
@@ -83,20 +88,23 @@ gss_pname_to_unix_cred(OM_uint32 *minor_status, const gss_name_t pname,
struct pname_to_uid_args args;
enum clnt_stat stat;
int i, n;
+ CLIENT *cl;
*minor_status = 0;
- if (!kgss_gssd_handle)
- return (GSS_S_FAILURE);
-
if (pname == GSS_C_NO_NAME)
return (GSS_S_BAD_NAME);
+ cl = kgss_gssd_client();
+ if (cl == NULL)
+ return (GSS_S_FAILURE);
+
args.pname = pname->handle;
args.mech = mech;
bzero(&res, sizeof(res));
- stat = gssd_pname_to_uid_1(&args, &res, kgss_gssd_handle);
+ stat = gssd_pname_to_uid_1(&args, &res, cl);
+ CLNT_RELEASE(cl);
if (stat != RPC_SUCCESS) {
*minor_status = stat;
return (GSS_S_FAILURE);
diff --git a/sys/kgssapi/gss_release_cred.c b/sys/kgssapi/gss_release_cred.c
index 6c68496..cad36fb 100644
--- a/sys/kgssapi/gss_release_cred.c
+++ b/sys/kgssapi/gss_release_cred.c
@@ -31,7 +31,9 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/kobj.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <kgssapi/gssapi.h>
#include <kgssapi/gssapi_impl.h>
@@ -44,13 +46,21 @@ gss_release_cred(OM_uint32 *minor_status, gss_cred_id_t *cred_handle)
struct release_cred_res res;
struct release_cred_args args;
enum clnt_stat stat;
+ CLIENT *cl;
+
+ *minor_status = 0;
if (!kgss_gssd_handle)
return (GSS_S_FAILURE);
if (*cred_handle) {
args.cred = (*cred_handle)->handle;
- stat = gssd_release_cred_1(&args, &res, kgss_gssd_handle);
+
+ cl = kgss_gssd_client();
+ if (cl == NULL)
+ return (GSS_S_FAILURE);
+ stat = gssd_release_cred_1(&args, &res, cl);
+ CLNT_RELEASE(cl);
if (stat != RPC_SUCCESS) {
*minor_status = stat;
return (GSS_S_FAILURE);
@@ -63,7 +73,5 @@ gss_release_cred(OM_uint32 *minor_status, gss_cred_id_t *cred_handle)
return (res.major_status);
}
- *minor_status = 0;
-
return (GSS_S_COMPLETE);
}
diff --git a/sys/kgssapi/gss_release_name.c b/sys/kgssapi/gss_release_name.c
index 6f27e74..abda878 100644
--- a/sys/kgssapi/gss_release_name.c
+++ b/sys/kgssapi/gss_release_name.c
@@ -31,7 +31,9 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/kobj.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <kgssapi/gssapi.h>
#include <kgssapi/gssapi_impl.h>
@@ -45,6 +47,9 @@ gss_release_name(OM_uint32 *minor_status, gss_name_t *input_name)
struct release_name_args args;
enum clnt_stat stat;
gss_name_t name;
+ CLIENT *cl;
+
+ *minor_status = 0;
if (!kgss_gssd_handle)
return (GSS_S_FAILURE);
@@ -53,7 +58,11 @@ gss_release_name(OM_uint32 *minor_status, gss_name_t *input_name)
name = *input_name;
args.input_name = name->handle;
- stat = gssd_release_name_1(&args, &res, kgss_gssd_handle);
+ cl = kgss_gssd_client();
+ if (cl == NULL)
+ return (GSS_S_FAILURE);
+ stat = gssd_release_name_1(&args, &res, cl);
+ CLNT_RELEASE(cl);
if (stat != RPC_SUCCESS) {
*minor_status = stat;
return (GSS_S_FAILURE);
@@ -68,7 +77,5 @@ gss_release_name(OM_uint32 *minor_status, gss_name_t *input_name)
}
}
- *minor_status = 0;
-
return (GSS_S_COMPLETE);
}
diff --git a/sys/kgssapi/gss_set_cred_option.c b/sys/kgssapi/gss_set_cred_option.c
index ce781af..d3b9a46 100644
--- a/sys/kgssapi/gss_set_cred_option.c
+++ b/sys/kgssapi/gss_set_cred_option.c
@@ -31,7 +31,9 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/kobj.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <kgssapi/gssapi.h>
#include <kgssapi/gssapi_impl.h>
@@ -47,10 +49,12 @@ gss_set_cred_option(OM_uint32 *minor_status,
struct set_cred_option_res res;
struct set_cred_option_args args;
enum clnt_stat stat;
+ CLIENT *cl;
*minor_status = 0;
- if (!kgss_gssd_handle)
+ cl = kgss_gssd_client();
+ if (cl == NULL)
return (GSS_S_FAILURE);
if (cred)
@@ -61,7 +65,8 @@ gss_set_cred_option(OM_uint32 *minor_status,
args.option_value = *option_value;
bzero(&res, sizeof(res));
- stat = gssd_set_cred_option_1(&args, &res, kgss_gssd_handle);
+ stat = gssd_set_cred_option_1(&args, &res, cl);
+ CLNT_RELEASE(cl);
if (stat != RPC_SUCCESS) {
*minor_status = stat;
diff --git a/sys/kgssapi/gssapi_impl.h b/sys/kgssapi/gssapi_impl.h
index 629b80b..c143255 100644
--- a/sys/kgssapi/gssapi_impl.h
+++ b/sys/kgssapi/gssapi_impl.h
@@ -53,8 +53,10 @@ struct kgss_mech {
LIST_HEAD(kgss_mech_list, kgss_mech);
extern CLIENT *kgss_gssd_handle;
+extern struct mtx kgss_gssd_lock;
extern struct kgss_mech_list kgss_mechs;
+CLIENT *kgss_gssd_client(void);
int kgss_oid_equal(const gss_OID oid1, const gss_OID oid2);
extern void kgss_install_mech(gss_OID mech_type, const char *name,
struct kobj_class *cls);
diff --git a/sys/mips/adm5120/if_admsw.c b/sys/mips/adm5120/if_admsw.c
index b3f6e3b..f17df00 100644
--- a/sys/mips/adm5120/if_admsw.c
+++ b/sys/mips/adm5120/if_admsw.c
@@ -647,14 +647,14 @@ admsw_start(struct ifnet *ifp)
if (m0->m_pkthdr.len < ETHER_MIN_LEN ||
bus_dmamap_load_mbuf(sc->sc_bufs_dmat, dmamap, m0,
admsw_mbuf_map_addr, ds, BUS_DMA_NOWAIT) != 0) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
device_printf(sc->sc_dev,
"unable to allocate Tx mbuf\n");
break;
}
if (m0->m_pkthdr.len > MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
device_printf(sc->sc_dev,
"unable to allocate Tx cluster\n");
@@ -1222,11 +1222,11 @@ admsw_add_rxbuf(struct admsw_softc *sc, int idx, int high)
else
ds = &sc->sc_rxlsoft[idx];
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return (ENOBUFS);
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_freem(m);
return (ENOBUFS);
diff --git a/sys/mips/atheros/if_arge.c b/sys/mips/atheros/if_arge.c
index 6c63982..247d331 100644
--- a/sys/mips/atheros/if_arge.c
+++ b/sys/mips/atheros/if_arge.c
@@ -1090,7 +1090,7 @@ arge_encap(struct arge_softc *sc, struct mbuf **m_head)
m = *m_head;
if (! arge_mbuf_chain_is_tx_aligned(m)) {
sc->stats.tx_pkts_unaligned++;
- m = m_defrag(*m_head, M_DONTWAIT);
+ m = m_defrag(*m_head, M_NOWAIT);
if (m == NULL) {
*m_head = NULL;
return (ENOBUFS);
@@ -1772,7 +1772,7 @@ arge_newbuf(struct arge_softc *sc, int idx)
bus_dmamap_t map;
int nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES;
diff --git a/sys/mips/beri/beri_machdep.c b/sys/mips/beri/beri_machdep.c
index 8bcd529..f2ef5a7 100644
--- a/sys/mips/beri/beri_machdep.c
+++ b/sys/mips/beri/beri_machdep.c
@@ -1,7 +1,12 @@
/*-
* Copyright (c) 2006 Wojciech A. Koszek <wkoszek@FreeBSD.org>
+ * Copyright (c) 2012 Robert N. M. Watson
* All rights reserved.
*
+ * This software was developed by SRI International and the University of
+ * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
+ * ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -27,6 +32,7 @@
__FBSDID("$FreeBSD$");
#include "opt_ddb.h"
+#include "opt_platform.h"
#include <sys/param.h>
#include <sys/conf.h>
@@ -49,6 +55,11 @@ __FBSDID("$FreeBSD$");
#include <sys/sysproto.h>
#include <sys/user.h>
+#ifdef FDT
+#include <dev/fdt/fdt_common.h>
+#include <dev/ofw/openfirm.h>
+#endif
+
#include <vm/vm.h>
#include <vm/vm_object.h>
#include <vm/vm_page.h>
@@ -76,6 +87,17 @@ mips_init(void)
{
int i;
+#ifdef FDT
+#ifndef FDT_DTB_STATIC
+#error "mips_init with FDT requires FDT_DTB_STATIC"
+#endif
+
+ if (OF_install(OFW_FDT, 0) == FALSE)
+ while (1);
+ if (OF_init(&fdt_static_dtb) != 0)
+ while (1);
+#endif
+
for (i = 0; i < 10; i++) {
phys_avail[i] = 0;
}
diff --git a/sys/mips/cavium/if_octm.c b/sys/mips/cavium/if_octm.c
index c6778ff..bfb5897 100644
--- a/sys/mips/cavium/if_octm.c
+++ b/sys/mips/cavium/if_octm.c
@@ -505,7 +505,7 @@ octm_rx_intr(void *arg)
}
for (;;) {
- struct mbuf *m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ struct mbuf *m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) {
device_printf(sc->sc_dev, "no memory for receive mbuf.\n");
return;
diff --git a/sys/mips/cavium/octe/ethernet-mem.c b/sys/mips/cavium/octe/ethernet-mem.c
index d7af1ae..d101d7c 100644
--- a/sys/mips/cavium/octe/ethernet-mem.c
+++ b/sys/mips/cavium/octe/ethernet-mem.c
@@ -57,7 +57,7 @@ int cvm_oct_mem_fill_fpa(int pool, int size, int elements)
while (freed) {
KASSERT(size <= MCLBYTES - 128, ("mbuf clusters are too small"));
- struct mbuf *m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ struct mbuf *m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (__predict_false(m == NULL)) {
printf("Failed to allocate mbuf for hardware pool %d\n", pool);
break;
diff --git a/sys/mips/cavium/octe/ethernet-rx.c b/sys/mips/cavium/octe/ethernet-rx.c
index 0f00245..910d6bd 100644
--- a/sys/mips/cavium/octe/ethernet-rx.c
+++ b/sys/mips/cavium/octe/ethernet-rx.c
@@ -228,7 +228,7 @@ void cvm_oct_tasklet_rx(void *context, int pending)
/* We have to copy the packet. First allocate an
mbuf for it */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
DEBUGPRINT("Port %d failed to allocate mbuf, packet dropped\n", work->word1.cn38xx.ipprt);
cvm_oct_free_work(work);
diff --git a/sys/mips/idt/if_kr.c b/sys/mips/idt/if_kr.c
index b43defa..aa533eb 100644
--- a/sys/mips/idt/if_kr.c
+++ b/sys/mips/idt/if_kr.c
@@ -1305,7 +1305,7 @@ kr_newbuf(struct kr_softc *sc, int idx)
bus_dmamap_t map;
int nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES;
diff --git a/sys/mips/include/param.h b/sys/mips/include/param.h
index c700a44..57c80b1 100644
--- a/sys/mips/include/param.h
+++ b/sys/mips/include/param.h
@@ -163,20 +163,6 @@
#define KSTACK_PAGES 2 /* kernel stack */
#define KSTACK_GUARD_PAGES 2 /* pages of kstack guard; 0 disables */
-#define UPAGES 2
-
-/* pages ("clicks") (4096 bytes) to disk blocks */
-#define ctod(x) ((x) << (PAGE_SHIFT - DEV_BSHIFT))
-#define dtoc(x) ((x) >> (PAGE_SHIFT - DEV_BSHIFT))
-
-/*
- * Map a ``block device block'' to a file system block.
- * This should be device dependent, and should use the bsize
- * field from the disk label.
- * For now though just use DEV_BSIZE.
- */
-#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE))
-
/*
* Mach derived conversion macros
*/
diff --git a/sys/mips/nlm/dev/net/xlpge.c b/sys/mips/nlm/dev/net/xlpge.c
index 3af802e..0e41559 100644
--- a/sys/mips/nlm/dev/net/xlpge.c
+++ b/sys/mips/nlm/dev/net/xlpge.c
@@ -1125,7 +1125,7 @@ get_buf(void)
vm_paddr_t temp1, temp2;
#endif
- if ((m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR)) == NULL)
+ if ((m_new = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR)) == NULL)
return (NULL);
m_new->m_len = m_new->m_pkthdr.len = MCLBYTES;
m_adj(m_new, NAE_CACHELINE_SIZE - ((uintptr_t)m_new->m_data & 0x1f));
diff --git a/sys/mips/rmi/dev/nlge/if_nlge.c b/sys/mips/rmi/dev/nlge/if_nlge.c
index a25ebe3..331064a 100644
--- a/sys/mips/rmi/dev/nlge/if_nlge.c
+++ b/sys/mips/rmi/dev/nlge/if_nlge.c
@@ -2158,7 +2158,7 @@ get_buf(void)
vm_paddr_t temp1, temp2;
#endif
- if ((m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR)) == NULL)
+ if ((m_new = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR)) == NULL)
return (NULL);
m_new->m_len = m_new->m_pkthdr.len = MCLBYTES;
m_adj(m_new, XLR_CACHELINE_SIZE - ((uintptr_t)m_new->m_data & 0x1f));
diff --git a/sys/mips/rmi/dev/xlr/rge.c b/sys/mips/rmi/dev/xlr/rge.c
index 1af97c2..2d2ba9e 100644
--- a/sys/mips/rmi/dev/xlr/rge.c
+++ b/sys/mips/rmi/dev/xlr/rge.c
@@ -568,7 +568,7 @@ get_mbuf(void)
{
struct mbuf *m_new = NULL;
- if ((m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR)) == NULL)
+ if ((m_new = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR)) == NULL)
return NULL;
m_new->m_len = MCLBYTES;
diff --git a/sys/modules/ath/Makefile b/sys/modules/ath/Makefile
index 6c27c0a..7e65785 100644
--- a/sys/modules/ath/Makefile
+++ b/sys/modules/ath/Makefile
@@ -35,9 +35,9 @@ ATH_RATE?= sample # tx rate control algorithm
.PATH: ${.CURDIR}/../../dev/ath/ath_hal
KMOD= if_ath
-SRCS= if_ath.c if_ath_debug.c if_ath_keycache.c if_ath_sysctl.c
+SRCS= if_ath.c if_ath_alq.c if_ath_debug.c if_ath_keycache.c if_ath_sysctl.c
SRCS+= if_ath_tx.c if_ath_tx_ht.c if_ath_led.c if_ath_rx.c if_ath_tdma.c
-SRCS+= if_ath_beacon.c if_ath_rx_edma.c if_ath_tx_edma.c
+SRCS+= if_ath_beacon.c if_ath_rx_edma.c if_ath_tx_edma.c if_ath_spectral.c
# NB: v3 eeprom support used by both AR5211 and AR5212; just include it
SRCS+= ah_osdep.c ah.c ah_regdomain.c ah_eeprom_v3.c
SRCS+= device_if.h bus_if.h pci_if.h opt_inet.h opt_ath.h opt_ah.h opt_wlan.h
@@ -86,10 +86,10 @@ SRCS+= ar5413.c
# + 5416 (Owl)
.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5416
SRCS+= ah_eeprom_v14.c ah_eeprom_v4k.c \
- ar5416_ani.c ar5416_attach.c ar5416_beacon.c ar5416_cal.c \
- ar5416_cal_iq.c ar5416_cal_adcgain.c ar5416_cal_adcdc.c \
+ ar5416_ani.c ar5416_attach.c ar5416_beacon.c ar5416_btcoex.c \
+ ar5416_cal.c ar5416_cal_iq.c ar5416_cal_adcgain.c ar5416_cal_adcdc.c \
ar5416_eeprom.c ar5416_gpio.c ar5416_interrupts.c ar5416_keycache.c \
- ar5416_misc.c ar5416_phy.c ar5416_power.c ar5416_radar.c \
+ ar5416_misc.c ar5416_phy.c ar5416_power.c ar5416_radar.c ar5416_spectral.c \
ar5416_recv.c ar5416_reset.c ar5416_xmit.c
# RF backend for 5416, 9130 and 9160
@@ -115,7 +115,7 @@ SRCS+= ar9280.c ar9280_attach.c ar9280_olc.c
# + AR9285 - Kite
SRCS+= ar9285.c ar9285_reset.c ar9285_attach.c ar9285_cal.c ar9285_phy.c
-SRCS+= ar9285_diversity.c
+SRCS+= ar9285_diversity.c ar9285_btcoex.c
# + AR9287 - Kiwi
.PATH: ${.CURDIR}/../../dev/ath/ath_hal
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 79ea524..9ee1964 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -530,11 +530,11 @@ bpf_movein(struct uio *uio, int linktype, struct ifnet *ifp, struct mbuf **mp,
return (EIO);
if (len <= MHLEN)
- MGETHDR(m, M_WAIT, MT_DATA);
+ MGETHDR(m, M_WAITOK, MT_DATA);
else if (len <= MCLBYTES)
- m = m_getcl(M_WAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_WAITOK, MT_DATA, M_PKTHDR);
else
- m = m_getjcl(M_WAIT, MT_DATA, M_PKTHDR,
+ m = m_getjcl(M_WAITOK, MT_DATA, M_PKTHDR,
#if (MJUMPAGESIZE > MCLBYTES)
len <= MJUMPAGESIZE ? MJUMPAGESIZE :
#endif
@@ -819,6 +819,7 @@ bpfopen(struct cdev *dev, int flags, int fmt, struct thread *td)
* particular buffer method.
*/
bpf_buffer_init(d);
+ d->bd_hbuf_in_use = 0;
d->bd_bufmode = BPF_BUFMODE_BUFFER;
d->bd_sig = SIGIO;
d->bd_direction = BPF_D_INOUT;
@@ -872,6 +873,9 @@ bpfread(struct cdev *dev, struct uio *uio, int ioflag)
callout_stop(&d->bd_callout);
timed_out = (d->bd_state == BPF_TIMED_OUT);
d->bd_state = BPF_IDLE;
+ while (d->bd_hbuf_in_use)
+ mtx_sleep(&d->bd_hbuf_in_use, &d->bd_lock,
+ PRINET|PCATCH, "bd_hbuf", 0);
/*
* If the hold buffer is empty, then do a timed sleep, which
* ends when the timeout expires or when enough packets
@@ -940,27 +944,27 @@ bpfread(struct cdev *dev, struct uio *uio, int ioflag)
/*
* At this point, we know we have something in the hold slot.
*/
+ d->bd_hbuf_in_use = 1;
BPFD_UNLOCK(d);
/*
* Move data from hold buffer into user space.
* We know the entire buffer is transferred since
* we checked above that the read buffer is bpf_bufsize bytes.
- *
- * XXXRW: More synchronization needed here: what if a second thread
- * issues a read on the same fd at the same time? Don't want this
- * getting invalidated.
+ *
+ * We do not have to worry about simultaneous reads because
+ * we waited for sole access to the hold buffer above.
*/
error = bpf_uiomove(d, d->bd_hbuf, d->bd_hlen, uio);
BPFD_LOCK(d);
- if (d->bd_hbuf != NULL) {
- /* Free the hold buffer only if it is still valid. */
- d->bd_fbuf = d->bd_hbuf;
- d->bd_hbuf = NULL;
- d->bd_hlen = 0;
- bpf_buf_reclaimed(d);
- }
+ KASSERT(d->bd_hbuf != NULL, ("bpfread: lost bd_hbuf"));
+ d->bd_fbuf = d->bd_hbuf;
+ d->bd_hbuf = NULL;
+ d->bd_hlen = 0;
+ bpf_buf_reclaimed(d);
+ d->bd_hbuf_in_use = 0;
+ wakeup(&d->bd_hbuf_in_use);
BPFD_UNLOCK(d);
return (error);
@@ -1064,7 +1068,7 @@ bpfwrite(struct cdev *dev, struct uio *uio, int ioflag)
dst.sa_family = pseudo_AF_HDRCMPLT;
if (d->bd_feedback) {
- mc = m_dup(m, M_DONTWAIT);
+ mc = m_dup(m, M_NOWAIT);
if (mc != NULL)
mc->m_pkthdr.rcvif = ifp;
/* Set M_PROMISC for outgoing packets to be discarded. */
@@ -1114,6 +1118,9 @@ reset_d(struct bpf_d *d)
BPFD_LOCK_ASSERT(d);
+ while (d->bd_hbuf_in_use)
+ mtx_sleep(&d->bd_hbuf_in_use, &d->bd_lock, PRINET,
+ "bd_hbuf", 0);
if ((d->bd_hbuf != NULL) &&
(d->bd_bufmode != BPF_BUFMODE_ZBUF || bpf_canfreebuf(d))) {
/* Free the hold buffer. */
@@ -1254,6 +1261,9 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags,
BPFD_LOCK(d);
n = d->bd_slen;
+ while (d->bd_hbuf_in_use)
+ mtx_sleep(&d->bd_hbuf_in_use, &d->bd_lock,
+ PRINET, "bd_hbuf", 0);
if (d->bd_hbuf)
n += d->bd_hlen;
BPFD_UNLOCK(d);
@@ -1967,6 +1977,9 @@ filt_bpfread(struct knote *kn, long hint)
ready = bpf_ready(d);
if (ready) {
kn->kn_data = d->bd_slen;
+ while (d->bd_hbuf_in_use)
+ mtx_sleep(&d->bd_hbuf_in_use, &d->bd_lock,
+ PRINET, "bd_hbuf", 0);
if (d->bd_hbuf)
kn->kn_data += d->bd_hlen;
} else if (d->bd_rtout > 0 && d->bd_state == BPF_IDLE) {
@@ -2299,6 +2312,9 @@ catchpacket(struct bpf_d *d, u_char *pkt, u_int pktlen, u_int snaplen,
* spot to do it.
*/
if (d->bd_fbuf == NULL && bpf_canfreebuf(d)) {
+ while (d->bd_hbuf_in_use)
+ mtx_sleep(&d->bd_hbuf_in_use, &d->bd_lock,
+ PRINET, "bd_hbuf", 0);
d->bd_fbuf = d->bd_hbuf;
d->bd_hbuf = NULL;
d->bd_hlen = 0;
@@ -2341,6 +2357,9 @@ catchpacket(struct bpf_d *d, u_char *pkt, u_int pktlen, u_int snaplen,
++d->bd_dcount;
return;
}
+ while (d->bd_hbuf_in_use)
+ mtx_sleep(&d->bd_hbuf_in_use, &d->bd_lock,
+ PRINET, "bd_hbuf", 0);
ROTATE_BUFFERS(d);
do_wakeup = 1;
curlen = 0;
diff --git a/sys/net/bpf.h b/sys/net/bpf.h
index a778ce6..e362f16 100644
--- a/sys/net/bpf.h
+++ b/sys/net/bpf.h
@@ -1235,7 +1235,8 @@ SYSCTL_DECL(_net_bpf);
/*
* Rotate the packet buffers in descriptor d. Move the store buffer into the
* hold slot, and the free buffer ino the store slot. Zero the length of the
- * new store buffer. Descriptor lock should be held.
+ * new store buffer. Descriptor lock should be held. Hold buffer must
+ * not be marked "in use".
*/
#define ROTATE_BUFFERS(d) do { \
(d)->bd_hbuf = (d)->bd_sbuf; \
diff --git a/sys/net/bpf_buffer.c b/sys/net/bpf_buffer.c
index 64bb982..74e1ae4 100644
--- a/sys/net/bpf_buffer.c
+++ b/sys/net/bpf_buffer.c
@@ -79,6 +79,8 @@ __FBSDID("$FreeBSD$");
#include <net/bpf_buffer.h>
#include <net/bpfdesc.h>
+#define PRINET 26 /* interruptible */
+
/*
* Implement historical kernel memory buffering model for BPF: two malloc(9)
* kernel buffers are hung off of the descriptor. The size is fixed prior to
@@ -189,6 +191,9 @@ bpf_buffer_ioctl_sblen(struct bpf_d *d, u_int *i)
return (EINVAL);
}
+ while (d->bd_hbuf_in_use)
+ mtx_sleep(&d->bd_hbuf_in_use, &d->bd_lock,
+ PRINET, "bd_hbuf", 0);
/* Free old buffers if set */
if (d->bd_fbuf != NULL)
free(d->bd_fbuf, M_BPF);
diff --git a/sys/net/bpfdesc.h b/sys/net/bpfdesc.h
index 6d58cc3..496f0b3 100644
--- a/sys/net/bpfdesc.h
+++ b/sys/net/bpfdesc.h
@@ -63,6 +63,7 @@ struct bpf_d {
caddr_t bd_sbuf; /* store slot */
caddr_t bd_hbuf; /* hold slot */
caddr_t bd_fbuf; /* free slot */
+ int bd_hbuf_in_use; /* don't rotate buffers */
int bd_slen; /* current length of store buffer */
int bd_hlen; /* current length of hold buffer */
diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c
index 15d4ee9..43dd005 100644
--- a/sys/net/bridgestp.c
+++ b/sys/net/bridgestp.c
@@ -234,7 +234,7 @@ bstp_transmit_tcn(struct bstp_state *bs, struct bstp_port *bp)
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
return;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return;
@@ -348,7 +348,7 @@ bstp_send_bpdu(struct bstp_state *bs, struct bstp_port *bp,
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
return;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return;
diff --git a/sys/net/ieee8023ad_lacp.c b/sys/net/ieee8023ad_lacp.c
index b2a6a7d..87c4e9b 100644
--- a/sys/net/ieee8023ad_lacp.c
+++ b/sys/net/ieee8023ad_lacp.c
@@ -348,7 +348,7 @@ lacp_xmit_lacpdu(struct lacp_port *lp)
LACP_LOCK_ASSERT(lp->lp_lsc);
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL) {
return (ENOMEM);
}
@@ -402,7 +402,7 @@ lacp_xmit_marker(struct lacp_port *lp)
LACP_LOCK_ASSERT(lp->lp_lsc);
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL) {
return (ENOMEM);
}
diff --git a/sys/net/if_arcsubr.c b/sys/net/if_arcsubr.c
index 03f3a1c..faa37cf 100644
--- a/sys/net/if_arcsubr.c
+++ b/sys/net/if_arcsubr.c
@@ -214,7 +214,7 @@ arc_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
}
isphds = arc_isphds(atype);
- M_PREPEND(m, isphds ? ARC_HDRNEWLEN : ARC_HDRLEN, M_DONTWAIT);
+ M_PREPEND(m, isphds ? ARC_HDRNEWLEN : ARC_HDRLEN, M_NOWAIT);
if (m == 0)
senderr(ENOBUFS);
ah = mtod(m, struct arc_header *);
@@ -294,13 +294,13 @@ arc_frag_next(struct ifnet *ifp)
/* split out next fragment and return it */
if (ac->sflag < ac->fsflag) {
/* we CAN'T have short packets here */
- ac->curr_frag = m_split(m, ARC_MAX_DATA, M_DONTWAIT);
+ ac->curr_frag = m_split(m, ARC_MAX_DATA, M_NOWAIT);
if (ac->curr_frag == 0) {
m_freem(m);
return 0;
}
- M_PREPEND(m, ARC_HDRNEWLEN, M_DONTWAIT);
+ M_PREPEND(m, ARC_HDRNEWLEN, M_NOWAIT);
if (m == 0) {
m_freem(ac->curr_frag);
ac->curr_frag = 0;
@@ -319,7 +319,7 @@ arc_frag_next(struct ifnet *ifp)
ARC_MAX_FORBID_LEN - ARC_HDRNEWLEN + 2)) {
ac->curr_frag = 0;
- M_PREPEND(m, ARC_HDRNEWLEN_EXC, M_DONTWAIT);
+ M_PREPEND(m, ARC_HDRNEWLEN_EXC, M_NOWAIT);
if (m == 0)
return 0;
@@ -332,7 +332,7 @@ arc_frag_next(struct ifnet *ifp)
} else {
ac->curr_frag = 0;
- M_PREPEND(m, ARC_HDRNEWLEN, M_DONTWAIT);
+ M_PREPEND(m, ARC_HDRNEWLEN, M_NOWAIT);
if (m == 0)
return 0;
diff --git a/sys/net/if_atmsubr.c b/sys/net/if_atmsubr.c
index bb691e1..fdb8931 100644
--- a/sys/net/if_atmsubr.c
+++ b/sys/net/if_atmsubr.c
@@ -190,7 +190,7 @@ atm_output(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst,
atm_flags = ATM_PH_FLAGS(&atmdst);
if (atm_flags & ATM_PH_LLCSNAP)
sz += 8; /* sizeof snap == 8 */
- M_PREPEND(m, sz, M_DONTWAIT);
+ M_PREPEND(m, sz, M_NOWAIT);
if (m == 0)
senderr(ENOBUFS);
ad = mtod(m, struct atm_pseudohdr *);
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 015cc64..cd8f5c3 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -532,7 +532,7 @@ DECLARE_MODULE(if_bridge, bridge_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
MODULE_DEPEND(if_bridge, bridgestp, 1, 1, 1);
/*
- * handler for net.link.bridge.pfil_ipfw
+ * handler for net.link.bridge.ipfw
*/
static int
sysctl_pfil_ipfw(SYSCTL_HANDLER_ARGS)
@@ -1948,7 +1948,7 @@ bridge_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *sa,
used = 1;
mc = m;
} else {
- mc = m_copypacket(m, M_DONTWAIT);
+ mc = m_copypacket(m, M_NOWAIT);
if (mc == NULL) {
sc->sc_ifp->if_oerrors++;
continue;
@@ -2237,7 +2237,7 @@ bridge_input(struct ifnet *ifp, struct mbuf *m)
* for bridge processing; return the original packet for
* local processing.
*/
- mc = m_dup(m, M_DONTWAIT);
+ mc = m_dup(m, M_NOWAIT);
if (mc == NULL) {
BRIDGE_UNLOCK(sc);
return (m);
@@ -2254,7 +2254,7 @@ bridge_input(struct ifnet *ifp, struct mbuf *m)
*/
KASSERT(bifp->if_bridge == NULL,
("loop created in bridge_input"));
- mc2 = m_dup(m, M_DONTWAIT);
+ mc2 = m_dup(m, M_NOWAIT);
if (mc2 != NULL) {
/* Keep the layer3 header aligned */
int i = min(mc2->m_pkthdr.len, max_protohdr);
@@ -2431,7 +2431,7 @@ bridge_broadcast(struct bridge_softc *sc, struct ifnet *src_if,
mc = m;
used = 1;
} else {
- mc = m_dup(m, M_DONTWAIT);
+ mc = m_dup(m, M_NOWAIT);
if (mc == NULL) {
sc->sc_ifp->if_oerrors++;
continue;
@@ -2494,7 +2494,7 @@ bridge_span(struct bridge_softc *sc, struct mbuf *m)
if ((dst_if->if_drv_flags & IFF_DRV_RUNNING) == 0)
continue;
- mc = m_copypacket(m, M_DONTWAIT);
+ mc = m_copypacket(m, M_NOWAIT);
if (mc == NULL) {
sc->sc_ifp->if_oerrors++;
continue;
@@ -3189,13 +3189,13 @@ bridge_pfil(struct mbuf **mp, struct ifnet *bifp, struct ifnet *ifp, int dir)
* Finally, put everything back the way it was and return
*/
if (snap) {
- M_PREPEND(*mp, sizeof(struct llc), M_DONTWAIT);
+ M_PREPEND(*mp, sizeof(struct llc), M_NOWAIT);
if (*mp == NULL)
return (error);
bcopy(&llc1, mtod(*mp, caddr_t), sizeof(struct llc));
}
- M_PREPEND(*mp, ETHER_HDR_LEN, M_DONTWAIT);
+ M_PREPEND(*mp, ETHER_HDR_LEN, M_NOWAIT);
if (*mp == NULL)
return (error);
bcopy(&eh2, mtod(*mp, caddr_t), ETHER_HDR_LEN);
@@ -3390,7 +3390,7 @@ bridge_fragment(struct ifnet *ifp, struct mbuf *m, struct ether_header *eh,
for (m0 = m; m0; m0 = m0->m_nextpkt) {
if (error == 0) {
if (snap) {
- M_PREPEND(m0, sizeof(struct llc), M_DONTWAIT);
+ M_PREPEND(m0, sizeof(struct llc), M_NOWAIT);
if (m0 == NULL) {
error = ENOBUFS;
continue;
@@ -3398,7 +3398,7 @@ bridge_fragment(struct ifnet *ifp, struct mbuf *m, struct ether_header *eh,
bcopy(llc, mtod(m0, caddr_t),
sizeof(struct llc));
}
- M_PREPEND(m0, ETHER_HDR_LEN, M_DONTWAIT);
+ M_PREPEND(m0, ETHER_HDR_LEN, M_NOWAIT);
if (m0 == NULL) {
error = ENOBUFS;
continue;
diff --git a/sys/net/if_ef.c b/sys/net/if_ef.c
index 8e84b07..9433793 100644
--- a/sys/net/if_ef.c
+++ b/sys/net/if_ef.c
@@ -408,7 +408,7 @@ ef_output(struct ifnet *ifp, struct mbuf **mp, struct sockaddr *dst, short *tp,
type = htons(m->m_pkthdr.len);
break;
case ETHER_FT_8022:
- M_PREPEND(m, ETHER_HDR_LEN + 3, M_WAIT);
+ M_PREPEND(m, ETHER_HDR_LEN + 3, M_WAITOK);
/*
* Ensure that ethernet header and next three bytes
* will fit into single mbuf
@@ -427,7 +427,7 @@ ef_output(struct ifnet *ifp, struct mbuf **mp, struct sockaddr *dst, short *tp,
*hlen += 3;
break;
case ETHER_FT_SNAP:
- M_PREPEND(m, 8, M_WAIT);
+ M_PREPEND(m, 8, M_WAITOK);
type = htons(m->m_pkthdr.len);
cp = mtod(m, u_char *);
bcopy("\xAA\xAA\x03\x00\x00\x00\x81\x37", cp, 8);
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 44ac25d..bb4029e 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -260,7 +260,7 @@ ether_output(struct ifnet *ifp, struct mbuf *m,
struct llc llc;
ifa_free(&aa->aa_ifa);
- M_PREPEND(m, LLC_SNAPFRAMELEN, M_DONTWAIT);
+ M_PREPEND(m, LLC_SNAPFRAMELEN, M_NOWAIT);
if (m == NULL)
senderr(ENOBUFS);
llc.llc_dsap = llc.llc_ssap = LLC_SNAP_LSAP;
@@ -313,7 +313,7 @@ ether_output(struct ifnet *ifp, struct mbuf *m,
* Add local net header. If no space in first mbuf,
* allocate another.
*/
- M_PREPEND(m, ETHER_HDR_LEN, M_DONTWAIT);
+ M_PREPEND(m, ETHER_HDR_LEN, M_NOWAIT);
if (m == NULL)
senderr(ENOBUFS);
eh = mtod(m, struct ether_header *);
@@ -362,7 +362,7 @@ ether_output(struct ifnet *ifp, struct mbuf *m,
* often used kernel parts suffer from the same bug.
* See PR kern/105943 for a proposed general solution.
*/
- if ((n = m_dup(m, M_DONTWAIT)) != NULL) {
+ if ((n = m_dup(m, M_NOWAIT)) != NULL) {
n->m_pkthdr.csum_flags |= csum_flags;
if (csum_flags & CSUM_DATA_VALID)
n->m_pkthdr.csum_data = 0xffff;
@@ -864,7 +864,7 @@ discard:
* Put back the ethernet header so netgraph has a
* consistent view of inbound packets.
*/
- M_PREPEND(m, ETHER_HDR_LEN, M_DONTWAIT);
+ M_PREPEND(m, ETHER_HDR_LEN, M_NOWAIT);
(*ng_ether_input_orphan_p)(ifp, m);
return;
}
@@ -1288,7 +1288,7 @@ ether_vlanencap(struct mbuf *m, uint16_t tag)
{
struct ether_vlan_header *evl;
- M_PREPEND(m, ETHER_VLAN_ENCAP_LEN, M_DONTWAIT);
+ M_PREPEND(m, ETHER_VLAN_ENCAP_LEN, M_NOWAIT);
if (m == NULL)
return (NULL);
/* M_PREPEND takes care of m_len, m_pkthdr.len for us */
diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c
index d98029c..57fb27d 100644
--- a/sys/net/if_fddisubr.c
+++ b/sys/net/if_fddisubr.c
@@ -212,7 +212,7 @@ fddi_output(ifp, m, dst, ro)
if (aa->aa_flags & AFA_PHASE2) {
struct llc llc;
- M_PREPEND(m, LLC_SNAPFRAMELEN, M_WAIT);
+ M_PREPEND(m, LLC_SNAPFRAMELEN, M_WAITOK);
llc.llc_dsap = llc.llc_ssap = LLC_SNAP_LSAP;
llc.llc_control = LLC_UI;
bcopy(at_org_code, llc.llc_snap.org_code, sizeof(at_org_code));
@@ -291,7 +291,7 @@ fddi_output(ifp, m, dst, ro)
*/
if (type != 0) {
struct llc *l;
- M_PREPEND(m, LLC_SNAPFRAMELEN, M_DONTWAIT);
+ M_PREPEND(m, LLC_SNAPFRAMELEN, M_NOWAIT);
if (m == 0)
senderr(ENOBUFS);
l = mtod(m, struct llc *);
@@ -307,7 +307,7 @@ fddi_output(ifp, m, dst, ro)
* Add local net header. If no space in first mbuf,
* allocate another.
*/
- M_PREPEND(m, FDDI_HDR_LEN, M_DONTWAIT);
+ M_PREPEND(m, FDDI_HDR_LEN, M_NOWAIT);
if (m == 0)
senderr(ENOBUFS);
fh = mtod(m, struct fddi_header *);
diff --git a/sys/net/if_fwsubr.c b/sys/net/if_fwsubr.c
index 5414d79..e1d5c01 100644
--- a/sys/net/if_fwsubr.c
+++ b/sys/net/if_fwsubr.c
@@ -229,7 +229,7 @@ firewire_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
/*
* No fragmentation is necessary.
*/
- M_PREPEND(m, sizeof(uint32_t), M_DONTWAIT);
+ M_PREPEND(m, sizeof(uint32_t), M_NOWAIT);
if (!m) {
error = ENOBUFS;
goto bad;
@@ -261,7 +261,7 @@ firewire_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
* Split off the tail segment from the
* datagram, copying our tags over.
*/
- mtail = m_split(m, fsize, M_DONTWAIT);
+ mtail = m_split(m, fsize, M_NOWAIT);
m_tag_copy_chain(mtail, m, M_NOWAIT);
} else {
mtail = 0;
@@ -271,7 +271,7 @@ firewire_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
* Add our encapsulation header to this
* fragment and hand it off to the link.
*/
- M_PREPEND(m, 2*sizeof(uint32_t), M_DONTWAIT);
+ M_PREPEND(m, 2*sizeof(uint32_t), M_NOWAIT);
if (!m) {
error = ENOBUFS;
goto bad;
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index b72f064..27e58d8 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -385,7 +385,7 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
if ((m->m_data - msiz) < m->m_pktdat) {
/* need new mbuf */
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
if (m0 == NULL) {
_IF_DROP(&ifp->if_snd);
m_freem(m);
@@ -452,7 +452,7 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
int hdrlen = sizeof(struct greip) + extra;
if (sc->key)
hdrlen += sizeof(uint32_t);
- M_PREPEND(m, hdrlen, M_DONTWAIT);
+ M_PREPEND(m, hdrlen, M_NOWAIT);
} else {
_IF_DROP(&ifp->if_snd);
m_freem(m);
diff --git a/sys/net/if_iso88025subr.c b/sys/net/if_iso88025subr.c
index 91d67fd..7f9e8bd 100644
--- a/sys/net/if_iso88025subr.c
+++ b/sys/net/if_iso88025subr.c
@@ -338,7 +338,7 @@ iso88025_output(ifp, m, dst, ro)
bcopy((caddr_t)&(satoipx_addr(dst).x_host), (caddr_t)edst,
ISO88025_ADDR_LEN);
- M_PREPEND(m, 3, M_WAIT);
+ M_PREPEND(m, 3, M_WAITOK);
m = m_pullup(m, 3);
if (m == 0)
senderr(ENOBUFS);
@@ -382,7 +382,7 @@ iso88025_output(ifp, m, dst, ro)
*/
if (snap_type != 0) {
struct llc *l;
- M_PREPEND(m, LLC_SNAPFRAMELEN, M_DONTWAIT);
+ M_PREPEND(m, LLC_SNAPFRAMELEN, M_NOWAIT);
if (m == 0)
senderr(ENOBUFS);
l = mtod(m, struct llc *);
@@ -398,7 +398,7 @@ iso88025_output(ifp, m, dst, ro)
* Add local net header. If no space in first mbuf,
* allocate another.
*/
- M_PREPEND(m, ISO88025_HDR_LEN + rif_len, M_DONTWAIT);
+ M_PREPEND(m, ISO88025_HDR_LEN + rif_len, M_NOWAIT);
if (m == 0)
senderr(ENOBUFS);
th = mtod(m, struct iso88025_header *);
diff --git a/sys/net/if_llatbl.c b/sys/net/if_llatbl.c
index bb49fdd..5812623 100644
--- a/sys/net/if_llatbl.c
+++ b/sys/net/if_llatbl.c
@@ -109,12 +109,6 @@ llentry_free(struct llentry *lle)
IF_AFDATA_WLOCK_ASSERT(lle->lle_tbl->llt_ifp);
LLE_WLOCK_ASSERT(lle);
- /* XXX: guard against race with other llentry_free(). */
- if (!(lle->la_flags & LLE_LINKED)) {
- LLE_FREE_LOCKED(lle);
- return (0);
- }
-
LIST_REMOVE(lle, lle_next);
lle->la_flags &= ~(LLE_VALID | LLE_LINKED);
diff --git a/sys/net/if_spppfr.c b/sys/net/if_spppfr.c
index ee5339e..b5e24f6 100644
--- a/sys/net/if_spppfr.c
+++ b/sys/net/if_spppfr.c
@@ -304,7 +304,7 @@ struct mbuf *sppp_fr_header (struct sppp *sp, struct mbuf *m,
/* Prepend the space for Frame Relay header. */
hlen = (family == AF_INET) ? 4 : 10;
- M_PREPEND (m, hlen, M_DONTWAIT);
+ M_PREPEND (m, hlen, M_NOWAIT);
if (! m)
return 0;
h = mtod (m, u_char*);
@@ -381,7 +381,7 @@ void sppp_fr_keepalive (struct sppp *sp)
unsigned char *h, *p;
struct mbuf *m;
- MGETHDR (m, M_DONTWAIT, MT_DATA);
+ MGETHDR (m, M_NOWAIT, MT_DATA);
if (! m)
return;
m->m_pkthdr.rcvif = 0;
@@ -501,7 +501,7 @@ static void sppp_fr_arp (struct sppp *sp, struct arp_req *req,
(unsigned char) his_ip_address);
/* Send the Inverse ARP reply. */
- MGETHDR (m, M_DONTWAIT, MT_DATA);
+ MGETHDR (m, M_NOWAIT, MT_DATA);
if (! m)
return;
m->m_pkthdr.len = m->m_len = 10 + sizeof (*reply);
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index e5fbac90..2385109 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -629,7 +629,7 @@ sppp_input(struct ifnet *ifp, struct mbuf *m)
* enough leading space in the existing mbuf).
*/
m_adj(m, vjlen);
- M_PREPEND(m, hlen, M_DONTWAIT);
+ M_PREPEND(m, hlen, M_NOWAIT);
if (m == NULL) {
SPPP_UNLOCK(sp);
goto drop2;
@@ -920,7 +920,7 @@ sppp_output(struct ifnet *ifp, struct mbuf *m,
/*
* Prepend general data packet PPP header. For now, IP only.
*/
- M_PREPEND (m, PPP_HEADER_LEN, M_DONTWAIT);
+ M_PREPEND (m, PPP_HEADER_LEN, M_NOWAIT);
if (! m) {
nobufs: if (debug)
log(LOG_DEBUG, SPP_FMT "no memory for transmit header\n",
@@ -1392,7 +1392,7 @@ sppp_cisco_send(struct sppp *sp, int type, long par1, long par2)
getmicrouptime(&tv);
- MGETHDR (m, M_DONTWAIT, MT_DATA);
+ MGETHDR (m, M_NOWAIT, MT_DATA);
if (! m)
return;
m->m_pkthdr.len = m->m_len = PPP_HEADER_LEN + CISCO_PACKET_LEN;
@@ -1440,7 +1440,7 @@ sppp_cp_send(struct sppp *sp, u_short proto, u_char type,
if (len > MHLEN - PPP_HEADER_LEN - LCP_HEADER_LEN)
len = MHLEN - PPP_HEADER_LEN - LCP_HEADER_LEN;
- MGETHDR (m, M_DONTWAIT, MT_DATA);
+ MGETHDR (m, M_NOWAIT, MT_DATA);
if (! m)
return;
m->m_pkthdr.len = m->m_len = PPP_HEADER_LEN + LCP_HEADER_LEN + len;
@@ -4722,7 +4722,7 @@ sppp_auth_send(const struct cp *cp, struct sppp *sp,
const char *msg;
va_list ap;
- MGETHDR (m, M_DONTWAIT, MT_DATA);
+ MGETHDR (m, M_NOWAIT, MT_DATA);
if (! m)
return;
m->m_pkthdr.rcvif = 0;
diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c
index edde456..c8f2ec8 100644
--- a/sys/net/if_stf.c
+++ b/sys/net/if_stf.c
@@ -127,6 +127,11 @@ static int stf_route_cache = 1;
SYSCTL_INT(_net_link_stf, OID_AUTO, route_cache, CTLFLAG_RW,
&stf_route_cache, 0, "Caching of IPv4 routes for 6to4 Output");
+static int stf_permit_rfc1918 = 0;
+TUNABLE_INT("net.link.stf.permit_rfc1918", &stf_permit_rfc1918);
+SYSCTL_INT(_net_link_stf, OID_AUTO, permit_rfc1918, CTLFLAG_RW | CTLFLAG_TUN,
+ &stf_permit_rfc1918, 0, "Permit the use of private IPv4 addresses");
+
#define STFUNIT 0
#define IN6_IS_ADDR_6TO4(x) (ntohs((x)->s6_addr16[0]) == 0x2002)
@@ -506,7 +511,7 @@ stf_output(ifp, m, dst, ro)
bpf_mtap2(ifp->if_bpf, &af, sizeof(af), m);
}
- M_PREPEND(m, sizeof(struct ip), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ip), M_NOWAIT);
if (m && m->m_len < sizeof(struct ip))
m = m_pullup(m, sizeof(struct ip));
if (m == NULL) {
@@ -581,9 +586,10 @@ isrfc1918addr(in)
* returns 1 if private address range:
* 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16
*/
- if ((ntohl(in->s_addr) & 0xff000000) >> 24 == 10 ||
+ if (stf_permit_rfc1918 == 0 && (
+ (ntohl(in->s_addr) & 0xff000000) >> 24 == 10 ||
(ntohl(in->s_addr) & 0xfff00000) >> 16 == 172 * 256 + 16 ||
- (ntohl(in->s_addr) & 0xffff0000) >> 16 == 192 * 256 + 168)
+ (ntohl(in->s_addr) & 0xffff0000) >> 16 == 192 * 256 + 168))
return 1;
return 0;
diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c
index 5c8da74..45bd7d2 100644
--- a/sys/net/if_tap.c
+++ b/sys/net/if_tap.c
@@ -948,7 +948,7 @@ tapwrite(struct cdev *dev, struct uio *uio, int flag)
return (EIO);
}
- if ((m = m_uiotombuf(uio, M_DONTWAIT, 0, ETHER_ALIGN,
+ if ((m = m_uiotombuf(uio, M_NOWAIT, 0, ETHER_ALIGN,
M_PKTHDR)) == NULL) {
ifp->if_ierrors ++;
return (ENOBUFS);
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index 086a3c1..3630732 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -622,7 +622,7 @@ tunoutput(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst,
/* prepend sockaddr? this may abort if the mbuf allocation fails */
if (cached_tun_flags & TUN_LMODE) {
/* allocate space for sockaddr */
- M_PREPEND(m0, dst->sa_len, M_DONTWAIT);
+ M_PREPEND(m0, dst->sa_len, M_NOWAIT);
/* if allocation failed drop packet */
if (m0 == NULL) {
@@ -636,7 +636,7 @@ tunoutput(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst,
if (cached_tun_flags & TUN_IFHEAD) {
/* Prepend the address family */
- M_PREPEND(m0, 4, M_DONTWAIT);
+ M_PREPEND(m0, 4, M_NOWAIT);
/* if allocation failed drop packet */
if (m0 == NULL) {
@@ -872,7 +872,7 @@ tunwrite(struct cdev *dev, struct uio *uio, int flag)
return (EIO);
}
- if ((m = m_uiotombuf(uio, M_DONTWAIT, 0, 0, M_PKTHDR)) == NULL) {
+ if ((m = m_uiotombuf(uio, M_NOWAIT, 0, 0, M_PKTHDR)) == NULL) {
ifp->if_ierrors++;
return (ENOBUFS);
}
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index 1ff6bca..9a08a76 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -65,6 +65,7 @@
#include <netinet/if_ether.h>
#include <netinet/ip_carp.h>
#ifdef INET6
+#include <netinet6/ip6_var.h>
#include <netinet6/scope6_var.h>
#endif
@@ -175,14 +176,6 @@ MTX_SYSINIT(rtsock, &rtsock_mtx, "rtsock route_cb lock", MTX_DEF);
#define RTSOCK_LOCK_ASSERT() mtx_assert(&rtsock_mtx, MA_OWNED)
static SYSCTL_NODE(_net, OID_AUTO, route, CTLFLAG_RD, 0, "");
-#ifdef INET6
-static VNET_DEFINE(int, deembed_scopeid) = 1;
-#define V_deembed_scopeid VNET(deembed_scopeid)
-SYSCTL_DECL(_net_inet6_ip6);
-SYSCTL_VNET_INT(_net_inet6_ip6, OID_AUTO, deembed_scopeid, CTLFLAG_RW,
- &VNET_NAME(deembed_scopeid), 0,
- "Extract embedded zone ID and set it to sin6_scope_id in sockaddr_in6.");
-#endif
struct walkarg {
int w_tmemsize;
@@ -572,9 +565,9 @@ route_output(struct mbuf *m, struct socket *so)
struct radix_node_head *rnh;
struct rt_addrinfo info;
#ifdef INET6
- struct sockaddr_storage ss_dst;
- struct sockaddr_storage ss_gw;
+ struct sockaddr_storage ss;
struct sockaddr_in6 *sin6;
+ int i, rti_need_deembed = 0;
#endif
int len, error = 0;
struct ifnet *ifp = NULL;
@@ -606,6 +599,11 @@ route_output(struct mbuf *m, struct socket *so)
rtm->rtm_pid = curproc->p_pid;
bzero(&info, sizeof(info));
info.rti_addrs = rtm->rtm_addrs;
+ /*
+ * rt_xaddrs() performs s6_addr[2] := sin6_scope_id for AF_INET6
+ * link-local address because rtrequest requires addresses with
+ * embedded scope id.
+ */
if (rt_xaddrs((caddr_t)(rtm + 1), len + (caddr_t)rtm, &info)) {
info.rti_info[RTAX_DST] = NULL;
senderr(EINVAL);
@@ -672,11 +670,18 @@ route_output(struct mbuf *m, struct socket *so)
if (info.rti_info[RTAX_GATEWAY]->sa_family == AF_LINK &&
(rtm->rtm_flags & RTF_LLDATA) != 0) {
error = lla_rt_output(rtm, &info);
+#ifdef INET6
+ if (error == 0)
+ rti_need_deembed = (V_deembed_scopeid) ? 1 : 0;
+#endif
break;
}
error = rtrequest1_fib(RTM_ADD, &info, &saved_nrt,
so->so_fibnum);
if (error == 0 && saved_nrt) {
+#ifdef INET6
+ rti_need_deembed = (V_deembed_scopeid) ? 1 : 0;
+#endif
RT_LOCK(saved_nrt);
rt_setmetrics(rtm->rtm_inits,
&rtm->rtm_rmx, &saved_nrt->rt_rmx);
@@ -693,6 +698,10 @@ route_output(struct mbuf *m, struct socket *so)
(info.rti_info[RTAX_GATEWAY]->sa_family == AF_LINK) &&
(rtm->rtm_flags & RTF_LLDATA) != 0) {
error = lla_rt_output(rtm, &info);
+#ifdef INET6
+ if (error == 0)
+ rti_need_deembed = (V_deembed_scopeid) ? 1 : 0;
+#endif
break;
}
error = rtrequest1_fib(RTM_DELETE, &info, &saved_nrt,
@@ -702,6 +711,10 @@ route_output(struct mbuf *m, struct socket *so)
rt = saved_nrt;
goto report;
}
+#ifdef INET6
+ /* rt_msg2() will not be used when RTM_DELETE fails. */
+ rti_need_deembed = (V_deembed_scopeid) ? 1 : 0;
+#endif
break;
case RTM_GET:
@@ -803,31 +816,7 @@ route_output(struct mbuf *m, struct socket *so)
senderr(ESRCH);
}
info.rti_info[RTAX_DST] = rt_key(rt);
-#ifdef INET6
- switch (rt_key(rt)->sa_family) {
- case AF_INET6:
- if (V_deembed_scopeid == 0)
- break;
- sin6 = (struct sockaddr_in6 *)&ss_dst;
- bcopy(rt_key(rt), sin6, sizeof(*sin6));
- if (sa6_recoverscope(sin6) == 0)
- info.rti_info[RTAX_DST] =
- (struct sockaddr *)sin6;
- break;
- }
-#endif
info.rti_info[RTAX_GATEWAY] = rt->rt_gateway;
-#ifdef INET6
- switch (rt->rt_gateway->sa_family) {
- case AF_INET6:
- sin6 = (struct sockaddr_in6 *)&ss_gw;
- bcopy(rt->rt_gateway, sin6, sizeof(*sin6));
- if (sa6_recoverscope(sin6) == 0)
- info.rti_info[RTAX_GATEWAY] =
- (struct sockaddr *)sin6;
- break;
- }
-#endif
info.rti_info[RTAX_NETMASK] = rt_mask(rt);
info.rti_info[RTAX_GENMASK] = 0;
if (rtm->rtm_addrs & (RTA_IFP | RTA_IFA)) {
@@ -969,6 +958,22 @@ flush:
rp = sotorawcb(so);
}
if (rtm) {
+#ifdef INET6
+ if (rti_need_deembed) {
+ /* sin6_scope_id is recovered before sending rtm. */
+ for (i = 0; i < RTAX_MAX; i++) {
+ sin6 = (struct sockaddr_in6 *)&ss;
+ if (info.rti_info[i] == NULL)
+ continue;
+ if (info.rti_info[i]->sa_family != AF_INET6)
+ continue;
+ bcopy(info.rti_info[i], sin6, sizeof(*sin6));
+ if (sa6_recoverscope(sin6) == 0)
+ bcopy(sin6, info.rti_info[i],
+ sizeof(*sin6));
+ }
+ }
+#endif
m_copyback(m, 0, rtm->rtm_msglen, (caddr_t)rtm);
if (m->m_pkthdr.len < rtm->rtm_msglen) {
m_freem(m);
@@ -1062,6 +1067,11 @@ rt_xaddrs(caddr_t cp, caddr_t cplim, struct rt_addrinfo *rtinfo)
return (0); /* should be EINVAL but for compat */
}
/* accept it */
+#ifdef INET6
+ if (sa->sa_family == AF_INET6)
+ sa6_embedscope((struct sockaddr_in6 *)sa,
+ V_ip6_use_defzone);
+#endif
rtinfo->rti_info[i] = sa;
cp += SA_SIZE(sa);
}
@@ -1110,9 +1120,9 @@ rt_msg1(int type, struct rt_addrinfo *rtinfo)
}
if (len > MCLBYTES)
panic("rt_msg1");
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m && len > MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
m = NULL;
@@ -1130,15 +1140,11 @@ rt_msg1(int type, struct rt_addrinfo *rtinfo)
rtinfo->rti_addrs |= (1 << i);
dlen = SA_SIZE(sa);
#ifdef INET6
- switch (sa->sa_family) {
- case AF_INET6:
- if (V_deembed_scopeid == 0)
- break;
+ if (V_deembed_scopeid && sa->sa_family == AF_INET6) {
sin6 = (struct sockaddr_in6 *)&ss;
bcopy(sa, sin6, sizeof(*sin6));
if (sa6_recoverscope(sin6) == 0)
sa = (struct sockaddr *)sin6;
- break;
}
#endif
m_copyback(m, len, dlen, (caddr_t)sa);
@@ -1218,19 +1224,15 @@ again:
continue;
rtinfo->rti_addrs |= (1 << i);
dlen = SA_SIZE(sa);
+ if (cp) {
#ifdef INET6
- switch (sa->sa_family) {
- case AF_INET6:
- if (V_deembed_scopeid == 0)
- break;
- sin6 = (struct sockaddr_in6 *)&ss;
- bcopy(sa, sin6, sizeof(*sin6));
- if (sa6_recoverscope(sin6) == 0)
- sa = (struct sockaddr *)sin6;
- break;
- }
+ if (V_deembed_scopeid && sa->sa_family == AF_INET6) {
+ sin6 = (struct sockaddr_in6 *)&ss;
+ bcopy(sa, sin6, sizeof(*sin6));
+ if (sa6_recoverscope(sin6) == 0)
+ sa = (struct sockaddr *)sin6;
+ }
#endif
- if (cp) {
bcopy((caddr_t)sa, cp, (unsigned)dlen);
cp += dlen;
}
@@ -1570,11 +1572,6 @@ sysctl_dumpentry(struct radix_node *rn, void *vw)
struct rtentry *rt = (struct rtentry *)rn;
int error = 0, size;
struct rt_addrinfo info;
-#ifdef INET6
- struct sockaddr_storage ss[RTAX_MAX];
- struct sockaddr_in6 *sin6;
- int i;
-#endif
if (w->w_op == NET_RT_FLAGS && !(rt->rt_flags & w->w_arg))
return 0;
@@ -1593,22 +1590,6 @@ sysctl_dumpentry(struct radix_node *rn, void *vw)
if (rt->rt_ifp->if_flags & IFF_POINTOPOINT)
info.rti_info[RTAX_BRD] = rt->rt_ifa->ifa_dstaddr;
}
-#ifdef INET6
- for (i = 0; i < RTAX_MAX; i++) {
- if (info.rti_info[i] == NULL)
- continue;
- switch (info.rti_info[i]->sa_family) {
- case AF_INET6:
- if (V_deembed_scopeid == 0)
- break;
- sin6 = (struct sockaddr_in6 *)&ss[i];
- bcopy(info.rti_info[i], sin6, sizeof(*sin6));
- if (sa6_recoverscope(sin6) == 0)
- info.rti_info[i] = (struct sockaddr *)sin6;
- break;
- }
- }
-#endif
size = rt_msg2(RTM_GET, &info, NULL, w);
if (w->w_req && w->w_tmem) {
struct rt_msghdr *rtm = (struct rt_msghdr *)w->w_tmem;
@@ -1811,7 +1792,7 @@ sysctl_iflist(int af, struct walkarg *w)
int len, error = 0;
bzero((caddr_t)&info, sizeof(info));
- IFNET_RLOCK();
+ IFNET_RLOCK_NOSLEEP();
TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
if (w->w_arg && w->w_arg != ifp->if_index)
continue;
@@ -1856,7 +1837,7 @@ sysctl_iflist(int af, struct walkarg *w)
done:
if (ifp != NULL)
IF_ADDR_RUNLOCK(ifp);
- IFNET_RUNLOCK();
+ IFNET_RUNLOCK_NOSLEEP();
return (error);
}
@@ -1870,7 +1851,7 @@ sysctl_ifmalist(int af, struct walkarg *w)
struct ifaddr *ifa;
bzero((caddr_t)&info, sizeof(info));
- IFNET_RLOCK();
+ IFNET_RLOCK_NOSLEEP();
TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
if (w->w_arg && w->w_arg != ifp->if_index)
continue;
@@ -1905,7 +1886,7 @@ sysctl_ifmalist(int af, struct walkarg *w)
IF_ADDR_RUNLOCK(ifp);
}
done:
- IFNET_RUNLOCK();
+ IFNET_RUNLOCK_NOSLEEP();
return (error);
}
diff --git a/sys/net80211/ieee80211_adhoc.c b/sys/net80211/ieee80211_adhoc.c
index e3d9272..0220474 100644
--- a/sys/net80211/ieee80211_adhoc.c
+++ b/sys/net80211/ieee80211_adhoc.c
@@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$");
#ifdef IEEE80211_SUPPORT_TDMA
#include <net80211/ieee80211_tdma.h>
#endif
+#include <net80211/ieee80211_sta.h>
#define IEEE80211_RATE2MBS(r) (((r) & IEEE80211_RATE_VAL) / 2)
@@ -170,7 +171,9 @@ adhoc_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
* Already have a channel; bypass the
* scan and startup immediately.
*/
- ieee80211_create_ibss(vap, vap->iv_des_chan);
+ ieee80211_create_ibss(vap,
+ ieee80211_ht_adjust_channel(ic,
+ vap->iv_des_chan, vap->iv_flags_ht));
break;
}
/*
diff --git a/sys/net80211/ieee80211_freebsd.c b/sys/net80211/ieee80211_freebsd.c
index ec7ee49..1c64915 100644
--- a/sys/net80211/ieee80211_freebsd.c
+++ b/sys/net80211/ieee80211_freebsd.c
@@ -445,9 +445,9 @@ ieee80211_realign(struct ieee80211vap *vap, struct mbuf *m, size_t align)
pktlen = m->m_pkthdr.len;
space = pktlen + align;
if (space < MINCLSIZE)
- n = m_gethdr(M_DONTWAIT, MT_DATA);
+ n = m_gethdr(M_NOWAIT, MT_DATA);
else {
- n = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR,
+ n = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR,
space <= MCLBYTES ? MCLBYTES :
#if MJUMPAGESIZE != MCLBYTES
space <= MJUMPAGESIZE ? MJUMPAGESIZE :
diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c
index 01a8078..675f3da 100644
--- a/sys/net80211/ieee80211_hostap.c
+++ b/sys/net80211/ieee80211_hostap.c
@@ -376,7 +376,7 @@ hostap_deliver_data(struct ieee80211vap *vap,
struct mbuf *mcopy = NULL;
if (m->m_flags & M_MCAST) {
- mcopy = m_dup(m, M_DONTWAIT);
+ mcopy = m_dup(m, M_NOWAIT);
if (mcopy == NULL)
ifp->if_oerrors++;
else
@@ -2324,6 +2324,5 @@ ieee80211_recv_pspoll(struct ieee80211_node *ni, struct mbuf *m0)
ifp = vap->iv_ic->ic_ifp;
else
ifp = vap->iv_ifp;
- IF_ENQUEUE(&ifp->if_snd, m);
- if_start(ifp);
+ (void) ifp->if_transmit(ifp, m);
}
diff --git a/sys/net80211/ieee80211_hwmp.c b/sys/net80211/ieee80211_hwmp.c
index 4e2508e..fcc4af1 100644
--- a/sys/net80211/ieee80211_hwmp.c
+++ b/sys/net80211/ieee80211_hwmp.c
@@ -652,7 +652,7 @@ hwmp_send_action(struct ieee80211_node *ni,
}
m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *);
- M_PREPEND(m, sizeof(struct ieee80211_frame), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ieee80211_frame), M_NOWAIT);
if (m == NULL) {
ieee80211_free_node(ni);
vap->iv_stats.is_tx_nobuf++;
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c
index 76b3bed..a9acad1 100644
--- a/sys/net80211/ieee80211_input.c
+++ b/sys/net80211/ieee80211_input.c
@@ -131,7 +131,7 @@ ieee80211_input_mimo_all(struct ieee80211com *ic, struct mbuf *m,
* Packet contents are changed by ieee80211_decap
* so do a deep copy of the packet.
*/
- mcopy = m_dup(m, M_DONTWAIT);
+ mcopy = m_dup(m, M_NOWAIT);
if (mcopy == NULL) {
/* XXX stat+msg */
continue;
diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c
index 89f85ad..6ab76d9 100644
--- a/sys/net80211/ieee80211_mesh.c
+++ b/sys/net80211/ieee80211_mesh.c
@@ -947,7 +947,7 @@ mesh_forward(struct ieee80211vap *vap, struct mbuf *m,
vap->iv_stats.is_mesh_fwd_disabled++;
return;
}
- mcopy = m_dup(m, M_DONTWAIT);
+ mcopy = m_dup(m, M_NOWAIT);
if (mcopy == NULL) {
IEEE80211_NOTE_FRAME(vap, IEEE80211_MSG_MESH, wh,
"%s", "frame not fwd'd, cannot dup");
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index 7430c34..57925f2 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -632,7 +632,7 @@ ieee80211_mgmt_output(struct ieee80211_node *ni, struct mbuf *m, int type,
return EIO; /* XXX */
}
- M_PREPEND(m, sizeof(struct ieee80211_frame), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ieee80211_frame), M_NOWAIT);
if (m == NULL) {
ieee80211_free_node(ni);
return ENOMEM;
@@ -718,7 +718,7 @@ ieee80211_send_nulldata(struct ieee80211_node *ni)
}
KASSERT(M_LEADINGSPACE(m) >= hdrlen,
("leading space %zd", M_LEADINGSPACE(m)));
- M_PREPEND(m, hdrlen, M_DONTWAIT);
+ M_PREPEND(m, hdrlen, M_NOWAIT);
if (m == NULL) {
/* NB: cannot happen */
ieee80211_free_node(ni);
@@ -1191,7 +1191,7 @@ ieee80211_encap(struct ieee80211vap *vap, struct ieee80211_node *ni,
}
datalen = m->m_pkthdr.len; /* NB: w/o 802.11 header */
- M_PREPEND(m, hdrspace + meshhdrsize, M_DONTWAIT);
+ M_PREPEND(m, hdrspace + meshhdrsize, M_NOWAIT);
if (m == NULL) {
vap->iv_stats.is_tx_nobuf++;
goto bad;
@@ -1430,9 +1430,9 @@ ieee80211_fragment(struct ieee80211vap *vap, struct mbuf *m0,
KASSERT(fragsize < MCLBYTES,
("fragment size %u too big!", fragsize));
if (fragsize > MHLEN)
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
else
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL)
goto bad;
/* leave room to prepend any cipher header */
@@ -1867,7 +1867,7 @@ ieee80211_send_probereq(struct ieee80211_node *ni,
KASSERT(M_LEADINGSPACE(m) >= sizeof(struct ieee80211_frame),
("leading space %zd", M_LEADINGSPACE(m)));
- M_PREPEND(m, sizeof(struct ieee80211_frame), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ieee80211_frame), M_NOWAIT);
if (m == NULL) {
/* NB: cannot happen */
ieee80211_free_node(ni);
@@ -2495,7 +2495,7 @@ ieee80211_send_proberesp(struct ieee80211vap *vap,
return ENOMEM;
}
- M_PREPEND(m, sizeof(struct ieee80211_frame), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ieee80211_frame), M_NOWAIT);
KASSERT(m != NULL, ("no room for header"));
wh = mtod(m, struct ieee80211_frame *);
@@ -2529,7 +2529,7 @@ ieee80211_alloc_rts(struct ieee80211com *ic,
struct mbuf *m;
/* XXX honor ic_headroom */
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m != NULL) {
rts = mtod(m, struct ieee80211_frame_rts *);
rts->i_fc[0] = IEEE80211_FC0_VERSION_0 |
@@ -2555,7 +2555,7 @@ ieee80211_alloc_cts(struct ieee80211com *ic,
struct mbuf *m;
/* XXX honor ic_headroom */
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m != NULL) {
cts = mtod(m, struct ieee80211_frame_cts *);
cts->i_fc[0] = IEEE80211_FC0_VERSION_0 |
@@ -2865,7 +2865,7 @@ ieee80211_beacon_alloc(struct ieee80211_node *ni,
}
ieee80211_beacon_construct(m, frm, bo, ni);
- M_PREPEND(m, sizeof(struct ieee80211_frame), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ieee80211_frame), M_NOWAIT);
KASSERT(m != NULL, ("no space for 802.11 header?"));
wh = mtod(m, struct ieee80211_frame *);
wh->i_fc[0] = IEEE80211_FC0_VERSION_0 | IEEE80211_FC0_TYPE_MGT |
diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c
index 232dbba..3a2b5c7 100644
--- a/sys/net80211/ieee80211_proto.c
+++ b/sys/net80211/ieee80211_proto.c
@@ -996,6 +996,7 @@ ieee80211_wme_updateparams_locked(struct ieee80211vap *vap)
struct wmeParams *chanp, *bssp;
enum ieee80211_phymode mode;
int i;
+ int do_aggrmode = 0;
/*
* Set up the channel access parameters for the physical
@@ -1036,11 +1037,38 @@ ieee80211_wme_updateparams_locked(struct ieee80211vap *vap)
* BE uses agressive params to optimize performance of
* legacy/non-QoS traffic.
*/
- if ((vap->iv_opmode == IEEE80211_M_HOSTAP &&
- (wme->wme_flags & WME_F_AGGRMODE) != 0) ||
- (vap->iv_opmode == IEEE80211_M_STA &&
- (vap->iv_bss->ni_flags & IEEE80211_NODE_QOS) == 0) ||
- (vap->iv_flags & IEEE80211_F_WME) == 0) {
+
+ /* Hostap? Only if aggressive mode is enabled */
+ if (vap->iv_opmode == IEEE80211_M_HOSTAP &&
+ (wme->wme_flags & WME_F_AGGRMODE) != 0)
+ do_aggrmode = 1;
+
+ /*
+ * Station? Only if we're in a non-QoS BSS.
+ */
+ else if ((vap->iv_opmode == IEEE80211_M_STA &&
+ (vap->iv_bss->ni_flags & IEEE80211_NODE_QOS) == 0))
+ do_aggrmode = 1;
+
+ /*
+ * IBSS? Only if we we have WME enabled.
+ */
+ else if ((vap->iv_opmode == IEEE80211_M_IBSS) &&
+ (vap->iv_flags & IEEE80211_F_WME))
+ do_aggrmode = 1;
+
+ /*
+ * If WME is disabled on this VAP, default to aggressive mode
+ * regardless of the configuration.
+ */
+ if ((vap->iv_flags & IEEE80211_F_WME) == 0)
+ do_aggrmode = 1;
+
+ /* XXX WDS? */
+
+ /* XXX MBSS? */
+
+ if (do_aggrmode) {
chanp = &wme->wme_chanParams.cap_wmeParams[WME_AC_BE];
bssp = &wme->wme_bssChanParams.cap_wmeParams[WME_AC_BE];
@@ -1058,7 +1086,14 @@ ieee80211_wme_updateparams_locked(struct ieee80211vap *vap)
chanp->wmep_acm, chanp->wmep_aifsn, chanp->wmep_logcwmin,
chanp->wmep_logcwmax, chanp->wmep_txopLimit);
}
-
+
+
+ /*
+ * Change the contention window based on the number of associated
+ * stations. If the number of associated stations is 1 and
+ * aggressive mode is enabled, lower the contention window even
+ * further.
+ */
if (vap->iv_opmode == IEEE80211_M_HOSTAP &&
ic->ic_sta_assoc < 2 && (wme->wme_flags & WME_F_AGGRMODE) != 0) {
static const uint8_t logCwMin[IEEE80211_MODE_MAX] = {
@@ -1082,8 +1117,15 @@ ieee80211_wme_updateparams_locked(struct ieee80211vap *vap)
IEEE80211_DPRINTF(vap, IEEE80211_MSG_WME,
"update %s (chan+bss) logcwmin %u\n",
ieee80211_wme_acnames[WME_AC_BE], chanp->wmep_logcwmin);
- }
- if (vap->iv_opmode == IEEE80211_M_HOSTAP) { /* XXX ibss? */
+ }
+
+ /*
+ * Arrange for the beacon update.
+ *
+ * XXX what about MBSS, WDS?
+ */
+ if (vap->iv_opmode == IEEE80211_M_HOSTAP
+ || vap->iv_opmode == IEEE80211_M_IBSS) {
/*
* Arrange for a beacon update and bump the parameter
* set number so associated stations load the new values.
@@ -1745,6 +1787,11 @@ ieee80211_newstate_cb(void *xvap, int npending)
IF_LOCK(&vap->iv_ifp->if_snd);
vap->iv_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
IF_UNLOCK(&vap->iv_ifp->if_snd);
+
+ /*
+ * XXX Kick-start a VAP queue - this should be a method,
+ * not if_start()!
+ */
if_start(vap->iv_ifp);
/* bring up any vaps waiting on us */
diff --git a/sys/net80211/ieee80211_regdomain.h b/sys/net80211/ieee80211_regdomain.h
index 8942dd9..cfb3146 100644
--- a/sys/net80211/ieee80211_regdomain.h
+++ b/sys/net80211/ieee80211_regdomain.h
@@ -258,6 +258,17 @@ enum RegdomainCode {
SKU_SR9 = 0x0298, /* Ubiquiti SR9 (900MHz/GSM) */
SKU_XR9 = 0x0299, /* Ubiquiti XR9 (900MHz/GSM) */
SKU_GZ901 = 0x029a, /* Zcomax GZ-901 (900MHz/GSM) */
+ SKU_XC900M = 0x029b, /* Xagyl XC900M (900MHz/GSM) */
+ /*
+ * The XC900M by default uses the
+ * same mapping as the XR9. It
+ * can optionally use a slightly
+ * offset channel spacing (905MHz-
+ * 925MHz) versus the XR9 (907MHz-
+ * 922MHz), giving an extra channel.
+ * This requires a jumper on the
+ * NIC to be changed.
+ */
};
#if defined(__KERNEL__) || defined(_KERNEL)
diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c
index 88146f3..84d25df 100644
--- a/sys/net80211/ieee80211_sta.c
+++ b/sys/net80211/ieee80211_sta.c
@@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$");
#include <net80211/ieee80211_superg.h>
#endif
#include <net80211/ieee80211_ratectl.h>
+#include <net80211/ieee80211_sta.h>
#define IEEE80211_RATE2MBS(r) (((r) & IEEE80211_RATE_VAL) / 2)
@@ -1086,7 +1087,7 @@ bad:
IEEE80211_SCAN_FAIL_STATUS);
}
-static int
+int
ieee80211_parse_wmeparams(struct ieee80211vap *vap, uint8_t *frm,
const struct ieee80211_frame *wh)
{
diff --git a/sys/net80211/ieee80211_sta.h b/sys/net80211/ieee80211_sta.h
index 1508a7c..e97e181 100644
--- a/sys/net80211/ieee80211_sta.h
+++ b/sys/net80211/ieee80211_sta.h
@@ -33,4 +33,10 @@
void ieee80211_sta_attach(struct ieee80211com *);
void ieee80211_sta_detach(struct ieee80211com *);
void ieee80211_sta_vattach(struct ieee80211vap *);
+
+/*
+ * Used by the adhoc/mesh/tdma paths.
+ */
+extern int ieee80211_parse_wmeparams(struct ieee80211vap *vap, uint8_t *frm,
+ const struct ieee80211_frame *wh);
#endif /* !_NET80211_IEEE80211_STA_H_ */
diff --git a/sys/net80211/ieee80211_superg.c b/sys/net80211/ieee80211_superg.c
index 172c1f9..0599f45 100644
--- a/sys/net80211/ieee80211_superg.c
+++ b/sys/net80211/ieee80211_superg.c
@@ -352,7 +352,7 @@ ff_encap1(struct ieee80211vap *vap, struct mbuf *m,
llc->llc_snap.ether_type = eh->ether_type;
payload = m->m_pkthdr.len; /* NB: w/o Ethernet header */
- M_PREPEND(m, sizeof(struct ether_header), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ether_header), M_NOWAIT);
if (m == NULL) { /* XXX cannot happen */
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SUPERG,
"%s: no space for ether_header\n", __func__);
@@ -460,7 +460,7 @@ ieee80211_ff_encap(struct ieee80211vap *vap, struct mbuf *m1, int hdrspace,
*/
m->m_next = m2; /* NB: last mbuf from above */
m1->m_pkthdr.len += m2->m_pkthdr.len;
- M_PREPEND(m1, sizeof(uint32_t)+2, M_DONTWAIT);
+ M_PREPEND(m1, sizeof(uint32_t)+2, M_NOWAIT);
if (m1 == NULL) { /* XXX cannot happen */
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SUPERG,
"%s: no space for tunnel header\n", __func__);
@@ -469,7 +469,7 @@ ieee80211_ff_encap(struct ieee80211vap *vap, struct mbuf *m1, int hdrspace,
}
memset(mtod(m1, void *), 0, sizeof(uint32_t)+2);
- M_PREPEND(m1, sizeof(struct llc), M_DONTWAIT);
+ M_PREPEND(m1, sizeof(struct llc), M_NOWAIT);
if (m1 == NULL) { /* XXX cannot happen */
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SUPERG,
"%s: no space for llc header\n", __func__);
@@ -547,17 +547,26 @@ ff_flush(struct mbuf *head, struct mbuf *last)
/*
* Age frames on the staging queue.
+ *
+ * This is called without the comlock held, but it does all its work
+ * behind the comlock. Because of this, it's possible that the
+ * staging queue will be serviced between the function which called
+ * it and now; thus simply checking that the queue has work in it
+ * may fail.
+ *
+ * See PR kern/174283 for more details.
*/
void
ieee80211_ff_age(struct ieee80211com *ic, struct ieee80211_stageq *sq,
int quanta)
{
- struct ieee80211_superg *sg = ic->ic_superg;
struct mbuf *m, *head;
struct ieee80211_node *ni;
struct ieee80211_tx_ampdu *tap;
+#if 0
KASSERT(sq->head != NULL, ("stageq empty"));
+#endif
IEEE80211_LOCK(ic);
head = sq->head;
@@ -572,7 +581,6 @@ ieee80211_ff_age(struct ieee80211com *ic, struct ieee80211_stageq *sq,
sq->head = m->m_nextpkt;
sq->depth--;
- sg->ff_stageqdepth--;
}
if (m == NULL)
sq->tail = NULL;
@@ -584,9 +592,12 @@ ieee80211_ff_age(struct ieee80211com *ic, struct ieee80211_stageq *sq,
}
static void
-stageq_add(struct ieee80211_stageq *sq, struct mbuf *m)
+stageq_add(struct ieee80211com *ic, struct ieee80211_stageq *sq, struct mbuf *m)
{
int age = ieee80211_ffagemax;
+
+ IEEE80211_LOCK_ASSERT(ic);
+
if (sq->tail != NULL) {
sq->tail->m_nextpkt = m;
age -= M_AGE_GET(sq->head);
@@ -600,10 +611,12 @@ stageq_add(struct ieee80211_stageq *sq, struct mbuf *m)
}
static void
-stageq_remove(struct ieee80211_stageq *sq, struct mbuf *mstaged)
+stageq_remove(struct ieee80211com *ic, struct ieee80211_stageq *sq, struct mbuf *mstaged)
{
struct mbuf *m, *mprev;
+ IEEE80211_LOCK_ASSERT(ic);
+
mprev = NULL;
for (m = sq->head; m != NULL; m = m->m_nextpkt) {
if (m == mstaged) {
@@ -715,7 +728,7 @@ ieee80211_ff_check(struct ieee80211_node *ni, struct mbuf *m)
tap->txa_private = NULL;
if (mstaged != NULL)
- stageq_remove(sq, mstaged);
+ stageq_remove(ic, sq, mstaged);
IEEE80211_UNLOCK(ic);
if (mstaged != NULL) {
@@ -735,7 +748,7 @@ ieee80211_ff_check(struct ieee80211_node *ni, struct mbuf *m)
*/
if (mstaged != NULL) {
tap->txa_private = NULL;
- stageq_remove(sq, mstaged);
+ stageq_remove(ic, sq, mstaged);
IEEE80211_UNLOCK(ic);
IEEE80211_NOTE(vap, IEEE80211_MSG_SUPERG, ni,
@@ -756,8 +769,7 @@ ieee80211_ff_check(struct ieee80211_node *ni, struct mbuf *m)
("txa_private %p", tap->txa_private));
tap->txa_private = m;
- stageq_add(sq, m);
- sg->ff_stageqdepth++;
+ stageq_add(ic, sq, m);
IEEE80211_UNLOCK(ic);
IEEE80211_NOTE(vap, IEEE80211_MSG_SUPERG, ni,
@@ -784,7 +796,7 @@ ieee80211_ff_node_cleanup(struct ieee80211_node *ni)
struct ieee80211com *ic = ni->ni_ic;
struct ieee80211_superg *sg = ic->ic_superg;
struct ieee80211_tx_ampdu *tap;
- struct mbuf *m, *head;
+ struct mbuf *m, *next_m, *head;
int tid;
IEEE80211_LOCK(ic);
@@ -796,16 +808,23 @@ ieee80211_ff_node_cleanup(struct ieee80211_node *ni)
m = tap->txa_private;
if (m != NULL) {
tap->txa_private = NULL;
- stageq_remove(&sg->ff_stageq[ac], m);
+ stageq_remove(ic, &sg->ff_stageq[ac], m);
m->m_nextpkt = head;
head = m;
}
}
IEEE80211_UNLOCK(ic);
- for (m = head; m != NULL; m = m->m_nextpkt) {
+ /*
+ * Free mbufs, taking care to not dereference the mbuf after
+ * we free it (hence grabbing m_nextpkt before we free it.)
+ */
+ m = head;
+ while (m != NULL) {
+ next_m = m->m_nextpkt;
m_freem(m);
ieee80211_free_node(ni);
+ m = next_m;
}
}
diff --git a/sys/net80211/ieee80211_superg.h b/sys/net80211/ieee80211_superg.h
index 970a5fe..4df1386 100644
--- a/sys/net80211/ieee80211_superg.h
+++ b/sys/net80211/ieee80211_superg.h
@@ -66,7 +66,6 @@ struct ieee80211_stageq {
struct ieee80211_superg {
/* fast-frames staging q */
struct ieee80211_stageq ff_stageq[WME_NUM_AC];
- int ff_stageqdepth; /* cumulative depth */
};
void ieee80211_superg_attach(struct ieee80211com *);
@@ -87,6 +86,10 @@ struct mbuf *ieee80211_ff_check(struct ieee80211_node *, struct mbuf *);
void ieee80211_ff_age(struct ieee80211com *, struct ieee80211_stageq *,
int quanta);
+/*
+ * See ieee80211_ff_age() for a description of the locking
+ * expectation here.
+ */
static __inline void
ieee80211_ff_flush(struct ieee80211com *ic, int ac)
{
@@ -96,12 +99,16 @@ ieee80211_ff_flush(struct ieee80211com *ic, int ac)
ieee80211_ff_age(ic, &sg->ff_stageq[ac], 0x7fffffff);
}
+/*
+ * See ieee80211_ff_age() for a description of the locking
+ * expectation here.
+ */
static __inline void
ieee80211_ff_age_all(struct ieee80211com *ic, int quanta)
{
struct ieee80211_superg *sg = ic->ic_superg;
- if (sg != NULL && sg->ff_stageqdepth) {
+ if (sg != NULL) {
if (sg->ff_stageq[WME_AC_VO].depth)
ieee80211_ff_age(ic, &sg->ff_stageq[WME_AC_VO], quanta);
if (sg->ff_stageq[WME_AC_VI].depth)
diff --git a/sys/net80211/ieee80211_wds.c b/sys/net80211/ieee80211_wds.c
index ed82fac..b9fd4ff 100644
--- a/sys/net80211/ieee80211_wds.c
+++ b/sys/net80211/ieee80211_wds.c
@@ -256,7 +256,7 @@ ieee80211_dwds_mcast(struct ieee80211vap *vap0, struct mbuf *m)
/*
* Duplicate the frame and send it.
*/
- mcopy = m_copypacket(m, M_DONTWAIT);
+ mcopy = m_copypacket(m, M_NOWAIT);
if (mcopy == NULL) {
ifp->if_oerrors++;
/* XXX stat + msg */
diff --git a/sys/netatalk/aarp.c b/sys/netatalk/aarp.c
index 7e340de..4426d57 100644
--- a/sys/netatalk/aarp.c
+++ b/sys/netatalk/aarp.c
@@ -190,7 +190,7 @@ aarpwhohas(struct ifnet *ifp, struct sockaddr_at *sat)
struct sockaddr sa;
AARPTAB_UNLOCK_ASSERT();
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL)
return;
#ifdef MAC
@@ -230,7 +230,7 @@ aarpwhohas(struct ifnet *ifp, struct sockaddr_at *sat)
sizeof(eh->ether_dhost));
eh->ether_type = htons(sizeof(struct llc) +
sizeof(struct ether_aarp));
- M_PREPEND(m, sizeof(struct llc), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct llc), M_NOWAIT);
if (m == NULL) {
ifa_free(&aa->aa_ifa);
return;
@@ -524,7 +524,7 @@ at_aarpinput(struct ifnet *ifp, struct mbuf *m)
if (aa->aa_flags & AFA_PHASE2) {
eh->ether_type = htons(sizeof(struct llc) +
sizeof(struct ether_aarp));
- M_PREPEND(m, sizeof(struct llc), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct llc), M_NOWAIT);
if (m == NULL) {
ifa_free(&aa->aa_ifa);
return;
@@ -643,7 +643,7 @@ aarpprobe(void *arg)
ifa_ref(&aa->aa_ifa);
AARPTAB_UNLOCK();
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL) {
ifa_free(&aa->aa_ifa);
return;
@@ -673,7 +673,7 @@ aarpprobe(void *arg)
sizeof(eh->ether_dhost));
eh->ether_type = htons(sizeof(struct llc) +
sizeof(struct ether_aarp));
- M_PREPEND(m, sizeof(struct llc), M_WAIT);
+ M_PREPEND(m, sizeof(struct llc), M_WAITOK);
llc = mtod(m, struct llc *);
llc->llc_dsap = llc->llc_ssap = LLC_SNAP_LSAP;
llc->llc_control = LLC_UI;
diff --git a/sys/netatalk/ddp_output.c b/sys/netatalk/ddp_output.c
index 1b178be..2b53de4 100644
--- a/sys/netatalk/ddp_output.c
+++ b/sys/netatalk/ddp_output.c
@@ -54,7 +54,7 @@ ddp_output(struct mbuf *m, struct socket *so)
mac_socket_create_mbuf(so, m);
#endif
- M_PREPEND(m, sizeof(struct ddpehdr), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ddpehdr), M_NOWAIT);
if (m == NULL)
return (ENOBUFS);
@@ -201,7 +201,7 @@ ddp_route(struct mbuf *m, struct route *ro)
* removing mac_mbuf_copy().
*/
if (!(aa->aa_flags & AFA_PHASE2)) {
- MGET(m0, M_DONTWAIT, MT_DATA);
+ MGET(m0, M_NOWAIT, MT_DATA);
if (m0 == NULL) {
ifa_free(&aa->aa_ifa);
m_freem(m);
diff --git a/sys/netgraph/atm/ccatm/ng_ccatm.c b/sys/netgraph/atm/ccatm/ng_ccatm.c
index a6ff474..cdbc86f 100644
--- a/sys/netgraph/atm/ccatm/ng_ccatm.c
+++ b/sys/netgraph/atm/ccatm/ng_ccatm.c
@@ -434,13 +434,13 @@ send_dump(struct ccdata *data, void *uarg, const char *buf)
struct ccnode *priv = uarg;
if (priv->dump == NULL) {
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
priv->dump_first = priv->dump_last = m;
m->m_pkthdr.len = 0;
} else {
- m = m_getcl(M_DONTWAIT, MT_DATA, 0);
+ m = m_getcl(M_NOWAIT, MT_DATA, 0);
if (m == 0) {
m_freem(priv->dump_first);
return (ENOBUFS);
diff --git a/sys/netgraph/atm/ng_atm.c b/sys/netgraph/atm/ng_atm.c
index 32bde57..ef168ac 100644
--- a/sys/netgraph/atm/ng_atm.c
+++ b/sys/netgraph/atm/ng_atm.c
@@ -384,7 +384,7 @@ ng_atm_input(struct ifnet *ifp, struct mbuf **mp,
/*
* Prepend the atm_pseudoheader.
*/
- M_PREPEND(*mp, sizeof(*ah), M_DONTWAIT);
+ M_PREPEND(*mp, sizeof(*ah), M_NOWAIT);
if (*mp == NULL)
return;
memcpy(mtod(*mp, struct atm_pseudohdr *), ah, sizeof(*ah));
@@ -462,7 +462,7 @@ ng_atm_input_orphans(struct ifnet *ifp, struct mbuf *m,
/*
* Prepend the atm_pseudoheader.
*/
- M_PREPEND(m, sizeof(*ah), M_DONTWAIT);
+ M_PREPEND(m, sizeof(*ah), M_NOWAIT);
if (m == NULL)
return;
memcpy(mtod(m, struct atm_pseudohdr *), ah, sizeof(*ah));
@@ -502,7 +502,7 @@ ng_atm_rcvdata(hook_p hook, item_p item)
/*
* Prepend pseudo-hdr. Drivers don't care about the flags.
*/
- M_PREPEND(m, sizeof(*aph), M_DONTWAIT);
+ M_PREPEND(m, sizeof(*aph), M_NOWAIT);
if (m == NULL) {
NG_FREE_M(m);
return (ENOMEM);
diff --git a/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c b/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c
index b244b30..f2930ab 100644
--- a/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c
+++ b/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c
@@ -807,7 +807,7 @@ bt3c_receive(bt3c_softc_p sc)
sc->state = NG_BT3C_W4_PKT_IND;
sc->want = 1;
- MGETHDR(sc->m, M_DONTWAIT, MT_DATA);
+ MGETHDR(sc->m, M_NOWAIT, MT_DATA);
if (sc->m == NULL) {
NG_BT3C_ERR(sc->dev, "Could not get mbuf\n");
NG_BT3C_STAT_IERROR(sc->stat);
@@ -815,7 +815,7 @@ bt3c_receive(bt3c_softc_p sc)
break; /* XXX lost of sync */
}
- MCLGET(sc->m, M_DONTWAIT);
+ MCLGET(sc->m, M_NOWAIT);
if (!(sc->m->m_flags & M_EXT)) {
NG_FREE_M(sc->m);
diff --git a/sys/netgraph/bluetooth/drivers/h4/ng_h4.c b/sys/netgraph/bluetooth/drivers/h4/ng_h4.c
index 2bf1717..97cee2e 100644
--- a/sys/netgraph/bluetooth/drivers/h4/ng_h4.c
+++ b/sys/netgraph/bluetooth/drivers/h4/ng_h4.c
@@ -525,7 +525,7 @@ ng_h4_input(int c, struct tty *tp)
if (sc->hook != NULL && NG_HOOK_IS_VALID(sc->hook)) {
struct mbuf *m = NULL;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m != NULL) {
m->m_pkthdr.len = 0;
diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
index 44654d2..d43d51b 100644
--- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
+++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
@@ -398,6 +398,12 @@ static const STRUCT_USB_HOST_ID ubt_devs[] =
/* AVM USB Bluetooth-Adapter BlueFritz! v2.0 */
{ USB_VPI(USB_VENDOR_AVM, 0x3800, 0) },
+
+ /* Broadcom USB dongles, mostly BCM20702 and BCM20702A0 */
+ { USB_VENDOR(USB_VENDOR_BROADCOM),
+ USB_IFACE_CLASS(UICLASS_VENDOR),
+ USB_IFACE_SUBCLASS(UDSUBCLASS_RF),
+ USB_IFACE_PROTOCOL(UDPROTO_BLUETOOTH) },
};
/*
@@ -710,13 +716,13 @@ ubt_intr_read_callback(struct usb_xfer *xfer, usb_error_t error)
switch (USB_GET_STATE(xfer)) {
case USB_ST_TRANSFERRED:
/* Allocate a new mbuf */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
UBT_STAT_IERROR(sc);
goto submit_next;
}
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!(m->m_flags & M_EXT)) {
UBT_STAT_IERROR(sc);
goto submit_next;
@@ -810,13 +816,13 @@ ubt_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error)
switch (USB_GET_STATE(xfer)) {
case USB_ST_TRANSFERRED:
/* Allocate new mbuf */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
UBT_STAT_IERROR(sc);
goto submit_next;
}
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!(m->m_flags & M_EXT)) {
UBT_STAT_IERROR(sc);
goto submit_next;
@@ -1020,13 +1026,13 @@ ubt_isoc_read_one_frame(struct usb_xfer *xfer, int frame_no)
while (total > 0) {
if (m == NULL) {
/* Start new reassembly buffer */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
UBT_STAT_IERROR(sc);
return (-1); /* XXX out of sync! */
}
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!(m->m_flags & M_EXT)) {
UBT_STAT_IERROR(sc);
NG_FREE_M(m);
@@ -1760,7 +1766,7 @@ static device_method_t ubt_methods[] =
DEVMETHOD(device_probe, ubt_probe),
DEVMETHOD(device_attach, ubt_attach),
DEVMETHOD(device_detach, ubt_detach),
- { 0, 0 }
+ DEVMETHOD_END
};
static driver_t ubt_driver =
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_cmds.c b/sys/netgraph/bluetooth/hci/ng_hci_cmds.c
index 8d630a2..1dc9854 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_cmds.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_cmds.c
@@ -118,7 +118,7 @@ ng_hci_send_command(ng_hci_unit_p unit)
ng_hci_mtap(unit, m0);
- m = m_dup(m0, M_DONTWAIT);
+ m = m_dup(m0, M_NOWAIT);
if (m != NULL)
NG_SEND_DATA_ONLY(error, unit->drv, m);
else
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_evnt.c b/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
index a4cc9ba..b8dd21f 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
@@ -511,7 +511,7 @@ con_compl(ng_hci_unit_p unit, struct mbuf *event)
} __attribute__ ((packed)) *lp;
struct mbuf *m;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m != NULL) {
m->m_pkthdr.len = m->m_len = sizeof(*lp);
lp = mtod(m, struct __link_policy *);
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_misc.c b/sys/netgraph/bluetooth/hci/ng_hci_misc.c
index 252a580..2209fbd 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_misc.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_misc.c
@@ -65,7 +65,7 @@ ng_hci_mtap(ng_hci_unit_p unit, struct mbuf *m0)
int error = 0;
if (unit->raw != NULL && NG_HOOK_IS_VALID(unit->raw)) {
- m = m_dup(m0, M_DONTWAIT);
+ m = m_dup(m0, M_NOWAIT);
if (m != NULL)
NG_SEND_DATA_ONLY(error, unit->raw, m);
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c b/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c
index 311bd4f..4c06c07 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c
@@ -224,7 +224,7 @@ ng_hci_lp_acl_con_req(ng_hci_unit_p unit, item_p item, hook_p hook)
* Create HCI command
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
ng_hci_free_con(con);
error = ENOBUFS;
@@ -417,7 +417,7 @@ ng_hci_lp_sco_con_req(ng_hci_unit_p unit, item_p item, hook_p hook)
* Create HCI command
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
ng_hci_free_con(sco_con);
error = ENOBUFS;
@@ -531,7 +531,7 @@ ng_hci_lp_discon_req(ng_hci_unit_p unit, item_p item, hook_p hook)
* Create HCI command
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
error = ENOBUFS;
goto out;
@@ -776,7 +776,7 @@ ng_hci_lp_con_rsp(ng_hci_unit_p unit, item_p item, hook_p hook)
* Create HCI command
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
error = ENOBUFS;
goto out;
@@ -996,7 +996,7 @@ ng_hci_lp_qos_req(ng_hci_unit_p unit, item_p item, hook_p hook)
* Create HCI command
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
error = ENOBUFS;
goto out;
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h b/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h
index ed225c8..52789a1 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h
@@ -56,7 +56,7 @@ do { \
ng_l2cap_cmd_rej_data_t data; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -90,7 +90,7 @@ do { \
ng_l2cap_con_req_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -113,7 +113,7 @@ do { \
ng_l2cap_con_rsp_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -138,7 +138,7 @@ do { \
ng_l2cap_cfg_req_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) { \
NG_FREE_M((_data)); \
break; \
@@ -172,7 +172,7 @@ do { \
ng_l2cap_cfg_rsp_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) { \
NG_FREE_M((_data)); \
break; \
@@ -204,7 +204,7 @@ do { \
do { \
u_int8_t *p = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -281,7 +281,7 @@ do { \
ng_l2cap_discon_req_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -304,7 +304,7 @@ do { \
ng_l2cap_discon_rsp_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -324,7 +324,7 @@ do { \
do { \
ng_l2cap_cmd_hdr_t *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -351,7 +351,7 @@ do { \
ng_l2cap_info_req_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -374,7 +374,7 @@ do { \
ng_l2cap_info_rsp_data_t data; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c
index 9d5268e..747b74c 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c
@@ -192,7 +192,7 @@ ng_l2cap_process_signal_cmd(ng_l2cap_con_p con)
/* Get the command, save the rest (if any) */
if (con->rx_pkt->m_pkthdr.len > hdr->length)
- m = m_split(con->rx_pkt, hdr->length, M_DONTWAIT);
+ m = m_split(con->rx_pkt, hdr->length, M_NOWAIT);
else
m = NULL;
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c
index 923ecfc..704e74a 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c
@@ -528,7 +528,7 @@ ng_l2cap_lp_send(ng_l2cap_con_p con, u_int16_t dcid, struct mbuf *m0)
/* Check length of the packet against HCI MTU */
len = m0->m_pkthdr.len;
if (len > l2cap->pkt_size) {
- m = m_split(m0, l2cap->pkt_size, M_DONTWAIT);
+ m = m_split(m0, l2cap->pkt_size, M_NOWAIT);
if (m == NULL) {
NG_L2CAP_ALERT(
"%s: %s - m_split(%d) failed\n", __func__, NG_NODE_NAME(l2cap->node),
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c
index 3791dcd..0c3f1d0 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c
@@ -558,7 +558,7 @@ ng_l2cap_command_untimeout(ng_l2cap_cmd_p cmd)
struct mbuf *
ng_l2cap_prepend(struct mbuf *m, int size)
{
- M_PREPEND(m, size, M_DONTWAIT);
+ M_PREPEND(m, size, M_NOWAIT);
if (m == NULL || (m->m_len < size && (m = m_pullup(m, size)) == NULL))
return (NULL);
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
index df18913..35cd766 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
@@ -310,7 +310,7 @@ ng_btsocket_hci_raw_node_rcvdata(hook_p hook, item_p item)
* for now
*/
- MGET(nam, M_DONTWAIT, MT_SONAME);
+ MGET(nam, M_NOWAIT, MT_SONAME);
if (nam != NULL) {
struct sockaddr_hci *sa = mtod(nam, struct sockaddr_hci *);
@@ -519,7 +519,7 @@ ng_btsocket_hci_raw_data_input(struct mbuf *nam)
* will check if socket has enough buffer space.
*/
- m = m_dup(m0, M_DONTWAIT);
+ m = m_dup(m0, M_NOWAIT);
if (m != NULL) {
struct mbuf *ctl = NULL;
@@ -1585,7 +1585,7 @@ ng_btsocket_hci_raw_send(struct socket *so, int flags, struct mbuf *m,
sa = (struct sockaddr *) &pcb->addr;
}
- MGET(nam, M_DONTWAIT, MT_SONAME);
+ MGET(nam, M_NOWAIT, MT_SONAME);
if (nam == NULL) {
mtx_unlock(&pcb->pcb_mtx);
error = ENOBUFS;
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
index 0066a85..9934945 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
@@ -1533,7 +1533,7 @@ ng_btsocket_l2cap_data_input(struct mbuf *m, hook_p hook)
* it is a broadcast traffic after all
*/
- copy = m_dup(m, M_DONTWAIT);
+ copy = m_dup(m, M_NOWAIT);
if (copy != NULL) {
sbappendrecord(&pcb->so->so_rcv, copy);
sorwakeup(pcb->so);
@@ -2513,12 +2513,12 @@ ng_btsocket_l2cap_send2(ng_btsocket_l2cap_pcb_p pcb)
if (pcb->so->so_snd.sb_cc == 0)
return (EINVAL); /* XXX */
- m = m_dup(pcb->so->so_snd.sb_mb, M_DONTWAIT);
+ m = m_dup(pcb->so->so_snd.sb_mb, M_NOWAIT);
if (m == NULL)
return (ENOBUFS);
/* Create L2CA packet header */
- M_PREPEND(m, sizeof(*hdr), M_DONTWAIT);
+ M_PREPEND(m, sizeof(*hdr), M_NOWAIT);
if (m != NULL)
if (m->m_len < sizeof(*hdr))
m = m_pullup(m, sizeof(*hdr));
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c b/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c
index a0e266e..0ffc12e 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c
@@ -3005,7 +3005,7 @@ ng_btsocket_rfcomm_send_command(ng_btsocket_rfcomm_session_p s,
/* NOT REACHED */
}
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return (ENOBUFS);
@@ -3036,14 +3036,14 @@ ng_btsocket_rfcomm_send_uih(ng_btsocket_rfcomm_session_p s, u_int8_t address,
mtx_assert(&s->session_mtx, MA_OWNED);
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
NG_FREE_M(data);
return (ENOBUFS);
}
m->m_pkthdr.len = m->m_len = sizeof(*hdr);
- MGET(mcrc, M_DONTWAIT, MT_DATA);
+ MGET(mcrc, M_NOWAIT, MT_DATA);
if (mcrc == NULL) {
NG_FREE_M(data);
return (ENOBUFS);
@@ -3110,7 +3110,7 @@ ng_btsocket_rfcomm_send_msc(ng_btsocket_rfcomm_pcb_p pcb)
mtx_assert(&pcb->session->session_mtx, MA_OWNED);
mtx_assert(&pcb->pcb_mtx, MA_OWNED);
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return (ENOBUFS);
@@ -3148,7 +3148,7 @@ ng_btsocket_rfcomm_send_pn(ng_btsocket_rfcomm_pcb_p pcb)
mtx_assert(&pcb->session->session_mtx, MA_OWNED);
mtx_assert(&pcb->pcb_mtx, MA_OWNED);
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return (ENOBUFS);
@@ -3519,7 +3519,7 @@ ng_btsocket_rfcomm_prepare_packet(struct sockbuf *sb, int length)
struct mbuf *top = NULL, *m = NULL, *n = NULL, *nextpkt = NULL;
int mlen, noff, len;
- MGETHDR(top, M_DONTWAIT, MT_DATA);
+ MGETHDR(top, M_NOWAIT, MT_DATA);
if (top == NULL)
return (NULL);
@@ -3543,7 +3543,7 @@ ng_btsocket_rfcomm_prepare_packet(struct sockbuf *sb, int length)
length -= len;
if (length > 0 && m->m_len == mlen) {
- MGET(m->m_next, M_DONTWAIT, MT_DATA);
+ MGET(m->m_next, M_NOWAIT, MT_DATA);
if (m->m_next == NULL) {
NG_FREE_M(top);
return (NULL);
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c b/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c
index 12786fa..7727d7c 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c
@@ -1746,14 +1746,14 @@ ng_btsocket_sco_send2(ng_btsocket_sco_pcb_p pcb)
while (pcb->rt->pending < pcb->rt->num_pkts &&
pcb->so->so_snd.sb_cc > 0) {
/* Get a copy of the first packet on send queue */
- m = m_dup(pcb->so->so_snd.sb_mb, M_DONTWAIT);
+ m = m_dup(pcb->so->so_snd.sb_mb, M_NOWAIT);
if (m == NULL) {
error = ENOBUFS;
break;
}
/* Create SCO packet header */
- M_PREPEND(m, sizeof(*hdr), M_DONTWAIT);
+ M_PREPEND(m, sizeof(*hdr), M_NOWAIT);
if (m != NULL)
if (m->m_len < sizeof(*hdr))
m = m_pullup(m, sizeof(*hdr));
diff --git a/sys/netgraph/netflow/netflow.c b/sys/netgraph/netflow/netflow.c
index 2775756..c889a0d 100644
--- a/sys/netgraph/netflow/netflow.c
+++ b/sys/netgraph/netflow/netflow.c
@@ -214,7 +214,7 @@ get_export_dgram(priv_p priv, fib_export_p fe)
struct netflow_v5_export_dgram *dgram;
struct mbuf *m;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (NULL);
item = ng_package_data(m, NG_NOFLAGS);
diff --git a/sys/netgraph/netflow/netflow_v9.c b/sys/netgraph/netflow/netflow_v9.c
index e040665..a3c5791 100644
--- a/sys/netgraph/netflow/netflow_v9.c
+++ b/sys/netgraph/netflow/netflow_v9.c
@@ -386,7 +386,7 @@ get_export9_dgram(priv_p priv, fib_export_p fe, struct netflow_v9_packet_opt **t
uint16_t mtu = priv->mtu;
/* Allocate entire packet at once, allowing easy m_append() calls */
- m = m_getm(NULL, mtu, M_DONTWAIT, MT_DATA);
+ m = m_getm(NULL, mtu, M_NOWAIT, MT_DATA);
if (m == NULL)
return (NULL);
diff --git a/sys/netgraph/ng_UI.c b/sys/netgraph/ng_UI.c
index b06c17a..8e8ab55 100644
--- a/sys/netgraph/ng_UI.c
+++ b/sys/netgraph/ng_UI.c
@@ -188,7 +188,7 @@ ng_UI_rcvdata(hook_p hook, item_p item)
m_adj(m, ptr - start);
NG_FWD_NEW_DATA(error, item, priv->uplink, m); /* m -> NULL */
} else if (hook == priv->uplink) {
- M_PREPEND(m, 1, M_DONTWAIT); /* Prepend IP NLPID */
+ M_PREPEND(m, 1, M_NOWAIT); /* Prepend IP NLPID */
if (!m)
ERROUT(ENOBUFS);
mtod(m, u_char *)[0] = HDLC_UI;
diff --git a/sys/netgraph/ng_atmllc.c b/sys/netgraph/ng_atmllc.c
index 3ba9dff..f35707b 100644
--- a/sys/netgraph/ng_atmllc.c
+++ b/sys/netgraph/ng_atmllc.c
@@ -202,7 +202,7 @@ ng_atmllc_rcvdata(hook_p hook, item_p item)
m_adj(m, sizeof(struct atmllc) + padding);
} else if (hook == priv->ether) {
/* Add the LLC header */
- M_PREPEND(m, NG_ATMLLC_HEADER_LEN + 2, M_DONTWAIT);
+ M_PREPEND(m, NG_ATMLLC_HEADER_LEN + 2, M_NOWAIT);
if (m == NULL) {
printf("ng_atmllc: M_PREPEND failed\n");
NG_FREE_ITEM(item);
@@ -219,7 +219,7 @@ ng_atmllc_rcvdata(hook_p hook, item_p item)
outhook = priv->atm;
} else if (hook == priv->fddi) {
/* Add the LLC header */
- M_PREPEND(m, NG_ATMLLC_HEADER_LEN + 3, M_DONTWAIT);
+ M_PREPEND(m, NG_ATMLLC_HEADER_LEN + 3, M_NOWAIT);
if (m == NULL) {
printf("ng_atmllc: M_PREPEND failed\n");
NG_FREE_ITEM(item);
diff --git a/sys/netgraph/ng_bridge.c b/sys/netgraph/ng_bridge.c
index 738441d..becfea1 100644
--- a/sys/netgraph/ng_bridge.c
+++ b/sys/netgraph/ng_bridge.c
@@ -719,7 +719,7 @@ ng_bridge_rcvdata(hook_p hook, item_p item)
* It's usable link but not the reserved (first) one.
* Copy mbuf info for sending.
*/
- m2 = m_dup(m, M_DONTWAIT); /* XXX m_copypacket() */
+ m2 = m_dup(m, M_NOWAIT); /* XXX m_copypacket() */
if (m2 == NULL) {
link->stats.memoryFailures++;
NG_FREE_ITEM(item);
diff --git a/sys/netgraph/ng_cisco.c b/sys/netgraph/ng_cisco.c
index 7183369..f937557 100644
--- a/sys/netgraph/ng_cisco.c
+++ b/sys/netgraph/ng_cisco.c
@@ -360,7 +360,7 @@ cisco_rcvdata(hook_p hook, item_p item)
/* OK so it came from a protocol, heading out. Prepend general data
packet header. For now, IP,IPX only */
NGI_GET_M(item, m);
- M_PREPEND(m, CISCO_HEADER_LEN, M_DONTWAIT);
+ M_PREPEND(m, CISCO_HEADER_LEN, M_NOWAIT);
if (!m) {
error = ENOBUFS;
goto out;
@@ -608,7 +608,7 @@ cisco_send(sc_p sc, int type, long par1, long par2)
getmicrouptime(&time);
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (!m)
return (ENOBUFS);
diff --git a/sys/netgraph/ng_deflate.c b/sys/netgraph/ng_deflate.c
index 5fa6363..da68e49 100644
--- a/sys/netgraph/ng_deflate.c
+++ b/sys/netgraph/ng_deflate.c
@@ -462,7 +462,7 @@ ng_deflate_compress(node_p node, struct mbuf *m, struct mbuf **resultp)
}
/* We must own the mbuf chain exclusively to modify it. */
- m = m_unshare(m, M_DONTWAIT);
+ m = m_unshare(m, M_NOWAIT);
if (m == NULL) {
priv->stats.Errors++;
return (ENOMEM);
@@ -556,7 +556,7 @@ ng_deflate_decompress(node_p node, struct mbuf *m, struct mbuf **resultp)
}
/* We must own the mbuf chain exclusively to modify it. */
- m = m_unshare(m, M_DONTWAIT);
+ m = m_unshare(m, M_NOWAIT);
if (m == NULL) {
priv->stats.Errors++;
return (ENOMEM);
diff --git a/sys/netgraph/ng_device.c b/sys/netgraph/ng_device.c
index f6e6087..723fbca 100644
--- a/sys/netgraph/ng_device.c
+++ b/sys/netgraph/ng_device.c
@@ -465,7 +465,7 @@ ngdwrite(struct cdev *dev, struct uio *uio, int flag)
if (uio->uio_resid < 0 || uio->uio_resid > IP_MAXPACKET)
return (EIO);
- if ((m = m_uiotombuf(uio, M_DONTWAIT, 0, 0, M_PKTHDR)) == NULL)
+ if ((m = m_uiotombuf(uio, M_NOWAIT, 0, 0, M_PKTHDR)) == NULL)
return (ENOBUFS);
NG_SEND_DATA_ONLY(error, priv->hook, m);
diff --git a/sys/netgraph/ng_frame_relay.c b/sys/netgraph/ng_frame_relay.c
index 05c311d..4d39d11 100644
--- a/sys/netgraph/ng_frame_relay.c
+++ b/sys/netgraph/ng_frame_relay.c
@@ -360,7 +360,7 @@ ngfrm_rcvdata(hook_p hook, item_p item)
alen = sc->addrlen;
if (alen == 0)
alen = 2; /* default value for transmit */
- M_PREPEND(m, alen, M_DONTWAIT);
+ M_PREPEND(m, alen, M_NOWAIT);
if (m == NULL) {
error = ENOBUFS;
goto bad;
diff --git a/sys/netgraph/ng_gif.c b/sys/netgraph/ng_gif.c
index d362152..580b8b1 100644
--- a/sys/netgraph/ng_gif.c
+++ b/sys/netgraph/ng_gif.c
@@ -303,7 +303,7 @@ ng_gif_glue_af(struct mbuf **mp, int af)
* hopefully everything after that will not
* need one. So let's just use M_PREPEND.
*/
- M_PREPEND(m, sizeof (tmp_af), M_DONTWAIT);
+ M_PREPEND(m, sizeof (tmp_af), M_NOWAIT);
if (m == NULL) {
error = ENOBUFS;
goto done;
diff --git a/sys/netgraph/ng_gif_demux.c b/sys/netgraph/ng_gif_demux.c
index 646e37d..ce0fba0 100644
--- a/sys/netgraph/ng_gif_demux.c
+++ b/sys/netgraph/ng_gif_demux.c
@@ -341,7 +341,7 @@ ng_gif_demux_rcvdata(hook_p hook, item_p item)
* Add address family header and set the output hook.
*/
iffam = get_iffam_from_hook(priv, hook);
- M_PREPEND(m, sizeof (iffam->family), M_DONTWAIT);
+ M_PREPEND(m, sizeof (iffam->family), M_NOWAIT);
if (m == NULL) {
NG_FREE_M(m);
NG_FREE_ITEM(item);
diff --git a/sys/netgraph/ng_hub.c b/sys/netgraph/ng_hub.c
index 2a8c2d2..9348b27 100644
--- a/sys/netgraph/ng_hub.c
+++ b/sys/netgraph/ng_hub.c
@@ -133,7 +133,7 @@ ng_hub_rcvdata(hook_p hook, item_p item)
if (--nhooks == 1)
NG_FWD_ITEM_HOOK(error, item, hook2);
else {
- if ((m2 = m_dup(m, M_DONTWAIT)) == NULL) {
+ if ((m2 = m_dup(m, M_NOWAIT)) == NULL) {
NG_FREE_ITEM(item);
return (ENOBUFS);
}
diff --git a/sys/netgraph/ng_iface.c b/sys/netgraph/ng_iface.c
index 3ce0261..5e6f12f 100644
--- a/sys/netgraph/ng_iface.c
+++ b/sys/netgraph/ng_iface.c
@@ -394,7 +394,7 @@ ng_iface_output(struct ifnet *ifp, struct mbuf *m,
ng_iface_bpftap(ifp, m, dst->sa_family);
if (ALTQ_IS_ENABLED(&ifp->if_snd)) {
- M_PREPEND(m, sizeof(sa_family_t), M_DONTWAIT);
+ M_PREPEND(m, sizeof(sa_family_t), M_NOWAIT);
if (m == NULL) {
IFQ_LOCK(&ifp->if_snd);
IFQ_INC_DROPS(&ifp->if_snd);
diff --git a/sys/netgraph/ng_ipfw.c b/sys/netgraph/ng_ipfw.c
index 82a7238..8c77798 100644
--- a/sys/netgraph/ng_ipfw.c
+++ b/sys/netgraph/ng_ipfw.c
@@ -320,7 +320,7 @@ ng_ipfw_input(struct mbuf **m0, int dir, struct ip_fw_args *fwa, int tee)
m_tag_prepend(m, tag);
} else
- if ((m = m_dup(*m0, M_DONTWAIT)) == NULL)
+ if ((m = m_dup(*m0, M_NOWAIT)) == NULL)
return (ENOMEM); /* which is ignored */
if (m->m_len < sizeof(struct ip) &&
diff --git a/sys/netgraph/ng_l2tp.c b/sys/netgraph/ng_l2tp.c
index 3b91b84..bd98e6c 100644
--- a/sys/netgraph/ng_l2tp.c
+++ b/sys/netgraph/ng_l2tp.c
@@ -934,7 +934,7 @@ ng_l2tp_rcvdata_lower(hook_p h, item_p item)
mtx_unlock(&seq->mtx);
/* Prepend session ID to packet. */
- M_PREPEND(m, 2, M_DONTWAIT);
+ M_PREPEND(m, 2, M_NOWAIT);
if (m == NULL) {
seq->inproc = 0;
priv->stats.memoryFailures++;
@@ -1071,7 +1071,7 @@ ng_l2tp_rcvdata_ctrl(hook_p hook, item_p item)
mtx_unlock(&seq->mtx);
/* Copy packet */
- if ((m = L2TP_COPY_MBUF(m, M_DONTWAIT)) == NULL) {
+ if ((m = L2TP_COPY_MBUF(m, M_NOWAIT)) == NULL) {
priv->stats.memoryFailures++;
ERROUT(ENOBUFS);
}
@@ -1122,7 +1122,7 @@ ng_l2tp_rcvdata(hook_p hook, item_p item)
M_PREPEND(m, 6
+ (2 * (hpriv->conf.include_length != 0))
+ (4 * (hpriv->conf.enable_dseq != 0)),
- M_DONTWAIT);
+ M_NOWAIT);
if (m == NULL) {
priv->stats.memoryFailures++;
NG_FREE_ITEM(item);
@@ -1406,7 +1406,7 @@ ng_l2tp_seq_recv_nr(priv_p priv, u_int16_t nr)
*/
for (i = 0; i < j; i++) {
struct mbuf *m;
- if ((m = L2TP_COPY_MBUF(xwin[i], M_DONTWAIT)) == NULL)
+ if ((m = L2TP_COPY_MBUF(xwin[i], M_NOWAIT)) == NULL)
priv->stats.memoryFailures++;
else
ng_l2tp_xmit_ctrl(priv, m, ns);
@@ -1482,7 +1482,7 @@ ng_l2tp_seq_rack_timeout(node_p node, hook_p hook, void *arg1, int arg2)
seq->acks = 0;
/* Retransmit oldest unack'd packet */
- if ((m = L2TP_COPY_MBUF(seq->xwin[0], M_DONTWAIT)) == NULL)
+ if ((m = L2TP_COPY_MBUF(seq->xwin[0], M_NOWAIT)) == NULL)
priv->stats.memoryFailures++;
else
ng_l2tp_xmit_ctrl(priv, m, seq->ns++);
@@ -1521,7 +1521,7 @@ ng_l2tp_xmit_ctrl(priv_p priv, struct mbuf *m, u_int16_t ns)
if (m == NULL) {
/* Create a new mbuf for ZLB packet */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
priv->stats.memoryFailures++;
return (ENOBUFS);
@@ -1539,7 +1539,7 @@ ng_l2tp_xmit_ctrl(priv_p priv, struct mbuf *m, u_int16_t ns)
session_id = (mtod(m, u_int8_t *)[0] << 8) + mtod(m, u_int8_t *)[1];
/* Make room for L2TP header */
- M_PREPEND(m, 10, M_DONTWAIT); /* - 2 + 12 = 10 */
+ M_PREPEND(m, 10, M_NOWAIT); /* - 2 + 12 = 10 */
if (m == NULL) {
priv->stats.memoryFailures++;
return (ENOBUFS);
diff --git a/sys/netgraph/ng_lmi.c b/sys/netgraph/ng_lmi.c
index 2624e06..6d3fb20 100644
--- a/sys/netgraph/ng_lmi.c
+++ b/sys/netgraph/ng_lmi.c
@@ -317,7 +317,7 @@ nglmi_inquire(sc_p sc, int full)
if (sc->lmi_channel == NULL)
return;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
log(LOG_ERR, "nglmi: unable to start up LMI processing\n");
return;
diff --git a/sys/netgraph/ng_mppc.c b/sys/netgraph/ng_mppc.c
index 6754be7..ddf97d1 100644
--- a/sys/netgraph/ng_mppc.c
+++ b/sys/netgraph/ng_mppc.c
@@ -467,7 +467,7 @@ ng_mppc_compress(node_p node, struct mbuf **datap)
struct mbuf *m = *datap;
/* We must own the mbuf chain exclusively to modify it. */
- m = m_unshare(m, M_DONTWAIT);
+ m = m_unshare(m, M_NOWAIT);
if (m == NULL)
return (ENOMEM);
@@ -595,7 +595,7 @@ err1:
MPPC_CCOUNT_INC(d->cc);
/* Install header */
- M_PREPEND(m, MPPC_HDRLEN, M_DONTWAIT);
+ M_PREPEND(m, MPPC_HDRLEN, M_NOWAIT);
if (m != NULL)
be16enc(mtod(m, void *), header);
@@ -617,7 +617,7 @@ ng_mppc_decompress(node_p node, struct mbuf **datap)
struct mbuf *m = *datap;
/* We must own the mbuf chain exclusively to modify it. */
- m = m_unshare(m, M_DONTWAIT);
+ m = m_unshare(m, M_NOWAIT);
if (m == NULL)
return (ENOMEM);
diff --git a/sys/netgraph/ng_one2many.c b/sys/netgraph/ng_one2many.c
index 5984279..8171005 100644
--- a/sys/netgraph/ng_one2many.c
+++ b/sys/netgraph/ng_one2many.c
@@ -459,7 +459,7 @@ ng_one2many_rcvdata(hook_p hook, item_p item)
struct ng_one2many_link *mdst;
mdst = &priv->many[priv->activeMany[i]];
- m2 = m_dup(m, M_DONTWAIT); /* XXX m_copypacket() */
+ m2 = m_dup(m, M_NOWAIT); /* XXX m_copypacket() */
if (m2 == NULL) {
mdst->stats.memoryFailures++;
NG_FREE_ITEM(item);
diff --git a/sys/netgraph/ng_ppp.c b/sys/netgraph/ng_ppp.c
index b26163a..9db1a2f 100644
--- a/sys/netgraph/ng_ppp.c
+++ b/sys/netgraph/ng_ppp.c
@@ -2095,7 +2095,7 @@ deliver:
/* Split off next fragment as "m2" */
m2 = m;
if (!lastFragment) {
- struct mbuf *n = m_split(m, len, M_DONTWAIT);
+ struct mbuf *n = m_split(m, len, M_NOWAIT);
if (n == NULL) {
NG_FREE_M(m);
@@ -2103,7 +2103,7 @@ deliver:
NG_FREE_ITEM(item);
return (ENOMEM);
}
- m_tag_copy_chain(n, m, M_DONTWAIT);
+ m_tag_copy_chain(n, m, M_NOWAIT);
m = n;
}
@@ -2445,7 +2445,7 @@ ng_ppp_cutproto(struct mbuf *m, uint16_t *proto)
static struct mbuf *
ng_ppp_prepend(struct mbuf *m, const void *buf, int len)
{
- M_PREPEND(m, len, M_DONTWAIT);
+ M_PREPEND(m, len, M_NOWAIT);
if (m == NULL || (m->m_len < len && (m = m_pullup(m, len)) == NULL))
return (NULL);
bcopy(buf, mtod(m, uint8_t *), len);
diff --git a/sys/netgraph/ng_pppoe.c b/sys/netgraph/ng_pppoe.c
index 3b953b3..818bd7a 100644
--- a/sys/netgraph/ng_pppoe.c
+++ b/sys/netgraph/ng_pppoe.c
@@ -460,7 +460,7 @@ pppoe_broadcast_padi(node_p node, struct mbuf *m0)
LIST_FOREACH(sp, &privp->listeners, sessions) {
struct mbuf *m;
- m = m_dup(m0, M_DONTWAIT);
+ m = m_dup(m0, M_NOWAIT);
if (m == NULL)
return (ENOMEM);
NG_SEND_DATA_ONLY(error, sp->hook, m);
@@ -801,7 +801,7 @@ ng_pppoe_rcvmsg(node_p node, item_p item, hook_p lasthook)
if (neg == NULL)
LEAVE(ENOMEM);
- neg->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ neg->m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (neg->m == NULL) {
free(neg, M_NETGRAPH_PPPOE);
LEAVE(ENOBUFS);
@@ -1078,7 +1078,7 @@ pppoe_start(sessp sp)
ng_callout(&neg->handle, node, hook, PPPOE_INITIAL_TIMEOUT * hz,
pppoe_ticker, NULL, 0);
neg->timeout = PPPOE_INITIAL_TIMEOUT * 2;
- m0 = m_copypacket(neg->m, M_DONTWAIT);
+ m0 = m_copypacket(neg->m, M_NOWAIT);
NG_SEND_DATA_ONLY(error, privp->ethernet_hook, m0);
}
@@ -1161,7 +1161,7 @@ ng_pppoe_rcvdata(hook_p hook, item_p item)
* Bang in a pre-made header, and set the length up
* to be correct. Then send it to the ethernet driver.
*/
- M_PREPEND(m, sizeof(*wh), M_DONTWAIT);
+ M_PREPEND(m, sizeof(*wh), M_NOWAIT);
if (m == NULL)
LEAVE(ENOBUFS);
@@ -1251,7 +1251,7 @@ ng_pppoe_rcvdata(hook_p hook, item_p item)
*/
ng_callout(&neg->handle, node, hook, PPPOE_OFFER_TIMEOUT * hz,
pppoe_ticker, NULL, 0);
- m0 = m_copypacket(sp->neg->m, M_DONTWAIT);
+ m0 = m_copypacket(sp->neg->m, M_NOWAIT);
NG_FWD_NEW_DATA(error, item, privp->ethernet_hook, m0);
privp->packets_out++;
break;
@@ -1338,7 +1338,7 @@ ng_pppoe_rcvdata_ether(hook_p hook, item_p item)
* Put it into a cluster.
*/
struct mbuf *n;
- n = m_dup(m, M_DONTWAIT);
+ n = m_dup(m, M_NOWAIT);
m_freem(m);
m = n;
if (m) {
@@ -1472,7 +1472,7 @@ ng_pppoe_rcvdata_ether(hook_p hook, item_p item)
PPPOE_INITIAL_TIMEOUT * hz,
pppoe_ticker, NULL, 0);
neg->timeout = PPPOE_INITIAL_TIMEOUT * 2;
- m0 = m_copypacket(neg->m, M_DONTWAIT);
+ m0 = m_copypacket(neg->m, M_NOWAIT);
NG_FWD_NEW_DATA(error, item, privp->ethernet_hook, m0);
break;
case PADR_CODE:
@@ -1530,7 +1530,7 @@ ng_pppoe_rcvdata_ether(hook_p hook, item_p item)
sp->state = PPPOE_NEWCONNECTED;
/* Send the PADS without a timeout - we're now connected. */
- m0 = m_copypacket(sp->neg->m, M_DONTWAIT);
+ m0 = m_copypacket(sp->neg->m, M_NOWAIT);
NG_FWD_NEW_DATA(error, item, privp->ethernet_hook, m0);
/*
@@ -1736,7 +1736,7 @@ ng_pppoe_disconnect(hook_p hook)
struct mbuf *m;
/* Generate a packet of that type. */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
log(LOG_NOTICE, "ng_pppoe[%x]: session out of "
"mbufs\n", node->nd_ID);
@@ -1823,7 +1823,7 @@ pppoe_ticker(node_p node, hook_p hook, void *arg1, int arg2)
case PPPOE_SINIT:
case PPPOE_SREQ:
/* Timeouts on these produce resends. */
- m0 = m_copypacket(sp->neg->m, M_DONTWAIT);
+ m0 = m_copypacket(sp->neg->m, M_NOWAIT);
NG_SEND_DATA_ONLY( error, privp->ethernet_hook, m0);
ng_callout(&neg->handle, node, hook, neg->timeout * hz,
pppoe_ticker, NULL, 0);
diff --git a/sys/netgraph/ng_pptpgre.c b/sys/netgraph/ng_pptpgre.c
index f48b80c..83d3e0a 100644
--- a/sys/netgraph/ng_pptpgre.c
+++ b/sys/netgraph/ng_pptpgre.c
@@ -598,7 +598,7 @@ ng_pptpgre_xmit(hpriv_p hpriv, item_p item)
/* Prepend GRE header to outgoing frame */
grelen = sizeof(*gre) + sizeof(u_int32_t) * (gre->hasSeq + gre->hasAck);
if (m == NULL) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
priv->stats.memoryFailures++;
ERROUT(ENOBUFS);
@@ -606,7 +606,7 @@ ng_pptpgre_xmit(hpriv_p hpriv, item_p item)
m->m_len = m->m_pkthdr.len = grelen;
m->m_pkthdr.rcvif = NULL;
} else {
- M_PREPEND(m, grelen, M_DONTWAIT);
+ M_PREPEND(m, grelen, M_NOWAIT);
if (m == NULL || (m->m_len < grelen
&& (m = m_pullup(m, grelen)) == NULL)) {
priv->stats.memoryFailures++;
diff --git a/sys/netgraph/ng_pred1.c b/sys/netgraph/ng_pred1.c
index 52efe63..4792b7a 100644
--- a/sys/netgraph/ng_pred1.c
+++ b/sys/netgraph/ng_pred1.c
@@ -401,7 +401,7 @@ ng_pred1_compress(node_p node, struct mbuf *m, struct mbuf **resultp)
}
/* We must own the mbuf chain exclusively to modify it. */
- m = m_unshare(m, M_DONTWAIT);
+ m = m_unshare(m, M_NOWAIT);
if (m == NULL) {
priv->stats.Errors++;
return (ENOMEM);
@@ -479,7 +479,7 @@ ng_pred1_decompress(node_p node, struct mbuf *m, struct mbuf **resultp)
}
/* We must own the mbuf chain exclusively to modify it. */
- m = m_unshare(m, M_DONTWAIT);
+ m = m_unshare(m, M_NOWAIT);
if (m == NULL) {
priv->stats.Errors++;
return (ENOMEM);
diff --git a/sys/netgraph/ng_rfc1490.c b/sys/netgraph/ng_rfc1490.c
index 2dc5123..061faa2 100644
--- a/sys/netgraph/ng_rfc1490.c
+++ b/sys/netgraph/ng_rfc1490.c
@@ -385,7 +385,7 @@ switch_on_etype: etype = ntohs(*((const u_int16_t *)ptr));
break;
}
} else if (hook == priv->ppp) {
- M_PREPEND(m, 2, M_DONTWAIT); /* Prepend PPP NLPID */
+ M_PREPEND(m, 2, M_NOWAIT); /* Prepend PPP NLPID */
if (!m)
ERROUT(ENOBUFS);
mtod(m, u_char *)[0] = HDLC_UI;
@@ -394,7 +394,7 @@ switch_on_etype: etype = ntohs(*((const u_int16_t *)ptr));
} else if (hook == priv->inet) {
switch (priv->enc->method) {
case NG_RFC1490_ENCAP_IETF_IP:
- M_PREPEND(m, 2, M_DONTWAIT); /* Prepend IP NLPID */
+ M_PREPEND(m, 2, M_NOWAIT); /* Prepend IP NLPID */
if (!m)
ERROUT(ENOBUFS);
mtod(m, u_char *)[0] = HDLC_UI;
@@ -406,7 +406,7 @@ switch_on_etype: etype = ntohs(*((const u_int16_t *)ptr));
* HDLC_UI PAD NLIPID OUI PID
* 03 00 80 00 00 00 08 00
*/
- M_PREPEND(m, 8, M_DONTWAIT);
+ M_PREPEND(m, 8, M_NOWAIT);
if (!m)
ERROUT(ENOBUFS);
mtod(m, u_char *)[0] = HDLC_UI;
@@ -417,7 +417,7 @@ switch_on_etype: etype = ntohs(*((const u_int16_t *)ptr));
= htons(ETHERTYPE_IP); /* PID */
break;
case NG_RFC1490_ENCAP_CISCO:
- M_PREPEND(m, 2, M_DONTWAIT); /* Prepend IP ethertype */
+ M_PREPEND(m, 2, M_NOWAIT); /* Prepend IP ethertype */
if (!m)
ERROUT(ENOBUFS);
*((u_int16_t *)mtod(m, u_int16_t *)) = htons(ETHERTYPE_IP);
@@ -425,7 +425,7 @@ switch_on_etype: etype = ntohs(*((const u_int16_t *)ptr));
}
NG_FWD_NEW_DATA(error, item, priv->downlink, m);
} else if (hook == priv->ethernet) {
- M_PREPEND(m, 8, M_DONTWAIT); /* Prepend NLPID, OUI, PID */
+ M_PREPEND(m, 8, M_NOWAIT); /* Prepend NLPID, OUI, PID */
if (!m)
ERROUT(ENOBUFS);
mtod(m, u_char *)[0] = HDLC_UI;
diff --git a/sys/netgraph/ng_source.c b/sys/netgraph/ng_source.c
index 83473f9..1883ec0 100644
--- a/sys/netgraph/ng_source.c
+++ b/sys/netgraph/ng_source.c
@@ -445,7 +445,7 @@ ng_source_rcvmsg(node_p node, item_p item, hook_p lasthook)
{
struct ng_source_embed_info *embed;
- NG_MKRESPONSE(resp, msg, sizeof(*embed), M_DONTWAIT);
+ NG_MKRESPONSE(resp, msg, sizeof(*embed), M_NOWAIT);
if (resp == NULL) {
error = ENOMEM;
goto done;
@@ -484,7 +484,7 @@ ng_source_rcvmsg(node_p node, item_p item, hook_p lasthook)
error = EINVAL;
goto done;
}
- NG_MKRESPONSE(resp, msg, sizeof(*embed), M_DONTWAIT);
+ NG_MKRESPONSE(resp, msg, sizeof(*embed), M_NOWAIT);
if (resp == NULL) {
error = ENOMEM;
goto done;
@@ -873,9 +873,9 @@ ng_source_dup_mod(sc_p sc, struct mbuf *m0, struct mbuf **m_ptr)
/* Duplicate the packet. */
if (modify)
- m = m_dup(m0, M_DONTWAIT);
+ m = m_dup(m0, M_NOWAIT);
else
- m = m_copypacket(m0, M_DONTWAIT);
+ m = m_copypacket(m0, M_NOWAIT);
if (m == NULL) {
error = ENOBUFS;
goto done;
diff --git a/sys/netgraph/ng_tee.c b/sys/netgraph/ng_tee.c
index 4d85666..c6a517e 100644
--- a/sys/netgraph/ng_tee.c
+++ b/sys/netgraph/ng_tee.c
@@ -305,7 +305,7 @@ ng_tee_rcvdata(hook_p hook, item_p item)
struct mbuf *m2;
/* Copy packet (failure will not stop the original)*/
- m2 = m_dup(m, M_DONTWAIT);
+ m2 = m_dup(m, M_NOWAIT);
if (m2) {
/* Deliver duplicate */
h = hinfo->dup;
diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c
index 34105b2..35e1734 100644
--- a/sys/netgraph/ng_tty.c
+++ b/sys/netgraph/ng_tty.c
@@ -418,7 +418,7 @@ ngt_rint_bypass(struct tty *tp, const void *buf, size_t len)
if (sc->hook == NULL)
return (0);
- m = m_getm2(NULL, len, M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getm2(NULL, len, M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) {
if (sc->flags & FLG_DEBUG)
log(LOG_ERR,
@@ -476,7 +476,7 @@ ngt_rint(struct tty *tp, char c, int flags)
/* Get a new header mbuf if we need one */
if (!(m = sc->m)) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (!m) {
if (sc->flags & FLG_DEBUG)
log(LOG_ERR,
diff --git a/sys/netgraph/ng_vjc.c b/sys/netgraph/ng_vjc.c
index 97801f2..e1b76b5 100644
--- a/sys/netgraph/ng_vjc.c
+++ b/sys/netgraph/ng_vjc.c
@@ -474,7 +474,7 @@ ng_vjc_rcvdata(hook_p hook, item_p item)
m_adj(m, vjlen);
/* Copy the reconstructed TCP/IP headers into a new mbuf */
- MGETHDR(hm, M_DONTWAIT, MT_DATA);
+ MGETHDR(hm, M_NOWAIT, MT_DATA);
if (hm == NULL) {
priv->slc.sls_errorin++;
NG_FREE_M(m);
@@ -484,7 +484,7 @@ ng_vjc_rcvdata(hook_p hook, item_p item)
hm->m_len = 0;
hm->m_pkthdr.rcvif = NULL;
if (hlen > MHLEN) { /* unlikely, but can happen */
- MCLGET(hm, M_DONTWAIT);
+ MCLGET(hm, M_NOWAIT);
if ((hm->m_flags & M_EXT) == 0) {
m_freem(hm);
priv->slc.sls_errorin++;
diff --git a/sys/netgraph/ng_vlan.c b/sys/netgraph/ng_vlan.c
index b07a603..1c10a0e 100644
--- a/sys/netgraph/ng_vlan.c
+++ b/sys/netgraph/ng_vlan.c
@@ -648,7 +648,7 @@ ng_vlan_rcvdata(hook_p hook, item_p item)
* [dmac] [smac] [TPID] [PCP/CFI/VID] [ether_type] [payload]
* |-----------| |-- inserted tag --| |--------------------|
*/
- M_PREPEND(m, ETHER_VLAN_ENCAP_LEN, M_DONTWAIT);
+ M_PREPEND(m, ETHER_VLAN_ENCAP_LEN, M_NOWAIT);
if (m == NULL)
error = ENOMEM;
else
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 52d7db2..eaa10aa 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -165,7 +165,6 @@ arptimer(void *arg)
{
struct llentry *lle = (struct llentry *)arg;
struct ifnet *ifp;
- size_t pkts_dropped;
if (lle->la_flags & LLE_STATIC) {
LLE_WUNLOCK(lle);
@@ -192,11 +191,20 @@ arptimer(void *arg)
IF_AFDATA_LOCK(ifp);
LLE_WLOCK(lle);
- LLE_REMREF(lle);
- pkts_dropped = llentry_free(lle);
+ /* Guard against race with other llentry_free(). */
+ if (lle->la_flags & LLE_LINKED) {
+ size_t pkts_dropped;
+
+ LLE_REMREF(lle);
+ pkts_dropped = llentry_free(lle);
+ ARPSTAT_ADD(dropped, pkts_dropped);
+ } else
+ LLE_FREE_LOCKED(lle);
+
IF_AFDATA_UNLOCK(ifp);
- ARPSTAT_ADD(dropped, pkts_dropped);
+
ARPSTAT_INC(timeouts);
+
CURVNET_RESTORE();
}
@@ -249,7 +257,7 @@ arprequest(struct ifnet *ifp, struct in_addr *sip, struct in_addr *tip,
if (enaddr == NULL)
enaddr = carpaddr ? carpaddr : (u_char *)IF_LLADDR(ifp);
- if ((m = m_gethdr(M_DONTWAIT, MT_DATA)) == NULL)
+ if ((m = m_gethdr(M_NOWAIT, MT_DATA)) == NULL)
return;
m->m_len = sizeof(*ah) + 2*sizeof(struct in_addr) +
2*ifp->if_data.ifi_addrlen;
diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c
index 63b96a8..e87da5e 100644
--- a/sys/netinet/igmp.c
+++ b/sys/netinet/igmp.c
@@ -523,7 +523,7 @@ igmp_ra_alloc(void)
struct mbuf *m;
struct ipoption *p;
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
p = mtod(m, struct ipoption *);
p->ipopt_dst.s_addr = INADDR_ANY;
p->ipopt_list[0] = IPOPT_RA; /* Router Alert Option */
@@ -2203,7 +2203,7 @@ igmp_v1v2_queue_report(struct in_multi *inm, const int type)
ifp = inm->inm_ifp;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return (ENOMEM);
MH_ALIGN(m, sizeof(struct ip) + sizeof(struct igmp));
@@ -2780,12 +2780,12 @@ igmp_v3_enqueue_group_record(struct ifqueue *ifq, struct in_multi *inm,
m0srcs = (ifp->if_mtu - IGMP_LEADINGSPACE -
sizeof(struct igmp_grouprec)) / sizeof(in_addr_t);
if (!is_state_change && !is_group_query) {
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m)
m->m_data += IGMP_LEADINGSPACE;
}
if (m == NULL) {
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m)
MH_ALIGN(m, IGMP_LEADINGSPACE);
}
@@ -2905,11 +2905,11 @@ igmp_v3_enqueue_group_record(struct ifqueue *ifq, struct in_multi *inm,
CTR1(KTR_IGMPV3, "%s: outbound queue full", __func__);
return (-ENOMEM);
}
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m)
m->m_data += IGMP_LEADINGSPACE;
if (m == NULL) {
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m)
MH_ALIGN(m, IGMP_LEADINGSPACE);
}
@@ -3061,11 +3061,11 @@ igmp_v3_enqueue_filter_change(struct ifqueue *ifq, struct in_multi *inm)
CTR1(KTR_IGMPV3,
"%s: use previous packet", __func__);
} else {
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m)
m->m_data += IGMP_LEADINGSPACE;
if (m == NULL) {
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m)
MH_ALIGN(m, IGMP_LEADINGSPACE);
}
@@ -3497,7 +3497,7 @@ igmp_v3_encap_report(struct ifnet *ifp, struct mbuf *m)
if (m->m_flags & M_IGMPV3_HDR) {
igmpreclen -= hdrlen;
} else {
- M_PREPEND(m, hdrlen, M_DONTWAIT);
+ M_PREPEND(m, hdrlen, M_NOWAIT);
if (m == NULL)
return (NULL);
m->m_flags |= M_IGMPV3_HDR;
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index 0e77174..6cb37e5 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -799,7 +799,7 @@ in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in *sin,
int masksupplied, int vhid)
{
register u_long i = ntohl(sin->sin_addr.s_addr);
- int flags = RTF_UP, error = 0;
+ int flags, error = 0;
IN_IFADDR_WLOCK();
if (ia->ia_addr.sin_family == AF_INET)
@@ -819,14 +819,19 @@ in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in *sin,
return (error);
/*
- * Give the interface a chance to initialize
- * if this is its first address,
- * and to validate the address if necessary.
+ * Give the interface a chance to initialize if this is its first
+ * address, and to validate the address if necessary.
+ *
+ * Historically, drivers managed IFF_UP flag theirselves, so we
+ * need to check whether driver did that.
*/
+ flags = ifp->if_flags;
if (ifp->if_ioctl != NULL &&
(error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia)) != 0)
/* LIST_REMOVE(ia, ia_hash) is done in in_control */
return (error);
+ if ((ifp->if_flags & IFF_UP) && (flags & IFF_UP) == 0)
+ if_up(ifp);
/*
* Be compatible with network classes, if netmask isn't supplied,
@@ -843,9 +848,11 @@ in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in *sin,
}
ia->ia_subnet = i & ia->ia_subnetmask;
in_socktrim(&ia->ia_sockmask);
+
/*
* Add route for the network.
*/
+ flags = RTF_UP;
ia->ia_ifa.ifa_metric = ifp->if_metric;
if (ifp->if_flags & IFF_BROADCAST) {
if (ia->ia_subnetmask == IN_RFC3021_MASK)
diff --git a/sys/netinet/in_gif.c b/sys/netinet/in_gif.c
index 6ccd17f..45c8619 100644
--- a/sys/netinet/in_gif.c
+++ b/sys/netinet/in_gif.c
@@ -162,7 +162,7 @@ in_gif_output(struct ifnet *ifp, int family, struct mbuf *m)
eiphdr.eip_resvh = 0;
}
/* prepend Ethernet-in-IP header */
- M_PREPEND(m, sizeof(struct etherip_header), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct etherip_header), M_NOWAIT);
if (m && m->m_len < sizeof(struct etherip_header))
m = m_pullup(m, sizeof(struct etherip_header));
if (m == NULL)
@@ -202,7 +202,7 @@ in_gif_output(struct ifnet *ifp, int family, struct mbuf *m)
if (family == AF_LINK)
len += ETHERIP_ALIGN;
#endif
- M_PREPEND(m, len, M_DONTWAIT);
+ M_PREPEND(m, len, M_NOWAIT);
if (m != NULL && m->m_len < len)
m = m_pullup(m, len);
if (m == NULL) {
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 6073c49..6706bc4 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -236,6 +236,8 @@ in_pcbinfo_init(struct inpcbinfo *pcbinfo, const char *name,
NULL, NULL, inpcbzone_init, inpcbzone_fini, UMA_ALIGN_PTR,
inpcbzone_flags);
uma_zone_set_max(pcbinfo->ipi_zone, maxsockets);
+ uma_zone_set_warning(pcbinfo->ipi_zone,
+ "kern.ipc.maxsockets limit reached");
}
/*
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 75e0585..ac6b043 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -192,6 +192,7 @@ static int carp_log = 1; /* Log level. */
static int carp_demotion = 0; /* Global advskew demotion. */
static int carp_senderr_adj = CARP_MAXSKEW; /* Send error demotion factor */
static int carp_ifdown_adj = CARP_MAXSKEW; /* Iface down demotion factor */
+static int carp_demote_adj_sysctl(SYSCTL_HANDLER_ARGS);
SYSCTL_NODE(_net_inet, IPPROTO_CARP, carp, CTLFLAG_RW, 0, "CARP");
SYSCTL_INT(_net_inet_carp, OID_AUTO, allow, CTLFLAG_RW, &carp_allow, 0,
@@ -200,8 +201,9 @@ SYSCTL_INT(_net_inet_carp, OID_AUTO, preempt, CTLFLAG_RW, &carp_preempt, 0,
"High-priority backup preemption mode");
SYSCTL_INT(_net_inet_carp, OID_AUTO, log, CTLFLAG_RW, &carp_log, 0,
"CARP log level");
-SYSCTL_INT(_net_inet_carp, OID_AUTO, demotion, CTLFLAG_RW, &carp_demotion, 0,
- "Demotion factor (skew of advskew)");
+SYSCTL_PROC(_net_inet_carp, OID_AUTO, demotion, CTLTYPE_INT|CTLFLAG_RW,
+ 0, 0, carp_demote_adj_sysctl, "I",
+ "Adjust demotion factor (skew of advskew)");
SYSCTL_INT(_net_inet_carp, OID_AUTO, senderr_demotion_factor, CTLFLAG_RW,
&carp_senderr_adj, 0, "Send error demotion factor adjustment");
SYSCTL_INT(_net_inet_carp, OID_AUTO, ifdown_demotion_factor, CTLFLAG_RW,
@@ -288,12 +290,6 @@ static struct mtx carp_mtx;
static struct task carp_sendall_task =
TASK_INITIALIZER(0, carp_send_ad_all, NULL);
-static __inline uint16_t
-carp_cksum(struct mbuf *m, int len)
-{
- return (in_cksum(m, len));
-}
-
static void
carp_hmac_prepare(struct carp_softc *sc)
{
@@ -476,7 +472,7 @@ carp_input(struct mbuf *m, int hlen)
/* verify the CARP checksum */
m->m_data += iplen;
- if (carp_cksum(m, len - iplen)) {
+ if (in_cksum(m, len - iplen)) {
CARPSTATS_INC(carps_badsum);
CARP_DEBUG("%s: checksum failed on %s\n", __func__,
m->m_pkthdr.rcvif->if_xname);
@@ -535,7 +531,7 @@ carp6_input(struct mbuf **mp, int *offp, int proto)
/* verify the CARP checksum */
m->m_data += *offp;
- if (carp_cksum(m, sizeof(*ch))) {
+ if (in_cksum(m, sizeof(*ch))) {
CARPSTATS_INC(carps_badsum);
CARP_DEBUG("%s: checksum failed, on %s\n", __func__,
m->m_pkthdr.rcvif->if_xname);
@@ -807,7 +803,7 @@ carp_send_ad_locked(struct carp_softc *sc)
goto resched;
m->m_data += sizeof(*ip);
- ch_ptr->carp_cksum = carp_cksum(m, len - sizeof(*ip));
+ ch_ptr->carp_cksum = in_cksum(m, len - sizeof(*ip));
m->m_data -= sizeof(*ip);
CARPSTATS_INC(carps_opackets);
@@ -880,7 +876,7 @@ carp_send_ad_locked(struct carp_softc *sc)
goto resched;
m->m_data += sizeof(*ip6);
- ch_ptr->carp_cksum = carp_cksum(m, len - sizeof(*ip6));
+ ch_ptr->carp_cksum = in_cksum(m, len - sizeof(*ip6));
m->m_data -= sizeof(*ip6);
CARPSTATS_INC(carps_opackets6);
@@ -1999,11 +1995,26 @@ carp_sc_state(struct carp_softc *sc)
static void
carp_demote_adj(int adj, char *reason)
{
- carp_demotion += adj;
+ atomic_add_int(&carp_demotion, adj);
CARP_LOG("demoted by %d to %d (%s)\n", adj, carp_demotion, reason);
taskqueue_enqueue(taskqueue_swi, &carp_sendall_task);
}
+static int
+carp_demote_adj_sysctl(SYSCTL_HANDLER_ARGS)
+{
+ int new, error;
+
+ new = carp_demotion;
+ error = sysctl_handle_int(oidp, &new, 0, req);
+ if (error || !req->newptr)
+ return (error);
+
+ carp_demote_adj(new, "sysctl");
+
+ return (0);
+}
+
#ifdef INET
extern struct domain inetdomain;
static struct protosw in_carp_protosw = {
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index d6fd5ba..39d6f7e 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -280,9 +280,9 @@ stdreply: icmpelen = max(8, min(V_icmp_quotelen, ntohs(oip->ip_len) - oiphlen));
goto freeit;
if (MHLEN > sizeof(struct ip) + ICMP_MINLEN + icmplen)
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
else
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
goto freeit;
#ifdef MAC
@@ -809,7 +809,7 @@ match:
*/
cp = (u_char *) (ip + 1);
if ((opts = ip_srcroute(m)) == 0 &&
- (opts = m_gethdr(M_DONTWAIT, MT_DATA))) {
+ (opts = m_gethdr(M_NOWAIT, MT_DATA))) {
opts->m_len = sizeof(struct in_addr);
mtod(opts, struct in_addr *)->s_addr = 0;
}
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 033c03d..0e559a6 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1406,8 +1406,8 @@ ip_forward(struct mbuf *m, int srcrt)
* assume exclusive access to the IP header in `m', so any
* data in a cluster may change before we reach icmp_error().
*/
- MGETHDR(mcopy, M_DONTWAIT, m->m_type);
- if (mcopy != NULL && !m_dup_pkthdr(mcopy, m, M_DONTWAIT)) {
+ MGETHDR(mcopy, M_NOWAIT, m->m_type);
+ if (mcopy != NULL && !m_dup_pkthdr(mcopy, m, M_NOWAIT)) {
/*
* It's probably ok if the pkthdr dup fails (because
* the deep copy of the tag chain failed), but for now
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index 5b33504..6228933 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -1306,7 +1306,7 @@ X_ip_mforward(struct ip *ip, struct ifnet *ifp, struct mbuf *m,
return ENOBUFS;
}
- mb0 = m_copypacket(m, M_DONTWAIT);
+ mb0 = m_copypacket(m, M_NOWAIT);
if (mb0 && (M_HASCL(mb0) || mb0->m_len < hlen))
mb0 = m_pullup(mb0, hlen);
if (mb0 == NULL) {
@@ -1669,7 +1669,7 @@ phyint_send(struct ip *ip, struct vif *vifp, struct mbuf *m)
* the IP header is actually copied, not just referenced,
* so that ip_output() only scribbles on the copy.
*/
- mb_copy = m_copypacket(m, M_DONTWAIT);
+ mb_copy = m_copypacket(m, M_NOWAIT);
if (mb_copy && (M_HASCL(mb_copy) || mb_copy->m_len < hlen))
mb_copy = m_pullup(mb_copy, hlen);
if (mb_copy == NULL)
@@ -2083,7 +2083,7 @@ bw_upcalls_send(void)
* Allocate a new mbuf, initialize it with the header and
* the payload for the pending calls.
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
log(LOG_WARNING, "bw_upcalls_send: cannot allocate mbuf\n");
return;
@@ -2384,7 +2384,7 @@ pim_register_prepare(struct ip *ip, struct mbuf *m)
* Copy the old packet & pullup its IP header into the
* new mbuf so we can modify it.
*/
- mb_copy = m_copypacket(m, M_DONTWAIT);
+ mb_copy = m_copypacket(m, M_NOWAIT);
if (mb_copy == NULL)
return NULL;
mb_copy = m_pullup(mb_copy, ip->ip_hl << 2);
@@ -2430,7 +2430,7 @@ pim_register_send_upcall(struct ip *ip, struct vif *vifp,
/*
* Add a new mbuf with an upcall header
*/
- MGETHDR(mb_first, M_DONTWAIT, MT_DATA);
+ MGETHDR(mb_first, M_NOWAIT, MT_DATA);
if (mb_first == NULL) {
m_freem(mb_copy);
return ENOBUFS;
@@ -2488,7 +2488,7 @@ pim_register_send_rp(struct ip *ip, struct vif *vifp, struct mbuf *mb_copy,
/*
* Add a new mbuf with the encapsulating header
*/
- MGETHDR(mb_first, M_DONTWAIT, MT_DATA);
+ MGETHDR(mb_first, M_NOWAIT, MT_DATA);
if (mb_first == NULL) {
m_freem(mb_copy);
return ENOBUFS;
diff --git a/sys/netinet/ip_options.c b/sys/netinet/ip_options.c
index df32027..239c699 100644
--- a/sys/netinet/ip_options.c
+++ b/sys/netinet/ip_options.c
@@ -411,7 +411,7 @@ ip_srcroute(struct mbuf *m0)
if (opts->ip_nhops == 0)
return (NULL);
- m = m_get(M_DONTWAIT, MT_DATA);
+ m = m_get(M_NOWAIT, MT_DATA);
if (m == NULL)
return (NULL);
@@ -495,7 +495,7 @@ ip_insertoptions(struct mbuf *m, struct mbuf *opt, int *phlen)
if (p->ipopt_dst.s_addr)
ip->ip_dst = p->ipopt_dst;
if (m->m_flags & M_EXT || m->m_data - optlen < m->m_pktdat) {
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (n == NULL) {
*phlen = 0;
return (m);
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index ad709a5..166bef5 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -621,7 +621,7 @@ passout:
}
#ifdef MBUF_STRESS_TEST
if (mbuf_frag_size && m->m_pkthdr.len > mbuf_frag_size)
- m = m_fragment(m, M_DONTWAIT, mbuf_frag_size);
+ m = m_fragment(m, M_NOWAIT, mbuf_frag_size);
#endif
/*
* Reset layer specific mbuf flags
@@ -784,7 +784,7 @@ smart_frag_failure:
struct mbuf *m;
int mhlen = sizeof (struct ip);
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
error = ENOBUFS;
IPSTAT_INC(ips_odropped);
@@ -813,7 +813,7 @@ smart_frag_failure:
} else
mhip->ip_off |= IP_MF;
mhip->ip_len = htons((u_short)(len + mhlen));
- m->m_next = m_copym(m0, off, len, M_DONTWAIT);
+ m->m_next = m_copym(m0, off, len, M_NOWAIT);
if (m->m_next == NULL) { /* copy failed */
m_free(m);
error = ENOBUFS; /* ??? */
@@ -951,7 +951,7 @@ ip_ctloutput(struct socket *so, struct sockopt *sopt)
error = EMSGSIZE;
break;
}
- MGET(m, sopt->sopt_td ? M_WAIT : M_DONTWAIT, MT_DATA);
+ MGET(m, sopt->sopt_td ? M_WAITOK : M_NOWAIT, MT_DATA);
if (m == NULL) {
error = ENOBUFS;
break;
@@ -1289,7 +1289,7 @@ ip_mloopback(struct ifnet *ifp, struct mbuf *m, struct sockaddr_in *dst,
* Make a deep copy of the packet because we're going to
* modify the pack in order to generate checksums.
*/
- copym = m_dup(m, M_DONTWAIT);
+ copym = m_dup(m, M_NOWAIT);
if (copym != NULL && (copym->m_flags & M_EXT || copym->m_len < hlen))
copym = m_pullup(copym, hlen);
if (copym != NULL) {
diff --git a/sys/netinet/libalias/alias.c b/sys/netinet/libalias/alias.c
index 876e958..da28b22 100644
--- a/sys/netinet/libalias/alias.c
+++ b/sys/netinet/libalias/alias.c
@@ -1761,7 +1761,7 @@ m_megapullup(struct mbuf *m, int len) {
return (m);
if (len <= MCLBYTES - RESERVE) {
- mcl = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ mcl = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
} else if (len < MJUM16BYTES) {
int size;
if (len <= MJUMPAGESIZE - RESERVE) {
@@ -1771,7 +1771,7 @@ m_megapullup(struct mbuf *m, int len) {
} else {
size = MJUM16BYTES;
};
- mcl = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, size);
+ mcl = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, size);
} else {
goto bad;
}
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 7d070fd..eddc69e 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -439,7 +439,7 @@ rip_output(struct mbuf *m, struct socket *so, u_long dst)
m_freem(m);
return(EMSGSIZE);
}
- M_PREPEND(m, sizeof(struct ip), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ip), M_NOWAIT);
if (m == NULL)
return(ENOBUFS);
diff --git a/sys/netinet/sctp_asconf.c b/sys/netinet/sctp_asconf.c
index b9ed52f..0b15cd4 100644
--- a/sys/netinet/sctp_asconf.c
+++ b/sys/netinet/sctp_asconf.c
@@ -80,7 +80,7 @@ sctp_asconf_success_response(uint32_t id)
struct sctp_asconf_paramhdr *aph;
m_reply = sctp_get_mbuf_for_msg(sizeof(struct sctp_asconf_paramhdr),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (m_reply == NULL) {
SCTPDBG(SCTP_DEBUG_ASCONF1,
"asconf_success_response: couldn't get mbuf!\n");
@@ -108,7 +108,7 @@ sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t * error_tlv,
m_reply = sctp_get_mbuf_for_msg((sizeof(struct sctp_asconf_paramhdr) +
tlv_length +
sizeof(struct sctp_error_cause)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (m_reply == NULL) {
SCTPDBG(SCTP_DEBUG_ASCONF1,
"asconf_error_response: couldn't get mbuf!\n");
@@ -633,7 +633,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset,
}
}
m_ack = sctp_get_mbuf_for_msg(sizeof(struct sctp_asconf_ack_chunk), 0,
- M_DONTWAIT, 1, MT_DATA);
+ M_NOWAIT, 1, MT_DATA);
if (m_ack == NULL) {
SCTPDBG(SCTP_DEBUG_ASCONF1,
"handle_asconf: couldn't get mbuf!\n");
@@ -2569,14 +2569,14 @@ sctp_compose_asconf(struct sctp_tcb *stcb, int *retlen, int addr_locked)
* it's simpler to fill in the asconf chunk header lookup address on
* the fly
*/
- m_asconf_chk = sctp_get_mbuf_for_msg(sizeof(struct sctp_asconf_chunk), 0, M_DONTWAIT, 1, MT_DATA);
+ m_asconf_chk = sctp_get_mbuf_for_msg(sizeof(struct sctp_asconf_chunk), 0, M_NOWAIT, 1, MT_DATA);
if (m_asconf_chk == NULL) {
/* no mbuf's */
SCTPDBG(SCTP_DEBUG_ASCONF1,
"compose_asconf: couldn't get chunk mbuf!\n");
return (NULL);
}
- m_asconf = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_DATA);
+ m_asconf = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_DATA);
if (m_asconf == NULL) {
/* no mbuf's */
SCTPDBG(SCTP_DEBUG_ASCONF1,
diff --git a/sys/netinet/sctp_auth.c b/sys/netinet/sctp_auth.c
index a5d5f71..42e2636 100644
--- a/sys/netinet/sctp_auth.c
+++ b/sys/netinet/sctp_auth.c
@@ -1763,7 +1763,7 @@ sctp_handle_auth(struct sctp_tcb *stcb, struct sctp_auth_chunk *auth,
* report this in an Error Chunk: Unsupported HMAC
* Identifier
*/
- m_err = sctp_get_mbuf_for_msg(sizeof(*err), 0, M_DONTWAIT,
+ m_err = sctp_get_mbuf_for_msg(sizeof(*err), 0, M_NOWAIT,
1, MT_HEADER);
if (m_err != NULL) {
/* pre-reserve some space */
@@ -1869,7 +1869,7 @@ sctp_notify_authentication(struct sctp_tcb *stcb, uint32_t indication,
return;
m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_authkey_event),
- 0, M_DONTWAIT, 1, MT_HEADER);
+ 0, M_NOWAIT, 1, MT_HEADER);
if (m_notify == NULL)
/* no space left */
return;
diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c
index a394de5..112920b 100644
--- a/sys/netinet/sctp_indata.c
+++ b/sys/netinet/sctp_indata.c
@@ -241,7 +241,7 @@ sctp_build_ctl_nchunk(struct sctp_inpcb *inp, struct sctp_sndrcvinfo *sinfo)
use_extended = 0;
}
- ret = sctp_get_mbuf_for_msg(len, 0, M_DONTWAIT, 1, MT_DATA);
+ ret = sctp_get_mbuf_for_msg(len, 0, M_NOWAIT, 1, MT_DATA);
if (ret == NULL) {
/* No space */
return (ret);
@@ -587,7 +587,7 @@ protocol_error:
*/
TAILQ_INSERT_HEAD(&strm->inqueue, control, next);
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -866,7 +866,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
*/
SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, its not first, no fragmented delivery in progress\n");
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
@@ -899,7 +899,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
*/
SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, it IS a first and fragmented delivery in progress\n");
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -933,7 +933,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
chk->rec.data.stream_number,
asoc->str_of_pdapi);
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -965,7 +965,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
chk->rec.data.stream_seq,
asoc->ssn_of_pdapi);
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -1059,7 +1059,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
SCTPDBG(SCTP_DEBUG_INDATA1, "Prev check - It can be a midlle or last but not a first\n");
SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, it's a FIRST!\n");
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -1096,7 +1096,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
chk->rec.data.stream_number,
prev->rec.data.stream_number);
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -1133,7 +1133,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
chk->rec.data.stream_seq,
prev->rec.data.stream_seq);
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -1166,7 +1166,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
SCTP_DATA_FIRST_FRAG) {
SCTPDBG(SCTP_DEBUG_INDATA1, "Prev check - Gak, evil plot, its not FIRST and it must be!\n");
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -1210,7 +1210,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
SCTPDBG(SCTP_DEBUG_INDATA1, "Next chk - Next is FIRST, we must be LAST\n");
SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, its not a last!\n");
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -1249,7 +1249,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
SCTPDBG(SCTP_DEBUG_INDATA1, "Next chk - Next is a MIDDLE/LAST\n");
SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, new prev chunk is a LAST\n");
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -1286,7 +1286,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
chk->rec.data.stream_number,
next->rec.data.stream_number);
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -1324,7 +1324,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
chk->rec.data.stream_seq,
next->rec.data.stream_seq);
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -1571,7 +1571,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
struct mbuf *mb;
mb = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) * 2),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (mb != NULL) {
/* add some space up front so prepend will work well */
SCTP_BUF_RESV_UF(mb, sizeof(struct sctp_chunkhdr));
@@ -1636,7 +1636,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
SCTPDBG(SCTP_DEBUG_INDATA1, "EVIL/Broken-Dup S-SEQ:%d delivered:%d from peer, Abort!\n",
strmseq, asoc->strmin[strmno].last_sequence_delivered);
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -1668,7 +1668,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
if (last_chunk == 0) {
dmbuf = SCTP_M_COPYM(*m,
(offset + sizeof(struct sctp_data_chunk)),
- the_len, M_DONTWAIT);
+ the_len, M_NOWAIT);
#ifdef SCTP_MBUF_LOGGING
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) {
struct mbuf *mat;
@@ -1898,7 +1898,7 @@ failed_pdapi_express_del:
}
sctp_free_a_readq(stcb, control);
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -1932,7 +1932,7 @@ failed_pdapi_express_del:
sctp_free_a_readq(stcb, control);
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -1977,7 +1977,7 @@ failed_pdapi_express_del:
}
sctp_free_a_readq(stcb, control);
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -2560,7 +2560,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length,
*/
if (SCTP_BUF_LEN(m) < (long)MLEN && SCTP_BUF_NEXT(m) == NULL) {
/* we only handle mbufs that are singletons.. not chains */
- m = sctp_get_mbuf_for_msg(SCTP_BUF_LEN(m), 0, M_DONTWAIT, 1, MT_DATA);
+ m = sctp_get_mbuf_for_msg(SCTP_BUF_LEN(m), 0, M_NOWAIT, 1, MT_DATA);
if (m) {
/* ok lets see if we can copy the data up */
caddr_t *from, *to;
@@ -2608,7 +2608,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length,
struct mbuf *op_err;
op_err = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 2 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (op_err) {
struct sctp_paramhdr *ph;
@@ -2710,7 +2710,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length,
struct mbuf *merr;
struct sctp_paramhdr *phd;
- merr = sctp_get_mbuf_for_msg(sizeof(*phd), 0, M_DONTWAIT, 1, MT_DATA);
+ merr = sctp_get_mbuf_for_msg(sizeof(*phd), 0, M_NOWAIT, 1, MT_DATA);
if (merr) {
phd = mtod(merr, struct sctp_paramhdr *);
/*
@@ -2726,7 +2726,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length,
phd->param_length =
htons(chk_length + sizeof(*phd));
SCTP_BUF_LEN(merr) = sizeof(*phd);
- SCTP_BUF_NEXT(merr) = SCTP_M_COPYM(m, *offset, chk_length, M_DONTWAIT);
+ SCTP_BUF_NEXT(merr) = SCTP_M_COPYM(m, *offset, chk_length, M_NOWAIT);
if (SCTP_BUF_NEXT(merr)) {
if (sctp_pad_lastmbuf(SCTP_BUF_NEXT(merr), SCTP_SIZE32(chk_length) - chk_length, NULL)) {
sctp_m_freem(merr);
@@ -3852,7 +3852,7 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32_t cumack,
*abort_now = 1;
/* XXX */
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -4222,7 +4222,7 @@ again:
*abort_now = 1;
/* XXX */
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -4445,7 +4445,7 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
*abort_now = 1;
/* XXX */
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -4954,7 +4954,7 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
*abort_now = 1;
/* XXX */
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -5405,7 +5405,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb,
*/
*abort_flag = 1;
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + 3 * sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c
index eb4be56..c70bc03 100644
--- a/sys/netinet/sctp_input.c
+++ b/sys/netinet/sctp_input.c
@@ -1481,7 +1481,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
/* SHUTDOWN came in after sending INIT-ACK */
sctp_send_shutdown_ack(stcb, stcb->asoc.primary_destination);
op_err = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (op_err == NULL) {
/* FOOBAR */
return (NULL);
@@ -1699,7 +1699,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
* with colliding state indication.
*/
op_err = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (op_err == NULL) {
/* FOOBAR */
return (NULL);
@@ -2461,7 +2461,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
* calculated in the sctp_hmac_m() call).
*/
sig_offset = offset + cookie_len - SCTP_SIGNATURE_SIZE;
- m_sig = m_split(m, sig_offset, M_DONTWAIT);
+ m_sig = m_split(m, sig_offset, M_NOWAIT);
if (m_sig == NULL) {
/* out of memory or ?? */
return (NULL);
@@ -2567,7 +2567,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
uint32_t tim;
op_err = sctp_get_mbuf_for_msg(sizeof(struct sctp_stale_cookie_msg),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (op_err == NULL) {
/* FOOBAR */
return (NULL);
@@ -4094,7 +4094,7 @@ __attribute__((noinline))
chk->no_fr_allowed = 0;
chk->book_size = chk->send_size = sizeof(struct sctp_chunkhdr);
chk->book_size_scale = 0;
- chk->data = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_DATA);
+ chk->data = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_DATA);
if (chk->data == NULL) {
strres_nochunk:
if (chk->data) {
@@ -5477,7 +5477,7 @@ process_control_chunks:
struct sctp_paramhdr *phd;
mm = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (mm) {
phd = mtod(mm, struct sctp_paramhdr *);
/*
@@ -5490,7 +5490,7 @@ process_control_chunks:
phd->param_type = htons(SCTP_CAUSE_UNRECOG_CHUNK);
phd->param_length = htons(chk_length + sizeof(*phd));
SCTP_BUF_LEN(mm) = sizeof(*phd);
- SCTP_BUF_NEXT(mm) = SCTP_M_COPYM(m, *offset, chk_length, M_DONTWAIT);
+ SCTP_BUF_NEXT(mm) = SCTP_M_COPYM(m, *offset, chk_length, M_NOWAIT);
if (SCTP_BUF_NEXT(mm)) {
if (sctp_pad_lastmbuf(SCTP_BUF_NEXT(mm), SCTP_SIZE32(chk_length) - chk_length, NULL)) {
sctp_m_freem(mm);
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index aecf035..5ec6228 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -1940,27 +1940,27 @@ sctp_is_address_in_scope(struct sctp_ifa *ifa,
}
static struct mbuf *
-sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa *ifa)
+sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa *ifa, uint16_t * len)
{
struct sctp_paramhdr *parmh;
struct mbuf *mret;
- int len;
+ uint16_t plen;
switch (ifa->address.sa.sa_family) {
#ifdef INET
case AF_INET:
- len = sizeof(struct sctp_ipv4addr_param);
+ plen = (uint16_t) sizeof(struct sctp_ipv4addr_param);
break;
#endif
#ifdef INET6
case AF_INET6:
- len = sizeof(struct sctp_ipv6addr_param);
+ plen = (uint16_t) sizeof(struct sctp_ipv6addr_param);
break;
#endif
default:
return (m);
}
- if (M_TRAILINGSPACE(m) >= len) {
+ if (M_TRAILINGSPACE(m) >= plen) {
/* easy side we just drop it on the end */
parmh = (struct sctp_paramhdr *)(SCTP_BUF_AT(m, SCTP_BUF_LEN(m)));
mret = m;
@@ -1970,7 +1970,7 @@ sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa *ifa)
while (SCTP_BUF_NEXT(mret) != NULL) {
mret = SCTP_BUF_NEXT(mret);
}
- SCTP_BUF_NEXT(mret) = sctp_get_mbuf_for_msg(len, 0, M_DONTWAIT, 1, MT_DATA);
+ SCTP_BUF_NEXT(mret) = sctp_get_mbuf_for_msg(plen, 0, M_NOWAIT, 1, MT_DATA);
if (SCTP_BUF_NEXT(mret) == NULL) {
/* We are hosed, can't add more addresses */
return (m);
@@ -1989,9 +1989,9 @@ sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa *ifa)
sin = (struct sockaddr_in *)&ifa->address.sin;
ipv4p = (struct sctp_ipv4addr_param *)parmh;
parmh->param_type = htons(SCTP_IPV4_ADDRESS);
- parmh->param_length = htons(len);
+ parmh->param_length = htons(plen);
ipv4p->addr = sin->sin_addr.s_addr;
- SCTP_BUF_LEN(mret) += len;
+ SCTP_BUF_LEN(mret) += plen;
break;
}
#endif
@@ -2004,18 +2004,21 @@ sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa *ifa)
sin6 = (struct sockaddr_in6 *)&ifa->address.sin6;
ipv6p = (struct sctp_ipv6addr_param *)parmh;
parmh->param_type = htons(SCTP_IPV6_ADDRESS);
- parmh->param_length = htons(len);
+ parmh->param_length = htons(plen);
memcpy(ipv6p->addr, &sin6->sin6_addr,
sizeof(ipv6p->addr));
/* clear embedded scope in the address */
in6_clearscope((struct in6_addr *)ipv6p->addr);
- SCTP_BUF_LEN(mret) += len;
+ SCTP_BUF_LEN(mret) += plen;
break;
}
#endif
default:
return (m);
}
+ if (len != NULL) {
+ *len += plen;
+ }
return (mret);
}
@@ -2023,7 +2026,8 @@ sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa *ifa)
struct mbuf *
sctp_add_addresses_to_i_ia(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
struct sctp_scoping *scope,
- struct mbuf *m_at, int cnt_inits_to)
+ struct mbuf *m_at, int cnt_inits_to,
+ uint16_t * padding_len, uint16_t * chunk_len)
{
struct sctp_vrf *vrf = NULL;
int cnt, limit_out = 0, total_count;
@@ -2103,7 +2107,15 @@ skip_count:
scope->site_scope, 0) == 0) {
continue;
}
- m_at = sctp_add_addr_to_mbuf(m_at, sctp_ifap);
+ if ((chunk_len != NULL) &&
+ (padding_len != NULL) &&
+ (*padding_len > 0)) {
+ memset(mtod(m_at, caddr_t)+*chunk_len, 0, *padding_len);
+ SCTP_BUF_LEN(m_at) += *padding_len;
+ *chunk_len += *padding_len;
+ *padding_len = 0;
+ }
+ m_at = sctp_add_addr_to_mbuf(m_at, sctp_ifap, chunk_len);
if (limit_out) {
cnt++;
total_count++;
@@ -2178,7 +2190,15 @@ skip_count:
scope->site_scope, 0) == 0) {
continue;
}
- m_at = sctp_add_addr_to_mbuf(m_at, laddr->ifa);
+ if ((chunk_len != NULL) &&
+ (padding_len != NULL) &&
+ (*padding_len > 0)) {
+ memset(mtod(m_at, caddr_t)+*chunk_len, 0, *padding_len);
+ SCTP_BUF_LEN(m_at) += *padding_len;
+ *chunk_len += *padding_len;
+ *padding_len = 0;
+ }
+ m_at = sctp_add_addr_to_mbuf(m_at, laddr->ifa, chunk_len);
cnt++;
if (cnt >= SCTP_ADDRESS_LIMIT) {
break;
@@ -3700,11 +3720,11 @@ sctp_add_cookie(struct mbuf *init, int init_offset,
mret = NULL;
mret = sctp_get_mbuf_for_msg((sizeof(struct sctp_state_cookie) +
sizeof(struct sctp_paramhdr)), 0,
- M_DONTWAIT, 1, MT_DATA);
+ M_NOWAIT, 1, MT_DATA);
if (mret == NULL) {
return (NULL);
}
- copy_init = SCTP_M_COPYM(init, init_offset, M_COPYALL, M_DONTWAIT);
+ copy_init = SCTP_M_COPYM(init, init_offset, M_COPYALL, M_NOWAIT);
if (copy_init == NULL) {
sctp_m_freem(mret);
return (NULL);
@@ -3721,7 +3741,7 @@ sctp_add_cookie(struct mbuf *init, int init_offset,
}
#endif
copy_initack = SCTP_M_COPYM(initack, initack_offset, M_COPYALL,
- M_DONTWAIT);
+ M_NOWAIT);
if (copy_initack == NULL) {
sctp_m_freem(mret);
sctp_m_freem(copy_init);
@@ -3771,7 +3791,7 @@ sctp_add_cookie(struct mbuf *init, int init_offset,
break;
}
}
- sig = sctp_get_mbuf_for_msg(SCTP_SECRET_SIZE, 0, M_DONTWAIT, 1, MT_DATA);
+ sig = sctp_get_mbuf_for_msg(SCTP_SECRET_SIZE, 0, M_NOWAIT, 1, MT_DATA);
if (sig == NULL) {
/* no space, so free the entire chain */
sctp_m_freem(mret);
@@ -3940,7 +3960,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
if (port) {
len += sizeof(struct udphdr);
}
- newm = sctp_get_mbuf_for_msg(len, 1, M_DONTWAIT, 1, MT_DATA);
+ newm = sctp_get_mbuf_for_msg(len, 1, M_NOWAIT, 1, MT_DATA);
if (newm == NULL) {
sctp_m_freem(m);
SCTP_LTRACE_ERR_RET(inp, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, ENOMEM);
@@ -4229,7 +4249,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
if (port) {
len += sizeof(struct udphdr);
}
- newm = sctp_get_mbuf_for_msg(len, 1, M_DONTWAIT, 1, MT_DATA);
+ newm = sctp_get_mbuf_for_msg(len, 1, M_NOWAIT, 1, MT_DATA);
if (newm == NULL) {
sctp_m_freem(m);
SCTP_LTRACE_ERR_RET(inp, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, ENOMEM);
@@ -4575,21 +4595,23 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked
#endif
)
{
- struct mbuf *m, *m_at, *mp_last;
+ struct sctp_scoping scp;
+ struct mbuf *m;
struct sctp_nets *net;
struct sctp_init_chunk *init;
+
+#if defined(INET) || defined(INET6)
struct sctp_supported_addr_param *sup_addr;
+
+#endif
struct sctp_adaptation_layer_indication *ali;
- struct sctp_ecn_supported_param *ecn;
- struct sctp_prsctp_supported_param *prsctp;
struct sctp_supported_chunk_types_param *pr_supported;
+ struct sctp_paramhdr *ph;
int cnt_inits_to = 0;
- int padval, ret;
- int num_ext;
- int p_len;
+ int ret;
+ uint16_t num_ext, chunk_len, padding_len, parameter_len;
/* INIT's always go to the primary (and usually ONLY address) */
- mp_last = NULL;
net = stcb->asoc.primary_destination;
if (net == NULL) {
net = TAILQ_FIRST(&stcb->asoc.nets);
@@ -4606,15 +4628,12 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked
}
SCTPDBG(SCTP_DEBUG_OUTPUT4, "Sending INIT\n");
#ifdef INET6
- if (((struct sockaddr *)&(net->ro._l_addr))->sa_family == AF_INET6) {
+ if (net->ro._l_addr.sa.sa_family == AF_INET6) {
/*
* special hook, if we are sending to link local it will not
* show up in our private address count.
*/
- struct sockaddr_in6 *sin6l;
-
- sin6l = &net->ro._l_addr.sin6;
- if (IN6_IS_ADDR_LINKLOCAL(&sin6l->sin6_addr))
+ if (IN6_IS_ADDR_LINKLOCAL(&net->ro._l_addr.sin6.sin6_addr))
cnt_inits_to = 1;
}
#endif
@@ -4626,20 +4645,21 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked
/* start the INIT timer */
sctp_timer_start(SCTP_TIMER_TYPE_INIT, inp, stcb, net);
- m = sctp_get_mbuf_for_msg(MCLBYTES, 1, M_DONTWAIT, 1, MT_DATA);
+ m = sctp_get_mbuf_for_msg(MCLBYTES, 1, M_NOWAIT, 1, MT_DATA);
if (m == NULL) {
/* No memory, INIT timer will re-attempt. */
SCTPDBG(SCTP_DEBUG_OUTPUT4, "Sending INIT - mbuf?\n");
return;
}
- SCTP_BUF_LEN(m) = sizeof(struct sctp_init_chunk);
+ chunk_len = (uint16_t) sizeof(struct sctp_init_chunk);
+ padding_len = 0;
/*
* assume peer supports asconf in order to be able to queue local
* address changes while an INIT is in flight and before the assoc
* is established.
*/
stcb->asoc.peer_supports_asconf = 1;
- /* Now lets put the SCTP header in place */
+ /* Now lets put the chunk header in place */
init = mtod(m, struct sctp_init_chunk *);
/* now the chunk header */
init->ch.chunk_type = SCTP_INITIATION;
@@ -4651,84 +4671,112 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked
/* set up some of the credits. */
init->init.a_rwnd = htonl(max(inp->sctp_socket ? SCTP_SB_LIMIT_RCV(inp->sctp_socket) : 0,
SCTP_MINIMAL_RWND));
-
init->init.num_outbound_streams = htons(stcb->asoc.pre_open_streams);
init->init.num_inbound_streams = htons(stcb->asoc.max_inbound_streams);
init->init.initial_tsn = htonl(stcb->asoc.init_seq_number);
+
+#if defined(INET) || defined(INET6)
/* now the address restriction */
/* XXX Should we take the address family of the socket into account? */
- sup_addr = (struct sctp_supported_addr_param *)((caddr_t)init +
- sizeof(*init));
+ sup_addr = (struct sctp_supported_addr_param *)(mtod(m, caddr_t)+chunk_len);
sup_addr->ph.param_type = htons(SCTP_SUPPORTED_ADDRTYPE);
#ifdef INET6
#ifdef INET
/* we support 2 types: IPv4/IPv6 */
- sup_addr->ph.param_length = htons(sizeof(struct sctp_paramhdr) + 2 * sizeof(uint16_t));
+ parameter_len = (uint16_t) (sizeof(struct sctp_paramhdr) + 2 * sizeof(uint16_t));
+ sup_addr->ph.param_length = htons(parameter_len);
sup_addr->addr_type[0] = htons(SCTP_IPV4_ADDRESS);
sup_addr->addr_type[1] = htons(SCTP_IPV6_ADDRESS);
+ padding_len = 0;
#else
/* we support 1 type: IPv6 */
- sup_addr->ph.param_length = htons(sizeof(struct sctp_paramhdr) + sizeof(uint16_t));
+ parameter_len = (uint16_t) (sizeof(struct sctp_paramhdr) + sizeof(uint16_t));
+ sup_addr->ph.param_length = htons(parameter_len);
sup_addr->addr_type[0] = htons(SCTP_IPV6_ADDRESS);
sup_addr->addr_type[1] = htons(0); /* this is the padding */
+ padding_len = (uint16_t) sizeof(uint16_t);
#endif
#else
/* we support 1 type: IPv4 */
- sup_addr->ph.param_length = htons(sizeof(struct sctp_paramhdr) + sizeof(uint16_t));
+ parameter_len = (uint16_t) (sizeof(struct sctp_paramhdr) + sizeof(uint16_t));
+ sup_addr->ph.param_length = htons(parameter_len);
sup_addr->addr_type[0] = htons(SCTP_IPV4_ADDRESS);
sup_addr->addr_type[1] = htons(0); /* this is the padding */
+ padding_len = (uint16_t) sizeof(uint16_t);
#endif
- SCTP_BUF_LEN(m) += sizeof(struct sctp_supported_addr_param);
- /* adaptation layer indication parameter */
- ali = (struct sctp_adaptation_layer_indication *)((caddr_t)sup_addr + sizeof(struct sctp_supported_addr_param));
+ chunk_len += parameter_len;
+#endif
+ /* Adaptation layer indication parameter */
+ /* XXX: Should we include this always? */
+ if (padding_len > 0) {
+ memset(mtod(m, caddr_t)+chunk_len, 0, padding_len);
+ chunk_len += padding_len;
+ padding_len = 0;
+ }
+ parameter_len = (uint16_t) sizeof(struct sctp_adaptation_layer_indication);
+ ali = (struct sctp_adaptation_layer_indication *)(mtod(m, caddr_t)+chunk_len);
ali->ph.param_type = htons(SCTP_ULP_ADAPTATION);
- ali->ph.param_length = htons(sizeof(*ali));
+ ali->ph.param_length = htons(parameter_len);
ali->indication = ntohl(inp->sctp_ep.adaptation_layer_indicator);
- SCTP_BUF_LEN(m) += sizeof(*ali);
- ecn = (struct sctp_ecn_supported_param *)((caddr_t)ali + sizeof(*ali));
+ chunk_len += parameter_len;
if (SCTP_BASE_SYSCTL(sctp_inits_include_nat_friendly)) {
- /* Add NAT friendly parameter */
- struct sctp_paramhdr *ph;
-
- ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+SCTP_BUF_LEN(m));
+ /* Add NAT friendly parameter. */
+ if (padding_len > 0) {
+ memset(mtod(m, caddr_t)+chunk_len, 0, padding_len);
+ chunk_len += padding_len;
+ padding_len = 0;
+ }
+ parameter_len = (uint16_t) sizeof(struct sctp_paramhdr);
+ ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len);
ph->param_type = htons(SCTP_HAS_NAT_SUPPORT);
- ph->param_length = htons(sizeof(struct sctp_paramhdr));
- SCTP_BUF_LEN(m) += sizeof(struct sctp_paramhdr);
- ecn = (struct sctp_ecn_supported_param *)((caddr_t)ph + sizeof(*ph));
+ ph->param_length = htons(parameter_len);
+ chunk_len += parameter_len;
}
/* now any cookie time extensions */
if (stcb->asoc.cookie_preserve_req) {
struct sctp_cookie_perserve_param *cookie_preserve;
- cookie_preserve = (struct sctp_cookie_perserve_param *)(ecn);
+ if (padding_len > 0) {
+ memset(mtod(m, caddr_t)+chunk_len, 0, padding_len);
+ chunk_len += padding_len;
+ padding_len = 0;
+ }
+ parameter_len = (uint16_t) sizeof(struct sctp_cookie_perserve_param);
+ cookie_preserve = (struct sctp_cookie_perserve_param *)(mtod(m, caddr_t)+chunk_len);
cookie_preserve->ph.param_type = htons(SCTP_COOKIE_PRESERVE);
- cookie_preserve->ph.param_length = htons(
- sizeof(*cookie_preserve));
+ cookie_preserve->ph.param_length = htons(parameter_len);
cookie_preserve->time = htonl(stcb->asoc.cookie_preserve_req);
- SCTP_BUF_LEN(m) += sizeof(*cookie_preserve);
- ecn = (struct sctp_ecn_supported_param *)(
- (caddr_t)cookie_preserve + sizeof(*cookie_preserve));
stcb->asoc.cookie_preserve_req = 0;
+ chunk_len += parameter_len;
}
/* ECN parameter */
if (stcb->asoc.ecn_allowed == 1) {
- ecn->ph.param_type = htons(SCTP_ECN_CAPABLE);
- ecn->ph.param_length = htons(sizeof(*ecn));
- SCTP_BUF_LEN(m) += sizeof(*ecn);
- prsctp = (struct sctp_prsctp_supported_param *)((caddr_t)ecn +
- sizeof(*ecn));
- } else {
- prsctp = (struct sctp_prsctp_supported_param *)((caddr_t)ecn);
+ if (padding_len > 0) {
+ memset(mtod(m, caddr_t)+chunk_len, 0, padding_len);
+ chunk_len += padding_len;
+ padding_len = 0;
+ }
+ parameter_len = (uint16_t) sizeof(struct sctp_paramhdr);
+ ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len);
+ ph->param_type = htons(SCTP_ECN_CAPABLE);
+ ph->param_length = htons(parameter_len);
+ chunk_len += parameter_len;
+ }
+ /* And now tell the peer we do support PR-SCTP. */
+ if (padding_len > 0) {
+ memset(mtod(m, caddr_t)+chunk_len, 0, padding_len);
+ chunk_len += padding_len;
+ padding_len = 0;
}
- /* And now tell the peer we do pr-sctp */
- prsctp->ph.param_type = htons(SCTP_PRSCTP_SUPPORTED);
- prsctp->ph.param_length = htons(sizeof(*prsctp));
- SCTP_BUF_LEN(m) += sizeof(*prsctp);
+ parameter_len = (uint16_t) sizeof(struct sctp_paramhdr);
+ ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len);
+ ph->param_type = htons(SCTP_PRSCTP_SUPPORTED);
+ ph->param_length = htons(parameter_len);
+ chunk_len += parameter_len;
/* And now tell the peer we do all the extensions */
- pr_supported = (struct sctp_supported_chunk_types_param *)
- ((caddr_t)prsctp + sizeof(*prsctp));
+ pr_supported = (struct sctp_supported_chunk_types_param *)(mtod(m, caddr_t)+chunk_len);
pr_supported->ph.param_type = htons(SCTP_SUPPORTED_CHUNK_EXT);
num_ext = 0;
pr_supported->chunk_types[num_ext++] = SCTP_ASCONF;
@@ -4742,99 +4790,94 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked
if (stcb->asoc.sctp_nr_sack_on_off == 1) {
pr_supported->chunk_types[num_ext++] = SCTP_NR_SELECTIVE_ACK;
}
- p_len = sizeof(*pr_supported) + num_ext;
- pr_supported->ph.param_length = htons(p_len);
- bzero((caddr_t)pr_supported + p_len, SCTP_SIZE32(p_len) - p_len);
- SCTP_BUF_LEN(m) += SCTP_SIZE32(p_len);
-
+ parameter_len = (uint16_t) sizeof(struct sctp_supported_chunk_types_param) + num_ext;
+ pr_supported->ph.param_length = htons(parameter_len);
+ padding_len = SCTP_SIZE32(parameter_len) - parameter_len;
+ chunk_len += parameter_len;
/* add authentication parameters */
if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) {
- struct sctp_auth_random *randp;
- struct sctp_auth_hmac_algo *hmacs;
- struct sctp_auth_chunk_list *chunks;
-
/* attach RANDOM parameter, if available */
if (stcb->asoc.authinfo.random != NULL) {
- randp = (struct sctp_auth_random *)(mtod(m, caddr_t)+SCTP_BUF_LEN(m));
- p_len = sizeof(*randp) + stcb->asoc.authinfo.random_len;
+ struct sctp_auth_random *randp;
+
+ if (padding_len > 0) {
+ memset(mtod(m, caddr_t)+chunk_len, 0, padding_len);
+ chunk_len += padding_len;
+ padding_len = 0;
+ }
+ randp = (struct sctp_auth_random *)(mtod(m, caddr_t)+chunk_len);
+ parameter_len = (uint16_t) sizeof(struct sctp_auth_random) + stcb->asoc.authinfo.random_len;
/* random key already contains the header */
- bcopy(stcb->asoc.authinfo.random->key, randp, p_len);
- /* zero out any padding required */
- bzero((caddr_t)randp + p_len, SCTP_SIZE32(p_len) - p_len);
- SCTP_BUF_LEN(m) += SCTP_SIZE32(p_len);
+ memcpy(randp, stcb->asoc.authinfo.random->key, parameter_len);
+ padding_len = SCTP_SIZE32(parameter_len) - parameter_len;
+ chunk_len += parameter_len;
}
/* add HMAC_ALGO parameter */
- hmacs = (struct sctp_auth_hmac_algo *)(mtod(m, caddr_t)+SCTP_BUF_LEN(m));
- p_len = sctp_serialize_hmaclist(stcb->asoc.local_hmacs,
- (uint8_t *) hmacs->hmac_ids);
- if (p_len > 0) {
- p_len += sizeof(*hmacs);
+ if ((stcb->asoc.local_hmacs != NULL) &&
+ (stcb->asoc.local_hmacs->num_algo > 0)) {
+ struct sctp_auth_hmac_algo *hmacs;
+
+ if (padding_len > 0) {
+ memset(mtod(m, caddr_t)+chunk_len, 0, padding_len);
+ chunk_len += padding_len;
+ padding_len = 0;
+ }
+ hmacs = (struct sctp_auth_hmac_algo *)(mtod(m, caddr_t)+chunk_len);
+ parameter_len = (uint16_t) (sizeof(struct sctp_auth_hmac_algo) +
+ stcb->asoc.local_hmacs->num_algo * sizeof(uint16_t));
hmacs->ph.param_type = htons(SCTP_HMAC_LIST);
- hmacs->ph.param_length = htons(p_len);
- /* zero out any padding required */
- bzero((caddr_t)hmacs + p_len, SCTP_SIZE32(p_len) - p_len);
- SCTP_BUF_LEN(m) += SCTP_SIZE32(p_len);
+ hmacs->ph.param_length = htons(parameter_len);
+ sctp_serialize_hmaclist(stcb->asoc.local_hmacs, (uint8_t *) hmacs->hmac_ids);
+ padding_len = SCTP_SIZE32(parameter_len) - parameter_len;
+ chunk_len += parameter_len;
}
/* add CHUNKS parameter */
- chunks = (struct sctp_auth_chunk_list *)(mtod(m, caddr_t)+SCTP_BUF_LEN(m));
- p_len = sctp_serialize_auth_chunks(stcb->asoc.local_auth_chunks,
- chunks->chunk_types);
- if (p_len > 0) {
- p_len += sizeof(*chunks);
+ if (sctp_auth_get_chklist_size(stcb->asoc.local_auth_chunks) > 0) {
+ struct sctp_auth_chunk_list *chunks;
+
+ if (padding_len > 0) {
+ memset(mtod(m, caddr_t)+chunk_len, 0, padding_len);
+ chunk_len += padding_len;
+ padding_len = 0;
+ }
+ chunks = (struct sctp_auth_chunk_list *)(mtod(m, caddr_t)+chunk_len);
+ parameter_len = (uint16_t) (sizeof(struct sctp_auth_chunk_list) +
+ sctp_auth_get_chklist_size(stcb->asoc.local_auth_chunks));
chunks->ph.param_type = htons(SCTP_CHUNK_LIST);
- chunks->ph.param_length = htons(p_len);
- /* zero out any padding required */
- bzero((caddr_t)chunks + p_len, SCTP_SIZE32(p_len) - p_len);
- SCTP_BUF_LEN(m) += SCTP_SIZE32(p_len);
+ chunks->ph.param_length = htons(parameter_len);
+ sctp_serialize_auth_chunks(stcb->asoc.local_auth_chunks, chunks->chunk_types);
+ padding_len = SCTP_SIZE32(parameter_len) - parameter_len;
+ chunk_len += parameter_len;
}
}
- /* now the addresses */
- {
- struct sctp_scoping scp;
-
- /*
- * To optimize this we could put the scoping stuff into a
- * structure and remove the individual uint8's from the
- * assoc structure. Then we could just sifa in the address
- * within the stcb. But for now this is a quick hack to get
- * the address stuff teased apart.
- */
-
- scp.ipv4_addr_legal = stcb->asoc.ipv4_addr_legal;
- scp.ipv6_addr_legal = stcb->asoc.ipv6_addr_legal;
- scp.loopback_scope = stcb->asoc.loopback_scope;
- scp.ipv4_local_scope = stcb->asoc.ipv4_local_scope;
- scp.local_scope = stcb->asoc.local_scope;
- scp.site_scope = stcb->asoc.site_scope;
-
- sctp_add_addresses_to_i_ia(inp, stcb, &scp, m, cnt_inits_to);
- }
+ SCTP_BUF_LEN(m) = chunk_len;
- /* calulate the size and update pkt header and chunk header */
- p_len = 0;
- for (m_at = m; m_at; m_at = SCTP_BUF_NEXT(m_at)) {
- if (SCTP_BUF_NEXT(m_at) == NULL)
- mp_last = m_at;
- p_len += SCTP_BUF_LEN(m_at);
- }
- init->ch.chunk_length = htons(p_len);
+ /* now the addresses */
/*
- * We sifa 0 here to NOT set IP_DF if its IPv4, we ignore the return
- * here since the timer will drive a retranmission.
+ * To optimize this we could put the scoping stuff into a structure
+ * and remove the individual uint8's from the assoc structure. Then
+ * we could just sifa in the address within the stcb. But for now
+ * this is a quick hack to get the address stuff teased apart.
*/
-
- /* I don't expect this to execute but we will be safe here */
- padval = p_len % 4;
- if ((padval) && (mp_last)) {
- /*
- * The compiler worries that mp_last may not be set even
- * though I think it is impossible :-> however we add
- * mp_last here just in case.
- */
- ret = sctp_add_pad_tombuf(mp_last, (4 - padval));
- if (ret) {
- /* Houston we have a problem, no space */
+ scp.ipv4_addr_legal = stcb->asoc.ipv4_addr_legal;
+ scp.ipv6_addr_legal = stcb->asoc.ipv6_addr_legal;
+ scp.loopback_scope = stcb->asoc.loopback_scope;
+ scp.ipv4_local_scope = stcb->asoc.ipv4_local_scope;
+ scp.local_scope = stcb->asoc.local_scope;
+ scp.site_scope = stcb->asoc.site_scope;
+ sctp_add_addresses_to_i_ia(inp, stcb, &scp, m, cnt_inits_to, &padding_len, &chunk_len);
+
+ init->ch.chunk_length = htons(chunk_len);
+ if (padding_len > 0) {
+ struct mbuf *m_at, *mp_last;
+
+ mp_last = NULL;
+ for (m_at = m; m_at; m_at = SCTP_BUF_NEXT(m_at)) {
+ if (SCTP_BUF_NEXT(m_at) == NULL)
+ mp_last = m_at;
+ }
+ if ((mp_last == NULL) || sctp_add_pad_tombuf(mp_last, padding_len)) {
sctp_m_freem(m);
return;
}
@@ -5015,7 +5058,7 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_initpkt,
#endif
l_len += plen;
l_len += sizeof(struct sctp_paramhdr);
- op_err = sctp_get_mbuf_for_msg(l_len, 0, M_DONTWAIT, 1, MT_DATA);
+ op_err = sctp_get_mbuf_for_msg(l_len, 0, M_NOWAIT, 1, MT_DATA);
if (op_err) {
SCTP_BUF_LEN(op_err) = 0;
/*
@@ -5084,7 +5127,7 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_initpkt,
#endif
l_len += plen;
l_len += sizeof(struct sctp_paramhdr);
- op_err = sctp_get_mbuf_for_msg(l_len, 0, M_DONTWAIT, 1, MT_DATA);
+ op_err = sctp_get_mbuf_for_msg(l_len, 0, M_NOWAIT, 1, MT_DATA);
if (op_err) {
SCTP_BUF_LEN(op_err) = 0;
#ifdef INET6
@@ -5158,7 +5201,7 @@ invalid_size:
l_len = sizeof(struct ip) + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr);
#endif
l_len += (2 * sizeof(struct sctp_paramhdr));
- op_err = sctp_get_mbuf_for_msg(l_len, 0, M_DONTWAIT, 1, MT_DATA);
+ op_err = sctp_get_mbuf_for_msg(l_len, 0, M_NOWAIT, 1, MT_DATA);
if (op_err) {
SCTP_BUF_LEN(op_err) = 0;
#ifdef INET6
@@ -5428,7 +5471,7 @@ do_a_abort:
vrf_id, port);
return;
}
- m = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_DATA);
+ m = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_DATA);
if (m == NULL) {
/* No memory, INIT timer will re-attempt. */
if (op_err)
@@ -5753,7 +5796,7 @@ do_a_abort:
/* I can have what I want :> */
initack->init.num_outbound_streams = htons(i_want);
}
- /* tell him his limt. */
+ /* tell him his limit. */
initack->init.num_inbound_streams =
htons(inp->sctp_ep.max_open_streams_intome);
@@ -5869,7 +5912,7 @@ do_a_abort:
scp.ipv4_local_scope = stc.ipv4_scope;
scp.local_scope = stc.local_scope;
scp.site_scope = stc.site_scope;
- m_at = sctp_add_addresses_to_i_ia(inp, stcb, &scp, m_at, cnt_inits_to);
+ m_at = sctp_add_addresses_to_i_ia(inp, stcb, &scp, m_at, cnt_inits_to, NULL, NULL);
}
/* tack on the operational error if present */
@@ -6280,7 +6323,7 @@ error_out:
if (outchain == NULL) {
/* This is the general case */
new_mbuf:
- outchain = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_HEADER);
+ outchain = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_HEADER);
if (outchain == NULL) {
goto error_out;
}
@@ -6334,7 +6377,7 @@ error_out:
/* now we need another one */
sizeofcpy -= len;
}
- m = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_HEADER);
+ m = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_HEADER);
if (m == NULL) {
/* We failed */
goto error_out;
@@ -6348,7 +6391,7 @@ error_out:
return (outchain);
} else {
/* copy the old fashion way */
- appendchain = SCTP_M_COPYM(clonechain, 0, M_COPYALL, M_DONTWAIT);
+ appendchain = SCTP_M_COPYM(clonechain, 0, M_COPYALL, M_NOWAIT);
#ifdef SCTP_MBUF_LOGGING
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) {
struct mbuf *mat;
@@ -6442,7 +6485,7 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr,
return;
}
if ((ca->m) && ca->sndlen) {
- m = SCTP_M_COPYM(ca->m, 0, M_COPYALL, M_DONTWAIT);
+ m = SCTP_M_COPYM(ca->m, 0, M_COPYALL, M_NOWAIT);
if (m == NULL) {
/* can't copy so we are done */
ca->cnt_failed++;
@@ -6473,7 +6516,7 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr,
if (m) {
struct sctp_paramhdr *ph;
- SCTP_BUF_PREPEND(m, sizeof(struct sctp_paramhdr), M_DONTWAIT);
+ SCTP_BUF_PREPEND(m, sizeof(struct sctp_paramhdr), M_NOWAIT);
if (m) {
ph = mtod(m, struct sctp_paramhdr *);
ph->param_type = htons(SCTP_CAUSE_USER_INITIATED_ABT);
@@ -6650,7 +6693,7 @@ sctp_copy_out_all(struct uio *uio, int len)
struct mbuf *ret, *at;
int left, willcpy, cancpy, error;
- ret = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_WAIT, 1, MT_DATA);
+ ret = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_WAITOK, 1, MT_DATA);
if (ret == NULL) {
/* TSNH */
return (NULL);
@@ -6673,7 +6716,7 @@ sctp_copy_out_all(struct uio *uio, int len)
SCTP_BUF_NEXT_PKT(at) = SCTP_BUF_NEXT(at) = 0;
left -= willcpy;
if (left > 0) {
- SCTP_BUF_NEXT(at) = sctp_get_mbuf_for_msg(left, 0, M_WAIT, 1, MT_DATA);
+ SCTP_BUF_NEXT(at) = sctp_get_mbuf_for_msg(left, 0, M_WAITOK, 1, MT_DATA);
if (SCTP_BUF_NEXT(at) == NULL) {
goto err_out_now;
}
@@ -7237,7 +7280,7 @@ re_look:
struct mbuf *m;
dont_do_it:
- chk->data = SCTP_M_COPYM(sp->data, 0, to_move, M_DONTWAIT);
+ chk->data = SCTP_M_COPYM(sp->data, 0, to_move, M_NOWAIT);
chk->last_mbuf = NULL;
if (chk->data == NULL) {
sp->some_taken = some_taken;
@@ -7316,7 +7359,7 @@ dont_do_it:
/* Not enough room for a chunk header, get some */
struct mbuf *m;
- m = sctp_get_mbuf_for_msg(1, 0, M_DONTWAIT, 0, MT_DATA);
+ m = sctp_get_mbuf_for_msg(1, 0, M_NOWAIT, 0, MT_DATA);
if (m == NULL) {
/*
* we're in trouble here. _PREPEND below will free
@@ -7353,7 +7396,7 @@ dont_do_it:
M_ALIGN(chk->data, 4);
}
}
- SCTP_BUF_PREPEND(chk->data, sizeof(struct sctp_data_chunk), M_DONTWAIT);
+ SCTP_BUF_PREPEND(chk->data, sizeof(struct sctp_data_chunk), M_NOWAIT);
if (chk->data == NULL) {
/* HELP, TSNH since we assured it would not above? */
#ifdef INVARIANTS
@@ -8789,7 +8832,7 @@ sctp_queue_op_err(struct sctp_tcb *stcb, struct mbuf *op_err)
return;
}
chk->copy_by_ref = 0;
- SCTP_BUF_PREPEND(op_err, sizeof(struct sctp_chunkhdr), M_DONTWAIT);
+ SCTP_BUF_PREPEND(op_err, sizeof(struct sctp_chunkhdr), M_NOWAIT);
if (op_err == NULL) {
sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
return;
@@ -8854,7 +8897,7 @@ sctp_send_cookie_echo(struct mbuf *m,
if ((pad = (plen % 4))) {
plen += 4 - pad;
}
- cookie = SCTP_M_COPYM(m, at, plen, M_DONTWAIT);
+ cookie = SCTP_M_COPYM(m, at, plen, M_NOWAIT);
if (cookie == NULL) {
/* No memory */
return (-2);
@@ -8926,7 +8969,7 @@ sctp_send_heartbeat_ack(struct sctp_tcb *stcb,
/* must have a net pointer */
return;
- outchain = SCTP_M_COPYM(m, offset, chk_length, M_DONTWAIT);
+ outchain = SCTP_M_COPYM(m, offset, chk_length, M_NOWAIT);
if (outchain == NULL) {
/* gak out of memory */
return;
@@ -8985,7 +9028,7 @@ sctp_send_cookie_ack(struct sctp_tcb *stcb)
cookie_ack = NULL;
SCTP_TCB_LOCK_ASSERT(stcb);
- cookie_ack = sctp_get_mbuf_for_msg(sizeof(struct sctp_chunkhdr), 0, M_DONTWAIT, 1, MT_HEADER);
+ cookie_ack = sctp_get_mbuf_for_msg(sizeof(struct sctp_chunkhdr), 0, M_NOWAIT, 1, MT_HEADER);
if (cookie_ack == NULL) {
/* no mbuf's */
return;
@@ -9031,7 +9074,7 @@ sctp_send_shutdown_ack(struct sctp_tcb *stcb, struct sctp_nets *net)
struct sctp_shutdown_ack_chunk *ack_cp;
struct sctp_tmit_chunk *chk;
- m_shutdown_ack = sctp_get_mbuf_for_msg(sizeof(struct sctp_shutdown_ack_chunk), 0, M_DONTWAIT, 1, MT_HEADER);
+ m_shutdown_ack = sctp_get_mbuf_for_msg(sizeof(struct sctp_shutdown_ack_chunk), 0, M_NOWAIT, 1, MT_HEADER);
if (m_shutdown_ack == NULL) {
/* no mbuf's */
return;
@@ -9074,7 +9117,7 @@ sctp_send_shutdown(struct sctp_tcb *stcb, struct sctp_nets *net)
struct sctp_shutdown_chunk *shutdown_cp;
struct sctp_tmit_chunk *chk;
- m_shutdown = sctp_get_mbuf_for_msg(sizeof(struct sctp_shutdown_chunk), 0, M_DONTWAIT, 1, MT_HEADER);
+ m_shutdown = sctp_get_mbuf_for_msg(sizeof(struct sctp_shutdown_chunk), 0, M_NOWAIT, 1, MT_HEADER);
if (m_shutdown == NULL) {
/* no mbuf's */
return;
@@ -9210,7 +9253,7 @@ sctp_send_asconf_ack(struct sctp_tcb *stcb)
continue;
}
/* copy the asconf_ack */
- m_ack = SCTP_M_COPYM(ack->data, 0, M_COPYALL, M_DONTWAIT);
+ m_ack = SCTP_M_COPYM(ack->data, 0, M_COPYALL, M_NOWAIT);
if (m_ack == NULL) {
/* couldn't copy it */
return;
@@ -10130,7 +10173,7 @@ send_forward_tsn(struct sctp_tcb *stcb,
chk->rec.chunk_id.can_take_data = 0;
chk->asoc = asoc;
chk->whoTo = NULL;
- chk->data = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_DATA);
+ chk->data = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_DATA);
if (chk->data == NULL) {
sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
return;
@@ -10416,7 +10459,7 @@ sctp_send_sack(struct sctp_tcb *stcb, int so_locked
space_req = MCLBYTES;
}
/* Ok now lets formulate a MBUF with our sack */
- a_chk->data = sctp_get_mbuf_for_msg(space_req, 0, M_DONTWAIT, 1, MT_DATA);
+ a_chk->data = sctp_get_mbuf_for_msg(space_req, 0, M_NOWAIT, 1, MT_DATA);
if ((a_chk->data == NULL) ||
(a_chk->whoTo == NULL)) {
/* rats, no mbuf memory */
@@ -10694,45 +10737,50 @@ sctp_send_abort_tcb(struct sctp_tcb *stcb, struct mbuf *operr, int so_locked
#endif
)
{
- struct mbuf *m_abort;
- struct mbuf *m_out = NULL, *m_end = NULL;
- struct sctp_abort_chunk *abort = NULL;
- int sz;
- uint32_t auth_offset = 0;
+ struct mbuf *m_abort, *m, *m_last;
+ struct mbuf *m_out, *m_end = NULL;
+ struct sctp_abort_chunk *abort;
struct sctp_auth_chunk *auth = NULL;
struct sctp_nets *net;
+ uint32_t auth_offset = 0;
+ uint16_t cause_len, chunk_len, padding_len;
+ SCTP_TCB_LOCK_ASSERT(stcb);
/*-
* Add an AUTH chunk, if chunk requires it and save the offset into
* the chain for AUTH
*/
if (sctp_auth_is_required_chunk(SCTP_ABORT_ASSOCIATION,
stcb->asoc.peer_auth_chunks)) {
- m_out = sctp_add_auth_chunk(m_out, &m_end, &auth, &auth_offset,
+ m_out = sctp_add_auth_chunk(NULL, &m_end, &auth, &auth_offset,
stcb, SCTP_ABORT_ASSOCIATION);
SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks);
+ } else {
+ m_out = NULL;
}
- SCTP_TCB_LOCK_ASSERT(stcb);
- m_abort = sctp_get_mbuf_for_msg(sizeof(struct sctp_abort_chunk), 0, M_DONTWAIT, 1, MT_HEADER);
+ m_abort = sctp_get_mbuf_for_msg(sizeof(struct sctp_abort_chunk), 0, M_NOWAIT, 1, MT_HEADER);
if (m_abort == NULL) {
- /* no mbuf's */
- if (m_out)
+ if (m_out) {
sctp_m_freem(m_out);
+ }
+ if (operr) {
+ sctp_m_freem(operr);
+ }
return;
}
/* link in any error */
SCTP_BUF_NEXT(m_abort) = operr;
- sz = 0;
- if (operr) {
- struct mbuf *n;
-
- n = operr;
- while (n) {
- sz += SCTP_BUF_LEN(n);
- n = SCTP_BUF_NEXT(n);
+ cause_len = 0;
+ m_last = NULL;
+ for (m = operr; m; m = SCTP_BUF_NEXT(m)) {
+ cause_len += (uint16_t) SCTP_BUF_LEN(m);
+ if (SCTP_BUF_NEXT(m) == NULL) {
+ m_last = m;
}
}
- SCTP_BUF_LEN(m_abort) = sizeof(*abort);
+ SCTP_BUF_LEN(m_abort) = sizeof(struct sctp_abort_chunk);
+ chunk_len = (uint16_t) sizeof(struct sctp_abort_chunk) + cause_len;
+ padding_len = SCTP_SIZE32(chunk_len) - chunk_len;
if (m_out == NULL) {
/* NO Auth chunk prepended, so reserve space in front */
SCTP_BUF_RESV_UF(m_abort, SCTP_MIN_OVERHEAD);
@@ -10746,12 +10794,18 @@ sctp_send_abort_tcb(struct sctp_tcb *stcb, struct mbuf *operr, int so_locked
} else {
net = stcb->asoc.primary_destination;
}
- /* fill in the ABORT chunk */
+ /* Fill in the ABORT chunk header. */
abort = mtod(m_abort, struct sctp_abort_chunk *);
abort->ch.chunk_type = SCTP_ABORT_ASSOCIATION;
abort->ch.chunk_flags = 0;
- abort->ch.chunk_length = htons(sizeof(*abort) + sz);
-
+ abort->ch.chunk_length = htons(chunk_len);
+ /* Add padding, if necessary. */
+ if (padding_len > 0) {
+ if ((m_last == NULL) || sctp_add_pad_tombuf(m_last, padding_len)) {
+ sctp_m_freem(m_out);
+ return;
+ }
+ }
(void)sctp_lowlevel_chunk_output(stcb->sctp_ep, stcb, net,
(struct sockaddr *)&net->ro._l_addr,
m_out, auth_offset, auth, stcb->asoc.authinfo.active_keyid, 1, 0, 0,
@@ -10773,7 +10827,7 @@ sctp_send_shutdown_complete(struct sctp_tcb *stcb,
uint32_t vtag;
uint8_t flags;
- m_shutdown_comp = sctp_get_mbuf_for_msg(sizeof(struct sctp_chunkhdr), 0, M_DONTWAIT, 1, MT_HEADER);
+ m_shutdown_comp = sctp_get_mbuf_for_msg(sizeof(struct sctp_chunkhdr), 0, M_NOWAIT, 1, MT_HEADER);
if (m_shutdown_comp == NULL) {
/* no mbuf's */
return;
@@ -10869,7 +10923,7 @@ sctp_send_resp_msg(struct sockaddr *src, struct sockaddr *dst,
if (port) {
len += sizeof(struct udphdr);
}
- mout = sctp_get_mbuf_for_msg(len + max_linkhdr, 1, M_DONTWAIT, 1, MT_DATA);
+ mout = sctp_get_mbuf_for_msg(len + max_linkhdr, 1, M_NOWAIT, 1, MT_DATA);
if (mout == NULL) {
if (cause) {
sctp_m_freem(cause);
@@ -11113,7 +11167,7 @@ sctp_send_hb(struct sctp_tcb *stcb, struct sctp_nets *net, int so_locked
chk->asoc = &stcb->asoc;
chk->send_size = sizeof(struct sctp_heartbeat_chunk);
- chk->data = sctp_get_mbuf_for_msg(chk->send_size, 0, M_DONTWAIT, 1, MT_HEADER);
+ chk->data = sctp_get_mbuf_for_msg(chk->send_size, 0, M_NOWAIT, 1, MT_HEADER);
if (chk->data == NULL) {
sctp_free_a_chunk(stcb, chk, so_locked);
return;
@@ -11217,7 +11271,7 @@ sctp_send_ecn_echo(struct sctp_tcb *stcb, struct sctp_nets *net,
chk->rec.chunk_id.can_take_data = 0;
chk->asoc = &stcb->asoc;
chk->send_size = sizeof(struct sctp_ecne_chunk);
- chk->data = sctp_get_mbuf_for_msg(chk->send_size, 0, M_DONTWAIT, 1, MT_HEADER);
+ chk->data = sctp_get_mbuf_for_msg(chk->send_size, 0, M_NOWAIT, 1, MT_HEADER);
if (chk->data == NULL) {
sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
return;
@@ -11316,7 +11370,7 @@ sctp_send_packet_dropped(struct sctp_tcb *stcb, struct sctp_nets *net,
was_trunc = 1;
}
chk->asoc = &stcb->asoc;
- chk->data = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_DATA);
+ chk->data = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_DATA);
if (chk->data == NULL) {
jump_out:
sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
@@ -11429,7 +11483,7 @@ sctp_send_cwr(struct sctp_tcb *stcb, struct sctp_nets *net, uint32_t high_tsn, u
chk->rec.chunk_id.can_take_data = 1;
chk->asoc = &stcb->asoc;
chk->send_size = sizeof(struct sctp_cwr_chunk);
- chk->data = sctp_get_mbuf_for_msg(chk->send_size, 0, M_DONTWAIT, 1, MT_HEADER);
+ chk->data = sctp_get_mbuf_for_msg(chk->send_size, 0, M_NOWAIT, 1, MT_HEADER);
if (chk->data == NULL) {
sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
return;
@@ -11735,7 +11789,7 @@ sctp_send_str_reset_req(struct sctp_tcb *stcb,
chk->send_size = SCTP_SIZE32(chk->book_size);
chk->book_size_scale = 0;
- chk->data = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_DATA);
+ chk->data = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_DATA);
if (chk->data == NULL) {
sctp_free_a_chunk(stcb, chk, SCTP_SO_LOCKED);
SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, ENOMEM);
@@ -12487,7 +12541,7 @@ sctp_lower_sosend(struct socket *so,
if (top) {
struct mbuf *cntm = NULL;
- mm = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr), 0, M_WAIT, 1, MT_DATA);
+ mm = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr), 0, M_WAITOK, 1, MT_DATA);
if (sndlen != 0) {
for (cntm = top; cntm; cntm = SCTP_BUF_NEXT(cntm)) {
tot_out += SCTP_BUF_LEN(cntm);
@@ -12503,7 +12557,7 @@ sctp_lower_sosend(struct socket *so,
error = EMSGSIZE;
goto out;
}
- mm = sctp_get_mbuf_for_msg(tot_demand, 0, M_WAIT, 1, MT_DATA);
+ mm = sctp_get_mbuf_for_msg(tot_demand, 0, M_WAITOK, 1, MT_DATA);
}
if (mm == NULL) {
SCTP_LTRACE_ERR_RET(NULL, stcb, net, SCTP_FROM_SCTP_OUTPUT, ENOMEM);
@@ -13279,7 +13333,7 @@ sctp_add_auth_chunk(struct mbuf *m, struct mbuf **m_end,
if (!sctp_auth_is_required_chunk(chunk, stcb->asoc.peer_auth_chunks)) {
return (m);
}
- m_auth = sctp_get_mbuf_for_msg(sizeof(*auth), 0, M_DONTWAIT, 1, MT_HEADER);
+ m_auth = sctp_get_mbuf_for_msg(sizeof(*auth), 0, M_NOWAIT, 1, MT_HEADER);
if (m_auth == NULL) {
/* no mbuf's */
return (m);
diff --git a/sys/netinet/sctp_output.h b/sys/netinet/sctp_output.h
index 91eb35d..b62271b 100644
--- a/sys/netinet/sctp_output.h
+++ b/sys/netinet/sctp_output.h
@@ -46,7 +46,8 @@ sctp_add_addresses_to_i_ia(struct sctp_inpcb *inp,
struct sctp_tcb *stcb,
struct sctp_scoping *scope,
struct mbuf *m_at,
- int cnt_inits_to);
+ int cnt_inits_to,
+ uint16_t * padding_len, uint16_t * chunk_len);
int sctp_is_addr_restricted(struct sctp_tcb *, struct sctp_ifa *);
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c
index b2703cd..4bd8cb8 100644
--- a/sys/netinet/sctp_pcb.c
+++ b/sys/netinet/sctp_pcb.c
@@ -2694,9 +2694,9 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr,
ip_inp = (struct inpcb *)so->so_pcb;
#ifdef SCTP_DEBUG
if (addr) {
- SCTPDBG(SCTP_DEBUG_PCB1, "Bind called port:%d\n",
+ SCTPDBG(SCTP_DEBUG_PCB1, "Bind called port: %d\n",
ntohs(((struct sockaddr_in *)addr)->sin_port));
- SCTPDBG(SCTP_DEBUG_PCB1, "Addr :");
+ SCTPDBG(SCTP_DEBUG_PCB1, "Addr: ");
SCTPDBG_ADDR(SCTP_DEBUG_PCB1, addr);
}
#endif
@@ -3294,7 +3294,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from)
struct mbuf *op_err;
op_err = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (op_err) {
/* Fill in the user initiated abort */
struct sctp_paramhdr *ph;
@@ -3380,7 +3380,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from)
abort_anyway:
op_err = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (op_err) {
/*
* Fill in the user
@@ -3465,7 +3465,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from)
uint32_t *ippp;
op_err = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (op_err) {
/* Fill in the user initiated abort */
struct sctp_paramhdr *ph;
diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c
index 3444923..69505c3 100644
--- a/sys/netinet/sctp_timer.c
+++ b/sys/netinet/sctp_timer.c
@@ -150,7 +150,7 @@ sctp_threshold_management(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
struct mbuf *oper;
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
@@ -1054,7 +1054,7 @@ sctp_cookie_timer(struct sctp_inpcb *inp,
struct mbuf *oper;
oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (oper) {
struct sctp_paramhdr *ph;
uint32_t *ippp;
diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c
index 9c4a8b2..0596f87 100644
--- a/sys/netinet/sctp_usrreq.c
+++ b/sys/netinet/sctp_usrreq.c
@@ -547,27 +547,21 @@ try_again:
static int
sctp_bind(struct socket *so, struct sockaddr *addr, struct thread *p)
{
- struct sctp_inpcb *inp = NULL;
- int error;
+ struct sctp_inpcb *inp;
-#ifdef INET
- if (addr && addr->sa_family != AF_INET) {
- /* must be a v4 address! */
- SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
- return (EINVAL);
- }
-#endif /* INET6 */
- if (addr && (addr->sa_len != sizeof(struct sockaddr_in))) {
- SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
- return (EINVAL);
- }
inp = (struct sctp_inpcb *)so->so_pcb;
if (inp == NULL) {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
return (EINVAL);
}
- error = sctp_inpcb_bind(so, addr, NULL, p);
- return (error);
+ if (addr != NULL) {
+ if ((addr->sa_family != AF_INET) ||
+ (addr->sa_len != sizeof(struct sockaddr_in))) {
+ SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
+ return (EINVAL);
+ }
+ }
+ return (sctp_inpcb_bind(so, addr, NULL, p));
}
#endif
@@ -763,7 +757,7 @@ sctp_disconnect(struct socket *so)
/* Left with Data unread */
struct mbuf *err;
- err = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr), 0, M_DONTWAIT, 1, MT_DATA);
+ err = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr), 0, M_NOWAIT, 1, MT_DATA);
if (err) {
/*
* Fill in the user
@@ -862,7 +856,7 @@ sctp_disconnect(struct socket *so)
abort_anyway:
op_err = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (op_err) {
/*
* Fill in the user
@@ -1077,7 +1071,7 @@ sctp_shutdown(struct socket *so)
abort_anyway:
op_err = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)),
- 0, M_DONTWAIT, 1, MT_DATA);
+ 0, M_NOWAIT, 1, MT_DATA);
if (op_err) {
/* Fill in the user initiated abort */
struct sctp_paramhdr *ph;
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c
index f31a557..1fadf6b 100644
--- a/sys/netinet/sctputil.c
+++ b/sys/netinet/sctputil.c
@@ -2548,7 +2548,7 @@ sctp_add_pad_tombuf(struct mbuf *m, int padlen)
/* Hard way we must grow the mbuf */
struct mbuf *tmp;
- tmp = sctp_get_mbuf_for_msg(padlen, 0, M_DONTWAIT, 1, MT_DATA);
+ tmp = sctp_get_mbuf_for_msg(padlen, 0, M_NOWAIT, 1, MT_DATA);
if (tmp == NULL) {
/* Out of space GAK! we are in big trouble. */
SCTP_LTRACE_ERR_RET_PKT(m, NULL, NULL, NULL, SCTP_FROM_SCTPUTIL, ENOBUFS);
@@ -2618,11 +2618,11 @@ sctp_notify_assoc_change(uint16_t state, struct sctp_tcb *stcb,
} else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) {
notif_len += abort_len;
}
- m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA);
+ m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_NOWAIT, 1, MT_DATA);
if (m_notify == NULL) {
/* Retry with smaller value. */
notif_len = sizeof(struct sctp_assoc_change);
- m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA);
+ m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_NOWAIT, 1, MT_DATA);
if (m_notify == NULL) {
goto set_error;
}
@@ -2740,7 +2740,7 @@ sctp_notify_peer_addr_change(struct sctp_tcb *stcb, uint32_t state,
/* event not enabled */
return;
}
- m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_paddr_change), 0, M_DONTWAIT, 1, MT_DATA);
+ m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_paddr_change), 0, M_NOWAIT, 1, MT_DATA);
if (m_notify == NULL)
return;
SCTP_BUF_LEN(m_notify) = 0;
@@ -2831,7 +2831,7 @@ sctp_notify_send_failed(struct sctp_tcb *stcb, uint8_t sent, uint32_t error,
} else {
length = sizeof(struct sctp_send_failed);
}
- m_notify = sctp_get_mbuf_for_msg(length, 0, M_DONTWAIT, 1, MT_DATA);
+ m_notify = sctp_get_mbuf_for_msg(length, 0, M_NOWAIT, 1, MT_DATA);
if (m_notify == NULL)
/* no space left */
return;
@@ -2943,7 +2943,7 @@ sctp_notify_send_failed2(struct sctp_tcb *stcb, uint32_t error,
} else {
length = sizeof(struct sctp_send_failed);
}
- m_notify = sctp_get_mbuf_for_msg(length, 0, M_DONTWAIT, 1, MT_DATA);
+ m_notify = sctp_get_mbuf_for_msg(length, 0, M_NOWAIT, 1, MT_DATA);
if (m_notify == NULL) {
/* no space left */
return;
@@ -3032,7 +3032,7 @@ sctp_notify_adaptation_layer(struct sctp_tcb *stcb)
/* event not enabled */
return;
}
- m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_adaption_event), 0, M_DONTWAIT, 1, MT_DATA);
+ m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_adaption_event), 0, M_NOWAIT, 1, MT_DATA);
if (m_notify == NULL)
/* no space left */
return;
@@ -3087,7 +3087,7 @@ sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error,
if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_CANT_READ) {
return;
}
- m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_pdapi_event), 0, M_DONTWAIT, 1, MT_DATA);
+ m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_pdapi_event), 0, M_NOWAIT, 1, MT_DATA);
if (m_notify == NULL)
/* no space left */
return;
@@ -3197,7 +3197,7 @@ sctp_notify_shutdown_event(struct sctp_tcb *stcb)
/* event not enabled */
return;
}
- m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_shutdown_event), 0, M_DONTWAIT, 1, MT_DATA);
+ m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_shutdown_event), 0, M_NOWAIT, 1, MT_DATA);
if (m_notify == NULL)
/* no space left */
return;
@@ -3245,7 +3245,7 @@ sctp_notify_sender_dry_event(struct sctp_tcb *stcb,
/* event not enabled */
return;
}
- m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_sender_dry_event), 0, M_DONTWAIT, 1, MT_DATA);
+ m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_sender_dry_event), 0, M_NOWAIT, 1, MT_DATA);
if (m_notify == NULL) {
/* no space left */
return;
@@ -3297,7 +3297,7 @@ sctp_notify_stream_reset_add(struct sctp_tcb *stcb, uint16_t numberin, uint16_t
return;
}
stcb->asoc.peer_req_out = 0;
- m_notify = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_DATA);
+ m_notify = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_DATA);
if (m_notify == NULL)
/* no space left */
return;
@@ -3353,7 +3353,7 @@ sctp_notify_stream_reset_tsn(struct sctp_tcb *stcb, uint32_t sending_tsn, uint32
/* event not enabled */
return;
}
- m_notify = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_DATA);
+ m_notify = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_DATA);
if (m_notify == NULL)
/* no space left */
return;
@@ -3412,7 +3412,7 @@ sctp_notify_stream_reset(struct sctp_tcb *stcb,
/* event not enabled */
return;
}
- m_notify = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_DATA);
+ m_notify = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_DATA);
if (m_notify == NULL)
/* no space left */
return;
@@ -3479,11 +3479,11 @@ sctp_notify_remote_error(struct sctp_tcb *stcb, uint16_t error, struct sctp_erro
chunk_len = 0;
}
notif_len = sizeof(struct sctp_remote_error) + chunk_len;
- m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA);
+ m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_NOWAIT, 1, MT_DATA);
if (m_notify == NULL) {
/* Retry with smaller value. */
notif_len = sizeof(struct sctp_remote_error);
- m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA);
+ m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_NOWAIT, 1, MT_DATA);
if (m_notify == NULL) {
return;
}
@@ -4636,7 +4636,7 @@ sctp_generate_invmanparam(int err)
/* Return a MBUF with a invalid mandatory parameter */
struct mbuf *m;
- m = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr), 0, M_DONTWAIT, 1, MT_DATA);
+ m = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr), 0, M_NOWAIT, 1, MT_DATA);
if (m) {
struct sctp_paramhdr *ph;
@@ -4955,7 +4955,7 @@ sctp_get_ifa_hash_val(struct sockaddr *addr)
}
#endif
#ifdef INET6
- case INET6:
+ case AF_INET6:
{
struct sockaddr_in6 *sin6;
uint32_t hash_of_addr;
@@ -6798,7 +6798,7 @@ sctp_recv_udp_tunneled_packet(struct mbuf *m, int off, struct inpcb *ignored)
* Split out the mbuf chain. Leave the IP header in m, place the
* rest in the sp.
*/
- sp = m_split(m, off, M_DONTWAIT);
+ sp = m_split(m, off, M_NOWAIT);
if (sp == NULL) {
/* Gak, drop packet, we can't do a split */
goto out;
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 564f792..846887d2 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -780,7 +780,17 @@ findpcb:
/*
* Grab info from PACKET_TAG_IPFORWARD tag prepended to the chain.
*/
- if (m->m_flags & M_IP_NEXTHOP)
+ if (
+#ifdef INET6
+ (isipv6 && (m->m_flags & M_IP6_NEXTHOP))
+#ifdef INET
+ || (!isipv6 && (m->m_flags & M_IP_NEXTHOP))
+#endif
+#endif
+#if defined(INET) && !defined(INET6)
+ (m->m_flags & M_IP_NEXTHOP)
+#endif
+ )
fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL);
#ifdef INET6
@@ -809,7 +819,8 @@ findpcb:
}
/* Remove the tag from the packet. We don't need it anymore. */
m_tag_delete(m, fwd_tag);
- m->m_flags &= ~M_IP_NEXTHOP;
+ m->m_flags &= ~M_IP6_NEXTHOP;
+ fwd_tag = NULL;
} else if (isipv6) {
inp = in6_pcblookup_mbuf(&V_tcbinfo, &ip6->ip6_src,
th->th_sport, &ip6->ip6_dst, th->th_dport,
@@ -847,6 +858,7 @@ findpcb:
/* Remove the tag from the packet. We don't need it anymore. */
m_tag_delete(m, fwd_tag);
m->m_flags &= ~M_IP_NEXTHOP;
+ fwd_tag = NULL;
} else
inp = in_pcblookup_mbuf(&V_tcbinfo, ip->ip_src,
th->th_sport, ip->ip_dst, th->th_dport,
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index b050fcf..ac7ac31 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -842,7 +842,7 @@ send:
TCPSTAT_INC(tcps_sndpack);
TCPSTAT_ADD(tcps_sndbyte, len);
}
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
SOCKBUF_UNLOCK(&so->so_snd);
error = ENOBUFS;
@@ -850,7 +850,7 @@ send:
}
#ifdef INET6
if (MHLEN < hdrlen + max_linkhdr) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
SOCKBUF_UNLOCK(&so->so_snd);
m_freem(m);
@@ -902,7 +902,7 @@ send:
else
TCPSTAT_INC(tcps_sndwinup);
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
error = ENOBUFS;
goto out;
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index 288c5dc..289b58a 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -160,7 +160,7 @@ tcp_reass_sysctl_qsize(SYSCTL_HANDLER_ARGS)
int qsize;
qsize = uma_zone_get_cur(V_tcp_reass_zone);
- return (sysctl_handle_int(oidp, &qsize, sizeof(qsize), req));
+ return (sysctl_handle_int(oidp, &qsize, 0, req));
}
int
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index a24e16a..3c9dd34 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -367,6 +367,7 @@ tcp_init(void)
V_tcpcb_zone = uma_zcreate("tcpcb", sizeof(struct tcpcb_mem),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
uma_zone_set_max(V_tcpcb_zone, maxsockets);
+ uma_zone_set_warning(V_tcpcb_zone, "kern.ipc.maxsockets limit reached");
tcp_tw_init();
syncache_init();
@@ -573,7 +574,7 @@ tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m,
}
}
if (m == NULL) {
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL)
return;
tlen = 0;
@@ -1859,7 +1860,7 @@ ipsec_hdrsiz_tcp(struct tcpcb *tp)
if ((tp == NULL) || ((inp = tp->t_inpcb) == NULL))
return (0);
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (!m)
return (0);
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index c83945a..5baf3b8 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -312,7 +312,7 @@ syncache_sysctl_count(SYSCTL_HANDLER_ARGS)
int count;
count = uma_zone_get_cur(V_tcp_syncache.zone);
- return (sysctl_handle_int(oidp, &count, sizeof(count), req));
+ return (sysctl_handle_int(oidp, &count, 0, req));
}
/*
@@ -1369,7 +1369,7 @@ syncache_respond(struct syncache *sc)
("syncache: mbuf too small"));
/* Create the IP+TCP header from scratch. */
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL)
return (ENOBUFS);
#ifdef MAC
diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c
index c7076d7..7e6128b 100644
--- a/sys/netinet/tcp_timewait.c
+++ b/sys/netinet/tcp_timewait.c
@@ -523,7 +523,7 @@ tcp_twrespond(struct tcptw *tw, int flags)
INP_WLOCK_ASSERT(inp);
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL)
return (ENOBUFS);
m->m_data += max_linkhdr;
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 45e2693..b6297dc 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -191,6 +191,7 @@ udp_init(void)
V_udpcb_zone = uma_zcreate("udpcb", sizeof(struct udpcb),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
uma_zone_set_max(V_udpcb_zone, maxsockets);
+ uma_zone_set_warning(V_udpcb_zone, "kern.ipc.maxsockets limit reached");
EVENTHANDLER_REGISTER(maxsockets_change, udp_zone_change, NULL,
EVENTHANDLER_PRI_ANY);
}
@@ -1174,7 +1175,7 @@ udp_output(struct inpcb *inp, struct mbuf *m, struct sockaddr *addr,
* link-layer headers. Immediate slide the data pointer back forward
* since we won't use that space at this layer.
*/
- M_PREPEND(m, sizeof(struct udpiphdr) + max_linkhdr, M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct udpiphdr) + max_linkhdr, M_NOWAIT);
if (m == NULL) {
error = ENOBUFS;
goto release;
diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index b2e8e04..c4d4e3b 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -565,7 +565,7 @@ insert:
m->m_len -= sizeof(struct ip6_frag);
} else {
/* this comes with no copy if the boundary is on cluster */
- if ((t = m_split(m, offset, M_DONTWAIT)) == NULL) {
+ if ((t = m_split(m, offset, M_NOWAIT)) == NULL) {
frag6_remque(q6);
V_frag6_nfrags -= q6->ip6q_nfrag;
#ifdef MAC
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index d9ea93e..0cd6e5a 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -360,7 +360,7 @@ icmp6_error(struct mbuf *m, int type, int code, int param)
m_adj(m, ICMPV6_PLD_MAXLEN - m->m_pkthdr.len);
preplen = sizeof(struct ip6_hdr) + sizeof(struct icmp6_hdr);
- M_PREPEND(m, preplen, M_DONTWAIT); /* FIB is also copied over. */
+ M_PREPEND(m, preplen, M_NOWAIT); /* FIB is also copied over. */
if (m && m->m_len < preplen)
m = m_pullup(m, preplen);
if (m == NULL) {
@@ -581,12 +581,12 @@ icmp6_input(struct mbuf **mp, int *offp, int proto)
const int maxlen = sizeof(*nip6) + sizeof(*nicmp6);
int n0len;
- MGETHDR(n, M_DONTWAIT, n0->m_type);
+ MGETHDR(n, M_NOWAIT, n0->m_type);
n0len = n0->m_pkthdr.len; /* save for use below */
if (n)
M_MOVE_PKTHDR(n, n0); /* FIB copied. */
if (n && maxlen >= MHLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
n = NULL;
@@ -699,15 +699,15 @@ icmp6_input(struct mbuf **mp, int *offp, int proto)
/* Give up remote */
break;
}
- MGETHDR(n, M_DONTWAIT, m->m_type);
+ MGETHDR(n, M_NOWAIT, m->m_type);
if (n && maxlen > MHLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
n = NULL;
}
}
- if (n && !m_dup_pkthdr(n, m, M_DONTWAIT)) {
+ if (n && !m_dup_pkthdr(n, m, M_NOWAIT)) {
/*
* Previous code did a blind M_COPY_PKTHDR
* and said "just for rcvif". If true, then
@@ -767,7 +767,7 @@ icmp6_input(struct mbuf **mp, int *offp, int proto)
goto badcode;
if (icmp6len < sizeof(struct nd_router_solicit))
goto badlen;
- if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
+ if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) {
/* give up local */
/* Send incoming SeND packet to user space. */
@@ -805,7 +805,7 @@ icmp6_input(struct mbuf **mp, int *offp, int proto)
goto badcode;
if (icmp6len < sizeof(struct nd_router_advert))
goto badlen;
- if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
+ if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) {
/* Send incoming SeND-protected/ND packet to user space. */
if (send_sendso_input_hook != NULL) {
@@ -836,7 +836,7 @@ icmp6_input(struct mbuf **mp, int *offp, int proto)
goto badcode;
if (icmp6len < sizeof(struct nd_neighbor_solicit))
goto badlen;
- if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
+ if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) {
if (send_sendso_input_hook != NULL) {
error = send_sendso_input_hook(m, ifp,
SND_IN, ip6len);
@@ -865,7 +865,7 @@ icmp6_input(struct mbuf **mp, int *offp, int proto)
goto badcode;
if (icmp6len < sizeof(struct nd_neighbor_advert))
goto badlen;
- if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
+ if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) {
/* Send incoming SeND-protected/ND packet to user space. */
if (send_sendso_input_hook != NULL) {
@@ -896,7 +896,7 @@ icmp6_input(struct mbuf **mp, int *offp, int proto)
goto badcode;
if (icmp6len < sizeof(struct nd_redirect))
goto badlen;
- if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
+ if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) {
if (send_sendso_input_hook != NULL) {
error = send_sendso_input_hook(m, ifp,
SND_IN, ip6len);
@@ -1495,7 +1495,7 @@ ni6_input(struct mbuf *m, int off)
}
/* allocate an mbuf to reply. */
- MGETHDR(n, M_DONTWAIT, m->m_type);
+ MGETHDR(n, M_NOWAIT, m->m_type);
if (n == NULL) {
m_freem(m);
return (NULL);
@@ -1509,7 +1509,7 @@ ni6_input(struct mbuf *m, int off)
*/
goto bad;
}
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
goto bad;
}
@@ -1609,9 +1609,9 @@ ni6_nametodns(const char *name, int namelen, int old)
len = MCLBYTES;
/* because MAXHOSTNAMELEN is usually 256, we use cluster mbuf */
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m && len > MLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0)
goto fail;
}
@@ -2063,7 +2063,7 @@ icmp6_rip6_input(struct mbuf **mp, int off)
*/
if ((m->m_flags & M_EXT) && m->m_next == NULL &&
m->m_len <= MHLEN) {
- MGET(n, M_DONTWAIT, m->m_type);
+ MGET(n, M_NOWAIT, m->m_type);
if (n != NULL) {
if (m_dup_pkthdr(n, m, M_NOWAIT)) {
bcopy(m->m_data, n->m_data,
@@ -2113,7 +2113,7 @@ icmp6_rip6_input(struct mbuf **mp, int off)
m->m_len <= MHLEN) {
struct mbuf *n;
- MGET(n, M_DONTWAIT, m->m_type);
+ MGET(n, M_NOWAIT, m->m_type);
if (n != NULL) {
if (m_dup_pkthdr(n, m, M_NOWAIT)) {
bcopy(m->m_data, n->m_data, m->m_len);
@@ -2592,9 +2592,9 @@ icmp6_redirect_output(struct mbuf *m0, struct rtentry *rt)
#if IPV6_MMTU >= MCLBYTES
# error assumption failed about IPV6_MMTU and MCLBYTES
#endif
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
+ MGETHDR(m, M_NOWAIT, MT_HEADER);
if (m && IPV6_MMTU >= MHLEN)
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!m)
goto fail;
M_SETFIB(m, rt->rt_fibnum);
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 63b64ee..08dd259 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1149,6 +1149,8 @@ in6_update_ifa(struct ifnet *ifp, struct in6_aliasreq *ifra,
ifa_ref(&ia->ia_ifa); /* in6_ifaddrhead */
IN6_IFADDR_WLOCK();
TAILQ_INSERT_TAIL(&V_in6_ifaddrhead, ia, ia_link);
+ LIST_INSERT_HEAD(IN6ADDR_HASH(&ifra->ifra_addr.sin6_addr),
+ ia, ia6_hash);
IN6_IFADDR_WUNLOCK();
}
@@ -1534,6 +1536,7 @@ in6_unlink_ifa(struct in6_ifaddr *ia, struct ifnet *ifp)
*/
IN6_IFADDR_WLOCK();
TAILQ_REMOVE(&V_in6_ifaddrhead, ia, ia_link);
+ LIST_REMOVE(ia, ia6_hash);
IN6_IFADDR_WUNLOCK();
/*
@@ -1871,9 +1874,18 @@ in6_ifinit(struct ifnet *ifp, struct in6_ifaddr *ia,
ia->ia_addr = *sin6;
if (ifacount <= 1 && ifp->if_ioctl) {
+ int flags;
+
+ /*
+ * Historically, drivers managed IFF_UP flag theirselves, so we
+ * need to check whether driver did that.
+ */
+ flags = ifp->if_flags;
error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia);
if (error)
return (error);
+ if ((ifp->if_flags & IFF_UP) && (flags & IFF_UP) == 0)
+ if_up(ifp);
}
ia->ia_ifa.ifa_metric = ifp->if_metric;
@@ -2083,7 +2095,7 @@ in6_localip(struct in6_addr *in6)
struct in6_ifaddr *ia;
IN6_IFADDR_RLOCK();
- TAILQ_FOREACH(ia, &V_in6_ifaddrhead, ia_link) {
+ LIST_FOREACH(ia, IN6ADDR_HASH(in6), ia6_hash) {
if (IN6_ARE_ADDR_EQUAL(in6, &ia->ia_addr.sin6_addr)) {
IN6_IFADDR_RUNLOCK();
return (1);
@@ -2093,22 +2105,20 @@ in6_localip(struct in6_addr *in6)
return (0);
}
-
int
in6_is_addr_deprecated(struct sockaddr_in6 *sa6)
{
struct in6_ifaddr *ia;
IN6_IFADDR_RLOCK();
- TAILQ_FOREACH(ia, &V_in6_ifaddrhead, ia_link) {
- if (IN6_ARE_ADDR_EQUAL(&ia->ia_addr.sin6_addr,
- &sa6->sin6_addr) &&
- (ia->ia6_flags & IN6_IFF_DEPRECATED) != 0) {
- IN6_IFADDR_RUNLOCK();
- return (1); /* true */
+ LIST_FOREACH(ia, IN6ADDR_HASH(&sa6->sin6_addr), ia6_hash) {
+ if (IN6_ARE_ADDR_EQUAL(IA6_IN6(ia), &sa6->sin6_addr)) {
+ if (ia->ia6_flags & IN6_IFF_DEPRECATED) {
+ IN6_IFADDR_RUNLOCK();
+ return (1); /* true */
+ }
+ break;
}
-
- /* XXX: do we still have to go thru the rest of the list? */
}
IN6_IFADDR_RUNLOCK();
@@ -2669,6 +2679,8 @@ in6_lltable_dump(struct lltable *llt, struct sysctl_req *wr)
ndpc.sin6.sin6_family = AF_INET6;
ndpc.sin6.sin6_len = sizeof(ndpc.sin6);
bcopy(L3_ADDR(lle), &ndpc.sin6, L3_ADDR_LEN(lle));
+ if (V_deembed_scopeid)
+ sa6_recoverscope(&ndpc.sin6);
/* publish */
if (lle->la_flags & LLE_PUB)
diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c
index 573287c..9da5917 100644
--- a/sys/netinet6/in6_gif.c
+++ b/sys/netinet6/in6_gif.c
@@ -167,7 +167,7 @@ in6_gif_output(struct ifnet *ifp,
eiphdr.eip_resvh = 0;
}
/* prepend Ethernet-in-IP header */
- M_PREPEND(m, sizeof(struct etherip_header), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct etherip_header), M_NOWAIT);
if (m && m->m_len < sizeof(struct etherip_header))
m = m_pullup(m, sizeof(struct etherip_header));
if (m == NULL)
@@ -191,7 +191,7 @@ in6_gif_output(struct ifnet *ifp,
if (family == AF_LINK)
len += ETHERIP_ALIGN;
#endif
- M_PREPEND(m, len, M_DONTWAIT);
+ M_PREPEND(m, len, M_NOWAIT);
if (m != NULL && m->m_len < len)
m = m_pullup(m, len);
if (m == NULL) {
diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h
index 71a05f3..e8b6b9e 100644
--- a/sys/netinet6/in6_var.h
+++ b/sys/netinet6/in6_var.h
@@ -67,6 +67,7 @@
#include <sys/tree.h>
#ifdef _KERNEL
+#include <sys/fnv_hash.h>
#include <sys/libkern.h>
#endif
@@ -131,10 +132,13 @@ struct in6_ifaddr {
/* multicast addresses joined from the kernel */
LIST_HEAD(, in6_multi_mship) ia6_memberships;
+ /* entry in bucket of inet6 addresses */
+ LIST_ENTRY(in6_ifaddr) ia6_hash;
};
/* List of in6_ifaddr's. */
TAILQ_HEAD(in6_ifaddrhead, in6_ifaddr);
+LIST_HEAD(in6_ifaddrlisthead, in6_ifaddr);
/* control structure to manage address selection policy */
struct in6_addrpolicy {
@@ -499,7 +503,27 @@ struct in6_rrenumreq {
#ifdef _KERNEL
VNET_DECLARE(struct in6_ifaddrhead, in6_ifaddrhead);
+VNET_DECLARE(struct in6_ifaddrlisthead *, in6_ifaddrhashtbl);
+VNET_DECLARE(u_long, in6_ifaddrhmask);
#define V_in6_ifaddrhead VNET(in6_ifaddrhead)
+#define V_in6_ifaddrhashtbl VNET(in6_ifaddrhashtbl)
+#define V_in6_ifaddrhmask VNET(in6_ifaddrhmask)
+
+#define IN6ADDR_NHASH_LOG2 8
+#define IN6ADDR_NHASH (1 << IN6ADDR_NHASH_LOG2)
+#define IN6ADDR_HASHVAL(x) (in6_addrhash(x))
+#define IN6ADDR_HASH(x) \
+ (&V_in6_ifaddrhashtbl[IN6ADDR_HASHVAL(x) & V_in6_ifaddrhmask])
+
+static __inline uint32_t
+in6_addrhash(struct in6_addr *in6)
+{
+ uint32_t x;
+
+ x = in6->s6_addr32[0] ^ in6->s6_addr32[1] ^ in6->s6_addr32[2] ^
+ in6->s6_addr32[3];
+ return (fnv_32_buf(&x, sizeof(x), FNV1_32_INIT));
+}
extern struct rwlock in6_ifaddr_lock;
#define IN6_IFADDR_LOCK_ASSERT( ) rw_assert(&in6_ifaddr_lock, RA_LOCKED)
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index 1b90c75..45c4ff6 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -126,6 +126,8 @@ extern struct domain inet6domain;
u_char ip6_protox[IPPROTO_MAX];
VNET_DEFINE(struct in6_ifaddrhead, in6_ifaddrhead);
+VNET_DEFINE(struct in6_ifaddrlisthead *, in6_ifaddrhashtbl);
+VNET_DEFINE(u_long, in6_ifaddrhmask);
static struct netisr_handler ip6_nh = {
.nh_name = "ip6",
@@ -170,6 +172,8 @@ ip6_init(void)
TUNABLE_INT_FETCH("net.inet6.ip6.no_radr", &V_ip6_no_radr);
TAILQ_INIT(&V_in6_ifaddrhead);
+ V_in6_ifaddrhashtbl = hashinit(IN6ADDR_NHASH, M_IFADDR,
+ &V_in6_ifaddrhmask);
/* Initialize packet filter hooks. */
V_inet6_pfil_hook.ph_type = PFIL_TYPE_AF;
@@ -297,6 +301,7 @@ void
ip6_destroy()
{
+ hashdestroy(V_in6_ifaddrhashtbl, M_IFADDR, V_in6_ifaddrhmask);
nd6_destroy();
callout_drain(&V_in6_tmpaddrtimer_ch);
}
@@ -492,11 +497,11 @@ ip6_input(struct mbuf *m)
if (m && m->m_next != NULL && m->m_pkthdr.len < MCLBYTES) {
struct mbuf *n;
- MGETHDR(n, M_DONTWAIT, MT_HEADER);
+ MGETHDR(n, M_NOWAIT, MT_HEADER);
if (n)
M_MOVE_PKTHDR(n, m);
if (n && n->m_pkthdr.len > MHLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_freem(n);
n = NULL;
@@ -1662,9 +1667,9 @@ ip6_pullexthdr(struct mbuf *m, size_t off, int nxt)
else
elen = (ip6e.ip6e_len + 1) << 3;
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (n && elen >= MLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
n = NULL;
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c
index 5e72b2b..a221110 100644
--- a/sys/netinet6/ip6_mroute.c
+++ b/sys/netinet6/ip6_mroute.c
@@ -1699,7 +1699,7 @@ register_send(struct ip6_hdr *ip6, struct mif6 *mif, struct mbuf *m)
++pim6stat.pim6s_snd_registers;
/* Make a copy of the packet to send to the user level process */
- MGETHDR(mm, M_DONTWAIT, MT_HEADER);
+ MGETHDR(mm, M_NOWAIT, MT_HEADER);
if (mm == NULL)
return (ENOBUFS);
mm->m_pkthdr.rcvif = NULL;
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index 0d762e9..5e8c11f 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -257,7 +257,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt,
int segleft_org = 0;
struct secpolicy *sp = NULL;
#endif /* IPSEC */
- struct m_tag *fwd_tag;
+ struct m_tag *fwd_tag = NULL;
ip6 = mtod(m, struct ip6_hdr *);
if (ip6 == NULL) {
@@ -636,26 +636,23 @@ again:
/* adjust pointer */
ip6 = mtod(m, struct ip6_hdr *);
- bzero(&dst_sa, sizeof(dst_sa));
- dst_sa.sin6_family = AF_INET6;
- dst_sa.sin6_len = sizeof(dst_sa);
- dst_sa.sin6_addr = ip6->ip6_dst;
- if (ro->ro_rt) {
+ if (ro->ro_rt && fwd_tag == NULL) {
rt = ro->ro_rt;
ifp = ro->ro_rt->rt_ifp;
- } else if ((error = in6_selectroute_fib(&dst_sa, opt, im6o, ro,
- &ifp, &rt, inp ? inp->inp_inc.inc_fibnum : M_GETFIB(m))) != 0) {
- switch (error) {
- case EHOSTUNREACH:
- V_ip6stat.ip6s_noroute++;
- break;
- case EADDRNOTAVAIL:
- default:
- break; /* XXX statistics? */
+ } else {
+ if (fwd_tag == NULL) {
+ bzero(&dst_sa, sizeof(dst_sa));
+ dst_sa.sin6_family = AF_INET6;
+ dst_sa.sin6_len = sizeof(dst_sa);
+ dst_sa.sin6_addr = ip6->ip6_dst;
+ }
+ error = in6_selectroute_fib(&dst_sa, opt, im6o, ro, &ifp,
+ &rt, inp ? inp->inp_inc.inc_fibnum : M_GETFIB(m));
+ if (error != 0) {
+ if (ifp != NULL)
+ in6_ifstat_inc(ifp, ifs6_out_discard);
+ goto bad;
}
- if (ifp != NULL)
- in6_ifstat_inc(ifp, ifs6_out_discard);
- goto bad;
}
if (rt == NULL) {
/*
@@ -933,7 +930,7 @@ again:
if ((m->m_flags & M_IP6_NEXTHOP) &&
(fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL)) != NULL) {
dst = (struct sockaddr_in6 *)&ro->ro_dst;
- bcopy((fwd_tag+1), dst, sizeof(struct sockaddr_in6));
+ bcopy((fwd_tag+1), &dst_sa, sizeof(struct sockaddr_in6));
m->m_flags |= M_SKIP_FIREWALL;
m->m_flags &= ~M_IP6_NEXTHOP;
m_tag_delete(m, fwd_tag);
@@ -1125,7 +1122,7 @@ passout:
*/
m0 = m;
for (off = hlen; off < tlen; off += len) {
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
+ MGETHDR(m, M_NOWAIT, MT_HEADER);
if (!m) {
error = ENOBUFS;
V_ip6stat.ip6s_odropped++;
@@ -1225,12 +1222,12 @@ ip6_copyexthdr(struct mbuf **mp, caddr_t hdr, int hlen)
if (hlen > MCLBYTES)
return (ENOBUFS); /* XXX */
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (!m)
return (ENOBUFS);
if (hlen > MLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
return (ENOBUFS);
@@ -1263,7 +1260,7 @@ ip6_insert_jumboopt(struct ip6_exthdrs *exthdrs, u_int32_t plen)
* Otherwise, use it to store the options.
*/
if (exthdrs->ip6e_hbh == 0) {
- MGET(mopt, M_DONTWAIT, MT_DATA);
+ MGET(mopt, M_NOWAIT, MT_DATA);
if (mopt == 0)
return (ENOBUFS);
mopt->m_len = JUMBOOPTLEN;
@@ -1295,9 +1292,9 @@ ip6_insert_jumboopt(struct ip6_exthdrs *exthdrs, u_int32_t plen)
* As a consequence, we must always prepare a cluster
* at this point.
*/
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (n) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_freem(n);
n = NULL;
@@ -1350,7 +1347,7 @@ ip6_insertfraghdr(struct mbuf *m0, struct mbuf *m, int hlen,
if (hlen > sizeof(struct ip6_hdr)) {
n = m_copym(m0, sizeof(struct ip6_hdr),
- hlen - sizeof(struct ip6_hdr), M_DONTWAIT);
+ hlen - sizeof(struct ip6_hdr), M_NOWAIT);
if (n == 0)
return (ENOBUFS);
m->m_next = n;
@@ -1372,7 +1369,7 @@ ip6_insertfraghdr(struct mbuf *m0, struct mbuf *m, int hlen,
/* allocate a new mbuf for the fragment header */
struct mbuf *mfrg;
- MGET(mfrg, M_DONTWAIT, MT_DATA);
+ MGET(mfrg, M_NOWAIT, MT_DATA);
if (mfrg == 0)
return (ENOBUFS);
mfrg->m_len = sizeof(struct ip6_frag);
@@ -3048,7 +3045,7 @@ ip6_splithdr(struct mbuf *m, struct ip6_exthdrs *exthdrs)
ip6 = mtod(m, struct ip6_hdr *);
if (m->m_len > sizeof(*ip6)) {
- MGETHDR(mh, M_DONTWAIT, MT_HEADER);
+ MGETHDR(mh, M_NOWAIT, MT_HEADER);
if (mh == 0) {
m_freem(m);
return ENOBUFS;
diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h
index e4afc6f..748efbf 100644
--- a/sys/netinet6/ip6_var.h
+++ b/sys/netinet6/ip6_var.h
@@ -285,7 +285,7 @@ struct ip6aux {
#define IPV6_FORWARDING 0x02 /* most of IPv6 header exists */
#define IPV6_MINMTU 0x04 /* use minimum MTU (IPV6_USE_MIN_MTU) */
-#define M_IP6_NEXTHOP M_PROTO2 /* explicit ip nexthop */
+#define M_IP6_NEXTHOP M_PROTO7 /* explicit ip nexthop */
#ifdef __NO_STRICT_ALIGNMENT
#define IP6_HDR_ALIGNED_P(ip) 1
diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c
index ba850b2..0d9e300 100644
--- a/sys/netinet6/mld6.c
+++ b/sys/netinet6/mld6.c
@@ -1799,13 +1799,13 @@ mld_v1_transmit_report(struct in6_multi *in6m, const int type)
ia = in6ifa_ifpforlinklocal(ifp, IN6_IFF_NOTREADY|IN6_IFF_ANYCAST);
/* ia may be NULL if link-local address is tentative. */
- MGETHDR(mh, M_DONTWAIT, MT_HEADER);
+ MGETHDR(mh, M_NOWAIT, MT_HEADER);
if (mh == NULL) {
if (ia != NULL)
ifa_free(&ia->ia_ifa);
return (ENOMEM);
}
- MGET(md, M_DONTWAIT, MT_DATA);
+ MGET(md, M_NOWAIT, MT_DATA);
if (md == NULL) {
m_free(mh);
if (ia != NULL)
@@ -2447,9 +2447,9 @@ mld_v2_enqueue_group_record(struct ifqueue *ifq, struct in6_multi *inm,
m0srcs = (ifp->if_mtu - MLD_MTUSPACE -
sizeof(struct mldv2_record)) / sizeof(struct in6_addr);
if (!is_state_change && !is_group_query)
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL)
return (-ENOMEM);
@@ -2572,9 +2572,9 @@ mld_v2_enqueue_group_record(struct ifqueue *ifq, struct in6_multi *inm,
CTR1(KTR_MLD, "%s: outbound queue full", __func__);
return (-ENOMEM);
}
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL)
return (-ENOMEM);
mld_save_context(m, ifp);
@@ -2726,9 +2726,9 @@ mld_v2_enqueue_filter_change(struct ifqueue *ifq, struct in6_multi *inm)
CTR1(KTR_MLD,
"%s: use previous packet", __func__);
} else {
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL) {
CTR1(KTR_MLD,
"%s: m_get*() failed", __func__);
@@ -3173,7 +3173,7 @@ mld_v2_encap_report(struct ifnet *ifp, struct mbuf *m)
if (ia == NULL)
CTR1(KTR_MLD, "%s: warning: ia is NULL", __func__);
- MGETHDR(mh, M_DONTWAIT, MT_HEADER);
+ MGETHDR(mh, M_NOWAIT, MT_HEADER);
if (mh == NULL) {
if (ia != NULL)
ifa_free(&ia->ia_ifa);
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 9993c77..5107f1d 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1108,8 +1108,14 @@ nd6_free(struct llentry *ln, int gc)
LLE_WUNLOCK(ln);
IF_AFDATA_LOCK(ifp);
LLE_WLOCK(ln);
- LLE_REMREF(ln);
- llentry_free(ln);
+
+ /* Guard against race with other llentry_free(). */
+ if (ln->la_flags & LLE_LINKED) {
+ LLE_REMREF(ln);
+ llentry_free(ln);
+ } else
+ LLE_FREE_LOCKED(ln);
+
IF_AFDATA_UNLOCK(ifp);
return (next);
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index 42b4ad2..31d0ccb 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -419,9 +419,9 @@ nd6_ns_output(struct ifnet *ifp, const struct in6_addr *daddr6,
return;
}
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m && max_linkhdr + maxlen >= MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
m = NULL;
@@ -994,9 +994,9 @@ nd6_na_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6_0,
return;
}
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m && max_linkhdr + maxlen >= MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
m = NULL;
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
index d78bf8e..e635041 100644
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -459,7 +459,7 @@ rip6_output(m, va_alist)
code = icmp6->icmp6_code;
}
- M_PREPEND(m, sizeof(*ip6), M_DONTWAIT);
+ M_PREPEND(m, sizeof(*ip6), M_NOWAIT);
if (m == NULL) {
error = ENOBUFS;
goto bad;
diff --git a/sys/netinet6/scope6.c b/sys/netinet6/scope6.c
index edfb1e6..060fe59 100644
--- a/sys/netinet6/scope6.c
+++ b/sys/netinet6/scope6.c
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
#include <sys/socket.h>
#include <sys/systm.h>
#include <sys/queue.h>
+#include <sys/sysctl.h>
#include <sys/syslog.h>
#include <net/if.h>
@@ -55,6 +56,11 @@ VNET_DEFINE(int, ip6_use_defzone) = 1;
#else
VNET_DEFINE(int, ip6_use_defzone) = 0;
#endif
+VNET_DEFINE(int, deembed_scopeid) = 1;
+SYSCTL_DECL(_net_inet6_ip6);
+SYSCTL_VNET_INT(_net_inet6_ip6, OID_AUTO, deembed_scopeid, CTLFLAG_RW,
+ &VNET_NAME(deembed_scopeid), 0,
+ "Extract embedded zone ID and set it to sin6_scope_id in sockaddr_in6.");
/*
* The scope6_lock protects the global sid default stored in
@@ -379,8 +385,11 @@ sa6_recoverscope(struct sockaddr_in6 *sin6)
/* sanity check */
if (V_if_index < zoneid)
return (ENXIO);
+#if 0
+ /* XXX: Disabled due to possible deadlock. */
if (!ifnet_byindex(zoneid))
return (ENXIO);
+#endif
if (sin6->sin6_scope_id != 0 &&
zoneid != sin6->sin6_scope_id) {
log(LOG_NOTICE,
diff --git a/sys/netinet6/scope6_var.h b/sys/netinet6/scope6_var.h
index ae337b8..87de8d7 100644
--- a/sys/netinet6/scope6_var.h
+++ b/sys/netinet6/scope6_var.h
@@ -34,6 +34,8 @@
#define _NETINET6_SCOPE6_VAR_H_
#ifdef _KERNEL
+#include <net/vnet.h>
+
struct scope6_id {
/*
* 16 is correspondent to 4bit multicast scope field.
@@ -42,6 +44,9 @@ struct scope6_id {
u_int32_t s6id_list[16];
};
+VNET_DECLARE(int, deembed_scopeid);
+#define V_deembed_scopeid VNET(deembed_scopeid)
+
void scope6_init(void);
struct scope6_id *scope6_ifattach(struct ifnet *);
void scope6_ifdetach(struct scope6_id *);
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c
index 952905a..200fd68 100644
--- a/sys/netinet6/udp6_usrreq.c
+++ b/sys/netinet6/udp6_usrreq.c
@@ -747,7 +747,7 @@ udp6_output(struct inpcb *inp, struct mbuf *m, struct sockaddr *addr6,
* Calculate data length and get a mbuf
* for UDP and IP6 headers.
*/
- M_PREPEND(m, hlen + sizeof(struct udphdr), M_DONTWAIT);
+ M_PREPEND(m, hlen + sizeof(struct udphdr), M_NOWAIT);
if (m == 0) {
error = ENOBUFS;
goto release;
diff --git a/sys/netipsec/ipsec_mbuf.c b/sys/netipsec/ipsec_mbuf.c
index ffbe664..bc87409 100644
--- a/sys/netipsec/ipsec_mbuf.c
+++ b/sys/netipsec/ipsec_mbuf.c
@@ -85,11 +85,11 @@ m_makespace(struct mbuf *m0, int skip, int hlen, int *off)
todo = remain;
while (todo > 0) {
if (todo > MHLEN) {
- n = m_getcl(M_DONTWAIT, m->m_type, 0);
+ n = m_getcl(M_NOWAIT, m->m_type, 0);
len = MCLBYTES;
}
else {
- n = m_get(M_DONTWAIT, m->m_type);
+ n = m_get(M_NOWAIT, m->m_type);
len = MHLEN;
}
if (n == NULL) {
@@ -115,7 +115,7 @@ m_makespace(struct mbuf *m0, int skip, int hlen, int *off)
}
}
else {
- n = m_get(M_DONTWAIT, m->m_type);
+ n = m_get(M_NOWAIT, m->m_type);
if (n == NULL) {
m_freem(n0);
return NULL;
@@ -203,7 +203,7 @@ m_pad(struct mbuf *m, int n)
if (pad > M_TRAILINGSPACE(m0)) {
/* Add an mbuf to the chain. */
- MGET(m1, M_DONTWAIT, MT_DATA);
+ MGET(m1, M_NOWAIT, MT_DATA);
if (m1 == 0) {
m_freem(m0);
DPRINTF(("%s: unable to get extra mbuf\n", __func__));
diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c
index 681dc15..f263139 100644
--- a/sys/netipsec/ipsec_output.c
+++ b/sys/netipsec/ipsec_output.c
@@ -601,7 +601,7 @@ ipsec6_splithdr(struct mbuf *m)
ip6 = mtod(m, struct ip6_hdr *);
hlen = sizeof(struct ip6_hdr);
if (m->m_len > hlen) {
- MGETHDR(mh, M_DONTWAIT, MT_DATA);
+ MGETHDR(mh, M_NOWAIT, MT_DATA);
if (!mh) {
m_freem(m);
return NULL;
@@ -721,7 +721,7 @@ ipsec6_encapsulate(struct mbuf *m, struct secasvar *sav)
plen = m->m_pkthdr.len;
if (M_LEADINGSPACE(m->m_next) < sizeof(struct ip6_hdr)) {
struct mbuf *n;
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (!n) {
m_freem(m);
return ENOBUFS;
diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c
index 2d6443d..a4b7ecb 100644
--- a/sys/netipsec/key.c
+++ b/sys/netipsec/key.c
@@ -1723,7 +1723,7 @@ key_gather_mbuf(m, mhp, ndeep, nitem, va_alist)
IPSEC_ASSERT(len <= MHLEN, ("header too big %u", len));
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (!n)
goto fail;
n->m_len = len;
@@ -1742,7 +1742,7 @@ key_gather_mbuf(m, mhp, ndeep, nitem, va_alist)
mtod(n, caddr_t));
} else {
n = m_copym(m, mhp->extoff[idx], mhp->extlen[idx],
- M_DONTWAIT);
+ M_NOWAIT);
}
if (n == NULL)
goto fail;
@@ -2200,9 +2200,9 @@ key_spddelete2(so, m, mhp)
/* create new sadb_msg to reply. */
len = PFKEY_ALIGN8(sizeof(struct sadb_msg));
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (n && len > MHLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_freem(n);
n = NULL;
@@ -2222,7 +2222,7 @@ key_spddelete2(so, m, mhp)
off, len));
n->m_next = m_copym(m, mhp->extoff[SADB_X_EXT_POLICY],
- mhp->extlen[SADB_X_EXT_POLICY], M_DONTWAIT);
+ mhp->extlen[SADB_X_EXT_POLICY], M_NOWAIT);
if (!n->m_next) {
m_freem(n);
return key_senderror(so, m, ENOBUFS);
@@ -3562,9 +3562,9 @@ key_setsadbmsg(u_int8_t type, u_int16_t tlen, u_int8_t satype, u_int32_t seq,
len = PFKEY_ALIGN8(sizeof(struct sadb_msg));
if (len > MCLBYTES)
return NULL;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m && len > MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_freem(m);
m = NULL;
@@ -4823,9 +4823,9 @@ key_getspi(so, m, mhp)
len = PFKEY_ALIGN8(sizeof(struct sadb_msg)) +
PFKEY_ALIGN8(sizeof(struct sadb_sa));
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (len > MHLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_freem(n);
n = NULL;
@@ -6033,7 +6033,7 @@ key_getcomb_esp()
else {
IPSEC_ASSERT(l <= MLEN,
("l=%u > MLEN=%lu", l, (u_long) MLEN));
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m) {
M_ALIGN(m, l);
m->m_len = l;
@@ -6141,14 +6141,14 @@ key_getcomb_ah()
if (!m) {
IPSEC_ASSERT(l <= MLEN,
("l=%u > MLEN=%lu", l, (u_long) MLEN));
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m) {
M_ALIGN(m, l);
m->m_len = l;
m->m_next = NULL;
}
} else
- M_PREPEND(m, l, M_DONTWAIT);
+ M_PREPEND(m, l, M_NOWAIT);
if (!m)
return NULL;
@@ -6185,14 +6185,14 @@ key_getcomb_ipcomp()
if (!m) {
IPSEC_ASSERT(l <= MLEN,
("l=%u > MLEN=%lu", l, (u_long) MLEN));
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m) {
M_ALIGN(m, l);
m->m_len = l;
m->m_next = NULL;
}
} else
- M_PREPEND(m, l, M_DONTWAIT);
+ M_PREPEND(m, l, M_NOWAIT);
if (!m)
return NULL;
@@ -6236,7 +6236,7 @@ key_getprop(saidx)
if (!m)
return NULL;
- M_PREPEND(m, l, M_DONTWAIT);
+ M_PREPEND(m, l, M_NOWAIT);
if (!m)
return NULL;
@@ -6794,9 +6794,9 @@ key_register(so, m, mhp)
if (len > MCLBYTES)
return key_senderror(so, m, ENOBUFS);
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (len > MHLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_freem(n);
n = NULL;
@@ -7364,9 +7364,9 @@ key_parse(m, so)
if (m->m_next) {
struct mbuf *n;
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (n && m->m_pkthdr.len > MHLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
n = NULL;
@@ -7969,9 +7969,9 @@ key_alloc_mbuf(l)
len = l;
while (len > 0) {
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (n && len > MLEN)
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if (!n) {
m_freem(m);
return NULL;
diff --git a/sys/netipsec/keysock.c b/sys/netipsec/keysock.c
index 143b600..475befa 100644
--- a/sys/netipsec/keysock.c
+++ b/sys/netipsec/keysock.c
@@ -143,7 +143,7 @@ key_sendup0(rp, m, promisc)
if (promisc) {
struct sadb_msg *pmsg;
- M_PREPEND(m, sizeof(struct sadb_msg), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct sadb_msg), M_NOWAIT);
if (m && m->m_len < sizeof(struct sadb_msg))
m = m_pullup(m, sizeof(struct sadb_msg));
if (!m) {
@@ -214,14 +214,14 @@ key_sendup(so, msg, len, target)
m = mprev = NULL;
while (tlen > 0) {
if (tlen == len) {
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (n == NULL) {
V_pfkeystat.in_nomem++;
return ENOBUFS;
}
n->m_len = MHLEN;
} else {
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (n == NULL) {
V_pfkeystat.in_nomem++;
return ENOBUFS;
@@ -229,7 +229,7 @@ key_sendup(so, msg, len, target)
n->m_len = MLEN;
}
if (tlen >= MCLBYTES) { /*XXX better threshold? */
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
m_freem(m);
diff --git a/sys/netipsec/xform_ipip.c b/sys/netipsec/xform_ipip.c
index bde2d2c..fc3b1d2 100644
--- a/sys/netipsec/xform_ipip.c
+++ b/sys/netipsec/xform_ipip.c
@@ -447,7 +447,7 @@ ipip_output(
goto bad;
}
- M_PREPEND(m, sizeof(struct ip), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ip), M_NOWAIT);
if (m == 0) {
DPRINTF(("%s: M_PREPEND failed\n", __func__));
V_ipipstat.ipips_hdrops++;
@@ -534,7 +534,7 @@ ipip_output(
if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_dst))
ip6->ip6_dst.s6_addr16[1] = 0;
- M_PREPEND(m, sizeof(struct ip6_hdr), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ip6_hdr), M_NOWAIT);
if (m == 0) {
DPRINTF(("%s: M_PREPEND failed\n", __func__));
V_ipipstat.ipips_hdrops++;
diff --git a/sys/netipx/ipx_outputfl.c b/sys/netipx/ipx_outputfl.c
index 3fbda88..25bbedf 100644
--- a/sys/netipx/ipx_outputfl.c
+++ b/sys/netipx/ipx_outputfl.c
@@ -270,7 +270,7 @@ ipx_output_type20(struct mbuf *m)
if(ipx->ipx_sum != 0xffff)
ipx->ipx_sum = ipx_cksum(m, ntohs(ipx->ipx_len));
- m1 = m_copym(m, 0, M_COPYALL, M_DONTWAIT);
+ m1 = m_copym(m, 0, M_COPYALL, M_NOWAIT);
if(m1) {
error = (*ifp->if_output)(ifp, m1,
(struct sockaddr *)&dst, NULL);
diff --git a/sys/netipx/ipx_usrreq.c b/sys/netipx/ipx_usrreq.c
index 5fcfa36..31b781c 100644
--- a/sys/netipx/ipx_usrreq.c
+++ b/sys/netipx/ipx_usrreq.c
@@ -257,7 +257,7 @@ ipx_output(struct ipxpcb *ipxp, struct mbuf *m0)
(m->m_len + m->m_data < &m->m_dat[MLEN])) {
mtod(m, char*)[m->m_len++] = 0;
} else {
- struct mbuf *m1 = m_get(M_DONTWAIT, MT_DATA);
+ struct mbuf *m1 = m_get(M_NOWAIT, MT_DATA);
if (m1 == NULL) {
m_freem(m0);
@@ -278,7 +278,7 @@ ipx_output(struct ipxpcb *ipxp, struct mbuf *m0)
if (ipxp->ipxp_flags & IPXP_RAWOUT) {
ipx = mtod(m, struct ipx *);
} else {
- M_PREPEND(m, sizeof(struct ipx), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ipx), M_NOWAIT);
if (m == NULL)
return (ENOBUFS);
ipx = mtod(m, struct ipx *);
diff --git a/sys/netipx/spx_reass.c b/sys/netipx/spx_reass.c
index fea031f..2479ae1 100644
--- a/sys/netipx/spx_reass.c
+++ b/sys/netipx/spx_reass.c
@@ -399,7 +399,7 @@ present:
spx_newchecks[4]++;
if (dt != cb->s_rhdr.spx_dt) {
struct mbuf *mm =
- m_getclr(M_DONTWAIT, MT_CONTROL);
+ m_getclr(M_NOWAIT, MT_CONTROL);
spx_newchecks[0]++;
if (mm != NULL) {
u_short *s =
diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c
index 2b18288..9d00d10 100644
--- a/sys/netipx/spx_usrreq.c
+++ b/sys/netipx/spx_usrreq.c
@@ -473,7 +473,7 @@ spx_output(struct spxpcb *cb, struct mbuf *m0)
cb->s_cc &= ~SPX_EM;
while (len > mtu) {
- m = m_copym(m0, 0, mtu, M_DONTWAIT);
+ m = m_copym(m0, 0, mtu, M_NOWAIT);
if (m == NULL) {
cb->s_cc |= oldEM;
m_freem(m0);
@@ -509,7 +509,7 @@ spx_output(struct spxpcb *cb, struct mbuf *m0)
if (M_TRAILINGSPACE(m) >= 1)
m->m_len++;
else {
- struct mbuf *m1 = m_get(M_DONTWAIT, MT_DATA);
+ struct mbuf *m1 = m_get(M_NOWAIT, MT_DATA);
if (m1 == NULL) {
m_freem(m0);
@@ -520,7 +520,7 @@ spx_output(struct spxpcb *cb, struct mbuf *m0)
m->m_next = m1;
}
}
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL) {
m_freem(m0);
return (ENOBUFS);
@@ -734,7 +734,7 @@ send:
spxstat.spxs_sndprobe++;
if (cb->s_flags & SF_ACKNOW)
spxstat.spxs_sndacks++;
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL)
return (ENOBUFS);
@@ -1091,7 +1091,7 @@ spx_attach(struct socket *so, int proto, struct thread *td)
cb = malloc(sizeof *cb, M_PCB, M_NOWAIT | M_ZERO);
if (cb == NULL)
return (ENOBUFS);
- mm = m_getclr(M_DONTWAIT, MT_DATA);
+ mm = m_getclr(M_NOWAIT, MT_DATA);
if (mm == NULL) {
free(cb, M_PCB);
return (ENOBUFS);
diff --git a/sys/netnatm/natm.c b/sys/netnatm/natm.c
index cfcbaa7..681da9c 100644
--- a/sys/netnatm/natm.c
+++ b/sys/netnatm/natm.c
@@ -292,7 +292,7 @@ natm_usr_send(struct socket *so, int flags, struct mbuf *m,
/*
* Send the data. We must put an atm_pseudohdr on first.
*/
- M_PREPEND(m, sizeof(*aph), M_DONTWAIT);
+ M_PREPEND(m, sizeof(*aph), M_NOWAIT);
if (m == NULL) {
NATM_UNLOCK();
m_freem(control);
diff --git a/sys/netncp/ncp_sock.c b/sys/netncp/ncp_sock.c
index 4be432e..24557be 100644
--- a/sys/netncp/ncp_sock.c
+++ b/sys/netncp/ncp_sock.c
@@ -157,7 +157,7 @@ ncp_sock_send(struct socket *so, struct mbuf *top, struct ncp_rq *rqp)
int error, flags=0;
for (;;) {
- m = m_copym(top, 0, M_COPYALL, M_WAIT);
+ m = m_copym(top, 0, M_COPYALL, M_WAITOK);
/* NCPDDEBUG(m);*/
error = sosend(so, to, 0, m, 0, flags, td);
if (error == 0 || error == EINTR || error == ENETDOWN)
diff --git a/sys/netpfil/ipfw/ip_dn_glue.c b/sys/netpfil/ipfw/ip_dn_glue.c
index 54eed75..7d7e695 100644
--- a/sys/netpfil/ipfw/ip_dn_glue.c
+++ b/sys/netpfil/ipfw/ip_dn_glue.c
@@ -513,7 +513,7 @@ dn_compat_configure(void *v)
lmax += sizeof(struct dn_sch) + sizeof(struct dn_link) +
sizeof(struct dn_fs) + sizeof(struct dn_profile);
- base = buf = malloc(lmax, M_DUMMYNET, M_WAIT|M_ZERO);
+ base = buf = malloc(lmax, M_DUMMYNET, M_WAITOK|M_ZERO);
o_next(&buf, sizeof(struct dn_id), DN_CMD_CONFIG);
base->id = DN_API_VERSION;
diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c
index 3cbb006..a542ffe 100644
--- a/sys/netpfil/ipfw/ip_fw2.c
+++ b/sys/netpfil/ipfw/ip_fw2.c
@@ -1850,8 +1850,7 @@ do { \
case O_TAG: {
struct m_tag *mtag;
- uint32_t tag = (cmd->arg1 == IP_FW_TABLEARG) ?
- tablearg : cmd->arg1;
+ uint32_t tag = IP_FW_ARG_TABLEARG(cmd->arg1);
/* Packet is already tagged with this tag? */
mtag = m_tag_locate(m, MTAG_IPFW, tag, NULL);
@@ -1930,8 +1929,7 @@ do { \
case O_TAGGED: {
struct m_tag *mtag;
- uint32_t tag = (cmd->arg1 == IP_FW_TABLEARG) ?
- tablearg : cmd->arg1;
+ uint32_t tag = IP_FW_ARG_TABLEARG(cmd->arg1);
if (cmdlen == 1) {
match = m_tag_locate(m, MTAG_IPFW,
@@ -2069,8 +2067,7 @@ do { \
case O_PIPE:
case O_QUEUE:
set_match(args, f_pos, chain);
- args->rule.info = (cmd->arg1 == IP_FW_TABLEARG) ?
- tablearg : cmd->arg1;
+ args->rule.info = IP_FW_ARG_TABLEARG(cmd->arg1);
if (cmd->opcode == O_PIPE)
args->rule.info |= IPFW_IS_PIPE;
if (V_fw_one_pass)
@@ -2090,8 +2087,7 @@ do { \
retval = (cmd->opcode == O_DIVERT) ?
IP_FW_DIVERT : IP_FW_TEE;
set_match(args, f_pos, chain);
- args->rule.info = (cmd->arg1 == IP_FW_TABLEARG) ?
- tablearg : cmd->arg1;
+ args->rule.info = IP_FW_ARG_TABLEARG(cmd->arg1);
break;
case O_COUNT:
@@ -2109,8 +2105,7 @@ do { \
(uintptr_t)f->x_next == chain->id) {
f_pos = (uintptr_t)f->next_rule;
} else {
- int i = (cmd->arg1 == IP_FW_TABLEARG) ?
- tablearg : cmd->arg1;
+ int i = IP_FW_ARG_TABLEARG(cmd->arg1);
/* make sure we do not jump backward */
if (i <= f->rulenum)
i = f->rulenum + 1;
@@ -2215,9 +2210,8 @@ do { \
(uintptr_t)f->x_next == chain->id) {
f_pos = (uintptr_t)f->next_rule;
} else {
- jmpto = (cmd->arg1 ==
- IP_FW_TABLEARG) ? tablearg:
- cmd->arg1;
+ jmpto = IP_FW_ARG_TABLEARG(
+ cmd->arg1);
f_pos = ipfw_find_rule(chain,
jmpto, 0);
/* update the cache */
@@ -2337,8 +2331,7 @@ do { \
case O_NETGRAPH:
case O_NGTEE:
set_match(args, f_pos, chain);
- args->rule.info = (cmd->arg1 == IP_FW_TABLEARG) ?
- tablearg : cmd->arg1;
+ args->rule.info = IP_FW_ARG_TABLEARG(cmd->arg1);
if (V_fw_one_pass)
args->rule.info |= IPFW_ONEPASS;
retval = (cmd->opcode == O_NETGRAPH) ?
@@ -2351,8 +2344,7 @@ do { \
uint32_t fib;
IPFW_INC_RULE_COUNTER(f, pktlen);
- fib = (cmd->arg1 == IP_FW_TABLEARG) ? tablearg:
- cmd->arg1;
+ fib = IP_FW_ARG_TABLEARG(cmd->arg1);
if (fib >= rt_numfibs)
fib = 0;
M_SETFIB(m, fib);
@@ -2378,8 +2370,7 @@ do { \
}
t = ((ipfw_insn_nat *)cmd)->nat;
if (t == NULL) {
- nat_id = (cmd->arg1 == IP_FW_TABLEARG) ?
- tablearg : cmd->arg1;
+ nat_id = IP_FW_ARG_TABLEARG(cmd->arg1);
t = (*lookup_nat_ptr)(&chain->nat, nat_id);
if (t == NULL) {
diff --git a/sys/netpfil/ipfw/ip_fw_dynamic.c b/sys/netpfil/ipfw/ip_fw_dynamic.c
index d58bc90..656e826 100644
--- a/sys/netpfil/ipfw/ip_fw_dynamic.c
+++ b/sys/netpfil/ipfw/ip_fw_dynamic.c
@@ -696,8 +696,7 @@ ipfw_install_state(struct ip_fw *rule, ipfw_insn_limit *cmd,
uint16_t limit_mask = cmd->limit_mask;
int pindex;
- conn_limit = (cmd->conn_limit == IP_FW_TABLEARG) ?
- tablearg : cmd->conn_limit;
+ conn_limit = IP_FW_ARG_TABLEARG(cmd->conn_limit);
DEB(
if (cmd->conn_limit == IP_FW_TABLEARG)
@@ -810,7 +809,7 @@ ipfw_send_pkt(struct mbuf *replyto, struct ipfw_flow_id *id, u_int32_t seq,
#endif
struct tcphdr *th = NULL;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return (NULL);
diff --git a/sys/netpfil/ipfw/ip_fw_log.c b/sys/netpfil/ipfw/ip_fw_log.c
index c33e365..48e6791 100644
--- a/sys/netpfil/ipfw/ip_fw_log.c
+++ b/sys/netpfil/ipfw/ip_fw_log.c
@@ -338,19 +338,19 @@ ipfw_log(struct ip_fw *f, u_int hlen, struct ip_fw_args *args,
break;
case O_SETFIB:
snprintf(SNPARGS(action2, 0), "SetFib %d",
- cmd->arg1);
+ IP_FW_ARG_TABLEARG(cmd->arg1));
break;
case O_SKIPTO:
snprintf(SNPARGS(action2, 0), "SkipTo %d",
- cmd->arg1);
+ IP_FW_ARG_TABLEARG(cmd->arg1));
break;
case O_PIPE:
snprintf(SNPARGS(action2, 0), "Pipe %d",
- cmd->arg1);
+ IP_FW_ARG_TABLEARG(cmd->arg1));
break;
case O_QUEUE:
snprintf(SNPARGS(action2, 0), "Queue %d",
- cmd->arg1);
+ IP_FW_ARG_TABLEARG(cmd->arg1));
break;
case O_FORWARD_IP: {
ipfw_insn_sa *sa = (ipfw_insn_sa *)cmd;
diff --git a/sys/netpfil/ipfw/ip_fw_pfil.c b/sys/netpfil/ipfw/ip_fw_pfil.c
index 5d6c1bd..79973b1 100644
--- a/sys/netpfil/ipfw/ip_fw_pfil.c
+++ b/sys/netpfil/ipfw/ip_fw_pfil.c
@@ -346,7 +346,7 @@ ipfw_check_frame(void *arg, struct mbuf **m0, struct ifnet *dst, int dir,
* Restore Ethernet header, as needed, in case the
* mbuf chain was replaced by ipfw.
*/
- M_PREPEND(m, ETHER_HDR_LEN, M_DONTWAIT);
+ M_PREPEND(m, ETHER_HDR_LEN, M_NOWAIT);
if (m == NULL) {
*m0 = NULL;
return (0);
@@ -411,7 +411,7 @@ ipfw_divert(struct mbuf **m0, int incoming, struct ipfw_rule_ref *rule,
clone = *m0; /* use the original mbuf */
*m0 = NULL;
} else {
- clone = m_dup(*m0, M_DONTWAIT);
+ clone = m_dup(*m0, M_NOWAIT);
/* If we cannot duplicate the mbuf, we sacrifice the divert
* chain and continue with the tee-ed packet.
*/
diff --git a/sys/netpfil/ipfw/ip_fw_private.h b/sys/netpfil/ipfw/ip_fw_private.h
index 0ea0b35..3ae1165 100644
--- a/sys/netpfil/ipfw/ip_fw_private.h
+++ b/sys/netpfil/ipfw/ip_fw_private.h
@@ -258,6 +258,8 @@ struct sockopt; /* used by tcp_var.h */
(_cntr)->pcnt = 0; \
(_cntr)->bcnt = 0; \
} while (0)
+
+#define IP_FW_ARG_TABLEARG(a) (((a) == IP_FW_TABLEARG) ? tablearg : (a))
/*
* The lock is heavily used by ip_fw2.c (the main file) and ip_fw_nat.c
* so the variable and the macros must be here.
diff --git a/sys/netpfil/pf/if_pflog.c b/sys/netpfil/pf/if_pflog.c
index 4714543..b9e716b 100644
--- a/sys/netpfil/pf/if_pflog.c
+++ b/sys/netpfil/pf/if_pflog.c
@@ -1,5 +1,4 @@
-/* $OpenBSD: if_pflog.c,v 1.26 2007/10/18 21:58:18 mpf Exp $ */
-/*
+/*-
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
* Niels Provos (provos@physnet.uni-hamburg.de).
@@ -31,6 +30,8 @@
* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
* MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
* PURPOSE.
+ *
+ * $OpenBSD: if_pflog.c,v 1.26 2007/10/18 21:58:18 mpf Exp $
*/
#include <sys/cdefs.h>
diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c
index f5f8a33..141ee6d 100644
--- a/sys/netpfil/pf/if_pfsync.c
+++ b/sys/netpfil/pf/if_pfsync.c
@@ -1,7 +1,6 @@
-/* $OpenBSD: if_pfsync.c,v 1.110 2009/02/24 05:39:19 dlg Exp $ */
-
-/*
+/*-
* Copyright (c) 2002 Michael Shalayeff
+ * Copyright (c) 2012 Gleb Smirnoff <glebius@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +25,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-/*
+/*-
* Copyright (c) 2009 David Gwynne <dlg@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
@@ -43,11 +42,14 @@
*/
/*
+ * $OpenBSD: if_pfsync.c,v 1.110 2009/02/24 05:39:19 dlg Exp $
+ *
* Revisions picked from OpenBSD after revision 1.110 import:
+ * 1.119 - don't m_copydata() beyond the len of mbuf in pfsync_input()
* 1.118, 1.124, 1.148, 1.149, 1.151, 1.171 - fixes to bulk updates
* 1.120, 1.175 - use monotonic time_uptime
* 1.122 - reduce number of updates for non-TCP sessions
- * 1.125 - rewrite merge or stale processing
+ * 1.125, 1.127 - rewrite merge or stale processing
* 1.128 - cleanups
* 1.146 - bzero() mbuf before sparsely filling it with data
* 1.170 - SIOCSIFMTU checks
@@ -566,7 +568,7 @@ pfsync_input(struct mbuf *m, __unused int off)
struct pfsync_header *ph;
struct pfsync_subheader subh;
- int offset;
+ int offset, len;
int rv;
uint16_t count;
@@ -612,6 +614,12 @@ pfsync_input(struct mbuf *m, __unused int off)
goto done;
}
+ len = ntohs(ph->len) + offset;
+ if (m->m_pkthdr.len < len) {
+ V_pfsyncstats.pfsyncs_badlen++;
+ goto done;
+ }
+
/* Cheaper to grab this now than having to mess with mbufs later */
pkt.ip = ip;
pkt.src = ip->ip_src;
@@ -626,7 +634,7 @@ pfsync_input(struct mbuf *m, __unused int off)
pkt.flags |= PFSYNC_SI_CKSUM;
offset += sizeof(*ph);
- for (;;) {
+ while (offset <= len - sizeof(subh)) {
m_copydata(m, offset, sizeof(subh), (caddr_t)&subh);
offset += sizeof(subh);
@@ -787,12 +795,15 @@ pfsync_upd_tcp(struct pf_state *st, struct pfsync_state_peer *src,
if ((st->src.state > src->state &&
(st->src.state < PF_TCPS_PROXY_SRC ||
src->state >= PF_TCPS_PROXY_SRC)) ||
- SEQ_GT(st->src.seqlo, ntohl(src->seqlo)))
+
+ (st->src.state == src->state &&
+ SEQ_GT(st->src.seqlo, ntohl(src->seqlo))))
sync++;
else
pf_state_peer_ntoh(src, &st->src);
- if (st->dst.state > dst->state ||
+ if ((st->dst.state > dst->state) ||
+
(st->dst.state >= TCPS_SYN_SENT &&
SEQ_GT(st->dst.seqlo, ntohl(dst->seqlo))))
sync++;
@@ -1219,8 +1230,8 @@ static int
pfsync_in_eof(struct pfsync_pkt *pkt, struct mbuf *m, int offset, int count)
{
/* check if we are at the right place in the packet */
- if (offset != m->m_pkthdr.len - sizeof(struct pfsync_eof))
- V_pfsyncstats.pfsyncs_badact++;
+ if (offset != m->m_pkthdr.len)
+ V_pfsyncstats.pfsyncs_badlen++;
/* we're done. free and let the caller return */
m_freem(m);
@@ -1534,16 +1545,6 @@ pfsync_sendout(int schedswi)
KASSERT(st->sync_state == q,
("%s: st->sync_state == q",
__func__));
- if (st->timeout == PFTM_UNLINKED) {
- /*
- * This happens if pfsync was once
- * stopped, and then re-enabled
- * after long time. Theoretically
- * may happen at usual runtime, too.
- */
- pf_release_state(st);
- continue;
- }
/*
* XXXGL: some of write methods do unlocked reads
* of state data :(
@@ -1599,8 +1600,6 @@ pfsync_sendout(int schedswi)
subh->count = htons(1);
V_pfsyncstats.pfsyncs_oacts[PFSYNC_ACT_EOF]++;
- /* XXX write checksum in EOF here */
-
/* we're done, let's put it on the wire */
if (ifp->if_bpf) {
m->m_data += sizeof(*ip);
@@ -2073,9 +2072,7 @@ pfsync_bulk_update(void *arg)
if (s->sync_state == PFSYNC_S_NONE &&
s->timeout < PFTM_MAX &&
s->pfsync_time <= sc->sc_ureq_received) {
- PFSYNC_LOCK(sc);
pfsync_update_state_req(s);
- PFSYNC_UNLOCK(sc);
sent++;
}
}
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 0825367..6667d7a 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -1,8 +1,7 @@
-/* $OpenBSD: pf.c,v 1.634 2009/02/27 12:37:45 henning Exp $ */
-
-/*
+/*-
* Copyright (c) 2001 Daniel Hartmeier
* Copyright (c) 2002 - 2008 Henning Brauer
+ * Copyright (c) 2012 Gleb Smirnoff <glebius@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -33,10 +32,10 @@
* Agency (DARPA) and Air Force Research Laboratory, Air Force
* Materiel Command, USAF, under agreement number F30602-01-2-0537.
*
+ * $OpenBSD: pf.c,v 1.634 2009/02/27 12:37:45 henning Exp $
*/
#include <sys/cdefs.h>
-
__FBSDID("$FreeBSD$");
#include "opt_inet.h"
@@ -713,6 +712,7 @@ pf_initialize()
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
V_pf_limits[PF_LIMIT_STATES].zone = V_pf_state_z;
uma_zone_set_max(V_pf_state_z, PFSTATE_HIWAT);
+ uma_zone_set_warning(V_pf_state_z, "PF states limit reached");
V_pf_state_key_z = uma_zcreate("pf state keys",
sizeof(struct pf_state_key), pf_state_key_ctor, NULL, NULL, NULL,
@@ -734,6 +734,7 @@ pf_initialize()
0);
V_pf_limits[PF_LIMIT_SRC_NODES].zone = V_pf_sources_z;
uma_zone_set_max(V_pf_sources_z, PFSNODE_HIWAT);
+ uma_zone_set_warning(V_pf_sources_z, "PF source nodes limit reached");
V_pf_srchash = malloc(V_pf_srchashsize * sizeof(struct pf_srchash),
M_PFHASH, M_WAITOK|M_ZERO);
V_pf_srchashmask = V_pf_srchashsize - 1;
@@ -1080,9 +1081,6 @@ pf_state_insert(struct pfi_kif *kif, struct pf_state_key *skw,
s->kif = kif;
- if (pf_state_key_attach(skw, sks, s))
- return (-1);
-
if (s->id == 0 && s->creatorid == 0) {
/* XXX: should be atomic, but probability of collision low */
if ((s->id = V_pf_stateid[curcpu]++) == PFID_MAXID)
@@ -1092,6 +1090,9 @@ pf_state_insert(struct pfi_kif *kif, struct pf_state_key *skw,
s->creatorid = V_pf_status.hostid;
}
+ if (pf_state_key_attach(skw, sks, s))
+ return (-1);
+
ih = &V_pf_idhash[PF_IDHASH(s)];
PF_HASHROW_LOCK(ih);
LIST_FOREACH(cur, &ih->states, entry)
@@ -1487,8 +1488,6 @@ pf_unlink_state(struct pf_state *s, u_int flags)
return (0); /* XXXGL: undefined actually */
}
- s->timeout = PFTM_UNLINKED;
-
if (s->src.state == PF_TCPS_PROXY_DST) {
/* XXX wire key the right one? */
pf_send_tcp(NULL, s->rule.ptr, s->key[PF_SK_WIRE]->af,
@@ -1502,11 +1501,20 @@ pf_unlink_state(struct pf_state *s, u_int flags)
LIST_REMOVE(s, entry);
pf_src_tree_remove_state(s);
- PF_HASHROW_UNLOCK(ih);
if (pfsync_delete_state_ptr != NULL)
pfsync_delete_state_ptr(s);
+ --s->rule.ptr->states_cur;
+ if (s->nat_rule.ptr != NULL)
+ --s->nat_rule.ptr->states_cur;
+ if (s->anchor.ptr != NULL)
+ --s->anchor.ptr->states_cur;
+
+ s->timeout = PFTM_UNLINKED;
+
+ PF_HASHROW_UNLOCK(ih);
+
pf_detach_state(s);
refcount_release(&s->refs);
@@ -1520,11 +1528,7 @@ pf_free_state(struct pf_state *cur)
KASSERT(cur->refs == 0, ("%s: %p has refs", __func__, cur));
KASSERT(cur->timeout == PFTM_UNLINKED, ("%s: timeout %u", __func__,
cur->timeout));
- --cur->rule.ptr->states_cur;
- if (cur->nat_rule.ptr != NULL)
- --cur->nat_rule.ptr->states_cur;
- if (cur->anchor.ptr != NULL)
- --cur->anchor.ptr->states_cur;
+
pf_normalize_tcp_cleanup(cur);
uma_zfree(V_pf_state_z, cur);
V_pf_status.fcounters[FCNT_STATE_REMOVALS]++;
diff --git a/sys/netpfil/pf/pf_if.c b/sys/netpfil/pf/pf_if.c
index c010b65..91fbeb8 100644
--- a/sys/netpfil/pf/pf_if.c
+++ b/sys/netpfil/pf/pf_if.c
@@ -1,10 +1,9 @@
-/* $OpenBSD: pf_if.c,v 1.54 2008/06/14 16:55:28 mk Exp $ */
-
-/*
- * Copyright 2005 Henning Brauer <henning@openbsd.org>
- * Copyright 2005 Ryan McBride <mcbride@openbsd.org>
+/*-
* Copyright (c) 2001 Daniel Hartmeier
* Copyright (c) 2003 Cedric Berger
+ * Copyright (c) 2005 Henning Brauer <henning@openbsd.org>
+ * Copyright (c) 2005 Ryan McBride <mcbride@openbsd.org>
+ * Copyright (c) 2012 Gleb Smirnoff <glebius@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,10 +29,11 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $OpenBSD: pf_if.c,v 1.54 2008/06/14 16:55:28 mk Exp $
*/
#include <sys/cdefs.h>
-
__FBSDID("$FreeBSD$");
#include "opt_inet.h"
@@ -478,10 +478,10 @@ pfi_table_update(struct pfr_ktable *kt, struct pfi_kif *kif, int net, int flags)
if (kif->pfik_ifp != NULL)
pfi_instance_add(kif->pfik_ifp, net, flags);
else if (kif->pfik_group != NULL) {
- IFNET_RLOCK();
+ IFNET_RLOCK_NOSLEEP();
TAILQ_FOREACH(ifgm, &kif->pfik_group->ifg_members, ifgm_next)
pfi_instance_add(ifgm->ifgm_ifp, net, flags);
- IFNET_RUNLOCK();
+ IFNET_RUNLOCK_NOSLEEP();
}
if ((e = pfr_set_addrs(&kt->pfrkt_t, V_pfi_buffer, V_pfi_buffer_cnt, &size2,
diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c
index a8b71d5..a6d7ca5 100644
--- a/sys/netpfil/pf/pf_ioctl.c
+++ b/sys/netpfil/pf/pf_ioctl.c
@@ -1,8 +1,7 @@
-/* $OpenBSD: pf_ioctl.c,v 1.213 2009/02/15 21:46:12 mbalmer Exp $ */
-
-/*
+/*-
* Copyright (c) 2001 Daniel Hartmeier
* Copyright (c) 2002,2003 Henning Brauer
+ * Copyright (c) 2012 Gleb Smirnoff <glebius@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -33,6 +32,7 @@
* Agency (DARPA) and Air Force Research Laboratory, Air Force
* Materiel Command, USAF, under agreement number F30602-01-2-0537.
*
+ * $OpenBSD: pf_ioctl.c,v 1.213 2009/02/15 21:46:12 mbalmer Exp $
*/
#include <sys/cdefs.h>
@@ -963,8 +963,6 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td
{
int error = 0;
- CURVNET_SET(TD_TO_VNET(td));
-
/* XXX keep in sync with switch() below */
if (securelevel_gt(td->td_ucred, 2))
switch (cmd) {
@@ -1068,6 +1066,8 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td
return (EACCES);
}
+ CURVNET_SET(TD_TO_VNET(td));
+
switch (cmd) {
case DIOCSTART:
PF_RULES_WLOCK();
diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c
index 47ad5a3..c82a121 100644
--- a/sys/netpfil/pf/pf_lb.c
+++ b/sys/netpfil/pf/pf_lb.c
@@ -1,6 +1,4 @@
-/* $OpenBSD: pf_lb.c,v 1.2 2009/02/12 02:13:15 sthen Exp $ */
-
-/*
+/*-
* Copyright (c) 2001 Daniel Hartmeier
* Copyright (c) 2002 - 2008 Henning Brauer
* All rights reserved.
@@ -33,6 +31,7 @@
* Agency (DARPA) and Air Force Research Laboratory, Air Force
* Materiel Command, USAF, under agreement number F30602-01-2-0537.
*
+ * $OpenBSD: pf_lb.c,v 1.2 2009/02/12 02:13:15 sthen Exp $
*/
#include <sys/cdefs.h>
diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c
index 9063fe8..e1e9d5d 100644
--- a/sys/netpfil/pf/pf_norm.c
+++ b/sys/netpfil/pf/pf_norm.c
@@ -1,6 +1,4 @@
-/* $OpenBSD: pf_norm.c,v 1.114 2009/01/29 14:11:45 henning Exp $ */
-
-/*
+/*-
* Copyright 2001 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
*
@@ -23,6 +21,8 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $OpenBSD: pf_norm.c,v 1.114 2009/01/29 14:11:45 henning Exp $
*/
#include <sys/cdefs.h>
@@ -161,6 +161,7 @@ pf_normalize_init(void)
V_pf_limits[PF_LIMIT_FRAGS].zone = V_pf_frent_z;
V_pf_limits[PF_LIMIT_FRAGS].limit = PFFRAG_FRENT_HIWAT;
uma_zone_set_max(V_pf_frent_z, PFFRAG_FRENT_HIWAT);
+ uma_zone_set_warning(V_pf_frent_z, "PF frag entries limit reached");
mtx_init(&pf_frag_mtx, "pf fragments", NULL, MTX_DEF);
diff --git a/sys/netpfil/pf/pf_osfp.c b/sys/netpfil/pf/pf_osfp.c
index 29d4a40..b20a64e 100644
--- a/sys/netpfil/pf/pf_osfp.c
+++ b/sys/netpfil/pf/pf_osfp.c
@@ -1,6 +1,4 @@
-/* $OpenBSD: pf_osfp.c,v 1.14 2008/06/12 18:17:01 henning Exp $ */
-
-/*
+/*-
* Copyright (c) 2003 Mike Frantzen <frantzen@w4g.org>
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,6 +13,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
+ * $OpenBSD: pf_osfp.c,v 1.14 2008/06/12 18:17:01 henning Exp $
*/
#include <sys/cdefs.h>
diff --git a/sys/netpfil/pf/pf_ruleset.c b/sys/netpfil/pf/pf_ruleset.c
index 77652a6..384e42b 100644
--- a/sys/netpfil/pf/pf_ruleset.c
+++ b/sys/netpfil/pf/pf_ruleset.c
@@ -1,6 +1,4 @@
-/* $OpenBSD: pf_ruleset.c,v 1.2 2008/12/18 15:31:37 dhill Exp $ */
-
-/*
+/*-
* Copyright (c) 2001 Daniel Hartmeier
* Copyright (c) 2002,2003 Henning Brauer
* All rights reserved.
@@ -33,6 +31,7 @@
* Agency (DARPA) and Air Force Research Laboratory, Air Force
* Materiel Command, USAF, under agreement number F30602-01-2-0537.
*
+ * $OpenBSD: pf_ruleset.c,v 1.2 2008/12/18 15:31:37 dhill Exp $
*/
#include <sys/cdefs.h>
diff --git a/sys/netpfil/pf/pf_table.c b/sys/netpfil/pf/pf_table.c
index ac22f82..595a365 100644
--- a/sys/netpfil/pf/pf_table.c
+++ b/sys/netpfil/pf/pf_table.c
@@ -1,6 +1,4 @@
-/* $OpenBSD: pf_table.c,v 1.79 2008/10/08 06:24:50 mcbride Exp $ */
-
-/*
+/*-
* Copyright (c) 2002 Cedric Berger
* All rights reserved.
*
@@ -28,6 +26,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
+ * $OpenBSD: pf_table.c,v 1.79 2008/10/08 06:24:50 mcbride Exp $
*/
#include <sys/cdefs.h>
diff --git a/sys/netsmb/smb_iod.c b/sys/netsmb/smb_iod.c
index 78def47..e4c805a 100644
--- a/sys/netsmb/smb_iod.c
+++ b/sys/netsmb/smb_iod.c
@@ -255,7 +255,7 @@ smb_iod_sendrq(struct smbiod *iod, struct smb_rq *rqp)
}
SMBSDEBUG("M:%04x, P:%04x, U:%04x, T:%04x\n", rqp->sr_mid, 0, 0, 0);
m_dumpm(rqp->sr_rq.mb_top);
- m = m_copym(rqp->sr_rq.mb_top, 0, M_COPYALL, M_WAIT);
+ m = m_copym(rqp->sr_rq.mb_top, 0, M_COPYALL, M_WAITOK);
error = rqp->sr_lerror = SMB_TRAN_SEND(vcp, m, td);
if (error == 0) {
getnanotime(&rqp->sr_timesent);
diff --git a/sys/netsmb/smb_rq.c b/sys/netsmb/smb_rq.c
index 566a252..9571029 100644
--- a/sys/netsmb/smb_rq.c
+++ b/sys/netsmb/smb_rq.c
@@ -427,7 +427,7 @@ smb_t2_placedata(struct mbuf *mtop, u_int16_t offset, u_int16_t count,
struct mbuf *m, *m0;
int len;
- m0 = m_split(mtop, offset, M_WAIT);
+ m0 = m_split(mtop, offset, M_WAITOK);
len = m_length(m0, &m);
m->m_len -= len - count;
if (mdp->md_top == NULL) {
diff --git a/sys/netsmb/smb_trantcp.c b/sys/netsmb/smb_trantcp.c
index a7c7e05..dd39ac5 100644
--- a/sys/netsmb/smb_trantcp.c
+++ b/sys/netsmb/smb_trantcp.c
@@ -580,7 +580,7 @@ smb_nbst_send(struct smb_vc *vcp, struct mbuf *m0, struct thread *td)
error = ENOTCONN;
goto abort;
}
- M_PREPEND(m0, 4, M_WAIT);
+ M_PREPEND(m0, 4, M_WAITOK);
nb_sethdr(m0, NB_SSN_MESSAGE, m_fixhdr(m0) - 4);
error = nb_sosend(nbp->nbp_tso, m0, 0, td);
return error;
diff --git a/sys/nfs/krpc_subr.c b/sys/nfs/krpc_subr.c
index 18e0f9b..6caafcf 100644
--- a/sys/nfs/krpc_subr.c
+++ b/sys/nfs/krpc_subr.c
@@ -154,7 +154,7 @@ krpc_portmap(struct sockaddr_in *sin, u_int prog, u_int vers, u_int16_t *portp,
return 0;
}
- m = m_get(M_WAIT, MT_DATA);
+ m = m_get(M_WAITOK, MT_DATA);
sdata = mtod(m, struct sdata *);
m->m_len = sizeof(*sdata);
@@ -275,7 +275,7 @@ krpc_call(struct sockaddr_in *sa, u_int prog, u_int vers, u_int func,
/*
* Prepend RPC message header.
*/
- mhead = m_gethdr(M_WAIT, MT_DATA);
+ mhead = m_gethdr(M_WAITOK, MT_DATA);
mhead->m_next = *data;
call = mtod(mhead, struct krpc_call *);
mhead->m_len = sizeof(*call);
@@ -309,7 +309,7 @@ krpc_call(struct sockaddr_in *sa, u_int prog, u_int vers, u_int func,
timo = 0;
for (;;) {
/* Send RPC request (or re-send). */
- m = m_copym(mhead, 0, M_COPYALL, M_WAIT);
+ m = m_copym(mhead, 0, M_COPYALL, M_WAITOK);
error = sosend(so, (struct sockaddr *)sa, NULL, m,
NULL, 0, td);
if (error) {
@@ -459,9 +459,9 @@ xdr_string_encode(char *str, int len)
if (mlen > MCLBYTES) /* If too big, we just can't do it. */
return (NULL);
- m = m_get(M_WAIT, MT_DATA);
+ m = m_get(M_WAITOK, MT_DATA);
if (mlen > MLEN)
- MCLGET(m, M_WAIT);
+ MCLGET(m, M_WAITOK);
xs = mtod(m, struct xdr_string *);
m->m_len = mlen;
xs->len = txdr_unsigned(len);
diff --git a/sys/nfs/nfs_common.c b/sys/nfs/nfs_common.c
index 09dbfab..6f03948 100644
--- a/sys/nfs/nfs_common.c
+++ b/sys/nfs/nfs_common.c
@@ -275,7 +275,7 @@ nfsm_build_xx(int s, struct mbuf **mb, caddr_t *bpos)
void *ret;
if (s > M_TRAILINGSPACE(*mb)) {
- MGET(mb2, M_WAIT, MT_DATA);
+ MGET(mb2, M_WAITOK, MT_DATA);
if (s > MLEN)
panic("build > MLEN");
(*mb)->m_next = mb2;
@@ -293,14 +293,14 @@ void *
nfsm_dissect_xx(int s, struct mbuf **md, caddr_t *dpos)
{
- return (nfsm_dissect_xx_sub(s, md, dpos, M_WAIT));
+ return (nfsm_dissect_xx_sub(s, md, dpos, M_WAITOK));
}
void *
nfsm_dissect_xx_nonblock(int s, struct mbuf **md, caddr_t *dpos)
{
- return (nfsm_dissect_xx_sub(s, md, dpos, M_DONTWAIT));
+ return (nfsm_dissect_xx_sub(s, md, dpos, M_NOWAIT));
}
static void *
diff --git a/sys/nfsclient/nfs_krpc.c b/sys/nfsclient/nfs_krpc.c
index 6dfd46d..0e4a83e 100644
--- a/sys/nfsclient/nfs_krpc.c
+++ b/sys/nfsclient/nfs_krpc.c
@@ -568,7 +568,7 @@ tryagain:
* These could cause pointer alignment problems, so copy them to
* well aligned mbufs.
*/
- error = nfs_realign(&mrep, M_DONTWAIT);
+ error = nfs_realign(&mrep, M_NOWAIT);
if (error == ENOMEM) {
m_freem(mrep);
AUTH_DESTROY(auth);
diff --git a/sys/nfsclient/nfs_subs.c b/sys/nfsclient/nfs_subs.c
index fb6cbe8..fd83794 100644
--- a/sys/nfsclient/nfs_subs.c
+++ b/sys/nfsclient/nfs_subs.c
@@ -181,9 +181,9 @@ nfsm_reqhead(struct vnode *vp, u_long procid, int hsiz)
{
struct mbuf *mb;
- MGET(mb, M_WAIT, MT_DATA);
+ MGET(mb, M_WAITOK, MT_DATA);
if (hsiz >= MINCLSIZE)
- MCLGET(mb, M_WAIT);
+ MCLGET(mb, M_WAITOK);
mb->m_len = 0;
return (mb);
}
@@ -218,9 +218,9 @@ nfsm_uiotombuf(struct uio *uiop, struct mbuf **mq, int siz, caddr_t *bpos)
while (left > 0) {
mlen = M_TRAILINGSPACE(mp);
if (mlen == 0) {
- MGET(mp, M_WAIT, MT_DATA);
+ MGET(mp, M_WAITOK, MT_DATA);
if (clflg)
- MCLGET(mp, M_WAIT);
+ MCLGET(mp, M_WAITOK);
mp->m_len = 0;
mp2->m_next = mp;
mp2 = mp;
@@ -251,7 +251,7 @@ nfsm_uiotombuf(struct uio *uiop, struct mbuf **mq, int siz, caddr_t *bpos)
}
if (rem > 0) {
if (rem > M_TRAILINGSPACE(mp)) {
- MGET(mp, M_WAIT, MT_DATA);
+ MGET(mp, M_WAITOK, MT_DATA);
mp->m_len = 0;
mp2->m_next = mp;
}
@@ -296,9 +296,9 @@ nfsm_strtmbuf(struct mbuf **mb, char **bpos, const char *cp, long siz)
}
/* Loop around adding mbufs */
while (siz > 0) {
- MGET(m1, M_WAIT, MT_DATA);
+ MGET(m1, M_WAITOK, MT_DATA);
if (siz > MLEN)
- MCLGET(m1, M_WAIT);
+ MCLGET(m1, M_WAITOK);
m1->m_len = NFSMSIZ(m1);
m2->m_next = m1;
m2 = m1;
@@ -481,7 +481,7 @@ nfs_loadattrcache(struct vnode **vpp, struct mbuf **mdp, caddr_t *dposp,
md = *mdp;
t1 = (mtod(md, caddr_t) + md->m_len) - *dposp;
- cp2 = nfsm_disct(mdp, dposp, NFSX_FATTR(v3), t1, M_WAIT);
+ cp2 = nfsm_disct(mdp, dposp, NFSX_FATTR(v3), t1, M_WAITOK);
if (cp2 == NULL) {
error = EBADRPC;
goto out;
diff --git a/sys/nfsclient/nfsargs.h b/sys/nfsclient/nfsargs.h
index f71a555..9cd8945 100644
--- a/sys/nfsclient/nfsargs.h
+++ b/sys/nfsclient/nfsargs.h
@@ -98,5 +98,6 @@ struct nfs_args {
#define NFSMNT_ALLGSSNAME 0x08000000 /* Use principal for all accesses */
#define NFSMNT_STRICT3530 0x10000000 /* Adhere strictly to RFC3530 */
#define NFSMNT_NOCTO 0x20000000 /* Don't flush attrcache on open */
+#define NFSMNT_PNFS 0x40000000 /* Enable pNFS support */
#endif
diff --git a/sys/nfsserver/nfs_fha.c b/sys/nfsserver/nfs_fha.c
index 76537d7..2dd20c1 100644
--- a/sys/nfsserver/nfs_fha.c
+++ b/sys/nfsserver/nfs_fha.c
@@ -202,7 +202,7 @@ fha_extract_info(struct svc_req *req, struct fha_info *i)
procnum == NFSPROC_NULL)
goto out;
- error = nfs_realign(&req->rq_args, M_DONTWAIT);
+ error = nfs_realign(&req->rq_args, M_NOWAIT);
if (error)
goto out;
md = req->rq_args;
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c
index f0da468..bef72af 100644
--- a/sys/nfsserver/nfs_serv.c
+++ b/sys/nfsserver/nfs_serv.c
@@ -693,8 +693,8 @@ nfsrv_readlink(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
len = 0;
i = 0;
while (len < NFS_MAXPATHLEN) {
- MGET(nmp, M_WAIT, MT_DATA);
- MCLGET(nmp, M_WAIT);
+ MGET(nmp, M_WAITOK, MT_DATA);
+ MCLGET(nmp, M_WAITOK);
nmp->m_len = NFSMSIZ(nmp);
if (len == 0)
mp3 = mp = nmp;
@@ -878,8 +878,8 @@ nfsrv_read(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
i++;
}
if (left > 0) {
- MGET(m, M_WAIT, MT_DATA);
- MCLGET(m, M_WAIT);
+ MGET(m, M_WAITOK, MT_DATA);
+ MCLGET(m, M_WAITOK);
m->m_len = 0;
m2->m_next = m;
m2 = m;
diff --git a/sys/nfsserver/nfs_srvkrpc.c b/sys/nfsserver/nfs_srvkrpc.c
index 2581092..64f2aaa 100644
--- a/sys/nfsserver/nfs_srvkrpc.c
+++ b/sys/nfsserver/nfs_srvkrpc.c
@@ -217,14 +217,14 @@ nfs_rephead(int siz, struct nfsrv_descript *nd, int err,
if (err && (nd->nd_flag & ND_NFSV3) == 0) /* XXX recheck */
siz = 0;
- MGET(mreq, M_WAIT, MT_DATA);
+ MGET(mreq, M_WAITOK, MT_DATA);
/*
* If this is a big reply, use a cluster
*/
mreq->m_len = 0;
if (siz >= MINCLSIZE) {
- MCLGET(mreq, M_WAIT);
+ MCLGET(mreq, M_WAITOK);
}
mb = mreq;
bpos = mtod(mb, caddr_t);
@@ -278,7 +278,7 @@ nfssvc_program(struct svc_req *rqst, SVCXPRT *xprt)
mreq = mrep = NULL;
mreq = rqst->rq_args;
rqst->rq_args = NULL;
- (void)nfs_realign(&mreq, M_WAIT);
+ (void)nfs_realign(&mreq, M_WAITOK);
/*
* Note: we want rq_addr, not svc_getrpccaller for nd_nam2 -
diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c
index ba3a9fe..eedac6c 100644
--- a/sys/nfsserver/nfs_srvsubs.c
+++ b/sys/nfsserver/nfs_srvsubs.c
@@ -1301,8 +1301,8 @@ nfsm_clget_xx(u_int32_t **tl, struct mbuf *mb, struct mbuf **mp,
if (*bp >= *be) {
if (*mp == mb)
(*mp)->m_len += *bp - bpos;
- MGET(nmp, M_WAIT, MT_DATA);
- MCLGET(nmp, M_WAIT);
+ MGET(nmp, M_WAITOK, MT_DATA);
+ MCLGET(nmp, M_WAITOK);
nmp->m_len = NFSMSIZ(nmp);
(*mp)->m_next = nmp;
*mp = nmp;
diff --git a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index 1afb80e..339e305 100644
--- a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -287,7 +287,7 @@ int ipoib_dma_map_tx(struct ib_device *ca, struct ipoib_tx_buf *tx_req, int max)
}
i--;
if (i >= max) {
- tx_req->mb = mb = m_defrag(mb, M_DONTWAIT);
+ tx_req->mb = mb = m_defrag(mb, M_NOWAIT);
if (mb == NULL)
return -EIO;
for (m = mb, i = 0; m != NULL; m = m->m_next, i++);
diff --git a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 380ee8c..22b0fb9 100644
--- a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1346,7 +1346,7 @@ ipoib_output(struct ifnet *ifp, struct mbuf *m,
* Add local net header. If no space in first mbuf,
* allocate another.
*/
- M_PREPEND(m, IPOIB_HEADER_LEN, M_DONTWAIT);
+ M_PREPEND(m, IPOIB_HEADER_LEN, M_NOWAIT);
if (m == NULL) {
error = ENOBUFS;
goto bad;
diff --git a/sys/ofed/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/sys/ofed/drivers/infiniband/ulp/sdp/sdp_bcopy.c
index d068852..327d7be 100644
--- a/sys/ofed/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+++ b/sys/ofed/drivers/infiniband/ulp/sdp/sdp_bcopy.c
@@ -151,7 +151,7 @@ sdp_nagle_timeout(void *data)
if (ssk->state == TCPS_CLOSED)
return;
ssk->nagle_last_unacked = 0;
- sdp_post_sends(ssk, M_DONTWAIT);
+ sdp_post_sends(ssk, M_NOWAIT);
sowwakeup(ssk->socket);
out:
diff --git a/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c b/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c
index 2b15f31..c915fb3 100644
--- a/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c
+++ b/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c
@@ -928,12 +928,12 @@ sdp_send(struct socket *so, int flags, struct mbuf *m,
ssk = sdp_sk(so);
KASSERT(m->m_flags & M_PKTHDR,
("sdp_send: %p no packet header", m));
- M_PREPEND(m, SDP_HEAD_SIZE, M_WAIT);
+ M_PREPEND(m, SDP_HEAD_SIZE, M_WAITOK);
mtod(m, struct sdp_bsdh *)->mid = SDP_MID_DATA;
for (n = m, cnt = 0; n->m_next; n = n->m_next)
cnt++;
if (cnt > SDP_MAX_SEND_SGES) {
- n = m_collapse(m, M_WAIT, SDP_MAX_SEND_SGES);
+ n = m_collapse(m, M_WAITOK, SDP_MAX_SEND_SGES);
if (n == NULL) {
m_freem(m);
return (EMSGSIZE);
@@ -1196,7 +1196,7 @@ soreceive_rcvoob(struct socket *so, struct uio *uio, int flags)
KASSERT(flags & MSG_OOB, ("soreceive_rcvoob: (flags & MSG_OOB) == 0"));
- m = m_get(M_WAIT, MT_DATA);
+ m = m_get(M_WAITOK, MT_DATA);
error = (*pr->pr_usrreqs->pru_rcvoob)(so, m, flags & MSG_PEEK);
if (error)
goto bad;
@@ -1351,7 +1351,7 @@ deliver:
KASSERT(sb->sb_mb != NULL,
("%s: len > 0 && sb->sb_mb empty", __func__));
- m = m_copym(sb->sb_mb, 0, len, M_DONTWAIT);
+ m = m_copym(sb->sb_mb, 0, len, M_NOWAIT);
if (m == NULL)
len = 0; /* Don't flush data from sockbuf. */
else
diff --git a/sys/ofed/drivers/infiniband/ulp/sdp/sdp_tx.c b/sys/ofed/drivers/infiniband/ulp/sdp/sdp_tx.c
index b0c37e5..f7d84be 100644
--- a/sys/ofed/drivers/infiniband/ulp/sdp/sdp_tx.c
+++ b/sys/ofed/drivers/infiniband/ulp/sdp/sdp_tx.c
@@ -297,7 +297,7 @@ sdp_process_tx_cq(struct sdp_sock *ssk)
} while (n == SDP_NUM_WC);
if (wc_processed) {
- sdp_post_sends(ssk, M_DONTWAIT);
+ sdp_post_sends(ssk, M_NOWAIT);
sdp_prf1(sk, NULL, "Waking sendmsg. inflight=%d",
(u32) tx_ring_posted(ssk));
sowwakeup(ssk->socket);
diff --git a/sys/ofed/drivers/net/mlx4/en_tx.c b/sys/ofed/drivers/net/mlx4/en_tx.c
index 4d1690f..e2e13c2 100644
--- a/sys/ofed/drivers/net/mlx4/en_tx.c
+++ b/sys/ofed/drivers/net/mlx4/en_tx.c
@@ -725,7 +725,7 @@ retry:
nr_txbb = desc_size / TXBB_SIZE;
if (unlikely(nr_txbb > MAX_DESC_TXBBS)) {
if (defrag) {
- mb = m_defrag(*mbp, M_DONTWAIT);
+ mb = m_defrag(*mbp, M_NOWAIT);
if (mb == NULL) {
mb = *mbp;
goto tx_drop;
diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c
index 11c20a3..98e3352 100644
--- a/sys/pci/if_rl.c
+++ b/sys/pci/if_rl.c
@@ -1565,7 +1565,7 @@ rl_encap(struct rl_softc *sc, struct mbuf **m_head)
*/
if (m->m_next != NULL || (mtod(m, uintptr_t) & 3) != 0 ||
(padlen > 0 && M_TRAILINGSPACE(m) < padlen)) {
- m = m_defrag(*m_head, M_DONTWAIT);
+ m = m_defrag(*m_head, M_NOWAIT);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/powerpc/ps3/if_glc.c b/sys/powerpc/ps3/if_glc.c
index ab5c172..1788212 100644
--- a/sys/powerpc/ps3/if_glc.c
+++ b/sys/powerpc/ps3/if_glc.c
@@ -555,7 +555,7 @@ glc_add_rxbuf(struct glc_softc *sc, int idx)
bus_dma_segment_t segs[1];
int error, nsegs;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = m->m_ext.ext_size;
@@ -630,7 +630,7 @@ glc_encap(struct glc_softc *sc, struct mbuf **m_head, bus_addr_t *pktdesc)
nsegs++;
if (nsegs > nsegs_max) {
- m = m_collapse(*m_head, M_DONTWAIT, nsegs_max);
+ m = m_collapse(*m_head, M_NOWAIT, nsegs_max);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
diff --git a/sys/rpc/clnt.h b/sys/rpc/clnt.h
index e4da36a..36dca8e 100644
--- a/sys/rpc/clnt.h
+++ b/sys/rpc/clnt.h
@@ -372,6 +372,7 @@ enum clnt_stat clnt_call_private(CLIENT *, struct rpc_callextra *, rpcproc_t,
#define CLGET_RETRIES 26 /* get retry count for reconnect */
#define CLSET_PRIVPORT 27 /* set privileged source port flag */
#define CLGET_PRIVPORT 28 /* get privileged source port flag */
+#define CLSET_BACKCHANNEL 29 /* set backchannel for socket */
#endif
diff --git a/sys/rpc/clnt_dg.c b/sys/rpc/clnt_dg.c
index c86b18a..86a8d01 100644
--- a/sys/rpc/clnt_dg.c
+++ b/sys/rpc/clnt_dg.c
@@ -431,7 +431,7 @@ call_again:
send_again:
mtx_unlock(&cs->cs_lock);
- MGETHDR(mreq, M_WAIT, MT_DATA);
+ MGETHDR(mreq, M_WAITOK, MT_DATA);
KASSERT(cu->cu_mcalllen <= MHLEN, ("RPC header too big"));
bcopy(cu->cu_mcallc, mreq->m_data, cu->cu_mcalllen);
mreq->m_len = cu->cu_mcalllen;
diff --git a/sys/rpc/clnt_rc.c b/sys/rpc/clnt_rc.c
index e263278..b910059 100644
--- a/sys/rpc/clnt_rc.c
+++ b/sys/rpc/clnt_rc.c
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include <rpc/rpc.h>
#include <rpc/rpc_com.h>
+#include <rpc/krpc.h>
static enum clnt_stat clnt_reconnect_call(CLIENT *, struct rpc_callextra *,
rpcproc_t, struct mbuf *, struct mbuf **, struct timeval);
@@ -67,27 +68,6 @@ static struct clnt_ops clnt_reconnect_ops = {
static int fake_wchan;
-struct rc_data {
- struct mtx rc_lock;
- struct sockaddr_storage rc_addr; /* server address */
- struct netconfig* rc_nconf; /* network type */
- rpcprog_t rc_prog; /* program number */
- rpcvers_t rc_vers; /* version number */
- size_t rc_sendsz;
- size_t rc_recvsz;
- struct timeval rc_timeout;
- struct timeval rc_retry;
- int rc_retries;
- int rc_privport;
- char *rc_waitchan;
- int rc_intr;
- int rc_connecting;
- int rc_closed;
- struct ucred *rc_ucred;
- CLIENT* rc_client; /* underlying RPC client */
- struct rpc_err rc_err;
-};
-
CLIENT *
clnt_reconnect_create(
struct netconfig *nconf, /* network type */
@@ -211,6 +191,8 @@ clnt_reconnect_connect(CLIENT *cl)
CLNT_CONTROL(newclient, CLSET_RETRY_TIMEOUT, &rc->rc_retry);
CLNT_CONTROL(newclient, CLSET_WAITCHAN, rc->rc_waitchan);
CLNT_CONTROL(newclient, CLSET_INTERRUPTIBLE, &rc->rc_intr);
+ if (rc->rc_backchannel != NULL)
+ CLNT_CONTROL(newclient, CLSET_BACKCHANNEL, rc->rc_backchannel);
stat = RPC_SUCCESS;
out:
@@ -385,6 +367,7 @@ static bool_t
clnt_reconnect_control(CLIENT *cl, u_int request, void *info)
{
struct rc_data *rc = (struct rc_data *)cl->cl_private;
+ SVCXPRT *xprt;
if (info == NULL) {
return (FALSE);
@@ -466,6 +449,13 @@ clnt_reconnect_control(CLIENT *cl, u_int request, void *info)
*(int *) info = rc->rc_privport;
break;
+ case CLSET_BACKCHANNEL:
+ xprt = (SVCXPRT *)info;
+ SVC_ACQUIRE(xprt);
+ xprt_register(xprt);
+ rc->rc_backchannel = info;
+ break;
+
default:
return (FALSE);
}
@@ -502,9 +492,15 @@ static void
clnt_reconnect_destroy(CLIENT *cl)
{
struct rc_data *rc = (struct rc_data *)cl->cl_private;
+ SVCXPRT *xprt;
if (rc->rc_client)
CLNT_DESTROY(rc->rc_client);
+ if (rc->rc_backchannel) {
+ xprt = (SVCXPRT *)rc->rc_backchannel;
+ xprt_unregister(xprt);
+ SVC_RELEASE(xprt);
+ }
crfree(rc->rc_ucred);
mtx_destroy(&rc->rc_lock);
mem_free(rc, sizeof(*rc));
diff --git a/sys/rpc/clnt_vc.c b/sys/rpc/clnt_vc.c
index 26f23fa..e42d26d 100644
--- a/sys/rpc/clnt_vc.c
+++ b/sys/rpc/clnt_vc.c
@@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$");
#include <sys/protosw.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
+#include <sys/sx.h>
#include <sys/syslog.h>
#include <sys/time.h>
#include <sys/uio.h>
@@ -77,8 +78,7 @@ __FBSDID("$FreeBSD$");
#include <rpc/rpc.h>
#include <rpc/rpc_com.h>
-
-#define MCALL_MSG_SIZE 24
+#include <rpc/krpc.h>
struct cmessage {
struct cmsghdr cmsg;
@@ -106,43 +106,6 @@ static struct clnt_ops clnt_vc_ops = {
.cl_control = clnt_vc_control
};
-/*
- * A pending RPC request which awaits a reply. Requests which have
- * received their reply will have cr_xid set to zero and cr_mrep to
- * the mbuf chain of the reply.
- */
-struct ct_request {
- TAILQ_ENTRY(ct_request) cr_link;
- uint32_t cr_xid; /* XID of request */
- struct mbuf *cr_mrep; /* reply received by upcall */
- int cr_error; /* any error from upcall */
- char cr_verf[MAX_AUTH_BYTES]; /* reply verf */
-};
-
-TAILQ_HEAD(ct_request_list, ct_request);
-
-struct ct_data {
- struct mtx ct_lock;
- int ct_threads; /* number of threads in clnt_vc_call */
- bool_t ct_closing; /* TRUE if we are closing */
- bool_t ct_closed; /* TRUE if we are closed */
- struct socket *ct_socket; /* connection socket */
- bool_t ct_closeit; /* close it on destroy */
- struct timeval ct_wait; /* wait interval in milliseconds */
- struct sockaddr_storage ct_addr; /* remote addr */
- struct rpc_err ct_error;
- uint32_t ct_xid;
- char ct_mcallc[MCALL_MSG_SIZE]; /* marshalled callmsg */
- size_t ct_mpos; /* pos after marshal */
- const char *ct_waitchan;
- int ct_waitflag;
- struct mbuf *ct_record; /* current reply record */
- size_t ct_record_resid; /* how much left of reply to read */
- bool_t ct_record_eor; /* true if reading last fragment */
- struct ct_request_list ct_pending;
- int ct_upcallrefs; /* Ref cnt of upcalls in prog. */
-};
-
static void clnt_vc_upcallsdone(struct ct_data *);
static const char clnt_vc_errstr[] = "%s : %s";
@@ -386,7 +349,7 @@ call_again:
/*
* Leave space to pre-pend the record mark.
*/
- MGETHDR(mreq, M_WAIT, MT_DATA);
+ MGETHDR(mreq, M_WAITOK, MT_DATA);
mreq->m_data += sizeof(uint32_t);
KASSERT(ct->ct_mpos + sizeof(uint32_t) <= MHLEN,
("RPC header too big"));
@@ -414,7 +377,7 @@ call_again:
/*
* Prepend a record marker containing the packet length.
*/
- M_PREPEND(mreq, sizeof(uint32_t), M_WAIT);
+ M_PREPEND(mreq, sizeof(uint32_t), M_WAITOK);
*mtod(mreq, uint32_t *) =
htonl(0x80000000 | (mreq->m_pkthdr.len - sizeof(uint32_t)));
@@ -641,6 +604,7 @@ clnt_vc_control(CLIENT *cl, u_int request, void *info)
{
struct ct_data *ct = (struct ct_data *)cl->cl_private;
void *infop = info;
+ SVCXPRT *xprt;
mtx_lock(&ct->ct_lock);
@@ -752,6 +716,14 @@ clnt_vc_control(CLIENT *cl, u_int request, void *info)
*(int *) info = FALSE;
break;
+ case CLSET_BACKCHANNEL:
+ xprt = (SVCXPRT *)info;
+ if (ct->ct_backchannelxprt == NULL) {
+ xprt->xp_p2 = ct;
+ ct->ct_backchannelxprt = xprt;
+ }
+ break;
+
default:
mtx_unlock(&ct->ct_lock);
return (FALSE);
@@ -817,10 +789,20 @@ clnt_vc_destroy(CLIENT *cl)
{
struct ct_data *ct = (struct ct_data *) cl->cl_private;
struct socket *so = NULL;
+ SVCXPRT *xprt;
clnt_vc_close(cl);
mtx_lock(&ct->ct_lock);
+ xprt = ct->ct_backchannelxprt;
+ ct->ct_backchannelxprt = NULL;
+ if (xprt != NULL) {
+ mtx_unlock(&ct->ct_lock); /* To avoid a LOR. */
+ sx_xlock(&xprt->xp_lock);
+ mtx_lock(&ct->ct_lock);
+ xprt->xp_p2 = NULL;
+ xprt_unregister(xprt);
+ }
if (ct->ct_socket) {
if (ct->ct_closeit) {
@@ -829,6 +811,10 @@ clnt_vc_destroy(CLIENT *cl)
}
mtx_unlock(&ct->ct_lock);
+ if (xprt != NULL) {
+ sx_xunlock(&xprt->xp_lock);
+ SVC_RELEASE(xprt);
+ }
mtx_destroy(&ct->ct_lock);
if (so) {
@@ -859,12 +845,15 @@ clnt_vc_soupcall(struct socket *so, void *arg, int waitflag)
{
struct ct_data *ct = (struct ct_data *) arg;
struct uio uio;
- struct mbuf *m;
+ struct mbuf *m, *m2;
struct ct_request *cr;
int error, rcvflag, foundreq;
- uint32_t xid, header;
+ uint32_t xid_plus_direction[2], header;
bool_t do_read;
+ SVCXPRT *xprt;
+ struct cf_conn *cd;
+ CTASSERT(sizeof(xid_plus_direction) == 2 * sizeof(uint32_t));
ct->ct_upcallrefs++;
uio.uio_td = curthread;
do {
@@ -978,45 +967,89 @@ clnt_vc_soupcall(struct socket *so, void *arg, int waitflag)
&& ct->ct_record_eor) {
/*
* The XID is in the first uint32_t of
- * the reply.
+ * the reply and the message direction
+ * is the second one.
*/
- if (ct->ct_record->m_len < sizeof(xid) &&
+ if (ct->ct_record->m_len <
+ sizeof(xid_plus_direction) &&
m_length(ct->ct_record, NULL) <
- sizeof(xid)) {
+ sizeof(xid_plus_direction)) {
m_freem(ct->ct_record);
break;
}
- m_copydata(ct->ct_record, 0, sizeof(xid),
- (char *)&xid);
- xid = ntohl(xid);
-
- mtx_lock(&ct->ct_lock);
- foundreq = 0;
- TAILQ_FOREACH(cr, &ct->ct_pending, cr_link) {
- if (cr->cr_xid == xid) {
+ m_copydata(ct->ct_record, 0,
+ sizeof(xid_plus_direction),
+ (char *)xid_plus_direction);
+ xid_plus_direction[0] =
+ ntohl(xid_plus_direction[0]);
+ xid_plus_direction[1] =
+ ntohl(xid_plus_direction[1]);
+ /* Check message direction. */
+ if (xid_plus_direction[1] == CALL) {
+ /* This is a backchannel request. */
+ mtx_lock(&ct->ct_lock);
+ xprt = ct->ct_backchannelxprt;
+ if (xprt == NULL) {
+ mtx_unlock(&ct->ct_lock);
+ /* Just throw it away. */
+ m_freem(ct->ct_record);
+ ct->ct_record = NULL;
+ } else {
+ cd = (struct cf_conn *)
+ xprt->xp_p1;
+ m2 = cd->mreq;
/*
- * This one
- * matches. We leave
- * the reply mbuf in
- * cr->cr_mrep. Set
- * the XID to zero so
- * that we will ignore
- * any duplicaed
- * replies.
+ * The requests are chained
+ * in the m_nextpkt list.
*/
- cr->cr_xid = 0;
- cr->cr_mrep = ct->ct_record;
- cr->cr_error = 0;
- foundreq = 1;
- wakeup(cr);
- break;
+ while (m2 != NULL &&
+ m2->m_nextpkt != NULL)
+ /* Find end of list. */
+ m2 = m2->m_nextpkt;
+ if (m2 != NULL)
+ m2->m_nextpkt =
+ ct->ct_record;
+ else
+ cd->mreq =
+ ct->ct_record;
+ ct->ct_record->m_nextpkt =
+ NULL;
+ ct->ct_record = NULL;
+ xprt_active(xprt);
+ mtx_unlock(&ct->ct_lock);
}
- }
- mtx_unlock(&ct->ct_lock);
+ } else {
+ mtx_lock(&ct->ct_lock);
+ foundreq = 0;
+ TAILQ_FOREACH(cr, &ct->ct_pending,
+ cr_link) {
+ if (cr->cr_xid ==
+ xid_plus_direction[0]) {
+ /*
+ * This one
+ * matches. We leave
+ * the reply mbuf in
+ * cr->cr_mrep. Set
+ * the XID to zero so
+ * that we will ignore
+ * any duplicated
+ * replies.
+ */
+ cr->cr_xid = 0;
+ cr->cr_mrep =
+ ct->ct_record;
+ cr->cr_error = 0;
+ foundreq = 1;
+ wakeup(cr);
+ break;
+ }
+ }
+ mtx_unlock(&ct->ct_lock);
- if (!foundreq)
- m_freem(ct->ct_record);
- ct->ct_record = NULL;
+ if (!foundreq)
+ m_freem(ct->ct_record);
+ ct->ct_record = NULL;
+ }
}
}
} while (m);
diff --git a/sys/rpc/krpc.h b/sys/rpc/krpc.h
new file mode 100644
index 0000000..05bf1d4
--- /dev/null
+++ b/sys/rpc/krpc.h
@@ -0,0 +1,111 @@
+/*-
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part. Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ *
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ *
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _RPC_KRPC_H_
+#define _RPC_KRPC_H_
+
+#ifdef _KERNEL
+/*
+ * Definitions now shared between client and server RPC for backchannels.
+ */
+#define MCALL_MSG_SIZE 24
+
+/*
+ * A pending RPC request which awaits a reply. Requests which have
+ * received their reply will have cr_xid set to zero and cr_mrep to
+ * the mbuf chain of the reply.
+ */
+struct ct_request {
+ TAILQ_ENTRY(ct_request) cr_link;
+ uint32_t cr_xid; /* XID of request */
+ struct mbuf *cr_mrep; /* reply received by upcall */
+ int cr_error; /* any error from upcall */
+ char cr_verf[MAX_AUTH_BYTES]; /* reply verf */
+};
+
+TAILQ_HEAD(ct_request_list, ct_request);
+
+struct rc_data {
+ struct mtx rc_lock;
+ struct sockaddr_storage rc_addr; /* server address */
+ struct netconfig* rc_nconf; /* network type */
+ rpcprog_t rc_prog; /* program number */
+ rpcvers_t rc_vers; /* version number */
+ size_t rc_sendsz;
+ size_t rc_recvsz;
+ struct timeval rc_timeout;
+ struct timeval rc_retry;
+ int rc_retries;
+ int rc_privport;
+ char *rc_waitchan;
+ int rc_intr;
+ int rc_connecting;
+ int rc_closed;
+ struct ucred *rc_ucred;
+ CLIENT* rc_client; /* underlying RPC client */
+ struct rpc_err rc_err;
+ void *rc_backchannel;
+};
+
+struct ct_data {
+ struct mtx ct_lock;
+ int ct_threads; /* number of threads in clnt_vc_call */
+ bool_t ct_closing; /* TRUE if we are closing */
+ bool_t ct_closed; /* TRUE if we are closed */
+ struct socket *ct_socket; /* connection socket */
+ bool_t ct_closeit; /* close it on destroy */
+ struct timeval ct_wait; /* wait interval in milliseconds */
+ struct sockaddr_storage ct_addr; /* remote addr */
+ struct rpc_err ct_error;
+ uint32_t ct_xid;
+ char ct_mcallc[MCALL_MSG_SIZE]; /* marshalled callmsg */
+ size_t ct_mpos; /* pos after marshal */
+ const char *ct_waitchan;
+ int ct_waitflag;
+ struct mbuf *ct_record; /* current reply record */
+ size_t ct_record_resid; /* how much left of reply to read */
+ bool_t ct_record_eor; /* true if reading last fragment */
+ struct ct_request_list ct_pending;
+ int ct_upcallrefs; /* Ref cnt of upcalls in prog. */
+ SVCXPRT *ct_backchannelxprt; /* xprt for backchannel */
+};
+
+struct cf_conn { /* kept in xprt->xp_p1 for actual connection */
+ enum xprt_stat strm_stat;
+ struct mbuf *mpending; /* unparsed data read from the socket */
+ struct mbuf *mreq; /* current record being built from mpending */
+ uint32_t resid; /* number of bytes needed for fragment */
+ bool_t eor; /* reading last fragment of current record */
+};
+
+#endif /* _KERNEL */
+
+#endif /* _RPC_KRPC_H_ */
diff --git a/sys/rpc/rpc_generic.c b/sys/rpc/rpc_generic.c
index 6adae38..65f57cf 100644
--- a/sys/rpc/rpc_generic.c
+++ b/sys/rpc/rpc_generic.c
@@ -750,8 +750,8 @@ clnt_call_private(
struct mbuf *mrep;
enum clnt_stat stat;
- MGET(mreq, M_WAIT, MT_DATA);
- MCLGET(mreq, M_WAIT);
+ MGET(mreq, M_WAITOK, MT_DATA);
+ MCLGET(mreq, M_WAITOK);
mreq->m_len = 0;
xdrmbuf_create(&xdrs, mreq, XDR_ENCODE);
diff --git a/sys/rpc/rpcm_subs.h b/sys/rpc/rpcm_subs.h
index ac789f3..f0d60a3 100644
--- a/sys/rpc/rpcm_subs.h
+++ b/sys/rpc/rpcm_subs.h
@@ -80,7 +80,7 @@
#define rpcm_build(a,c,s) \
{ if ((s) > M_TRAILINGSPACE(mb)) { \
- MGET(mb2, M_WAIT, MT_DATA); \
+ MGET(mb2, M_WAITOK, MT_DATA); \
if ((s) > MLEN) \
panic("build > MLEN"); \
mb->m_next = mb2; \
diff --git a/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c b/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c
index 91112a1..a50c4fa 100644
--- a/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c
+++ b/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c
@@ -107,7 +107,7 @@ put_uint32(struct mbuf **mp, uint32_t v)
struct mbuf *m = *mp;
uint32_t n;
- M_PREPEND(m, sizeof(uint32_t), M_WAIT);
+ M_PREPEND(m, sizeof(uint32_t), M_WAITOK);
n = htonl(v);
bcopy(&n, mtod(m, uint32_t *), sizeof(uint32_t));
*mp = m;
@@ -241,7 +241,7 @@ xdr_rpc_gss_unwrap_data(struct mbuf **resultsp,
*/
len = get_uint32(&results);
message = results;
- results = m_split(results, len, M_WAIT);
+ results = m_split(results, len, M_WAITOK);
if (!results) {
m_freem(message);
return (FALSE);
diff --git a/sys/rpc/svc.c b/sys/rpc/svc.c
index 16e911a..f038e78 100644
--- a/sys/rpc/svc.c
+++ b/sys/rpc/svc.c
@@ -563,8 +563,8 @@ svc_sendreply(struct svc_req *rqstp, xdrproc_t xdr_results, void * xdr_location)
rply.acpted_rply.ar_results.where = NULL;
rply.acpted_rply.ar_results.proc = (xdrproc_t) xdr_void;
- MGET(m, M_WAIT, MT_DATA);
- MCLGET(m, M_WAIT);
+ MGET(m, M_WAITOK, MT_DATA);
+ MCLGET(m, M_WAITOK);
m->m_len = 0;
xdrmbuf_create(&xdrs, m, XDR_ENCODE);
ok = xdr_results(&xdrs, xdr_location);
diff --git a/sys/rpc/svc.h b/sys/rpc/svc.h
index 1bd3054..54aaa2c 100644
--- a/sys/rpc/svc.h
+++ b/sys/rpc/svc.h
@@ -703,6 +703,8 @@ extern SVCXPRT *svc_vc_create(SVCPOOL *, struct socket *,
* const size_t recvsize; -- max recv size
*/
+extern SVCXPRT *svc_vc_create_backchannel(SVCPOOL *);
+
/*
* Generic TLI create routine
*/
diff --git a/sys/rpc/svc_dg.c b/sys/rpc/svc_dg.c
index adfe2b5..ba6a56e 100644
--- a/sys/rpc/svc_dg.c
+++ b/sys/rpc/svc_dg.c
@@ -238,7 +238,7 @@ svc_dg_reply(SVCXPRT *xprt, struct rpc_msg *msg,
bool_t stat = TRUE;
int error;
- MGETHDR(mrep, M_WAIT, MT_DATA);
+ MGETHDR(mrep, M_WAITOK, MT_DATA);
mrep->m_len = 0;
xdrmbuf_create(&xdrs, mrep, XDR_ENCODE);
diff --git a/sys/rpc/svc_vc.c b/sys/rpc/svc_vc.c
index fddcf58..667d84c 100644
--- a/sys/rpc/svc_vc.c
+++ b/sys/rpc/svc_vc.c
@@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$");
#include <rpc/rpc.h>
+#include <rpc/krpc.h>
#include <rpc/rpc_com.h>
#include <security/mac/mac_framework.h>
@@ -83,6 +84,14 @@ static bool_t svc_vc_reply(SVCXPRT *, struct rpc_msg *,
static bool_t svc_vc_control(SVCXPRT *xprt, const u_int rq, void *in);
static bool_t svc_vc_rendezvous_control (SVCXPRT *xprt, const u_int rq,
void *in);
+static void svc_vc_backchannel_destroy(SVCXPRT *);
+static enum xprt_stat svc_vc_backchannel_stat(SVCXPRT *);
+static bool_t svc_vc_backchannel_recv(SVCXPRT *, struct rpc_msg *,
+ struct sockaddr **, struct mbuf **);
+static bool_t svc_vc_backchannel_reply(SVCXPRT *, struct rpc_msg *,
+ struct sockaddr *, struct mbuf *);
+static bool_t svc_vc_backchannel_control(SVCXPRT *xprt, const u_int rq,
+ void *in);
static SVCXPRT *svc_vc_create_conn(SVCPOOL *pool, struct socket *so,
struct sockaddr *raddr);
static int svc_vc_accept(struct socket *head, struct socket **sop);
@@ -105,12 +114,12 @@ static struct xp_ops svc_vc_ops = {
.xp_control = svc_vc_control
};
-struct cf_conn { /* kept in xprt->xp_p1 for actual connection */
- enum xprt_stat strm_stat;
- struct mbuf *mpending; /* unparsed data read from the socket */
- struct mbuf *mreq; /* current record being built from mpending */
- uint32_t resid; /* number of bytes needed for fragment */
- bool_t eor; /* reading last fragment of current record */
+static struct xp_ops svc_vc_backchannel_ops = {
+ .xp_recv = svc_vc_backchannel_recv,
+ .xp_stat = svc_vc_backchannel_stat,
+ .xp_reply = svc_vc_backchannel_reply,
+ .xp_destroy = svc_vc_backchannel_destroy,
+ .xp_control = svc_vc_backchannel_control
};
/*
@@ -267,6 +276,28 @@ cleanup_svc_vc_create:
}
/*
+ * Create a new transport for a backchannel on a clnt_vc socket.
+ */
+SVCXPRT *
+svc_vc_create_backchannel(SVCPOOL *pool)
+{
+ SVCXPRT *xprt = NULL;
+ struct cf_conn *cd = NULL;
+
+ cd = mem_alloc(sizeof(*cd));
+ cd->strm_stat = XPRT_IDLE;
+
+ xprt = svc_xprt_alloc();
+ sx_init(&xprt->xp_lock, "xprt->xp_lock");
+ xprt->xp_pool = pool;
+ xprt->xp_socket = NULL;
+ xprt->xp_p1 = cd;
+ xprt->xp_p2 = NULL;
+ xprt->xp_ops = &svc_vc_backchannel_ops;
+ return (xprt);
+}
+
+/*
* This does all of the accept except the final call to soaccept. The
* caller will call soaccept after dropping its locks (soaccept may
* call malloc).
@@ -452,6 +483,22 @@ svc_vc_destroy(SVCXPRT *xprt)
mem_free(cd, sizeof(*cd));
}
+static void
+svc_vc_backchannel_destroy(SVCXPRT *xprt)
+{
+ struct cf_conn *cd = (struct cf_conn *)xprt->xp_p1;
+ struct mbuf *m, *m2;
+
+ svc_xprt_free(xprt);
+ m = cd->mreq;
+ while (m != NULL) {
+ m2 = m;
+ m = m->m_nextpkt;
+ m_freem(m2);
+ }
+ mem_free(cd, sizeof(*cd));
+}
+
/*ARGSUSED*/
static bool_t
svc_vc_control(SVCXPRT *xprt, const u_int rq, void *in)
@@ -466,6 +513,13 @@ svc_vc_rendezvous_control(SVCXPRT *xprt, const u_int rq, void *in)
return (FALSE);
}
+static bool_t
+svc_vc_backchannel_control(SVCXPRT *xprt, const u_int rq, void *in)
+{
+
+ return (FALSE);
+}
+
static enum xprt_stat
svc_vc_stat(SVCXPRT *xprt)
{
@@ -506,6 +560,19 @@ svc_vc_stat(SVCXPRT *xprt)
return (XPRT_IDLE);
}
+static enum xprt_stat
+svc_vc_backchannel_stat(SVCXPRT *xprt)
+{
+ struct cf_conn *cd;
+
+ cd = (struct cf_conn *)(xprt->xp_p1);
+
+ if (cd->mreq != NULL)
+ return (XPRT_MOREREQS);
+
+ return (XPRT_IDLE);
+}
+
static bool_t
svc_vc_recv(SVCXPRT *xprt, struct rpc_msg *msg,
struct sockaddr **addrp, struct mbuf **mp)
@@ -572,7 +639,7 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_msg *msg,
if (cd->mpending->m_next
|| cd->mpending->m_len > cd->resid)
cd->mpending = m_split(cd->mpending,
- cd->resid, M_WAIT);
+ cd->resid, M_WAITOK);
else
cd->mpending = NULL;
if (cd->mreq)
@@ -680,6 +747,44 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_msg *msg,
}
static bool_t
+svc_vc_backchannel_recv(SVCXPRT *xprt, struct rpc_msg *msg,
+ struct sockaddr **addrp, struct mbuf **mp)
+{
+ struct cf_conn *cd = (struct cf_conn *) xprt->xp_p1;
+ struct ct_data *ct;
+ struct mbuf *m;
+ XDR xdrs;
+
+ sx_xlock(&xprt->xp_lock);
+ ct = (struct ct_data *)xprt->xp_p2;
+ if (ct == NULL) {
+ sx_xunlock(&xprt->xp_lock);
+ return (FALSE);
+ }
+ mtx_lock(&ct->ct_lock);
+ m = cd->mreq;
+ if (m == NULL) {
+ xprt_inactive(xprt);
+ mtx_unlock(&ct->ct_lock);
+ sx_xunlock(&xprt->xp_lock);
+ return (FALSE);
+ }
+ cd->mreq = m->m_nextpkt;
+ mtx_unlock(&ct->ct_lock);
+ sx_xunlock(&xprt->xp_lock);
+
+ xdrmbuf_create(&xdrs, m, XDR_DECODE);
+ if (! xdr_callmsg(&xdrs, msg)) {
+ XDR_DESTROY(&xdrs);
+ return (FALSE);
+ }
+ *addrp = NULL;
+ *mp = xdrmbuf_getall(&xdrs);
+ XDR_DESTROY(&xdrs);
+ return (TRUE);
+}
+
+static bool_t
svc_vc_reply(SVCXPRT *xprt, struct rpc_msg *msg,
struct sockaddr *addr, struct mbuf *m)
{
@@ -691,7 +796,7 @@ svc_vc_reply(SVCXPRT *xprt, struct rpc_msg *msg,
/*
* Leave space for record mark.
*/
- MGETHDR(mrep, M_WAIT, MT_DATA);
+ MGETHDR(mrep, M_WAITOK, MT_DATA);
mrep->m_len = 0;
mrep->m_data += sizeof(uint32_t);
@@ -713,7 +818,7 @@ svc_vc_reply(SVCXPRT *xprt, struct rpc_msg *msg,
/*
* Prepend a record marker containing the reply length.
*/
- M_PREPEND(mrep, sizeof(uint32_t), M_WAIT);
+ M_PREPEND(mrep, sizeof(uint32_t), M_WAITOK);
*mtod(mrep, uint32_t *) =
htonl(0x80000000 | (mrep->m_pkthdr.len
- sizeof(uint32_t)));
@@ -733,6 +838,65 @@ svc_vc_reply(SVCXPRT *xprt, struct rpc_msg *msg,
}
static bool_t
+svc_vc_backchannel_reply(SVCXPRT *xprt, struct rpc_msg *msg,
+ struct sockaddr *addr, struct mbuf *m)
+{
+ struct ct_data *ct;
+ XDR xdrs;
+ struct mbuf *mrep;
+ bool_t stat = TRUE;
+ int error;
+
+ /*
+ * Leave space for record mark.
+ */
+ MGETHDR(mrep, M_WAITOK, MT_DATA);
+ mrep->m_len = 0;
+ mrep->m_data += sizeof(uint32_t);
+
+ xdrmbuf_create(&xdrs, mrep, XDR_ENCODE);
+
+ if (msg->rm_reply.rp_stat == MSG_ACCEPTED &&
+ msg->rm_reply.rp_acpt.ar_stat == SUCCESS) {
+ if (!xdr_replymsg(&xdrs, msg))
+ stat = FALSE;
+ else
+ xdrmbuf_append(&xdrs, m);
+ } else {
+ stat = xdr_replymsg(&xdrs, msg);
+ }
+
+ if (stat) {
+ m_fixhdr(mrep);
+
+ /*
+ * Prepend a record marker containing the reply length.
+ */
+ M_PREPEND(mrep, sizeof(uint32_t), M_WAITOK);
+ *mtod(mrep, uint32_t *) =
+ htonl(0x80000000 | (mrep->m_pkthdr.len
+ - sizeof(uint32_t)));
+ sx_xlock(&xprt->xp_lock);
+ ct = (struct ct_data *)xprt->xp_p2;
+ if (ct != NULL)
+ error = sosend(ct->ct_socket, NULL, NULL, mrep, NULL,
+ 0, curthread);
+ else
+ error = EPIPE;
+ sx_xunlock(&xprt->xp_lock);
+ if (!error) {
+ stat = TRUE;
+ }
+ } else {
+ m_freem(mrep);
+ }
+
+ XDR_DESTROY(&xdrs);
+
+ return (stat);
+}
+
+static bool_t
svc_vc_null()
{
diff --git a/sys/security/audit/audit_bsm_domain.c b/sys/security/audit/bsm_domain.c
index cb5939f..cb5939f 100644
--- a/sys/security/audit/audit_bsm_domain.c
+++ b/sys/security/audit/bsm_domain.c
diff --git a/sys/security/audit/audit_bsm_errno.c b/sys/security/audit/bsm_errno.c
index e2e1961..e2e1961 100644
--- a/sys/security/audit/audit_bsm_errno.c
+++ b/sys/security/audit/bsm_errno.c
diff --git a/sys/security/audit/audit_bsm_fcntl.c b/sys/security/audit/bsm_fcntl.c
index 1e7e68f..1e7e68f 100644
--- a/sys/security/audit/audit_bsm_fcntl.c
+++ b/sys/security/audit/bsm_fcntl.c
diff --git a/sys/security/audit/audit_bsm_socket_type.c b/sys/security/audit/bsm_socket_type.c
index c049179..c049179 100644
--- a/sys/security/audit/audit_bsm_socket_type.c
+++ b/sys/security/audit/bsm_socket_type.c
diff --git a/sys/security/audit/audit_bsm_token.c b/sys/security/audit/bsm_token.c
index 6d0d67f..6d0d67f 100644
--- a/sys/security/audit/audit_bsm_token.c
+++ b/sys/security/audit/bsm_token.c
diff --git a/sys/sparc64/conf/GENERIC b/sys/sparc64/conf/GENERIC
index 81d82e3..bcd94cd 100644
--- a/sys/sparc64/conf/GENERIC
+++ b/sys/sparc64/conf/GENERIC
@@ -26,7 +26,7 @@ makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols
# Platforms supported
# At this time all platforms are supported, as-is.
-options SCHED_4BSD # 4BSD scheduler
+options SCHED_ULE # ULE scheduler
options PREEMPTION # Enable kernel thread preemption
options INET # InterNETworking
options INET6 # IPv6 communications protocols
diff --git a/sys/sys/buf_ring.h b/sys/sys/buf_ring.h
index 9f99fa2..b660d9b 100644
--- a/sys/sys/buf_ring.h
+++ b/sys/sys/buf_ring.h
@@ -47,25 +47,14 @@ struct buf_ring {
int br_prod_size;
int br_prod_mask;
uint64_t br_drops;
- uint64_t br_prod_bufs;
- /*
- * Pad out to next L2 cache line
- */
- uint64_t _pad0[11];
-
- volatile uint32_t br_cons_head;
+ volatile uint32_t br_cons_head __aligned(CACHE_LINE_SIZE);
volatile uint32_t br_cons_tail;
int br_cons_size;
int br_cons_mask;
-
- /*
- * Pad out to next L2 cache line
- */
- uint64_t _pad1[14];
#ifdef DEBUG_BUFRING
struct mtx *br_lock;
#endif
- void *br_ring[0];
+ void *br_ring[0] __aligned(CACHE_LINE_SIZE);
};
/*
@@ -77,7 +66,6 @@ buf_ring_enqueue(struct buf_ring *br, void *buf)
{
uint32_t prod_head, prod_next;
uint32_t cons_tail;
- int success;
#ifdef DEBUG_BUFRING
int i;
for (i = br->br_cons_head; i != br->br_prod_head;
@@ -98,16 +86,18 @@ buf_ring_enqueue(struct buf_ring *br, void *buf)
critical_exit();
return (ENOBUFS);
}
-
- success = atomic_cmpset_int(&br->br_prod_head, prod_head,
- prod_next);
- } while (success == 0);
+ } while (!atomic_cmpset_int(&br->br_prod_head, prod_head, prod_next));
#ifdef DEBUG_BUFRING
if (br->br_ring[prod_head] != NULL)
panic("dangling value in enqueue");
#endif
br->br_ring[prod_head] = buf;
- wmb();
+
+ /*
+ * The full memory barrier also avoids that br_prod_tail store
+ * is reordered before the br_ring[prod_head] is full setup.
+ */
+ mb();
/*
* If there are other enqueues in progress
@@ -116,7 +106,6 @@ buf_ring_enqueue(struct buf_ring *br, void *buf)
*/
while (br->br_prod_tail != prod_head)
cpu_spinwait();
- br->br_prod_bufs++;
br->br_prod_tail = prod_next;
critical_exit();
return (0);
@@ -154,7 +143,12 @@ buf_ring_dequeue_mc(struct buf_ring *br)
#ifdef DEBUG_BUFRING
br->br_ring[cons_head] = NULL;
#endif
- rmb();
+
+ /*
+ * The full memory barrier also avoids that br_ring[cons_read]
+ * load is reordered after br_cons_tail is set.
+ */
+ mb();
/*
* If there are other dequeues in progress
diff --git a/sys/sys/busdma_bufalloc.h b/sys/sys/busdma_bufalloc.h
new file mode 100644
index 0000000..f5ec32f
--- /dev/null
+++ b/sys/sys/busdma_bufalloc.h
@@ -0,0 +1,118 @@
+/*-
+ * Copyright (c) 2012 Ian Lepore
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * $FreeBSD$
+ */
+
+/*
+ * A buffer pool manager, for use by a platform's busdma implementation.
+ */
+
+#ifndef _MACHINE_BUSDMA_BUFALLOC_H_
+#define _MACHINE_BUSDMA_BUFALLOC_H_
+
+#include <machine/bus.h>
+#include <vm/uma.h>
+
+/*
+ * Information about a buffer zone, returned by busdma_bufalloc_findzone().
+ */
+struct busdma_bufzone {
+ bus_size_t size;
+ uma_zone_t umazone;
+ char name[24];
+};
+
+/*
+ * Opaque handle type returned by busdma_bufalloc_create().
+ */
+struct busdma_bufalloc;
+typedef struct busdma_bufalloc *busdma_bufalloc_t;
+
+/*
+ * Create an allocator that manages a pool of DMA buffers.
+ *
+ * The allocator manages a collection of uma(9) zones of buffers in power-of-two
+ * sized increments ranging from minimum_alignment to the platform's PAGE_SIZE.
+ * The buffers within each zone are aligned on boundaries corresponding to the
+ * buffer size, and thus by implication each buffer is contiguous within a page
+ * and does not cross a power of two boundary larger than the buffer size.
+ * These rules are intended to make it easy for a busdma implementation to
+ * check whether a tag's constraints allow use of a buffer from the allocator.
+ *
+ * minimum_alignment is also the minimum buffer allocation size. For platforms
+ * with software-assisted cache coherency, this is typically the data cache line
+ * size (and MUST not be smaller than the cache line size).
+ *
+ * name appears in zone stats as 'dma name nnnnn' where 'dma' is fixed and
+ * 'nnnnn' is the size of buffers in that zone.
+ *
+ * If if the alloc/free function pointers are NULL, the regular uma internal
+ * allocators are used (I.E., you get "plain old kernel memory"). On a platform
+ * with an exclusion zone that applies to all DMA operations, a custom allocator
+ * could be used to ensure no buffer memory is ever allocated from that zone,
+ * allowing the bus_dmamem_alloc() implementation to make the assumption that
+ * buffers provided by the allocation could never lead to the need for a bounce.
+ */
+busdma_bufalloc_t busdma_bufalloc_create(const char *name,
+ bus_size_t minimum_alignment,
+ uma_alloc uma_alloc_func, uma_free uma_free_func,
+ u_int32_t uma_zcreate_flags);
+
+/*
+ * Destroy an allocator created by busdma_bufalloc_create().
+ * Safe to call with a NULL pointer.
+ */
+void busdma_bufalloc_destroy(busdma_bufalloc_t ba);
+
+/*
+ * Return a pointer to the busdma_bufzone that should be used to allocate or
+ * free a buffer of the given size. Returns NULL if the size is larger than the
+ * largest zone handled by the allocator.
+ */
+struct busdma_bufzone * busdma_bufalloc_findzone(busdma_bufalloc_t ba,
+ bus_size_t size);
+
+/*
+ * These built-in allocation routines are available for managing a pools of
+ * uncacheable memory on platforms that support VM_MEMATTR_UNCACHEABLE.
+ *
+ * Allocation is done using kmem_alloc_attr() with these parameters:
+ * lowaddr = 0
+ * highaddr = BUS_SPACE_MAXADDR
+ * memattr = VM_MEMATTR_UNCACHEABLE.
+ *
+ * If your platform has no exclusion region (lowaddr/highaddr), and its pmap
+ * routines support pmap_page_set_memattr() and the VM_MEMATTR_UNCACHEABLE flag
+ * you can probably use these when you need uncacheable buffers.
+ */
+void * busdma_bufalloc_alloc_uncacheable(uma_zone_t zone, int size,
+ u_int8_t *pflag, int wait);
+void busdma_bufalloc_free_uncacheable(void *item, int size, u_int8_t pflag);
+
+#endif /* _MACHINE_BUSDMA_BUFALLOC_H_ */
+
diff --git a/sys/sys/copyright.h b/sys/sys/copyright.h
index 0bc59b7..08d0ec0 100644
--- a/sys/sys/copyright.h
+++ b/sys/sys/copyright.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (C) 1992-2012 The FreeBSD Project. All rights reserved.
+ * Copyright (C) 1992-2013 The FreeBSD Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -30,7 +30,7 @@
/* FreeBSD */
#define COPYRIGHT_FreeBSD \
- "Copyright (c) 1992-2012 The FreeBSD Project.\n"
+ "Copyright (c) 1992-2013 The FreeBSD Project.\n"
/* Foundation */
#define TRADEMARK_Foundation \
diff --git a/sys/sys/file.h b/sys/sys/file.h
index dc49895..cf5f1ea 100644
--- a/sys/sys/file.h
+++ b/sys/sys/file.h
@@ -178,7 +178,8 @@ struct file {
#define f_advice f_vnun.fvn_advice
#define FOFFSET_LOCKED 0x1
-#define FOFFSET_LOCK_WAITING 0x2
+#define FOFFSET_LOCK_WAITING 0x2
+#define FDEVFS_VNODE 0x4
#endif /* _KERNEL || _WANT_FILE */
diff --git a/sys/sys/fnv_hash.h b/sys/sys/fnv_hash.h
index 2dbed33..c1452a6 100644
--- a/sys/sys/fnv_hash.h
+++ b/sys/sys/fnv_hash.h
@@ -7,6 +7,8 @@
*
* $FreeBSD$
*/
+#ifndef _SYS_FNV_HASH_H_
+#define _SYS_FNV_HASH_H_
typedef u_int32_t Fnv32_t;
typedef u_int64_t Fnv64_t;
@@ -66,3 +68,4 @@ fnv_64_str(const char *str, Fnv64_t hval)
}
return hval;
}
+#endif /* _SYS_FNV_HASH_H_ */
diff --git a/sys/sys/kdb.h b/sys/sys/kdb.h
index 1c0bf06..49c8c32 100644
--- a/sys/sys/kdb.h
+++ b/sys/sys/kdb.h
@@ -97,6 +97,7 @@ int kdb_trap(int, int, struct trapframe *);
extern const char * volatile kdb_why;
#define KDB_WHY_UNSET NULL /* No reason set. */
#define KDB_WHY_PANIC "panic" /* panic() was called. */
+#define KDB_WHY_KASSERT "kassert" /* kassert failed. */
#define KDB_WHY_SYSCTL "sysctl" /* Sysctl entered debugger. */
#define KDB_WHY_BOOTFLAGS "bootflags" /* Boot flags were set. */
#define KDB_WHY_WITNESS "witness" /* Witness entered debugger. */
diff --git a/sys/sys/ktr.h b/sys/sys/ktr.h
index c440a41..28442e2 100644
--- a/sys/sys/ktr.h
+++ b/sys/sys/ktr.h
@@ -244,6 +244,50 @@ void ktr_tracepoint(u_int mask, const char *file, int line,
point, a0, (v0), a1, (v1), a2, (v2), a3, (v3))
/*
+ * Start functions denote the start of a region of code or operation
+ * and should be paired with stop functions for timing of nested
+ * sequences.
+ *
+ * Specifying extra attributes with the name "key" will result in
+ * multi-part keys. For example a block device and offset pair
+ * might be used to describe a buf undergoing I/O.
+ */
+#define KTR_START0(m, egroup, ident, key) \
+ KTR_EVENT0(m, egroup, ident, "start:0x%jX", (uintmax_t)key)
+#define KTR_START1(m, egroup, ident, key, a0, v0) \
+ KTR_EVENT1(m, egroup, ident, "start:0x%jX", (uintmax_t)key, a0, (v0))
+#define KTR_START2(m, egroup, ident, key, a0, v0, a1, v1) \
+ KTR_EVENT2(m, egroup, ident, "start:0x%jX", (uintmax_t)key, \
+ a0, (v0), a1, (v1))
+#define KTR_START3(m, egroup, ident, key, a0, v0, a1, v1, a2, v2)\
+ KTR_EVENT3(m, egroup, ident, "start:0x%jX", (uintmax_t)key, \
+ a0, (v0), a1, (v1), a2, (v2))
+#define KTR_START4(m, egroup, ident, key, \
+ a0, v0, a1, v1, a2, v2, a3, v3) \
+ KTR_EVENT4(m, egroup, ident, "start:0x%jX", (uintmax_t)key, \
+ a0, (v0), a1, (v1), a2, (v2), a3, (v3))
+
+/*
+ * Stop functions denote the end of a region of code or operation
+ * and should be paired with start functions for timing of nested
+ * sequences.
+ */
+#define KTR_STOP0(m, egroup, ident, key) \
+ KTR_EVENT0(m, egroup, ident, "stop:0x%jX", (uintmax_t)key)
+#define KTR_STOP1(m, egroup, ident, key, a0, v0) \
+ KTR_EVENT1(m, egroup, ident, "stop:0x%jX", (uintmax_t)key, a0, (v0))
+#define KTR_STOP2(m, egroup, ident, key, a0, v0, a1, v1) \
+ KTR_EVENT2(m, egroup, ident, "stop:0x%jX", (uintmax_t)key, \
+ a0, (v0), a1, (v1))
+#define KTR_STOP3(m, egroup, ident, key, a0, v0, a1, v1, a2, v2)\
+ KTR_EVENT3(m, egroup, ident, "stop:0x%jX", (uintmax_t)key, \
+ a0, (v0), a1, (v1), a2, (v2))
+#define KTR_STOP4(m, egroup, ident, \
+ key, a0, v0, a1, v1, a2, v2, a3, v3) \
+ KTR_EVENT4(m, egroup, ident, "stop:0x%jX", (uintmax_t)key, \
+ a0, (v0), a1, (v1), a2, (v2), a3, (v3))
+
+/*
* Trace initialization events, similar to CTR with KTR_INIT, but
* completely ifdef'ed out if KTR_INIT isn't in KTR_COMPILE (to
* save string space, the compiler doesn't optimize out strings
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index 0d0b0d0..6444b07 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -346,18 +346,7 @@ struct mbstat {
};
/*
- * Flags specifying how an allocation should be made.
- *
- * The flag to use is as follows:
- * - M_NOWAIT (M_DONTWAIT) from an interrupt handler to not block allocation.
- * - M_WAITOK (M_WAIT) from wherever it is safe to block.
- *
- * M_DONTWAIT/M_NOWAIT means that we will not block the thread explicitly and
- * if we cannot allocate immediately we may return NULL, whereas
- * M_WAIT/M_WAITOK means that if we cannot allocate resources we
- * will block until they are available, and thus never return NULL.
- *
- * XXX Eventually just phase this out to use M_WAITOK/M_NOWAIT.
+ * Compatibility with historic mbuf allocator.
*/
#define MBTOM(how) (how)
#define M_DONTWAIT M_NOWAIT
@@ -865,7 +854,7 @@ m_last(struct mbuf *m)
#define M_COPYALL 1000000000
/* Compatibility with 4.3. */
-#define m_copy(m, o, l) m_copym((m), (o), (l), M_DONTWAIT)
+#define m_copy(m, o, l) m_copym((m), (o), (l), M_NOWAIT)
extern int max_datalen; /* MHLEN - max_hdr */
extern int max_hdr; /* Largest link + protocol header */
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index 4d010ec..ed2b002 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -199,8 +199,8 @@ struct vnode *__mnt_vnode_next_all(struct vnode **mvp, struct mount *mp);
struct vnode *__mnt_vnode_first_all(struct vnode **mvp, struct mount *mp);
void __mnt_vnode_markerfree_all(struct vnode **mvp, struct mount *mp);
-#define MNT_VNODE_FOREACH_ALL(vp, mp, mvp) \
- for (vp = __mnt_vnode_first_all(&(mvp), (mp)); \
+#define MNT_VNODE_FOREACH_ALL(vp, mp, mvp) \
+ for (vp = __mnt_vnode_first_all(&(mvp), (mp)); \
(vp) != NULL; vp = __mnt_vnode_next_all(&(mvp), (mp)))
#define MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp) \
@@ -218,17 +218,12 @@ struct vnode *__mnt_vnode_next_active(struct vnode **mvp, struct mount *mp);
struct vnode *__mnt_vnode_first_active(struct vnode **mvp, struct mount *mp);
void __mnt_vnode_markerfree_active(struct vnode **mvp, struct mount *);
-#define MNT_VNODE_FOREACH_ACTIVE(vp, mp, mvp) \
- for (vp = __mnt_vnode_first_active(&(mvp), (mp)); \
+#define MNT_VNODE_FOREACH_ACTIVE(vp, mp, mvp) \
+ for (vp = __mnt_vnode_first_active(&(mvp), (mp)); \
(vp) != NULL; vp = __mnt_vnode_next_active(&(mvp), (mp)))
#define MNT_VNODE_FOREACH_ACTIVE_ABORT(mp, mvp) \
- do { \
- MNT_ILOCK(mp); \
- __mnt_vnode_markerfree_active(&(mvp), (mp)); \
- /* MNT_IUNLOCK(mp); -- done in above function */ \
- mtx_assert(MNT_MTX(mp), MA_NOTOWNED); \
- } while (0)
+ __mnt_vnode_markerfree_active(&(mvp), (mp))
/*
* Definitions for MNT_VNODE_FOREACH.
diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h
index b55af4b..a74771e 100644
--- a/sys/sys/protosw.h
+++ b/sys/sys/protosw.h
@@ -330,6 +330,7 @@ char *prcorequests[] = {
#ifdef _KERNEL
void pfctlinput(int, struct sockaddr *);
void pfctlinput2(int, struct sockaddr *, void *);
+struct domain *pffinddomain(int family);
struct protosw *pffindproto(int family, int protocol, int type);
struct protosw *pffindtype(int family, int type);
int pf_proto_register(int family, struct protosw *npr);
diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h
index b4d01dc..9012f240 100644
--- a/sys/sys/socketvar.h
+++ b/sys/sys/socketvar.h
@@ -294,7 +294,6 @@ MALLOC_DECLARE(M_SONAME);
extern int maxsockets;
extern u_long sb_max;
-extern struct uma_zone *socket_zone;
extern so_gen_t so_gencnt;
struct mbuf;
diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h
index 1577ee5..e575f22 100644
--- a/sys/sys/sysctl.h
+++ b/sys/sys/sysctl.h
@@ -84,12 +84,14 @@ struct ctlname {
#define CTLFLAG_SKIP 0x01000000 /* Skip this sysctl when listing */
#define CTLMASK_SECURE 0x00F00000 /* Secure level */
#define CTLFLAG_TUN 0x00080000 /* Tunable variable */
+#define CTLFLAG_RDTUN (CTLFLAG_RD|CTLFLAG_TUN)
+#define CTLFLAG_RWTUN (CTLFLAG_RW|CTLFLAG_TUN)
#define CTLFLAG_MPSAFE 0x00040000 /* Handler is MP safe */
#define CTLFLAG_VNET 0x00020000 /* Prisons with vnet can fiddle */
-#define CTLFLAG_RDTUN (CTLFLAG_RD|CTLFLAG_TUN)
#define CTLFLAG_DYING 0x00010000 /* oid is being removed */
#define CTLFLAG_CAPRD 0x00008000 /* Can be read in capability mode */
#define CTLFLAG_CAPWR 0x00004000 /* Can be written in capability mode */
+#define CTLFLAG_STATS 0x00002000 /* Statistics, not a tuneable */
#define CTLFLAG_CAPRW (CTLFLAG_CAPRD|CTLFLAG_CAPWR)
/*
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
index fec77d2..7c3f13e 100644
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -72,15 +72,19 @@ extern int vm_guest; /* Running as virtual machine guest? */
*/
enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN };
+#if defined(WITNESS) || defined(INVARIANTS)
+void kassert_panic(const char *fmt, ...);
+#endif
+
#ifdef INVARIANTS /* The option is always available */
#define KASSERT(exp,msg) do { \
if (__predict_false(!(exp))) \
- panic msg; \
+ kassert_panic msg; \
} while (0)
#define VNASSERT(exp, vp, msg) do { \
if (__predict_false(!(exp))) { \
vn_printf(vp, "VNASSERT failed\n"); \
- panic msg; \
+ kassert_panic msg; \
} \
} while (0)
#else
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 42f9e5f..f487f37 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -392,6 +392,9 @@ extern int vttoif_tab[];
#define V_NOWAIT 0x0002 /* vn_start_write: don't sleep for suspend */
#define V_XSLEEP 0x0004 /* vn_start_write: just return after sleep */
+#define VR_START_WRITE 0x0001 /* vfs_write_resume: start write atomically */
+#define VR_NO_SUSPCLR 0x0002 /* vfs_write_resume: do not clear suspension */
+
#define VREF(vp) vref(vp)
#ifdef DIAGNOSTIC
@@ -701,6 +704,7 @@ int vn_io_fault_uiomove(char *data, int xfersize, struct uio *uio);
int vfs_cache_lookup(struct vop_lookup_args *ap);
void vfs_timestamp(struct timespec *);
void vfs_write_resume(struct mount *mp);
+void vfs_write_resume_flags(struct mount *mp, int flags);
int vfs_write_suspend(struct mount *mp);
int vop_stdbmap(struct vop_bmap_args *);
int vop_stdfsync(struct vop_fsync_args *);
diff --git a/sys/tools/vnode_if.awk b/sys/tools/vnode_if.awk
index 5e194a8..c991458 100644
--- a/sys/tools/vnode_if.awk
+++ b/sys/tools/vnode_if.awk
@@ -222,8 +222,6 @@ while ((getline < srcfile) > 0) {
name = $1;
uname = toupper(name);
- # Start constructing a ktrpoint string
- ctrstr = "\"" uname;
# Get the function arguments.
for (numargs = 0; ; ++numargs) {
if ((getline < srcfile) <= 0) {
@@ -267,27 +265,15 @@ while ((getline < srcfile) > 0) {
# remove trailing space (if any)
sub(/ $/, "");
types[numargs] = $0;
-
- # We can do a maximum of 6 arguments to CTR*
- if (numargs <= 6) {
- if (numargs == 0)
- ctrstr = ctrstr "(" args[numargs];
- else
- ctrstr = ctrstr ", " args[numargs];
- if (types[numargs] ~ /\*/)
- ctrstr = ctrstr " 0x%lX";
- else
- ctrstr = ctrstr " %ld";
- }
}
- if (numargs > 6)
- ctrargs = 6;
+ if (numargs > 4)
+ ctrargs = 4;
else
ctrargs = numargs;
- ctrstr = "\tCTR" ctrargs "(KTR_VOP,\n\t " ctrstr ")\",\n\t ";
- ctrstr = ctrstr "a->a_" args[0];
+ ctrstr = ctrargs "(KTR_VOP, \"VOP\", \"" uname "\", (uintptr_t)a,\n\t ";
+ ctrstr = ctrstr "\"" args[0] ":0x%jX\", (uintptr_t)a->a_" args[0];
for (i = 1; i < ctrargs; ++i)
- ctrstr = ctrstr ", a->a_" args[i];
+ ctrstr = ctrstr ", \"" args[i] ":0x%jX\", a->a_" args[i];
ctrstr = ctrstr ");";
if (pfile) {
@@ -377,12 +363,12 @@ while ((getline < srcfile) > 0) {
printc("\tSDT_PROBE(vfs, vop, " name ", entry, a->a_" args[0] ", a, 0, 0, 0);\n");
for (i = 0; i < numargs; ++i)
add_debug_code(name, args[i], "Entry", "\t");
+ printc("\tKTR_START" ctrstr);
add_pre(name);
printc("\tif (vop->"name" != NULL)")
printc("\t\trc = vop->"name"(a);")
printc("\telse")
printc("\t\trc = vop->vop_bypass(&a->a_gen);")
- printc(ctrstr);
printc("\tSDT_PROBE(vfs, vop, " name ", return, a->a_" args[0] ", a, rc, 0, 0);\n");
printc("\tif (rc == 0) {");
for (i = 0; i < numargs; ++i)
@@ -392,6 +378,7 @@ while ((getline < srcfile) > 0) {
add_debug_code(name, args[i], "Error", "\t\t");
printc("\t}");
add_post(name);
+ printc("\tKTR_STOP" ctrstr);
printc("\treturn (rc);");
printc("}\n");
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index e528509..5f67ae5 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -687,8 +687,7 @@ out1:
/*
* Resume operation on filesystem.
*/
- vfs_write_resume(vp->v_mount);
- vn_start_write(NULL, &wrtmp, V_WAIT);
+ vfs_write_resume_flags(vp->v_mount, VR_START_WRITE | VR_NO_SUSPCLR);
if (collectsnapstats && starttime.tv_sec > 0) {
nanotime(&endtime);
timespecsub(&endtime, &starttime);
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index 55f9468..4ee16ab 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -1569,7 +1569,7 @@ softdep_process_worklist(mp, full)
*/
if (should_yield()) {
FREE_LOCK(&lk);
- kern_yield(PRI_UNCHANGED);
+ kern_yield(PRI_USER);
bwillwrite();
ACQUIRE_LOCK(&lk);
}
diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c
index 330f449..87ac9a1 100644
--- a/sys/ufs/ufs/ufs_quota.c
+++ b/sys/ufs/ufs/ufs_quota.c
@@ -1044,7 +1044,7 @@ again:
error = vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td);
if (error) {
if (error == ENOENT) {
- MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp);
+ MNT_VNODE_FOREACH_ACTIVE_ABORT(mp, mvp);
goto again;
}
continue;
diff --git a/sys/vm/uma.h b/sys/vm/uma.h
index 8a12fe1..3abfd3e 100644
--- a/sys/vm/uma.h
+++ b/sys/vm/uma.h
@@ -50,7 +50,7 @@ typedef struct uma_zone * uma_zone_t;
void zone_drain(uma_zone_t);
-/*
+/*
* Item constructor
*
* Arguments:
@@ -58,7 +58,7 @@ void zone_drain(uma_zone_t);
* arg The arg field passed to uma_zalloc_arg
* size The size of the allocated item
* flags See zalloc flags
- *
+ *
* Returns:
* 0 on success
* errno on failure
@@ -76,7 +76,7 @@ typedef int (*uma_ctor)(void *mem, int size, void *arg, int flags);
* item A pointer to the memory which has been allocated.
* size The size of the item being destructed.
* arg Argument passed through uma_zfree_arg
- *
+ *
* Returns:
* Nothing
*
@@ -87,20 +87,20 @@ typedef int (*uma_ctor)(void *mem, int size, void *arg, int flags);
*/
typedef void (*uma_dtor)(void *mem, int size, void *arg);
-/*
+/*
* Item initializer
*
* Arguments:
* item A pointer to the memory which has been allocated.
* size The size of the item being initialized.
* flags See zalloc flags
- *
+ *
* Returns:
* 0 on success
* errno on failure
*
* Discussion:
- * The initializer is called when the memory is cached in the uma zone.
+ * The initializer is called when the memory is cached in the uma zone.
* The initializer and the destructor should leave the object in the same
* state.
*/
@@ -110,7 +110,7 @@ typedef int (*uma_init)(void *mem, int size, int flags);
* Item discard function
*
* Arguments:
- * item A pointer to memory which has been 'freed' but has not left the
+ * item A pointer to memory which has been 'freed' but has not left the
* zone's cache.
* size The size of the item being discarded.
*
@@ -126,7 +126,7 @@ typedef void (*uma_fini)(void *mem, int size);
/*
* What's the difference between initializing and constructing?
*
- * The item is initialized when it is cached, and this is the state that the
+ * The item is initialized when it is cached, and this is the state that the
* object should be in when returned to the allocator. The purpose of this is
* to remove some code which would otherwise be called on each allocation by
* utilizing a known, stable state. This differs from the constructor which
@@ -211,7 +211,7 @@ uma_zone_t uma_zsecond_create(char *name, uma_ctor ctor, uma_dtor dtor,
* the only supported.
*
* Returns:
- * Error on failure, 0 on success.
+ * Error on failure, 0 on success.
*/
int uma_zsecond_add(uma_zone_t zone, uma_zone_t master);
@@ -403,7 +403,7 @@ void uma_startup(void *bootmem, int boot_pages);
* Discussion:
* uma_startup2 is called by kmeminit() to enable us of uma for malloc.
*/
-
+
void uma_startup2(void);
/*
@@ -476,6 +476,18 @@ int uma_zone_set_max(uma_zone_t zone, int nitems);
int uma_zone_get_max(uma_zone_t zone);
/*
+ * Sets a warning to be printed when limit is reached
+ *
+ * Arguments:
+ * zone The zone we will warn about
+ * warning Warning content
+ *
+ * Returns:
+ * Nothing
+ */
+void uma_zone_set_warning(uma_zone_t zone, const char *warning);
+
+/*
* Obtains the approximate current number of items allocated from a zone
*
* Arguments:
@@ -571,11 +583,11 @@ void uma_prealloc(uma_zone_t zone, int itemcnt);
* the underlying slab header.
*
* Arguments:
- * zone The UMA_ZONE_REFCNT zone to which the item belongs.
+ * zone The UMA_ZONE_REFCNT zone to which the item belongs.
* item The address of the item for which we want a refcnt.
*
* Returns:
- * A pointer to a u_int32_t reference counter.
+ * A pointer to a u_int32_t reference counter.
*/
u_int32_t *uma_find_refcnt(uma_zone_t zone, void *item);
@@ -586,7 +598,7 @@ u_int32_t *uma_find_refcnt(uma_zone_t zone, void *item);
* zone The zone to check
*
* Returns:
- * Non-zero if zone is exhausted.
+ * Non-zero if zone is exhausted.
*/
int uma_zone_exhausted(uma_zone_t zone);
int uma_zone_exhausted_nolock(uma_zone_t zone);
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index e58a86f..36a149e 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -265,6 +265,11 @@ SYSCTL_PROC(_vm, OID_AUTO, zone_count, CTLFLAG_RD|CTLTYPE_INT,
SYSCTL_PROC(_vm, OID_AUTO, zone_stats, CTLFLAG_RD|CTLTYPE_STRUCT,
0, 0, sysctl_vm_zone_stats, "s,struct uma_type_header", "Zone Stats");
+static int zone_warnings = 1;
+TUNABLE_INT("vm.zone_warnings", &zone_warnings);
+SYSCTL_INT(_vm, OID_AUTO, zone_warnings, CTLFLAG_RW, &zone_warnings, 0,
+ "Warn when UMA zones becomes full");
+
/*
* This routine checks to see whether or not it's safe to enable buckets.
*/
@@ -363,6 +368,18 @@ bucket_zone_drain(void)
zone_drain(ubz->ubz_zone);
}
+static void
+zone_log_warning(uma_zone_t zone)
+{
+ static const struct timeval warninterval = { 300, 0 };
+
+ if (!zone_warnings || zone->uz_warning == NULL)
+ return;
+
+ if (ratecheck(&zone->uz_ratecheck, &warninterval))
+ printf("[zone: %s] %s\n", zone->uz_name, zone->uz_warning);
+}
+
static inline uma_keg_t
zone_first_keg(uma_zone_t zone)
{
@@ -1432,6 +1449,8 @@ zone_ctor(void *mem, int size, void *udata, int flags)
zone->uz_sleeps = 0;
zone->uz_fills = zone->uz_count = 0;
zone->uz_flags = 0;
+ zone->uz_warning = NULL;
+ timevalclear(&zone->uz_ratecheck);
keg = arg->keg;
if (arg->flags & UMA_ZONE_SECONDARY) {
@@ -2191,8 +2210,10 @@ keg_fetch_slab(uma_keg_t keg, uma_zone_t zone, int flags)
* If this is not a multi-zone, set the FULL bit.
* Otherwise slab_multi() takes care of it.
*/
- if ((zone->uz_flags & UMA_ZFLAG_MULTI) == 0)
+ if ((zone->uz_flags & UMA_ZFLAG_MULTI) == 0) {
zone->uz_flags |= UMA_ZFLAG_FULL;
+ zone_log_warning(zone);
+ }
if (flags & M_NOWAIT)
break;
zone->uz_sleeps++;
@@ -2339,6 +2360,7 @@ zone_fetch_slab_multi(uma_zone_t zone, uma_keg_t last, int rflags)
if (full && !empty) {
zone->uz_flags |= UMA_ZFLAG_FULL;
zone->uz_sleeps++;
+ zone_log_warning(zone);
msleep(zone, zone->uz_lock, PVM, "zonelimit", hz/100);
zone->uz_flags &= ~UMA_ZFLAG_FULL;
continue;
@@ -2881,6 +2903,16 @@ uma_zone_get_max(uma_zone_t zone)
}
/* See uma.h */
+void
+uma_zone_set_warning(uma_zone_t zone, const char *warning)
+{
+
+ ZONE_LOCK(zone);
+ zone->uz_warning = warning;
+ ZONE_UNLOCK(zone);
+}
+
+/* See uma.h */
int
uma_zone_get_cur(uma_zone_t zone)
{
diff --git a/sys/vm/uma_int.h b/sys/vm/uma_int.h
index d9d5394..aaec926 100644
--- a/sys/vm/uma_int.h
+++ b/sys/vm/uma_int.h
@@ -329,7 +329,11 @@ struct uma_zone {
u_int64_t uz_fails; /* Total number of alloc failures */
u_int64_t uz_sleeps; /* Total number of alloc sleeps */
uint16_t uz_fills; /* Outstanding bucket fills */
- uint16_t uz_count; /* Highest value ub_ptr can have */
+ uint16_t uz_count; /* Highest amount of items in bucket */
+
+ /* The next three fields are used to print a rate-limited warnings. */
+ const char *uz_warning; /* Warning to print on failure */
+ struct timeval uz_ratecheck; /* Warnings rate-limiting */
/*
* This HAS to be the last item because we adjust the zone size
diff --git a/sys/vm/vm.h b/sys/vm/vm.h
index 241a225..132c10e 100644
--- a/sys/vm/vm.h
+++ b/sys/vm/vm.h
@@ -141,6 +141,8 @@ struct kva_md_info {
extern struct kva_md_info kmi;
extern void vm_ksubmap_init(struct kva_md_info *);
+extern int old_mlock;
+
struct ucred;
int swap_reserve(vm_ooffset_t incr);
int swap_reserve_by_cred(vm_ooffset_t incr, struct ucred *cred);
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index 516138af..6865782 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -968,8 +968,8 @@ vm_fault_cache_behind(const struct faultstate *fs, int distance)
VM_OBJECT_LOCK(object);
}
}
- if (first_object->type != OBJT_DEVICE &&
- first_object->type != OBJT_PHYS && first_object->type != OBJT_SG) {
+ /* Neither fictitious nor unmanaged pages can be cached. */
+ if ((first_object->flags & (OBJ_FICTITIOUS | OBJ_UNMANAGED)) == 0) {
if (fs->first_pindex < distance)
pindex = 0;
else
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 4ed0691..f87e5b9 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -2324,8 +2324,8 @@ done:
*/
vm_fault_unwire(map, entry->start, entry->end,
entry->object.vm_object != NULL &&
- (entry->object.vm_object->type == OBJT_DEVICE ||
- entry->object.vm_object->type == OBJT_SG));
+ (entry->object.vm_object->flags &
+ OBJ_FICTITIOUS) != 0);
}
}
KASSERT(entry->eflags & MAP_ENTRY_IN_TRANSITION,
@@ -2445,8 +2445,8 @@ vm_map_wire(vm_map_t map, vm_offset_t start, vm_offset_t end,
saved_start = entry->start;
saved_end = entry->end;
fictitious = entry->object.vm_object != NULL &&
- (entry->object.vm_object->type == OBJT_DEVICE ||
- entry->object.vm_object->type == OBJT_SG);
+ (entry->object.vm_object->flags &
+ OBJ_FICTITIOUS) != 0;
/*
* Release the map lock, relying on the in-transition
* mark. Mark the map busy for fork.
@@ -2544,8 +2544,8 @@ done:
*/
vm_fault_unwire(map, entry->start, entry->end,
entry->object.vm_object != NULL &&
- (entry->object.vm_object->type == OBJT_DEVICE ||
- entry->object.vm_object->type == OBJT_SG));
+ (entry->object.vm_object->flags &
+ OBJ_FICTITIOUS) != 0);
}
}
next_entry_done:
@@ -2681,8 +2681,7 @@ vm_map_entry_unwire(vm_map_t map, vm_map_entry_t entry)
{
vm_fault_unwire(map, entry->start, entry->end,
entry->object.vm_object != NULL &&
- (entry->object.vm_object->type == OBJT_DEVICE ||
- entry->object.vm_object->type == OBJT_SG));
+ (entry->object.vm_object->flags & OBJ_FICTITIOUS) != 0);
entry->wired_count = 0;
}
@@ -3248,7 +3247,7 @@ vm_map_stack(vm_map_t map, vm_offset_t addrbos, vm_size_t max_ssize,
vm_offset_t bot, top;
vm_size_t growsize, init_ssize;
int orient, rv;
- rlim_t vmemlim;
+ rlim_t lmemlim, vmemlim;
/*
* The stack orientation is piggybacked with the cow argument.
@@ -3268,9 +3267,10 @@ vm_map_stack(vm_map_t map, vm_offset_t addrbos, vm_size_t max_ssize,
growsize = sgrowsiz;
init_ssize = (max_ssize < growsize) ? max_ssize : growsize;
- PROC_LOCK(curthread->td_proc);
- vmemlim = lim_cur(curthread->td_proc, RLIMIT_VMEM);
- PROC_UNLOCK(curthread->td_proc);
+ PROC_LOCK(curproc);
+ lmemlim = lim_cur(curproc, RLIMIT_MEMLOCK);
+ vmemlim = lim_cur(curproc, RLIMIT_VMEM);
+ PROC_UNLOCK(curproc);
vm_map_lock(map);
@@ -3280,6 +3280,14 @@ vm_map_stack(vm_map_t map, vm_offset_t addrbos, vm_size_t max_ssize,
return (KERN_NO_SPACE);
}
+ if (!old_mlock && map->flags & MAP_WIREFUTURE) {
+ if (ptoa(vmspace_wired_count(curproc->p_vmspace)) +
+ init_ssize > lmemlim) {
+ vm_map_unlock(map);
+ return (KERN_NO_SPACE);
+ }
+ }
+
/* If we would blow our VMEM resource limit, no go */
if (map->size + init_ssize > vmemlim) {
vm_map_unlock(map);
@@ -3361,7 +3369,7 @@ vm_map_growstack(struct proc *p, vm_offset_t addr)
vm_offset_t end;
vm_size_t growsize;
size_t grow_amount, max_grow;
- rlim_t stacklim, vmemlim;
+ rlim_t lmemlim, stacklim, vmemlim;
int is_procstack, rv;
struct ucred *cred;
#ifdef notyet
@@ -3373,6 +3381,7 @@ vm_map_growstack(struct proc *p, vm_offset_t addr)
Retry:
PROC_LOCK(p);
+ lmemlim = lim_cur(p, RLIMIT_MEMLOCK);
stacklim = lim_cur(p, RLIMIT_STACK);
vmemlim = lim_cur(p, RLIMIT_VMEM);
PROC_UNLOCK(p);
@@ -3495,7 +3504,25 @@ Retry:
if (is_procstack && (ctob(vm->vm_ssize) + grow_amount > limit))
grow_amount = limit - ctob(vm->vm_ssize);
#endif
-
+ if (!old_mlock && map->flags & MAP_WIREFUTURE) {
+ if (ptoa(vmspace_wired_count(p->p_vmspace)) + grow_amount >
+ lmemlim) {
+ vm_map_unlock_read(map);
+ rv = KERN_NO_SPACE;
+ goto out;
+ }
+#ifdef RACCT
+ PROC_LOCK(p);
+ if (racct_set(p, RACCT_MEMLOCK,
+ ptoa(vmspace_wired_count(p->p_vmspace)) + grow_amount)) {
+ PROC_UNLOCK(p);
+ vm_map_unlock_read(map);
+ rv = KERN_NO_SPACE;
+ goto out;
+ }
+ PROC_UNLOCK(p);
+#endif
+ }
/* If we would blow our VMEM resource limit, no go */
if (map->size + grow_amount > vmemlim) {
vm_map_unlock_read(map);
@@ -3616,6 +3643,11 @@ out:
PROC_LOCK(p);
error = racct_set(p, RACCT_VMEM, map->size);
KASSERT(error == 0, ("decreasing RACCT_VMEM failed"));
+ if (!old_mlock) {
+ error = racct_set(p, RACCT_MEMLOCK,
+ ptoa(vmspace_wired_count(p->p_vmspace)));
+ KASSERT(error == 0, ("decreasing RACCT_MEMLOCK failed"));
+ }
error = racct_set(p, RACCT_STACK, ctob(vm->vm_ssize));
KASSERT(error == 0, ("decreasing RACCT_STACK failed"));
PROC_UNLOCK(p);
diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c
index 784bc61..b5bb0fa 100644
--- a/sys/vm/vm_meter.c
+++ b/sys/vm/vm_meter.c
@@ -200,7 +200,7 @@ vmtotal(SYSCTL_HANDLER_ARGS)
* synchronization should not impair the accuracy of
* the reported statistics.
*/
- if (object->type == OBJT_DEVICE || object->type == OBJT_SG) {
+ if ((object->flags & OBJ_FICTITIOUS) != 0) {
/*
* Devices, like /dev/mem, will badly skew our totals.
*/
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c
index 74b4ec2..16f331a 100644
--- a/sys/vm/vm_mmap.c
+++ b/sys/vm/vm_mmap.c
@@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$");
#include <sys/racct.h>
#include <sys/resource.h>
#include <sys/resourcevar.h>
+#include <sys/sysctl.h>
#include <sys/vnode.h>
#include <sys/fcntl.h>
#include <sys/file.h>
@@ -87,6 +88,11 @@ __FBSDID("$FreeBSD$");
#include <sys/pmckern.h>
#endif
+int old_mlock = 0;
+SYSCTL_INT(_vm, OID_AUTO, old_mlock, CTLFLAG_RW | CTLFLAG_TUN, &old_mlock, 0,
+ "Do not apply RLIMIT_MEMLOCK on mlockall");
+TUNABLE_INT("vm.old_mlock", &old_mlock);
+
#ifndef _SYS_SYSPROTO_H_
struct sbrk_args {
int incr;
@@ -1096,27 +1102,25 @@ sys_mlockall(td, uap)
int error;
map = &td->td_proc->p_vmspace->vm_map;
- error = 0;
+ error = priv_check(td, PRIV_VM_MLOCK);
+ if (error)
+ return (error);
if ((uap->how == 0) || ((uap->how & ~(MCL_CURRENT|MCL_FUTURE)) != 0))
return (EINVAL);
-#if 0
/*
* If wiring all pages in the process would cause it to exceed
* a hard resource limit, return ENOMEM.
*/
- PROC_LOCK(td->td_proc);
- if (map->size > lim_cur(td->td_proc, RLIMIT_MEMLOCK)) {
+ if (!old_mlock && uap->how & MCL_CURRENT) {
+ PROC_LOCK(td->td_proc);
+ if (map->size > lim_cur(td->td_proc, RLIMIT_MEMLOCK)) {
+ PROC_UNLOCK(td->td_proc);
+ return (ENOMEM);
+ }
PROC_UNLOCK(td->td_proc);
- return (ENOMEM);
}
- PROC_UNLOCK(td->td_proc);
-#else
- error = priv_check(td, PRIV_VM_MLOCK);
- if (error)
- return (error);
-#endif
#ifdef RACCT
PROC_LOCK(td->td_proc);
error = racct_set(td->td_proc, RACCT_MEMLOCK, map->size);
@@ -1480,6 +1484,24 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, vm_size_t size, vm_prot_t prot,
PROC_UNLOCK(td->td_proc);
return (ENOMEM);
}
+ if (!old_mlock && map->flags & MAP_WIREFUTURE) {
+ if (ptoa(vmspace_wired_count(td->td_proc->p_vmspace)) +
+ size > lim_cur(td->td_proc, RLIMIT_MEMLOCK)) {
+ racct_set_force(td->td_proc, RACCT_VMEM,
+ map->size);
+ PROC_UNLOCK(td->td_proc);
+ return (ENOMEM);
+ }
+ error = racct_set(td->td_proc, RACCT_MEMLOCK,
+ ptoa(vmspace_wired_count(td->td_proc->p_vmspace)) +
+ size);
+ if (error != 0) {
+ racct_set_force(td->td_proc, RACCT_VMEM,
+ map->size);
+ PROC_UNLOCK(td->td_proc);
+ return (error);
+ }
+ }
PROC_UNLOCK(td->td_proc);
}
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index f95ab54..32b0779 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -212,15 +212,35 @@ _vm_object_allocate(objtype_t type, vm_pindex_t size, vm_object_t object)
object->root = NULL;
object->type = type;
+ switch (type) {
+ case OBJT_DEAD:
+ panic("_vm_object_allocate: can't create OBJT_DEAD");
+ case OBJT_DEFAULT:
+ case OBJT_SWAP:
+ object->flags = OBJ_ONEMAPPING;
+ break;
+ case OBJT_DEVICE:
+ case OBJT_SG:
+ object->flags = OBJ_FICTITIOUS | OBJ_UNMANAGED;
+ break;
+ case OBJT_MGTDEVICE:
+ object->flags = OBJ_FICTITIOUS;
+ break;
+ case OBJT_PHYS:
+ object->flags = OBJ_UNMANAGED;
+ break;
+ case OBJT_VNODE:
+ object->flags = 0;
+ break;
+ default:
+ panic("_vm_object_allocate: type %d is undefined", type);
+ }
object->size = size;
object->generation = 1;
object->ref_count = 1;
object->memattr = VM_MEMATTR_DEFAULT;
- object->flags = 0;
object->cred = NULL;
object->charge = 0;
- if ((object->type == OBJT_DEFAULT) || (object->type == OBJT_SWAP))
- object->flags = OBJ_ONEMAPPING;
object->pg_color = 0;
object->handle = NULL;
object->backing_object = NULL;
@@ -1064,7 +1084,7 @@ shadowlookup:
(tobject->flags & OBJ_ONEMAPPING) == 0) {
goto unlock_tobject;
}
- } else if (tobject->type == OBJT_PHYS)
+ } else if ((tobject->flags & OBJ_UNMANAGED) != 0)
goto unlock_tobject;
m = vm_page_lookup(tobject, tpindex);
if (m == NULL && advise == MADV_WILLNEED) {
@@ -1834,7 +1854,7 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t start, vm_pindex_t end,
int wirings;
VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
- KASSERT((object->type != OBJT_DEVICE && object->type != OBJT_PHYS) ||
+ KASSERT((object->flags & OBJ_UNMANAGED) == 0 ||
(options & (OBJPR_CLEANONLY | OBJPR_NOTMAPPED)) == OBJPR_NOTMAPPED,
("vm_object_page_remove: illegal options for object %p", object));
if (object->resident_page_count == 0)
@@ -1918,7 +1938,7 @@ skipmemq:
* pages are moved to the cache queue.
*
* This operation should only be performed on objects that
- * contain managed pages.
+ * contain non-fictitious, managed pages.
*
* The object must be locked.
*/
@@ -1929,8 +1949,7 @@ vm_object_page_cache(vm_object_t object, vm_pindex_t start, vm_pindex_t end)
vm_page_t p, next;
VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
- KASSERT((object->type != OBJT_DEVICE && object->type != OBJT_SG &&
- object->type != OBJT_PHYS),
+ KASSERT((object->flags & (OBJ_FICTITIOUS | OBJ_UNMANAGED)) == 0,
("vm_object_page_cache: illegal object %p", object));
if (object->resident_page_count == 0)
return;
diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h
index daafd03..b584239 100644
--- a/sys/vm/vm_object.h
+++ b/sys/vm/vm_object.h
@@ -165,6 +165,8 @@ struct vm_object {
/*
* Flags
*/
+#define OBJ_FICTITIOUS 0x0001 /* (c) contains fictitious pages */
+#define OBJ_UNMANAGED 0x0002 /* (c) contains unmanaged pages */
#define OBJ_ACTIVE 0x0004 /* active objects */
#define OBJ_DEAD 0x0008 /* dead objects (during rundown) */
#define OBJ_NOSPLIT 0x0010 /* dont split this object */
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index ecd86de..c952c05 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -1414,9 +1414,8 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req)
mtx_unlock(&vm_page_queue_free_mtx);
return (NULL);
#if VM_NRESERVLEVEL > 0
- } else if (object == NULL || object->type == OBJT_DEVICE ||
- object->type == OBJT_SG ||
- (object->flags & OBJ_COLORED) == 0 ||
+ } else if (object == NULL || (object->flags & (OBJ_COLORED |
+ OBJ_FICTITIOUS)) != OBJ_COLORED ||
(m = vm_reserv_alloc_page(object, pindex)) == NULL) {
#else
} else {
@@ -1491,10 +1490,8 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req)
m->flags = flags;
mtx_unlock(&vm_page_queue_free_mtx);
m->aflags = 0;
- if (object == NULL || object->type == OBJT_PHYS)
- m->oflags = VPO_UNMANAGED;
- else
- m->oflags = 0;
+ m->oflags = object == NULL || (object->flags & OBJ_UNMANAGED) != 0 ?
+ VPO_UNMANAGED : 0;
if ((req & (VM_ALLOC_NOBUSY | VM_ALLOC_NOOBJ)) == 0)
m->oflags |= VPO_BUSY;
if (req & VM_ALLOC_WIRED) {
@@ -1510,7 +1507,7 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req)
if (object != NULL) {
/* Ignore device objects; the pager sets "memattr" for them. */
if (object->memattr != VM_MEMATTR_DEFAULT &&
- object->type != OBJT_DEVICE && object->type != OBJT_SG)
+ (object->flags & OBJ_FICTITIOUS) == 0)
pmap_page_set_memattr(m, object->memattr);
vm_page_insert(m, object, pindex);
} else
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 610f6e0..b5e9747 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -705,14 +705,14 @@ vm_pageout_object_deactivate_pages(pmap_t pmap, vm_object_t first_object,
int actcount, remove_mode;
VM_OBJECT_LOCK_ASSERT(first_object, MA_OWNED);
- if (first_object->type == OBJT_DEVICE ||
- first_object->type == OBJT_SG)
+ if ((first_object->flags & OBJ_FICTITIOUS) != 0)
return;
for (object = first_object;; object = backing_object) {
if (pmap_resident_count(pmap) <= desired)
goto unlock_return;
VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
- if (object->type == OBJT_PHYS || object->paging_in_progress)
+ if ((object->flags & OBJ_UNMANAGED) != 0 ||
+ object->paging_in_progress != 0)
goto unlock_return;
remove_mode = 0;
diff --git a/sys/vm/vm_unix.c b/sys/vm/vm_unix.c
index 253ab77..d6da08b 100644
--- a/sys/vm/vm_unix.c
+++ b/sys/vm/vm_unix.c
@@ -77,13 +77,14 @@ sys_obreak(td, uap)
{
struct vmspace *vm = td->td_proc->p_vmspace;
vm_offset_t new, old, base;
- rlim_t datalim, vmemlim;
+ rlim_t datalim, lmemlim, vmemlim;
int prot, rv;
int error = 0;
boolean_t do_map_wirefuture;
PROC_LOCK(td->td_proc);
datalim = lim_cur(td->td_proc, RLIMIT_DATA);
+ lmemlim = lim_cur(td->td_proc, RLIMIT_MEMLOCK);
vmemlim = lim_cur(td->td_proc, RLIMIT_VMEM);
PROC_UNLOCK(td->td_proc);
@@ -116,6 +117,13 @@ sys_obreak(td, uap)
goto done;
}
if (new > old) {
+ if (!old_mlock && vm->vm_map.flags & MAP_WIREFUTURE) {
+ if (ptoa(vmspace_wired_count(td->td_proc->p_vmspace)) +
+ (new - old) > lmemlim) {
+ error = ENOMEM;
+ goto done;
+ }
+ }
if (vm->vm_map.size + (new - old) > vmemlim) {
error = ENOMEM;
goto done;
@@ -136,6 +144,20 @@ sys_obreak(td, uap)
error = ENOMEM;
goto done;
}
+ if (!old_mlock && vm->vm_map.flags & MAP_WIREFUTURE) {
+ error = racct_set(td->td_proc, RACCT_MEMLOCK,
+ ptoa(vmspace_wired_count(td->td_proc->p_vmspace)) +
+ (new - old));
+ if (error != 0) {
+ racct_set_force(td->td_proc, RACCT_DATA,
+ old - base);
+ racct_set_force(td->td_proc, RACCT_VMEM,
+ vm->vm_map.size);
+ PROC_UNLOCK(td->td_proc);
+ error = ENOMEM;
+ goto done;
+ }
+ }
PROC_UNLOCK(td->td_proc);
#endif
prot = VM_PROT_RW;
@@ -152,6 +174,11 @@ sys_obreak(td, uap)
PROC_LOCK(td->td_proc);
racct_set_force(td->td_proc, RACCT_DATA, old - base);
racct_set_force(td->td_proc, RACCT_VMEM, vm->vm_map.size);
+ if (!old_mlock && vm->vm_map.flags & MAP_WIREFUTURE) {
+ racct_set_force(td->td_proc, RACCT_MEMLOCK,
+ ptoa(vmspace_wired_count(
+ td->td_proc->p_vmspace)));
+ }
PROC_UNLOCK(td->td_proc);
#endif
error = ENOMEM;
@@ -183,6 +210,10 @@ sys_obreak(td, uap)
PROC_LOCK(td->td_proc);
racct_set_force(td->td_proc, RACCT_DATA, new - base);
racct_set_force(td->td_proc, RACCT_VMEM, vm->vm_map.size);
+ if (!old_mlock && vm->vm_map.flags & MAP_WIREFUTURE) {
+ racct_set_force(td->td_proc, RACCT_MEMLOCK,
+ ptoa(vmspace_wired_count(td->td_proc->p_vmspace)));
+ }
PROC_UNLOCK(td->td_proc);
#endif
}
diff --git a/sys/x86/include/bus.h b/sys/x86/include/bus.h
index 34ab4f2..4efc172 100644
--- a/sys/x86/include/bus.h
+++ b/sys/x86/include/bus.h
@@ -130,6 +130,7 @@
#define BUS_SPACE_MAXADDR 0xFFFFFFFF
#endif
+#define BUS_SPACE_INVALID_DATA (~0)
#define BUS_SPACE_UNRESTRICTED (~0)
/*
@@ -221,6 +222,12 @@ static __inline u_int32_t bus_space_read_4(bus_space_tag_t tag,
bus_space_handle_t handle,
bus_size_t offset);
+#ifdef __amd64__
+static __inline uint64_t bus_space_read_8(bus_space_tag_t tag,
+ bus_space_handle_t handle,
+ bus_size_t offset);
+#endif
+
static __inline u_int8_t
bus_space_read_1(bus_space_tag_t tag, bus_space_handle_t handle,
bus_size_t offset)
@@ -251,8 +258,16 @@ bus_space_read_4(bus_space_tag_t tag, bus_space_handle_t handle,
return (*(volatile u_int32_t *)(handle + offset));
}
-#if 0 /* Cause a link error for bus_space_read_8 */
-#define bus_space_read_8(t, h, o) !!! bus_space_read_8 unimplemented !!!
+#ifdef __amd64__
+static __inline uint64_t
+bus_space_read_8(bus_space_tag_t tag, bus_space_handle_t handle,
+ bus_size_t offset)
+{
+
+ if (tag == X86_BUS_SPACE_IO) /* No 8 byte IO space access on x86 */
+ return (BUS_SPACE_INVALID_DATA);
+ return (*(volatile uint64_t *)(handle + offset));
+}
#endif
/*
@@ -491,6 +506,12 @@ static __inline void bus_space_write_4(bus_space_tag_t tag,
bus_space_handle_t bsh,
bus_size_t offset, u_int32_t value);
+#ifdef __amd64__
+static __inline void bus_space_write_8(bus_space_tag_t tag,
+ bus_space_handle_t bsh,
+ bus_size_t offset, uint64_t value);
+#endif
+
static __inline void
bus_space_write_1(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, u_int8_t value)
@@ -524,8 +545,17 @@ bus_space_write_4(bus_space_tag_t tag, bus_space_handle_t bsh,
*(volatile u_int32_t *)(bsh + offset) = value;
}
-#if 0 /* Cause a link error for bus_space_write_8 */
-#define bus_space_write_8 !!! bus_space_write_8 not implemented !!!
+#ifdef __amd64__
+static __inline void
+bus_space_write_8(bus_space_tag_t tag, bus_space_handle_t bsh,
+ bus_size_t offset, uint64_t value)
+{
+
+ if (tag == X86_BUS_SPACE_IO) /* No 8 byte IO space access on x86 */
+ return;
+ else
+ *(volatile uint64_t *)(bsh + offset) = value;
+}
#endif
/*
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index 311d917..8377ab1 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -3688,6 +3688,7 @@ OLD_FILES+=usr/sbin/pkg
.endif
.if ${MK_PKGTOOLS} == no
+OLD_FILES+=etc/periodic/daily/220.backup-pkgdb
OLD_FILES+=etc/periodic/daily/490.status-pkg-changes
OLD_FILES+=etc/periodic/security/460.chkportsum
OLD_FILES+=etc/periodic/weekly/400.status-pkg
diff --git a/tools/debugscripts/dot.gdbinit b/tools/debugscripts/dot.gdbinit
index e57ac16..1a340c0 100644
--- a/tools/debugscripts/dot.gdbinit
+++ b/tools/debugscripts/dot.gdbinit
@@ -36,16 +36,16 @@ target remote $arg0
end
document tr
-Debug a remote system via serial or firewire interface. For example, specify 'tr /dev/cuad0' to use first serial port, or 'tr localhost:5556' for default firewire port. See also tr0, tr1 and trf commands.
+Debug a remote system via serial or firewire interface. For example, specify 'tr /dev/cuau0' to use first serial port, or 'tr localhost:5556' for default firewire port. See also tr0, tr1 and trf commands.
end
# Convenience functions. These call tr.
-# debug via cuad0
+# debug via cuau0
define tr0
-tr /dev/cuad0
+tr /dev/cuau0
end
define tr1
-tr /dev/cuad1
+tr /dev/cuau1
end
# Firewire
define trf
@@ -53,10 +53,10 @@ tr localhost:5556
end
document tr0
-Debug a remote system via serial interface /dev/cuad0. See also tr, tr1 and trf commands.
+Debug a remote system via serial interface /dev/cuau0. See also tr, tr1 and trf commands.
end
document tr1
-Debug a remote system via serial interface /dev/cuad1. See also tr, tr0 and trf commands.
+Debug a remote system via serial interface /dev/cuau1. See also tr, tr0 and trf commands.
end
document trf
Debug a remote system via firewire interface at default port 5556. See also tr, tr0 and tr1 commands.
@@ -107,7 +107,7 @@ source gdbinit.kernel
source gdbinit.machine
echo Ready to go. Enter 'tr' to connect to the remote target\n
-echo with /dev/cuad0, 'tr /dev/cuad1' to connect to a different port\n
+echo with /dev/cuau0, 'tr /dev/cuau1' to connect to a different port\n
echo or 'trf portno' to connect to the remote target with the firewire\n
echo interface. portno defaults to 5556.\n
echo \n
diff --git a/tools/regression/bin/sh/errors/write-error1.0 b/tools/regression/bin/sh/errors/write-error1.0
new file mode 100644
index 0000000..fcb52e7
--- /dev/null
+++ b/tools/regression/bin/sh/errors/write-error1.0
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+! echo >&- 2>/dev/null
diff --git a/tools/regression/lib/libc/stdio/test-perror.c b/tools/regression/lib/libc/stdio/test-perror.c
index 992b734..24aca89 100644
--- a/tools/regression/lib/libc/stdio/test-perror.c
+++ b/tools/regression/lib/libc/stdio/test-perror.c
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
static void cleanup(void);
static char tmpfil[PATH_MAX];
diff --git a/tools/regression/usr.bin/printf/regress.sh b/tools/regression/usr.bin/printf/regress.sh
index 4ce282f..3f7f9aa 100644
--- a/tools/regression/usr.bin/printf/regress.sh
+++ b/tools/regression/usr.bin/printf/regress.sh
@@ -2,7 +2,7 @@
REGRESSION_START($1)
-echo '1..11'
+echo '1..12'
REGRESSION_TEST(`b', `printf "abc%b%b" "def\n" "\cghi"')
REGRESSION_TEST(`d', `printf "%d,%5d,%.5d,%0*d,%.*d\n" 123 123 123 5 123 5 123')
@@ -15,5 +15,9 @@ REGRESSION_TEST(`m3', `printf "%%%s\n" abc def ghi jkl')
REGRESSION_TEST(`m4', `printf "%d,%f,%c,%s\n"')
REGRESSION_TEST(`m5', `printf -- "-d\n"')
REGRESSION_TEST(`s', `printf "%.3s,%-5s\n" abcd abc')
+REGRESSION_TEST('zero', `printf "%u%u\n" 15')
+REGRESSION_TEST('zero', `printf "%d%d\n" 15')
+REGRESSION_TEST('zero', `printf "%d%u\n" 15')
+REGRESSION_TEST('zero', `printf "%u%d\n" 15')
REGRESSION_END()
diff --git a/tools/regression/usr.bin/printf/regress.zero.out b/tools/regression/usr.bin/printf/regress.zero.out
new file mode 100644
index 0000000..fa8f08c
--- /dev/null
+++ b/tools/regression/usr.bin/printf/regress.zero.out
@@ -0,0 +1 @@
+150
diff --git a/tools/test/ppsapi/Makefile b/tools/test/ppsapi/Makefile
index f0110ed..5c4a065 100644
--- a/tools/test/ppsapi/Makefile
+++ b/tools/test/ppsapi/Makefile
@@ -8,4 +8,4 @@ WARNS?= 5
.include <bsd.prog.mk>
test: ${PROG}
- ./${PROG} /dev/cuad0
+ ./${PROG} /dev/cuau0
diff --git a/tools/test/ppsapi/README b/tools/test/ppsapi/README
index ad8dacf..ea0c3e8 100644
--- a/tools/test/ppsapi/README
+++ b/tools/test/ppsapi/README
@@ -16,7 +16,7 @@ Options:
The output looks like:
-# ./ppsapitest -C /dev/cuad4
+# ./ppsapitest -C /dev/cuau4
1070915603 .703680117 119 1070915940 .902275676 121
1070915941 .703657317 120 1070915941 .902327516 122
1070915942 .703657077 121 1070915942 .902367957 123
@@ -36,7 +36,7 @@ Columns:
(If the -C option had not been specified, twice as many lines would
be output:
-# ./ppsapitest /dev/cuad4
+# ./ppsapitest /dev/cuau4
1070916432 .703624557 125 1070915945 .902527078 126
1070916432 .703624557 125 1070916432 .902303156 127
1070916433 .703624557 126 1070916432 .902303156 127
diff --git a/tools/tools/ath/Makefile b/tools/tools/ath/Makefile
index 0faadbf..c4c81ba 100644
--- a/tools/tools/ath/Makefile
+++ b/tools/tools/ath/Makefile
@@ -3,6 +3,6 @@
SUBDIR= arcode athdebug athdecode athkey athpoke athprom athrd athregs
SUBDIR+= athstats ath_prom_read athradar athaggrstats
SUBDIR+= ath_ee_v14_print ath_ee_v4k_print ath_ee_9287_print
-SUBDIR+= athsurvey athratestats
+SUBDIR+= athsurvey athratestats athspectral
.include <bsd.subdir.mk>
diff --git a/tools/tools/ath/arcode/arcode.c b/tools/tools/ath/arcode/arcode.c
index 31e02cd..463b954 100644
--- a/tools/tools/ath/arcode/arcode.c
+++ b/tools/tools/ath/arcode/arcode.c
@@ -106,7 +106,7 @@ main(int argc, const char *argv[])
op_mark(&a);
break;
default:
- printf("op: %s; reg: %x; val: %x\n",
+ printf("op: %d; reg: 0x%x; val: 0x%x\n",
a.op, a.reg, a.val);
}
}
diff --git a/tools/tools/ath/ath_prom_read/ath_prom_read.c b/tools/tools/ath/ath_prom_read/ath_prom_read.c
index f123aaa..3111021 100644
--- a/tools/tools/ath/ath_prom_read/ath_prom_read.c
+++ b/tools/tools/ath/ath_prom_read/ath_prom_read.c
@@ -123,7 +123,7 @@ main(int argc, char *argv[])
atd.ad_out_data = (caddr_t) eep;
atd.ad_out_size = sizeof(eep);
if (ioctl(s, SIOCGATHDIAG, &atd) < 0)
- err(1, atd.ad_name);
+ err(1, "ioctl: %s", atd.ad_name);
/* Dump file? Then just write to it */
if (dumpname != NULL) {
diff --git a/tools/tools/ath/athdebug/athdebug.c b/tools/tools/ath/athdebug/athdebug.c
index 4f8f7c8..b118939 100644
--- a/tools/tools/ath/athdebug/athdebug.c
+++ b/tools/tools/ath/athdebug/athdebug.c
@@ -206,20 +206,20 @@ main(int argc, char *argv[])
bit = strtoul(cp, NULL, 0);
else
errx(1, "unknown flag %.*s",
- tp-cp, cp);
+ (int) (tp-cp), cp);
}
ndebug = bit;
}
} while (*(cp = tp) != '\0');
}
if (debug != ndebug) {
- printf("%s: 0x%x => ", oid, debug);
+ printf("%s: 0x%llx => ", oid, (long long) debug);
if (sysctlbyname(oid, NULL, NULL, &ndebug, sizeof(ndebug)) < 0)
err(1, "sysctl-set(%s)", oid);
- printf("0x%x", ndebug);
+ printf("0x%llx", (long long) ndebug);
debug = ndebug;
} else
- printf("%s: 0x%x", oid, debug);
+ printf("%s: 0x%llx", oid, (long long) debug);
sep = "<";
for (i = 0; i < N(flags); i++)
if (debug & flags[i].bit) {
diff --git a/tools/tools/ath/athdecode/main.c b/tools/tools/ath/athdecode/main.c
index 1ab5c6d..701f835 100644
--- a/tools/tools/ath/athdecode/main.c
+++ b/tools/tools/ath/athdecode/main.c
@@ -69,7 +69,7 @@ main(int argc, char *argv[])
filename = argv[1];
fd = open(filename, O_RDONLY);
if (fd < 0)
- err(1, filename);
+ err(1, "open: %s", filename);
if (fstat(fd, &sb) < 0)
err(1, "fstat");
addr = mmap(0, sb.st_size, PROT_READ, MAP_PRIVATE|MAP_NOCORE, fd, 0);
@@ -192,6 +192,7 @@ opmark(FILE *fd, int i, const struct athregrec *r)
fprintf(fd, "mark #%u value %u/0x%x", r->reg, r->val, r->val);
break;
}
+ exit(0);
}
#include "ah_devid.h"
@@ -302,8 +303,8 @@ register_regs(struct dumpreg *chipregs, u_int nchipregs,
*/
if (nr->addr == r->addr &&
(nr->name == r->name ||
- nr->name != NULL && r->name != NULL &&
- strcmp(nr->name, r->name) == 0)) {
+ (nr->name != NULL && r->name != NULL &&
+ strcmp(nr->name, r->name) == 0))) {
if (nr->srevMin < r->srevMin &&
(r->srevMin <= nr->srevMax &&
nr->srevMax+1 <= r->srevMax)) {
diff --git a/tools/tools/ath/athkey/athkey.c b/tools/tools/ath/athkey/athkey.c
index d254105..7604e4e 100644
--- a/tools/tools/ath/athkey/athkey.c
+++ b/tools/tools/ath/athkey/athkey.c
@@ -83,8 +83,8 @@ getdata(const char *arg, u_int8_t *data, size_t maxlen)
}
if (len > maxlen) {
fprintf(stderr,
- "%s: too much data in %s, max %u bytes\n",
- progname, arg, maxlen);
+ "%s: too much data in %s, max %llu bytes\n",
+ progname, arg, (unsigned long long) maxlen);
}
data[len++] = (b0<<4) | b1;
}
@@ -178,7 +178,7 @@ main(int argc, char *argv[])
atd.ad_in_data = (caddr_t) &keyix;
atd.ad_in_size = sizeof(u_int16_t);
if (ioctl(s, SIOCGATHDIAG, &atd) < 0)
- err(1, atd.ad_name);
+ err(1, "ioctl: %s", atd.ad_name);
return 0;
case HAL_DIAG_SETKEY:
if (argc != 3 && argc != 4)
@@ -196,7 +196,7 @@ main(int argc, char *argv[])
atd.ad_in_data = (caddr_t) &setkey;
atd.ad_in_size = sizeof(setkey);
if (ioctl(s, SIOCGATHDIAG, &atd) < 0)
- err(1, atd.ad_name);
+ err(1, "ioctl: %s", atd.ad_name);
return 0;
}
return -1;
diff --git a/tools/tools/ath/athprom/athprom.c b/tools/tools/ath/athprom/athprom.c
index 6f2b32b..e295fd1 100644
--- a/tools/tools/ath/athprom/athprom.c
+++ b/tools/tools/ath/athprom/athprom.c
@@ -159,7 +159,7 @@ main(int argc, char *argv[])
atd.ad_out_data = (caddr_t) &eep;
atd.ad_out_size = sizeof(eep);
if (ioctl(s, SIOCGATHDIAG, &atd) < 0)
- err(1, atd.ad_name);
+ err(1, "ioctl: %s", atd.ad_name);
if (fd == NULL) {
fd = opentemplate(DIR_TEMPLATE);
if (fd == NULL)
@@ -186,7 +186,7 @@ eeread(u_int16_t off)
atd.ad_out_size = sizeof(eedata);
atd.ad_out_data = (caddr_t) &eedata;
if (ioctl(s, SIOCGATHDIAG, &atd) < 0)
- err(1, atd.ad_name);
+ err(1, "ioctl: %s", atd.ad_name);
return eedata;
}
@@ -204,7 +204,7 @@ eewrite(uint16_t off, uint16_t value)
atd.ad_out_size = 0;
atd.ad_out_data = NULL;
if (ioctl(s, SIOCGATHDIAG, &atd) < 0)
- err(1, atd.ad_name);
+ err(1, "ioctl: %s", atd.ad_name);
}
#define MAXID 128
@@ -332,7 +332,7 @@ setmode(int mode)
+ sizeof(EXPN_DATA_PER_CHANNEL_5112) * exp->numChannels;
atd.ad_out_data = (caddr_t) malloc(atd.ad_out_size);
if (ioctl(s, SIOCGATHDIAG, &atd) < 0)
- err(1, atd.ad_name);
+ err(1, "ioctl: %s", atd.ad_name);
exp->pChannels = (void *) atd.ad_out_data;
exp->pDataPerChannel = (void *)((char *)atd.ad_out_data +
roundup(sizeof(u_int16_t) * exp->numChannels, sizeof(u_int32_t)));
diff --git a/tools/tools/ath/athratestats/main.c b/tools/tools/ath/athratestats/main.c
index 4203c9b..8d146ca 100644
--- a/tools/tools/ath/athratestats/main.c
+++ b/tools/tools/ath/athratestats/main.c
@@ -118,9 +118,9 @@ ath_sample_stats(struct ath_ratestats *r, struct ath_rateioctl_rt *rt,
uint32_t mask;
int rix, y;
- PRINTMSG("static_rix (%d) ratemask 0x%x\n",
+ PRINTMSG("static_rix (%d) ratemask 0x%llx\n",
sn->static_rix,
- sn->ratemask);
+ (long long) sn->ratemask);
for (y = 0; y < NUM_PACKET_SIZE_BINS; y++) {
PRINTATTR_ON(COLOR_PAIR(y+4) | A_BOLD);
@@ -203,7 +203,7 @@ ath_setifname(struct ath_ratestats *r, const char *ifname)
}
static void
-ath_setsta(struct ath_ratestats *r, const char *mac)
+ath_setsta(struct ath_ratestats *r, uint8_t *mac)
{
memcpy(&r->re.is_u.macaddr, mac, sizeof(r->re.is_u.macaddr));
@@ -224,7 +224,7 @@ rate_node_stats(struct ath_ratestats *r, struct ether_addr *e)
struct sample_node *sn = NULL;
struct ath_rateioctl_rt *rt = NULL;
int error = 0;
- uint8_t *buf = r->re.buf;
+ uint8_t *buf = (uint8_t *) r->re.buf;
/*
* For now, hard-code the TLV order and contents. Ew!
@@ -241,7 +241,7 @@ rate_node_stats(struct ath_ratestats *r, struct ether_addr *e)
fprintf(stderr, "unexpected TLV len (got %d bytes, "
"expected %d bytes\n",
av->tlv_len,
- sizeof(struct ath_rateioctl_rt));
+ (int) sizeof(struct ath_rateioctl_rt));
exit(127);
}
rt = (void *) (buf + sizeof(struct ath_rateioctl_tlv));
@@ -260,7 +260,7 @@ rate_node_stats(struct ath_ratestats *r, struct ether_addr *e)
fprintf(stderr, "unexpected TLV len (got %d bytes, "
"expected %d bytes\n",
av->tlv_len,
- sizeof(struct sample_node));
+ (int) sizeof(struct sample_node));
exit(127);
}
sn = (void *) (buf + sizeof(struct ath_rateioctl_tlv) +
@@ -268,6 +268,8 @@ rate_node_stats(struct ath_ratestats *r, struct ether_addr *e)
sizeof(struct ath_rateioctl_tlv));
ath_sample_stats(r, rt, sn);
+
+ return (0);
}
static void
@@ -353,7 +355,7 @@ main(int argc, char *argv[])
if (buf == NULL)
err(1, "calloc");
- r.re.buf = buf;
+ r.re.buf = (char *) buf;
r.re.len = STATS_BUF_SIZE;
r.s = socket(AF_INET, SOCK_DGRAM, 0);
diff --git a/tools/tools/ath/athspectral/Makefile b/tools/tools/ath/athspectral/Makefile
new file mode 100644
index 0000000..8aebde6
--- /dev/null
+++ b/tools/tools/ath/athspectral/Makefile
@@ -0,0 +1,16 @@
+# $FreeBSD$
+
+PROG= athspectral
+
+.include <../Makefile.inc>
+
+SRCS= athspectral.c
+SRCS+= opt_ah.h
+CLEANFILES+= opt_ah.h
+
+opt_ah.h:
+ echo "#define AH_DEBUG 1" > opt_ah.h
+ echo "#define AH_DEBUG_COUNTRY 1" >> opt_ah.h
+ echo "#define AH_SUPPORT_AR5416 1" >> opt_ah.h
+
+.include <bsd.prog.mk>
diff --git a/tools/tools/ath/athspectral/athspectral.c b/tools/tools/ath/athspectral/athspectral.c
new file mode 100644
index 0000000..8e6962a
--- /dev/null
+++ b/tools/tools/ath/athspectral/athspectral.c
@@ -0,0 +1,323 @@
+/*
+ * Copyright (c) 2013 Adrian Chadd <adrian@FreeBSD.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include "diag.h"
+
+#include "ah.h"
+#include "ah_internal.h"
+
+#ifndef ATH_DEFAULT
+#define ATH_DEFAULT "ath0"
+#endif
+
+#include <getopt.h>
+#include <errno.h>
+#include <err.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <unistd.h>
+
+struct spectralhandler {
+ struct ath_diag atd;
+ int s;
+ struct ifreq ifr;
+ int ah_devid;
+};
+
+int
+spectral_opendev(struct spectralhandler *spectral, const char *devid)
+{
+ HAL_REVS revs;
+
+ spectral->s = socket(AF_INET, SOCK_DGRAM, 0);
+ if (spectral->s < 0) {
+ warn("socket");
+ return 0;
+ }
+
+ strncpy(spectral->atd.ad_name, devid, sizeof (spectral->atd.ad_name));
+
+ /* Get the hardware revision, just to verify things are working */
+ spectral->atd.ad_id = HAL_DIAG_REVS;
+ spectral->atd.ad_out_data = (caddr_t) &revs;
+ spectral->atd.ad_out_size = sizeof(revs);
+ if (ioctl(spectral->s, SIOCGATHDIAG, &spectral->atd) < 0) {
+ warn(spectral->atd.ad_name);
+ return 0;
+ }
+ spectral->ah_devid = revs.ah_devid;
+ return 1;
+}
+
+void
+spectral_closedev(struct spectralhandler *spectral)
+{
+ close(spectral->s);
+ spectral->s = -1;
+}
+
+void
+spectralset(struct spectralhandler *spectral, int op, u_int32_t param)
+{
+ HAL_SPECTRAL_PARAM pe;
+
+ pe.ss_fft_period = HAL_SPECTRAL_PARAM_NOVAL;
+ pe.ss_period = HAL_SPECTRAL_PARAM_NOVAL;
+ pe.ss_count = HAL_SPECTRAL_PARAM_NOVAL;
+ pe.ss_short_report = HAL_SPECTRAL_PARAM_NOVAL;
+ pe.ss_spectral_pri = HAL_SPECTRAL_PARAM_NOVAL;
+ pe.ss_fft_period = HAL_SPECTRAL_PARAM_NOVAL;
+ pe.ss_enabled = HAL_SPECTRAL_PARAM_NOVAL;
+ pe.ss_active = HAL_SPECTRAL_PARAM_NOVAL;
+
+ switch (op) {
+ case SPECTRAL_PARAM_FFT_PERIOD:
+ pe.ss_fft_period = param;
+ break;
+ case SPECTRAL_PARAM_SS_PERIOD:
+ pe.ss_period = param;
+ break;
+ case SPECTRAL_PARAM_SS_COUNT:
+ pe.ss_count = param;
+ break;
+ case SPECTRAL_PARAM_SS_SHORT_RPT:
+ pe.ss_short_report = param;
+ break;
+ }
+
+ spectral->atd.ad_id = SPECTRAL_CONTROL_SET_PARAMS | ATH_DIAG_IN;
+ spectral->atd.ad_out_data = NULL;
+ spectral->atd.ad_out_size = 0;
+ spectral->atd.ad_in_data = (caddr_t) &pe;
+ spectral->atd.ad_in_size = sizeof(HAL_SPECTRAL_PARAM);
+ if (ioctl(spectral->s, SIOCGATHSPECTRAL, &spectral->atd) < 0)
+ err(1, spectral->atd.ad_name);
+}
+
+static void
+spectral_get(struct spectralhandler *spectral)
+{
+ HAL_SPECTRAL_PARAM pe;
+
+ spectral->atd.ad_id = SPECTRAL_CONTROL_GET_PARAMS | ATH_DIAG_DYN;
+ memset(&pe, 0, sizeof(pe));
+
+ spectral->atd.ad_in_data = NULL;
+ spectral->atd.ad_in_size = 0;
+ spectral->atd.ad_out_data = (caddr_t) &pe;
+ spectral->atd.ad_out_size = sizeof(pe);
+
+ if (ioctl(spectral->s, SIOCGATHSPECTRAL, &spectral->atd) < 0)
+ err(1, spectral->atd.ad_name);
+
+ printf("Spectral parameters (raw):\n");
+ printf(" ss_enabled: %d\n", pe.ss_enabled);
+ printf(" ss_active: %d\n", pe.ss_active);
+ printf(" ss_count: %d\n", pe.ss_count);
+ printf(" ss_fft_period: %d\n", pe.ss_fft_period);
+ printf(" ss_period: %d\n", pe.ss_period);
+ printf(" ss_short_report: %d\n", pe.ss_short_report);
+ printf(" radar_bin_thresh_sel: %d\n", pe.radar_bin_thresh_sel);
+}
+
+static void
+spectral_start(struct spectralhandler *spectral)
+{
+ HAL_SPECTRAL_PARAM pe;
+
+ spectral->atd.ad_id = SPECTRAL_CONTROL_START | ATH_DIAG_DYN;
+ memset(&pe, 0, sizeof(pe));
+
+ /*
+ * XXX don't need these, but need to eliminate the ATH_DIAG_DYN flag
+ * and debug
+ */
+ spectral->atd.ad_in_data = NULL;
+ spectral->atd.ad_in_size = 0;
+ spectral->atd.ad_out_data = (caddr_t) &pe;
+ spectral->atd.ad_out_size = sizeof(pe);
+
+ if (ioctl(spectral->s, SIOCGATHSPECTRAL, &spectral->atd) < 0)
+ err(1, spectral->atd.ad_name);
+}
+
+static void
+spectral_stop(struct spectralhandler *spectral)
+{
+ HAL_SPECTRAL_PARAM pe;
+
+ spectral->atd.ad_id = SPECTRAL_CONTROL_STOP | ATH_DIAG_DYN;
+ memset(&pe, 0, sizeof(pe));
+
+ /*
+ * XXX don't need these, but need to eliminate the ATH_DIAG_DYN flag
+ * and debug
+ */
+ spectral->atd.ad_in_data = NULL;
+ spectral->atd.ad_in_size = 0;
+ spectral->atd.ad_out_data = (caddr_t) &pe;
+ spectral->atd.ad_out_size = sizeof(pe);
+
+ if (ioctl(spectral->s, SIOCGATHSPECTRAL, &spectral->atd) < 0)
+ err(1, spectral->atd.ad_name);
+}
+
+static int
+spectral_set_param(struct spectralhandler *spectral, const char *param,
+ const char *val)
+{
+ int v;
+
+ v = atoi(val);
+
+ if (strcmp(param, "ss_short_report") == 0) {
+ spectralset(spectral, SPECTRAL_PARAM_SS_SHORT_RPT, v);
+ } else if (strcmp(param, "ss_fft_period") == 0) {
+ spectralset(spectral, SPECTRAL_PARAM_FFT_PERIOD, v);
+ } else if (strcmp(param, "ss_period") == 0) {
+ spectralset(spectral, SPECTRAL_PARAM_SS_PERIOD, v);
+ } else if (strcmp(param, "ss_count") == 0) {
+ spectralset(spectral, SPECTRAL_PARAM_SS_COUNT, v);
+ } else {
+ return (0);
+ }
+
+#if 0
+ if (strcmp(param, "enabled") == 0) {
+ spectralset(spectral, DFS_PARAM_ENABLE, v);
+ } else if (strcmp(param, "firpwr") == 0) {
+ spectralset(spectral, DFS_PARAM_FIRPWR, v);
+ } else if (strcmp(param, "rrssi") == 0) {
+ spectralset(spectral, DFS_PARAM_RRSSI, v);
+ } else if (strcmp(param, "height") == 0) {
+ spectralset(spectral, DFS_PARAM_HEIGHT, v);
+ } else if (strcmp(param, "prssi") == 0) {
+ spectralset(spectral, DFS_PARAM_PRSSI, v);
+ } else if (strcmp(param, "inband") == 0) {
+ spectralset(spectral, DFS_PARAM_INBAND, v);
+ } else if (strcmp(param, "relpwr") == 0) {
+ spectralset(spectral, DFS_PARAM_RELPWR, v);
+ } else if (strcmp(param, "relstep") == 0) {
+ spectralset(spectral, DFS_PARAM_RELSTEP, v);
+ } else if (strcmp(param, "maxlen") == 0) {
+ spectralset(spectral, DFS_PARAM_MAXLEN, v);
+ } else if (strcmp(param, "usefir128") == 0) {
+ spectralset(spectral, DFS_PARAM_USEFIR128, v);
+ } else if (strcmp(param, "blockspectral") == 0) {
+ spectralset(spectral, DFS_PARAM_BLOCKRADAR, v);
+ } else if (strcmp(param, "enmaxrssi") == 0) {
+ spectralset(spectral, DFS_PARAM_MAXRSSI_EN, v);
+ } else if (strcmp(param, "extchannel") == 0) {
+ spectralset(spectral, DFS_PARAM_EN_EXTCH, v);
+ } else if (strcmp(param, "enrelpwr") == 0) {
+ spectralset(spectral, DFS_PARAM_RELPWR_EN, v);
+ } else if (strcmp(param, "en_relstep_check") == 0) {
+ spectralset(spectral, DFS_PARAM_RELSTEP_EN, v);
+ } else {
+ return 0;
+ }
+#endif
+
+ return 1;
+}
+
+void
+usage(const char *progname)
+{
+ printf("Usage:\n");
+ printf("\t%s: [-i <interface>] <cmd> (<arg>)\n", progname);
+ printf("\t%s: [-h]\n", progname);
+ printf("\n");
+ printf("Valid commands:\n");
+ printf("\tget:\t\tGet current spectral parameters\n");
+ printf("\tset <param> <value>:\t\tSet spectral parameter\n");
+ printf("\tstart: Start spectral scan\n");
+ printf("\tstop: Stop spectral scan\n");
+}
+
+int
+main(int argc, char *argv[])
+{
+ struct spectralhandler spectral;
+ const char *devname = ATH_DEFAULT;
+ const char *progname = argv[0];
+
+ memset(&spectral, 0, sizeof(spectral));
+
+ /* Parse command line options */
+ if (argc >= 2 && strcmp(argv[1], "-h") == 0) {
+ usage(progname);
+ exit(0);
+ }
+ if (argc >= 2 && strcmp(argv[1], "-?") == 0) {
+ usage(progname);
+ exit(0);
+ }
+
+ if (argc >= 2 && strcmp(argv[1], "-i") == 0) {
+ if (argc == 2) {
+ usage(progname);
+ exit(127);
+ }
+ devname = argv[2];
+ argc -= 2; argv += 2;
+ }
+
+ /* At this point we require at least one command */
+ if (argc == 1) {
+ usage(progname);
+ exit(127);
+ }
+
+ if (spectral_opendev(&spectral, devname) == 0)
+ exit(127);
+
+ if (strcasecmp(argv[1], "get") == 0) {
+ spectral_get(&spectral);
+ } else if (strcasecmp(argv[1], "set") == 0) {
+ if (argc < 4) {
+ usage(progname);
+ exit(127);
+ }
+ if (spectral_set_param(&spectral, argv[2], argv[3]) == 0) {
+ usage(progname);
+ exit(127);
+ }
+ } else if (strcasecmp(argv[1], "start") == 0) {
+ spectral_start(&spectral);
+ } else if (strcasecmp(argv[1], "stop") == 0) {
+ spectral_stop(&spectral);
+ } else {
+ usage(progname);
+ exit(127);
+ }
+
+ /* wrap up */
+ spectral_closedev(&spectral);
+ exit(0);
+}
diff --git a/tools/tools/ath/athstats/Makefile b/tools/tools/ath/athstats/Makefile
index 4a88eb1..1db2dc1 100644
--- a/tools/tools/ath/athstats/Makefile
+++ b/tools/tools/ath/athstats/Makefile
@@ -4,6 +4,10 @@
PROG= athstats
+# Because of a clang preprocessor parser limitation causing this
+# to not compile, use gcc for now.
+CC= gcc
+
SRCS= main.c statfoo.c athstats.c opt_ah.h ah_osdep.h
CLEANFILES+= opt_ah.h
diff --git a/tools/tools/ath/athstats/athstats.c b/tools/tools/ath/athstats/athstats.c
index c36dfa0..ef815bd 100644
--- a/tools/tools/ath/athstats/athstats.c
+++ b/tools/tools/ath/athstats/athstats.c
@@ -490,7 +490,7 @@ ath_zerostats(struct athstatfoo *wf0)
struct athstatfoo_p *wf = (struct athstatfoo_p *) wf0;
if (ioctl(wf->s, SIOCZATHSTATS, &wf->ifr) < 0)
- err(-1, wf->ifr.ifr_name);
+ err(-1, "ioctl: %s", wf->ifr.ifr_name);
}
static void
@@ -498,21 +498,21 @@ ath_collect(struct athstatfoo_p *wf, struct _athstats *stats)
{
wf->ifr.ifr_data = (caddr_t) &stats->ath;
if (ioctl(wf->s, SIOCGATHSTATS, &wf->ifr) < 0)
- err(1, wf->ifr.ifr_name);
+ err(1, "ioctl: %s", wf->ifr.ifr_name);
#ifdef ATH_SUPPORT_ANI
if (wf->optstats & ATHSTATS_ANI) {
wf->atd.ad_id = 5;
wf->atd.ad_out_data = (caddr_t) &stats->ani_state;
wf->atd.ad_out_size = sizeof(stats->ani_state);
if (ioctl(wf->s, SIOCGATHDIAG, &wf->atd) < 0) {
- warn(wf->atd.ad_name);
+ warn("ioctl: %s", wf->atd.ad_name);
wf->optstats &= ~ATHSTATS_ANI;
}
wf->atd.ad_id = 8;
wf->atd.ad_out_data = (caddr_t) &stats->ani_stats;
wf->atd.ad_out_size = sizeof(stats->ani_stats);
if (ioctl(wf->s, SIOCGATHDIAG, &wf->atd) < 0)
- warn(wf->atd.ad_name);
+ warn("ioctl: %s", wf->atd.ad_name);
}
#endif /* ATH_SUPPORT_ANI */
}
@@ -574,12 +574,14 @@ ath_get_curstat(struct statfoo *sf, int s, char b[], size_t bs)
switch (s) {
case S_INPUT:
snprintf(b, bs, "%lu",
- (wf->cur.ath.ast_rx_packets - wf->total.ath.ast_rx_packets) -
- (wf->cur.ath.ast_rx_mgt - wf->total.ath.ast_rx_mgt));
+ (unsigned long)
+ ((wf->cur.ath.ast_rx_packets - wf->total.ath.ast_rx_packets) -
+ (wf->cur.ath.ast_rx_mgt - wf->total.ath.ast_rx_mgt)));
return 1;
case S_OUTPUT:
snprintf(b, bs, "%lu",
- wf->cur.ath.ast_tx_packets - wf->total.ath.ast_tx_packets);
+ (unsigned long)
+ (wf->cur.ath.ast_tx_packets - wf->total.ath.ast_tx_packets));
return 1;
case S_RATE:
snprintrate(b, bs, wf->cur.ath.ast_tx_rate);
diff --git a/tools/tools/ath/athsurvey/athsurvey.c b/tools/tools/ath/athsurvey/athsurvey.c
index e0a4cf3..df2ae4d 100644
--- a/tools/tools/ath/athsurvey/athsurvey.c
+++ b/tools/tools/ath/athsurvey/athsurvey.c
@@ -66,7 +66,7 @@ get_survey_stats(int s, const char *ifname, HAL_CHANNEL_SURVEY *hs)
strncpy(atd.ad_name, ifname, sizeof(atd.ad_name));
if (ioctl(s, SIOCGATHDIAG, &atd) < 0) {
- err(1, atd.ad_name);
+ err(1, "ioctl: %s", atd.ad_name);
return (0);
}
return (1);
diff --git a/tools/tools/netrate/netreceive/Makefile b/tools/tools/netrate/netreceive/Makefile
index ef2b09b..33fee2b 100644
--- a/tools/tools/netrate/netreceive/Makefile
+++ b/tools/tools/netrate/netreceive/Makefile
@@ -4,5 +4,6 @@
PROG= netreceive
NO_MAN=
+LDFLAGS += -lpthread
.include <bsd.prog.mk>
diff --git a/tools/tools/netrate/netreceive/netreceive.c b/tools/tools/netrate/netreceive/netreceive.c
index 9300109..a82cefc 100644
--- a/tools/tools/netrate/netreceive/netreceive.c
+++ b/tools/tools/netrate/netreceive/netreceive.c
@@ -43,27 +43,168 @@
#define MAXSOCK 20
+#include <pthread.h>
+#include <fcntl.h>
+#include <time.h> /* clock_getres() */
+
+static int round_to(int n, int l)
+{
+ return ((n + l - 1)/l)*l;
+}
+
+/*
+ * Each socket uses multiple threads so the receiver is
+ * more efficient. A collector thread runs the stats.
+ */
+struct td_desc {
+ pthread_t td_id;
+ uint64_t count; /* rx counter */
+ uint64_t byte_count; /* rx byte counter */
+ int fd;
+ char *buf;
+ int buflen;
+};
+
static void
usage(void)
{
- fprintf(stderr, "netreceive [port]\n");
+ fprintf(stderr, "netreceive port [nthreads]\n");
exit(-1);
}
+static __inline void
+timespec_add(struct timespec *tsa, struct timespec *tsb)
+{
+
+ tsa->tv_sec += tsb->tv_sec;
+ tsa->tv_nsec += tsb->tv_nsec;
+ if (tsa->tv_nsec >= 1000000000) {
+ tsa->tv_sec++;
+ tsa->tv_nsec -= 1000000000;
+ }
+}
+
+static __inline void
+timespec_sub(struct timespec *tsa, struct timespec *tsb)
+{
+
+ tsa->tv_sec -= tsb->tv_sec;
+ tsa->tv_nsec -= tsb->tv_nsec;
+ if (tsa->tv_nsec < 0) {
+ tsa->tv_sec--;
+ tsa->tv_nsec += 1000000000;
+ }
+}
+
+static void *
+rx_body(void *data)
+{
+ struct td_desc *t = data;
+ struct pollfd fds;
+ int y;
+
+ fds.fd = t->fd;
+ fds.events = POLLIN;
+
+ for (;;) {
+ if (poll(&fds, 1, -1) < 0)
+ perror("poll on thread");
+ if (!(fds.revents & POLLIN))
+ continue;
+ for (;;) {
+ y = recv(t->fd, t->buf, t->buflen, MSG_DONTWAIT);
+ if (y < 0)
+ break;
+ t->count++;
+ t->byte_count += y;
+ }
+ }
+ return NULL;
+}
+
+static struct td_desc **
+make_threads(int *s, int nsock, int nthreads)
+{
+ int i, si, nt = nsock * nthreads;
+ int lb = round_to(nt * sizeof (struct td_desc *), 64);
+ int td_len = round_to(sizeof(struct td_desc), 64); // cache align
+ char *m = calloc(1, lb + td_len * nt);
+ struct td_desc **tp;
+
+ printf("td len %d -> %d\n", (int)sizeof(struct td_desc) , td_len);
+ /* pointers plus the structs */
+ if (m == NULL) {
+ perror("no room for pointers!");
+ exit(1);
+ }
+ tp = (struct td_desc **)m;
+ m += lb; /* skip the pointers */
+ for (si = i = 0; i < nt; i++, m += td_len) {
+ tp[i] = (struct td_desc *)m;
+ tp[i]->fd = s[si];
+ tp[i]->buflen = 65536;
+ tp[i]->buf = calloc(1, tp[i]->buflen);
+ if (++si == nsock)
+ si = 0;
+ if (pthread_create(&tp[i]->td_id, NULL, rx_body, tp[i])) {
+ perror("unable to create thread");
+ exit(1);
+ }
+ }
+ return tp;
+}
+
+static void
+main_thread(struct td_desc **tp, int nsock, int nthreads)
+{
+ uint64_t c0, c1, bc0, bc1;
+ struct timespec now, then, delta;
+ /* now the parent collects and prints results */
+ c0 = c1 = bc0 = bc1 = 0;
+ clock_gettime(CLOCK_REALTIME, &then);
+ fprintf(stderr, "start at %ld.%09ld\n", then.tv_sec, then.tv_nsec);
+ while (1) {
+ int i, nt = nsock * nthreads;
+ int64_t dn;
+ uint64_t pps, bps;
+
+ if (poll(NULL, 0, 500) < 0)
+ perror("poll");
+ c0 = bc0 = 0;
+ for (i = 0; i < nt; i++) {
+ c0 += tp[i]->count;
+ bc0 += tp[i]->byte_count;
+ }
+ dn = c0 - c1;
+ clock_gettime(CLOCK_REALTIME, &now);
+ delta = now;
+ timespec_sub(&delta, &then);
+ then = now;
+ pps = dn;
+ pps = (pps * 1000000000) / (delta.tv_sec*1000000000 + delta.tv_nsec + 1);
+ bps = ((bc0 - bc1) * 8000000000) / (delta.tv_sec*1000000000 + delta.tv_nsec + 1);
+ fprintf(stderr, " %9ld pps %8.3f Mbps", (long)pps, .000001*bps);
+ fprintf(stderr, " - %d pkts in %ld.%09ld ns\n",
+ (int)dn, delta.tv_sec, delta.tv_nsec);
+ c1 = c0;
+ bc1 = bc0;
+ }
+}
+
int
main(int argc, char *argv[])
{
struct addrinfo hints, *res, *res0;
char *dummy, *packet;
int port;
- int error, v, i;
+ int error, v, nthreads = 1;
+ struct td_desc **tp;
const char *cause = NULL;
int s[MAXSOCK];
- struct pollfd fds[MAXSOCK];
int nsock;
- if (argc != 2)
+ if (argc < 2)
usage();
memset(&hints, 0, sizeof(hints));
@@ -74,6 +215,10 @@ main(int argc, char *argv[])
port = strtoul(argv[1], &dummy, 10);
if (port < 1 || port > 65535 || *dummy != '\0')
usage();
+ if (argc > 2)
+ nthreads = strtoul(argv[2], &dummy, 10);
+ if (nthreads < 1 || nthreads > 64)
+ usage();
packet = malloc(65536);
if (packet == NULL) {
@@ -110,9 +255,6 @@ main(int argc, char *argv[])
continue;
}
(void) listen(s[nsock], 5);
- fds[nsock].fd = s[nsock];
- fds[nsock].events = POLLIN;
-
nsock++;
}
if (nsock == 0) {
@@ -121,21 +263,12 @@ main(int argc, char *argv[])
/*NOTREACHED*/
}
- printf("netreceive listening on UDP port %d\n", (u_short)port);
+ printf("netreceive %d sockets x %d threads listening on UDP port %d\n",
+ nsock, nthreads, (u_short)port);
+
+ tp = make_threads(s, nsock, nthreads);
+ main_thread(tp, nsock, nthreads);
- while (1) {
- if (poll(fds, nsock, -1) < 0)
- perror("poll");
- for (i = 0; i < nsock; i++) {
- if (fds[i].revents & POLLIN) {
- if (recv(s[i], packet, 65536, 0) < 0)
- perror("recv");
- }
- if ((fds[i].revents &~ POLLIN) != 0)
- perror("poll");
- }
- }
-
/*NOTREACHED*/
freeaddrinfo(res0);
}
diff --git a/tools/tools/netrate/netsend/netsend.c b/tools/tools/netrate/netsend/netsend.c
index 0558253..683c823 100644
--- a/tools/tools/netrate/netsend/netsend.c
+++ b/tools/tools/netrate/netsend/netsend.c
@@ -144,7 +144,7 @@ timing_loop(struct _a *a)
long finishtime;
long send_errors, send_calls;
/* do not call gettimeofday more than every 20us */
- long minres_ns = 20000;
+ long minres_ns = 200000;
int ic, gettimeofday_cycles;
int cur_port;
uint64_t n, ns;
@@ -154,17 +154,22 @@ timing_loop(struct _a *a)
return (-1);
}
+ ns = a->interval.tv_nsec;
if (timespec_ge(&tmptime, &a->interval))
fprintf(stderr,
"warning: interval (%jd.%09ld) less than resolution (%jd.%09ld)\n",
(intmax_t)a->interval.tv_sec, a->interval.tv_nsec,
(intmax_t)tmptime.tv_sec, tmptime.tv_nsec);
- if (a->interval.tv_nsec < minres_ns) {
- gettimeofday_cycles = minres_ns/(tmptime.tv_nsec + 1);
- fprintf(stderr,
- "calling time every %d cycles\n", gettimeofday_cycles);
- } else
- gettimeofday_cycles = 0;
+ /* interval too short, limit the number of gettimeofday()
+ * calls, but also make sure there is at least one every
+ * some 100 packets.
+ */
+ if ((long)ns < minres_ns/100)
+ gettimeofday_cycles = 100;
+ else
+ gettimeofday_cycles = minres_ns/ns;
+ fprintf(stderr,
+ "calling time every %d cycles\n", gettimeofday_cycles);
if (clock_gettime(CLOCK_REALTIME, &starttime) == -1) {
perror("clock_gettime");
diff --git a/tools/tools/sysbuild/sysbuild.sh b/tools/tools/sysbuild/sysbuild.sh
index dfca7c0..2f91e86 100644
--- a/tools/tools/sysbuild/sysbuild.sh
+++ b/tools/tools/sysbuild/sysbuild.sh
@@ -225,37 +225,49 @@ ports_build() (
# Now build & install them
for p in `cat /tmp/_.plist`
do
+ b=`echo $p | tr / _`
t=`echo $p | sed 's,/usr/ports/,,'`
pn=`cd $p && make package-name`
- if [ "x${PKG_DIR}" != "x" -a -f ${PKG_DIR}/$pn.tbz ] ; then
- if [ "x$use_pkg" = "x-p" ] ; then
- log_it "install $p from ${PKG_DIR}/$pn.tbz"
- pkg_add ${PKG_DIR}/$pn.tbz
- fi
+
+ if pkg info $pn > /dev/null 2>&1 ; then
+ log_it "Already installed: $t ($pn)"
+ continue
fi
- i=`pkg_info -qO $t`
- if [ -z "$i" ] ; then
- log_it "build $p"
- b=`echo $p | tr / _`
+
+ if [ "x$p" == "x/usr/ports/ports-mgmt/pkg" ] ; then
+ log_it "Very Special: $t ($pn)"
(
- set -x
- cd /usr/ports
- cd $p
- set +e
- make clean ${PORTS_OPTS}
- if make install ${PORTS_OPTS} ; then
- if [ "x${PKG_DIR}" != "x" ] ; then
- make package ${PORTS_OPTS}
- mkdir -p ${PKG_DIR}
- mv *.tbz ${PKG_DIR}
- fi
- else
- log_it FAIL build $p
- fi
- make clean
+ cd $p
+ make clean all install ${PORTS_OPTS}
) > _.$b 2>&1 < /dev/null
- date
+ continue
+ fi
+
+ if [ "x${PKG_DIR}" != "x" -a -f ${PKG_DIR}/$pn.txz ] ; then
+ if [ "x$use_pkg" = "x-p" ] ; then
+ log_it "Install $t ($pn)"
+ (
+ set +e
+ pkg add ${PKG_DIR}/$pn.txz || true
+ ) > _.$b 2>&1 < /dev/null
+ continue
+ fi
fi
+
+ log_it "build $pn ($p)"
+ (
+ set +e
+ cd $p
+ make clean ${PORTS_OPTS}
+ if make install ${PORTS_OPTS} ; then
+ if [ "x${PKG_DIR}" != "x" ] ; then
+ make package ${PORTS_OPTS}
+ fi
+ else
+ log_it FAIL build $p
+ fi
+ make clean
+ ) > _.$b 2>&1 < /dev/null
done
)
@@ -463,7 +475,7 @@ export PORTS_OPTS
#######################################################################
log_it Prepare destination partition
-newfs -O2 -U /dev/${TARGET_PART} > /dev/null
+newfs -t -E -O2 -U /dev/${TARGET_PART} > /dev/null
mount /dev/${TARGET_PART} ${SBMNT}
mkdir -p ${SBMNT}/dev
mount -t devfs devfs ${SBMNT}/dev
@@ -564,7 +576,7 @@ sed "/[ ]\/[ ]/s;^[^ ]*[ ];/dev/${TARGET_PART} ;" \
/etc/fstab > ${SBMNT}/etc/fstab
log_it build ports
-pwd
+
cp $0 ${SBMNT}/root
cp /tmp/_sb_log ${SBMNT}/tmp
b=`basename $0`
diff --git a/usr.bin/calendar/parsedata.c b/usr.bin/calendar/parsedata.c
index 63e4395..4ece663 100644
--- a/usr.bin/calendar/parsedata.c
+++ b/usr.bin/calendar/parsedata.c
@@ -940,15 +940,13 @@ indextooffset(char *s)
{
int i;
struct fixs *n;
+ char *es;
if (s[0] == '+' || s[0] == '-') {
- char ss[9];
- for (i = -100; i < 100; i++) {
- sprintf(ss, "%s%d", (i > 0) ? "+" : "", i);
- if (strcmp(ss, s) == 0)
- return (i);
- }
- return (0);
+ i = strtol (s, &es, 10);
+ if (*es != '\0') /* trailing junk */
+ errx (1, "Invalid specifier format: %s\n", s);
+ return (i);
}
for (i = 0; i < 6; i++) {
diff --git a/usr.bin/clang/clang/clang.1 b/usr.bin/clang/clang/clang.1
index 214fe0e..1a37c6d 100644
--- a/usr.bin/clang/clang/clang.1
+++ b/usr.bin/clang/clang/clang.1
@@ -1,5 +1,5 @@
.\" $FreeBSD$
-.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
+.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.20)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -125,7 +125,7 @@
.\" ========================================================================
.\"
.IX Title "CLANG 1"
-.TH CLANG 1 "2012-08-09" "clang 3.2" "Clang Tools Documentation"
+.TH CLANG 1 "2012-12-21" "clang 3.2" "Clang Tools Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -231,8 +231,8 @@ Treat subsequent input files as having type \fIlanguage\fR.
.IP "\fB\-std\fR=\fIlanguage\fR" 4
.IX Item "-std=language"
Specify the language standard to compile for.
-.IP "\fB\-stdlib\fR=\fIlanguage\fR" 4
-.IX Item "-stdlib=language"
+.IP "\fB\-stdlib\fR=\fIlibrary\fR" 4
+.IX Item "-stdlib=library"
Specify the \*(C+ standard library to use; supported options are libstdc++ and
libc++.
.IP "\fB\-ansi\fR" 4
diff --git a/usr.bin/dc/bcode.c b/usr.bin/dc/bcode.c
index 022cf87..f17a0da 100644
--- a/usr.bin/dc/bcode.c
+++ b/usr.bin/dc/bcode.c
@@ -29,8 +29,6 @@ __FBSDID("$FreeBSD$");
#include "extern.h"
-BIGNUM zero;
-
#define __inline
#define MAX_ARRAY_INDEX 2048
@@ -250,8 +248,12 @@ init_bmachine(bool extended_registers)
if (bmachine.readstack == NULL)
err(1, NULL);
bmachine.obase = bmachine.ibase = 10;
- BN_init(&zero);
- bn_check(BN_zero(&zero));
+}
+
+u_int
+bmachine_scale(void)
+{
+ return (bmachine.scale);
}
/* Reset the things needed before processing a (new) file */
@@ -407,7 +409,7 @@ split_number(const struct number *n, BIGNUM *i, BIGNUM *f)
}
}
-__inline void
+void
normalize(struct number *n, u_int s)
{
@@ -427,7 +429,7 @@ void
negate(struct number *n)
{
- bn_check(BN_sub(n->number, &zero, n->number));
+ BN_set_negative(n->number, !BN_is_negative(n->number));
}
static __inline void
@@ -581,7 +583,7 @@ set_scale(void)
n = pop_number();
if (n != NULL) {
- if (BN_cmp(n->number, &zero) < 0)
+ if (BN_is_negative(n->number))
warnx("scale must be a nonnegative number");
else {
scale = get_ulong(n);
@@ -878,7 +880,7 @@ load_array(void)
if (inumber == NULL)
return;
idx = get_ulong(inumber);
- if (BN_cmp(inumber->number, &zero) < 0)
+ if (BN_is_negative(inumber->number))
warnx("negative idx");
else if (idx == BN_MASK2 || idx > MAX_ARRAY_INDEX)
warnx("idx too big");
@@ -917,7 +919,7 @@ store_array(void)
return;
}
idx = get_ulong(inumber);
- if (BN_cmp(inumber->number, &zero) < 0) {
+ if (BN_is_negative(inumber->number)) {
warnx("negative idx");
stack_free_value(value);
} else if (idx == BN_MASK2 || idx > MAX_ARRAY_INDEX) {
@@ -1009,7 +1011,7 @@ bsub(void)
}
void
-bmul_number(struct number *r, struct number *a, struct number *b)
+bmul_number(struct number *r, struct number *a, struct number *b, u_int scale)
{
BN_CTX *ctx;
@@ -1023,11 +1025,9 @@ bmul_number(struct number *r, struct number *a, struct number *b)
bn_check(BN_mul(r->number, a->number, b->number, ctx));
BN_CTX_free(ctx);
- if (rscale > bmachine.scale && rscale > ascale && rscale > bscale) {
- r->scale = rscale;
- normalize(r, max(bmachine.scale, max(ascale, bscale)));
- } else
- r->scale = rscale;
+ r->scale = rscale;
+ if (rscale > bmachine.scale && rscale > ascale && rscale > bscale)
+ normalize(r, max(scale, max(ascale, bscale)));
}
static void
@@ -1046,7 +1046,7 @@ bmul(void)
}
r = new_number();
- bmul_number(r, a, b);
+ bmul_number(r, a, b, bmachine.scale);
push_number(r);
free_number(a);
@@ -1172,7 +1172,7 @@ static void
bexp(void)
{
struct number *a, *p, *r;
- u_int scale;
+ u_int rscale;
bool neg;
p = pop_number();
@@ -1185,15 +1185,27 @@ bexp(void)
return;
}
- if (p->scale != 0)
- warnx("Runtime warning: non-zero scale in exponent");
+ if (p->scale != 0) {
+ BIGNUM *i, *f;
+ i = BN_new();
+ bn_checkp(i);
+ f = BN_new();
+ bn_checkp(f);
+ split_number(p, i, f);
+ if (!BN_is_zero(f))
+ warnx("Runtime warning: non-zero fractional part "
+ "in exponent");
+ BN_free(i);
+ BN_free(f);
+ }
+
normalize(p, 0);
neg = false;
- if (BN_cmp(p->number, &zero) < 0) {
+ if (BN_is_negative(p->number)) {
neg = true;
negate(p);
- scale = bmachine.scale;
+ rscale = bmachine.scale;
} else {
/* Posix bc says min(a.scale * b, max(a.scale, scale) */
u_long b;
@@ -1201,30 +1213,37 @@ bexp(void)
b = BN_get_word(p->number);
m = max(a->scale, bmachine.scale);
- scale = a->scale * (u_int)b;
- if (scale > m || (a->scale > 0 && (b == BN_MASK2 ||
+ rscale = a->scale * (u_int)b;
+ if (rscale > m || (a->scale > 0 && (b == BN_MASK2 ||
b > UINT_MAX)))
- scale = m;
+ rscale = m;
}
if (BN_is_zero(p->number)) {
r = new_number();
bn_check(BN_one(r->number));
- normalize(r, scale);
+ normalize(r, rscale);
} else {
+ u_int ascale, mscale;
+
+ ascale = a->scale;
while (!BN_is_bit_set(p->number, 0)) {
- bmul_number(a, a, a);
+ ascale *= 2;
+ bmul_number(a, a, a, ascale);
bn_check(BN_rshift1(p->number, p->number));
}
r = dup_number(a);
- normalize(r, scale);
bn_check(BN_rshift1(p->number, p->number));
+ mscale = ascale;
while (!BN_is_zero(p->number)) {
- bmul_number(a, a, a);
- if (BN_is_bit_set(p->number, 0))
- bmul_number(r, r, a);
+ ascale *= 2;
+ bmul_number(a, a, a, ascale);
+ if (BN_is_bit_set(p->number, 0)) {
+ mscale += ascale;
+ bmul_number(r, r, a, mscale);
+ }
bn_check(BN_rshift1(p->number, p->number));
}
@@ -1237,13 +1256,18 @@ bexp(void)
bn_check(BN_one(one));
ctx = BN_CTX_new();
bn_checkp(ctx);
- scale_number(one, r->scale + scale);
- normalize(r, scale);
- bn_check(BN_div(r->number, NULL, one, r->number, ctx));
+ scale_number(one, r->scale + rscale);
+
+ if (BN_is_zero(r->number))
+ warnx("divide by zero");
+ else
+ bn_check(BN_div(r->number, NULL, one,
+ r->number, ctx));
BN_free(one);
BN_CTX_free(ctx);
+ r->scale = rscale;
} else
- normalize(r, scale);
+ normalize(r, rscale);
}
push_number(r);
free_number(a);
@@ -1282,7 +1306,7 @@ bsqrt(void)
if (BN_is_zero(n->number)) {
r = new_number();
push_number(r);
- } else if (BN_cmp(n->number, &zero) < 0)
+ } else if (BN_is_negative(n->number))
warnx("square root of negative number");
else {
scale = max(bmachine.scale, n->scale);
diff --git a/usr.bin/dc/bcode.h b/usr.bin/dc/bcode.h
index 9290cf1..7dc5d2d 100644
--- a/usr.bin/dc/bcode.h
+++ b/usr.bin/dc/bcode.h
@@ -85,6 +85,7 @@ struct source {
void init_bmachine(bool);
void reset_bmachine(struct source *);
+u_int bmachine_scale(void);
void scale_number(BIGNUM *, int);
void normalize(struct number *, u_int);
void eval(void);
@@ -93,6 +94,4 @@ void pbn(const char *, const BIGNUM *);
void negate(struct number *);
void split_number(const struct number *, BIGNUM *, BIGNUM *);
void bmul_number(struct number *, struct number *,
- struct number *);
-
-extern BIGNUM zero;
+ struct number *, u_int);
diff --git a/usr.bin/dc/inout.c b/usr.bin/dc/inout.c
index 4a2bb70..e35f0ad 100644
--- a/usr.bin/dc/inout.c
+++ b/usr.bin/dc/inout.c
@@ -322,7 +322,7 @@ printnumber(FILE *f, const struct number *b, u_int base)
i++;
}
sz = i;
- if (BN_cmp(b->number, &zero) < 0)
+ if (BN_is_negative(b->number))
putcharwrap(f, '-');
for (i = 0; i < sz; i++) {
p = stack_popstring(&stack);
@@ -353,7 +353,8 @@ printnumber(FILE *f, const struct number *b, u_int base)
putcharwrap(f, ' ');
i = 1;
- bmul_number(fract_part, fract_part, num_base);
+ bmul_number(fract_part, fract_part, num_base,
+ bmachine_scale());
split_number(fract_part, int_part->number, NULL);
rem = BN_get_word(int_part->number);
p = get_digit(rem, digits, base);
@@ -402,8 +403,8 @@ print_ascii(FILE *f, const struct number *n)
v = BN_dup(n->number);
bn_checkp(v);
- if (BN_cmp(v, &zero) < 0)
- bn_check(BN_sub(v, &zero, v));
+ if (BN_is_negative(v))
+ BN_set_negative(v, 0);
numbits = BN_num_bytes(v) * 8;
while (numbits > 0) {
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c
index 336df97..d3e9b21 100644
--- a/usr.bin/fetch/fetch.c
+++ b/usr.bin/fetch/fetch.c
@@ -183,7 +183,7 @@ stat_bps(struct xferstat *xs)
if (delta == 0.0) {
snprintf(str, sizeof str, "?? Bps");
} else {
- bps = (xs->rcvd - xs->lastrcvd - xs->offset) / delta;
+ bps = (xs->rcvd - xs->lastrcvd) / delta;
snprintf(str, sizeof str, "%sps", stat_bytes((off_t)bps));
}
return (str);
@@ -618,7 +618,10 @@ fetch(char *URL, const char *path)
asprintf(&tmppath, "%.*s.fetch.XXXXXX.%s",
(int)(slash - path), path, slash);
if (tmppath != NULL) {
- mkstemps(tmppath, strlen(slash) + 1);
+ if (mkstemps(tmppath, strlen(slash) + 1) == -1) {
+ warn("%s: mkstemps()", path);
+ goto failure;
+ }
of = fopen(tmppath, "w");
chown(tmppath, sb.st_uid, sb.st_gid);
chmod(tmppath, sb.st_mode & ALLPERMS);
@@ -988,7 +991,8 @@ main(int argc, char *argv[])
if (v_tty)
fetchAuthMethod = query_auth;
if (N_filename != NULL)
- setenv("NETRC", N_filename, 1);
+ if (setenv("NETRC", N_filename, 1) == -1)
+ err(1, "setenv: cannot set NETRC=%s", N_filename);
while (argc) {
if ((p = strrchr(*argv, '/')) == NULL)
diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c
index 43d9334..7c69d5d 100644
--- a/usr.bin/grep/grep.c
+++ b/usr.bin/grep/grep.c
@@ -108,6 +108,7 @@ bool iflag; /* -i: ignore case */
bool lflag; /* -l: only show names of files with matches */
bool mflag; /* -m x: stop reading the files after x matches */
long long mcount; /* count for -m */
+long long mlimit; /* requested value for -m */
bool nflag; /* -n: show line numbers in front of matching lines */
bool oflag; /* -o: print only matching part */
bool qflag; /* -q: quiet mode (don't output anything) */
@@ -524,7 +525,7 @@ main(int argc, char *argv[])
case 'm':
mflag = true;
errno = 0;
- mcount = strtoll(optarg, &ep, 10);
+ mlimit = mcount = strtoll(optarg, &ep, 10);
if (((errno == ERANGE) && (mcount == LLONG_MAX)) ||
((errno == EINVAL) && (mcount == 0)))
err(2, NULL);
diff --git a/usr.bin/grep/grep.h b/usr.bin/grep/grep.h
index 2a8f425..4ee348e 100644
--- a/usr.bin/grep/grep.h
+++ b/usr.bin/grep/grep.h
@@ -115,6 +115,7 @@ extern bool Eflag, Fflag, Gflag, Hflag, Lflag,
extern bool dexclude, dinclude, fexclude, finclude, lbflag, nullflag;
extern unsigned long long Aflag, Bflag;
extern long long mcount;
+extern long long mlimit;
extern char *label;
extern const char *color;
extern int binbehave, devbehave, dirbehave, filebehave, grepbehave, linkbehave;
diff --git a/usr.bin/grep/util.c b/usr.bin/grep/util.c
index 4fb1240..0a3706f 100644
--- a/usr.bin/grep/util.c
+++ b/usr.bin/grep/util.c
@@ -176,8 +176,7 @@ procfile(const char *fn)
mode_t s;
int c, t;
- if (mflag && (mcount <= 0))
- return (0);
+ mcount = mlimit;
if (strcmp(fn, "-") == 0) {
fn = label != NULL ? label : getstr(1);
diff --git a/usr.bin/indent/indent_globs.h b/usr.bin/indent/indent_globs.h
index 087f41c..2ea1d8d 100644
--- a/usr.bin/indent/indent_globs.h
+++ b/usr.bin/indent/indent_globs.h
@@ -213,7 +213,7 @@ struct fstate {
char font[4];
char size;
int allcaps:1;
-};
+} __aligned(sizeof(int));
char *chfont(struct fstate *, struct fstate *, char *);
struct fstate
diff --git a/usr.bin/locate/locate/locate.c b/usr.bin/locate/locate/locate.c
index b0faefb..3a87b14 100644
--- a/usr.bin/locate/locate/locate.c
+++ b/usr.bin/locate/locate/locate.c
@@ -292,7 +292,9 @@ search_mmap(db, s)
err(1, "`%s'", db);
len = sb.st_size;
if (len < (2*NBG))
- errx(1, "database too small: %s", db);
+ errx(1,
+ "database too small: %s\nRun /usr/libexec/locate.updatedb",
+ db);
if ((p = mmap((caddr_t)0, (size_t)len,
PROT_READ, MAP_SHARED,
diff --git a/usr.bin/m4/Makefile b/usr.bin/m4/Makefile
index ce50d6c..1f1ec5e 100644
--- a/usr.bin/m4/Makefile
+++ b/usr.bin/m4/Makefile
@@ -6,6 +6,7 @@
PROG= m4
CFLAGS+=-DEXTENDED -I${.CURDIR} -I${.CURDIR}/lib
+DPADD= ${LIBY} ${LIBL} ${LIBM}
LDADD= -ly -ll -lm
# clang needs 1 while with gcc we can use 2
#WARNS= 1
diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c
index 4b09342..2368f184 100644
--- a/usr.bin/printf/printf.c
+++ b/usr.bin/printf/printf.c
@@ -473,7 +473,7 @@ getnum(intmax_t *ip, uintmax_t *uip, int signedconv)
int rval;
if (!*gargv) {
- *ip = 0;
+ *ip = *uip = 0;
return (0);
}
if (**gargv == '"' || **gargv == '\'') {
diff --git a/usr.bin/rctl/rctl.8 b/usr.bin/rctl/rctl.8
index e570f57..556c73a 100644
--- a/usr.bin/rctl/rctl.8
+++ b/usr.bin/rctl/rctl.8
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 26, 2012
+.Dd December 3, 2012
.Dt RCTL 8
.Os
.Sh NAME
@@ -169,21 +169,17 @@ Note that limiting RSS may kill the machine due to thrashing.
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
-.Dl rctl -a user:joe:vmemoryuse:deny=1g
+Prevent user "joe" from allocating more than 1GB of virtual memory:
+.Dl Nm Fl a Ar user:joe:vmemoryuse:deny=1g
.Pp
-Prevent user "joe" from allocating more than 1GB of virtual memory.
+Remove all RCTL rules:
+.Dl Nm Fl r Ar \&:
.Pp
-.Dl rctl -r :
+Display resource usage information for jail named "www":
+.Dl Nm Fl hu Ar jail:www
.Pp
-Remove all RCTL rules.
-.Pp
-.Dl rctl -hu jail:www
-.Pp
-Display resource usage information for jail named "www".
-.Pp
-.Dl rctl -l process:512
-.Pp
-Display all the rules applicable to process with PID 512.
+Display all the rules applicable to process with PID 512:
+.Dl Nm Fl l Ar process:512
.Sh SEE ALSO
.Xr rctl.conf 5
.Sh HISTORY
diff --git a/usr.bin/sort/sort.c b/usr.bin/sort/sort.c
index 9277de0..69a5a74 100644
--- a/usr.bin/sort/sort.c
+++ b/usr.bin/sort/sort.c
@@ -103,7 +103,7 @@ bool debug_sort;
bool need_hint;
#if defined(SORT_THREADS)
-size_t ncpu = 1;
+unsigned int ncpu = 1;
size_t nthreads = 1;
#endif
@@ -265,31 +265,27 @@ read_fns_from_file0(const char *fn)
static void
set_hw_params(void)
{
-#if defined(SORT_THREADS)
- size_t ncpusz;
-#endif
- size_t pages, psize, psz, pszsz;
+ long pages, psize;
pages = psize = 0;
+
#if defined(SORT_THREADS)
ncpu = 1;
- ncpusz = sizeof(size_t);
#endif
- psz = pszsz = sizeof(size_t);
- if (sysctlbyname("vm.stats.vm.v_free_count", &pages, &psz,
- NULL, 0) < 0) {
- perror("vm.stats.vm.v_free_count");
- return;
+ pages = sysconf(_SC_PHYS_PAGES);
+ if (pages < 1) {
+ perror("sysconf pages");
+ psize = 1;
}
- if (sysctlbyname("vm.stats.vm.v_page_size", &psize, &pszsz,
- NULL, 0) < 0) {
- perror("vm.stats.vm.v_page_size");
- return;
+ psize = sysconf(_SC_PAGESIZE);
+ if (psize < 1) {
+ perror("sysconf psize");
+ psize = 4096;
}
#if defined(SORT_THREADS)
- if (sysctlbyname("hw.ncpu", &ncpu, &ncpusz,
- NULL, 0) < 0)
+ ncpu = (unsigned int)sysconf(_SC_NPROCESSORS_ONLN);
+ if (ncpu < 1)
ncpu = 1;
else if(ncpu > 32)
ncpu = 32;
@@ -298,7 +294,10 @@ set_hw_params(void)
#endif
free_memory = (unsigned long long) pages * (unsigned long long) psize;
- available_free_memory = (free_memory * 9) / 10;
+ available_free_memory = free_memory / 2;
+
+ if (available_free_memory < 1024)
+ available_free_memory = 1024;
}
/*
@@ -1227,7 +1226,9 @@ main(int argc, char **argv)
}
if (debug_sort) {
+ printf("Memory to be used for sorting: %llu\n",available_free_memory);
#if defined(SORT_THREADS)
+ printf("Number of CPUs: %d\n",(int)ncpu);
nthreads = 1;
#endif
printf("Using collate rules of %s locale\n",
diff --git a/usr.bin/sort/sort.h b/usr.bin/sort/sort.h
index f5b48bd..a37f922 100644
--- a/usr.bin/sort/sort.h
+++ b/usr.bin/sort/sort.h
@@ -54,7 +54,7 @@ extern const char *nlsstr[];
#if defined(SORT_THREADS)
#define MT_SORT_THRESHOLD (10000)
-extern size_t ncpu;
+extern unsigned int ncpu;
extern size_t nthreads;
#endif
diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c
index ebee542..c2ea522 100644
--- a/usr.bin/time/time.c
+++ b/usr.bin/time/time.c
@@ -112,7 +112,7 @@ main(int argc, char **argv)
argv += optind;
if (ofn) {
- if ((out = fopen(ofn, aflag ? "a" : "w")) == NULL)
+ if ((out = fopen(ofn, aflag ? "ae" : "we")) == NULL)
err(1, "%s", ofn);
setvbuf(out, (char *)NULL, _IONBF, (size_t)0);
}
@@ -123,8 +123,6 @@ main(int argc, char **argv)
err(1, "time");
/* NOTREACHED */
case 0: /* child */
- if (ofn)
- fclose(out);
execvp(*argv, argv);
err(errno == ENOENT ? 127 : 126, "%s", *argv);
/* NOTREACHED */
diff --git a/usr.bin/tip/tip/cu.1 b/usr.bin/tip/tip/cu.1
index b67b19d..aba5c40 100644
--- a/usr.bin/tip/tip/cu.1
+++ b/usr.bin/tip/tip/cu.1
@@ -69,9 +69,9 @@ Echo characters locally (half-duplex mode).
.It Fl l Ar line
Specify the line to use.
Either of the forms like
-.Pa cuad0
+.Pa cuau0
or
-.Pa /dev/cuad0
+.Pa /dev/cuau0
are permitted.
.It Fl o
Use odd parity.
diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile
index aaf2483..8a2d5be 100644
--- a/usr.sbin/Makefile
+++ b/usr.sbin/Makefile
@@ -55,6 +55,7 @@ SUBDIR= adduser \
nfsdumpstate \
nfsrevoke \
nfsuserd \
+ nmtree \
nologin \
pc-sysinstall \
pciconf \
diff --git a/usr.sbin/Makefile.amd64 b/usr.sbin/Makefile.amd64
index b9747e5..e1ccf49 100644
--- a/usr.sbin/Makefile.amd64
+++ b/usr.sbin/Makefile.amd64
@@ -25,8 +25,5 @@ SUBDIR+= ndiscvt
.endif
SUBDIR+= sicontrol
SUBDIR+= spkrtest
-.if ${MK_SYSINSTALL} != "no"
-SUBDIR+= sade
-.endif
SUBDIR+= bhyvectl
SUBDIR+= zzz
diff --git a/usr.sbin/Makefile.i386 b/usr.sbin/Makefile.i386
index 9588eb8..901c2d9 100644
--- a/usr.sbin/Makefile.i386
+++ b/usr.sbin/Makefile.i386
@@ -17,9 +17,6 @@ SUBDIR+= mptable
SUBDIR+= ndiscvt
.endif
SUBDIR+= pnpinfo
-.if ${MK_SYSINSTALL} != "no"
-SUBDIR+= sade
-.endif
SUBDIR+= sicontrol
SUBDIR+= spkrtest
SUBDIR+= zzz
diff --git a/usr.sbin/Makefile.sparc64 b/usr.sbin/Makefile.sparc64
index 479dafc..81f7a9b 100644
--- a/usr.sbin/Makefile.sparc64
+++ b/usr.sbin/Makefile.sparc64
@@ -2,6 +2,3 @@
SUBDIR+= eeprom
SUBDIR+= ofwdump
-.if ${MK_SYSINSTALL} != "no"
-SUBDIR+= sade
-.endif
diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c
index b0a751c..c7f5bd8 100644
--- a/usr.sbin/acpi/acpidump/acpi.c
+++ b/usr.sbin/acpi/acpidump/acpi.c
@@ -123,6 +123,31 @@ static const char *TCPA_pcclient_strings[] = {
"Table of Devices",
};
+#define PRINTFLAG_END() printflag_end()
+
+static char pf_sep = '{';
+
+static void
+printflag_end(void)
+{
+
+ if (pf_sep != '{') {
+ printf("}");
+ pf_sep = '{';
+ }
+ printf("\n");
+}
+
+static void
+printflag(uint64_t var, uint64_t mask, const char *name)
+{
+
+ if (var & mask) {
+ printf("%c%s", pf_sep, name);
+ pf_sep = ',';
+ }
+}
+
static void
acpi_print_string(char *s, size_t length)
{
@@ -729,6 +754,238 @@ acpi_handle_tcpa(ACPI_TABLE_HEADER *sdp)
printf(END_COMMENT);
}
+static const char *
+devscope_type2str(int type)
+{
+ static char typebuf[16];
+
+ switch (type) {
+ case 1:
+ return ("PCI Endpoint Device");
+ case 2:
+ return ("PCI Sub-Hierarchy");
+ case 3:
+ return ("IOAPIC");
+ case 4:
+ return ("HPET");
+ default:
+ snprintf(typebuf, sizeof(typebuf), "%d", type);
+ return (typebuf);
+ }
+}
+
+static int
+acpi_handle_dmar_devscope(void *addr, int remaining)
+{
+ char sep;
+ int pathlen;
+ ACPI_DMAR_PCI_PATH *path, *pathend;
+ ACPI_DMAR_DEVICE_SCOPE *devscope = addr;
+
+ if (remaining < (int)sizeof(ACPI_DMAR_DEVICE_SCOPE))
+ return (-1);
+
+ if (remaining < devscope->Length)
+ return (-1);
+
+ printf("\n");
+ printf("\t\tType=%s\n", devscope_type2str(devscope->EntryType));
+ printf("\t\tLength=%d\n", devscope->Length);
+ printf("\t\tEnumerationId=%d\n", devscope->EnumerationId);
+ printf("\t\tStartBusNumber=%d\n", devscope->Bus);
+
+ path = (ACPI_DMAR_PCI_PATH *)(devscope + 1);
+ pathlen = devscope->Length - sizeof(ACPI_DMAR_DEVICE_SCOPE);
+ pathend = path + pathlen / sizeof(ACPI_DMAR_PCI_PATH);
+ if (path < pathend) {
+ sep = '{';
+ printf("\t\tPath=");
+ do {
+ printf("%c%d:%d", sep, path->Device, path->Function);
+ sep=',';
+ path++;
+ } while (path < pathend);
+ printf("}\n");
+ }
+
+ return (devscope->Length);
+}
+
+static void
+acpi_handle_dmar_drhd(ACPI_DMAR_HARDWARE_UNIT *drhd)
+{
+ char *cp;
+ int remaining, consumed;
+
+ printf("\n");
+ printf("\tType=DRHD\n");
+ printf("\tLength=%d\n", drhd->Header.Length);
+
+#define PRINTFLAG(var, flag) printflag((var), ACPI_DMAR_## flag, #flag)
+
+ printf("\tFlags=");
+ PRINTFLAG(drhd->Flags, INCLUDE_ALL);
+ PRINTFLAG_END();
+
+#undef PRINTFLAG
+
+ printf("\tSegment=%d\n", drhd->Segment);
+ printf("\tAddress=0x%0jx\n", drhd->Address);
+
+ remaining = drhd->Header.Length - sizeof(ACPI_DMAR_HARDWARE_UNIT);
+ if (remaining > 0)
+ printf("\tDevice Scope:");
+ while (remaining > 0) {
+ cp = (char *)drhd + drhd->Header.Length - remaining;
+ consumed = acpi_handle_dmar_devscope(cp, remaining);
+ if (consumed <= 0)
+ break;
+ else
+ remaining -= consumed;
+ }
+}
+
+static void
+acpi_handle_dmar_rmrr(ACPI_DMAR_RESERVED_MEMORY *rmrr)
+{
+ char *cp;
+ int remaining, consumed;
+
+ printf("\n");
+ printf("\tType=RMRR\n");
+ printf("\tLength=%d\n", rmrr->Header.Length);
+ printf("\tSegment=%d\n", rmrr->Segment);
+ printf("\tBaseAddress=0x%0jx\n", rmrr->BaseAddress);
+ printf("\tLimitAddress=0x%0jx\n", rmrr->EndAddress);
+
+ remaining = rmrr->Header.Length - sizeof(ACPI_DMAR_RESERVED_MEMORY);
+ if (remaining > 0)
+ printf("\tDevice Scope:");
+ while (remaining > 0) {
+ cp = (char *)rmrr + rmrr->Header.Length - remaining;
+ consumed = acpi_handle_dmar_devscope(cp, remaining);
+ if (consumed <= 0)
+ break;
+ else
+ remaining -= consumed;
+ }
+}
+
+static void
+acpi_handle_dmar_atsr(ACPI_DMAR_ATSR *atsr)
+{
+ char *cp;
+ int remaining, consumed;
+
+ printf("\n");
+ printf("\tType=ATSR\n");
+ printf("\tLength=%d\n", atsr->Header.Length);
+
+#define PRINTFLAG(var, flag) printflag((var), ACPI_DMAR_## flag, #flag)
+
+ printf("\tFlags=");
+ PRINTFLAG(atsr->Flags, ALL_PORTS);
+ PRINTFLAG_END();
+
+#undef PRINTFLAG
+
+ printf("\tSegment=%d\n", atsr->Segment);
+
+ remaining = atsr->Header.Length - sizeof(ACPI_DMAR_ATSR);
+ if (remaining > 0)
+ printf("\tDevice Scope:");
+ while (remaining > 0) {
+ cp = (char *)atsr + atsr->Header.Length - remaining;
+ consumed = acpi_handle_dmar_devscope(cp, remaining);
+ if (consumed <= 0)
+ break;
+ else
+ remaining -= consumed;
+ }
+}
+
+static void
+acpi_handle_dmar_rhsa(ACPI_DMAR_RHSA *rhsa)
+{
+
+ printf("\n");
+ printf("\tType=RHSA\n");
+ printf("\tLength=%d\n", rhsa->Header.Length);
+ printf("\tBaseAddress=0x%0jx\n", rhsa->BaseAddress);
+ printf("\tProximityDomain=0x%08x\n", rhsa->ProximityDomain);
+}
+
+static int
+acpi_handle_dmar_remapping_structure(void *addr, int remaining)
+{
+ ACPI_DMAR_HEADER *hdr = addr;
+
+ if (remaining < (int)sizeof(ACPI_DMAR_HEADER))
+ return (-1);
+
+ if (remaining < hdr->Length)
+ return (-1);
+
+ switch (hdr->Type) {
+ case ACPI_DMAR_TYPE_HARDWARE_UNIT:
+ acpi_handle_dmar_drhd(addr);
+ break;
+ case ACPI_DMAR_TYPE_RESERVED_MEMORY:
+ acpi_handle_dmar_rmrr(addr);
+ break;
+ case ACPI_DMAR_TYPE_ATSR:
+ acpi_handle_dmar_atsr(addr);
+ break;
+ case ACPI_DMAR_HARDWARE_AFFINITY:
+ acpi_handle_dmar_rhsa(addr);
+ break;
+ default:
+ printf("\n");
+ printf("\tType=%d\n", hdr->Type);
+ printf("\tLength=%d\n", hdr->Length);
+ break;
+ }
+ return (hdr->Length);
+}
+
+#ifndef ACPI_DMAR_X2APIC_OPT_OUT
+#define ACPI_DMAR_X2APIC_OPT_OUT (0x2)
+#endif
+
+static void
+acpi_handle_dmar(ACPI_TABLE_HEADER *sdp)
+{
+ char *cp;
+ int remaining, consumed;
+ ACPI_TABLE_DMAR *dmar;
+
+ printf(BEGIN_COMMENT);
+ acpi_print_sdt(sdp);
+ dmar = (ACPI_TABLE_DMAR *)sdp;
+ printf("\tHost Address Width=%d\n", dmar->Width + 1);
+
+#define PRINTFLAG(var, flag) printflag((var), ACPI_DMAR_## flag, #flag)
+
+ printf("\tFlags=");
+ PRINTFLAG(dmar->Flags, INTR_REMAP);
+ PRINTFLAG(dmar->Flags, X2APIC_OPT_OUT);
+ PRINTFLAG_END();
+
+#undef PRINTFLAG
+
+ remaining = sdp->Length - sizeof(ACPI_TABLE_DMAR);
+ while (remaining > 0) {
+ cp = (char *)sdp + sdp->Length - remaining;
+ consumed = acpi_handle_dmar_remapping_structure(cp, remaining);
+ if (consumed <= 0)
+ break;
+ else
+ remaining -= consumed;
+ }
+
+ printf(END_COMMENT);
+}
+
static void
acpi_print_srat_memory(ACPI_SRAT_MEM_AFFINITY *mp)
{
@@ -854,7 +1111,6 @@ acpi_print_fadt(ACPI_TABLE_HEADER *sdp)
{
ACPI_TABLE_FADT *fadt;
const char *pm;
- char sep;
fadt = (ACPI_TABLE_FADT *)sdp;
printf(BEGIN_COMMENT);
@@ -914,25 +1170,17 @@ acpi_print_fadt(ACPI_TABLE_HEADER *sdp)
printf("\tDAY_ALRM=%d, MON_ALRM=%d, CENTURY=%d\n",
fadt->DayAlarm, fadt->MonthAlarm, fadt->Century);
-#define PRINTFLAG(var, flag) do { \
- if ((var) & ACPI_FADT_## flag) { \
- printf("%c%s", sep, #flag); sep = ','; \
- } \
-} while (0)
+#define PRINTFLAG(var, flag) printflag((var), ACPI_FADT_## flag, #flag)
printf("\tIAPC_BOOT_ARCH=");
- sep = '{';
PRINTFLAG(fadt->BootFlags, LEGACY_DEVICES);
PRINTFLAG(fadt->BootFlags, 8042);
PRINTFLAG(fadt->BootFlags, NO_VGA);
PRINTFLAG(fadt->BootFlags, NO_MSI);
PRINTFLAG(fadt->BootFlags, NO_ASPM);
- if (fadt->BootFlags != 0)
- printf("}");
- printf("\n");
+ PRINTFLAG_END();
printf("\tFlags=");
- sep = '{';
PRINTFLAG(fadt->Flags, WBINVD);
PRINTFLAG(fadt->Flags, WBINVD_FLUSH);
PRINTFLAG(fadt->Flags, C1_SUPPORTED);
@@ -953,8 +1201,7 @@ acpi_print_fadt(ACPI_TABLE_HEADER *sdp)
PRINTFLAG(fadt->Flags, REMOTE_POWER_ON);
PRINTFLAG(fadt->Flags, APIC_CLUSTER);
PRINTFLAG(fadt->Flags, APIC_PHYSICAL);
- if (fadt->Flags != 0)
- printf("}\n");
+ PRINTFLAG_END();
#undef PRINTFLAG
@@ -1127,6 +1374,8 @@ acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp)
acpi_handle_srat(sdp);
else if (!memcmp(sdp->Signature, ACPI_SIG_TCPA, 4))
acpi_handle_tcpa(sdp);
+ else if (!memcmp(sdp->Signature, ACPI_SIG_DMAR, 4))
+ acpi_handle_dmar(sdp);
else {
printf(BEGIN_COMMENT);
acpi_print_sdt(sdp);
diff --git a/usr.sbin/acpi/acpidump/acpidump.8 b/usr.sbin/acpi/acpidump/acpidump.8
index 1401e38..f1c7a18 100644
--- a/usr.sbin/acpi/acpidump/acpidump.8
+++ b/usr.sbin/acpi/acpidump/acpidump.8
@@ -97,6 +97,7 @@ flag, the
utility dumps contents of the following tables:
.Pp
.Bl -tag -offset indent -width 12345 -compact
+.It DMAR
.It DSDT
.It ECDT
.It FACS
diff --git a/usr.sbin/bluetooth/hcseriald/hcseriald.8 b/usr.sbin/bluetooth/hcseriald/hcseriald.8
index 111b28c..8d2dd47 100644
--- a/usr.sbin/bluetooth/hcseriald/hcseriald.8
+++ b/usr.sbin/bluetooth/hcseriald/hcseriald.8
@@ -54,7 +54,7 @@ Do not disassociate from the controlling terminal, i.e., run in foreground.
.It Fl f Ar device
Callout device name.
Example:
-.Fl f Pa /dev/cuad0 .
+.Fl f Pa /dev/cuau0 .
.It Fl h
Display usage message and exit.
.It Fl n Ar node_name
diff --git a/usr.sbin/bluetooth/hcseriald/hcseriald.c b/usr.sbin/bluetooth/hcseriald/hcseriald.c
index b811c1d..440b0d4 100644
--- a/usr.sbin/bluetooth/hcseriald/hcseriald.c
+++ b/usr.sbin/bluetooth/hcseriald/hcseriald.c
@@ -257,7 +257,7 @@ usage(void)
{
fprintf(stderr, "Usage: %s -f device -n node_name [-s speed -d -h]\n" \
"Where:\n" \
- "\t-f device tty device name, ex. /dev/cuad1\n" \
+ "\t-f device tty device name, ex. /dev/cuau1\n" \
"\t-n node_name set Netgraph node name to node_name\n" \
"\t-s speed set tty speed, ex. 115200\n" \
"\t-d run in foreground\n" \
diff --git a/usr.sbin/bsdconfig/bsdconfig b/usr.sbin/bsdconfig/bsdconfig
index 8d8245a..11ea8fc 100755
--- a/usr.sbin/bsdconfig/bsdconfig
+++ b/usr.sbin/bsdconfig/bsdconfig
@@ -31,6 +31,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/strings.subr
@@ -70,7 +71,7 @@ usage()
#
local longest_cmd
longest_cmd=$( echo "$cmd_list" | f_longest_line_length )
- f_dprintf "longest_cmd=[$longest_cmd]"
+ f_dprintf "longest_cmd=[%s]" "$longest_cmd"
#
# Determine the maximum width of terminal/console
@@ -79,7 +80,7 @@ usage()
max_size=$( stty size 2> /dev/null )
: ${max_size:="24 80"}
max_width="${max_size#*[$IFS]}"
- f_dprintf "max_width=[$max_width]"
+ f_dprintf "max_width=[%s]" "$max_width"
#
# Using the longest command-length as the width of a single column,
@@ -92,7 +93,7 @@ usage()
ncols=$(( $ncols + 1 ))
x=$(( $x + 3 + $longest_cmd ))
done
- f_dprintf "ncols=[$ncols] x=[$x]"
+ f_dprintf "ncols=[%u] x=[%u]" $ncols $x
#
# Re-format the command-list into multiple columns
@@ -117,7 +118,8 @@ usage()
{
n++
cur_col = (( n - 1 ) % ncols ) + 1
- printf "f_dprintf \"row_item[%u]=[%s]\"\n", cur_col, $0
+ printf "f_dprintf \"row_item[%u]=[%%s]\" \"%s\"\n",
+ cur_col, $0
row_item[cur_col] = $0
if ( cur_col == ncols ) print_row()
}
@@ -224,7 +226,6 @@ shift $(( $OPTIND -1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_main_menu"
[ "$SECURE" ] && f_mustberoot_init
@@ -232,14 +233,6 @@ f_dialog_title "$msg_main_menu"
# Incorporate rc-file if it exists
[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc"
-#
-# Log our operating environment for debugging purposes
-#
-export UNAME_S="$(uname -s)" # Operating System (i.e. FreeBSD)
-export UNAME_P="$(uname -p)" # Processor Architecture (i.e. i386)
-export UNAME_R="$(uname -r)" # Release Level (i.e. X.Y-RELEASE)
-f_dprintf "UNAME_S=[$UNAME_S] UNAME_P=[$UNAME_P] UNAME_R=[$UNAME_R]"
-
cd $BSDCFG_LIBE || f_die 1 "$msg_directory_not_found" "$BSDCFG_LIBE"
#
@@ -276,7 +269,7 @@ while :; do
dialog_menu_main
retval=$?
mtag=$( f_dialog_menutag )
- f_dprintf "retval=$retval mtag=[$mtag]"
+ f_dprintf "retval=%u mtag=[%s]" $retval "$mtag"
if [ $retval -eq 2 ]; then
# The Help button was pressed
@@ -298,7 +291,7 @@ while :; do
*) # Dynamically loaded menuitem
cmd=$( eval echo \"\$menu_program$mtag\" )
- f_dprintf "cmd=[$cmd]"
+ f_dprintf "cmd=[%s]" "$cmd"
$cmd ${USE_XDIALOG:+-X}
;;
diff --git a/usr.sbin/bsdconfig/console/console b/usr.sbin/bsdconfig/console/console
index 8cf12b6..5f3b7af 100755
--- a/usr.sbin/bsdconfig/console/console
+++ b/usr.sbin/bsdconfig/console/console
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
@@ -102,7 +103,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_system_console_configuration"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/console/font b/usr.sbin/bsdconfig/console/font
index 5346dd2..022952f 100755
--- a/usr.sbin/bsdconfig/console/font
+++ b/usr.sbin/bsdconfig/console/font
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -110,7 +111,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_system_console_font"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/console/keymap b/usr.sbin/bsdconfig/console/keymap
index 98a253c..5518140 100755
--- a/usr.sbin/bsdconfig/console/keymap
+++ b/usr.sbin/bsdconfig/console/keymap
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -150,7 +151,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_system_console_keymap"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/console/repeat b/usr.sbin/bsdconfig/console/repeat
index 820b0b4..93357e8 100755
--- a/usr.sbin/bsdconfig/console/repeat
+++ b/usr.sbin/bsdconfig/console/repeat
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -100,7 +101,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_system_console_keyboard_repeat_rate"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/console/saver b/usr.sbin/bsdconfig/console/saver
index 5313265..4f6729b 100755
--- a/usr.sbin/bsdconfig/console/saver
+++ b/usr.sbin/bsdconfig/console/saver
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -110,7 +111,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_system_console_screen_saver"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
@@ -167,33 +167,10 @@ while :; do
break ;;
"$msg_timeout") # Set the screen saver timeout interval
f_dialog_title "$msg_value_required"
- title="$DIALOG_TITLE"
- btitle="$DIALOG_BACKTITLE"
+ blanktime=$( f_dialog_input "$msg_enter_timeout_period" \
+ "$( f_sysrc_get blanktime )"
+ ) && f_sysrc_set blanktime "$blanktime"
f_dialog_title_restore
- prompt="$msg_enter_timeout_period"
- blanktime=$( f_sysrc_get blanktime )
- hline=""
- size=$( f_dialog_inputbox_size \
- "$title" \
- "$btitle" \
- "$prompt" \
- "$blanktime" \
- "$hline" )
- dialog_inputbox=$( $DIALOG \
- --title "$title" \
- --backtitle "$btitle" \
- --hline "$hline" \
- --ok-label "$msg_ok" \
- --cancel-label "$msg_cancel" \
- --inputbox "$prompt" $size \
- "$blanktime" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- blanktime=$( f_dialog_inputstr )
- [ $retval -eq $SUCCESS ] &&
- f_sysrc_set blanktime "$blanktime"
;;
esac
done
diff --git a/usr.sbin/bsdconfig/console/screenmap b/usr.sbin/bsdconfig/console/screenmap
index 99fa7ad..5c5e29e 100755
--- a/usr.sbin/bsdconfig/console/screenmap
+++ b/usr.sbin/bsdconfig/console/screenmap
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -102,7 +103,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_system_console_screenmap"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/console/ttys b/usr.sbin/bsdconfig/console/ttys
index 2d39a4c..e1650da 100755
--- a/usr.sbin/bsdconfig/console/ttys
+++ b/usr.sbin/bsdconfig/console/ttys
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -172,7 +173,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_system_console_terminal_type"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/diskmgmt/diskmgmt b/usr.sbin/bsdconfig/diskmgmt/diskmgmt
index 9cb5e09..27852fb 100755
--- a/usr.sbin/bsdconfig/diskmgmt/diskmgmt
+++ b/usr.sbin/bsdconfig/diskmgmt/diskmgmt
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
@@ -65,7 +66,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_mustberoot_init
#
diff --git a/usr.sbin/bsdconfig/docsinstall/docsinstall b/usr.sbin/bsdconfig/docsinstall/docsinstall
index 00aff61..52e0479 100755
--- a/usr.sbin/bsdconfig/docsinstall/docsinstall
+++ b/usr.sbin/bsdconfig/docsinstall/docsinstall
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
@@ -65,7 +66,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_mustberoot_init
#
diff --git a/usr.sbin/bsdconfig/dot/dot b/usr.sbin/bsdconfig/dot/dot
index 77a34a1..2cc659c 100755
--- a/usr.sbin/bsdconfig/dot/dot
+++ b/usr.sbin/bsdconfig/dot/dot
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="dot"
f_include_lang $BSDCFG_LIBE/include/messages.subr
diff --git a/usr.sbin/bsdconfig/examples/bsdconfigrc b/usr.sbin/bsdconfig/examples/bsdconfigrc
index a863a94..21d4264 100644
--- a/usr.sbin/bsdconfig/examples/bsdconfigrc
+++ b/usr.sbin/bsdconfig/examples/bsdconfigrc
@@ -31,5 +31,6 @@
# debugging aid for development
# f_dprintf() {
-# echo "$(date):$pgm: $1" >> $HOME/out
+# local format="$1"; shift
+# printf "$(date):$pgm:$format\n" "$@" >> $HOME/out
# }
diff --git a/usr.sbin/bsdconfig/mouse/disable b/usr.sbin/bsdconfig/mouse/disable
index d49cb50..0f41d73 100755
--- a/usr.sbin/bsdconfig/mouse/disable
+++ b/usr.sbin/bsdconfig/mouse/disable
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -65,7 +66,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_mouse_disable"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/mouse/enable b/usr.sbin/bsdconfig/mouse/enable
index 6f3d5ac..f401461 100755
--- a/usr.sbin/bsdconfig/mouse/enable
+++ b/usr.sbin/bsdconfig/mouse/enable
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -65,7 +66,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_mouse_enable"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/mouse/flags b/usr.sbin/bsdconfig/mouse/flags
index 21478de..06218ac 100755
--- a/usr.sbin/bsdconfig/mouse/flags
+++ b/usr.sbin/bsdconfig/mouse/flags
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -65,7 +66,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_mouse_flags"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
@@ -79,32 +79,10 @@ flags=$( f_sysrc_get moused_flags )
# Prompt the user with the current value
#
f_dialog_title "$msg_value_required"
-title="$DIALOG_TITLE"
-btitle="$DIALOG_BACKTITLE"
+flags=$( f_dialog_input "$msg_please_specify_the_mouse_daemon_flags" \
+ "$flags"
+ ) || f_die
f_dialog_title_restore
-hline=
-prompt="$msg_please_specify_the_mouse_daemon_flags"
-size=$( f_dialog_inputbox_size \
- "$title" \
- "$btitle" \
- "$prompt" \
- "$flags" \
- "$hline" )
-dialog_inputbox=$( eval $DIALOG \
- --title \"\$title\" \
- --backtitle \"\$btitle\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$prompt\" $size \
- \"\$flags\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
-)
-retval=$?
-setvar MENU_INPUTBOX_$$ "$dialog_inputbox"
-flags=$( f_dialog_inputstr )
-
-[ $retval -eq $SUCCESS ] || f_die
#
# Save the new value
diff --git a/usr.sbin/bsdconfig/mouse/mouse b/usr.sbin/bsdconfig/mouse/mouse
index 17cd846..95d7677 100755
--- a/usr.sbin/bsdconfig/mouse/mouse
+++ b/usr.sbin/bsdconfig/mouse/mouse
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
@@ -101,7 +102,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_please_configure_your_mouse"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/mouse/port b/usr.sbin/bsdconfig/mouse/port
index e14bf0a..87d4a0b 100755
--- a/usr.sbin/bsdconfig/mouse/port
+++ b/usr.sbin/bsdconfig/mouse/port
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -102,7 +103,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_select_your_mouse_port_from_the_following_menu"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/mouse/type b/usr.sbin/bsdconfig/mouse/type
index e4f99be..ee9c4ed 100755
--- a/usr.sbin/bsdconfig/mouse/type
+++ b/usr.sbin/bsdconfig/mouse/type
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -106,7 +107,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_select_a_protocol_type_for_your_mouse"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/networking/defaultrouter b/usr.sbin/bsdconfig/networking/defaultrouter
index cc9902d..44e522e 100755
--- a/usr.sbin/bsdconfig/networking/defaultrouter
+++ b/usr.sbin/bsdconfig/networking/defaultrouter
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/networking/routing.subr
@@ -58,7 +59,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_default_router"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/networking/devices b/usr.sbin/bsdconfig/networking/devices
index 1386e01..443294f 100755
--- a/usr.sbin/bsdconfig/networking/devices
+++ b/usr.sbin/bsdconfig/networking/devices
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -62,7 +63,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_networking_devices"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/networking/hostname b/usr.sbin/bsdconfig/networking/hostname
index db05678..231320e 100755
--- a/usr.sbin/bsdconfig/networking/hostname
+++ b/usr.sbin/bsdconfig/networking/hostname
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/networking/hostname.subr
@@ -58,7 +59,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_hostname_domain"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/networking/nameservers b/usr.sbin/bsdconfig/networking/nameservers
index c9b3004..9ebebc8 100755
--- a/usr.sbin/bsdconfig/networking/nameservers
+++ b/usr.sbin/bsdconfig/networking/nameservers
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/networking/resolv.subr
@@ -58,7 +59,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_dns_nameservers"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/networking/networking b/usr.sbin/bsdconfig/networking/networking
index fae5c9f..8acfbde 100755
--- a/usr.sbin/bsdconfig/networking/networking
+++ b/usr.sbin/bsdconfig/networking/networking
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
@@ -98,7 +99,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_network_management"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/networking/share/common.subr b/usr.sbin/bsdconfig/networking/share/common.subr
index e8970d0..e501a9c 100644
--- a/usr.sbin/bsdconfig/networking/share/common.subr
+++ b/usr.sbin/bsdconfig/networking/share/common.subr
@@ -62,4 +62,8 @@ f_nfs_mounted()
[ "$( df -t nfs )" ]
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." networking/common.subr
+
fi # ! $_NETWORKING_COMMON_SUBR
diff --git a/usr.sbin/bsdconfig/networking/share/device.subr b/usr.sbin/bsdconfig/networking/share/device.subr
index 4f870af..f77a5e7 100644
--- a/usr.sbin/bsdconfig/networking/share/device.subr
+++ b/usr.sbin/bsdconfig/networking/share/device.subr
@@ -30,6 +30,7 @@ if [ ! "$_NETWORKING_DEVICE_SUBR" ]; then _NETWORKING_DEVICE_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." networking/device.subr
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/sysrc.subr
f_include $BSDCFG_SHARE/networking/common.subr
@@ -378,11 +379,7 @@ f_dialog_menu_netdev_edit()
if f_nfs_mounted && ! f_jailed; then
local setting="$( printf "$msg_current_dhcp_status" \
"$interface" "$dhcp_status" )"
- local message="$(
- printf "$msg_nfs_mounts_may_cause_hang" \
- "$setting"
- )"
- f_dialog_msgbox "$message"
+ f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting"
continue
fi
@@ -440,8 +437,7 @@ f_dialog_menu_netdev_edit()
"$options" != "$options_orig" -o \
"$dhcp" != "$dhcp_orig" ]
then
- f_dialog_info "$( printf "$msg_saving_network_interface" \
- "$interface" )"
+ f_show_info "$msg_saving_network_interface" "$interface"
local value=
if [ "$dhcp" ]; then
@@ -462,8 +458,7 @@ f_dialog_menu_netdev_edit()
f_dialog_yesno "Would you like to bring the $interface" \
"interface up right now?"
if [ $? -eq $SUCCESS ]; then
- f_dialog_info "$( printf "$msg_bring_interface_up" \
- "$interface" )"
+ f_show_info "$msg_bring_interface_up" "$interface"
local dr="$( f_sysrc_get defaultrouter )" err
if [ "$dr" = "NO" -o ! "$dr" ]; then
@@ -501,4 +496,8 @@ f_dialog_menu_netdev_edit()
return $SUCCESS
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." networking/device.subr
+
fi # ! $_NETWORKING_DEVICE_SUBR
diff --git a/usr.sbin/bsdconfig/networking/share/hostname.subr b/usr.sbin/bsdconfig/networking/share/hostname.subr
index fed8679..959c7df 100644
--- a/usr.sbin/bsdconfig/networking/share/hostname.subr
+++ b/usr.sbin/bsdconfig/networking/share/hostname.subr
@@ -30,6 +30,7 @@ if [ ! "$_NETWORKING_HOSTNAME_SUBR" ]; then _NETWORKING_HOSTNAME_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." networking/hostname.subr
f_include $BSDCFG_SHARE/sysrc.subr
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/networking/common.subr
@@ -40,7 +41,7 @@ f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
############################################################ FUNCTIONS
-# f_dialog_validate_hostname $hostname
+# f_validate_hostname $hostname
#
# Returns zero if the given argument (a fully-qualified hostname) is compliant
# with standards set-forth in RFC's 952 and 1123 of the Network Working Group:
@@ -65,9 +66,9 @@ f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
# 3 One or more individual labels within the hostname are null.
#
# If the hostname is determined to be invalid, the appropriate error will be
-# displayed using the f_dialog_msgbox function.
+# displayed using the f_show_msg function.
#
-f_dialog_validate_hostname()
+f_validate_hostname()
{
local fqhn="$1"
@@ -95,23 +96,51 @@ f_dialog_validate_hostname()
done
)
+}
- #
- # Produce an appropriate error message if necessary.
- #
- local retval=$?
- case $retval in
- 1) f_dialog_msgbox "$( printf \
- "$msg_hostname_label_contains_invalid_chars" "$fqhn" )";;
- 2) f_dialog_msgbox "$( printf \
- "$msg_hostname_label_starts_or_ends_with_hyphen" "$fqhn" )";;
- 3) f_dialog_msgbox "$( printf \
- "$msg_hostname_label_is_null" "$fqhn" )";;
- 63) f_dialog_msgbox "$( printf \
- "$msg_hostname_label_exceeds_max_length" "$fqhn" )";;
- 255) f_dialog_msgbox "$( printf \
- "$msg_hostname_exceeds_max_length" "$fqhn" )";;
+# f_dialog_hnerror $error $hostname
+#
+# Display a msgbox with the appropriate error message for an error returned by
+# the f_validate_hostname function.
+#
+f_dialog_hnerror()
+{
+ local error="$1" fqhn="$2"
+
+ [ ${error:-0} -ne 0 ] || return $SUCCESS
+
+ case "$error" in
+ 1) f_show_msg "$msg_hostname_label_contains_invalid_chars" "$fqhn";;
+ 2) f_show_msg "$msg_hostname_label_starts_or_ends_with_hyphen" "$fqhn";;
+ 3) f_show_msg "$msg_hostname_label_is_null" "$fqhn";;
+ 63) f_show_msg "$msg_hostname_label_exceeds_max_length" "$fqhn";;
+ 255) f_show_msg "$msg_hostname_exceeds_max_length" "$fqhn";;
esac
+}
+
+# f_dialog_validate_hostname $hostname
+#
+# Returns zero if the given argument (a fully-qualified hostname) is compliant
+# with standards set-forth in RFC's 952 and 1123 of the Network Working Group:
+#
+# RFC 952 - DoD Internet host table specification
+# http://tools.ietf.org/html/rfc952
+#
+# RFC 1123 - Requirements for Internet Hosts - Application and Support
+# http://tools.ietf.org/html/rfc1123
+#
+# If the hostname is determined to be invalid, the appropriate error will be
+# displayed using the f_dialog_hnerror function above.
+#
+f_dialog_validate_hostname()
+{
+ local fqhn="$1"
+
+ f_validate_hostname "$fqhn"
+ local retval=$?
+
+ # Produce an appropriate error message if necessary.
+ [ $retval -eq $SUCCESS ] || f_dialog_hnerror $retval "$fqhn"
return $retval
}
@@ -132,41 +161,15 @@ f_dialog_input_hostname()
msg="$msg_please_enter_fqhn"
fi
- local hline="$hline_alnum_punc_tab_enter"
-
#
# Loop until the user provides taint-free input.
#
- local size height width
while :; do
-
- size=$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$hostname" \
- "$hline" )
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$hostname\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- local retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- hostname=$( f_dialog_inputstr )
-
- [ $retval -eq $SUCCESS ] || return $retval
-
+ hostname=$( f_dialog_input "$msg" "$hostname" \
+ "$hline_alnum_punc_tab_enter"
+ ) || return
# Taint-check the user's input
f_dialog_validate_hostname "$hostname" && break
-
done
#
@@ -187,7 +190,7 @@ f_dialog_input_hostname()
# the stored configuration (in rc.conf(5)).
#
if [ "$( hostname )" != "$( f_sysrc_get hostname )" ]; then
- [ ! "$USE_XDIALOG" ] && dialog_clear
+ [ ! "$USE_XDIALOG" ] && f_dialog_clear
#
# If connected via ssh(1) and performing X11-Forwarding, don't
@@ -195,10 +198,8 @@ f_dialog_input_hostname()
# "X11 connection rejected because of wrong authentication."
#
if [ "$USE_XDIALOG" -a "$SSH_CONNECTION" ]; then
- f_dialog_msgbox "$(
- printf "$msg_activate_hostname_x11warning" \
- "$( hostname )" "$hostname"
- )"
+ f_show_msg "$msg_activate_hostname_x11warning" \
+ "$( hostname )" "$hostname"
else
f_dialog_yesno "$(
printf "$msg_activate_hostname" \
@@ -211,4 +212,8 @@ f_dialog_input_hostname()
return $SUCCESS
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." networking/hostname.subr
+
fi # ! $_NETWORKING_HOSTNAME_SUBR
diff --git a/usr.sbin/bsdconfig/networking/share/ipaddr.subr b/usr.sbin/bsdconfig/networking/share/ipaddr.subr
index 65c2b98..d5398e5 100644
--- a/usr.sbin/bsdconfig/networking/share/ipaddr.subr
+++ b/usr.sbin/bsdconfig/networking/share/ipaddr.subr
@@ -30,7 +30,7 @@ if [ ! "$_NETWORKING_IPADDR_SUBR" ]; then _NETWORKING_IPADDR_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
-f_include $BSDCFG_SHARE/sysrc.subr
+f_dprintf "%s: loading includes..." networking/ipaddr.subr
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/strings.subr
f_include $BSDCFG_SHARE/networking/common.subr
@@ -104,6 +104,7 @@ f_validate_ipaddr()
[ $noctets -eq 4 ] || exit 4
)
}
+
# f_dialog_iperror $error $ipaddr
#
# Display a msgbox with the appropriate error message for an error returned by
@@ -116,14 +117,10 @@ f_dialog_iperror()
[ ${error:-0} -ne 0 ] || return $SUCCESS
case "$error" in
- 1) f_dialog_msgbox "$( printf \
- "$msg_ipv4_addr_octet_contains_invalid_chars" "$ip" )";;
- 2) f_dialog_msgbox "$( printf \
- "$msg_ipv4_addr_octet_is_null" "$ip" )";;
- 3) f_dialog_msgbox "$( printf \
- "$msg_ipv4_addr_octet_exceeds_max_value" "$ip" )";;
- 4) f_dialog_msgbox "$( printf \
- "$msg_ipv4_addr_octet_missing_or_extra" "$ip" )";;
+ 1) f_show_msg "$msg_ipv4_addr_octet_contains_invalid_chars" "$ip";;
+ 2) f_show_msg "$msg_ipv4_addr_octet_is_null" "$ip";;
+ 3) f_show_msg "$msg_ipv4_addr_octet_exceeds_max_value" "$ip";;
+ 4) f_show_msg "$msg_ipv4_addr_octet_missing_or_extra" "$ip";;
esac
}
@@ -294,14 +291,10 @@ f_dialog_ip6error()
[ ${error:-0} -ne 0 ] || return $SUCCESS
case "$error" in
- 1) f_dialog_msgbox "$( printf \
- "$msg_ipv6_addr_segment_contains_invalid_chars" "$ip" )";;
- 2) f_dialog_msgbox "$( printf \
- "$msg_ipv6_addr_too_many_null_segments" "$ip" )";;
- 3) f_dialog_msgbox "$( printf \
- "$msg_ipv6_addr_segment_contains_too_many_chars" "$ip" )";;
- 4) f_dialog_msgbox "$( printf \
- "$msg_ipv6_addr_too_few_or_extra_segments" "$ip" )";;
+ 1) f_show_msg "$msg_ipv6_addr_segment_contains_invalid_chars" "$ip";;
+ 2) f_show_msg "$msg_ipv6_addr_too_many_null_segments" "$ip";;
+ 3) f_show_msg "$msg_ipv6_addr_segment_contains_too_many_chars" "$ip";;
+ 4) f_show_msg "$msg_ipv6_addr_too_few_or_extra_segments" "$ip";;
*)
if [ $(( $error & 0xF )) -eq 5 ]; then
# IPv4 at the end of IPv6 address is invalid
@@ -353,48 +346,26 @@ f_dialog_input_ipaddr()
if f_nfs_mounted && ! f_jailed; then
local setting="$( printf "$msg_current_ipaddr" \
"$interface" "$_ipaddr" )"
- local message="$( printf "$msg_nfs_mounts_may_cause_hang" \
- "$setting" )"
- f_dialog_msgbox "$message"
+ f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting"
return $FAILURE
fi
local msg="$( printf "$msg_please_enter_new_ip_addr" "$interface" )"
- local hline="$hline_num_punc_tab_enter"
- local size="$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$_ipaddr" \
- "$hline" )"
#
# Loop until the user provides taint-free input.
#
+ local retval
while :; do
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$_ipaddr\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- local retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- _input=$( f_dialog_inputstr )
-
#
# Return error status if:
- # - User has not made any changes to the given value
# - User has either pressed ESC or chosen Cancel/No
+ # - User has not made any changes to the given value
#
+ _input=$( f_dialog_input "$msg" "$_ipaddr" \
+ "$hline_num_punc_tab_enter"
+ ) || return
[ "$_ipaddr" = "$_input" ] && return $FAILURE
- [ $retval -eq $SUCCESS ] || return $retval
# Return success if NULL value was entered
[ "$_input" ] || return $SUCCESS
@@ -441,4 +412,8 @@ f_dialog_input_ipaddr()
return $SUCCESS
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." networking/ipaddr.subr
+
fi # ! $_NETWORKING_IPADDR_SUBR
diff --git a/usr.sbin/bsdconfig/networking/share/media.subr b/usr.sbin/bsdconfig/networking/share/media.subr
index e7da98a..eed8364a 100644
--- a/usr.sbin/bsdconfig/networking/share/media.subr
+++ b/usr.sbin/bsdconfig/networking/share/media.subr
@@ -30,6 +30,7 @@ if [ ! "$_NETWORKING_MEDIA_SUBR" ]; then _NETWORKING_MEDIA_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." networking/media.subr
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/strings.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -114,9 +115,7 @@ f_dialog_input_options()
if f_nfs_mounted && ! f_jailed; then
local setting="$( printf "$msg_current_options" \
"$interface" "$options" )"
- local message="$( printf "$msg_nfs_mounts_may_cause_hang" \
- "$setting" )"
- f_dialog_msgbox "$message"
+ f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting"
return $FAILURE
fi
@@ -165,9 +164,7 @@ f_dialog_menu_media_options()
if f_nfs_mounted && ! f_jailed; then
local setting="$( printf "$msg_current_options" \
"$interface" "$_options" )"
- local message="$( printf "$msg_nfs_mounts_may_cause_hang" \
- "$setting" )"
- f_dialog_msgbox "$message"
+ f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting"
return $FAILURE
fi
@@ -238,4 +235,8 @@ f_dialog_menu_media_options()
return $retval
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." networking/media.subr
+
fi # ! $_NETWORKING_MEDIA_SUBR
diff --git a/usr.sbin/bsdconfig/networking/share/netmask.subr b/usr.sbin/bsdconfig/networking/share/netmask.subr
index 2f2b378..3a8665d 100644
--- a/usr.sbin/bsdconfig/networking/share/netmask.subr
+++ b/usr.sbin/bsdconfig/networking/share/netmask.subr
@@ -30,6 +30,7 @@ if [ ! "$_NETWORKING_NETMASK_SUBR" ]; then _NETWORKING_NETMASK_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." networking/netmask.subr
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/strings.subr
f_include $BSDCFG_SHARE/networking/common.subr
@@ -69,7 +70,7 @@ f_ifconfig_netmask()
echo $netmask
}
-# f_dialog_validate_netmask $netmask
+# f_validate_netmask $netmask
#
# Returns zero if the given argument (a subnet mask) is of the proper format.
#
@@ -85,10 +86,7 @@ f_ifconfig_netmask()
# invalid integer (only 0,128,192,224,240,248,252,254,255 are
# valid integers).
#
-# If the subnet mask is determined to be invalid, the appropriate error will be
-# displayed using the f_dialog_msgbox function.
-#
-f_dialog_validate_netmask()
+f_validate_netmask()
{
local mask="$1"
@@ -121,23 +119,44 @@ f_dialog_validate_netmask()
[ $nfields -eq 4 ] || exit 4
)
+}
- #
- # Produce an appropriate error message if necessary.
- #
- local retval=$?
- case $retval in
- 1) f_dialog_msgbox "$( printf \
- "$msg_ipv4_mask_field_contains_invalid_chars" "$mask" )";;
- 2) f_dialog_msgbox "$( printf \
- "$msg_ipv4_mask_field_is_null" "$mask" )";;
- 3) f_dialog_msgbox "$( printf \
- "$msg_ipv4_mask_field_exceeds_max_value" "$mask" )";;
- 4) f_dialog_msgbox "$( printf \
- "$msg_ipv4_mask_field_missing_or_extra" "$mask" )";;
- 5) f_dialog_msgbox "$( printf \
- "$msg_ipv4_mask_field_invalid_value" "$mask" )";;
+# f_dialog_maskerror $error $netmask
+#
+# Display a msgbox with the appropriate error message for an error returned by
+# the f_validate_netmask function.
+#
+f_dialog_maskerror()
+{
+ local error="$1" netmask="$2"
+
+ [ ${error:-0} -ne 0 ] || return $SUCCESS
+
+ case "$error" in
+ 1) f_show_msg "$msg_ipv4_mask_field_contains_invalid_chars" "$mask";;
+ 2) f_show_msg "$msg_ipv4_mask_field_is_null" "$mask";;
+ 3) f_show_msg "$msg_ipv4_mask_field_exceeds_max_value" "$mask";;
+ 4) f_show_msg "$msg_ipv4_mask_field_missing_or_extra" "$mask";;
+ 5) f_show_msg "$msg_ipv4_mask_field_invalid_value" "$mask";;
esac
+}
+
+# f_dialog_validate_netmask $netmask
+#
+# Returns zero if the given argument (a subnet mask) is of the proper format.
+#
+# If the subnet mask is determined to be invalid, the appropriate error will be
+# displayed using the f_dialog_maskerror function above.
+#
+f_dialog_validate_netmask()
+{
+ local netmask="$1"
+
+ f_validate_netmask "$netmask"
+ local retval=$?
+
+ # Produce an appropriate error message if necessary.
+ [ $retval -eq $SUCCESS ] || f_dialog_maskerror $retval "$netmask"
return $retval
}
@@ -158,48 +177,24 @@ f_dialog_input_netmask()
if f_nfs_mounted && ! f_jailed; then
local setting="$( printf "$msg_current_subnet" \
"$interface" "$_netmask" )"
- local message="$( printf "$msg_nfs_mounts_may_cause_hang" \
- "$setting" )"
- f_dialog_msgbox "$message"
+ f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting"
return $FAILURE
fi
- local msg="$( printf "$msg_please_enter_subnet_mask" "$interface" )"
- local hline="$hline_num_punc_tab_enter"
- local size="$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$_netmask" \
- "$hline" )"
-
#
# Loop until the user provides taint-free input.
#
+ local msg="$( printf "$msg_please_enter_subnet_mask" "$interface" )"
while :; do
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$_netmask\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- local retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- _input=$( f_dialog_inputstr )
-
#
# Return error status if:
- # - User has not made any changes to the given value
# - User has either pressed ESC or chosen Cancel/No
+ # - User has not made any changes to the given value
#
+ _input=$( f_dialog_input "$msg" "$_netmask" \
+ "$hline_num_punc_tab_enter"
+ ) || return
[ "$_netmask" = "$_input" ] && return $FAILURE
- [ $retval -eq $SUCCESS ] || return $retval
# Return success if NULL value was entered
[ "$_input" ] || return $SUCCESS
@@ -215,4 +210,8 @@ f_dialog_input_netmask()
netmask="$_netmask"
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." networking/netmask.subr
+
fi # ! $_NETWORKING_NETMASK_SUBR
diff --git a/usr.sbin/bsdconfig/networking/share/resolv.subr b/usr.sbin/bsdconfig/networking/share/resolv.subr
index 154748b..7d9af3b 100644
--- a/usr.sbin/bsdconfig/networking/share/resolv.subr
+++ b/usr.sbin/bsdconfig/networking/share/resolv.subr
@@ -30,6 +30,7 @@ if [ ! "$_NETWORKING_RESOLV_SUBR" ]; then _NETWORKING_RESOLV_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." networking/resolv.subr
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/strings.subr
f_include $BSDCFG_SHARE/networking/common.subr
@@ -329,36 +330,13 @@ f_dialog_input_nameserver()
msg="$msg_please_enter_nameserver"
fi
- local hline="$hline_num_punc_tab_enter"
- local size="$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$ns" \
- "$hline" )"
-
#
# Loop until the user provides taint-free input.
#
while :; do
-
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$ns\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- local retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- new_ns=$( f_dialog_inputstr )
-
- [ $retval -eq $SUCCESS ] || return $retval
+ new_ns=$( f_dialog_input "$msg" "$ns" \
+ "$hline_num_punc_tab_enter"
+ ) || return
# Take only the first "word" of the user's input
new_ns="${new_ns%%[$IFS]*}"
@@ -369,7 +347,6 @@ f_dialog_input_nameserver()
# Update prompt to allow user to re-edit previous entry
ns="$new_ns"
-
done
#
@@ -512,4 +489,8 @@ f_dialog_menu_nameservers()
done
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." networking/resolv.subr
+
fi # ! $_NETWORKING_RESOLV_SUBR
diff --git a/usr.sbin/bsdconfig/networking/share/routing.subr b/usr.sbin/bsdconfig/networking/share/routing.subr
index b8ccdcd..3990c03 100644
--- a/usr.sbin/bsdconfig/networking/share/routing.subr
+++ b/usr.sbin/bsdconfig/networking/share/routing.subr
@@ -30,6 +30,7 @@ if [ ! "$_NETWORKING_ROUTING_SUBR" ]; then _NETWORKING_ROUTING_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." networking/routing.subr
f_include $BSDCFG_SHARE/sysrc.subr
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/networking/common.subr
@@ -91,41 +92,20 @@ f_dialog_input_defaultrouter()
if f_nfs_mounted && ! f_jailed; then
local setting="$( printf "$msg_current_default_router" \
"$defaultrouter" )"
- local message="$( printf "$msg_nfs_mounts_may_cause_hang" \
- "$setting" )"
- f_dialog_msgbox "$message"
+ f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting"
return $FAILURE
fi
- local msg="$msg_please_enter_default_router"
- local hline="$hline_num_punc_tab_enter"
- local size="$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$defaultrouter" \
- "$hline" )"
-
#
# Loop until the user provides taint-free input.
#
+ local retval
while :; do
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$defaultrouter\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
+ defaultrouter=$( f_dialog_input \
+ "$msg_please_enter_default_router" \
+ "$defaultrouter" "$hline_num_punc_tab_enter"
)
-
- local retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- defaultrouter=$( f_dialog_inputstr )
-
+ retval=$?
[ "$defaultrouter" ] || return $SUCCESS
[ $retval -eq $SUCCESS ] || return $retval
@@ -168,4 +148,8 @@ f_dialog_input_defaultrouter()
fi
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." networking/routing.subr
+
fi # ! $_NETWORKING_ROUTING_SUBR
diff --git a/usr.sbin/bsdconfig/password/password b/usr.sbin/bsdconfig/password/password
index c060b50..6b9e57d 100755
--- a/usr.sbin/bsdconfig/password/password
+++ b/usr.sbin/bsdconfig/password/password
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/password/password.subr
@@ -64,7 +65,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_root_password"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/password/share/password.subr b/usr.sbin/bsdconfig/password/share/password.subr
index a0d1c50..bf83df7 100644
--- a/usr.sbin/bsdconfig/password/share/password.subr
+++ b/usr.sbin/bsdconfig/password/share/password.subr
@@ -30,6 +30,7 @@ if [ ! "$_PASSWORD_PASSWORD_SUBR" ]; then _PASSWORD_PASSWORD_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." password/password.subr
f_include $BSDCFG_SHARE/dialog.subr
BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="040.password"
@@ -124,4 +125,8 @@ f_dialog_input_password()
return $SUCCESS
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." password/password.subr
+
fi # ! $_PASSWORD_PASSWORD_SUBR
diff --git a/usr.sbin/bsdconfig/security/kern_securelevel b/usr.sbin/bsdconfig/security/kern_securelevel
index e20e105..67fd1aa 100755
--- a/usr.sbin/bsdconfig/security/kern_securelevel
+++ b/usr.sbin/bsdconfig/security/kern_securelevel
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -105,7 +106,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_securelevels_menu_title"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/security/security b/usr.sbin/bsdconfig/security/security
index 1a3fefc..f503e51 100755
--- a/usr.sbin/bsdconfig/security/security
+++ b/usr.sbin/bsdconfig/security/security
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -120,7 +121,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_system_security_options_menu"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/share/common.subr b/usr.sbin/bsdconfig/share/common.subr
index 8050939..071325c 100644
--- a/usr.sbin/bsdconfig/share/common.subr
+++ b/usr.sbin/bsdconfig/share/common.subr
@@ -27,6 +27,15 @@ if [ ! "$_COMMON_SUBR" ]; then _COMMON_SUBR=1
#
# $FreeBSD$
#
+############################################################ CONFIGURATION
+
+#
+# Default file descriptors to link to stdout/stderr for passthru allowing
+# redirection within a sub-shell to bypass directly to the terminal.
+#
+: ${TERMINAL_STDOUT_PASSTHRU:=3}}
+: ${TERMINAL_STDERR_PASSTHRU:=4}}
+
############################################################ GLOBALS
#
@@ -46,15 +55,29 @@ ARGV="$@"
SUCCESS=0
FAILURE=1
+#
+# Operating environment details
+#
+export UNAME_S="$(uname -s)" # Operating System (i.e. FreeBSD)
+export UNAME_P="$(uname -p)" # Processor Architecture (i.e. i386)
+export UNAME_R="$(uname -r)" # Release Level (i.e. X.Y-RELEASE)
+
############################################################ FUNCTIONS
#
-# This is an empty function by default, to use it, copy
-# /usr/share/examples/bsdconfig/bsdconfigrc to $HOME/.bsdconfigrc
+# Sensible debug function. Override in ~/.bsdconfigrc if desired.
+# See /usr/share/examples/bsdconfig/bsdconfigrc for example.
#
f_dprintf()
{
- : this page intentionally left blank
+ [ "$debug" ] || return $SUCCESS
+ local fmt="$1"; shift
+ case "$debugFile" in ""|+*)
+ printf "DEBUG: $fmt${fmt:+\n}" "$@" >&${TERMINAL_STDOUT_PASSTHRU:-1}
+ esac
+ [ "${debugFile#+}" ] &&
+ printf "DEBUG: $fmt${fmt:+\n}" "$@" >> "${debugFile#+}"
+ return $SUCCESS
}
# f_err $fmt [ $opts ... ]
@@ -63,7 +86,7 @@ f_dprintf()
#
f_err()
{
- printf "$@" >&2
+ printf "$@" >&${TERMINAL_STDERR_PASSTHRU:-2}
}
# f_quietly $command [ $arguments ... ]
@@ -119,6 +142,27 @@ f_interrupt()
f_die
}
+# f_show_info $fmt [ $opts ... ]
+#
+# Display a message in a dialog infobox using printf(1) syntax.
+#
+f_show_info()
+{
+ local msg
+ msg=$( printf "$@" )
+
+ #
+ # Use f_dialog_infobox from dialog.subr if possible, otherwise fall
+ # back to dialog(1) (without options, making it obvious when using
+ # un-aided system dialog).
+ #
+ if f_have f_dialog_info; then
+ f_dialog_info "$msg"
+ else
+ dialog --infobox "$msg" 0 0
+ fi
+}
+
# f_show_msg $fmt [ $opts ... ]
#
# Display a message in a dialog box using printf(1) syntax.
@@ -181,6 +225,7 @@ f_show_help()
f_include()
{
local file="$1"
+ f_dprintf "f_include: file=[%s]" "$file"
. "$file" || exit $?
}
@@ -202,7 +247,7 @@ f_include_lang()
local file="$1"
local lang="${LANG:-$LC_ALL}"
- f_dprintf "lang=[$lang]"
+ f_dprintf "f_include_lang: file=[%s] lang=[%s]" "$file" "$lang"
if [ -f "$file.$lang" ]; then
. "$file.$lang" || exit $?
else
@@ -247,7 +292,7 @@ f_usage()
local file="$1"
local lang="${LANG:-$LC_ALL}"
- f_dprintf "lang=[$lang]"
+ f_dprintf "f_usage: file=[%s] lang=[%s]" "$file" "$lang"
shift 1 # file
@@ -300,7 +345,7 @@ f_index_file()
local keyword="$1"
local lang="${LANG:-$LC_ALL}"
- f_dprintf "lang=[$lang]"
+ f_dprintf "f_index_file: keyword=[%s] lang=[%s]" "$keyword" "$lang"
if [ "$lang" ]; then
awk -v keyword="$keyword" "$f_index_file_awk" \
@@ -362,7 +407,8 @@ f_index_menusel_keyword()
local indexfile="$1" pgm="$2"
local lang="${LANG:-$LC_ALL}"
- f_dprintf "lang=[$lang]"
+ f_dprintf "f_index_menusel_keyword: index=[%s] pgm=[%s] lang=[%s]" \
+ "$indexfile" "$pgm" "$lang"
if [ -f "$indexfile.$lang" ]; then
awk -v pgm="$pgm" \
@@ -424,7 +470,8 @@ f_index_menusel_command()
local indexfile="$1" keyword="$2" command
local lang="${LANG:-$LC_ALL}"
- f_dprintf "lang=[$lang]"
+ f_dprintf "f_index_menusel_command: index=[%s] key=[%s] lang=[%s]" \
+ "$indexfile" "$keyword" "$lang"
if [ -f "$indexfile.$lang" ]; then
command=$( awk -v key="$keyword" \
@@ -463,4 +510,42 @@ trap 'f_die' SIGTERM SIGPIPE SIGXCPU SIGXFSZ \
SIGFPE SIGTRAP SIGABRT SIGSEGV
trap '' SIGALRM SIGPROF SIGUSR1 SIGUSR2 SIGHUP SIGVTALRM
+#
+# Clone terminal stdout/stderr so we can redirect to it from within sub-shells
+#
+eval exec $TERMINAL_STDOUT_PASSTHRU\>\&1
+eval exec $TERMINAL_STDERR_PASSTHRU\>\&2
+
+#
+# Make debugging persistant if set
+#
+[ "$debug" ] && export debug
+
+#
+# Truncate the debug file upon initialization (now). Note that we will trim a
+# leading plus (`+') from the value of debugFile to support persistant meaning
+# that f_dprintf() should print both to standard output and $debugFile (minus
+# the leading plus, of course).
+#
+_debug_file="${debugFile#+}"
+if [ "$_debug_file" ]; then
+ if ( umask 022 && :> "$_debug_file" ); then
+ f_dprintf "Successfully initialized debugFile \`%s'" \
+ "$_debug_file"
+ else
+ unset debugFile
+ f_dprintf "Unable to initialize debugFile \`%s'" \
+ "$_debug_file"
+ fi
+fi
+unset _debug_file
+
+#
+# Log our operating environment for debugging purposes
+#
+f_dprintf "UNAME_S=[%s] UNAME_P=[%s] UNAME_R=[%s]" \
+ "$UNAME_S" "$UNAME_P" "$UNAME_R"
+
+f_dprintf "%s: Successfully loaded." common.subr
+
fi # ! $_COMMON_SUBR
diff --git a/usr.sbin/bsdconfig/share/dialog.subr b/usr.sbin/bsdconfig/share/dialog.subr
index bf10388..f614be2 100644
--- a/usr.sbin/bsdconfig/share/dialog.subr
+++ b/usr.sbin/bsdconfig/share/dialog.subr
@@ -30,6 +30,7 @@ if [ ! "$_DIALOG_SUBR" ]; then _DIALOG_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." dialog.subr
f_include $BSDCFG_SHARE/strings.subr
BSDCFG_LIBE="/usr/libexec/bsdconfig"
@@ -42,7 +43,7 @@ f_include_lang $BSDCFG_LIBE/include/messages.subr
# execution of dialog from within a sub-shell (so-long as its standard output
# is explicitly redirected to this file descriptor).
#
-: ${DIALOG_TERMINAL_PASSTHRU_FD:=3}
+: ${DIALOG_TERMINAL_PASSTHRU_FD:=${TERMINAL_STDOUT_PASSTHRU:-3}}
############################################################ GLOBALS
@@ -76,6 +77,11 @@ unset XDIALOG_INFOBOX_TIMEOUT
#
: ${DIALOG_SELF_INITIALIZE=1}
+#
+# Default terminal size (used if/when running without a controlling terminal)
+#
+: ${DEFAULT_TERMINAL_SIZE:=24 80}
+
############################################################ GENERIC FUNCTIONS
# f_dialog_title [$new_title]
@@ -192,7 +198,8 @@ f_dialog_infobox_size()
max_size="$XDIALOG_MAXSIZE" # see CONFIGURATION
else
min_width=24
- max_size=$( stty size ) # usually "24 80"
+ max_size=$( stty size 2> /dev/null ) # usually "24 80"
+ : ${max_size:=$DEFAULT_TERMINAL_SIZE}
fi
local max_height="${max_size%%[$IFS]*}"
@@ -324,7 +331,8 @@ f_dialog_buttonbox_size()
if [ "$USE_XDIALOG" ]; then
max_size="$XDIALOG_MAXSIZE" # see CONFIGURATION
else
- max_size=$( stty size ) # usually "24 80"
+ max_size=$( stty size 2> /dev/null ) # usually "24 80"
+ : ${max_size:=$DEFAULT_TERMINAL_SIZE}
fi
local max_height="${max_size%%[$IFS]*}"
[ $height -le $max_height ] || height=$max_height
@@ -362,7 +370,8 @@ f_dialog_inputbox_size()
max_size="$XDIALOG_MAXSIZE" # see CONFIGURATION
else
min_width=24
- max_size=$( stty size ) # usually "24 80"
+ max_size=$( stty size 2> /dev/null ) # usually "24 80"
+ : ${max_size:=$DEFAULT_TERMINAL_SIZE}
fi
local max_height="${max_size%%[$IFS]*}"
local max_width="${max_size##*[$IFS]}"
@@ -471,6 +480,7 @@ f_xdialog_2inputsbox_size()
# Add height for a second inputbox
height=$(( $height + 2 ))
+ [ $height -le $max_height ] || height=$max_height
#
# Bump width for second initial text (if not already at maximum width).
@@ -520,7 +530,8 @@ f_dialog_menu_size()
else
min_width=24
min_rows=0
- max_size=$( stty size ) # usually "24 80"
+ max_size=$( stty size 2> /dev/null ) # usually "24 80"
+ : ${max_size:=$DEFAULT_TERMINAL_SIZE}
fi
local max_width="${max_size##*[$IFS]}"
@@ -602,7 +613,8 @@ f_dialog_menu_with_help_size()
else
min_width=24
min_rows=0
- max_size=$( stty size ) # usually "24 80"
+ max_size=$( stty size 2> /dev/null ) # usually "24 80"
+ : ${max_size:=$DEFAULT_TERMINAL_SIZE}
fi
local max_width="${max_size##*[$IFS]}"
@@ -701,7 +713,8 @@ f_dialog_radiolist_size()
else
min_width=24
min_rows=0
- max_size=$( stty size ) # usually "24 80"
+ max_size=$( stty size 2> /dev/null ) # usually "24 80"
+ : ${max_size:=$DEFAULT_TERMINAL_SIZE}
fi
local max_width="${max_size##*[$IFS]}"
@@ -787,7 +800,8 @@ f_dialog_calendar_size()
else
min_height=0
min_width=40
- max_size=$( stty size ) # usually "24 80"
+ max_size=$( stty size 2> /dev/null ) # usually "24 80"
+ : ${max_size:=$DEFAULT_TERMINAL_SIZE}
fi
local max_height="${max_size%%[$IFS]*}"
local max_width="${max_size##*[$IFS]}"
@@ -865,7 +879,8 @@ f_dialog_timebox_size()
else
min_height=0
min_width=20
- max_size=$( stty size ) # usually "24 80"
+ max_size=$( stty size 2> /dev/null ) # usually "24 80"
+ : ${max_size:=$DEFAULT_TERMINAL_SIZE}
fi
local max_height="${max_size%%[$IFS]*}"
local max_width="${max_size##*[$IFS]}"
@@ -923,7 +938,7 @@ f_dialog_clear()
# f_dialog_info $info_text ...
#
# Throw up a dialog(1) infobox. The infobox remains until another dialog is
-# displayed or `dialog --clear' (or dialog_clear) is called.
+# displayed or `dialog --clear' (or f_dialog_clear) is called.
#
f_dialog_info()
{
@@ -1115,7 +1130,7 @@ f_dialog_noyes()
# f_dialog_inputstr
#
# Obtain the inputstr entered by the user from the most recently displayed
-# dialog(1) inputbox and clean up any temporary files.
+# dialog(1) inputbox and clean up any temporary files/variables.
#
f_dialog_inputstr()
{
@@ -1138,12 +1153,58 @@ f_dialog_inputstr()
return $SUCCESS
}
+# f_dialog_input $prompt [$init [$hline]]
+#
+# Prompt the user with a dialog(1) inputbox to enter some value. The inputbox
+# remains until the the user presses ENTER or ESC, or otherwise ends the
+# editing session, by selecting `Cancel' for example.
+#
+# If the user presses ENTER, the exit status is zero (success), otherwise if
+# the user presses ESC the exit status is 255, or if the user chose Cancel, the
+# exit status is instead 1.
+#
+# NOTE: The hline should correspond to the type of data you want from the user.
+# NOTE: Should not be used to edit multiline values.
+#
+f_dialog_input()
+{
+ local prompt="$1" init="$2" hline="$3"
+ local size="$( f_dialog_inputbox_size \
+ "$DIALOG_TITLE" \
+ "$DIALOG_BACKTITLE" \
+ "$prompt" \
+ "$init" \
+ "$hline" )"
+
+ local opterm="--"
+ [ "$USE_XDIALOG" ] && opterm=
+
+ local dialog_input
+ dialog_input=$(
+ eval $DIALOG \
+ --title \"\$DIALOG_TITLE\" \
+ --backtitle \"\$DIALOG_BACKTITLE\" \
+ --hline \"\$hline\" \
+ --ok-label \"\$msg_ok\" \
+ --cancel-label \"\$msg_cancel\" \
+ --inputbox \"\$prompt\" $size \
+ $opterm \"\$init\" \
+ 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
+ )
+ local retval=$?
+
+ setvar DIALOG_INPUTBOX_$$ "$dialog_input"
+ f_dialog_inputstr
+
+ return $retval
+}
+
############################################################ MENU FUNCTIONS
# f_dialog_menutag
#
# Obtain the menutag chosen by the user from the most recently displayed
-# dialog(1) menu and clean up any temporary files.
+# dialog(1) menu and clean up any temporary files/variables.
#
f_dialog_menutag()
{
@@ -1427,10 +1488,22 @@ f_dialog_init()
DIALOG_BACKTITLE="$_DIALOG_TITLE"
unset _DIALOG_TITLE
fi
+
+ f_dprintf "f_dialog_init: dialog(1) API initialized."
}
############################################################ MAIN
-[ "$DIALOG_SELF_INITIALIZE" ] && f_dialog_init
+#
+# Self-initialize unless requested otherwise
+#
+f_dprintf "%s: DIALOG_SELF_INITIALIZE=[%s]" \
+ dialog.subr "$DIALOG_SELF_INITIALIZE"
+case "$DIALOG_SELF_INITIALIZE" in
+""|0|[Nn][Oo]|[Oo][Ff][Ff]|[Ff][Aa][Ll][Ss][Ee]) : do nothing ;;
+*) f_dialog_init
+esac
+
+f_dprintf "%s: Successfully loaded." dialog.subr
fi # ! $_DIALOG_SUBR
diff --git a/usr.sbin/bsdconfig/share/mustberoot.subr b/usr.sbin/bsdconfig/share/mustberoot.subr
index ac0fd76..ebce9c1 100644
--- a/usr.sbin/bsdconfig/share/mustberoot.subr
+++ b/usr.sbin/bsdconfig/share/mustberoot.subr
@@ -30,6 +30,7 @@ if [ ! "$_MUSTBEROOT_SUBR" ]; then _MUSTBEROOT_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." mustberoot.subr
f_include $BSDCFG_SHARE/dialog.subr
BSDCFG_LIBE="/usr/libexec/bsdconfig"
@@ -338,16 +339,14 @@ f_authenticate_some_user()
case "$user" in
root|toor)
nfailures=$(( $nfailures + 1 ))
- f_dialog_msgbox "$( printf \
- "$msg_user_disallowed" "$user" )"
+ f_show_msg "$msg_user_disallowed" "$user"
continue
esac
fi
if ! f_quietly id "$user"; then
nfailures=$(( $nfailures + 1 ))
if [ "$SECURE_DIVULGE_UNKNOWN_USER" ]; then
- f_dialog_msgbox "$( printf \
- "$msg_unknown_user" "$user" )"
+ f_show_msg "$msg_unknown_user" "$user"
elif [ $nfailures -lt $PASSWD_TRIES ]; then
f_dialog_info "$msg_sorry_try_again"
sleep 1
@@ -421,4 +420,8 @@ f_mustberoot_init()
fi
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." mustberoot.subr
+
fi # ! $_MUSTBEROOT_SUBR
diff --git a/usr.sbin/bsdconfig/share/strings.subr b/usr.sbin/bsdconfig/share/strings.subr
index d11a9a2..6fe0f32 100644
--- a/usr.sbin/bsdconfig/share/strings.subr
+++ b/usr.sbin/bsdconfig/share/strings.subr
@@ -101,4 +101,6 @@ f_isinteger()
( : $((0/$arg)) ) > /dev/null 2>&1
}
+f_dprintf "%s: Successfully loaded." strings.subr
+
fi # ! $_STRINGS_SUBR
diff --git a/usr.sbin/bsdconfig/share/sysrc.subr b/usr.sbin/bsdconfig/share/sysrc.subr
index 1ee70e6..36a550e 100644
--- a/usr.sbin/bsdconfig/share/sysrc.subr
+++ b/usr.sbin/bsdconfig/share/sysrc.subr
@@ -32,7 +32,10 @@ BSDCFG_SHARE="/usr/share/bsdconfig"
[ "$_COMMON_SUBR" ] || . $BSDCFG_SHARE/common.subr || exit 1
BSDCFG_LIBE="/usr/libexec/bsdconfig"
-[ ! "$_SYSRC_JAILED" ] && f_include_lang $BSDCFG_LIBE/include/messages.subr
+if [ ! "$_SYSRC_JAILED" ]; then
+ f_dprintf "%s: loading includes..." sysrc.subr
+ f_include_lang $BSDCFG_LIBE/include/messages.subr
+fi
############################################################ CONFIGURATION
@@ -623,4 +626,8 @@ f_sysrc_delete()
done
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." sysrc.subr
+
fi # ! $_SYSRC_SUBR
diff --git a/usr.sbin/bsdconfig/startup/misc b/usr.sbin/bsdconfig/startup/misc
index 6407d08..626697a 100755
--- a/usr.sbin/bsdconfig/startup/misc
+++ b/usr.sbin/bsdconfig/startup/misc
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -253,34 +254,11 @@ dialog_menu_main()
#
dialog_input_value()
{
- local hline="$hline_alnum_tab_enter"
- local size prompt="$1" _input="$2"
+ local prompt="$1" _input="$2"
f_dialog_title "$msg_value_required"
-
- size=$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$prompt" \
- "$_input" \
- "$hline" )
-
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$prompt\" $size \
- \"\$_input\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- _input=$( f_dialog_inputstr )
-
+ _input=$( f_dialog_input "$prompt" "$_input" "$hline_alnum_tab_enter" )
+ local retval=$?
f_dialog_title_restore
# Return if user has either pressed ESC or chosen Cancel/No
@@ -308,7 +286,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_miscellaneous_startup_services"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/startup/rcadd b/usr.sbin/bsdconfig/startup/rcadd
index 13e5fb3..3bea670 100755
--- a/usr.sbin/bsdconfig/startup/rcadd
+++ b/usr.sbin/bsdconfig/startup/rcadd
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/startup/rcconf.subr
@@ -106,7 +107,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_add_startup_directive"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/startup/rcconf b/usr.sbin/bsdconfig/startup/rcconf
index 34454ac..d09874b 100755
--- a/usr.sbin/bsdconfig/startup/rcconf
+++ b/usr.sbin/bsdconfig/startup/rcconf
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -205,7 +206,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_view_edit_startup_configuration"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/startup/rcdelete b/usr.sbin/bsdconfig/startup/rcdelete
index 8d29f87..02ec049 100755
--- a/usr.sbin/bsdconfig/startup/rcdelete
+++ b/usr.sbin/bsdconfig/startup/rcdelete
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -280,7 +281,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_delete_startup_directives"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/startup/rcedit b/usr.sbin/bsdconfig/startup/rcedit
index fa43291..0114368 100755
--- a/usr.sbin/bsdconfig/startup/rcedit
+++ b/usr.sbin/bsdconfig/startup/rcedit
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/startup/rcedit.subr
@@ -58,7 +59,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/startup/rcvar b/usr.sbin/bsdconfig/startup/rcvar
index 8097123..8f27b51 100755
--- a/usr.sbin/bsdconfig/startup/rcvar
+++ b/usr.sbin/bsdconfig/startup/rcvar
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -167,7 +168,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_toggle_startup_services"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/startup/share/rcconf.subr b/usr.sbin/bsdconfig/startup/share/rcconf.subr
index 16cb290..8878d2c 100644
--- a/usr.sbin/bsdconfig/startup/share/rcconf.subr
+++ b/usr.sbin/bsdconfig/startup/share/rcconf.subr
@@ -30,6 +30,7 @@ if [ ! "$_STARTUP_RCCONF_SUBR" ]; then _STARTUP_RCCONF_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." startup/rcconf.subr
f_include $BSDCFG_SHARE/sysrc.subr
BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="140.startup"
@@ -418,39 +419,16 @@ f_dialog_input_rclist()
#
f_dialog_input_rcvar()
{
- local msg="$msg_please_enter_rcvar_name"
- local hline="$hline_alnum_tab_enter"
-
#
# Loop until the user provides taint-free/valid input
#
- local size _input="$1"
+ local _input="$1"
while :; do
- size=$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$_input" \
- "$hline" )
-
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$_input\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- _input=$( f_dialog_inputstr )
# Return if user either pressed ESC or chosen Cancel/No
- [ $retval -eq $SUCCESS ] || return $retval
+ _input=$( f_dialog_input "$msg_please_enter_rcvar_name" \
+ "$_input" "$hline_alnum_tab_enter"
+ ) || return
# Check for invalid entry (1of2)
if ! echo "$_input" | grep -q "^[[:alpha:]_]"; then
@@ -469,9 +447,13 @@ f_dialog_input_rcvar()
break
done
- f_dprintf "f_dialog_input_rcvar: rcvar->[$rcvar]"
+ f_dprintf "f_dialog_input_rcvar: rcvar->[%s]" "$rcvar"
return $SUCCESS
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." startup/rcconf.subr
+
fi # ! $_STARTUP_RCCONF_SUBR
diff --git a/usr.sbin/bsdconfig/startup/share/rcedit.subr b/usr.sbin/bsdconfig/startup/share/rcedit.subr
index 4905a18..a9cba88 100644
--- a/usr.sbin/bsdconfig/startup/share/rcedit.subr
+++ b/usr.sbin/bsdconfig/startup/share/rcedit.subr
@@ -30,6 +30,7 @@ if [ ! "$_STARTUP_RCEDIT_SUBR" ]; then _STARTUP_RCEDIT_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." startup/rcedit.subr
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/sysrc.subr
@@ -53,8 +54,7 @@ f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
#
f_dialog_rcedit()
{
- local msg size retval var="$1" _input
- local hline="$hline_alnum_punc_tab_enter"
+ local msg var="$1" _input
msg=$( printf "$msg_please_enter_a_new_value" \
"$var" "$( f_sysrc_get_default "$var" )" )
@@ -67,43 +67,23 @@ f_dialog_rcedit()
_input=$( f_sysrc_get "$var" )
fi
- size=$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$_input" \
- "$hline" )
-
- local opterm="--"
- [ "$USE_XDIALOG" ] && opterm=
-
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- $opterm \"\$_input\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- _input=$( f_dialog_inputstr )
-
# Return if user has either pressed ESC or chosen Cancel/No
- [ $retval -eq $SUCCESS ] || return $retval
+ _input=$( f_dialog_input "$msg" "$_input" \
+ "$hline_alnum_punc_tab_enter"
+ ) || return
# Return if the value has not changed from current
local cur_val="$( f_sysrc_get "$var" )"
[ "$_input" = "$cur_val" ] && return $SUCCESS
- f_dprintf "$var: [$cur_val]->[$_input]"
+ f_dprintf "%s: [%s]->[%s]" "$var" "$cur_val" "$_input"
err=$( f_sysrc_set "$var" "$_input" 2>&1 ) ||
f_show_msg "$err"
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." startup/rcedit.subr
+
fi # ! $_STARTUP_RCEDIT_SUBR
diff --git a/usr.sbin/bsdconfig/startup/share/rcvar.subr b/usr.sbin/bsdconfig/startup/share/rcvar.subr
index 3cd60e8..702c5e9 100644
--- a/usr.sbin/bsdconfig/startup/share/rcvar.subr
+++ b/usr.sbin/bsdconfig/startup/share/rcvar.subr
@@ -30,6 +30,7 @@ if [ ! "$_STARTUP_RCVAR_SUBR" ]; then _STARTUP_RCVAR_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." startup/rcvar.subr
f_include $BSDCFG_SHARE/sysrc.subr
############################################################ CONFIGURATION
@@ -106,11 +107,11 @@ f_startup_rcvar_map()
)"
#
- # Calculate a digest given the checksums of all dependencies (scripts and
- # the defaults file). This digest will be used to determine if an on-disk
- # global persistant cache file (containg this digest on the first line)
- # is valid and can be used to quickly populate the cache value for
- # immediate return.
+ # Calculate a digest given the checksums of all dependencies (scripts
+ # and the defaults file). This digest will be used to determine if an
+ # on-disk global persistant cache file (containg this digest on the
+ # first line) is valid and can be used to quickly populate the cache
+ # value for immediate return.
#
local rc_script_list_digest
rc_script_list_digest=$( cd "$ETC_RC_D" &&
@@ -130,11 +131,12 @@ f_startup_rcvar_map()
read digest rest_ignored
#
- # If the stored digest matches the calculated-one
- # populate the in-memory cache from the on-disk
- # cache and provide success exit status.
+ # If the stored digest matches the calculated-
+ # one populate the in-memory cache from the on-
+ # disk cache and provide success exit status.
#
- if [ "$digest" = "$rc_script_list_digest" ]; then
+ if [ "$digest" = "$rc_script_list_digest" ]
+ then
cat
exit $SUCCESS
else
@@ -150,7 +152,7 @@ f_startup_rcvar_map()
echo "$STARTUP_RCVAR_MAP"
return $SUCCESS
fi
- # Otherwise, fall-through to create in-memory cache from scratch
+ # Otherwise, fall-thru to create in-memory cache from scratch
fi
#
@@ -203,4 +205,8 @@ f_startup_rcvar_map()
mv "$tmpfile" "$STARTUP_RCVAR_MAP_CACHEFILE"
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." startup/rcvar.subr
+
fi # ! $_STARTUP_RCVAR_SUBR
diff --git a/usr.sbin/bsdconfig/startup/startup b/usr.sbin/bsdconfig/startup/startup
index 431607c..c9229b7 100755
--- a/usr.sbin/bsdconfig/startup/startup
+++ b/usr.sbin/bsdconfig/startup/startup
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
@@ -99,7 +100,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_startup"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/timezone/share/continents.subr b/usr.sbin/bsdconfig/timezone/share/continents.subr
index 8f3e516..9a66ec7 100644
--- a/usr.sbin/bsdconfig/timezone/share/continents.subr
+++ b/usr.sbin/bsdconfig/timezone/share/continents.subr
@@ -30,6 +30,7 @@ if [ ! "$_TIMEZONE_CONTINENTS_SUBR" ]; then _TIMEZONE_CONTINENTS_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." timezone/continents.subr
BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="090.timezone"
f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
@@ -135,4 +136,8 @@ f_OCEANP()
esac
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." timezone/continents.subr
+
fi # ! $_TIMEZONE_CONTINENTS_SUBR
diff --git a/usr.sbin/bsdconfig/timezone/share/countries.subr b/usr.sbin/bsdconfig/timezone/share/countries.subr
index 9c6a164..6a39dc7 100644
--- a/usr.sbin/bsdconfig/timezone/share/countries.subr
+++ b/usr.sbin/bsdconfig/timezone/share/countries.subr
@@ -75,4 +75,6 @@ f_sort_countries()
export COUNTRIES
}
+f_dprintf "%s: Successfully loaded." timezone/countries.subr
+
fi # ! $_TIMEZONE_COUNTRIES_SUBR
diff --git a/usr.sbin/bsdconfig/timezone/share/iso3166.subr b/usr.sbin/bsdconfig/timezone/share/iso3166.subr
index 72e934a..9af6393 100644
--- a/usr.sbin/bsdconfig/timezone/share/iso3166.subr
+++ b/usr.sbin/bsdconfig/timezone/share/iso3166.subr
@@ -30,6 +30,7 @@ if [ ! "$_TIMEZONE_ISO3166_SUBR" ]; then _TIMEZONE_ISO3166_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." timezone/iso3166.subr
BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="090.timezone"
f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
@@ -194,4 +195,8 @@ f_read_iso3166_table()
"$_PATH_ISO3166" )
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." timezone/iso3166.subr
+
fi # ! $_TIMEZONE_ISO3166_SUBR
diff --git a/usr.sbin/bsdconfig/timezone/share/menus.subr b/usr.sbin/bsdconfig/timezone/share/menus.subr
index 5ce50f8..687e102 100644
--- a/usr.sbin/bsdconfig/timezone/share/menus.subr
+++ b/usr.sbin/bsdconfig/timezone/share/menus.subr
@@ -30,6 +30,7 @@ if [ ! "$_TIMEZONE_MENUS_SUBR" ]; then _TIMEZONE_MENUS_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." timezone/menus.subr
f_include $BSDCFG_SHARE/dialog.subr
############################################################ GLOBALS
@@ -217,4 +218,8 @@ f_make_menus()
eval $( :| awk "$f_make_menus_awk" )
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." timezone/menus.subr
+
fi # ! $_TIMEZONE_MENUS_SUBR
diff --git a/usr.sbin/bsdconfig/timezone/share/zones.subr b/usr.sbin/bsdconfig/timezone/share/zones.subr
index fcfb21e..3ba1d7a 100644
--- a/usr.sbin/bsdconfig/timezone/share/zones.subr
+++ b/usr.sbin/bsdconfig/timezone/share/zones.subr
@@ -30,6 +30,7 @@ if [ ! "$_TIMEZONE_ZONES_SUBR" ]; then _TIMEZONE_ZONES_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." timezone/zones.subr
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/timezone/continents.subr
@@ -667,4 +668,8 @@ f_set_zone_utc()
f_install_zoneinfo_file ""
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." timezone/zones.subr
+
fi # ! $_TIMEZONE_ZONES_SUBR
diff --git a/usr.sbin/bsdconfig/timezone/timezone b/usr.sbin/bsdconfig/timezone/timezone
index 7af598a..5649b60 100755
--- a/usr.sbin/bsdconfig/timezone/timezone
+++ b/usr.sbin/bsdconfig/timezone/timezone
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/strings.subr
@@ -131,7 +132,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_time_zone"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/ttys/ttys b/usr.sbin/bsdconfig/ttys/ttys
index 545cc1f..db7cb20 100755
--- a/usr.sbin/bsdconfig/ttys/ttys
+++ b/usr.sbin/bsdconfig/ttys/ttys
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
@@ -76,7 +77,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_configure_ttys"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
diff --git a/usr.sbin/bsdconfig/usermgmt/groupadd b/usr.sbin/bsdconfig/usermgmt/groupadd
index 01fbb1e..34962a9 100755
--- a/usr.sbin/bsdconfig/usermgmt/groupadd
+++ b/usr.sbin/bsdconfig/usermgmt/groupadd
@@ -31,6 +31,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="070.usermgmt"
@@ -56,7 +57,6 @@ shift $(( $OPTIND - 1 ))
#
# Chain-load to groupinput to centralize code and minimize duplication
#
-f_dialog_init
$BSDCFG_LIBE/$APP_DIR/groupinput ${USE_XDIALOG:+-X} mode="Add"
################################################################################
diff --git a/usr.sbin/bsdconfig/usermgmt/groupdel b/usr.sbin/bsdconfig/usermgmt/groupdel
index 5a2f110..b51f002 100755
--- a/usr.sbin/bsdconfig/usermgmt/groupdel
+++ b/usr.sbin/bsdconfig/usermgmt/groupdel
@@ -31,6 +31,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/usermgmt/group_input.subr
@@ -59,7 +60,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_delete $msg_group"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
@@ -71,7 +71,7 @@ while :; do
f_dialog_menu_group_list
retval=$?
mtag=$( f_dialog_menutag )
- f_dprintf "retval=$retval mtag=[$mtag]"
+ f_dprintf "retval=%u mtag=[%s]" $retval "$mtag"
[ $retval -eq 0 ] || f_die
diff --git a/usr.sbin/bsdconfig/usermgmt/groupedit b/usr.sbin/bsdconfig/usermgmt/groupedit
index bb314cf..c192c0f 100755
--- a/usr.sbin/bsdconfig/usermgmt/groupedit
+++ b/usr.sbin/bsdconfig/usermgmt/groupedit
@@ -31,6 +31,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/usermgmt/group_input.subr
@@ -59,7 +60,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_edit_view $msg_group"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
@@ -71,7 +71,7 @@ while :; do
f_dialog_menu_group_list
retval=$?
mtag=$( f_dialog_menutag )
- f_dprintf "retval=$retval mtag=[$mtag]"
+ f_dprintf "retval=%s mtag=[%s]" $retval "$mtag"
[ $retval -eq 0 ] || f_die
diff --git a/usr.sbin/bsdconfig/usermgmt/groupinput b/usr.sbin/bsdconfig/usermgmt/groupinput
index dc55852..83d0c1d 100755
--- a/usr.sbin/bsdconfig/usermgmt/groupinput
+++ b/usr.sbin/bsdconfig/usermgmt/groupinput
@@ -31,6 +31,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/usermgmt/group_input.subr
@@ -77,7 +78,7 @@ save_changes()
elif [ "$group_password" ]; then
cmd="echo \"\$group_password\" | $cmd -h 0"
fi
- f_dprintf "cmd=$cmd"
+ f_dprintf "cmd=%s" "$cmd"
err=$( eval $cmd 2>&1 )
retval=$?
if [ $retval -ne $SUCCESS ]; then
@@ -96,7 +97,7 @@ save_changes()
elif [ "$group_password" ]; then
cmd="echo \"\$group_password\" | $cmd -h 0"
fi
- f_dprintf "cmd=$cmd"
+ f_dprintf "cmd=%s" "$cmd"
err=$( eval $cmd 2>&1 )
retval=$?
if [ $retval -ne $SUCCESS ]; then
@@ -136,19 +137,18 @@ dialog_title_update()
while [ $# -gt 0 ]; do
key="${1%%=*}"
value="${1#*=}"
- f_dprintf "key=[$key] value=[$value]"
+ f_dprintf "key=[%s] value=[%s]" "$key" "$value"
case "$key" in
mode) mode="$value";;
group) group="$value";;
esac
shift
done
-f_dprintf "mode=[$mode] group=[$group]"
+f_dprintf "mode=[%s] group=[%s]" "$mode" "$group"
#
# Initialize
#
-f_dialog_init
dialog_title_update "$mode"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
@@ -242,7 +242,7 @@ while :; do
retval=$?
setvar DIALOG_MENU_$$ "$dialog_menu"
mtag=$( f_dialog_menutag )
- f_dprintf "retval=$retval mtag=[$mtag]"
+ f_dprintf "retval=%u mtag=[%s]" $retval "$mtag"
# Exit if user has either pressed ESC or chosen Cancel/No
[ $retval -eq $SUCCESS ] || f_die
@@ -261,7 +261,7 @@ while :; do
f_dialog_menu_group_list
retval=$?
mtag=$( f_dialog_menutag )
- f_dprintf "retval=$retval mtag=[$mtag]"
+ f_dprintf "retval=%u mtag=[%s]" $retval "$mtag"
# Loop if user has either pressed ESC or chosen Cancel/No
[ $retval -eq $SUCCESS ] || continue
diff --git a/usr.sbin/bsdconfig/usermgmt/share/group_input.subr b/usr.sbin/bsdconfig/usermgmt/share/group_input.subr
index e3d59d0..4b47392 100644
--- a/usr.sbin/bsdconfig/usermgmt/share/group_input.subr
+++ b/usr.sbin/bsdconfig/usermgmt/share/group_input.subr
@@ -31,6 +31,7 @@ if [ ! "$_USERMGMT_GROUP_INPUT_SUBR" ]; then _USERMGMT_GROUP_INPUT_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." usermgmt/group_input.subr
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/strings.subr
@@ -111,39 +112,16 @@ f_dialog_menu_group_list()
#
f_dialog_input_group_name()
{
- local msg="$( printf "$msg_group" )"
- local hline="$hline_alnum_tab_enter"
-
#
# Loop until the user provides taint-free/valid input
#
- local size retval _name="$1" _input="$1"
+ local _name="$1" _input="$1"
while :; do
- size=$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$_input" \
- "$hline" )
-
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$_input\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- _input=$( f_dialog_inputstr )
# Return if user has either pressed ESC or chosen Cancel/No
- [ $retval -eq $SUCCESS ] || return $retval
+ _input=$( f_dialog_input "$msg_group" "$_input" \
+ "$hline_alnum_tab_enter"
+ ) || return
# Check for no-change
[ "$_input" = "$_name" ] && return $SUCCESS
@@ -177,7 +155,7 @@ f_dialog_input_group_name()
done
save_flag=1
- f_dprintf "group_name: [$cur_group_name]->[$group_name]"
+ f_dprintf "group_name: [%s]->[%s]" "$cur_group_name" "$group_name"
return $SUCCESS
}
@@ -270,7 +248,8 @@ f_dialog_input_group_password()
done
save_flag=1
- f_dprintf "group_password: [$cur_group_password]->[$group_password]"
+ f_dprintf "group_password: [%s]->[%s]" \
+ "$cur_group_password" "$group_password"
return $SUCCESS
}
@@ -283,40 +262,17 @@ f_dialog_input_group_password()
#
f_dialog_input_group_gid()
{
- local msg size retval _input="$1"
- local hline="$hline_num_tab_enter"
-
- msg=$( printf "$msg_group_id_leave_empty_for_default" )
- size=$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$_input" \
- "$hline" )
-
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$_input\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- _input=$( f_dialog_inputstr )
+ local _input="$1"
# Return if user has either pressed ESC or chosen Cancel/No
- [ $retval -eq $SUCCESS ] || return $retval
+ _input=$( f_dialog_input "$msg_group_id_leave_empty_for_default" \
+ "$_input" "$hline_num_tab_enter"
+ ) || return
group_gid="$_input"
save_flag=1
- f_dprintf "group_gid: [$cur_group_gid]->[$group_gid]"
+ f_dprintf "group_gid: [%s]->[%s]" "$cur_group_gid" "$group_gid"
return $SUCCESS
}
@@ -365,7 +321,7 @@ f_dialog_input_group_members()
retval=$?
setvar DIALOG_MENU_$$ "$dialog_menu"
menu_choice=$( f_dialog_menutag )
- f_dprintf "retval=$retval menu_choice=[$menu_choice]"
+ f_dprintf "retval=%u menu_choice=[%s]" $retval "$menu_choice"
# Return if user has either pressed ESC or chosen Cancel/No
[ $retval -eq $SUCCESS ] || return $retval
@@ -416,36 +372,13 @@ f_dialog_input_group_members()
_input="$_group_members"
;;
2) # Enter Group Members manually
- hline="$hline_num_tab_enter"
- msg=$(
- printf "$msg_group_members ($msg_separated_by_commas)"
- )
- size=$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$_input" \
- "$hline" )
-
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$_input\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- _group_members=$( f_dialog_inputstr )
+ msg="$msg_group_members ($msg_separated_by_commas)"
# Return to previous menu if user has either
# pressed ESC or chosen Cancel/No
- [ $retval -eq $SUCCESS ] || continue
+ _group_members=$( f_dialog_input "$msg" "$_input" \
+ "$hline_num_tab_enter"
+ ) || continue
_input="$_group_members"
;;
@@ -454,9 +387,14 @@ f_dialog_input_group_members()
group_members="$_input"
save_flag=1
- f_dprintf "group_members: [$cur_group_members]->[$group_members]"
+ f_dprintf "group_members: [%s]->[%s]" \
+ "$cur_group_members" "$group_members"
return $SUCCESS
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." usermgmt/group_input.subr
+
fi # ! $_USERMGMT_GROUP_INPUT_SUBR
diff --git a/usr.sbin/bsdconfig/usermgmt/share/user_input.subr b/usr.sbin/bsdconfig/usermgmt/share/user_input.subr
index 8b356b6..d0b5fe3 100644
--- a/usr.sbin/bsdconfig/usermgmt/share/user_input.subr
+++ b/usr.sbin/bsdconfig/usermgmt/share/user_input.subr
@@ -31,6 +31,7 @@ if [ ! "$_USERMGMT_USER_INPUT_SUBR" ]; then _USERMGMT_USER_INPUT_SUBR=1
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." usermgmt/user_input.subr
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/strings.subr
@@ -198,8 +199,8 @@ f_dialog_input_member_groups()
done
save_flag=1
- local debug="pw_member_groups:"
- f_dprintf "$debug [$cur_pw_member_groups]->[$pw_member_groups]"
+ f_dprintf "pw_member_groups: [%s]->[%s]" \
+ "$cur_pw_member_groups" "$pw_member_groups"
return $SUCCESS
}
@@ -216,39 +217,16 @@ f_dialog_input_member_groups()
#
f_dialog_input_name()
{
- local msg="$( printf "$msg_login" )"
- local hline="$hline_alnum_tab_enter"
-
#
# Loop until the user provides taint-free/valid input
#
- local size retval _name="$1" _input="$1"
+ local _name="$1" _input="$1"
while :; do
- size=$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$_input" \
- "$hline" )
-
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$_input\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- _input=$( f_dialog_inputstr )
# Return if user has either pressed ESC or chosen Cancel/No
- [ $retval -eq $SUCCESS ] || return $retval
+ _input=$( f_dialog_input "$msg_login" "$_input" \
+ "$hline_alnum_tab_enter"
+ ) || return
# Check for no-change
[ "$_input" = "$_name" ] && return $SUCCESS
@@ -282,7 +260,7 @@ f_dialog_input_name()
done
save_flag=1
- f_dprintf "pw_name: [$cur_pw_name]->[$pw_name]"
+ f_dprintf "pw_name: [%s]->[%s]" "$cur_pw_name" "$pw_name"
return $SUCCESS
}
@@ -375,7 +353,7 @@ f_dialog_input_password()
done
save_flag=1
- f_dprintf "pw_password: [$cur_pw_password]->[$pw_password]"
+ f_dprintf "pw_password: [%s]->[%s]" "$cur_pw_password" "$pw_password"
return $SUCCESS
}
@@ -389,40 +367,17 @@ f_dialog_input_password()
#
f_dialog_input_gecos()
{
- local msg size retval _input="$1"
- local hline="$hline_alnum_punc_tab_enter"
-
- msg=$( printf "$msg_full_name" )
- size=$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$_input" \
- "$hline" )
-
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$_input\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- _input=$( f_dialog_inputstr )
+ local _input="$1"
# Return if user has either pressed ESC or chosen Cancel/No
- [ $retval -eq $SUCCESS ] || return $retval
+ _input=$( f_dialog_input "$msg_full_name" "$_input" \
+ "$hline_alnum_punc_tab_enter"
+ ) || return
pw_gecos="$_input"
save_flag=1
- f_dprintf "pw_gecos: [$cur_pw_gecos]->[$pw_gecos]"
+ f_dprintf "pw_gecos: [%s]->[%s]" "$cur_pw_gecos" "$pw_gecos"
return $SUCCESS
}
@@ -435,40 +390,17 @@ f_dialog_input_gecos()
#
f_dialog_input_uid()
{
- local msg size retval _input="$1"
- local hline="$hline_num_tab_enter"
-
- msg=$( printf "$msg_user_id_leave_empty_for_default" )
- size=$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$_input" \
- "$hline" )
-
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$_input\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- _input=$( f_dialog_inputstr )
+ local _input="$1"
# Return if user has either pressed ESC or chosen Cancel/No
- [ $retval -eq $SUCCESS ] || return $retval
+ _input=$( f_dialog_input "$msg_user_id_leave_empty_for_default" \
+ "$_input" "$hline_num_tab_enter"
+ ) || return
pw_uid="$_input"
save_flag=1
- f_dprintf "pw_uid: [$cur_pw_uid]->[$pw_uid]"
+ f_dprintf "pw_uid: [%s]->[%s]" "$cur_pw_uid" "$pw_uid"
return $SUCCESS
}
@@ -481,40 +413,17 @@ f_dialog_input_uid()
#
f_dialog_input_gid()
{
- local msg size retval _input="$1"
- local hline="$hline_num_tab_enter"
-
- msg=$( printf "$msg_group_id_leave_empty_for_default" )
- size=$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$_input" \
- "$hline" )
-
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$_input\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- _input=$( f_dialog_inputstr )
+ local _input="$1"
# Return if user has either pressed ESC or chosen Cancel/No
- [ $retval -eq $SUCCESS ] || return $retval
+ _input=$( f_dialog_input "$msg_group_id_leave_empty_for_default" \
+ "$_input" "$hline_num_tab_enter"
+ ) || return
pw_gid="$_input"
save_flag=1
- f_dprintf "pw_gid: [$cur_pw_gid]->[$pw_gid]"
+ f_dprintf "pw_gid: [%s]->[%s]" "$cur_pw_gid" "$pw_gid"
return $SUCCESS
}
@@ -527,40 +436,17 @@ f_dialog_input_gid()
#
f_dialog_input_class()
{
- local msg size retval _input="$1"
- local hline="$hline_alnum_tab_enter"
-
- msg=$( printf "$msg_login_class" )
- size=$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$_input" \
- "$hline" )
-
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$_input\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- _input=$( f_dialog_inputstr )
+ local _input="$1"
# Return if user has either pressed ESC or chosen Cancel/No
- [ $retval -eq $SUCCESS ] || return $retval
+ _input=$( f_dialog_input "$msg_login_class" "$_input" \
+ "$hline_alnum_tab_enter"
+ ) || return
pw_class="$_input"
save_flag=1
- f_dprintf "pw_class: [$cur_pw_class]->[$pw_class]"
+ f_dprintf "pw_class: [%s]->[%s]" "$cur_pw_class" "$pw_class"
return $SUCCESS
}
@@ -611,7 +497,7 @@ f_dialog_input_change()
retval=$?
setvar DIALOG_MENU_$$ "$dialog_menu"
date_type=$( f_dialog_menutag )
- f_dprintf "retval=$retval date_type=[$date_type]"
+ f_dprintf "retval=%u date_type=[%s]" $retval "$date_type"
# Return if user has either pressed ESC or chosen Cancel/No
[ $retval -eq $SUCCESS ] || return $retval
@@ -647,7 +533,7 @@ f_dialog_input_change()
retval=$?
setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
ret_date=$( f_dialog_inputstr )
- f_dprintf "retval=$retval ret_date=[$ret_date]"
+ f_dprintf "retval=%u ret_date=[%s]" $retval "$ret_date"
# Return to menu if either ESC or Cancel/No
[ $retval -eq $SUCCESS ] || continue
@@ -674,7 +560,7 @@ f_dialog_input_change()
retval=$?
setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
ret_time=$( f_dialog_inputstr )
- f_dprintf "retval=$retval ret_time=[$ret_time]"
+ f_dprintf "retval=%u ret_time=[%s]" $retval "$ret_time"
# Return to menu if either ESC or Cancel/No
[ $retval -eq $SUCCESS ] || continue
@@ -683,7 +569,7 @@ f_dialog_input_change()
-j -f "%d/%m/%Y %T" \
-- "$ret_date $ret_time" \
+%s 2> /dev/null )
- f_dprintf "_input=[$_input]"
+ f_dprintf "_input=[%s]" "$_input"
break ;;
3) # Enter number of days into the future
@@ -695,31 +581,11 @@ f_dialog_input_change()
f_isinteger "$ret_days" &&
ret_days=$(( $ret_days + 1 ))
- msg="$msg_password_expires_in_how_many_days"
- size=$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$ret_days" \
- "$hline" )
-
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$ret_days\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- ret_days=$( f_dialog_inputstr )
-
# Return to menu if either ESC or Cancel/No
- [ $retval -eq $SUCCESS ] || continue
+ ret_days=$( f_dialog_input \
+ "$msg_password_expires_in_how_many_days" \
+ "$ret_days" "$hline"
+ ) || continue
# Taint-check the user's input
if ! f_isinteger "$ret_days"; then
@@ -727,13 +593,13 @@ f_dialog_input_change()
continue
fi
- f_dprintf "ret_days=[$ret_days]"
+ f_dprintf "ret_days=[%s]" "$ret_days"
case "$ret_days" in
[-+]*) _input=$( date -v${ret_days}d +%s );;
0) _input=$( date +%s );;
*) _input=$( date -v+${ret_days}d +%s );;
esac
- f_dprintf "_input=[$_input]"
+ f_dprintf "_input=[%s]" "$_input"
break ;;
4) # Enter value manually
@@ -741,30 +607,10 @@ f_dialog_input_change()
msg=$( printf "$msg_number_of_seconds_since_epoch" \
"$( date -r 1 "+%c %Z" )" )
- size=$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$_input" \
- "$hline" )
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$_input\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- ret_secs=$( f_dialog_inputstr )
# Return to menu if either ESC or Cancel/No
- [ $retval -eq $SUCCESS ] || continue
+ ret_secs=$( f_dialog_input \
+ "$msg" "$_input" "$hline" ) || continue
_input="$ret_secs"
@@ -774,7 +620,7 @@ f_dialog_input_change()
continue
fi
- f_dprintf "_input=[$_input]"
+ f_dprintf "_input=[%s]" "$_input"
break ;;
esac
@@ -784,8 +630,8 @@ f_dialog_input_change()
pw_password_expire="$_input"
save_flag=1
- local debug=pw_password_expire
- f_dprintf "$debug: [$cur_pw_password_expire]->[$pw_password_expire]"
+ f_dprintf "pw_password_expire: [%s]->[%s]" \
+ "$cur_pw_password_expire" "$pw_password_expire"
return $SUCCESS
}
@@ -836,7 +682,7 @@ f_dialog_input_expire()
retval=$?
setvar DIALOG_MENU_$$ "$dialog_menu"
date_type=$( f_dialog_menutag )
- f_dprintf "retval=$retval date_type=[$date_type]"
+ f_dprintf "retval=%u date_type=[%s]" $retval "$date_type"
# Return if user has either pressed ESC or chosen Cancel/No
[ $retval -eq $SUCCESS ] || return $retval
@@ -872,7 +718,7 @@ f_dialog_input_expire()
retval=$?
setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
ret_date=$( f_dialog_inputstr )
- f_dprintf "retval=$retval ret_date=[$ret_date]"
+ f_dprintf "retval=%u ret_date=[%s]" $retval "$ret_date"
# Return to menu if either ESC or Cancel/No
[ $retval -eq $SUCCESS ] || continue
@@ -898,7 +744,7 @@ f_dialog_input_expire()
retval=$?
setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
ret_time=$( f_dialog_inputstr )
- f_dprintf "retval=$retval ret_time=[$ret_time]"
+ f_dprintf "retval=%u ret_time=[%s]" $retval "$ret_time"
# Return to menu if either ESC or Cancel/No
[ $retval -eq $SUCCESS ] || continue
@@ -907,7 +753,7 @@ f_dialog_input_expire()
-j -f "%d/%m/%Y %T" \
-- "$ret_date $ret_time" \
+%s 2> /dev/null )
- f_dprintf "_input=[$_input]"
+ f_dprintf "_input=[%s]" "$_input"
break ;;
3) # Enter number of days into the future
@@ -919,31 +765,11 @@ f_dialog_input_expire()
f_isinteger "$ret_days" &&
ret_days=$(( $ret_days + 1 ))
- msg="$msg_account_expires_in_how_many_days"
- size=$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$ret_days" \
- "$hline" )
-
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$ret_days\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- ret_days=$( f_dialog_inputstr )
-
# Return to menu if either ESC or Cancel/No
- [ $retval -eq $SUCCESS ] || continue
+ ret_days=$( f_dialog_input \
+ "$msg_account_expires_in_how_many_days" \
+ "$ret_days" "$hline"
+ ) || continue
# Taint-check the user's input
if ! f_isinteger "$ret_days"; then
@@ -951,13 +777,13 @@ f_dialog_input_expire()
continue
fi
- f_dprintf "ret_days=[$ret_days]"
+ f_dprintf "ret_days=[%s]" "$ret_days"
case "$ret_days" in
[-+]*) _input=$( date -v${ret_days}d +%s );;
0) _input=$( date +%s );;
*) _input=$( date -v+${ret_days}d +%s );;
esac
- f_dprintf "_input=[$_input]"
+ f_dprintf "_input=[%s]" "$_input"
break ;;
4) # Enter value manually
@@ -965,30 +791,10 @@ f_dialog_input_expire()
msg=$( printf "$msg_number_of_seconds_since_epoch" \
"$( date -r 1 "+%c %Z" )" )
- size=$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$_input" \
- "$hline" )
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$_input\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- ret_secs=$( f_dialog_inputstr )
# Return to menu if either ESC or Cancel/No
- [ $retval -eq $SUCCESS ] || continue
+ ret_secs=$( f_dialog_input \
+ "$msg" "$_input" "$hline" ) || continue
_input="$ret_secs"
@@ -998,7 +804,7 @@ f_dialog_input_expire()
continue
fi
- f_dprintf "_input=[$_input]"
+ f_dprintf "_input=[%s]" "$_input"
break ;;
esac
@@ -1008,8 +814,8 @@ f_dialog_input_expire()
pw_account_expire="$_input"
save_flag=1
- local debug=pw_account_expire
- f_dprintf "$debug: [$cur_pw_account_expire]->[$pw_account_expire]"
+ f_dprintf "pw_account_expire: [%s]->[%s]" \
+ "$cur_pw_account_expire" "$pw_account_expire"
return $SUCCESS
}
@@ -1022,40 +828,17 @@ f_dialog_input_expire()
#
f_dialog_input_home_dir()
{
- local msg size retval _input="$1"
- local hline="$hline_alnum_punc_tab_enter"
-
- msg=$( printf "$msg_home_directory" )
- size=$( f_dialog_inputbox_size \
- "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" \
- "$msg" \
- "$_input" \
- "$hline" )
-
- local dialog_inputbox
- dialog_inputbox=$( eval $DIALOG \
- --title \"\$DIALOG_TITLE\" \
- --backtitle \"\$DIALOG_BACKTITLE\" \
- --hline \"\$hline\" \
- --ok-label \"\$msg_ok\" \
- --cancel-label \"\$msg_cancel\" \
- --inputbox \"\$msg\" $size \
- \"\$_input\" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- _input=$( f_dialog_inputstr )
+ local _input="$1"
# Return if user has either pressed ESC or chosen Cancel/No
- [ $retval -eq $SUCCESS ] || return $retval
+ _input=$( f_dialog_input "$msg_home_directory" "$_input" \
+ "$hline_alnum_punc_tab_enter"
+ ) || return
pw_home_dir="$_input"
save_flag=1
- f_dprintf "pw_home_dir: [$cur_pw_home_dir]->[$pw_home_dir]"
+ f_dprintf "pw_home_dir: [%s]->[%s]" "$cur_pw_home_dir" "$pw_home_dir"
return $SUCCESS
}
@@ -1081,7 +864,8 @@ f_dialog_input_home_create()
fi
save_flag=1
- f_dprintf "pw_home_create: [$cur_pw_home_create]->[$pw_home_create]"
+ f_dprintf "pw_home_create: [%s]->[%s]" \
+ "$cur_pw_home_create" "$pw_home_create"
[ $retval -ne 255 ] # return failure if user pressed ESC
}
@@ -1123,7 +907,8 @@ f_dialog_input_group_delete()
fi
save_flag=1
- f_dprintf "pw_group_delete: [$cur_pw_group_delete]->[$pw_group_delete]"
+ f_dprintf "pw_group_delete: [%s]->[%s]" \
+ "$cur_pw_group_delete" "$pw_group_delete"
[ $retval -ne 255 ] # return failure if user pressed ESC
}
@@ -1149,7 +934,8 @@ f_dialog_input_home_delete()
fi
save_flag=1
- f_dprintf "pw_home_delete: [$cur_pw_home_delete]->[$pw_home_delete]"
+ f_dprintf "pw_home_delete: [%s]->[%s]" \
+ "$cur_pw_home_delete" "$pw_home_delete"
[ $retval -ne 255 ] # return failure if user pressed ESC
}
@@ -1176,8 +962,8 @@ f_dialog_input_dotfiles_create()
fi
save_flag=1
- local debug="pw_dotfiles_create:"
- f_dprintf "$debug: [$cur_pw_dotfiles_create]->[$pw_dotfiles_create]"
+ f_dprintf "pw_dotfiles_create: [%s]->[%s]" \
+ "$cur_pw_dotfiles_create" "$pw_dotfiles_create"
[ $retval -ne 255 ] # return failure if user pressed ESC
}
@@ -1235,9 +1021,13 @@ f_dialog_input_shell()
pw_shell="$_input"
save_flag=1
- f_dprintf "pw_shell: [$cur_pw_shell]->[$pw_shell]"
+ f_dprintf "pw_shell: [%s]->[%s]" "$cur_pw_shell" "$pw_shell"
return $SUCCESS
}
+############################################################ MAIN
+
+f_dprintf "%s: Successfully loaded." usermgmt/user_input.subr
+
fi # ! $_USERMGMT_USER_INPUT_SUBR
diff --git a/usr.sbin/bsdconfig/usermgmt/useradd b/usr.sbin/bsdconfig/usermgmt/useradd
index cc1b886..8a69729 100755
--- a/usr.sbin/bsdconfig/usermgmt/useradd
+++ b/usr.sbin/bsdconfig/usermgmt/useradd
@@ -31,6 +31,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="070.usermgmt"
@@ -56,7 +57,6 @@ shift $(( $OPTIND - 1 ))
#
# Chain-load to userinput to centralize code and minimize duplication
#
-f_dialog_init
$BSDCFG_LIBE/$APP_DIR/userinput ${USE_XDIALOG:+-X} mode="Add"
################################################################################
diff --git a/usr.sbin/bsdconfig/usermgmt/userdel b/usr.sbin/bsdconfig/usermgmt/userdel
index e1a26dd..4a7e2be 100755
--- a/usr.sbin/bsdconfig/usermgmt/userdel
+++ b/usr.sbin/bsdconfig/usermgmt/userdel
@@ -31,6 +31,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/usermgmt/user_input.subr
@@ -59,7 +60,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_delete $msg_login"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
@@ -71,7 +71,7 @@ while :; do
f_dialog_menu_user_list
retval=$?
mtag=$( f_dialog_menutag )
- f_dprintf "retval=$retval mtag=[$mtag]"
+ f_dprintf "retval=%u mtag=[%s]" $retval "$mtag"
[ $retval -eq 0 ] || f_die
diff --git a/usr.sbin/bsdconfig/usermgmt/useredit b/usr.sbin/bsdconfig/usermgmt/useredit
index 40a93a8..67aba07 100755
--- a/usr.sbin/bsdconfig/usermgmt/useredit
+++ b/usr.sbin/bsdconfig/usermgmt/useredit
@@ -31,6 +31,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/usermgmt/user_input.subr
@@ -59,7 +60,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_edit_view $msg_login"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
@@ -71,7 +71,7 @@ while :; do
f_dialog_menu_user_list
retval=$?
mtag=$( f_dialog_menutag )
- f_dprintf "retval=$retval mtag=[$mtag]"
+ f_dprintf "retval=%u mtag=[%s]" $retval "$mtag"
[ $retval -eq 0 ] || f_die
diff --git a/usr.sbin/bsdconfig/usermgmt/userinput b/usr.sbin/bsdconfig/usermgmt/userinput
index 0bf8d89..36c43e1 100755
--- a/usr.sbin/bsdconfig/usermgmt/userinput
+++ b/usr.sbin/bsdconfig/usermgmt/userinput
@@ -31,6 +31,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/usermgmt/user_input.subr
@@ -114,7 +115,7 @@ save_changes()
elif [ "$pw_password" ]; then
cmd="echo \"\$pw_password\" | $cmd -h 0"
fi
- f_dprintf "cmd=$cmd"
+ f_dprintf "cmd=%s" "$cmd"
err=$( eval $cmd 2>&1 )
retval=$?
if [ $retval -ne $SUCCESS ]; then
@@ -160,7 +161,7 @@ save_changes()
elif [ "$pw_password" ]; then
cmd="echo \"\$pw_password\" | $cmd -h 0"
fi
- f_dprintf "cmd=$cmd"
+ f_dprintf "cmd=%s" "$cmd"
err=$( eval $cmd 2>&1 )
retval=$?
if [ $retval -ne $SUCCESS ]; then
@@ -217,19 +218,18 @@ dialog_title_update()
while [ $# -gt 0 ]; do
key="${1%%=*}"
value="${1#*=}"
- f_dprintf "key=[$key] value=[$value]"
+ f_dprintf "key=[%s] value=[%s]" "$key" "$value"
case "$key" in
mode) mode="$value";;
user) user="$value";;
esac
shift
done
-f_dprintf "mode=[$mode] user=[$user]"
+f_dprintf "mode=[%s] user=[%s]" "$mode" "$user"
#
# Initialize
#
-f_dialog_init
dialog_title_update "$mode"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
@@ -391,7 +391,6 @@ while :; do
\"\$hline\" \
$menu_items )
- local dialog_menu
dialog_menu=$( eval $DIALOG \
--title \"\$DIALOG_TITLE\" \
--backtitle \"\$DIALOG_BACKTITLE\" \
@@ -406,7 +405,7 @@ while :; do
retval=$?
setvar DIALOG_MENU_$$ "$dialog_menu"
mtag=$( f_dialog_menutag )
- f_dprintf "retval=$retval mtag=[$mtag]"
+ f_dprintf "retval=%u mtag=[%s]" $retval "$mtag"
# Exit if user has either pressed ESC or chosen Cancel/No
[ $retval -eq $SUCCESS ] || f_die
@@ -425,7 +424,7 @@ while :; do
f_dialog_menu_user_list
retval=$?
mtag=$( f_dialog_menutag )
- f_dprintf "retval=$retval mtag=[$mtag]"
+ f_dprintf "retval=%u mtag=[%s]" $retval "$mtag"
# Loop if user has either pressed ESC or chosen Cancel/No
[ $retval -eq $SUCCESS ] || continue
diff --git a/usr.sbin/bsdconfig/usermgmt/usermgmt b/usr.sbin/bsdconfig/usermgmt/usermgmt
index f3357d4..5b69efd 100755
--- a/usr.sbin/bsdconfig/usermgmt/usermgmt
+++ b/usr.sbin/bsdconfig/usermgmt/usermgmt
@@ -31,6 +31,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
@@ -114,7 +115,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_login_management"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
@@ -126,7 +126,7 @@ while :; do
dialog_menu_main
retval=$?
mtag=$( f_dialog_menutag )
- f_dprintf "retval=$retval mtag=[$mtag]"
+ f_dprintf "retval=%u mtag=[%s]" $retval "$mtag"
if [ $retval -eq 2 ]; then
# The Help button was pressed
diff --git a/usr.sbin/bsdinstall/partedit/Makefile b/usr.sbin/bsdinstall/partedit/Makefile
index 9618b09..21eaf91 100644
--- a/usr.sbin/bsdinstall/partedit/Makefile
+++ b/usr.sbin/bsdinstall/partedit/Makefile
@@ -3,6 +3,7 @@
BINDIR= /usr/libexec/bsdinstall
PROG= partedit
LINKS= ${BINDIR}/partedit ${BINDIR}/autopart
+SYMLINKS= ${BINDIR}/partedit /usr/sbin/sade
LDADD= -lgeom -lncursesw -lutil -ldialog -lm
PARTEDIT_ARCH= ${MACHINE}
@@ -17,6 +18,6 @@ SRCS= diskeditor.c partedit.c gpart_ops.c partedit_${PARTEDIT_ARCH}.c \
part_wizard.c
WARNS?= 3
-NO_MAN= true
+MAN= sade.8
.include <bsd.prog.mk>
diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c
index 2436f08..d470c80 100644
--- a/usr.sbin/bsdinstall/partedit/partedit.c
+++ b/usr.sbin/bsdinstall/partedit/partedit.c
@@ -41,6 +41,7 @@
#include "partedit.h"
struct pmetadata_head part_metadata;
+static int sade_mode = 0;
static int apply_changes(struct gmesh *mesh);
static struct partedit_item *read_geom_mesh(struct gmesh *mesh, int *nitems);
@@ -75,12 +76,15 @@ main(int argc, const char **argv)
int i, op, nitems, nscroll;
int error;
+ if (strcmp(basename(argv[0]), "sade") == 0)
+ sade_mode = 1;
+
TAILQ_INIT(&part_metadata);
init_fstab_metadata();
init_dialog(stdin, stdout);
- if (strcmp(basename(argv[0]), "sade") != 0)
+ if (!sade_mode)
dialog_vars.backtitle = __DECONST(char *, "FreeBSD Installer");
dialog_vars.item_help = TRUE;
nscroll = i = 0;
@@ -261,7 +265,7 @@ validate_setup(void)
* Check for root partitions that we aren't formatting, which is
* usually a mistake
*/
- if (root->newfs == NULL) {
+ if (root->newfs == NULL && !sade_mode) {
dialog_vars.defaultno = TRUE;
cancel = dialog_yesno("Warning", "The chosen root partition "
"has a preexisting filesystem. If it contains an existing "
diff --git a/usr.sbin/sade/sade.8 b/usr.sbin/bsdinstall/partedit/sade.8
index 8acda90..8b2af49 100644
--- a/usr.sbin/sade/sade.8
+++ b/usr.sbin/bsdinstall/partedit/sade.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 8, 2006
+.Dd December 30, 2012
.Dt SADE 8
.Os
.Sh NAME
@@ -46,28 +46,30 @@ The
.Nm
utility aims to provide a handy tool for disk management
tasks on an already installed system.
-The goal is to save
-some of the useful functionality of the old
-.Xr sysinstall 8
-which
-will be removed from the system in favor of the new installer.
+The goal is to provide the same text interface for disk management in
+.Xr bsdinstall 8
+in the post-installation environment.
.Sh SEE ALSO
-.Xr sysinstall 8
+.Xr bsdinstall 8 ,
+.Xr gpart 8
.Sh HISTORY
-This version of
+A program called
.Nm
first appeared in
-.Fx 6.3 .
-The code is extracted from the
+.Fx 6.3
+as a utility encapsulating features from the
.Xr sysinstall 8
-utility.
+installer. It was replaced in
+.Fx 10.0
+with the equivalent part of
+.Xr bsdinstall 8 .
.Sh AUTHORS
-.An Jordan K. Hubbard Aq jkh@FreeBSD.org
+.An Nathan Whitehorn Aq nwhitehorn@FreeBSD.org
.Sh BUGS
The utility misses a lot of nice features, such as tools for
manipulating
.Xr gmirror 8
or
-.Xr gvinum 8
-stuff.
+.Xr zfs 8
+.
These will be added later.
diff --git a/usr.sbin/bsdinstall/scripts/mirrorselect b/usr.sbin/bsdinstall/scripts/mirrorselect
index d17a16a..30df830 100755
--- a/usr.sbin/bsdinstall/scripts/mirrorselect
+++ b/usr.sbin/bsdinstall/scripts/mirrorselect
@@ -39,7 +39,6 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \
--menu "Please select the site closest to you or \"other\" if you'd like to specify a different choice. Also note that not every site listed here carries more than the base distribution kits. Only Primary sites are guaranteed to carry the full range of possible distributions. Select a site that's close!" \
0 0 0 \
ftp://ftp.freebsd.org "Main Site"\
- ftp://snapshots.jp.freebsd.org "Snapshots Server Japan"\
ftp://ftp.freebsd.org "IPv6 Main Site"\
ftp://ftp3.ie.freebsd.org "IPv6 Ireland"\
ftp://ftp.il.freebsd.org "IPv6 Israel"\
@@ -192,7 +191,18 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \
MIRROR_BUTTON=$?
exec 3>&-
-BSDINSTALL_DISTSITE="$MIRROR/pub/FreeBSD/releases/`uname -m`/`uname -p`/`uname -r`"
+_UNAME_R=`uname -r`
+
+case ${_UNAME_R} in
+ *-CURRENT|*-STABLE|*-BETA*|*-PRERELEASE|*-RC*)
+ RELDIR="snapshots"
+ ;;
+ *)
+ RELDIR="releases"
+ ;;
+esac
+
+BSDINSTALL_DISTSITE="$MIRROR/pub/FreeBSD/${RELDIR}/`uname -m`/`uname -p`/${_UNAME_R}"
case $MIRROR_BUTTON in
$DIALOG_CANCEL)
diff --git a/usr.sbin/gssd/Makefile b/usr.sbin/gssd/Makefile
index 3fab810..28e8f7d 100644
--- a/usr.sbin/gssd/Makefile
+++ b/usr.sbin/gssd/Makefile
@@ -7,8 +7,8 @@ SRCS= gssd.c gssd.h gssd_svc.c gssd_xdr.c gssd_prot.c
CFLAGS+= -I.
WARNS?= 1
-DPADD= ${LIBGSSAPI}
-LDADD= -lgssapi
+DPADD= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} ${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO}
+LDADD= -lgssapi -lkrb5 -lhx509 -lasn1 -lroken -lcom_err -lcrypt -lcrypto
CLEANFILES= gssd_svc.c gssd.h
diff --git a/usr.sbin/gssd/gssd.8 b/usr.sbin/gssd/gssd.8
index 273a9ff..7b006e8 100644
--- a/usr.sbin/gssd/gssd.8
+++ b/usr.sbin/gssd/gssd.8
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 5, 2008
+.Dd December 22, 2012
.Dt GSSD 8
.Os
.Sh NAME
@@ -34,6 +34,9 @@
.Sh SYNOPSIS
.Nm
.Op Fl d
+.Op Fl s Ar dir-list
+.Op Fl c Ar file-substring
+.Op Fl r Ar preferred-realm
.Sh DESCRIPTION
The
.Nm
@@ -46,6 +49,29 @@ Run in debug mode.
In this mode,
.Nm
will not fork when it starts.
+.It Fl s Ar dir-list
+Look for an appropriate credential cache file in this list of directories.
+The list should be full pathnames from root, separated by ':' characters.
+Usually this list will simply be "/tmp".
+Without this option, the
+.Nm
+daemon assumes that the credential cache file is called /tmp/krb5cc_<uid>,
+where <uid> is the effective uid for the RPC caller.
+.It Fl c Ar file-substring
+Set a file-substring for the credential cache file names.
+Only files with this substring embedded in their names will be
+selected as candidates when the
+.Fl s
+has been specified.
+If not specified, it defaults to "krb5cc_".
+.It Fl r Ar preferred-realm
+Set a preferred Kerberos realm for the search of the directory list for
+a credentials cache file.
+When set, files with TGT credentials for this realm will be selected over
+other credential files.
+This option is only meaningful when the
+.Fl s
+option has been specified.
.El
.Sh FILES
.Bl -tag -width ".Pa /etc/krb5.keytab" -compact
diff --git a/usr.sbin/gssd/gssd.c b/usr.sbin/gssd/gssd.c
index ba2805b..78ca859 100644
--- a/usr.sbin/gssd/gssd.c
+++ b/usr.sbin/gssd/gssd.c
@@ -33,8 +33,11 @@ __FBSDID("$FreeBSD$");
#include <sys/linker.h>
#include <sys/module.h>
#include <sys/queue.h>
+#include <sys/syslog.h>
#include <ctype.h>
+#include <dirent.h>
#include <err.h>
+#include <krb5.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
@@ -63,8 +66,12 @@ int gss_resource_count;
uint32_t gss_next_id;
uint32_t gss_start_time;
int debug_level;
+static char ccfile_dirlist[PATH_MAX + 1], ccfile_substring[NAME_MAX + 1];
+static char pref_realm[1024];
static void gssd_load_mech(void);
+static int find_ccache_file(const char *, uid_t, char *);
+static int is_a_valid_tgt_cache(const char *, uid_t, int *, time_t *);
extern void gssd_1(struct svc_req *rqstp, SVCXPRT *transp);
extern int gssd_syscall(char *path);
@@ -81,14 +88,45 @@ main(int argc, char **argv)
int fd, oldmask, ch, debug;
SVCXPRT *xprt;
+ /*
+ * Initialize the credential cache file name substring and the
+ * search directory list.
+ */
+ strlcpy(ccfile_substring, "krb5cc_", sizeof(ccfile_substring));
+ ccfile_dirlist[0] = '\0';
+ pref_realm[0] = '\0';
debug = 0;
- while ((ch = getopt(argc, argv, "d")) != -1) {
+ while ((ch = getopt(argc, argv, "ds:c:r:")) != -1) {
switch (ch) {
case 'd':
debug_level++;
break;
+ case 's':
+ /*
+ * Set the directory search list. This enables use of
+ * find_ccache_file() to search the directories for a
+ * suitable credentials cache file.
+ */
+ strlcpy(ccfile_dirlist, optarg, sizeof(ccfile_dirlist));
+ break;
+ case 'c':
+ /*
+ * Specify a non-default credential cache file
+ * substring.
+ */
+ strlcpy(ccfile_substring, optarg,
+ sizeof(ccfile_substring));
+ break;
+ case 'r':
+ /*
+ * Set the preferred realm for the credential cache tgt.
+ */
+ strlcpy(pref_realm, optarg, sizeof(pref_realm));
+ break;
default:
- fprintf(stderr, "usage: %s [-d]\n", argv[0]);
+ fprintf(stderr,
+ "usage: %s [-d] [-s dir-list] [-c file-substring]"
+ " [-r preferred-realm]\n", argv[0]);
exit(1);
break;
}
@@ -106,21 +144,43 @@ main(int argc, char **argv)
sun.sun_len = SUN_LEN(&sun);
fd = socket(AF_LOCAL, SOCK_STREAM, 0);
if (!fd) {
+ if (debug_level == 0) {
+ syslog(LOG_ERR, "Can't create local gssd socket");
+ exit(1);
+ }
err(1, "Can't create local gssd socket");
}
oldmask = umask(S_IXUSR|S_IRWXG|S_IRWXO);
if (bind(fd, (struct sockaddr *) &sun, sun.sun_len) < 0) {
+ if (debug_level == 0) {
+ syslog(LOG_ERR, "Can't bind local gssd socket");
+ exit(1);
+ }
err(1, "Can't bind local gssd socket");
}
umask(oldmask);
if (listen(fd, SOMAXCONN) < 0) {
+ if (debug_level == 0) {
+ syslog(LOG_ERR, "Can't listen on local gssd socket");
+ exit(1);
+ }
err(1, "Can't listen on local gssd socket");
}
xprt = svc_vc_create(fd, RPC_MAXDATASIZE, RPC_MAXDATASIZE);
if (!xprt) {
+ if (debug_level == 0) {
+ syslog(LOG_ERR,
+ "Can't create transport for local gssd socket");
+ exit(1);
+ }
err(1, "Can't create transport for local gssd socket");
}
if (!svc_reg(xprt, GSSD, GSSDVERS, gssd_1, NULL)) {
+ if (debug_level == 0) {
+ syslog(LOG_ERR,
+ "Can't register service for local gssd socket");
+ exit(1);
+ }
err(1, "Can't register service for local gssd socket");
}
@@ -244,13 +304,52 @@ gssd_init_sec_context_1_svc(init_sec_context_args *argp, init_sec_context_res *r
gss_cred_id_t cred = GSS_C_NO_CREDENTIAL;
gss_ctx_id_t ctx = GSS_C_NO_CONTEXT;
gss_name_t name = GSS_C_NO_NAME;
- char ccname[strlen("FILE:/tmp/krb5cc_") + 6 + 1];
+ char ccname[PATH_MAX + 5 + 1], *cp, *cp2;
+ int gotone;
- snprintf(ccname, sizeof(ccname), "FILE:/tmp/krb5cc_%d",
- (int) argp->uid);
+ memset(result, 0, sizeof(*result));
+ if (ccfile_dirlist[0] != '\0' && argp->cred == 0) {
+ /*
+ * For the "-s" case and no credentials provided as an
+ * argument, search the directory list for an appropriate
+ * credential cache file. If the search fails, return failure.
+ */
+ gotone = 0;
+ cp = ccfile_dirlist;
+ do {
+ cp2 = strchr(cp, ':');
+ if (cp2 != NULL)
+ *cp2 = '\0';
+ gotone = find_ccache_file(cp, argp->uid, ccname);
+ if (gotone != 0)
+ break;
+ if (cp2 != NULL)
+ *cp2++ = ':';
+ cp = cp2;
+ } while (cp != NULL && *cp != '\0');
+ if (gotone == 0) {
+ result->major_status = GSS_S_CREDENTIALS_EXPIRED;
+ return (TRUE);
+ }
+ } else {
+ /*
+ * If there wasn't a "-s" option or the credentials have
+ * been provided as an argument, do it the old way.
+ * When credentials are provided, the uid should be root.
+ */
+ if (argp->cred != 0 && argp->uid != 0) {
+ if (debug_level == 0)
+ syslog(LOG_ERR, "gss_init_sec_context:"
+ " cred for non-root");
+ else
+ fprintf(stderr, "gss_init_sec_context:"
+ " cred for non-root\n");
+ }
+ snprintf(ccname, sizeof(ccname), "FILE:/tmp/krb5cc_%d",
+ (int) argp->uid);
+ }
setenv("KRB5CCNAME", ccname, TRUE);
- memset(result, 0, sizeof(*result));
if (argp->cred) {
cred = gssd_find_resource(argp->cred);
if (!cred) {
@@ -273,7 +372,6 @@ gssd_init_sec_context_1_svc(init_sec_context_args *argp, init_sec_context_res *r
}
}
- memset(result, 0, sizeof(*result));
result->major_status = gss_init_sec_context(&result->minor_status,
cred, &ctx, name, argp->mech_type,
argp->req_flags, argp->time_req, argp->input_chan_bindings,
@@ -493,13 +591,53 @@ gssd_acquire_cred_1_svc(acquire_cred_args *argp, acquire_cred_res *result, struc
{
gss_name_t desired_name = GSS_C_NO_NAME;
gss_cred_id_t cred;
- char ccname[strlen("FILE:/tmp/krb5cc_") + 6 + 1];
+ char ccname[PATH_MAX + 5 + 1], *cp, *cp2;
+ int gotone;
- snprintf(ccname, sizeof(ccname), "FILE:/tmp/krb5cc_%d",
- (int) argp->uid);
+ memset(result, 0, sizeof(*result));
+ if (ccfile_dirlist[0] != '\0' && argp->desired_name == 0) {
+ /*
+ * For the "-s" case and no name provided as an
+ * argument, search the directory list for an appropriate
+ * credential cache file. If the search fails, return failure.
+ */
+ gotone = 0;
+ cp = ccfile_dirlist;
+ do {
+ cp2 = strchr(cp, ':');
+ if (cp2 != NULL)
+ *cp2 = '\0';
+ gotone = find_ccache_file(cp, argp->uid, ccname);
+ if (gotone != 0)
+ break;
+ if (cp2 != NULL)
+ *cp2++ = ':';
+ cp = cp2;
+ } while (cp != NULL && *cp != '\0');
+ if (gotone == 0) {
+ result->major_status = GSS_S_CREDENTIALS_EXPIRED;
+ return (TRUE);
+ }
+ } else {
+ /*
+ * If there wasn't a "-s" option or the name has
+ * been provided as an argument, do it the old way.
+ * When a name is provided, it will normally exist in the
+ * default keytab file and the uid will be root.
+ */
+ if (argp->desired_name != 0 && argp->uid != 0) {
+ if (debug_level == 0)
+ syslog(LOG_ERR, "gss_acquire_cred:"
+ " principal_name for non-root");
+ else
+ fprintf(stderr, "gss_acquire_cred:"
+ " principal_name for non-root\n");
+ }
+ snprintf(ccname, sizeof(ccname), "FILE:/tmp/krb5cc_%d",
+ (int) argp->uid);
+ }
setenv("KRB5CCNAME", ccname, TRUE);
- memset(result, 0, sizeof(*result));
if (argp->desired_name) {
desired_name = gssd_find_resource(argp->desired_name);
if (!desired_name) {
@@ -608,3 +746,172 @@ gssd_1_freeresult(SVCXPRT *transp, xdrproc_t xdr_result, caddr_t result)
return (TRUE);
}
+
+/*
+ * Search a directory for the most likely candidate to be used as the
+ * credential cache for a uid. If successful, return 1 and fill the
+ * file's path id into "rpath". Otherwise, return 0.
+ */
+static int
+find_ccache_file(const char *dirpath, uid_t uid, char *rpath)
+{
+ DIR *dirp;
+ struct dirent *dp;
+ struct stat sb;
+ time_t exptime, oexptime;
+ int gotone, len, rating, orating;
+ char namepath[PATH_MAX + 5 + 1];
+ char retpath[PATH_MAX + 5 + 1];
+
+ dirp = opendir(dirpath);
+ if (dirp == NULL)
+ return (0);
+ gotone = 0;
+ orating = 0;
+ oexptime = 0;
+ while ((dp = readdir(dirp)) != NULL) {
+ len = snprintf(namepath, sizeof(namepath), "%s/%s", dirpath,
+ dp->d_name);
+ if (len < sizeof(namepath) &&
+ strstr(dp->d_name, ccfile_substring) != NULL &&
+ lstat(namepath, &sb) >= 0 &&
+ sb.st_uid == uid &&
+ S_ISREG(sb.st_mode)) {
+ len = snprintf(namepath, sizeof(namepath), "FILE:%s/%s",
+ dirpath, dp->d_name);
+ if (len < sizeof(namepath) &&
+ is_a_valid_tgt_cache(namepath, uid, &rating,
+ &exptime) != 0) {
+ if (gotone == 0 || rating > orating ||
+ (rating == orating && exptime > oexptime)) {
+ orating = rating;
+ oexptime = exptime;
+ strcpy(retpath, namepath);
+ gotone = 1;
+ }
+ }
+ }
+ }
+ closedir(dirp);
+ if (gotone != 0) {
+ strcpy(rpath, retpath);
+ return (1);
+ }
+ return (0);
+}
+
+/*
+ * Try to determine if the file is a valid tgt cache file.
+ * Check that the file has a valid tgt for a principal.
+ * If it does, return 1, otherwise return 0.
+ * It also returns a "rating" and the expiry time for the TGT, when found.
+ * This "rating" is higher based on heuristics that make it more
+ * likely to be the correct credential cache file to use. It can
+ * be used by the caller, along with expiry time, to select from
+ * multiple credential cache files.
+ */
+static int
+is_a_valid_tgt_cache(const char *filepath, uid_t uid, int *retrating,
+ time_t *retexptime)
+{
+ krb5_context context;
+ krb5_principal princ;
+ krb5_ccache ccache;
+ krb5_error_code retval;
+ krb5_cc_cursor curse;
+ krb5_creds krbcred;
+ int gotone, orating, rating, ret;
+ struct passwd *pw;
+ char *cp, *cp2, *pname;
+ time_t exptime;
+
+ /* Find a likely name for the uid principal. */
+ pw = getpwuid(uid);
+
+ /*
+ * Do a bunch of krb5 library stuff to try and determine if
+ * this file is a credentials cache with an appropriate TGT
+ * in it.
+ */
+ retval = krb5_init_context(&context);
+ if (retval != 0)
+ return (0);
+ retval = krb5_cc_resolve(context, filepath, &ccache);
+ if (retval != 0) {
+ krb5_free_context(context);
+ return (0);
+ }
+ ret = 0;
+ orating = 0;
+ exptime = 0;
+ retval = krb5_cc_start_seq_get(context, ccache, &curse);
+ if (retval == 0) {
+ while ((retval = krb5_cc_next_cred(context, ccache, &curse,
+ &krbcred)) == 0) {
+ gotone = 0;
+ rating = 0;
+ retval = krb5_unparse_name(context, krbcred.server,
+ &pname);
+ if (retval == 0) {
+ cp = strchr(pname, '/');
+ if (cp != NULL) {
+ *cp++ = '\0';
+ if (strcmp(pname, "krbtgt") == 0 &&
+ krbcred.times.endtime > time(NULL)
+ ) {
+ gotone = 1;
+ /*
+ * Test to see if this is a
+ * tgt for cross-realm auth.
+ * Rate it higher, if it is not.
+ */
+ cp2 = strchr(cp, '@');
+ if (cp2 != NULL) {
+ *cp2++ = '\0';
+ if (strcmp(cp, cp2) ==
+ 0)
+ rating++;
+ }
+ }
+ }
+ free(pname);
+ }
+ if (gotone != 0) {
+ retval = krb5_unparse_name(context,
+ krbcred.client, &pname);
+ if (retval == 0) {
+ cp = strchr(pname, '@');
+ if (cp != NULL) {
+ *cp++ = '\0';
+ if (pw != NULL && strcmp(pname,
+ pw->pw_name) == 0)
+ rating++;
+ if (strchr(pname, '/') == NULL)
+ rating++;
+ if (pref_realm[0] != '\0' &&
+ strcmp(cp, pref_realm) == 0)
+ rating++;
+ }
+ }
+ free(pname);
+ if (rating > orating) {
+ orating = rating;
+ exptime = krbcred.times.endtime;
+ } else if (rating == orating &&
+ krbcred.times.endtime > exptime)
+ exptime = krbcred.times.endtime;
+ ret = 1;
+ }
+ krb5_free_cred_contents(context, &krbcred);
+ }
+ krb5_cc_end_seq_get(context, ccache, &curse);
+ }
+ krb5_cc_close(context, ccache);
+ krb5_free_context(context);
+ if (ret != 0) {
+ *retrating = orating;
+ *retexptime = exptime;
+ }
+ return (ret);
+}
+
diff --git a/usr.sbin/iostat/iostat.8 b/usr.sbin/iostat/iostat.8
index d8957ef..1d2d517 100644
--- a/usr.sbin/iostat/iostat.8
+++ b/usr.sbin/iostat/iostat.8
@@ -56,7 +56,7 @@
.\"
.\" @(#)iostat.8 8.1 (Berkeley) 6/6/93
.\"
-.Dd November 24, 2010
+.Dd December 15, 2012
.Dt IOSTAT 8
.Os
.Sh NAME
@@ -366,6 +366,32 @@ average duration of transactions, in milliseconds
% of time the device had one or more outstanding transactions
.El
.Pp
+The extended
+.Nm
+device display, with the
+.Fl x
+and
+.Fl I
+flags specified, shows the following statistics:
+.Pp
+.Bl -tag -width indent -compact
+.It r/i
+read operations per time period
+.It w/i
+write operations per time period
+.It kr/i
+kilobytes read per time period
+.It kw/i
+kilobytes write per time period
+.It qlen
+transactions queue length
+.It tsvc_t/i
+total duration of transactions per time period, in seconds
+.It sb/i
+total time the device had one or more outstanding transactions per
+time period, in seconds
+.El
+.Pp
The old-style
.Nm
display (using
diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c
index 1c32f94..92b98e4 100644
--- a/usr.sbin/iostat/iostat.c
+++ b/usr.sbin/iostat/iostat.c
@@ -731,10 +731,10 @@ devstats(int perf_select, long double etime, int havelast)
u_int64_t total_bytes, total_transfers, total_blocks;
u_int64_t total_bytes_read, total_transfers_read;
u_int64_t total_bytes_write, total_transfers_write;
- long double busy_pct;
+ long double busy_pct, busy_time;
u_int64_t queue_len;
long double total_mb;
- long double blocks_per_second, ms_per_transaction;
+ long double blocks_per_second, ms_per_transaction, total_duration;
int firstline = 1;
char *devname;
@@ -745,14 +745,13 @@ devstats(int perf_select, long double etime, int havelast)
if (Cflag > 0)
printf(" cpu ");
printf("\n");
- if (Iflag == 0)
- printf(
- "device r/s w/s kr/s kw/s qlen svc_t %%b "
- );
- else
- printf(
- "device r/i w/i kr/i kw/i qlen svc_t %%b "
- );
+ if (Iflag == 0) {
+ printf("device r/s w/s kr/s kw/s qlen "
+ "svc_t %%b ");
+ } else {
+ printf("device r/i w/i kr/i"
+ " kw/i qlen tsvc_t/i sb/i ");
+ }
if (Tflag > 0)
printf("tin tout ");
if (Cflag > 0)
@@ -789,6 +788,8 @@ devstats(int perf_select, long double etime, int havelast)
DSM_MS_PER_TRANSACTION, &ms_per_transaction,
DSM_BUSY_PCT, &busy_pct,
DSM_QUEUE_LENGTH, &queue_len,
+ DSM_TOTAL_DURATION, &total_duration,
+ DSM_TOTAL_BUSY_TIME, &busy_time,
DSM_NONE) != 0)
errx(1, "%s", devstat_errbuf);
@@ -827,7 +828,9 @@ devstats(int perf_select, long double etime, int havelast)
queue_len,
ms_per_transaction, busy_pct);
else
- printf("%-8.8s %5.1Lf %5.1Lf %7.1Lf %7.1Lf %4" PRIu64 " %5.1Lf %3.0Lf ",
+ printf("%-8.8s %11.1Lf %11.1Lf "
+ "%12.1Lf %12.1Lf %4" PRIu64
+ " %10.1Lf %9.1Lf ",
devname,
(long double)total_transfers_read,
(long double)total_transfers_write,
@@ -836,7 +839,7 @@ devstats(int perf_select, long double etime, int havelast)
(long double)
total_bytes_write / 1024,
queue_len,
- ms_per_transaction, busy_pct);
+ total_duration, busy_time);
if (firstline) {
/*
* If this is the first device
diff --git a/usr.sbin/mergemaster/mergemaster.sh b/usr.sbin/mergemaster/mergemaster.sh
index 1723fee..48b58f3 100755
--- a/usr.sbin/mergemaster/mergemaster.sh
+++ b/usr.sbin/mergemaster/mergemaster.sh
@@ -421,11 +421,11 @@ check_pager () {
echo " I cannot execute it. So, what would you like to do?"
echo ''
echo " Use 'e' to exit mergemaster and fix your PAGER variable"
- if [ -x /usr/bin/less -o -x /usr/local/bin/less ]; then
echo " Use 'l' to set PAGER to 'less' for this run"
- fi
echo " Use 'm' to use plain old 'more' as your PAGER for this run"
echo ''
+ echo " or you may type an absolute path to PAGER for this run"
+ echo ''
echo " Default is to use plain old 'more' "
echo ''
echo -n "What should I do? [Use 'more'] "
@@ -436,21 +436,14 @@ check_pager () {
exit 0
;;
[lL])
- if [ -x /usr/bin/less ]; then
- PAGER=/usr/bin/less
- elif [ -x /usr/local/bin/less ]; then
- PAGER=/usr/local/bin/less
- else
- echo ''
- echo " *** Fatal Error:"
- echo " You asked to use 'less' as your pager, but I can't"
- echo " find it in /usr/bin or /usr/local/bin"
- exit 1
- fi
+ PAGER=less
;;
[mM]|'')
PAGER=more
;;
+ /*)
+ PAGER="$FIXPAGER"
+ ;;
*)
echo ''
echo "invalid choice: ${FIXPAGER}"
diff --git a/usr.sbin/mountd/exports.5 b/usr.sbin/mountd/exports.5
index 75a5121..1293524 100644
--- a/usr.sbin/mountd/exports.5
+++ b/usr.sbin/mountd/exports.5
@@ -28,7 +28,7 @@
.\" @(#)exports.5 8.3 (Berkeley) 3/29/95
.\" $FreeBSD$
.\"
-.Dd July 12, 2011
+.Dd December 23, 2012
.Dt EXPORTS 5
.Os
.Sh NAME
@@ -311,12 +311,15 @@ For the third form which specifies the NFSv4 tree root, the directory path
specifies the location within the server's file system tree which is the
root of the NFSv4 tree.
All entries of this form must specify the same directory path.
-This location can be any directory and does not
+For file systems other than ZFS,
+this location can be any directory and does not
need to be within an exported file system. If it is not in an exported
file system, a very limited set of operations are permitted, so that an
NFSv4 client can traverse the tree to an exported file system.
Although parts of the NFSv4 tree can be non-exported, the entire NFSv4 tree
must consist of local file systems capable of being exported via NFS.
+All ZFS file systems in the subtree below the NFSv4 tree root must be
+exported.
NFSv4 does not use the mount protocol and does permit clients to cross server
mount point boundaries, although not all clients are capable of crossing the
mount points.
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c
index 543fc14..bc290d6 100644
--- a/usr.sbin/mountd/mountd.c
+++ b/usr.sbin/mountd/mountd.c
@@ -649,7 +649,7 @@ create_service(struct netconfig *nconf)
*/
if ((fd = __rpc_nconf2fd(nconf)) < 0) {
int non_fatal = 0;
- if (errno == EPROTONOSUPPORT &&
+ if (errno == EAFNOSUPPORT &&
nconf->nc_semantics != NC_TPI_CLTS)
non_fatal = 1;
diff --git a/usr.sbin/moused/moused.8 b/usr.sbin/moused/moused.8
index 30b2200..5e4dd43 100644
--- a/usr.sbin/moused/moused.8
+++ b/usr.sbin/moused/moused.8
@@ -296,7 +296,7 @@ information are:
.Bl -tag -compact -width modelxxx
.It Ar port
Port (device file) name, i.e.\&
-.Pa /dev/cuad0 ,
+.Pa /dev/cuau0 ,
.Pa /dev/mse0
and
.Pa /dev/psm0 .
@@ -564,7 +564,7 @@ There may be more than one serial port to which the serial
mouse can be attached.
Many people often assign the first, built-in
serial port
-.Pa /dev/cuad0
+.Pa /dev/cuau0
to the mouse.
You can attach multiple USB mice to your system or to your USB hub.
They are accessible as
@@ -731,16 +731,16 @@ utility
UNIX-domain stream socket for X10 MouseRemote events
.El
.Sh EXAMPLES
-.Dl "moused -p /dev/cuad0 -i type"
+.Dl "moused -p /dev/cuau0 -i type"
.Pp
Let the
.Nm
utility determine the protocol type of the mouse at the serial port
-.Pa /dev/cuad0 .
+.Pa /dev/cuau0 .
If successful, the command will print the type, otherwise it will say
.Dq Li unknown .
.Bd -literal -offset indent
-moused -p /dev/cuad0
+moused -p /dev/cuau0
vidcontrol -m on
.Ed
.Pp
diff --git a/usr.sbin/mptable/mptable.c b/usr.sbin/mptable/mptable.c
index 3c38ccf..01fa897 100644
--- a/usr.sbin/mptable/mptable.c
+++ b/usr.sbin/mptable/mptable.c
@@ -42,7 +42,7 @@ static const char rcsid[] =
#define EXTENDED_PROCESSING_READY
#define OEM_PROCESSING_READY_NOT
-#include <sys/types.h>
+#include <sys/param.h>
#include <err.h>
#include <fcntl.h>
#include <paths.h>
@@ -270,8 +270,8 @@ static void pnstr( char* s, int c );
/* global data */
static int pfd; /* physical /dev/mem fd */
-static int busses[16];
-static int apics[16];
+static int busses[256];
+static int apics[256];
static int ncpu;
static int nbus;
@@ -710,10 +710,12 @@ MPConfigTableHeader( u_int32_t pap )
printf( "MP Config Base Table Entries:\n\n" );
- /* initialze tables */
- for ( x = 0; x < 16; ++x ) {
- busses[ x ] = apics[ x ] = 0xff;
- }
+ /* initialize tables */
+ for (x = 0; x < (int)nitems(busses); x++)
+ busses[x] = 0xff;
+
+ for (x = 0; x < (int)nitems(apics); x++)
+ apics[x] = 0xff;
ncpu = 0;
nbus = 0;
diff --git a/usr.sbin/mtest/mtest.c b/usr.sbin/mtest/mtest.c
index 60f7e09..a28fab7 100644
--- a/usr.sbin/mtest/mtest.c
+++ b/usr.sbin/mtest/mtest.c
@@ -204,12 +204,12 @@ main(int argc, char **argv)
s6 = -1;
#ifdef INET
s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
- if (s == -1 && errno != EPROTONOSUPPORT)
+ if (s == -1 && errno != EAFNOSUPPORT)
err(1, "can't open IPv4 socket");
#endif
#ifdef INET6
s6 = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);
- if (s6 == -1 && errno != EPROTONOSUPPORT)
+ if (s6 == -1 && errno != EAFNOSUPPORT)
err(1, "can't open IPv6 socket");
#endif
if (s == -1 && s6 == -1)
diff --git a/usr.sbin/ndiscvt/inf-parse.y b/usr.sbin/ndiscvt/inf-parse.y
index 8a84956..2a8876d 100644
--- a/usr.sbin/ndiscvt/inf-parse.y
+++ b/usr.sbin/ndiscvt/inf-parse.y
@@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$");
#include "inf.h"
-extern int yyparse (void);
extern int yylex (void);
extern void yyerror(const char *);
%}
diff --git a/usr.sbin/ndp/ndp.8 b/usr.sbin/ndp/ndp.8
index 1fb63f81..9eabfe4 100644
--- a/usr.sbin/ndp/ndp.8
+++ b/usr.sbin/ndp/ndp.8
@@ -231,8 +231,8 @@ responding to requests for
.Ar hostname
even though the host address is not its own.
.It Fl t
-Print timestamp on each entry,
-making it possible to merge output with
+Print timestamp for each entry,
+to make it possible to merge the output with
.Xr tcpdump 1 .
Most useful when used with
.Fl A .
diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c
index be21d0f..b50ddb7 100644
--- a/usr.sbin/ndp/ndp.c
+++ b/usr.sbin/ndp/ndp.c
@@ -404,12 +404,8 @@ set(argc, argv)
return 1;
}
sin->sin6_addr = ((struct sockaddr_in6 *)res->ai_addr)->sin6_addr;
-#ifdef __KAME__
- if (IN6_IS_ADDR_LINKLOCAL(&sin->sin6_addr)) {
- *(u_int16_t *)&sin->sin6_addr.s6_addr[2] =
- htons(((struct sockaddr_in6 *)res->ai_addr)->sin6_scope_id);
- }
-#endif
+ sin->sin6_scope_id =
+ ((struct sockaddr_in6 *)res->ai_addr)->sin6_scope_id;
ea = (u_char *)LLADDR(&sdl_m);
if (ndp_ether_aton(eaddr, ea) == 0)
sdl_m.sdl_alen = 6;
@@ -478,12 +474,6 @@ get(host)
return;
}
sin->sin6_addr = ((struct sockaddr_in6 *)res->ai_addr)->sin6_addr;
-#ifdef __KAME__
- if (IN6_IS_ADDR_LINKLOCAL(&sin->sin6_addr)) {
- *(u_int16_t *)&sin->sin6_addr.s6_addr[2] =
- htons(((struct sockaddr_in6 *)res->ai_addr)->sin6_scope_id);
- }
-#endif
dump(&sin->sin6_addr, 0);
if (found_entry == 0) {
getnameinfo((struct sockaddr *)sin, sin->sin6_len, host_buf,
@@ -520,12 +510,8 @@ delete(host)
return 1;
}
sin->sin6_addr = ((struct sockaddr_in6 *)res->ai_addr)->sin6_addr;
-#ifdef __KAME__
- if (IN6_IS_ADDR_LINKLOCAL(&sin->sin6_addr)) {
- *(u_int16_t *)&sin->sin6_addr.s6_addr[2] =
- htons(((struct sockaddr_in6 *)res->ai_addr)->sin6_scope_id);
- }
-#endif
+ sin->sin6_scope_id =
+ ((struct sockaddr_in6 *)res->ai_addr)->sin6_scope_id;
if (rtmsg(RTM_GET) < 0) {
errx(1, "RTM_GET(%s) failed", host);
/* NOTREACHED */
@@ -556,16 +542,8 @@ delete:
NEXTADDR(RTA_DST, sin_m);
rtm->rtm_flags |= RTF_LLDATA;
if (rtmsg(RTM_DELETE) == 0) {
- struct sockaddr_in6 s6 = *sin; /* XXX: for safety */
-
-#ifdef __KAME__
- if (IN6_IS_ADDR_LINKLOCAL(&s6.sin6_addr)) {
- s6.sin6_scope_id = ntohs(*(u_int16_t *)&s6.sin6_addr.s6_addr[2]);
- *(u_int16_t *)&s6.sin6_addr.s6_addr[2] = 0;
- }
-#endif
- getnameinfo((struct sockaddr *)&s6,
- s6.sin6_len, host_buf,
+ getnameinfo((struct sockaddr *)sin,
+ sin->sin6_len, host_buf,
sizeof(host_buf), NULL, 0,
(nflag ? NI_NUMERICHOST : 0));
printf("%s (%s) deleted\n", host, host_buf);
@@ -666,10 +644,6 @@ again:;
/* XXX: should scope id be filled in the kernel? */
if (sin->sin6_scope_id == 0)
sin->sin6_scope_id = sdl->sdl_index;
-#ifdef __KAME__
- /* KAME specific hack; removed the embedded id */
- *(u_int16_t *)&sin->sin6_addr.s6_addr[2] = 0;
-#endif
}
getnameinfo((struct sockaddr *)sin, sin->sin6_len, host_buf,
sizeof(host_buf), NULL, 0, (nflag ? NI_NUMERICHOST : 0));
@@ -1331,22 +1305,6 @@ plist()
p6.sin6_len = sizeof(p6);
p6.sin6_addr = PR.prefix;
#endif
-
- /*
- * copy link index to sin6_scope_id field.
- * XXX: KAME specific.
- */
- if (IN6_IS_ADDR_LINKLOCAL(&p6.sin6_addr)) {
- u_int16_t linkid;
-
- memcpy(&linkid, &p6.sin6_addr.s6_addr[2],
- sizeof(linkid));
- linkid = ntohs(linkid);
- p6.sin6_scope_id = linkid;
- p6.sin6_addr.s6_addr[2] = 0;
- p6.sin6_addr.s6_addr[3] = 0;
- }
-
niflags = NI_NUMERICHOST;
if (getnameinfo((struct sockaddr *)&p6,
sizeof(p6), namebuf, sizeof(namebuf),
diff --git a/usr.sbin/nfsd/nfsd.c b/usr.sbin/nfsd/nfsd.c
index 6a2f785..0e39138 100644
--- a/usr.sbin/nfsd/nfsd.c
+++ b/usr.sbin/nfsd/nfsd.c
@@ -264,7 +264,7 @@ main(int argc, char **argv)
ip6flag = 1;
s = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);
if (s == -1) {
- if (errno != EPROTONOSUPPORT)
+ if (errno != EPROTONOSUPPORT && errno != EAFNOSUPPORT)
err(1, "socket");
ip6flag = 0;
} else if (getnetconfigent("udp6") == NULL ||
diff --git a/usr.sbin/nfsd/nfsv4.4 b/usr.sbin/nfsd/nfsv4.4
index d2c19ed..679bb69 100644
--- a/usr.sbin/nfsd/nfsv4.4
+++ b/usr.sbin/nfsd/nfsv4.4
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 15, 2011
+.Dd December 23, 2012
.Dt NFSV4 4
.Os
.Sh NAME
@@ -98,6 +98,8 @@ allows a limited subset of operations to be performed on non-exported subtrees
of the local file system, so that traversal of the tree to the exported
subtrees is possible.
As such, the ``<rootdir>'' can be in a non-exported file system.
+The exception is ZFS, which checks exports and, as such, all ZFS file systems
+below the ``<rootdir>'' must be exported.
However,
the entire tree that is rooted at that point must be in local file systems
that are of types that can be NFS exported.
diff --git a/usr.sbin/nmtree/Makefile b/usr.sbin/nmtree/Makefile
new file mode 100644
index 0000000..58e46ea
--- /dev/null
+++ b/usr.sbin/nmtree/Makefile
@@ -0,0 +1,26 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+.PATH: ${.CURDIR}/../../contrib/mtree
+
+PROG= nmtree
+MAN= nmtree.8
+SRCS= compare.c crc.c create.c excludes.c getid.c misc.c mtree.c \
+ spec.c specspec.c verify.c
+LDADD+= -lmd -lutil
+
+CFLAGS+= -I${.CURDIR}/../../contrib/mknod
+.PATH: ${.CURDIR}/../../contrib/mknod
+SRCS+= pack_dev.c
+
+CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd
+LIBNETBSDDIR= ${.OBJDIR}/../../lib/libnetbsd
+LIBNETBSD= ${LIBNETBSDDIR}/libnetbsd.a
+DPADD+= ${LIBNETBSD}
+LDADD+= ${LIBNETBSD}
+
+nmtree.8: mtree.8
+ cp ${.ALLSRC} ${.TARGET}
+
+.include <bsd.prog.mk>
diff --git a/usr.sbin/pkg/Makefile b/usr.sbin/pkg/Makefile
index 360e301..c2ca0a3 100644
--- a/usr.sbin/pkg/Makefile
+++ b/usr.sbin/pkg/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
PROG= pkg
-SRC= pkg.c
+SRCS= pkg.c dns_utils.c
NO_MAN= yes
DPADD= ${LIBARCHIVE} ${LIBELF} ${LIBFETCH}
diff --git a/usr.sbin/pkg/dns_utils.c b/usr.sbin/pkg/dns_utils.c
new file mode 100644
index 0000000..e88bf98
--- /dev/null
+++ b/usr.sbin/pkg/dns_utils.c
@@ -0,0 +1,136 @@
+/*-
+ * Copyright (c) 2012 Baptiste Daroussin <bapt@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer,
+ * without modification, immediately at the beginning of the file.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <stdlib.h>
+#include <string.h>
+#include <netinet/in.h>
+#include <resolv.h>
+
+#include "dns_utils.h"
+
+typedef union {
+ HEADER hdr;
+ unsigned char buf[1024];
+} dns_query;
+
+struct dns_srvinfo *
+dns_getsrvinfo(const char *zone)
+{
+ struct dns_srvinfo **res, *first;
+ unsigned char *end, *p;
+ char host[MAXHOSTNAMELEN];
+ dns_query q;
+ int len, qdcount, ancount, n, i;
+ unsigned int type, class, ttl, priority, weight, port;
+
+ if ((len = res_query(zone, C_IN, T_SRV, q.buf, sizeof(q.buf))) == -1 ||
+ len < (int)sizeof(HEADER))
+ return (NULL);
+
+ qdcount = ntohs(q.hdr.qdcount);
+ ancount = ntohs(q.hdr.ancount);
+
+ end = q.buf + len;
+ p = q.buf + sizeof(HEADER);
+
+ while(qdcount > 0 && p < end) {
+ qdcount--;
+ if((len = dn_expand(q.buf, end, p, host, MAXHOSTNAMELEN)) < 0)
+ return (NULL);
+ p += len + NS_QFIXEDSZ;
+ }
+
+ res = malloc(sizeof(struct dns_srvinfo) * ancount);
+ if (res == NULL)
+ return (NULL);
+ memset(res, 0, sizeof(struct dns_srvinfo) * ancount);
+
+ n = 0;
+ while (ancount > 0 && p < end) {
+ ancount--;
+ len = dn_expand(q.buf, end, p, host, MAXHOSTNAMELEN);
+ if (len < 0) {
+ for (i = 0; i < n; i++)
+ free(res[i]);
+ free(res);
+ return NULL;
+ }
+
+ p += len;
+
+ NS_GET16(type, p);
+ NS_GET16(class, p);
+ NS_GET32(ttl, p);
+ NS_GET16(len, p);
+
+ if (type != T_SRV) {
+ p += len;
+ continue;
+ }
+
+ NS_GET16(priority, p);
+ NS_GET16(weight, p);
+ NS_GET16(port, p);
+
+ len = dn_expand(q.buf, end, p, host, MAXHOSTNAMELEN);
+ if (len < 0) {
+ for (i = 0; i < n; i++)
+ free(res[i]);
+ free(res);
+ return (NULL);
+ }
+
+ res[n] = malloc(sizeof(struct dns_srvinfo));
+ if (res[n] == NULL) {
+ for (i = 0; i < n; i++)
+ free(res[i]);
+ free(res);
+ return (NULL);
+ }
+ res[n]->type = type;
+ res[n]->class = class;
+ res[n]->ttl = ttl;
+ res[n]->priority = priority;
+ res[n]->weight = weight;
+ res[n]->port = port;
+ res[n]->next = NULL;
+ strlcpy(res[n]->host, host, MAXHOSTNAMELEN);
+
+ p += len;
+ n++;
+ }
+
+ for (i = 0; i < n - 1; i++)
+ res[i]->next = res[i + 1];
+
+ first = res[0];
+ free(res);
+
+ return (first);
+}
diff --git a/lib/libdisk/write_arm_disk.c b/usr.sbin/pkg/dns_utils.h
index 5dbb0ad..0f3367b 100644
--- a/lib/libdisk/write_arm_disk.c
+++ b/usr.sbin/pkg/dns_utils.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2006 Olivier Houchard
+ * Copyright (c) 2012 Baptiste Daroussin <bapt@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -10,7 +10,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -22,26 +22,24 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+#ifndef DNS_UTILS_H
+#define DNS_UTILS_H
+struct dns_srvinfo {
+ unsigned int type;
+ unsigned int class;
+ unsigned int ttl;
+ unsigned int priority;
+ unsigned int weight;
+ unsigned int port;
+ char host[MAXHOSTNAMELEN];
+ struct dns_srvinfo *next;
+};
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#include <err.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/disklabel.h>
-#include <paths.h>
-#include "libdisk.h"
+struct dns_srvinfo *
+ dns_getsrvinfo(const char *zone);
-int
-Write_Disk(const struct disk *d1)
-{
- return (0);
-}
+#endif
diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c
index 8dc7bcf..1b3146b 100644
--- a/usr.sbin/pkg/pkg.c
+++ b/usr.sbin/pkg/pkg.c
@@ -48,9 +48,10 @@ __FBSDID("$FreeBSD$");
#include <unistd.h>
#include "elf_tables.h"
+#include "dns_utils.h"
#define _LOCALBASE "/usr/local"
-#define _PKGS_URL "http://pkgbeta.FreeBSD.org"
+#define _PKGS_URL "http://pkg.FreeBSD.org"
static const char *
elf_corres_to_string(struct _elf_corres *m, int e)
@@ -281,16 +282,20 @@ install_pkg_static(char *path, char *pkgpath)
static int
bootstrap_pkg(void)
{
+ struct url *u;
FILE *remote;
FILE *config;
char *site;
+ struct dns_srvinfo *mirrors, *current;
+ /* To store _https._tcp. + hostname + \0 */
+ char zone[MAXHOSTNAMELEN + 13];
char url[MAXPATHLEN];
char conf[MAXPATHLEN];
char abi[BUFSIZ];
char tmppkg[MAXPATHLEN];
char buf[10240];
char pkgstatic[MAXPATHLEN];
- int fd, retry, ret;
+ int fd, retry, ret, max_retry;
struct url_stat st;
off_t done, r;
time_t now;
@@ -298,9 +303,11 @@ bootstrap_pkg(void)
done = 0;
last = 0;
+ max_retry = 3;
ret = -1;
remote = NULL;
config = NULL;
+ current = mirrors = NULL;
printf("Bootstrapping pkg please wait\n");
@@ -324,12 +331,37 @@ bootstrap_pkg(void)
return (-1);
}
- retry = 3;
- do {
- remote = fetchXGetURL(url, &st, "");
- if (remote == NULL)
- sleep(1);
- } while (remote == NULL && retry-- > 0);
+ retry = max_retry;
+
+ u = fetchParseURL(url);
+ while (remote == NULL) {
+ if (retry == max_retry) {
+ if (strcmp(u->scheme, "file") != 0) {
+ snprintf(zone, sizeof(zone),
+ "_%s._tcp.%s", u->scheme, u->host);
+ printf("%s\n", zone);
+ mirrors = dns_getsrvinfo(zone);
+ current = mirrors;
+ }
+ }
+
+ if (mirrors != NULL)
+ strlcpy(u->host, current->host, sizeof(u->host));
+
+ remote = fetchXGet(u, &st, "");
+ if (remote == NULL) {
+ --retry;
+ if (retry <= 0)
+ goto fetchfail;
+ if (mirrors == NULL) {
+ sleep(1);
+ } else {
+ current = current->next;
+ if (current == NULL)
+ current = mirrors;
+ }
+ }
+ }
if (remote == NULL)
goto fetchfail;
@@ -420,6 +452,14 @@ main(__unused int argc, char *argv[])
getenv("LOCALBASE") ? getenv("LOCALBASE") : _LOCALBASE);
if (access(pkgpath, X_OK) == -1) {
+ /*
+ * To allow 'pkg -N' to be used as a reliable test for whether
+ * a system is configured to use pkg, don't bootstrap pkg
+ * when that argument is given as argv[1].
+ */
+ if (argv[1] != NULL && strcmp(argv[1], "-N") == 0)
+ errx(EXIT_FAILURE, "pkg is not installed");
+
/*
* Do not ask for confirmation if either of stdin or stdout is
* not tty. Check the environment to see if user has answer
diff --git a/usr.sbin/portsnap/portsnap/portsnap.sh b/usr.sbin/portsnap/portsnap/portsnap.sh
index ed9c28d..f9f4716 100644
--- a/usr.sbin/portsnap/portsnap/portsnap.sh
+++ b/usr.sbin/portsnap/portsnap/portsnap.sh
@@ -612,6 +612,28 @@ fetch_progress() {
echo -n " "
}
+pct_fmt()
+{
+ printf " \r"
+ printf "($1/$2) %02.2f%% " `echo "scale=4;$LNC / $TOTAL * 100"|bc`
+}
+
+fetch_progress_percent() {
+ TOTAL=$1
+ LNC=0
+ pct_fmt $LNC $TOTAL
+ while read x; do
+ LNC=$(($LNC + 1))
+ if [ $(($LNC % 100)) = 0 ]; then
+ pct_fmt $LNC $TOTAL
+ elif [ $(($LNC % 10)) = 0 ]; then
+ echo -n .
+ fi
+ done
+ pct_fmt $LNC $TOTAL
+ echo " done. "
+}
+
# Sanity-check an index file
fetch_index_sanity() {
if grep -qvE "^[-_+./@0-9A-Za-z]+\|[0-9a-f]{64}$" INDEX.new ||
@@ -781,11 +803,13 @@ fetch_update() {
echo " done." 1>${QUIETREDIR}
# Attempt to fetch ports patches
- echo -n "Fetching `wc -l < patchlist | tr -d ' '` "
+ patchcnt=`wc -l < patchlist | tr -d ' '`
+ echo -n "Fetching $patchcnt "
echo ${NDEBUG} "patches.${DDSTATS}"
+ echo " "
tr '|' '-' < patchlist | lam -s "bp/" - |
xargs ${XARGST} ${PHTTPGET} ${SERVERNAME} \
- 2>${STATSREDIR} | fetch_progress
+ 2>${STATSREDIR} | fetch_progress_percent $patchcnt
echo "done."
# Attempt to apply ports patches
diff --git a/usr.sbin/ppp/README.changes b/usr.sbin/ppp/README.changes
index bf626e3..4ed3da6 100644
--- a/usr.sbin/ppp/README.changes
+++ b/usr.sbin/ppp/README.changes
@@ -53,7 +53,7 @@ o Errors in `add' and `delete' are logged as warnings rather than being
written to the TCP/IP log.
o Any number of diagnostic prompts are allowed, and they are allowed in
interactive mode.
-o The default `device' is cuad1, then cuad0
+o The default `device' is cuau1, then cuau0
o A password of "*" in ppp.secret causes a passwd database lookup in
pap mode.
o The value of the CONNECT environment variable is logged in the
diff --git a/usr.sbin/ppp/defs.h b/usr.sbin/ppp/defs.h
index f56ee32..d7cc799 100644
--- a/usr.sbin/ppp/defs.h
+++ b/usr.sbin/ppp/defs.h
@@ -30,7 +30,7 @@
/* Check the following definitions for your machine environment */
#ifdef __FreeBSD__
-# define MODEM_LIST "/dev/cuad1\0/dev/cuad0" /* name of tty device */
+# define MODEM_LIST "/dev/cuau1\0/dev/cuau0" /* name of tty device */
#else
# ifdef __OpenBSD__
# define MODEM_LIST "/dev/cua01\0/dev/cua00" /* name of tty device */
diff --git a/usr.sbin/ppp/ppp.8.m4 b/usr.sbin/ppp/ppp.8.m4
index 7d3f6d2..91b9c51 100644
--- a/usr.sbin/ppp/ppp.8.m4
+++ b/usr.sbin/ppp/ppp.8.m4
@@ -551,7 +551,7 @@ and have not authenticated yourself using the correct password.
.Pp
You can start by specifying the device name and speed:
.Bd -literal -offset indent
-ppp ON awfulhak> set device /dev/cuad0
+ppp ON awfulhak> set device /dev/cuau0
ppp ON awfulhak> set speed 38400
.Ed
.Pp
@@ -610,7 +610,7 @@ Name: deflink
Phone Number: N/A
Defaults:
- Device List: /dev/cuad0
+ Device List: /dev/cuau0
Characteristics: 38400bps, cs8, even parity, CTS/RTS on
Connect time: 0 secs
@@ -1216,10 +1216,10 @@ It is usually also necessary to train your modem to the same DTR speed
as the getty:
.Bd -literal -offset indent
# ppp
-ppp ON awfulhak> set device /dev/cuad1
+ppp ON awfulhak> set device /dev/cuau1
ppp ON awfulhak> set speed 38400
ppp ON awfulhak> term
-deflink: Entering terminal mode on /dev/cuad1
+deflink: Entering terminal mode on /dev/cuau1
Type `~?' for help
at
OK
@@ -2164,7 +2164,7 @@ and
.Dq set speed
to specify your serial line and speed, for example:
.Bd -literal -offset indent
-set device /dev/cuad0
+set device /dev/cuau0
set speed 115200
.Ed
.Pp
@@ -2529,7 +2529,7 @@ Armed with this information, the following configuration might be used:
mp:
set timeout 0
set log phase chat
- set device /dev/cuad0 /dev/cuad1 /dev/cuad2
+ set device /dev/cuau0 /dev/cuau1 /dev/cuau2
set phone "123456789"
set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \\"\\" ATZ \e
OK-AT-OK \\\\dATDT\\\\T TIMEOUT 45 CONNECT"
@@ -2563,9 +2563,9 @@ line above, and specifying the following after the
.Dq clone
command:
.Bd -literal -offset indent
- link 1 set device /dev/cuad0
- link 2 set device /dev/cuad1
- link 3 set device /dev/cuad2
+ link 1 set device /dev/cuau0
+ link 2 set device /dev/cuau1
+ link 3 set device /dev/cuau2
.Ed
.Pp
Use the
@@ -4073,7 +4073,7 @@ The default link name is
.Sq deflink .
Renaming it to
.Sq modem ,
-.Sq cuad0
+.Sq cuau0
or
.Sq USR
may make the log file more readable.
diff --git a/usr.sbin/pw/bitmap.c b/usr.sbin/pw/bitmap.c
index bcfea7e..8e96bff 100644
--- a/usr.sbin/pw/bitmap.c
+++ b/usr.sbin/pw/bitmap.c
@@ -50,8 +50,7 @@ bm_alloc(int size)
void
bm_dealloc(struct bitmap * bm)
{
- if (bm->map)
- free(bm->map);
+ free(bm->map);
}
static void
diff --git a/usr.sbin/pw/grupd.c b/usr.sbin/pw/grupd.c
index e9f6b5e..3f78e95 100644
--- a/usr.sbin/pw/grupd.c
+++ b/usr.sbin/pw/grupd.c
@@ -50,12 +50,11 @@ setgrdir(const char * dir)
{
if (dir == NULL)
return -1;
- else {
- char * d = malloc(strlen(dir)+1);
- if (d == NULL)
- return -1;
- grpath = strcpy(d, dir);
- }
+ else
+ grpath = strdup(dir);
+ if (grpath == NULL)
+ return -1;
+
return 0;
}
diff --git a/usr.sbin/pw/pw_group.c b/usr.sbin/pw/pw_group.c
index f4f2116..3259412 100644
--- a/usr.sbin/pw/pw_group.c
+++ b/usr.sbin/pw/pw_group.c
@@ -274,8 +274,7 @@ pw_group(struct userconf * cnf, int mode, struct cargs * args)
pw_log(cnf, mode, W_GROUP, "%s(%ld)", grp->gr_name, (long) grp->gr_gid);
- if (members)
- free(members);
+ free(members);
return EXIT_SUCCESS;
}
@@ -408,7 +407,7 @@ print_group(struct group * grp, int pretty)
char *buf = NULL;
buf = gr_make(grp);
- fputs(buf, stdout);
+ printf("%s\n", buf);
free(buf);
} else {
int i;
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c
index abf1c35..5577511 100644
--- a/usr.sbin/pw/pw_user.c
+++ b/usr.sbin/pw/pw_user.c
@@ -394,7 +394,7 @@ pw_user(struct userconf * cnf, int mode, struct cargs * args)
/*
* Remove crontabs
*/
- sprintf(file, "/var/cron/tabs/%s", pwd->pw_name);
+ snprintf(file, sizeof(file), "/var/cron/tabs/%s", pwd->pw_name);
if (access(file, F_OK) == 0) {
sprintf(file, "crontab -u %s -r", pwd->pw_name);
system(file);
@@ -745,24 +745,18 @@ pw_user(struct userconf * cnf, int mode, struct cargs * args)
*/
if (mode == M_ADD || getarg(args, 'G') != NULL) {
- int i, j;
+ int i;
for (i = 0; cnf->groups[i] != NULL; i++) {
grp = GETGRNAM(cnf->groups[i]);
- for (j = 0; grp->gr_mem[j] != NULL; j++) {
- if (!strcmp(grp->gr_mem[j], pwd->pw_name))
- break;
- }
- if (grp->gr_mem[j] != NULL) /* user already member of group */
+ grp = gr_add(grp, pwd->pw_name);
+ /*
+ * grp can only be NULL in 2 cases:
+ * - the new member is already a member
+ * - a problem with memory occurs
+ * in both cases we want to skip now.
+ */
+ if (grp == NULL)
continue;
-
- if (j == 0)
- grp->gr_mem = NULL;
-
- grp->gr_mem = reallocf(grp->gr_mem, sizeof(*grp->gr_mem) *
- (j + 2));
-
- grp->gr_mem[j] = pwd->pw_name;
- grp->gr_mem[j+1] = NULL;
chggrent(cnf->groups[i], grp);
}
}
diff --git a/usr.sbin/pw/pw_vpw.c b/usr.sbin/pw/pw_vpw.c
index 674b64f..99663be 100644
--- a/usr.sbin/pw/pw_vpw.c
+++ b/usr.sbin/pw/pw_vpw.c
@@ -30,6 +30,10 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
+#include <pwd.h>
+#include <grp.h>
+#include <libutil.h>
+#define _WITH_GETLINE
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -55,101 +59,44 @@ vsetpwent(void)
}
static struct passwd *
-vnextpwent(char const * nam, uid_t uid, int doclose)
+vnextpwent(char const *nam, uid_t uid, int doclose)
{
- struct passwd * pw = NULL;
- static char pwtmp[1024];
-
- strlcpy(pwtmp, getpwpath(_MASTERPASSWD), sizeof(pwtmp));
-
- if (pwd_fp != NULL || (pwd_fp = fopen(pwtmp, "r")) != NULL) {
- int done = 0;
-
- static struct passwd pwd;
-
- while (!done && fgets(pwtmp, sizeof pwtmp, pwd_fp) != NULL)
- {
- int i, quickout = 0;
- char * q;
- char * p = strchr(pwtmp, '\n');
-
- if (p == NULL) {
- while (fgets(pwtmp, sizeof pwtmp, pwd_fp) != NULL && strchr(pwtmp, '\n')==NULL)
- ; /* Skip long lines */
- continue;
- }
-
- /* skip comments & empty lines */
- if (*pwtmp =='\n' || *pwtmp == '#')
+ struct passwd *pw;
+ char *line;
+ size_t linecap;
+ ssize_t linelen;
+
+ pw = NULL;
+ line = NULL;
+ linecap = 0;
+ linelen = 0;
+
+ if (pwd_fp != NULL || (pwd_fp = fopen(getpwpath(_MASTERPASSWD), "r")) != NULL) {
+ while ((linelen = getline(&line, &linecap, pwd_fp)) > 0) {
+ /* Skip comments and empty lines */
+ if (*line == '\n' || *line == '#')
continue;
-
- i = 0;
- q = p = pwtmp;
- bzero(&pwd, sizeof pwd);
- while (!quickout && (p = strsep(&q, ":\n")) != NULL) {
- switch (i++)
- {
- case 0: /* username */
- pwd.pw_name = p;
- if (nam) {
- if (strcmp(nam, p) == 0)
- done = 1;
- else
- quickout = 1;
- }
- break;
- case 1: /* password */
- pwd.pw_passwd = p;
- break;
- case 2: /* uid */
- pwd.pw_uid = atoi(p);
- if (uid != (uid_t)-1) {
- if (uid == pwd.pw_uid)
- done = 1;
- else
- quickout = 1;
- }
- break;
- case 3: /* gid */
- pwd.pw_gid = atoi(p);
- break;
- case 4: /* class */
- if (nam == NULL && uid == (uid_t)-1)
- done = 1;
- pwd.pw_class = p;
- break;
- case 5: /* change */
- pwd.pw_change = (time_t)atol(p);
- break;
- case 6: /* expire */
- pwd.pw_expire = (time_t)atol(p);
- break;
- case 7: /* gecos */
- pwd.pw_gecos = p;
- break;
- case 8: /* directory */
- pwd.pw_dir = p;
- break;
- case 9: /* shell */
- pwd.pw_shell = p;
- break;
- }
- }
- }
+ /* trim latest \n */
+ if (line[linelen - 1 ] == '\n')
+ line[linelen - 1] = '\0';
+ pw = pw_scan(line, PWSCAN_MASTER);
+ if (uid != (uid_t)-1) {
+ if (uid == pw->pw_uid)
+ break;
+ } else if (nam != NULL) {
+ if (strcmp(nam, pw->pw_name) == 0)
+ break;
+ } else
+ break;
+ free(pw);
+ pw = NULL;
+ }
if (doclose)
vendpwent();
- if (done && pwd.pw_name) {
- pw = &pwd;
+ }
+ free(line);
- #define CKNULL(s) s = s ? s : ""
- CKNULL(pwd.pw_passwd);
- CKNULL(pwd.pw_class);
- CKNULL(pwd.pw_gecos);
- CKNULL(pwd.pw_dir);
- CKNULL(pwd.pw_shell);
- }
- }
- return pw;
+ return (pw);
}
struct passwd *
@@ -192,93 +139,44 @@ vsetgrent(void)
}
static struct group *
-vnextgrent(char const * nam, gid_t gid, int doclose)
+vnextgrent(char const *nam, gid_t gid, int doclose)
{
- struct group * gr = NULL;
-
- static char * grtmp = NULL;
- static int grlen = 0;
- static char ** mems = NULL;
- static int memlen = 0;
-
- extendline(&grtmp, &grlen, MAXPATHLEN);
- strlcpy(grtmp, getgrpath(_GROUP), MAXPATHLEN);
-
- if (grp_fp != NULL || (grp_fp = fopen(grtmp, "r")) != NULL) {
- int done = 0;
-
- static struct group grp;
-
- while (!done && fgets(grtmp, grlen, grp_fp) != NULL)
- {
- int i, quickout = 0;
- int mno = 0;
- char * q, * p;
- const char * sep = ":\n";
-
- if ((p = strchr(grtmp, '\n')) == NULL) {
- int l;
- extendline(&grtmp, &grlen, grlen + PWBUFSZ);
- l = strlen(grtmp);
- if (fgets(grtmp + l, grlen - l, grp_fp) == NULL)
- break; /* No newline terminator on last line */
- }
+ struct group *gr;
+ char *line;
+ size_t linecap;
+ ssize_t linelen;
+
+ gr = NULL;
+ line = NULL;
+ linecap = 0;
+ linelen = 0;
+
+ if (grp_fp != NULL || (grp_fp = fopen(getgrpath(_GROUP), "r")) != NULL) {
+ while ((linelen = getline(&line, &linecap, grp_fp)) > 0) {
/* Skip comments and empty lines */
- if (*grtmp == '\n' || *grtmp == '#')
+ if (*line == '\n' || *line == '#')
continue;
- i = 0;
- q = p = grtmp;
- bzero(&grp, sizeof grp);
- extendarray(&mems, &memlen, 200);
- while (!quickout && (p = strsep(&q, sep)) != NULL) {
- switch (i++)
- {
- case 0: /* groupname */
- grp.gr_name = p;
- if (nam) {
- if (strcmp(nam, p) == 0)
- done = 1;
- else
- quickout = 1;
- }
- break;
- case 1: /* password */
- grp.gr_passwd = p;
+ /* trim latest \n */
+ if (line[linelen - 1 ] == '\n')
+ line[linelen - 1] = '\0';
+ gr = gr_scan(line);
+ if (gid != (gid_t)-1) {
+ if (gid == gr->gr_gid)
break;
- case 2: /* gid */
- grp.gr_gid = atoi(p);
- if (gid != (gid_t)-1) {
- if (gid == (gid_t)grp.gr_gid)
- done = 1;
- else
- quickout = 1;
- } else if (nam == NULL)
- done = 1;
+ } else if (nam != NULL) {
+ if (strcmp(nam, gr->gr_name) == 0)
break;
- case 3:
- q = p;
- sep = ",\n";
- break;
- default:
- if (*p) {
- extendarray(&mems, &memlen, mno + 2);
- mems[mno++] = p;
- }
- break;
- }
- }
- grp.gr_mem = mems;
- mems[mno] = NULL;
- }
+ } else
+ break;
+ free(gr);
+ gr = NULL;
+ }
if (doclose)
vendgrent();
- if (done && grp.gr_name) {
- gr = &grp;
-
- CKNULL(grp.gr_passwd);
- }
}
- return gr;
+ free(line);
+
+ return (gr);
}
struct group *
diff --git a/usr.sbin/pw/pwupd.c b/usr.sbin/pw/pwupd.c
index 4ab0f01..22662db 100644
--- a/usr.sbin/pw/pwupd.c
+++ b/usr.sbin/pw/pwupd.c
@@ -56,12 +56,10 @@ setpwdir(const char * dir)
{
if (dir == NULL)
return -1;
- else {
- char * d = malloc(strlen(dir)+1);
- if (d == NULL)
- return -1;
- pwpath = strcpy(d, dir);
- }
+ else
+ pwpath = strdup(dir);
+ if (pwpath == NULL)
+ return -1;
return 0;
}
@@ -148,7 +146,11 @@ pw_update(struct passwd * pwd, char const * user)
pw_fini();
err(1, "pw_copy()");
}
- if (pw_mkdb(user) == -1) {
+ /*
+ * in case of deletion of a user, the whole database
+ * needs to be regenerated
+ */
+ if (pw_mkdb(pw != NULL ? user : NULL) == -1) {
pw_fini();
err(1, "pw_mkdb()");
}
diff --git a/usr.sbin/pw/rm_r.c b/usr.sbin/pw/rm_r.c
index 4ad590b..797ca9d 100644
--- a/usr.sbin/pw/rm_r.c
+++ b/usr.sbin/pw/rm_r.c
@@ -52,7 +52,7 @@ rm_r(char const * dir, uid_t uid)
while ((e = readdir(d)) != NULL) {
if (strcmp(e->d_name, ".") != 0 && strcmp(e->d_name, "..") != 0) {
- sprintf(file, "%s/%s", dir, e->d_name);
+ snprintf(file, sizeof(file), "%s/%s", dir, e->d_name);
if (lstat(file, &st) == 0) { /* Need symlinks, not
* linked file */
if (S_ISDIR(st.st_mode)) /* Directory - recurse */
diff --git a/usr.sbin/rpcbind/rpcbind.c b/usr.sbin/rpcbind/rpcbind.c
index 3d11af1..fb6c99d 100644
--- a/usr.sbin/rpcbind/rpcbind.c
+++ b/usr.sbin/rpcbind/rpcbind.c
@@ -289,7 +289,7 @@ init_transport(struct netconfig *nconf)
*/
if ((fd = __rpc_nconf2fd(nconf)) < 0) {
int non_fatal = 0;
- if (errno == EPROTONOSUPPORT)
+ if (errno == EAFNOSUPPORT)
non_fatal = 1;
syslog(non_fatal?LOG_DEBUG:LOG_ERR, "cannot create socket for %s",
nconf->nc_netid);
@@ -352,7 +352,7 @@ init_transport(struct netconfig *nconf)
*/
if ((fd = __rpc_nconf2fd(nconf)) < 0) {
int non_fatal = 0;
- if (errno == EPROTONOSUPPORT &&
+ if (errno == EAFNOSUPPORT &&
nconf->nc_semantics != NC_TPI_CLTS)
non_fatal = 1;
syslog(non_fatal ? LOG_DEBUG : LOG_ERR,
diff --git a/usr.sbin/sade/Makefile b/usr.sbin/sade/Makefile
deleted file mode 100644
index 1a7c8b2..0000000
--- a/usr.sbin/sade/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-# $FreeBSD$
-
-.if ${MACHINE_CPUARCH} != "ia64"
-_wizard= wizard.c
-.endif
-
-PROG= sade
-MAN= sade.8
-SRCS= command.c devices.c \
- disks.c dmenu.c \
- globals.c install.c \
- label.c main.c menus.c misc.c \
- msg.c system.c termcap.c \
- variable.c ${_wizard}
-WARNS?= 3
-
-# command.c
-
-.if ${MACHINE} == "pc98"
-CFLAGS+= -DPC98
-.endif
-CFLAGS+= -I${.CURDIR}/../../contrib/dialog -I.
-
-DPADD= ${LIBDIALOG} ${LIBNCURSESW} ${LIBM} ${LIBUTIL} ${LIBDISK}
-LDADD= -ldialog -lncursesw -lm -lutil -ldisk
-
-.include <bsd.prog.mk>
diff --git a/usr.sbin/sade/command.c b/usr.sbin/sade/command.c
deleted file mode 100644
index b3968df..0000000
--- a/usr.sbin/sade/command.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * $FreeBSD$
- *
- * Copyright (c) 1995
- * Jordan Hubbard. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * verbatim and that no modifications are made prior to this
- * point in the file.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#include "sade.h"
-
-#define MAX_NUM_COMMANDS 10
-
-typedef struct {
- char key[FILENAME_MAX];
- struct {
- enum { CMD_SHELL, CMD_FUNCTION } type;
- void *ptr, *data;
- } cmds[MAX_NUM_COMMANDS];
- int ncmds;
-} Command;
-
-#define MAX_CMDS 200
-static Command *commandStack[MAX_CMDS];
-int numCommands;
-
-/* Nuke the command stack */
-void
-command_clear(void)
-{
- int i, j;
-
- for (i = 0; i < numCommands; i++)
- for (j = 0; j < commandStack[i]->ncmds; j++)
- if (commandStack[i]->cmds[j].type == CMD_SHELL)
- free(commandStack[i]->cmds[j].ptr);
- free(commandStack[i]);
- numCommands = 0;
-}
-
-static void
-addit(char *key, int type, void *cmd, void *data)
-{
- int i;
-
- /* First, look for the key already present and add a command to it if found */
- for (i = 0; i < numCommands; i++) {
- if (!strcmp(commandStack[i]->key, key)) {
- if (commandStack[i]->ncmds == MAX_NUM_COMMANDS)
- msgFatal("More than %d commands stacked up behind %s??", MAX_NUM_COMMANDS, key);
- commandStack[i]->cmds[commandStack[i]->ncmds].type = type;
- commandStack[i]->cmds[commandStack[i]->ncmds].ptr = cmd;
- commandStack[i]->cmds[commandStack[i]->ncmds].data = data;
- ++(commandStack[i]->ncmds);
- return;
- }
- }
- if (numCommands == MAX_CMDS)
- msgFatal("More than %d commands accumulated??", MAX_CMDS);
-
- /* If we fell to here, it's a new key */
- commandStack[numCommands] = safe_malloc(sizeof(Command));
- strcpy(commandStack[numCommands]->key, key);
- commandStack[numCommands]->ncmds = 1;
- commandStack[numCommands]->cmds[0].type = type;
- commandStack[numCommands]->cmds[0].ptr = cmd;
- commandStack[numCommands]->cmds[0].data = data;
- ++numCommands;
-}
-
-/* Add a shell command under a given key */
-void
-command_shell_add(char *key, const char *fmt, ...)
-{
- va_list args;
- char *cmd;
-
- cmd = (char *)safe_malloc(256);
- va_start(args, fmt);
- vsnprintf(cmd, 256, fmt, args);
- va_end(args);
-
- addit(key, CMD_SHELL, cmd, NULL);
-}
-
-/* Add a shell command under a given key */
-void
-command_func_add(char *key, commandFunc func, void *data)
-{
- addit(key, CMD_FUNCTION, func, data);
-}
-
-static int
-sort_compare(Command *p1, Command *p2)
-{
- if (!p1 && !p2)
- return 0;
- else if (!p1 && p2) /* NULL has a "greater" value for commands */
- return 1;
- else if (p1 && !p2)
- return -1;
- else
- return strcmp(p1->key, p2->key);
-}
-
-void
-command_sort(void)
-{
- int i, j;
-
- commandStack[numCommands] = NULL;
- /* Just do a crude bubble sort since the list is small */
- for (i = 0; i < numCommands; i++) {
- for (j = 0; j < numCommands; j++) {
- if (sort_compare(commandStack[j], commandStack[j + 1]) > 0) {
- Command *tmp = commandStack[j];
-
- commandStack[j] = commandStack[j + 1];
- commandStack[j + 1] = tmp;
- }
- }
- }
-}
-
-/* Run all accumulated commands in sorted order */
-void
-command_execute(void)
-{
- int i, j, ret;
- commandFunc func;
-
- for (i = 0; i < numCommands; i++) {
- for (j = 0; j < commandStack[i]->ncmds; j++) {
- /* If it's a shell command, run system on it */
- if (commandStack[i]->cmds[j].type == CMD_SHELL) {
- msgNotify("Doing %s", (char *)commandStack[i]->cmds[j].ptr);
- ret = vsystem("%s", (char *)commandStack[i]->cmds[j].ptr);
- if (isDebug())
- msgDebug("Command `%s' returns status %d\n",
- (char *)commandStack[i]->cmds[j].ptr, ret);
- }
- else {
- /* It's a function pointer - call it with the key and
- the data */
- func = (commandFunc)commandStack[i]->cmds[j].ptr;
- if (isDebug())
- msgDebug("%p: Execute(%s, %s)\n",
- func, commandStack[i]->key,
- (char *)commandStack[i]->cmds[j].data);
- ret = (*func)(commandStack[i]->key, commandStack[i]->cmds[j].data);
- if (isDebug())
- msgDebug("Function @ %p returns status %d\n",
- commandStack[i]->cmds[j].ptr, ret);
- }
- }
- }
-}
diff --git a/usr.sbin/sade/devices.c b/usr.sbin/sade/devices.c
deleted file mode 100644
index 672ee20..0000000
--- a/usr.sbin/sade/devices.c
+++ /dev/null
@@ -1,344 +0,0 @@
-/*
- * $FreeBSD$
- *
- * Copyright (c) 1995
- * Jordan Hubbard. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * verbatim and that no modifications are made prior to this
- * point in the file.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#include <sys/fcntl.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/errno.h>
-#include <sys/time.h>
-#include <sys/stat.h>
-#include <ctype.h>
-#include <libdisk.h>
-
-#include "sade.h"
-
-/* how much to bias minor number for a given /dev/<ct#><un#>s<s#> slice */
-#define SLICE_DELTA (0x10000)
-
-static Device *Devices[DEV_MAX];
-static int numDevs;
-
-#define DEVICE_ENTRY(type, name, descr, max) { type, name, descr, max }
-
-#define DISK(name, descr, max) \
- DEVICE_ENTRY(DEVICE_TYPE_DISK, name, descr, max)
-
-static struct _devname {
- DeviceType type;
- char *name;
- char *description;
- int max;
-} device_names[] = {
- DISK("da%d", "SCSI disk device", 16),
- DISK("ad%d", "ATA/IDE disk device", 16),
- DISK("ar%d", "ATA/IDE RAID device", 16),
- DISK("afd%d", "ATAPI/IDE floppy device", 4),
- DISK("mlxd%d", "Mylex RAID disk", 4),
- DISK("amrd%d", "AMI MegaRAID drive", 4),
- DISK("idad%d", "Compaq RAID array", 4),
- DISK("twed%d", "3ware ATA RAID array", 4),
- DISK("aacd%d", "Adaptec FSA RAID array", 4),
- DISK("ipsd%d", "IBM ServeRAID RAID array", 4),
- DISK("mfid%d", "LSI MegaRAID SAS array", 4),
- { 0, NULL, NULL, 0 },
-};
-
-Device *
-new_device(char *name)
-{
- Device *dev;
-
- dev = safe_malloc(sizeof(Device));
- bzero(dev, sizeof(Device));
- if (name)
- SAFE_STRCPY(dev->name, name);
- return dev;
-}
-
-/* Stubs for unimplemented strategy routines */
-Boolean
-dummyInit(Device *dev)
-{
- return TRUE;
-}
-
-FILE *
-dummyGet(Device *dev, char *dist, Boolean probe)
-{
- return NULL;
-}
-
-void
-dummyShutdown(Device *dev)
-{
- return;
-}
-
-static int
-deviceTry(struct _devname dev, char *try, int i)
-{
- int fd;
- char unit[80];
-
- snprintf(unit, sizeof unit, dev.name, i);
- snprintf(try, FILENAME_MAX, "/dev/%s", unit);
- if (isDebug())
- msgDebug("deviceTry: attempting to open %s\n", try);
- fd = open(try, O_RDONLY);
- if (fd >= 0) {
- if (isDebug())
- msgDebug("deviceTry: open of %s succeeded.\n", try);
- }
- return fd;
-}
-
-/* Register a new device in the devices array */
-Device *
-deviceRegister(char *name, char *desc, char *devname, DeviceType type,
- Boolean (*init)(Device *), FILE * (*get)(Device *, char *, Boolean),
- void (*shutdown)(Device *), void *private)
-{
- Device *newdev = NULL;
-
- if (numDevs == DEV_MAX)
- msgFatal("Too many devices found!");
- else {
- newdev = new_device(name);
- newdev->description = desc;
- newdev->devname = devname;
- newdev->type = type;
- newdev->init = init ? init : dummyInit;
- newdev->get = get ? get : dummyGet;
- newdev->shutdown = shutdown ? shutdown : dummyShutdown;
- newdev->private = private;
- Devices[numDevs] = newdev;
- Devices[++numDevs] = NULL;
- }
- return newdev;
-}
-
-/* Reset the registered device chain */
-void
-deviceReset(void)
-{
- int i;
-
- for (i = 0; i < numDevs; i++) {
- DEVICE_SHUTDOWN(Devices[i]);
-
- /* XXX this potentially leaks Devices[i]->private if it's being
- * used to point to something dynamic, but you're not supposed
- * to call this routine at such times that some open instance
- * has its private ptr pointing somewhere anyway. XXX
- */
- free(Devices[i]);
- }
- Devices[numDevs = 0] = NULL;
-}
-
-/* Get all device information for devices we have attached */
-void
-deviceGetAll(void)
-{
- int i, j;
- char **names;
-
- msgNotify("Probing devices, please wait (this can take a while)...");
-
- /* Next, try to find all the types of devices one might need
- * during the second stage of the installation.
- */
- for (i = 0; device_names[i].name; i++) {
- for (j = 0; j < device_names[i].max; j++) {
- char try[FILENAME_MAX];
-
- switch(device_names[i].type) {
- case DEVICE_TYPE_DISK:
- deviceTry(device_names[i], try, j);
- break;
-
- default:
- break;
- }
- }
- }
-
- /* Finally, go get the disks and look for DOS partitions to register */
- if ((names = Disk_Names()) != NULL) {
- int i;
-
- for (i = 0; names[i]; i++) {
- Disk *d;
-
- /* Ignore memory disks */
- if (!strncmp(names[i], "md", 2))
- continue;
-
- /*
- * XXX
- * Due to unknown reasons, Disk_Names() returns SCSI CDROM as a
- * valid disk. This is main reason why sysinstall presents SCSI
- * CDROM to available disks in Fdisk/Label menu. In addition,
- * adding a blank SCSI CDROM to the menu generates floating point
- * exception in sparc64. Disk_Names() just extracts sysctl
- * "kern.disks". Why GEOM treats SCSI CDROM as a disk is beyond
- * me and that should be investigated.
- * For temporary workaround, ignore SCSI CDROM device.
- */
- if (!strncmp(names[i], "cd", 2))
- continue;
-
- d = Open_Disk(names[i]);
- if (!d) {
- msgDebug("Unable to open disk %s\n", names[i]);
- continue;
- }
-
- deviceRegister(names[i], names[i], d->name, DEVICE_TYPE_DISK,
- dummyInit, dummyGet, dummyShutdown, d);
- if (isDebug())
- msgDebug("Found a disk device named %s\n", names[i]);
-
-#if 0
- /* Look for existing DOS partitions to register as "DOS media devices" */
- for (c1 = d->chunks->part; c1; c1 = c1->next) {
- if (c1->type == fat || c1->type == efi || c1->type == extended) {
- Device *dev;
- char devname[80];
-
- /* Got one! */
- snprintf(devname, sizeof devname, "/dev/%s", c1->name);
- dev = deviceRegister(c1->name, c1->name, strdup(devname), DEVICE_TYPE_DOS,
- mediaInitDOS, mediaGetDOS, mediaShutdownDOS, NULL);
- dev->private = c1;
- if (isDebug())
- msgDebug("Found a DOS partition %s on drive %s\n", c1->name, d->name);
- }
- }
-#endif
- }
- free(names);
- }
- dlg_clear();
-}
-
-/* Rescan all devices, after closing previous set - convenience function */
-void
-deviceRescan(void)
-{
- deviceReset();
- deviceGetAll();
-}
-
-/*
- * Find all devices that match the criteria, allowing "wildcarding" as well
- * by allowing NULL or ANY values to match all. The array returned is static
- * and may be used until the next invocation of deviceFind().
- */
-Device **
-deviceFind(char *name, DeviceType class)
-{
- static Device *found[DEV_MAX];
- int i, j;
-
- j = 0;
- for (i = 0; i < numDevs; i++) {
- if ((!name || !strcmp(Devices[i]->name, name))
- && (class == DEVICE_TYPE_ANY || class == Devices[i]->type))
- found[j++] = Devices[i];
- }
- found[j] = NULL;
- return j ? found : NULL;
-}
-
-Device **
-deviceFindDescr(char *name, char *desc, DeviceType class)
-{
- static Device *found[DEV_MAX];
- int i, j;
-
- j = 0;
- for (i = 0; i < numDevs; i++) {
- if ((!name || !strcmp(Devices[i]->name, name)) &&
- (!desc || !strcmp(Devices[i]->description, desc)) &&
- (class == DEVICE_TYPE_ANY || class == Devices[i]->type))
- found[j++] = Devices[i];
- }
- found[j] = NULL;
- return j ? found : NULL;
-}
-
-int
-deviceCount(Device **devs)
-{
- int i;
-
- if (!devs)
- return 0;
- for (i = 0; devs[i]; i++);
- return i;
-}
-
-/*
- * Create a menu listing all the devices of a certain type in the system.
- * The passed-in menu is expected to be a "prototype" from which the new
- * menu is cloned.
- */
-DMenu *
-deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)(dialogMenuItem *d))
-{
- Device **devs;
- int numdevs;
- DMenu *tmp = NULL;
- int i, j;
-
- devs = deviceFind(NULL, type);
- numdevs = deviceCount(devs);
- if (!numdevs)
- return NULL;
- tmp = (DMenu *)safe_malloc(sizeof(DMenu) + (sizeof(dialogMenuItem) * (numdevs + 1)));
- bcopy(menu, tmp, sizeof(DMenu));
- for (i = 0; devs[i]; i++) {
- tmp->items[i].prompt = devs[i]->name;
- for (j = 0; j < numDevs; j++) {
- if (devs[i] == Devices[j]) {
- tmp->items[i].title = Devices[j]->description;
- break;
- }
- }
- if (j == numDevs)
- tmp->items[i].title = "<unknown device type>";
- tmp->items[i].fire = hook;
- }
- tmp->items[i].title = NULL;
- return tmp;
-}
diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c
deleted file mode 100644
index 513643b..0000000
--- a/usr.sbin/sade/disks.c
+++ /dev/null
@@ -1,972 +0,0 @@
-/*
- * $FreeBSD$
- *
- * Copyright (c) 1995
- * Jordan Hubbard. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * verbatim and that no modifications are made prior to this
- * point in the file.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#include "sade.h"
-#include <ctype.h>
-#include <fcntl.h>
-#include <inttypes.h>
-#include <libdisk.h>
-#include <sys/stat.h>
-#include <sys/disklabel.h>
-
-#ifdef WITH_SLICES
-enum size_units_t { UNIT_BLOCKS, UNIT_KILO, UNIT_MEG, UNIT_GIG, UNIT_SIZE };
-
-#ifdef PC98
-#define SUBTYPE_FREEBSD 50324
-#define SUBTYPE_FAT 37218
-#else
-#define SUBTYPE_FREEBSD 165
-#define SUBTYPE_FAT 6
-#endif
-#define SUBTYPE_EFI 239
-
-#ifdef PC98
-#define OTHER_SLICE_VALUES \
- "Other popular values are 37218 for a\n" \
- "DOS FAT partition.\n\n"
-#else
-#define OTHER_SLICE_VALUES \
- "Other popular values are 6 for a\n" \
- "DOS FAT partition, 131 for a Linux ext2fs partition, or\n" \
- "130 for a Linux swap partition.\n\n"
-#endif
-#define NON_FREEBSD_NOTE \
- "Note: If you choose a non-FreeBSD partition type, it will not\n" \
- "be formatted or otherwise prepared, it will simply reserve space\n" \
- "for you to use another tool, such as DOS format, to later format\n" \
- "and actually use the partition."
-
-/* Where we start displaying chunk information on the screen */
-#define CHUNK_START_ROW 5
-
-/* Where we keep track of MBR chunks */
-#define CHUNK_INFO_ENTRIES 16
-static struct chunk *chunk_info[CHUNK_INFO_ENTRIES];
-static int current_chunk;
-
-static void diskPartitionNonInteractive(Device *dev);
-#if !defined(__ia64__)
-static u_char * bootalloc(char *name, size_t *size);
-#endif
-
-static void
-record_chunks(Disk *d)
-{
- struct chunk *c1 = NULL;
- int i = 0;
- daddr_t last_free = 0;
-
- if (!d->chunks)
- msgFatal("No chunk list found for %s!", d->name);
-
- for (c1 = d->chunks->part; c1; c1 = c1->next) {
- if (c1->type == unused && c1->size > last_free) {
- last_free = c1->size;
- current_chunk = i;
- }
- chunk_info[i++] = c1;
- }
- chunk_info[i] = NULL;
- if (current_chunk >= i)
- current_chunk = i - 1;
-}
-
-static daddr_t Total;
-
-static void
-check_geometry(Disk *d)
-{
- int sg;
-
-#ifdef PC98
- if (d->bios_cyl >= 65536 || d->bios_hd > 256 || d->bios_sect >= 256)
-#else
- if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64)
-#endif
- {
- dlg_clear();
- sg = msgYesNo("WARNING: It is safe to use a geometry of %lu/%lu/%lu for %s on\n"
- "computers with modern BIOS versions. If this disk is to be used\n"
- "on an old machine it is recommended that it does not have more\n"
- "than 65535 cylinders, more than 255 heads, or more than\n"
-#ifdef PC98
- "255"
-#else
- "63"
-#endif
- " sectors per track.\n"
- "\n"
- "Would you like to keep using the current geometry?\n",
- d->bios_cyl, d->bios_hd, d->bios_sect, d->name);
- if (sg == 1) {
- Sanitize_Bios_Geom(d);
- msgConfirm("A geometry of %lu/%lu/%lu was calculated for %s.\n"
- "\n"
- "If you are not sure about this, please consult the Hardware Guide\n"
- "in the Documentation submenu or use the (G)eometry command to\n"
- "change it. Remember: you need to enter whatever your BIOS thinks\n"
- "the geometry is! For IDE, it's what you were told in the BIOS\n"
- "setup. For SCSI, it's the translation mode your controller is\n"
- "using. Do NOT use a ``physical geometry''.\n",
- d->bios_cyl, d->bios_hd, d->bios_sect, d->name);
- }
- }
-}
-
-static void
-print_chunks(Disk *d, int u)
-{
- int row;
- int i;
- daddr_t sz;
- char *szstr;
-
- szstr = (u == UNIT_GIG ? "GB" : (u == UNIT_MEG ? "MB" :
- (u == UNIT_KILO ? "KB" : "ST")));
-
- Total = 0;
- for (i = 0; chunk_info[i]; i++)
- Total += chunk_info[i]->size;
- attrset(A_NORMAL);
- mvaddstr(0, 0, "Disk name:\t");
- clrtobot();
- attrset(A_REVERSE); addstr(d->name); attrset(A_NORMAL);
- attrset(A_REVERSE); mvaddstr(0, 55, "FDISK Partition Editor"); attrset(A_NORMAL);
- mvprintw(1, 0,
- "DISK Geometry:\t%lu cyls/%lu heads/%lu sectors = %jd sectors (%jdMB)",
- d->bios_cyl, d->bios_hd, d->bios_sect,
- (intmax_t)d->bios_cyl * d->bios_hd * d->bios_sect,
- (intmax_t)d->bios_cyl * d->bios_hd * d->bios_sect / (1024/512) / 1024);
- mvprintw(3, 0, "%6s %10s(%s) %10s %8s %6s %10s %8s %8s",
- "Offset", "Size", szstr, "End", "Name", "PType", "Desc",
- "Subtype", "Flags");
- for (i = 0, row = CHUNK_START_ROW; chunk_info[i]; i++, row++) {
- switch(u) {
- default: /* fall thru */
- case UNIT_BLOCKS:
- sz = chunk_info[i]->size;
- break;
- case UNIT_KILO:
- sz = chunk_info[i]->size / (1024/512);
- break;
- case UNIT_MEG:
- sz = chunk_info[i]->size / (1024/512) / 1024;
- break;
- case UNIT_GIG:
- sz = chunk_info[i]->size / (1024/512) / 1024 / 1024;
- break;
- }
- if (i == current_chunk)
- attrset(ATTR_SELECTED);
- mvprintw(row, 0, "%10jd %10jd %10jd %8s %6d %10s %8d\t%-6s",
- (intmax_t)chunk_info[i]->offset, (intmax_t)sz,
- (intmax_t)chunk_info[i]->end, chunk_info[i]->name,
- chunk_info[i]->type,
- slice_type_name(chunk_info[i]->type, chunk_info[i]->subtype),
- chunk_info[i]->subtype, ShowChunkFlags(chunk_info[i]));
- if (i == current_chunk)
- attrset(A_NORMAL);
- }
-}
-
-static void
-print_command_summary(void)
-{
- mvprintw(14, 0, "The following commands are supported (in upper or lower case):");
- mvprintw(16, 0, "A = Use Entire Disk G = set Drive Geometry C = Create Slice");
- mvprintw(17, 0, "D = Delete Slice Z = Toggle Size Units S = Set Bootable | = Expert m.");
- mvprintw(18, 0, "T = Change Type U = Undo All Changes W = Write Changes Q = Finish");
- mvprintw(21, 0, "Use F1 or ? to get more help, arrow keys to select.");
- move(0, 0);
-}
-
-#ifdef PC98
-static void
-getBootMgr(char *dname, u_char **bootipl, size_t *bootipl_size,
- u_char **bootmenu, size_t *bootmenu_size)
-{
- static u_char *boot0;
- static size_t boot0_size;
- static u_char *boot05;
- static size_t boot05_size;
-
- char str[80];
- char *cp;
- int i = 0;
-
- dlg_clr_result();
- cp = variable_get(VAR_BOOTMGR);
- if (!cp) {
- /* Figure out what kind of IPL the user wants */
- sprintf(str, "Install Boot Manager for drive %s?", dname);
- MenuIPLType.title = str;
- i = dmenuOpen(&MenuIPLType);
- } else {
- if (!strncmp(cp, "boot", 4))
- dlg_add_result(MenuIPLType.items[0].prompt);
- else
- dlg_add_result(MenuIPLType.items[1].prompt);
- }
- if (cp || i) {
- if (!strcmp(dialog_vars.input_result, MenuIPLType.items[0].prompt)) {
- if (!boot0) boot0 = bootalloc("boot0", &boot0_size);
- *bootipl = boot0;
- *bootipl_size = boot0_size;
- if (!boot05) boot05 = bootalloc("boot0.5", &boot05_size);
- *bootmenu = boot05;
- *bootmenu_size = boot05_size;
- return;
- }
- }
- *bootipl = NULL;
- *bootipl_size = 0;
- *bootmenu = NULL;
- *bootmenu_size = 0;
-}
-#else
-static void
-getBootMgr(char *dname, u_char **bootCode, size_t *bootCodeSize)
-{
-#if defined(__i386__) || defined(__amd64__) /* only meaningful on x86 */
- static u_char *mbr, *boot0;
- static size_t mbr_size, boot0_size;
- char str[80];
- char *cp;
- int i = 0;
-
- dlg_clr_result();
- cp = variable_get(VAR_BOOTMGR);
- if (!cp) {
- /* Figure out what kind of MBR the user wants */
- sprintf(str, "Install Boot Manager for drive %s?", dname);
- MenuMBRType.title = str;
- i = dmenuOpen(&MenuMBRType);
- }
- else {
- if (!strcmp(cp, "standard"))
- dlg_add_result(MenuMBRType.items[0].prompt);
- if (!strncmp(cp, "boot", 4))
- dlg_add_result(MenuMBRType.items[1].prompt);
- else
- dlg_add_result(MenuMBRType.items[2].prompt);
- }
- if (cp || i) {
- if (!strcmp(dialog_vars.input_result, MenuMBRType.items[0].prompt)) {
- if (!mbr) mbr = bootalloc("mbr", &mbr_size);
- *bootCode = mbr;
- *bootCodeSize = mbr_size;
- return;
- } else if (!strcmp(dialog_vars.input_result, MenuMBRType.items[1].prompt)) {
- if (!boot0) boot0 = bootalloc("boot0", &boot0_size);
- *bootCode = boot0;
- *bootCodeSize = boot0_size;
- return;
- }
- }
-#endif
- *bootCode = NULL;
- *bootCodeSize = 0;
-}
-#endif
-#endif /* WITH_SLICES */
-
-#ifdef WITH_SLICES
-void
-diskPartition(Device *dev)
-{
- char *cp, *p;
- int rv, key = 0;
- int i;
- Boolean chunking;
- char *msg = NULL;
-#ifdef PC98
- u_char *bootipl;
- size_t bootipl_size;
- u_char *bootmenu;
- size_t bootmenu_size;
-#else
- u_char *mbrContents;
- size_t mbrSize;
-#endif
- WINDOW *w = savescr();
- Disk *d = (Disk *)dev->private;
- int size_unit;
-
- size_unit = UNIT_BLOCKS;
- chunking = TRUE;
- keypad(stdscr, TRUE);
-
- /* Flush both the dialog and curses library views of the screen
- since we don't always know who called us */
- dlg_clear(), clear();
- current_chunk = 0;
-
- /* Set up the chunk array */
- record_chunks(d);
-
- /* Give the user a chance to sanitize the disk geometry, if necessary */
- check_geometry(d);
-
- while (chunking) {
- char *val, geometry[80];
-
- /* Now print our overall state */
- if (d)
- print_chunks(d, size_unit);
- print_command_summary();
- if (msg) {
- attrset(title_attr); mvprintw(23, 0, msg); attrset(A_NORMAL);
- beep();
- msg = NULL;
- }
- else {
- move(23, 0);
- clrtoeol();
- }
-
- /* Get command character */
- key = getch();
- switch (toupper(key)) {
- case '\014': /* ^L (redraw) */
- clear();
- msg = NULL;
- break;
-
- case '\020': /* ^P */
- case KEY_UP:
- case '-':
- if (current_chunk != 0)
- --current_chunk;
- break;
-
- case '\016': /* ^N */
- case KEY_DOWN:
- case '+':
- case '\r':
- case '\n':
- if (chunk_info[current_chunk + 1])
- ++current_chunk;
- break;
-
- case KEY_HOME:
- current_chunk = 0;
- break;
-
- case KEY_END:
- while (chunk_info[current_chunk + 1])
- ++current_chunk;
- break;
-
- case KEY_F(1):
- case '?':
- systemDisplayHelp("slice");
- clear();
- break;
-
- case 'A':
- case 'F': /* Undocumented magic Dangerously Dedicated mode */
-#if !defined(__i386__) && !defined(__amd64__)
- rv = 1;
-#else /* The rest is only relevant on x86 */
- cp = variable_get(VAR_DEDICATE_DISK);
- if (cp && !strcasecmp(cp, "always"))
- rv = 1;
- else if (toupper(key) == 'A')
- rv = 0;
- else {
- rv = msgYesNo("Do you want to do this with a true partition entry\n"
- "so as to remain cooperative with any future possible\n"
- "operating systems on the drive(s)?\n"
- "(See also the section about ``dangerously dedicated''\n"
- "disks in the FreeBSD FAQ.)");
- if (rv == -1)
- rv = 0;
- }
-#endif
- All_FreeBSD(d, rv);
- variable_set2(DISK_PARTITIONED, "yes", 0);
- record_chunks(d);
- clear();
- break;
-
- case 'C':
- if (chunk_info[current_chunk]->type != unused)
- msg = "Slice in use, delete it first or move to an unused one.";
- else {
- char *val, tmp[20], name[16], *cp;
- daddr_t size;
- int subtype;
- chunk_e partitiontype;
-#ifdef PC98
- snprintf(name, sizeof (name), "%s", "FreeBSD");
- val = msgGetInput(name,
- "Please specify the name for new FreeBSD slice.");
- if (val)
- strncpy(name, val, sizeof (name));
-#else
- name[0] = '\0';
-#endif
- snprintf(tmp, 20, "%jd", (intmax_t)chunk_info[current_chunk]->size);
- val = msgGetInput(tmp, "Please specify the size for new FreeBSD slice in blocks\n"
- "or append a trailing `M' for megabytes (e.g. 20M).");
- if (val && (size = strtoimax(val, &cp, 0)) > 0) {
- if (*cp && toupper(*cp) == 'M')
- size *= ONE_MEG;
- else if (*cp && toupper(*cp) == 'G')
- size *= ONE_GIG;
- sprintf(tmp, "%d", SUBTYPE_FREEBSD);
- val = msgGetInput(tmp, "Enter type of partition to create:\n\n"
- "Pressing Enter will choose the default, a native FreeBSD\n"
- "slice (type %u). "
- OTHER_SLICE_VALUES
- NON_FREEBSD_NOTE, SUBTYPE_FREEBSD);
- if (val && (subtype = strtol(val, NULL, 0)) > 0) {
- if (subtype == SUBTYPE_FREEBSD)
- partitiontype = freebsd;
- else if (subtype == SUBTYPE_FAT)
- partitiontype = fat;
- else if (subtype == SUBTYPE_EFI)
- partitiontype = efi;
- else
-#ifdef PC98
- partitiontype = pc98;
-#else
- partitiontype = mbr;
-#endif
- Create_Chunk(d, chunk_info[current_chunk]->offset, size, partitiontype, subtype,
- (chunk_info[current_chunk]->flags & CHUNK_ALIGN), name);
- variable_set2(DISK_PARTITIONED, "yes", 0);
- record_chunks(d);
- }
- }
- clear();
- }
- break;
-
- case KEY_DC:
- case 'D':
- if (chunk_info[current_chunk]->type == unused)
- msg = "Slice is already unused!";
- else {
- Delete_Chunk(d, chunk_info[current_chunk]);
- variable_set2(DISK_PARTITIONED, "yes", 0);
- record_chunks(d);
- }
- break;
-
- case 'T':
- if (chunk_info[current_chunk]->type == unused)
- msg = "Slice is currently unused (use create instead)";
- else {
- char *val, tmp[20];
- int subtype;
- chunk_e partitiontype;
-
- sprintf(tmp, "%d", chunk_info[current_chunk]->subtype);
- val = msgGetInput(tmp, "New partition type:\n\n"
- "Pressing Enter will use the current type. To choose a native\n"
- "FreeBSD slice enter %u. "
- OTHER_SLICE_VALUES
- NON_FREEBSD_NOTE, SUBTYPE_FREEBSD);
- if (val && (subtype = strtol(val, NULL, 0)) > 0) {
- if (subtype == SUBTYPE_FREEBSD)
- partitiontype = freebsd;
- else if (subtype == SUBTYPE_FAT)
- partitiontype = fat;
- else if (subtype == SUBTYPE_EFI)
- partitiontype = efi;
- else
-#ifdef PC98
- partitiontype = pc98;
-#else
- partitiontype = mbr;
-#endif
- chunk_info[current_chunk]->type = partitiontype;
- chunk_info[current_chunk]->subtype = subtype;
- }
- }
- break;
-
- case 'G':
- snprintf(geometry, 80, "%lu/%lu/%lu", d->bios_cyl, d->bios_hd, d->bios_sect);
- val = msgGetInput(geometry, "Please specify the new geometry in cyl/hd/sect format.\n"
- "Don't forget to use the two slash (/) separator characters!\n"
- "It's not possible to parse the field without them.");
- if (val) {
- long nc, nh, ns;
- nc = strtol(val, &val, 0);
- nh = strtol(val + 1, &val, 0);
- ns = strtol(val + 1, 0, 0);
- Set_Bios_Geom(d, nc, nh, ns);
- }
- clear();
- break;
-
- case 'S':
- /* Clear active states so we won't have two */
- for (i = 0; (chunk_info[i] != NULL) && (i < CHUNK_INFO_ENTRIES); i++)
- chunk_info[i]->flags &= !CHUNK_ACTIVE;
-
- /* Set Bootable */
- chunk_info[current_chunk]->flags |= CHUNK_ACTIVE;
- break;
-
- case 'U':
- if (!variable_cmp(DISK_LABELLED, "written")) {
- msgConfirm("You've already written this information out - you\n"
- "can't undo it.");
- }
- else if (!msgNoYes("Are you SURE you want to Undo everything?")) {
- char cp[BUFSIZ];
-
- sstrncpy(cp, d->name, sizeof cp);
- Free_Disk(dev->private);
- d = Open_Disk(cp);
- if (!d)
- msgConfirm("Can't reopen disk %s! Internal state is probably corrupted", cp);
- dev->private = d;
- variable_unset(DISK_PARTITIONED);
- variable_unset(DISK_LABELLED);
- if (d)
- record_chunks(d);
- }
- clear();
- break;
-
- case 'W':
- if (!msgNoYes("WARNING: You are about to modify an EXISTING installation.\n"
- "You should simply type Q when you are finished\n"
- "here and write to the disk from the label editor.\n\n"
- "Are you absolutely sure you want to continue?")) {
- variable_set2(DISK_PARTITIONED, "yes", 0);
-
-#ifdef PC98
- /*
- * Don't trash the IPL if the first (and therefore only) chunk
- * is marked for a truly dedicated disk (i.e., the disklabel
- * starts at sector 0), even in cases where the user has
- * requested a FreeBSD Boot Manager -- both would be fatal in
- * this case.
- */
- /*
- * Don't offer to update the IPL on this disk if the first
- * "real" chunk looks like a FreeBSD "all disk" partition,
- * or the disk is entirely FreeBSD.
- */
- if ((d->chunks->part->type != freebsd) ||
- (d->chunks->part->offset > 1))
- getBootMgr(d->name, &bootipl, &bootipl_size,
- &bootmenu, &bootmenu_size);
- else {
- bootipl = NULL;
- bootipl_size = 0;
- bootmenu = NULL;
- bootmenu_size = 0;
- }
- Set_Boot_Mgr(d, bootipl, bootipl_size, bootmenu, bootmenu_size);
-#else
- /*
- * Don't trash the MBR if the first (and therefore only) chunk
- * is marked for a truly dedicated disk (i.e., the disklabel
- * starts at sector 0), even in cases where the user has
- * requested booteasy or a "standard" MBR -- both would be
- * fatal in this case.
- */
- /*
- * Don't offer to update the MBR on this disk if the first
- * "real" chunk looks like a FreeBSD "all disk" partition,
- * or the disk is entirely FreeBSD.
- */
- if ((d->chunks->part->type != freebsd) ||
- (d->chunks->part->offset > 1))
- getBootMgr(d->name, &mbrContents, &mbrSize);
- else {
- mbrContents = NULL;
- mbrSize = 0;
- }
- Set_Boot_Mgr(d, mbrContents, mbrSize);
-#endif
-
- if (DITEM_STATUS(diskPartitionWrite(dev)) != DITEM_SUCCESS)
- msgConfirm("Disk partition write returned an error status!");
- else
- msgConfirm("Wrote FDISK partition information out successfully.");
- }
- clear();
- break;
-
- case '|':
- if (!msgNoYes("Are you SURE you want to go into Wizard mode?\n"
- "No seat belts whatsoever are provided!")) {
- clear();
- refresh();
- slice_wizard(d);
- variable_set2(DISK_PARTITIONED, "yes", 0);
- record_chunks(d);
- }
- else
- msg = "Wise choice!";
- clear();
- break;
-
- case '\033': /* ESC */
- case 'Q':
- chunking = FALSE;
-#ifdef PC98
- /*
- * Don't trash the IPL if the first (and therefore only) chunk
- * is marked for a truly dedicated disk (i.e., the disklabel
- * starts at sector 0), even in cases where the user has requested
- * a FreeBSD Boot Manager -- both would be fatal in this case.
- */
- /*
- * Don't offer to update the IPL on this disk if the first "real"
- * chunk looks like a FreeBSD "all disk" partition, or the disk is
- * entirely FreeBSD.
- */
- if ((d->chunks->part->type != freebsd) ||
- (d->chunks->part->offset > 1)) {
- if (variable_cmp(DISK_PARTITIONED, "written")) {
- getBootMgr(d->name, &bootipl, &bootipl_size,
- &bootmenu, &bootmenu_size);
- if (bootipl != NULL && bootmenu != NULL)
- Set_Boot_Mgr(d, bootipl, bootipl_size,
- bootmenu, bootmenu_size);
- }
- }
-#else
- /*
- * Don't trash the MBR if the first (and therefore only) chunk
- * is marked for a truly dedicated disk (i.e., the disklabel
- * starts at sector 0), even in cases where the user has requested
- * booteasy or a "standard" MBR -- both would be fatal in this case.
- */
- /*
- * Don't offer to update the MBR on this disk if the first "real"
- * chunk looks like a FreeBSD "all disk" partition, or the disk is
- * entirely FreeBSD.
- */
- if ((d->chunks->part->type != freebsd) ||
- (d->chunks->part->offset > 1)) {
- if (variable_cmp(DISK_PARTITIONED, "written")) {
- getBootMgr(d->name, &mbrContents, &mbrSize);
- if (mbrContents != NULL)
- Set_Boot_Mgr(d, mbrContents, mbrSize);
- }
- }
-#endif
- break;
-
- case 'Z':
- size_unit = (size_unit + 1) % UNIT_SIZE;
- break;
-
- default:
- beep();
- msg = "Type F1 or ? for help";
- break;
- }
- }
- p = CheckRules(d);
- if (p) {
- char buf[FILENAME_MAX];
- DIALOG_VARS save_vars;
-
- dlg_save_vars(&save_vars);
- dialog_vars.help_line = "Press F1 to read more about disk slices.";
- dialog_vars.help_file = systemHelpFile("partition", buf);
- if (!variable_get(VAR_NO_WARN))
- xdialog_msgbox("Disk slicing warning:", p, -1, -1, 1);
- free(p);
- dlg_restore_vars(&save_vars);
- }
- restorescr(w);
-}
-#endif /* WITH_SLICES */
-
-#if !defined(__ia64__)
-static u_char *
-bootalloc(char *name, size_t *size)
-{
- char buf[FILENAME_MAX];
- struct stat sb;
-
- snprintf(buf, sizeof buf, "/boot/%s", name);
- if (stat(buf, &sb) != -1) {
- int fd;
-
- fd = open(buf, O_RDONLY);
- if (fd != -1) {
- u_char *cp;
-
- cp = malloc(sb.st_size);
- if (read(fd, cp, sb.st_size) != sb.st_size) {
- free(cp);
- close(fd);
- msgDebug("bootalloc: couldn't read %ld bytes from %s\n", (long)sb.st_size, buf);
- return NULL;
- }
- close(fd);
- if (size != NULL)
- *size = sb.st_size;
- return cp;
- }
- msgDebug("bootalloc: couldn't open %s\n", buf);
- }
- else
- msgDebug("bootalloc: can't stat %s\n", buf);
- return NULL;
-}
-#endif /* !__ia64__ */
-
-#ifdef WITH_SLICES
-static int
-partitionHook(dialogMenuItem *selected)
-{
- Device **devs = NULL;
-
- devs = deviceFind(selected->prompt, DEVICE_TYPE_DISK);
- if (!devs) {
- msgConfirm("Unable to find disk %s!", selected->prompt);
- return DITEM_FAILURE;
- }
- diskPartition(devs[0]);
- return DITEM_SUCCESS;
-}
-
-int
-diskPartitionEditor(dialogMenuItem *self)
-{
- DMenu *menu;
- Device **devs;
-
- devs = deviceFind(variable_get(VAR_DISK), DEVICE_TYPE_DISK);
- if (devs == NULL) {
- msgConfirm("No disks found! Please verify that your disk controller is being\n"
- "properly probed at boot time. See the Hardware Guide on the\n"
- "Documentation menu for clues on diagnosing this type of problem.");
- return DITEM_FAILURE;
- }
- else {
- /* No disks are selected, fall-back case now */
- int cnt = deviceCount(devs);
-
- if (cnt == 1) {
- if (variable_get(VAR_NONINTERACTIVE) &&
- !variable_get(VAR_DISKINTERACTIVE))
- diskPartitionNonInteractive(devs[0]);
- else
- diskPartition(devs[0]);
- return DITEM_SUCCESS;
- }
- else {
- int result;
-
- menu = deviceCreateMenu(&MenuDiskDevices, DEVICE_TYPE_DISK, partitionHook);
- if (!menu) {
- msgConfirm("No devices suitable for installation found!\n\n"
- "Please verify that your disk controller (and attached drives)\n"
- "were detected properly. This can be done by pressing the\n"
- "[Scroll Lock] key and using the Arrow keys to move back to\n"
- "the boot messages. Press [Scroll Lock] again to return.");
- return DITEM_FAILURE;
- }
-
- result = dmenuOpen(menu) ? DITEM_SUCCESS : DITEM_FAILURE;
- free(menu);
- return result;
- }
- }
- return DITEM_SUCCESS;
-}
-#endif /* WITH_SLICES */
-
-int
-diskPartitionWrite(Device *dev)
-{
- Disk *d = (Disk *)dev->private;
-#if !defined(__ia64__)
- static u_char *boot1;
-#endif
-#if defined(__i386__) || defined(__amd64__)
- static u_char *boot2;
-#endif
-
- if (!variable_cmp(DISK_PARTITIONED, "written"))
- return DITEM_SUCCESS;
-
-#if defined(__i386__) || defined(__amd64__)
- if (!boot1) boot1 = bootalloc("boot1", NULL);
- if (!boot2) boot2 = bootalloc("boot2", NULL);
- Set_Boot_Blocks(d, boot1, boot2);
-#elif !defined(__ia64__)
- if (!boot1) boot1 = bootalloc("boot1", NULL);
- Set_Boot_Blocks(d, boot1, NULL);
-#endif
-
- msgNotify("Writing partition information to drive %s", d->name);
- if (!Fake && Write_Disk(d)) {
- msgConfirm("ERROR: Unable to write data to disk %s!", d->name);
- return DITEM_FAILURE;
- }
-
- /* Now it's not "yes", but "written" */
- variable_set2(DISK_PARTITIONED, "written", 0);
- return DITEM_SUCCESS | DITEM_RESTORE;
-}
-
-#ifdef WITH_SLICES
-/* Partition a disk based wholly on which variables are set */
-static void
-diskPartitionNonInteractive(Device *dev)
-{
- char *cp;
- int i, all_disk = 0;
- daddr_t sz;
-#ifdef PC98
- u_char *bootipl;
- size_t bootipl_size;
- u_char *bootmenu;
- size_t bootmenu_size;
-#else
- u_char *mbrContents;
- size_t mbrSize;
-#endif
- Disk *d = (Disk *)dev->private;
-
- record_chunks(d);
- cp = variable_get(VAR_GEOMETRY);
- if (cp) {
- if (!strcasecmp(cp, "sane")) {
-#ifdef PC98
- if (d->bios_cyl >= 65536 || d->bios_hd > 256 || d->bios_sect >= 256)
-#else
- if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64)
-#endif
- {
- msgDebug("Warning: A geometry of %lu/%lu/%lu for %s is incorrect.\n",
- d->bios_cyl, d->bios_hd, d->bios_sect, d->name);
- Sanitize_Bios_Geom(d);
- msgDebug("Sanitized geometry for %s is %lu/%lu/%lu.\n",
- d->name, d->bios_cyl, d->bios_hd, d->bios_sect);
- }
- } else {
- msgDebug("Setting geometry from script to: %s\n", cp);
- d->bios_cyl = strtol(cp, &cp, 0);
- d->bios_hd = strtol(cp + 1, &cp, 0);
- d->bios_sect = strtol(cp + 1, 0, 0);
- }
- }
-
- cp = variable_get(VAR_PARTITION);
- if (cp) {
- if (!strcmp(cp, "free")) {
- /* Do free disk space case */
- for (i = 0; chunk_info[i]; i++) {
- /* If a chunk is at least 10MB in size, use it. */
- if (chunk_info[i]->type == unused && chunk_info[i]->size > (10 * ONE_MEG)) {
- Create_Chunk(d, chunk_info[i]->offset, chunk_info[i]->size,
- freebsd, 3,
- (chunk_info[i]->flags & CHUNK_ALIGN),
- "FreeBSD");
- variable_set2(DISK_PARTITIONED, "yes", 0);
- break;
- }
- }
- if (!chunk_info[i]) {
- msgConfirm("Unable to find any free space on this disk!");
- return;
- }
- }
- else if (!strcmp(cp, "all")) {
- /* Do all disk space case */
- msgDebug("Warning: Devoting all of disk %s to FreeBSD.\n", d->name);
-
- All_FreeBSD(d, FALSE);
- }
- else if (!strcmp(cp, "exclusive")) {
- /* Do really-all-the-disk-space case */
- msgDebug("Warning: Devoting all of disk %s to FreeBSD.\n", d->name);
-
- All_FreeBSD(d, all_disk = TRUE);
- }
- else if ((sz = strtoimax(cp, &cp, 0))) {
- /* Look for sz bytes free */
- if (*cp && toupper(*cp) == 'M')
- sz *= ONE_MEG;
- else if (*cp && toupper(*cp) == 'G')
- sz *= ONE_GIG;
- for (i = 0; chunk_info[i]; i++) {
- /* If a chunk is at least sz MB, use it. */
- if (chunk_info[i]->type == unused && chunk_info[i]->size >= sz) {
- Create_Chunk(d, chunk_info[i]->offset, sz, freebsd, 3,
- (chunk_info[i]->flags & CHUNK_ALIGN),
- "FreeBSD");
- variable_set2(DISK_PARTITIONED, "yes", 0);
- break;
- }
- }
- if (!chunk_info[i]) {
- msgConfirm("Unable to find %jd free blocks on this disk!",
- (intmax_t)sz);
- return;
- }
- }
- else if (!strcmp(cp, "existing")) {
- /* Do existing FreeBSD case */
- for (i = 0; chunk_info[i]; i++) {
- if (chunk_info[i]->type == freebsd)
- break;
- }
- if (!chunk_info[i]) {
- msgConfirm("Unable to find any existing FreeBSD partitions on this disk!");
- return;
- }
- }
- else {
- msgConfirm("`%s' is an invalid value for %s - is config file valid?", cp, VAR_PARTITION);
- return;
- }
- if (!all_disk) {
-#ifdef PC98
- getBootMgr(d->name, &bootipl, &bootipl_size,
- &bootmenu, &bootmenu_size);
- Set_Boot_Mgr(d, bootipl, bootipl_size, bootmenu, bootmenu_size);
-#else
- getBootMgr(d->name, &mbrContents, &mbrSize);
- Set_Boot_Mgr(d, mbrContents, mbrSize);
-#endif
- }
- variable_set2(DISK_PARTITIONED, "yes", 0);
- }
-}
-#endif /* WITH_SLICES */
diff --git a/usr.sbin/sade/dmenu.c b/usr.sbin/sade/dmenu.c
deleted file mode 100644
index 186c1e9..0000000
--- a/usr.sbin/sade/dmenu.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * $FreeBSD$
- *
- * Copyright (c) 1995
- * Jordan Hubbard. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * verbatim and that no modifications are made prior to this
- * point in the file.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#include "sade.h"
-#include <errno.h>
-
-#define MAX_MENU 15
-
-static int
-menu_height(DMenu *menu, int n)
-{
- int max;
- char *t;
-
- max = MAX_MENU;
- if (StatusLine > 24)
- max += StatusLine - 24;
- for (t = menu->prompt; *t; t++) {
- if (*t == '\n')
- --max;
- }
- return n > max ? max : n;
-}
-
-/* Traverse over an internal menu */
-Boolean
-dmenuOpen(DMenu *menu)
-{
- int n, rval = 0;
-
- /* Count up all the items */
- for (n = 0; menu->items[n].title; n++)
- ;
-
- while (1) {
- char buf[FILENAME_MAX];
- DIALOG_VARS save_vars;
- WINDOW *w = savescr();
-
- /* Any helpful hints, put 'em up! */
- dlg_save_vars(&save_vars);
- dialog_vars.help_line = menu->helpline;
- dialog_vars.help_file = systemHelpFile(menu->helpfile, buf);
- dlg_clear();
- /* Pop up that dialog! */
- if (menu->type & DMENU_NORMAL_TYPE) {
- rval = xdialog_menu(menu->title, menu->prompt,
- -1, -1, menu_height(menu, n), n, menu->items);
- } else if (menu->type & DMENU_RADIO_TYPE) {
- rval = xdialog_radiolist(menu->title, menu->prompt,
- -1, -1, menu_height(menu, n), n, menu->items);
- } else {
- msgFatal("Menu: `%s' is of an unknown type\n", menu->title);
- }
- dlg_restore_vars(&save_vars);
- if (rval) {
- restorescr(w);
- return FALSE;
- } else if (menu->type & DMENU_SELECTION_RETURNS) {
- restorescr(w);
- return TRUE;
- } else
- delwin(w);
- }
-}
diff --git a/usr.sbin/sade/globals.c b/usr.sbin/sade/globals.c
deleted file mode 100644
index 0b08da3..0000000
--- a/usr.sbin/sade/globals.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * $FreeBSD$
- *
- * Copyright (c) 1995
- * Jordan Hubbard. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * verbatim and that no modifications are made prior to this
- * point in the file.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#include "sade.h"
-
-/*
- * Various global variables and an initialization hook to set them to
- * whatever values we feel are appropriate.
- */
-
-int DebugFD; /* Where diagnostic output goes */
-Boolean Fake; /* Only pretend to be useful */
-Boolean DialogActive; /* Is libdialog initialized? */
-Boolean ColorDisplay; /* Are we on a color display? */
-Boolean OnVTY; /* Are we on a VTY? */
-Boolean Restarting; /* Are we restarting sysinstall? */
-Variable *VarHead; /* The head of the variable chain */
-int BootMgr; /* Which boot manager we're using */
-int StatusLine; /* Where to stick our status messages */
-jmp_buf BailOut; /* Beam me up, scotty! The natives are pissed! */
-
-Chunk *HomeChunk;
-Chunk *RootChunk;
-Chunk *SwapChunk;
-Chunk *TmpChunk;
-Chunk *UsrChunk;
-Chunk *VarChunk;
-#ifdef __ia64__
-Chunk *EfiChunk;
-#endif
-
-/*
- * Yes, I know some of these are already automatically initialized as
- * globals. I simply find it clearer to set everything explicitly.
- */
-void
-globalsInit(void)
-{
- DebugFD = -1;
- ColorDisplay = FALSE;
- Fake = FALSE;
- Restarting = FALSE;
- OnVTY = FALSE;
- DialogActive = FALSE;
- VarHead = NULL;
-
- HomeChunk = NULL;
- RootChunk = NULL;
- SwapChunk = NULL;
- TmpChunk = NULL;
- UsrChunk = NULL;
- VarChunk = NULL;
-#ifdef __ia64__
- EfiChunk = NULL;
-#endif
-}
diff --git a/usr.sbin/sade/help/partition.hlp b/usr.sbin/sade/help/partition.hlp
deleted file mode 100644
index 3d13b34..0000000
--- a/usr.sbin/sade/help/partition.hlp
+++ /dev/null
@@ -1,169 +0,0 @@
-This is the FreeBSD DiskLabel Editor.
-
-NOTE: If you're entering this editor from the update procedure then
-you probably shouldn't (C)reate anything at all but rather use only
-the (M)ount command to check and mount existing partitions for
-upgrading.
-
-If you would like the label editor to do most of the following for
-you, simply type `A' for automatic partitioning of the disk.
-
-If you wish to create partitions manually you may do so by moving the
-highlighted selection bar with the arrow keys over the FreeBSD
-partition(s) displayed at the top of the screen. Typing (C)reate
-while a partition with available free space is selected will allow you
-to create a BSD partition inside of it using some or all of its
-available space.
-
-Typing (M)ount over an existing partition entry (displayed in the
-middle of the screen) will allow you to set a mount point for it
-without initializing it. If you want it initialized, use the (T)oggle
-command to flip the Newfs flag. When Newfs is set to "Y", the
-filesystem in question will be ERASED and rebuilt from scratch!
-
-
-You should use this editor to create at least the following
-filesystems:
-
- Name Purpose Min Size? Optional?
- ---- ------- --------- ---------
- / Root filesystem 118MB No
- swap Swap space 2 * MEM No
- /usr System & user files 128MB or more Yes
-
-Note: If you do not create a /usr filesystem then your / filesystem
-will need to be bigger - at least 240MB. This is not recommended as
-any media errors that may occur during disk I/O to user files will
-corrupt the filesystem containing vital system files as well. It is
-for this reason that / is generally kept on its own filesystem, where
-it should be considered essentially "read only" in your administration
-of it.
-
-Swap space is a little tricker, and the rule of "2 * MEM" is simply a
-best-guess approximation and not necessarily accurate for your
-intended usage of the system. If you intend to use the system heavily
-in a server or multi-user application, you may be well advised to
-increase this size. You may also create swap space on multiple drives
-for a larger "total" swap and this is, in fact, recommended if you
-have multiple, fast drives for which such load-balancing can only help
-overall I/O performance.
-
-The /usr filesystem should be sized according to what kind of
-distributions you're trying to load and how many packages you intend
-to install in locations like /usr/local. You can also make /usr/local
-a separate filesystem if you don't want to risk filling up your /usr
-by mistake.
-
-Another useful filesystem to create is /var, which contains mail, news
-printer spool files and other temporary items. It is a popular
-candidate for a separate partition and should be sized according to
-your estimates of the amount of mail, news or spooled print jobs that
-may be stored there.
-
-WARNING: If you do not create a separate filesystem for /var, space
-for such files will be allocated out of the root (/) filesystem
-instead. You may therefore wish to make the / partition bigger if you
-expect a lot of mail or news and do not want to make /var its own
-partition.
-
-If you're new to this installation, you might also want to read the
-following explanation of how FreeBSD's new "slice" paradigm for
-looking at disk storage works:
-
-
-In FreeBSD's new system, a device name can be broken up into up to 3
-parts. Take a typical name like ``/dev/da0s1a'':
-
- The first three characters represent the drive name. If we had
- a system with two SCSI drives on it then we'd see /dev/da0 and
- /dev/da1 as the device entries representing the entire drives.
-
- Next you have the "slice" (or "FDISK Partition") number,
- as seen in the Partition Editor. Assuming that our da0
- contained two slices, a FreeBSD slice and a DOS slice, that
- would give us /dev/da0s1 and /dev/da0s2 as device entries pointing
- to the entire slices.
-
- Next, if a slice is a FreeBSD slice, you can have a number of
- (confusingly named) "partitions" inside of it.
-
- These partitions are where various filesystems or swap areas live,
- and using our hypothetical two-SCSI-disk machine again, we might
- have something like the following layout on da0:
-
- Name Mountpoint
- ---- ----------
- da0s1a /
- da0s1b <swap space>
- da0s1e /usr
-
-Once you understand all this, then the purpose of the label editor
-becomes fairly clear: You're carving up the FreeBSD slices displayed
-at the top of the screen into smaller pieces, which are displayed in
-the middle of the screen, and then assigning FreeBSD file system names
-(mount points) to them.
-
-You can also use the label editor to mount existing partitions/slices
-into your filesystem hierarchy, as is frequently done for DOS FAT
-slices. For FreeBSD partitions, you can also toggle the "newfs" state
-so that the partitions are either (re)created from scratch or simply
-checked and mounted (the contents are preserved).
-
-If you set (S)oftUpdates on a filesystem, it will cause the
-"Soft Updates" policy to be in effect for it. This basically causes
-both metadata and data blocks to be written asynchronously to disk,
-but with extra state information which causes the metadata and any
-related data blocks to be committed in a single transaction. This
-results in async metadata update speeds (which are considerably
-faster than the default sync) without the potential for data loss
-which could occur if you simply mounted the filesystem with purely
-"async" update policy and then had a power failure. If you wish
-to later turn the softupdates policy back off, use the command
-"tunefs -n disable devicename". NOTE: It is probably not wise
-to use this on your root filesystem unless you have a large
-(e.g. non-standard size) root. The reason is that smaller filesystems
-with significant activity can temporarily overflow if the soft updates
-policy results in free'd blocks not being "garbage collected" as fast
-as they're being requested.
-
-The UNIX File System (UFS) on FreeBSD supports two different on-disk
-layouts: UFS1 and UFS2. UFS1 was the default file system in use
-through FreeBSD 5.0-RELEASE; as of FreeBSD 5.1-RELEASE, the default
-is now UFS2, with the exception of the PC98 platform. UFS2 provides
-sparse inode allocation (faster fsck), 64-bit storage pointers (larger
-maximum size), and native extended attributes (required for ACLs, MAC,
-and other advanced security and file system services). The selection
-of UFS1 or UFS2 must be made when the file system is created--later
-conversion is not currently possible. UFS2 is the recommended file
-system, but if disks are to be used on older FreeBSD systems, UFS1
-improves portability. When dual-booting between FreeBSD 4.x or
-earlier and FreeBSD 5.x, UFS1 file systems will be accessible from
-both. To toggle a file system to UFS1, press '1'. To restore it to
-UFS2, press '2'.
-
-WARNING: FreeBSD on i386 is currently unable to boot from root file
-systems larger than 1.5TB.
-
-To add additional flags to the newfs command line for UFS file
-systems, press 'N'. These options will be specified before the
-device argument of the command line, but after any other options
-placed there by sysinstall, such as the UFS version and soft
-updates flag; as such, arguments provided may override existing
-settings. To completely replace the newfs command used by
-sysinstall, press 'Z' to convert a partition to a Custom
-partition type. Sysinstall will prompt you with the newfs
-command line that it would have used based on existing settings
-prior to the change, but allow you to modify any aspect of the
-command line. Once a partition has been converted to a custom
-partition in the label editor, you will need to restart the
-labeling process or delete and recreate the partition to restore
-it to a non-custom state. Custom partitions are represented by
-the letters "CST" instead of "UFS" or "FAT.
-
-When you're done, type `Q' to exit.
-
-No actual changes will be made to the disk until you (C)ommit from the
-Install menu or (W)rite directly from this one. You're working with
-what is essentially a copy of the disk label(s), both here and in the
-FDISK Partition Editor, and the actual on-disk labels won't be
-affected by any changes you make until you explicitly say so.
diff --git a/usr.sbin/sade/help/slice.hlp b/usr.sbin/sade/help/slice.hlp
deleted file mode 100644
index e9f3abb..0000000
--- a/usr.sbin/sade/help/slice.hlp
+++ /dev/null
@@ -1,57 +0,0 @@
-This is the Main Slice (``FDISK'' or PC-style Partition) Editor.
-
-Possible commands are printed at the bottom and the Master Boot Record
-contents are shown at the top. You can move up and down with the
-arrow keys and (C)reate a new slice whenever the highlighted
-selection bar is over a slice whose type is marked as "unused."
-
-You are expected to leave this screen with at least one slice
-marked "FreeBSD." Note that unlike Linux, you don't need to create
-multiple FreeBSD FDISK partition entries for different things like
-swap, file systems, etc. The usual convention is to create ONE
-FreeBSD slice (FDISK partition) per drive and then subsection this slice
-into swap and file systems with the Label editor.
-
-No actual changes will be made to the disk until you (C)ommit from the
-Install menu or use the (W)rite option here! You're working with what
-is essentially a copy of the disk label(s), both here and in the Label
-Editor.
-
-If you want to use the entire disk for FreeBSD, type `A'. Slices will
-be aligned to fictitious cylinder boundaries and space will be reserved
-in front of the FreeBSD slice for a [future] possible boot manager.
-
-For the truly dedicated disk case, type `F'. You'll be asked whether or
-not you wish to keep the disk (potentially) compatible with other
-operating systems, i.e. the information in the FDISK table should be
-kept valid. A truly dedicated disk can be achieved by selecting `No'.
-In that case, all BIOS geometry considerations will no longer be in
-effect and you can safely ignore any ``The detected geometry is
-invalid'' warning messages you may later see. It is also not necessary
-in this case to set a slice bootable or install an MBR boot manager as
-both things are then irrelevant. The FreeBSD slice will start at
-absolute sector 0 of the disk (so that FreeBSD's disk label is identical
-to the Master Boot Record) and extend to the very last sector of the
-disk medium. Needless to say, such a disk cannot have any sort of a
-boot manager, `disk manager', or anything else that has to interact with
-the BIOS. This option is therefore only considered safe for SCSI disks
-and most IDE disks and is primarily intended for people who are going to
-set up a dedicated FreeBSD server or workstation, not a typical `home PC'.
-
-If you select the default of `Yes' at the compatibility, slices will be
-aligned to fictitious cylinder boundaries and space will be reserved
-in front of the FreeBSD slice for a [future] possible boot manager.
-This is pretty much equivalent to having chosen `A' originally.
-
-The flags field has the following legend:
-
- '=' -- This slice is properly aligned.
- 'A' -- This slice is marked active.
- 'R' -- This slice contains the root (/) filesystem
-
-If no slice is marked Active, you will need to either install
-a Boot Manager (the option for which will be presented later in the
-installation) or set one Active before leaving this screen.
-
-To leave the slice editor, type `Q'.
-
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
deleted file mode 100644
index e3364fe..0000000
--- a/usr.sbin/sade/install.c
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- * $FreeBSD$
- *
- * Copyright (c) 1995
- * Jordan Hubbard. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * verbatim and that no modifications are made prior to this
- * point in the file.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#include <ctype.h>
-#include <sys/consio.h>
-#include <sys/disklabel.h>
-#include <sys/errno.h>
-#include <sys/ioctl.h>
-#include <sys/fcntl.h>
-#include <sys/wait.h>
-#include <sys/uio.h>
-#include <sys/param.h>
-#define MSDOSFS
-#include <sys/mount.h>
-#include <ufs/ufs/ufsmount.h>
-#include <fs/msdosfs/msdosfsmount.h>
-#undef MSDOSFS
-#include <sys/stat.h>
-#include <sys/sysctl.h>
-#include <libdisk.h>
-#include <limits.h>
-#include <unistd.h>
-#include <termios.h>
-
-#include "sade.h"
-
-#define TERMCAP_FILE "/usr/share/misc/termcap"
-
-Boolean
-checkLabels(Boolean whinge)
-{
- Boolean status;
-
- /* Don't allow whinging if noWarn is set */
- if (variable_get(VAR_NO_WARN))
- whinge = FALSE;
-
- status = TRUE;
- HomeChunk = RootChunk = SwapChunk = NULL;
- TmpChunk = UsrChunk = VarChunk = NULL;
-#ifdef __ia64__
- EfiChunk = NULL;
-#endif
-
- /* We don't need to worry about root/usr/swap if we're already multiuser */
- return status;
-}
-
-#define QUEUE_YES 1
-#define QUEUE_NO 0
-static int
-performNewfs(PartInfo *pi, char *dname, int queue)
-{
- char buffer[LINE_MAX];
-
- if (pi->do_newfs) {
- switch(pi->newfs_type) {
- case NEWFS_UFS:
- snprintf(buffer, LINE_MAX, "%s %s %s %s %s",
- NEWFS_UFS_CMD,
- pi->newfs_data.newfs_ufs.softupdates ? "-U" : "",
- pi->newfs_data.newfs_ufs.ufs1 ? "-O1" : "-O2",
- pi->newfs_data.newfs_ufs.user_options,
- dname);
- break;
-
- case NEWFS_MSDOS:
- snprintf(buffer, LINE_MAX, "%s %s", NEWFS_MSDOS_CMD,
- dname);
- break;
-
- case NEWFS_CUSTOM:
- snprintf(buffer, LINE_MAX, "%s %s",
- pi->newfs_data.newfs_custom.command, dname);
- break;
- }
-
- if (queue == QUEUE_YES) {
- command_shell_add(pi->mountpoint, "%s", buffer);
- return (0);
- } else
- return (vsystem("%s", buffer));
- }
- return (0);
-}
-
-/* Go newfs and/or mount all the filesystems we've been asked to */
-int
-installFilesystems(Device *dev)
-{
- Disk *disk = (Disk *)dev->private;
- Chunk *c1, *c2;
- PartInfo *root;
- char dname[80];
- Boolean upgrade = FALSE;
-
- /* If we've already done this, bail out */
- if (!variable_cmp(DISK_LABELLED, "written"))
- return DITEM_SUCCESS;
-
- upgrade = !variable_cmp(SYSTEM_STATE, "upgrade");
- if (!checkLabels(TRUE))
- return DITEM_FAILURE;
-
- root = (RootChunk != NULL) ? (PartInfo *)RootChunk->private_data : NULL;
-
- command_clear();
-
- /* Now buzz through the rest of the partitions and mount them too */
- if (!disk->chunks) {
- msgConfirm("No chunk list found for %s!", disk->name);
- return DITEM_FAILURE | DITEM_RESTORE;
- }
- for (c1 = disk->chunks->part; c1; c1 = c1->next) {
-#ifdef __ia64__
- if (c1->type == part) {
- c2 = c1;
- {
-#elif defined(__powerpc__)
- if (c1->type == apple) {
- for (c2 = c1->part; c2; c2 = c2->next) {
-#else
- if (c1->type == freebsd) {
- for (c2 = c1->part; c2; c2 = c2->next) {
-#endif
- if (c2->type == part && c2->subtype != FS_SWAP && c2->private_data) {
- PartInfo *tmp = (PartInfo *)c2->private_data;
-
- /* Already did root */
- if (c2 == RootChunk)
- continue;
-
- sprintf(dname, "/dev/%s", c2->name);
-
- if (tmp->do_newfs && (!upgrade ||
- !msgNoYes("You are upgrading - are you SURE you"
- " want to newfs /dev/%s?", c2->name)))
- performNewfs(tmp, dname, QUEUE_YES);
- else
- command_shell_add(tmp->mountpoint,
- "fsck_ffs -y /dev/%s", c2->name);
- command_func_add(tmp->mountpoint, Mount, c2->name);
- }
- else if (c2->type == part && c2->subtype == FS_SWAP) {
- char fname[80];
- int i;
-
- if (c2 == SwapChunk)
- continue;
- sprintf(fname, "/dev/%s", c2->name);
- i = (Fake || swapon(fname));
- if (!i) {
- dlg_clear();
- msgNotify("Added %s as an additional swap device", fname);
- }
- else {
- msgConfirm("Unable to add %s as a swap device: %s", fname, strerror(errno));
- }
- }
- }
- }
- else if (c1->type == fat && c1->private_data &&
- (root->do_newfs || upgrade)) {
- char name[FILENAME_MAX];
-
- sprintf(name, "/%s", ((PartInfo *)c1->private_data)->mountpoint);
- Mkdir(name);
- }
-#if defined(__ia64__)
- else if (c1->type == efi && c1->private_data) {
- PartInfo *pi = (PartInfo *)c1->private_data;
-
- sprintf(dname, "/dev/%s", c1->name);
-
- if (pi->do_newfs && (!upgrade ||
- !msgNoYes("You are upgrading - are you SURE you want to "
- "newfs /dev/%s?", c1->name)))
- performNewfs(pi, dname, QUEUE_YES);
- }
-#endif
- }
-
- command_sort();
- command_execute();
- dlg_clear();
- return DITEM_SUCCESS | DITEM_RESTORE;
-}
-
-static char *
-getRelname(void)
-{
- static char buf[64];
- size_t sz = (sizeof buf) - 1;
-
- if (sysctlbyname("kern.osrelease", buf, &sz, NULL, 0) != -1) {
- buf[sz] = '\0';
- return buf;
- }
- else
- return "<unknown>";
-}
-
-/* Initialize various user-settable values to their defaults */
-int
-installVarDefaults(dialogMenuItem *self)
-{
-
- /* Set default startup options */
- variable_set2(VAR_RELNAME, getRelname(), 0);
- variable_set2(SYSTEM_STATE, "update", 0);
- variable_set2(VAR_NEWFS_ARGS, "-b 16384 -f 2048", 0);
- variable_set2(VAR_CONSTERM, "NO", 0);
- return DITEM_SUCCESS;
-}
-
-/* Load the environment up from various system configuration files */
-void
-installEnvironment(void)
-{
-}
-
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c
deleted file mode 100644
index d6b03b5..0000000
--- a/usr.sbin/sade/label.c
+++ /dev/null
@@ -1,1646 +0,0 @@
-/*
- * $FreeBSD$
- *
- * Copyright (c) 1995
- * Jordan Hubbard. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * verbatim and that no modifications are made prior to this
- * point in the file.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#include <sys/types.h>
-#include <ctype.h>
-#include <inttypes.h>
-#include <libdisk.h>
-#include <sys/disklabel.h>
-#include <sys/param.h>
-#include <sys/sysctl.h>
-
-#include "sade.h"
-
-#define AUTO_HOME 0 /* do not create /home automatically */
-
-/*
- * Everything to do with editing the contents of disk labels.
- */
-
-/* A nice message we use a lot in the disklabel editor */
-#define MSG_NOT_APPLICABLE "That option is not applicable here"
-
-/* Where to start printing the freebsd slices */
-#define CHUNK_SLICE_START_ROW 2
-#define CHUNK_PART_START_ROW 11
-
-/* The smallest filesystem we're willing to create */
-#define FS_MIN_SIZE ONE_MEG
-
-/*
- * Minimum partition sizes
- */
-#if defined(__alpha__) || defined(__ia64__) || defined(__sparc64__) || defined(__amd64__)
-#define ROOT_MIN_SIZE 128
-#else
-#define ROOT_MIN_SIZE 118
-#endif
-#define SWAP_MIN_SIZE 32
-#define USR_MIN_SIZE 128
-#define VAR_MIN_SIZE 20
-#define TMP_MIN_SIZE 20
-#define HOME_MIN_SIZE 20
-
-/*
- * Swap size limit for auto-partitioning (4G).
- */
-#define SWAP_AUTO_LIMIT_SIZE 4096
-
-/*
- * Default partition sizes. If we do not have sufficient disk space
- * for this configuration we scale things relative to the NOM vs DEFAULT
- * sizes. If the disk is larger then /home will get any remaining space.
- */
-#define ROOT_DEFAULT_SIZE 512
-#define USR_DEFAULT_SIZE 8192
-#define VAR_DEFAULT_SIZE 1024
-#define TMP_DEFAULT_SIZE 512
-#define HOME_DEFAULT_SIZE USR_DEFAULT_SIZE
-
-/*
- * Nominal partition sizes. These are used to scale the default sizes down
- * when we have insufficient disk space. If this isn't sufficient we scale
- * down using the MIN sizes instead.
- */
-#define ROOT_NOMINAL_SIZE 256
-#define USR_NOMINAL_SIZE 1536
-#define VAR_NOMINAL_SIZE 128
-#define TMP_NOMINAL_SIZE 128
-#define HOME_NOMINAL_SIZE USR_NOMINAL_SIZE
-
-/* The bottom-most row we're allowed to scribble on */
-#define CHUNK_ROW_MAX 16
-
-
-/* All the chunks currently displayed on the screen */
-static struct {
- struct chunk *c;
- PartType type;
-} label_chunk_info[MAX_CHUNKS + 1];
-static int here;
-
-/*** with this value we try to track the most recently added label ***/
-static int label_focus = 0, pslice_focus = 0;
-
-static int diskLabel(Device *dev);
-static int diskLabelNonInteractive(Device *dev);
-static char *try_auto_label(Device *dev, int perc, int *req);
-
-static int
-labelHook(dialogMenuItem *selected)
-{
- Device **devs = NULL;
-
- devs = deviceFind(selected->prompt, DEVICE_TYPE_DISK);
- if (!devs) {
- msgConfirm("Unable to find disk %s!", selected->prompt);
- return DITEM_FAILURE;
- }
- diskLabel(devs[0]);
- return DITEM_SUCCESS;
-}
-
-int
-diskLabelEditor(dialogMenuItem *self)
-{
- DMenu *menu;
- Device **devs;
- int result;
-
- devs = deviceFind(variable_get(VAR_DISK), DEVICE_TYPE_DISK);
- if (devs == NULL) {
- msgConfirm("No disks found! Please verify that your disk controller is being\n"
- "properly probed at boot time. See the Hardware Guide on the\n"
- "Documentation menu for clues on diagnosing this type of problem.");
- return DITEM_FAILURE;
- }
- else {
- /* No disks are selected, fall-back case now */
- int cnt = deviceCount(devs);
- if (cnt == 1) {
- if (variable_get(VAR_NONINTERACTIVE) &&
- !variable_get(VAR_DISKINTERACTIVE))
- result = diskLabelNonInteractive(devs[0]);
- else
- result = diskLabel(devs[0]);
- }
- else {
- menu = deviceCreateMenu(&MenuDiskDevices, DEVICE_TYPE_DISK, labelHook);
- if (!menu) {
- msgConfirm("No devices suitable for installation found!\n\n"
- "Please verify that your disk controller (and attached drives)\n"
- "were detected properly. This can be done by pressing the\n"
- "[Scroll Lock] key and using the Arrow keys to move back to\n"
- "the boot messages. Press [Scroll Lock] again to return.");
- result = DITEM_FAILURE;
- }
- else {
- result = dmenuOpen(menu) ? DITEM_SUCCESS : DITEM_FAILURE;
- free(menu);
- }
- }
- }
- if (DITEM_STATUS(result) != DITEM_FAILURE) {
- if (variable_cmp(DISK_LABELLED, "written"))
- variable_set2(DISK_LABELLED, "yes", 0);
- }
- return result;
-}
-
-int
-diskLabelCommit(Device *dev)
-{
- char *cp;
- int i;
-
- /* Already done? */
- if ((cp = variable_get(DISK_LABELLED)) && strcmp(cp, "yes"))
- i = DITEM_SUCCESS;
- else if (!cp) {
- msgConfirm("You must assign disk labels before this option can be used.");
- i = DITEM_FAILURE;
- }
- /* The routine will guard against redundant writes, just as this one does */
- else if (DITEM_STATUS(diskPartitionWrite(dev)) != DITEM_SUCCESS)
- i = DITEM_FAILURE;
- else if (DITEM_STATUS(installFilesystems(dev)) != DITEM_SUCCESS)
- i = DITEM_FAILURE;
- else {
- msgInfo("All filesystem information written successfully.");
- variable_set2(DISK_LABELLED, "written", 0);
- i = DITEM_SUCCESS;
- }
- return i;
-}
-
-/* See if we're already using a desired partition name */
-static Boolean
-check_conflict(char *name)
-{
- int i;
-
- for (i = 0; label_chunk_info[i].c; i++)
- if ((label_chunk_info[i].type == PART_FILESYSTEM || label_chunk_info[i].type == PART_FAT
- || label_chunk_info[i].type == PART_EFI) && label_chunk_info[i].c->private_data
- && !strcmp(((PartInfo *)label_chunk_info[i].c->private_data)->mountpoint, name))
- return TRUE;
- return FALSE;
-}
-
-/* How much space is in this FreeBSD slice? */
-static daddr_t
-space_free(struct chunk *c)
-{
- struct chunk *c1;
- daddr_t sz = c->size;
-
- for (c1 = c->part; c1; c1 = c1->next) {
- if (c1->type != unused)
- sz -= c1->size;
- }
- if (sz < 0)
- msgFatal("Partitions are larger than actual chunk??");
- return sz;
-}
-
-/* Snapshot the current situation into the displayed chunks structure */
-static void
-record_label_chunks(Device *dev)
-{
- int j, p;
- struct chunk *c1, *c2;
- Disk *d = (Disk *)dev->private;
-
- j = p = 0;
- /* First buzz through and pick up the FreeBSD slices */
- if (!d->chunks)
- msgFatal("No chunk list found for %s!", d->name);
-
-#ifdef __ia64__
- label_chunk_info[j].type = PART_SLICE;
- label_chunk_info[j].c = d->chunks;
- j++;
-#endif
-
- /* Put the slice entries first */
- for (c1 = d->chunks->part; c1; c1 = c1->next) {
- if (c1->type == freebsd) {
- label_chunk_info[j].type = PART_SLICE;
- label_chunk_info[j].c = c1;
- ++j;
- }
-#ifdef __powerpc__
- if (c1->type == apple) {
- label_chunk_info[j].type = PART_SLICE;
- label_chunk_info[j].c = c1;
- ++j;
- }
-#endif
- }
-
- /* Then buzz through and pick up the partitions */
- for (c1 = d->chunks->part; c1; c1 = c1->next) {
- if (c1->type == freebsd) {
- for (c2 = c1->part; c2; c2 = c2->next) {
- if (c2->type == part) {
- if (c2->subtype == FS_SWAP)
- label_chunk_info[j].type = PART_SWAP;
- else
- label_chunk_info[j].type = PART_FILESYSTEM;
- label_chunk_info[j].c = c2;
- ++j;
- }
- }
- }
- else if (c1->type == fat) {
- label_chunk_info[j].type = PART_FAT;
- label_chunk_info[j].c = c1;
- ++j;
- }
-#ifdef __ia64__
- else if (c1->type == efi) {
- label_chunk_info[j].type = PART_EFI;
- label_chunk_info[j].c = c1;
- ++j;
- }
- else if (c1->type == part) {
- if (c1->subtype == FS_SWAP)
- label_chunk_info[j].type = PART_SWAP;
- else
- label_chunk_info[j].type = PART_FILESYSTEM;
- label_chunk_info[j].c = c1;
- ++j;
- }
-#endif
-#ifdef __powerpc__
- else if (c1->type == apple) {
- for (c2 = c1->part; c2; c2 = c2->next) {
- if (c2->type == part) {
- if (c2->subtype == FS_SWAP)
- label_chunk_info[j].type = PART_SWAP;
- else
- label_chunk_info[j].type = PART_FILESYSTEM;
- label_chunk_info[j].c = c2;
- ++j;
- }
- }
- }
-#endif
- }
- label_chunk_info[j].c = NULL;
- if (here >= j) {
- here = j ? j - 1 : 0;
- }
-}
-
-/* A new partition entry */
-static PartInfo *
-new_part(PartType type, char *mpoint, Boolean newfs)
-{
- PartInfo *pi;
-
- if (!mpoint)
- mpoint = (type == PART_EFI) ? "/efi" : "/change_me";
-
- pi = (PartInfo *)safe_malloc(sizeof(PartInfo));
- sstrncpy(pi->mountpoint, mpoint, FILENAME_MAX);
-
- pi->do_newfs = newfs;
-
- if (type == PART_EFI) {
- pi->newfs_type = NEWFS_MSDOS;
- } else {
- pi->newfs_type = NEWFS_UFS;
- strcpy(pi->newfs_data.newfs_ufs.user_options, "");
- pi->newfs_data.newfs_ufs.acls = FALSE;
- pi->newfs_data.newfs_ufs.multilabel = FALSE;
- pi->newfs_data.newfs_ufs.softupdates = strcmp(mpoint, "/");
-#ifdef PC98
- pi->newfs_data.newfs_ufs.ufs1 = TRUE;
-#else
- pi->newfs_data.newfs_ufs.ufs1 = FALSE;
-#endif
- }
-
- return pi;
-}
-
-/* Get the mountpoint for a partition and save it away */
-static PartInfo *
-get_mountpoint(PartType type, struct chunk *old)
-{
- char *val;
- PartInfo *tmp;
- Boolean newfs;
-
- if (old && old->private_data)
- tmp = old->private_data;
- else
- tmp = NULL;
- val = (tmp != NULL) ? tmp->mountpoint : (type == PART_EFI) ? "/efi" : NULL;
- val = msgGetInput(val, "Please specify a mount point for the partition");
- if (!val || !*val) {
- if (!old)
- return NULL;
- else {
- free(old->private_data);
- old->private_data = NULL;
- }
- return NULL;
- }
-
- /* Is it just the same value? */
- if (tmp && !strcmp(tmp->mountpoint, val))
- return NULL;
-
- /* Did we use it already? */
- if (check_conflict(val)) {
- msgConfirm("You already have a mount point for %s assigned!", val);
- return NULL;
- }
-
- /* Is it bogus? */
- if (*val != '/') {
- msgConfirm("Mount point must start with a / character");
- return NULL;
- }
-
- /* Is it going to be mounted on root? */
- if (!strcmp(val, "/")) {
- if (old)
- old->flags |= CHUNK_IS_ROOT;
- }
- else if (old)
- old->flags &= ~CHUNK_IS_ROOT;
-
- newfs = TRUE;
- if (tmp) {
- newfs = tmp->do_newfs;
- safe_free(tmp);
- }
- val = string_skipwhite(string_prune(val));
- tmp = new_part(type, val, newfs);
- if (old) {
- old->private_data = tmp;
- old->private_free = safe_free;
- }
- return tmp;
-}
-
-/* Get the type of the new partiton */
-static PartType
-get_partition_type(void)
-{
- int i;
- static char *fs_types[] = {
-#ifdef __ia64__
- "EFI", "An EFI system partition",
-#endif
- "FS", "A file system",
- "Swap", "A swap partition.",
- };
- WINDOW *w = savescr();
-
- dlg_clr_result();
- i = dialog_menu("Please choose a partition type",
- "If you want to use this partition for swap space, select Swap.\n"
- "If you want to put a filesystem on it, choose FS.",
- -1, -1,
-#ifdef __ia64__
- 3, 3,
-#else
- 2, 2,
-#endif
- fs_types);
- restorescr(w);
- if (!i) {
-#ifdef __ia64__
- if (!strcmp(dialog_vars.input_result, "EFI"))
- return PART_EFI;
-#endif
- if (!strcmp(dialog_vars.input_result, "FS"))
- return PART_FILESYSTEM;
- else if (!strcmp(dialog_vars.input_result, "Swap"))
- return PART_SWAP;
- }
- return PART_NONE;
-}
-
-/* If the user wants a special newfs command for this, set it */
-static void
-getNewfsCmd(PartInfo *p)
-{
- char buffer[NEWFS_CMD_ARGS_MAX];
- char *val;
-
- switch (p->newfs_type) {
- case NEWFS_UFS:
- snprintf(buffer, NEWFS_CMD_ARGS_MAX, "%s %s %s %s",
- NEWFS_UFS_CMD, p->newfs_data.newfs_ufs.softupdates ? "-U" : "",
- p->newfs_data.newfs_ufs.ufs1 ? "-O1" : "-O2",
- p->newfs_data.newfs_ufs.user_options);
- break;
- case NEWFS_MSDOS:
- snprintf(buffer, NEWFS_CMD_ARGS_MAX, "%s", NEWFS_MSDOS_CMD);
- break;
- case NEWFS_CUSTOM:
- strcpy(buffer, p->newfs_data.newfs_custom.command);
- break;
- }
-
- val = msgGetInput(buffer,
- "Please enter the newfs command and options you'd like to use in\n"
- "creating this file system.");
- if (val != NULL) {
- p->newfs_type = NEWFS_CUSTOM;
- strlcpy(p->newfs_data.newfs_custom.command, val, NEWFS_CMD_ARGS_MAX);
- }
-}
-
-static void
-getNewfsOptionalArguments(PartInfo *p)
-{
- char buffer[NEWFS_CMD_ARGS_MAX];
- char *val;
-
- /* Must be UFS, per argument checking in I/O routines. */
-
- strlcpy(buffer, p->newfs_data.newfs_ufs.user_options,
- NEWFS_CMD_ARGS_MAX);
- val = msgGetInput(buffer,
- "Please enter any additional UFS newfs options you'd like to\n"
- "use in creating this file system.");
- if (val != NULL)
- strlcpy(p->newfs_data.newfs_ufs.user_options, val,
- NEWFS_CMD_ARGS_MAX);
-}
-
-#define MAX_MOUNT_NAME 9
-
-#define PART_PART_COL 0
-#define PART_MOUNT_COL 10
-#define PART_SIZE_COL (PART_MOUNT_COL + MAX_MOUNT_NAME + 3)
-#define PART_NEWFS_COL (PART_SIZE_COL + 8)
-#define PART_OFF 38
-
-#define TOTAL_AVAIL_LINES (10)
-#define PSLICE_SHOWABLE (4)
-
-
-/* stick this all up on the screen */
-static void
-print_label_chunks(void)
-{
- int i, j, srow, prow, pcol;
- daddr_t sz;
- char clrmsg[80];
- int ChunkPartStartRow;
- WINDOW *ChunkWin;
-
- /*********************************************************/
- /*** These values are for controlling screen resources ***/
- /*** Each label line holds up to 2 labels, so beware! ***/
- /*** strategy will be to try to always make sure the ***/
- /*** highlighted label is in the active display area. ***/
- /*********************************************************/
- int pslice_max, label_max;
- int pslice_count, label_count, label_focus_found, pslice_focus_found;
-
- attrset(A_REVERSE);
- mvaddstr(0, 25, "FreeBSD Disklabel Editor");
- attrset(A_NORMAL);
-
- /*** Count the number of partition slices ***/
- pslice_count = 0;
- for (i = 0; label_chunk_info[i].c ; i++) {
- if (label_chunk_info[i].type == PART_SLICE)
- ++pslice_count;
- }
- pslice_max = pslice_count;
-
- /*** 4 line max for partition slices ***/
- if (pslice_max > PSLICE_SHOWABLE) {
- pslice_max = PSLICE_SHOWABLE;
- }
- ChunkPartStartRow = CHUNK_SLICE_START_ROW + 3 + pslice_max;
-
- /*** View partition slices modulo pslice_max ***/
- label_max = TOTAL_AVAIL_LINES - pslice_max;
-
- for (i = 0; i < 2; i++) {
- mvaddstr(ChunkPartStartRow - 2, PART_PART_COL + (i * PART_OFF), "Part");
- mvaddstr(ChunkPartStartRow - 1, PART_PART_COL + (i * PART_OFF), "----");
-
- mvaddstr(ChunkPartStartRow - 2, PART_MOUNT_COL + (i * PART_OFF), "Mount");
- mvaddstr(ChunkPartStartRow - 1, PART_MOUNT_COL + (i * PART_OFF), "-----");
-
- mvaddstr(ChunkPartStartRow - 2, PART_SIZE_COL + (i * PART_OFF) + 3, "Size");
- mvaddstr(ChunkPartStartRow - 1, PART_SIZE_COL + (i * PART_OFF) + 3, "----");
-
- mvaddstr(ChunkPartStartRow - 2, PART_NEWFS_COL + (i * PART_OFF), "Newfs");
- mvaddstr(ChunkPartStartRow - 1, PART_NEWFS_COL + (i * PART_OFF), "-----");
- }
- srow = CHUNK_SLICE_START_ROW;
- prow = 0;
- pcol = 0;
-
- /*** these variables indicate that the focused item is shown currently ***/
- label_focus_found = 0;
- pslice_focus_found = 0;
-
- label_count = 0;
- pslice_count = 0;
- mvprintw(CHUNK_SLICE_START_ROW - 1, 0, " ");
- mvprintw(CHUNK_SLICE_START_ROW + pslice_max, 0, " ");
-
- ChunkWin = newwin(CHUNK_ROW_MAX - ChunkPartStartRow, 76, ChunkPartStartRow, 0);
-
- wclear(ChunkWin);
- /*** wrefresh(ChunkWin); ***/
-
- for (i = 0; label_chunk_info[i].c; i++) {
- /* Is it a slice entry displayed at the top? */
- if (label_chunk_info[i].type == PART_SLICE) {
- /*** This causes the new pslice to replace the previous display ***/
- /*** focus must remain on the most recently active pslice ***/
- if (pslice_count == pslice_max) {
- if (pslice_focus_found) {
- /*** This is where we can mark the more following ***/
- attrset(A_BOLD);
- mvprintw(CHUNK_SLICE_START_ROW + pslice_max, 0, "***MORE***");
- attrset(A_NORMAL);
- continue;
- }
- else {
- /*** this is where we set the more previous ***/
- attrset(A_BOLD);
- mvprintw(CHUNK_SLICE_START_ROW - 1, 0, "***MORE***");
- attrset(A_NORMAL);
- pslice_count = 0;
- srow = CHUNK_SLICE_START_ROW;
- }
- }
-
- sz = space_free(label_chunk_info[i].c);
- if (i == here)
- attrset(ATTR_SELECTED);
- if (i == pslice_focus)
- pslice_focus_found = -1;
-
- if (label_chunk_info[i].c->type == whole) {
- if (sz >= 100 * ONE_GIG)
- mvprintw(srow++, 0,
- "Disk: %s\t\tFree: %jd blocks (%jdGB)",
- label_chunk_info[i].c->disk->name, (intmax_t)sz,
- (intmax_t)(sz / ONE_GIG));
- else
- mvprintw(srow++, 0,
- "Disk: %s\t\tFree: %jd blocks (%jdMB)",
- label_chunk_info[i].c->disk->name, (intmax_t)sz,
- (intmax_t)(sz / ONE_MEG));
- } else {
- if (sz >= 100 * ONE_GIG)
- mvprintw(srow++, 0,
- "Disk: %s\tPartition name: %s\tFree: %jd blocks (%jdGB)",
- label_chunk_info[i].c->disk->name,
- label_chunk_info[i].c->name,
- (intmax_t)sz, (intmax_t)(sz / ONE_GIG));
- else
- mvprintw(srow++, 0,
- "Disk: %s\tPartition name: %s\tFree: %jd blocks (%jdMB)",
- label_chunk_info[i].c->disk->name,
- label_chunk_info[i].c->name,
- (intmax_t)sz, (intmax_t)(sz / ONE_MEG));
- }
- attrset(A_NORMAL);
- clrtoeol();
- move(0, 0);
- /*** refresh(); ***/
- ++pslice_count;
- }
- /* Otherwise it's a DOS, swap or filesystem entry in the Chunk window */
- else {
- char onestr[PART_OFF], num[10], *mountpoint, newfs[12];
-
- /*
- * We copy this into a blank-padded string so that it looks like
- * a solid bar in reverse-video
- */
- memset(onestr, ' ', PART_OFF - 1);
- onestr[PART_OFF - 1] = '\0';
-
- /*** Track how many labels have been displayed ***/
- if (label_count == ((label_max - 1 ) * 2)) {
- if (label_focus_found) {
- continue;
- }
- else {
- label_count = 0;
- prow = 0;
- pcol = 0;
- }
- }
-
- /* Go for two columns if we've written one full columns worth */
- /*** if (prow == (CHUNK_ROW_MAX - ChunkPartStartRow)) ***/
- if (label_count == label_max - 1) {
- pcol = PART_OFF;
- prow = 0;
- }
- memcpy(onestr + PART_PART_COL, label_chunk_info[i].c->name, strlen(label_chunk_info[i].c->name));
- /* If it's a filesystem, display the mountpoint */
- if (label_chunk_info[i].c->private_data && (label_chunk_info[i].type == PART_FILESYSTEM
- || label_chunk_info[i].type == PART_FAT || label_chunk_info[i].type == PART_EFI))
- mountpoint = ((PartInfo *)label_chunk_info[i].c->private_data)->mountpoint;
- else if (label_chunk_info[i].type == PART_SWAP)
- mountpoint = "swap";
- else
- mountpoint = "<none>";
-
- /* Now display the newfs field */
- if (label_chunk_info[i].type == PART_FAT)
- strcpy(newfs, "DOS");
-#if defined(__ia64__)
- else if (label_chunk_info[i].type == PART_EFI) {
- strcpy(newfs, "EFI");
- if (label_chunk_info[i].c->private_data) {
- strcat(newfs, " ");
- PartInfo *pi = (PartInfo *)label_chunk_info[i].c->private_data;
- strcat(newfs, pi->do_newfs ? " Y" : " N");
- }
- }
-#endif
- else if (label_chunk_info[i].c->private_data && label_chunk_info[i].type == PART_FILESYSTEM) {
- PartInfo *pi = (PartInfo *)label_chunk_info[i].c->private_data;
-
- switch (pi->newfs_type) {
- case NEWFS_UFS:
- strcpy(newfs, NEWFS_UFS_STRING);
- if (pi->newfs_data.newfs_ufs.ufs1)
- strcat(newfs, "1");
- else
- strcat(newfs, "2");
- if (pi->newfs_data.newfs_ufs.softupdates)
- strcat(newfs, "+S");
- else
- strcat(newfs, " ");
-
- break;
- case NEWFS_MSDOS:
- strcpy(newfs, "FAT");
- break;
- case NEWFS_CUSTOM:
- strcpy(newfs, "CUST");
- break;
- }
- strcat(newfs, pi->do_newfs ? " Y" : " N ");
- }
- else if (label_chunk_info[i].type == PART_SWAP)
- strcpy(newfs, "SWAP");
- else
- strcpy(newfs, "*");
- for (j = 0; j < MAX_MOUNT_NAME && mountpoint[j]; j++)
- onestr[PART_MOUNT_COL + j] = mountpoint[j];
- if (label_chunk_info[i].c->size == 0)
- snprintf(num, 10, "%5dMB", 0);
- else if (label_chunk_info[i].c->size < (100 * ONE_GIG))
- snprintf(num, 10, "%5jdMB",
- (intmax_t)label_chunk_info[i].c->size / ONE_MEG);
- else
- snprintf(num, 10, "%5jdGB",
- (intmax_t)label_chunk_info[i].c->size / ONE_GIG);
- memcpy(onestr + PART_SIZE_COL, num, strlen(num));
- memcpy(onestr + PART_NEWFS_COL, newfs, strlen(newfs));
- onestr[PART_NEWFS_COL + strlen(newfs)] = '\0';
- if (i == label_focus) {
- label_focus_found = -1;
- wattrset(ChunkWin, A_BOLD);
- }
- if (i == here)
- wattrset(ChunkWin, ATTR_SELECTED);
-
- /*** lazy man's way of expensively padding this string ***/
- while (strlen(onestr) < 37)
- strcat(onestr, " ");
-
- mvwaddstr(ChunkWin, prow, pcol, onestr);
- wattrset(ChunkWin, A_NORMAL);
- move(0, 0);
- ++prow;
- ++label_count;
- }
- }
-
- /*** this will erase all the extra stuff ***/
- memset(clrmsg, ' ', 37);
- clrmsg[37] = '\0';
-
- while (pslice_count < pslice_max) {
- mvprintw(srow++, 0, clrmsg);
- clrtoeol();
- ++pslice_count;
- }
- while (label_count < (2 * (label_max - 1))) {
- mvwaddstr(ChunkWin, prow++, pcol, clrmsg);
- ++label_count;
- if (prow == (label_max - 1)) {
- prow = 0;
- pcol = PART_OFF;
- }
- }
- refresh();
- wrefresh(ChunkWin);
-}
-
-static void
-print_command_summary(void)
-{
- mvprintw(17, 0, "The following commands are valid here (upper or lower case):");
- mvprintw(18, 0, "C = Create D = Delete M = Mount pt.");
- mvprintw(18, 56, "W = Write");
- mvprintw(19, 0, "N = Newfs Opts Q = Finish S = Toggle SoftUpdates Z = Custom Newfs");
- mvprintw(20, 0, "T = Toggle Newfs U = Undo A = Auto Defaults R = Delete+Merge");
- mvprintw(22, 0, "Use F1 or ? to get more help, arrow keys to select.");
- move(0, 0);
-}
-
-static void
-clear_wins(void)
-{
-
- clear();
- print_label_chunks();
-}
-
-static int
-diskLabel(Device *dev)
-{
- daddr_t sz;
- int key = 0;
- Boolean labeling;
- char *msg = NULL;
- PartInfo *p, *oldp;
- PartType type;
- WINDOW *w = savescr();
-
- label_focus = 0;
- pslice_focus = 0;
- here = 0;
-
- labeling = TRUE;
- keypad(stdscr, TRUE);
- record_label_chunks(dev);
-
- clear();
- while (labeling) {
- char *cp;
- int rflags = DELCHUNK_NORMAL;
-
- print_label_chunks();
- print_command_summary();
- if (msg) {
- attrset(title_attr); mvprintw(23, 0, msg); attrset(A_NORMAL);
- clrtoeol();
- beep();
- msg = NULL;
- }
- else {
- move(23, 0);
- clrtoeol();
- }
-
- refresh();
- key = getch();
- switch (toupper(key)) {
- static char _msg[40];
-
- case '\014': /* ^L */
- clear_wins();
- break;
-
- case '\020': /* ^P */
- case KEY_UP:
- case '-':
- if (here != 0)
- --here;
- else
- while (label_chunk_info[here + 1].c)
- ++here;
- break;
-
- case '\016': /* ^N */
- case KEY_DOWN:
- case '+':
- case '\r':
- case '\n':
- if (label_chunk_info[here + 1].c)
- ++here;
- else
- here = 0;
- break;
-
- case KEY_HOME:
- here = 0;
- break;
-
- case KEY_END:
- while (label_chunk_info[here + 1].c)
- ++here;
- break;
-
- case KEY_F(1):
- case '?':
- systemDisplayHelp("partition");
- clear_wins();
- break;
-
- case '1':
- if (label_chunk_info[here].type == PART_FILESYSTEM) {
- PartInfo *pi =
- ((PartInfo *)label_chunk_info[here].c->private_data);
-
- if ((pi != NULL) &&
- (pi->newfs_type == NEWFS_UFS)) {
- pi->newfs_data.newfs_ufs.ufs1 = true;
- } else
- msg = MSG_NOT_APPLICABLE;
- } else
- msg = MSG_NOT_APPLICABLE;
- break;
- break;
-
- case '2':
- if (label_chunk_info[here].type == PART_FILESYSTEM) {
- PartInfo *pi =
- ((PartInfo *)label_chunk_info[here].c->private_data);
-
- if ((pi != NULL) &&
- (pi->newfs_type == NEWFS_UFS)) {
- pi->newfs_data.newfs_ufs.ufs1 = false;
- } else
- msg = MSG_NOT_APPLICABLE;
- } else
- msg = MSG_NOT_APPLICABLE;
- break;
- break;
-
- case 'A':
- if (label_chunk_info[here].type != PART_SLICE) {
- msg = "You can only do this in a disk slice (at top of screen)";
- break;
- }
- /*
- * Generate standard partitions automatically. If we do not
- * have sufficient space we attempt to scale-down the size
- * of the partitions within certain bounds.
- */
- {
- int perc;
- int req = 0;
-
- for (perc = 100; perc > 0; perc -= 5) {
- req = 0; /* reset for each loop */
- if ((msg = try_auto_label(dev, perc, &req)) == NULL)
- break;
- }
- if (msg) {
- if (req) {
- msgConfirm("%s", msg);
- clear_wins();
- msg = NULL;
- }
- }
- }
- break;
-
- case 'C':
- if (label_chunk_info[here].type != PART_SLICE) {
- msg = "You can only do this in a master partition (see top of screen)";
- break;
- }
- sz = space_free(label_chunk_info[here].c);
- if (sz <= FS_MIN_SIZE) {
- msg = "Not enough space to create an additional FreeBSD partition";
- break;
- }
- else {
- char *val;
- daddr_t size;
- struct chunk *tmp;
- char osize[80];
- u_long flags = 0;
-
-#ifdef __powerpc__
- /* Always use the maximum size for apple partitions */
- if (label_chunk_info[here].c->type == apple)
- size = sz;
- else {
-#endif
- sprintf(osize, "%jd", (intmax_t)sz);
- val = msgGetInput(osize,
- "Please specify the partition size in blocks or append a trailing G for\n"
-#ifdef __ia64__
- "gigabytes, M for megabytes.\n"
-#else
- "gigabytes, M for megabytes, or C for cylinders.\n"
-#endif
- "%jd blocks (%jdMB) are free.",
- (intmax_t)sz, (intmax_t)sz / ONE_MEG);
- if (!val || (size = strtoimax(val, &cp, 0)) <= 0) {
- clear_wins();
- break;
- }
-
- if (*cp) {
- if (toupper(*cp) == 'M')
- size *= ONE_MEG;
- else if (toupper(*cp) == 'G')
- size *= ONE_GIG;
-#ifndef __ia64__
- else if (toupper(*cp) == 'C')
- size *= (label_chunk_info[here].c->disk->bios_hd * label_chunk_info[here].c->disk->bios_sect);
-#endif
- }
- if (size <= FS_MIN_SIZE) {
- msgConfirm("The minimum filesystem size is %dMB", FS_MIN_SIZE / ONE_MEG);
- clear_wins();
- break;
- }
-#ifdef __powerpc__
- }
-#endif
- type = get_partition_type();
- if (type == PART_NONE) {
- clear_wins();
- beep();
- break;
- }
-
- if (type == PART_FILESYSTEM || type == PART_EFI) {
- if ((p = get_mountpoint(type, NULL)) == NULL) {
- clear_wins();
- beep();
- break;
- }
- else if (!strcmp(p->mountpoint, "/")) {
- if (type != PART_FILESYSTEM) {
- clear_wins();
- beep();
- break;
- }
- else
- flags |= CHUNK_IS_ROOT;
- }
- else
- flags &= ~CHUNK_IS_ROOT;
- }
- else
- p = NULL;
-
- if ((flags & CHUNK_IS_ROOT) && (size < (ROOT_MIN_SIZE * ONE_MEG))) {
- msgConfirm("Warning: This is smaller than the recommended size for a\n"
- "root partition. For a variety of reasons, root\n"
- "partitions should usually be at least %dMB in size", ROOT_MIN_SIZE);
- }
- tmp = Create_Chunk_DWIM(label_chunk_info[here].c->disk,
- label_chunk_info[here].c, size,
-#ifdef __ia64__
- (type == PART_EFI) ? efi : part,
- (type == PART_EFI) ? 0 : (type == PART_SWAP) ? FS_SWAP : FS_BSDFFS,
-#else
- part, (type == PART_SWAP) ? FS_SWAP : FS_BSDFFS,
-#endif
- flags);
- if (!tmp) {
- msgConfirm("Unable to create the partition. Too big?");
- clear_wins();
- break;
- }
-
-#ifdef __alpha__
- /*
- * SRM requires that the root partition is at the
- * beginning of the disk and cannot boot otherwise.
- * Warn Alpha users if they are about to shoot themselves in
- * the foot in this way.
- *
- * Since partitions may not start precisely at offset 0 we
- * check for a "close to 0" instead. :-(
- */
- if ((flags & CHUNK_IS_ROOT) && (tmp->offset > 1024)) {
- msgConfirm("Your root partition `a' does not seem to be the first\n"
- "partition. The Alpha's firmware can only boot from the\n"
- "first partition. So it is unlikely that your current\n"
- "disk layout will be bootable boot after installation.\n"
- "\n"
- "Please allocate the root partition before allocating\n"
- "any others.\n");
- }
-#endif /* alpha */
-
- tmp->private_data = p;
- tmp->private_free = safe_free;
- if (variable_cmp(DISK_LABELLED, "written"))
- variable_set2(DISK_LABELLED, "yes", 0);
- record_label_chunks(dev);
- clear_wins();
- /* This is where we assign focus to new label so it shows. */
- {
- int i;
- label_focus = -1;
- for (i = 0; label_chunk_info[i].c; ++i) {
- if (label_chunk_info[i].c == tmp) {
- label_focus = i;
- break;
- }
- }
- if (label_focus == -1)
- label_focus = i - 1;
- }
- }
- break;
-
- case KEY_DC:
- case 'R': /* recover space (delete w/ recover) */
- /*
- * Delete the partition w/ space recovery.
- */
- rflags = DELCHUNK_RECOVER;
- /* fall through */
- case 'D': /* delete */
- if (label_chunk_info[here].type == PART_SLICE) {
- msg = MSG_NOT_APPLICABLE;
- break;
- }
- else if (label_chunk_info[here].type == PART_FAT) {
- msg = "Use the Disk Partition Editor to delete DOS partitions";
- break;
- }
- Delete_Chunk2(label_chunk_info[here].c->disk, label_chunk_info[here].c, rflags);
- if (variable_cmp(DISK_LABELLED, "written"))
- variable_set2(DISK_LABELLED, "yes", 0);
- record_label_chunks(dev);
- break;
-
- case 'M': /* mount */
- switch(label_chunk_info[here].type) {
- case PART_SLICE:
- msg = MSG_NOT_APPLICABLE;
- break;
-
- case PART_SWAP:
- msg = "You don't need to specify a mountpoint for a swap partition.";
- break;
-
- case PART_FAT:
- case PART_EFI:
- case PART_FILESYSTEM:
- oldp = label_chunk_info[here].c->private_data;
- p = get_mountpoint(label_chunk_info[here].type, label_chunk_info[here].c);
- if (p) {
- if (!oldp)
- p->do_newfs = FALSE;
- if ((label_chunk_info[here].type == PART_FAT ||
- label_chunk_info[here].type == PART_EFI) &&
- (!strcmp(p->mountpoint, "/") ||
- !strcmp(p->mountpoint, "/usr") ||
- !strcmp(p->mountpoint, "/var"))) {
- msgConfirm("%s is an invalid mount point for a DOS partition!", p->mountpoint);
- strcpy(p->mountpoint, "/bogus");
- }
- }
- if (variable_cmp(DISK_LABELLED, "written"))
- variable_set2(DISK_LABELLED, "yes", 0);
- record_label_chunks(dev);
- clear_wins();
- break;
-
- default:
- msgFatal("Bogus partition under cursor???");
- break;
- }
- break;
-
- case 'N': /* Set newfs options */
- if (label_chunk_info[here].c->private_data &&
- ((PartInfo *)label_chunk_info[here].c->private_data)->do_newfs)
- getNewfsOptionalArguments(
- label_chunk_info[here].c->private_data);
- else
- msg = MSG_NOT_APPLICABLE;
- clear_wins();
- break;
-
- case 'S': /* Toggle soft updates flag */
- if (label_chunk_info[here].type == PART_FILESYSTEM) {
- PartInfo *pi = ((PartInfo *)label_chunk_info[here].c->private_data);
- if (pi != NULL &&
- pi->newfs_type == NEWFS_UFS)
- pi->newfs_data.newfs_ufs.softupdates =
- !pi->newfs_data.newfs_ufs.softupdates;
- else
- msg = MSG_NOT_APPLICABLE;
- }
- else
- msg = MSG_NOT_APPLICABLE;
- break;
-
- case 'T': /* Toggle newfs state */
- if ((label_chunk_info[here].type == PART_FILESYSTEM ||
- label_chunk_info[here].type == PART_EFI) &&
- (label_chunk_info[here].c->private_data)) {
- PartInfo *pi = ((PartInfo *)label_chunk_info[here].c->private_data);
- if (!pi->do_newfs)
- label_chunk_info[here].c->flags |= CHUNK_NEWFS;
- else
- label_chunk_info[here].c->flags &= ~CHUNK_NEWFS;
-
- label_chunk_info[here].c->private_data =
- new_part(label_chunk_info[here].type, pi ? pi->mountpoint : NULL, pi ? !pi->do_newfs
- : TRUE);
- if (pi != NULL &&
- pi->newfs_type == NEWFS_UFS) {
- PartInfo *pi_new = label_chunk_info[here].c->private_data;
-
- pi_new->newfs_data.newfs_ufs = pi->newfs_data.newfs_ufs;
- }
- safe_free(pi);
- label_chunk_info[here].c->private_free = safe_free;
- if (variable_cmp(DISK_LABELLED, "written"))
- variable_set2(DISK_LABELLED, "yes", 0);
- }
- else
- msg = MSG_NOT_APPLICABLE;
- break;
-
- case 'U':
- clear();
- if (!variable_cmp(DISK_LABELLED, "written")) {
- msgConfirm("You've already written out your changes -\n"
- "it's too late to undo!");
- }
- else if (!msgNoYes("Are you SURE you want to Undo everything?")) {
- Disk *d;
-
- variable_unset(DISK_PARTITIONED);
- variable_unset(DISK_LABELLED);
- if ((d = Open_Disk(dev->name)) != NULL) {
- Free_Disk(dev->private);
- dev->private = d;
-#ifdef WITH_SLICES
- diskPartition(dev);
-#endif
- }
- record_label_chunks(dev);
- }
- clear_wins();
- break;
-
- case 'W':
- if (!variable_cmp(DISK_LABELLED, "written")) {
- msgConfirm("You've already written out your changes - if you\n"
- "wish to overwrite them, you'll have to restart\n"
- "%s first.", ProgName);
- }
- else if (!msgNoYes("WARNING: You are about to modify an EXISTING\n"
- "installation.\n\n"
- "Are you absolutely sure you want to continue?")) {
- variable_set2(DISK_LABELLED, "yes", 0);
- diskLabelCommit(dev);
- }
- clear_wins();
- break;
-
- case 'Z': /* Set newfs command line */
- if (label_chunk_info[here].c->private_data &&
- ((PartInfo *)label_chunk_info[here].c->private_data)->do_newfs)
- getNewfsCmd(label_chunk_info[here].c->private_data);
- else
- msg = MSG_NOT_APPLICABLE;
- clear_wins();
- break;
-
-#ifndef __ia64__
- case '|':
- if (!msgNoYes("Are you sure you want to go into Wizard mode?\n\n"
- "This is an entirely undocumented feature which you are not\n"
- "expected to understand!")) {
- dlg_clear();
- end_dialog();
- DialogActive = FALSE;
- if (dev->private) {
- slice_wizard(((Disk *)dev->private));
- }
- if (variable_cmp(DISK_LABELLED, "written"))
- variable_set2(DISK_LABELLED, "yes", 0);
- DialogActive = TRUE;
- record_label_chunks(dev);
- clear_wins();
- }
- else
- msg = "A most prudent choice!";
- break;
-#endif
-
- case '\033': /* ESC */
- case 'Q':
- labeling = FALSE;
- break;
-
- default:
- beep();
- sprintf(_msg, "Invalid key %d - Type F1 or ? for help", key);
- msg = _msg;
- break;
- }
- if (label_chunk_info[here].type == PART_SLICE)
- pslice_focus = here;
- else
- label_focus = here;
- }
- restorescr(w);
- return DITEM_SUCCESS;
-}
-
-static __inline daddr_t
-requested_part_size(char *varName, daddr_t nom, int def, int perc)
-{
- char *cp;
- daddr_t sz;
-
- if ((cp = variable_get(varName)) != NULL)
- sz = strtoimax(cp, NULL, 0);
- else
- sz = nom + (def - nom) * perc / 100;
- return(sz * ONE_MEG);
-}
-
-/*
- * Attempt to auto-label the disk. 'perc' (0-100) scales
- * the size of the various partitions within appropriate
- * bounds (NOMINAL through DEFAULT sizes). The procedure
- * succeeds of NULL is returned. A non-null return message
- * is either a failure-status message (*req == 0), or
- * a confirmation requestor (*req == 1). *req is 0 on
- * entry to this call.
- *
- * As a special exception to the usual sizing rules, /var is given
- * additional space equal to the amount of physical memory present
- * if perc == 100 in order to ensure that users with large hard drives
- * will have enough space to store a crashdump in /var/crash.
- *
- * We autolabel the following partitions: /, swap, /var, /tmp, /usr,
- * and /home. /home receives any extra left over disk space.
- */
-static char *
-try_auto_label(Device *dev, int perc, int *req)
-{
- daddr_t sz;
- Chunk *AutoHome, *AutoRoot, *AutoSwap;
- Chunk *AutoTmp, *AutoUsr, *AutoVar;
-#ifdef __ia64__
- Chunk *AutoEfi;
-#endif
- int mib[2];
- unsigned long physmem;
- size_t size;
- char *msg = NULL;
-
- sz = space_free(label_chunk_info[here].c);
- if (sz <= FS_MIN_SIZE)
- return("Not enough free space to create a new partition in the slice");
-
- (void)checkLabels(FALSE);
- AutoHome = AutoRoot = AutoSwap = NULL;
- AutoTmp = AutoUsr = AutoVar = NULL;
-
-#ifdef __ia64__
- AutoEfi = NULL;
- if (EfiChunk == NULL) {
- sz = 100 * ONE_MEG;
- AutoEfi = Create_Chunk_DWIM(label_chunk_info[here].c->disk,
- label_chunk_info[here].c, sz, efi, 0, 0);
- if (AutoEfi == NULL) {
- *req = 1;
- msg = "Unable to create the EFI system partition. Too big?";
- goto done;
- }
- AutoEfi->private_data = new_part(PART_EFI, "/efi", TRUE);
- AutoEfi->private_free = safe_free;
- AutoEfi->flags |= CHUNK_NEWFS;
- record_label_chunks(dev);
- }
-#endif
-
- if (RootChunk == NULL) {
- sz = requested_part_size(VAR_ROOT_SIZE, ROOT_NOMINAL_SIZE, ROOT_DEFAULT_SIZE, perc);
-
- AutoRoot = Create_Chunk_DWIM(label_chunk_info[here].c->disk,
- label_chunk_info[here].c, sz, part,
- FS_BSDFFS, CHUNK_IS_ROOT | CHUNK_AUTO_SIZE);
- if (!AutoRoot) {
- *req = 1;
- msg = "Unable to create the root partition. Too big?";
- goto done;
- }
- AutoRoot->private_data = new_part(PART_FILESYSTEM, "/", TRUE);
- AutoRoot->private_free = safe_free;
- AutoRoot->flags |= CHUNK_NEWFS;
- record_label_chunks(dev);
- }
- if (SwapChunk == NULL) {
- sz = requested_part_size(VAR_SWAP_SIZE, 0, 0, perc);
- if (sz == 0) {
- daddr_t nom;
- daddr_t def;
-
- mib[0] = CTL_HW;
- mib[1] = HW_PHYSMEM;
- size = sizeof physmem;
- sysctl(mib, 2, &physmem, &size, (void *)0, (size_t)0);
- def = 2 * (int)(physmem / 512);
- if (def < SWAP_MIN_SIZE * ONE_MEG)
- def = SWAP_MIN_SIZE * ONE_MEG;
- if (def > SWAP_AUTO_LIMIT_SIZE * ONE_MEG)
- def = SWAP_AUTO_LIMIT_SIZE * ONE_MEG;
- nom = (int)(physmem / 512) / 8;
- sz = nom + (def - nom) * perc / 100;
- }
- AutoSwap = Create_Chunk_DWIM(label_chunk_info[here].c->disk,
- label_chunk_info[here].c, sz, part,
- FS_SWAP, CHUNK_AUTO_SIZE);
- if (!AutoSwap) {
- *req = 1;
- msg = "Unable to create the swap partition. Too big?";
- goto done;
- }
- AutoSwap->private_data = 0;
- AutoSwap->private_free = safe_free;
- record_label_chunks(dev);
- }
- if (VarChunk == NULL) {
- /* Work out how much extra space we want for a crash dump */
- unsigned long crashdumpsz;
-
- mib[0] = CTL_HW;
- mib[1] = HW_PHYSMEM;
- size = sizeof(physmem);
- sysctl(mib, 2, &physmem, &size, (void *)0, (size_t)0);
-
- if (perc == 100)
- crashdumpsz = physmem / 1048576;
- else
- crashdumpsz = 0;
-
- sz = requested_part_size(VAR_VAR_SIZE, VAR_NOMINAL_SIZE, \
- VAR_DEFAULT_SIZE + crashdumpsz, perc);
-
- AutoVar = Create_Chunk_DWIM(label_chunk_info[here].c->disk,
- label_chunk_info[here].c, sz, part,
- FS_BSDFFS, CHUNK_AUTO_SIZE);
- if (!AutoVar) {
- *req = 1;
- msg = "Not enough free space for /var - you will need to\n"
- "partition your disk manually with a custom install!";
- goto done;
- }
- AutoVar->private_data = new_part(PART_FILESYSTEM, "/var", TRUE);
- AutoVar->private_free = safe_free;
- AutoVar->flags |= CHUNK_NEWFS;
- record_label_chunks(dev);
- }
- if (TmpChunk == NULL && !variable_get(VAR_NO_TMP)) {
- sz = requested_part_size(VAR_TMP_SIZE, TMP_NOMINAL_SIZE, TMP_DEFAULT_SIZE, perc);
-
- AutoTmp = Create_Chunk_DWIM(label_chunk_info[here].c->disk,
- label_chunk_info[here].c, sz, part,
- FS_BSDFFS, CHUNK_AUTO_SIZE);
- if (!AutoTmp) {
- *req = 1;
- msg = "Not enough free space for /tmp - you will need to\n"
- "partition your disk manually with a custom install!";
- goto done;
- }
- AutoTmp->private_data = new_part(PART_FILESYSTEM, "/tmp", TRUE);
- AutoTmp->private_free = safe_free;
- AutoTmp->flags |= CHUNK_NEWFS;
- record_label_chunks(dev);
- }
- if (UsrChunk == NULL && !variable_get(VAR_NO_USR)) {
- sz = requested_part_size(VAR_USR_SIZE, USR_NOMINAL_SIZE, USR_DEFAULT_SIZE, perc);
-#if AUTO_HOME == 0
- if (sz < space_free(label_chunk_info[here].c))
- sz = space_free(label_chunk_info[here].c);
-#endif
- if (sz) {
- if (sz < (USR_MIN_SIZE * ONE_MEG)) {
- *req = 1;
- msg = "Not enough free space for /usr - you will need to\n"
- "partition your disk manually with a custom install!";
- }
-
- AutoUsr = Create_Chunk_DWIM(label_chunk_info[here].c->disk,
- label_chunk_info[here].c, sz, part,
- FS_BSDFFS, CHUNK_AUTO_SIZE);
- if (!AutoUsr) {
- msg = "Unable to create the /usr partition. Not enough space?\n"
- "You will need to partition your disk manually with a custom install!";
- goto done;
- }
- AutoUsr->private_data = new_part(PART_FILESYSTEM, "/usr", TRUE);
- AutoUsr->private_free = safe_free;
- AutoUsr->flags |= CHUNK_NEWFS;
- record_label_chunks(dev);
- }
- }
-#if AUTO_HOME == 1
- if (HomeChunk == NULL && !variable_get(VAR_NO_HOME)) {
- sz = requested_part_size(VAR_HOME_SIZE, HOME_NOMINAL_SIZE, HOME_DEFAULT_SIZE, perc);
- if (sz < space_free(label_chunk_info[here].c))
- sz = space_free(label_chunk_info[here].c);
- if (sz) {
- if (sz < (HOME_MIN_SIZE * ONE_MEG)) {
- *req = 1;
- msg = "Not enough free space for /home - you will need to\n"
- "partition your disk manually with a custom install!";
- goto done;
- }
-
- AutoHome = Create_Chunk_DWIM(label_chunk_info[here].c->disk,
- label_chunk_info[here].c, sz, part,
- FS_BSDFFS, CHUNK_AUTO_SIZE);
- if (!AutoHome) {
- msg = "Unable to create the /home partition. Not enough space?\n"
- "You will need to partition your disk manually with a custom install!";
- goto done;
- }
- AutoHome->private_data = new_part(PART_FILESYSTEM, "/home", TRUE);
- AutoHome->private_free = safe_free;
- AutoHome->flags |= CHUNK_NEWFS;
- record_label_chunks(dev);
- }
- }
-#endif
-
- /* At this point, we're reasonably "labelled" */
- if (variable_cmp(DISK_LABELLED, "written"))
- variable_set2(DISK_LABELLED, "yes", 0);
-
-done:
- if (msg) {
- if (AutoRoot != NULL)
- Delete_Chunk(AutoRoot->disk, AutoRoot);
- if (AutoSwap != NULL)
- Delete_Chunk(AutoSwap->disk, AutoSwap);
- if (AutoVar != NULL)
- Delete_Chunk(AutoVar->disk, AutoVar);
- if (AutoTmp != NULL)
- Delete_Chunk(AutoTmp->disk, AutoTmp);
- if (AutoUsr != NULL)
- Delete_Chunk(AutoUsr->disk, AutoUsr);
- if (AutoHome != NULL)
- Delete_Chunk(AutoHome->disk, AutoHome);
- record_label_chunks(dev);
- }
- return(msg);
-}
-
-static int
-diskLabelNonInteractive(Device *dev)
-{
- char *cp;
- PartType type;
- PartInfo *p;
- u_long flags;
- int i, status;
- Device **devs;
- Disk *d;
-
- status = DITEM_SUCCESS;
- cp = variable_get(VAR_DISK);
- if (!cp) {
- msgConfirm("diskLabel: No disk selected - can't label automatically.");
- return DITEM_FAILURE;
- }
- devs = deviceFind(cp, DEVICE_TYPE_DISK);
- if (!devs) {
- msgConfirm("diskLabel: No disk device %s found!", cp);
- return DITEM_FAILURE;
- }
- if (dev)
- d = dev->private;
- else
- d = devs[0]->private;
- record_label_chunks(dev);
- for (i = 0; label_chunk_info[i].c; i++) {
- Chunk *c1 = label_chunk_info[i].c;
-
- if (label_chunk_info[i].type == PART_SLICE) {
- char name[512];
- char typ[10], mpoint[50];
- int entries;
-
- for (entries = 1;; entries++) {
- intmax_t sz;
- int soft = 0;
- snprintf(name, sizeof name, "%s-%d", c1->name, entries);
- if ((cp = variable_get(name)) == NULL)
- break;
- if (sscanf(cp, "%s %jd %s %d", typ, &sz, mpoint, &soft) < 3) {
- msgConfirm("For slice entry %s, got an invalid detail entry of: %s", c1->name, cp);
- status = DITEM_FAILURE;
- break;
- } else {
- Chunk *tmp;
-
- flags = 0;
- if (!strcmp(typ, "swap")) {
- type = PART_SWAP;
- strcpy(mpoint, "SWAP");
- } else {
- type = PART_FILESYSTEM;
- if (!strcmp(mpoint, "/"))
- flags |= CHUNK_IS_ROOT;
- }
- if (!sz)
- sz = space_free(c1);
- if (sz > space_free(c1)) {
- msgConfirm("Not enough free space to create partition: %s", mpoint);
- status = DITEM_FAILURE;
- break;
- }
- if (!(tmp = Create_Chunk_DWIM(d, c1, sz, part,
- (type == PART_SWAP) ? FS_SWAP : FS_BSDFFS, flags))) {
- msgConfirm("Unable to create from partition spec: %s. Too big?", cp);
- status = DITEM_FAILURE;
- break;
- } else {
- PartInfo *pi;
- pi = tmp->private_data = new_part(PART_FILESYSTEM, mpoint, TRUE);
- tmp->private_free = safe_free;
- pi->newfs_data.newfs_ufs.softupdates = soft;
- }
- }
- }
- } else {
- /* Must be something we can set a mountpoint for */
- cp = variable_get(c1->name);
- if (cp) {
- char mpoint[50], do_newfs[8];
- Boolean newfs = FALSE;
-
- do_newfs[0] = '\0';
- if (sscanf(cp, "%s %s", mpoint, do_newfs) != 2) {
- msgConfirm("For slice entry %s, got an invalid detail entry of: %s", c1->name, cp);
- status = DITEM_FAILURE;
- break;
- }
- newfs = toupper(do_newfs[0]) == 'Y' ? TRUE : FALSE;
- if (c1->private_data) {
- p = c1->private_data;
- p->do_newfs = newfs;
- strcpy(p->mountpoint, mpoint);
- }
- else {
- c1->private_data = new_part(PART_FILESYSTEM, mpoint, newfs);
- c1->private_free = safe_free;
- }
- if (!strcmp(mpoint, "/"))
- c1->flags |= CHUNK_IS_ROOT;
- else
- c1->flags &= ~CHUNK_IS_ROOT;
- }
- }
- }
- if (status == DITEM_SUCCESS)
- variable_set2(DISK_LABELLED, "yes", 0);
- return status;
-}
diff --git a/usr.sbin/sade/main.c b/usr.sbin/sade/main.c
deleted file mode 100644
index cb493f3..0000000
--- a/usr.sbin/sade/main.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * $FreeBSD$
- *
- * Copyright (c) 1995
- * Jordan Hubbard. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * verbatim and that no modifications are made prior to this
- * point in the file.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#include "sade.h"
-#include <sys/signal.h>
-#include <sys/fcntl.h>
-
-const char *StartName; /* Initial contents of argv[0] */
-const char *ProgName = "sade";
-
-int
-main(int argc, char **argv)
-{
- int status;
-
- /* Record name to be able to restart */
- StartName = argv[0];
-
- signal(SIGPIPE, SIG_IGN);
-
- /* We don't work too well when running as non-root anymore */
- if (geteuid() != 0) {
- fprintf(stderr, "Error: This utility should only be run as root.\n");
- return 1;
- }
-
-#ifdef PC98
- {
- /* XXX */
- char *p = getenv("TERM");
- if (p && strcmp(p, "cons25") == 0)
- setenv("TERM", "cons25w", 1);
- }
-#endif
-
- /* Set up whatever things need setting up */
- systemInitialize(argc, argv);
-
- /* Set default flag and variable values */
- installVarDefaults(NULL);
-
- if (argc > 1 && !strcmp(argv[1], "-fake")) {
- variable_set2(VAR_DEBUG, "YES", 0);
- Fake = TRUE;
- msgConfirm("I'll be just faking it from here on out, OK?");
- }
- if (argc > 1 && !strcmp(argv[1], "-restart"))
- Restarting = TRUE;
-
- /* Try to preserve our scroll-back buffer */
- if (OnVTY) {
- int i;
-
- for (i = 0; i < 25; i++)
- putchar('\n');
- }
- /* Move stderr aside */
- if (DebugFD)
- dup2(DebugFD, 2);
-
- /* Initialize driver modules, if we haven't already done so (ie,
- the user hit Ctrl-C -> Restart. */
- if (!pvariable_get("modulesInitialize")) {
- pvariable_set("modulesInitialize=1");
- }
-
- /* Probe for all relevant devices on the system */
- deviceGetAll();
-
- /* First, see if we have any arguments to process (and argv[0] counts if it's not "sysinstall") */
-
- status = setjmp(BailOut);
- if (status) {
- msgConfirm("A signal %d was caught - I'm saving what I can and shutting\n"
- "down. If you can reproduce the problem, please turn Debug on\n"
- "in the Options menu for the extra information it provides\n"
- "in debugging problems like this.", status);
- ;
- }
-
- /* Begin user dialog at outer menu */
- dlg_clear();
- while (1) {
- dmenuOpen(&MenuMain);
- if (getpid() != 1
- || !msgNoYes("Are you sure you wish to exit?")
- )
- break;
- }
-
- /* Shut down curses */
- endwin();
-
- return 0;
-}
diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c
deleted file mode 100644
index 886f80c..0000000
--- a/usr.sbin/sade/menus.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 1995
- * Jordan Hubbard. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * verbatim and that no modifications are made prior to this
- * point in the file.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#ifndef lint
-static const char rcsid[] =
- "$FreeBSD$";
-#endif
-
-#include "sade.h"
-
-/* All the system menus go here.
- *
- * Hardcoded things like version number strings will disappear from
- * these menus just as soon as I add the code for doing inline variable
- * expansion.
- */
-
-DMenu MenuDiskDevices = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Select Drive(s)",
- "Please select the drive on which you wish to perform this\n"
- "operation. If you are attempting to install a boot partition\n"
- "on a drive other than the first one or have multiple operating\n"
- "systems on your machine, you will have the option to install a boot\n"
- "manager later. To select a drive, use the arrow keys to move to it\n"
- "and press [SPACE] or [ENTER].\n\n"
- "Use [TAB] to get to the buttons and leave this menu.",
- "Press F1 for important information regarding disk geometry!",
- "drives",
- { { NULL, NULL, NULL } },
-};
-
-DMenu MenuMain = {
- DMENU_NORMAL_TYPE,
- "Disklabel and partitioning utility",
- "This is a utility for partitioning and/or labelling your disks.",
- "DISKUTIL",
- "main",
- {
-#ifdef WITH_SLICES
- { "1 Partition", "Managing disk partitions", diskPartitionEditor },
-#endif
- { "2 Label", "Label allocated disk partitions", diskLabelEditor },
- { NULL, NULL, NULL }
- },
-};
-
-#if defined(__i386__) || defined(__amd64__)
-#ifdef PC98
-/* IPL type menu */
-DMenu MenuIPLType = {
- DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
- "overwrite me", /* will be disk specific label */
- "If you want a FreeBSD Boot Manager, select \"BootMgr\". If you would\n"
- "prefer your Boot Manager to remain untouched then select \"None\".\n\n",
- "Press F1 to read about drive setup",
- "drives",
- { { "BootMgr", "Install the FreeBSD Boot Manager", NULL },
- { "None", "Leave the IPL untouched", NULL },
- { NULL, NULL, NULL } },
-};
-#else
-/* MBR type menu */
-DMenu MenuMBRType = {
- DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
- "overwrite me", /* will be disk specific label */
- "FreeBSD comes with a boot manager that allows you to easily\n"
- "select between FreeBSD and any other operating systems on your machine\n"
- "at boot time. If you have more than one drive and want to boot\n"
- "from the second one, the boot manager will also make it possible\n"
- "to do so (limitations in the PC BIOS usually prevent this otherwise).\n"
- "If you have other operating systems installed and would like a choice when\n"
- "booting, choose \"BootMgr\". If you would prefer to keep your existing\n"
- "boot manager, select \"None\".\n",
- "",
- "drives",
- { { "Standard", "Install a standard MBR (non-interactive boot manager)", NULL },
- { "BootMgr", "Install the FreeBSD boot manager", NULL },
- { "None", "Do not install a boot manager", NULL },
- { NULL, NULL, NULL } }
-};
-#endif /* PC98 */
-#endif /* __i386__ */
diff --git a/usr.sbin/sade/misc.c b/usr.sbin/sade/misc.c
deleted file mode 100644
index 3279e63..0000000
--- a/usr.sbin/sade/misc.c
+++ /dev/null
@@ -1,426 +0,0 @@
-/*
- * Miscellaneous support routines..
- *
- * $FreeBSD$
- *
- * Copyright (c) 1995
- * Jordan Hubbard. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * verbatim and that no modifications are made prior to this
- * point in the file.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#include <ctype.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <sys/errno.h>
-#include <sys/file.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <sys/wait.h>
-#include <sys/param.h>
-#include <sys/mount.h>
-#include <ufs/ufs/ufsmount.h>
-#include <sys/reboot.h>
-#include <sys/disklabel.h>
-#include <fs/msdosfs/msdosfsmount.h>
-
-#include "sade.h"
-
-/* Quick check to see if a file is readable */
-Boolean
-file_readable(char *fname)
-{
- if (!access(fname, F_OK))
- return TRUE;
- return FALSE;
-}
-
-/* sane strncpy() function */
-char *
-sstrncpy(char *dst, const char *src, int size)
-{
- dst[size] = '\0';
- return strncpy(dst, src, size);
-}
-
-/* Clip the whitespace off the end of a string */
-char *
-string_prune(char *str)
-{
- int len = str ? strlen(str) : 0;
-
- while (len && isspace(str[len - 1]))
- str[--len] = '\0';
- return str;
-}
-
-/* run the whitespace off the front of a string */
-char *
-string_skipwhite(char *str)
-{
- while (*str && isspace(*str))
- ++str;
- return str;
-}
-
-Boolean
-directory_exists(const char *dirname)
-{
- DIR *tptr;
-
- if (!dirname)
- return FALSE;
- if (!strlen(dirname))
- return FALSE;
-
- tptr = opendir(dirname);
- if (!tptr)
- return (FALSE);
-
- closedir(tptr);
- return (TRUE);
-}
-
-/* A free guaranteed to take NULL ptrs */
-void
-safe_free(void *ptr)
-{
- if (ptr)
- free(ptr);
-}
-
-/* A malloc that checks errors */
-void *
-safe_malloc(size_t size)
-{
- void *ptr;
-
- if (size <= 0)
- msgFatal("Invalid malloc size of %ld!", (long)size);
- ptr = malloc(size);
- if (!ptr)
- msgFatal("Out of memory!");
- bzero(ptr, size);
- return ptr;
-}
-
-int
-Mkdir(char *ipath)
-{
- struct stat sb;
- int final;
- char *p, *path;
-
- if (file_readable(ipath) || Fake)
- return DITEM_SUCCESS;
-
- path = strcpy(alloca(strlen(ipath) + 1), ipath);
- if (isDebug())
- msgDebug("mkdir(%s)\n", path);
- p = path;
- if (p[0] == '/') /* Skip leading '/'. */
- ++p;
- for (final = FALSE; !final; ++p) {
- if (p[0] == '\0' || (p[0] == '/' && p[1] == '\0'))
- final = TRUE;
- else if (p[0] != '/')
- continue;
- *p = '\0';
- if (stat(path, &sb)) {
- if (errno != ENOENT) {
- msgConfirm("Couldn't stat directory %s: %s", path, strerror(errno));
- return DITEM_FAILURE;
- }
- if (isDebug())
- msgDebug("mkdir(%s..)\n", path);
- if (mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
- msgConfirm("Couldn't create directory %s: %s", path,strerror(errno));
- return DITEM_FAILURE;
- }
- }
- *p = '/';
- }
- return DITEM_SUCCESS;
-}
-
-int
-Mount(char *mountp, void *dev)
-{
- struct ufs_args ufsargs;
- char device[80];
- char mountpoint[FILENAME_MAX];
-
- if (Fake)
- return DITEM_SUCCESS;
-
- if (*((char *)dev) != '/') {
- sprintf(device, "/dev/%s", (char *)dev);
- sprintf(mountpoint, "%s", mountp);
- }
- else {
- strcpy(device, dev);
- strcpy(mountpoint, mountp);
- }
- memset(&ufsargs,0,sizeof ufsargs);
-
- if (Mkdir(mountpoint)) {
- msgConfirm("Unable to make directory mountpoint for %s!", mountpoint);
- return DITEM_FAILURE;
- }
- if (isDebug())
- msgDebug("mount %s %s\n", device, mountpoint);
-
- ufsargs.fspec = device;
- if (mount("ufs", mountpoint, 0,
- (caddr_t)&ufsargs) == -1) {
- msgConfirm("Error mounting %s on %s : %s", device, mountpoint, strerror(errno));
- return DITEM_FAILURE;
- }
- return DITEM_SUCCESS;
-}
-
-WINDOW *
-savescr(void)
-{
- WINDOW *w;
-
- w = dupwin(newscr);
- return w;
-}
-
-void
-restorescr(WINDOW *w)
-{
- touchwin(w);
- wrefresh(w);
- delwin(w);
-}
-
-static int
-xdialog_count_rows(const char *p)
-{
- int rows = 0;
-
- while ((p = strchr(p, '\n')) != NULL) {
- p++;
- if (*p == '\0')
- break;
- rows++;
- }
-
- return rows ? rows : 1;
-}
-
-static int
-xdialog_count_columns(const char *p)
-{
- int len;
- int max_len = 0;
- const char *q;
-
- for (; (q = strchr(p, '\n')) != NULL; p = q + 1) {
- len = q - p;
- max_len = MAX(max_len, len);
- }
-
- len = strlen(p);
- max_len = MAX(max_len, len);
- return max_len;
-}
-
-int
-xdialog_menu(const char *title, const char *cprompt, int height, int width,
- int menu_height, int item_no, dialogMenuItem *ditems)
-{
- int i, result, choice = 0;
- DIALOG_LISTITEM *listitems;
- DIALOG_VARS save_vars;
-
- dlg_save_vars(&save_vars);
-
- /* initialize list items */
- listitems = dlg_calloc(DIALOG_LISTITEM, item_no + 1);
- assert_ptr(listitems, "xdialog_menu");
- for (i = 0; i < item_no; i++) {
- listitems[i].name = ditems[i].prompt;
- listitems[i].text = ditems[i].title;
- }
-
- /* calculate height */
- if (height < 0)
- height = xdialog_count_rows(cprompt) + menu_height + 4 + 2;
- if (height > LINES)
- height = LINES;
-
- /* calculate width */
- if (width < 0) {
- int tag_x = 0;
-
- for (i = 0; i < item_no; i++) {
- int j, l;
-
- l = strlen(listitems[i].name);
- for (j = 0; j < item_no; j++) {
- int k = strlen(listitems[j].text);
- tag_x = MAX(tag_x, l + k + 2);
- }
- }
- width = MAX(xdialog_count_columns(cprompt), title != NULL ? xdialog_count_columns(title) : 0);
- width = MAX(width, tag_x + 4) + 4;
- }
- width = MAX(width, 24);
- if (width > COLS)
- width = COLS;
-
- /* show menu */
- dialog_vars.default_item = listitems[choice].name;
- result = dlg_menu(title, cprompt, height, width,
- menu_height, item_no, listitems, &choice, NULL);
- switch (result) {
- case DLG_EXIT_ESC:
- result = -1;
- break;
- case DLG_EXIT_OK:
- if (ditems[choice].fire != NULL) {
- int status;
- WINDOW *save;
-
- save = savescr();
- status = ditems[choice].fire(ditems + choice);
- restorescr(save);
- }
- result = 0;
- break;
- case DLG_EXIT_CANCEL:
- default:
- result = 1;
- break;
- }
-
- free(listitems);
- dlg_restore_vars(&save_vars);
- return result;
-}
-
-int
-xdialog_radiolist(const char *title, const char *cprompt, int height, int width,
- int menu_height, int item_no, dialogMenuItem *ditems)
-{
- int i, result, choice = 0;
- DIALOG_LISTITEM *listitems;
- DIALOG_VARS save_vars;
-
- dlg_save_vars(&save_vars);
-
- /* initialize list items */
- listitems = dlg_calloc(DIALOG_LISTITEM, item_no + 1);
- assert_ptr(listitems, "xdialog_menu");
- for (i = 0; i < item_no; i++) {
- listitems[i].name = ditems[i].prompt;
- listitems[i].text = ditems[i].title;
- listitems[i].state = i == choice;
- }
-
- /* calculate height */
- if (height < 0)
- height = xdialog_count_rows(cprompt) + menu_height + 4 + 2;
- if (height > LINES)
- height = LINES;
-
- /* calculate width */
- if (width < 0) {
- int check_x = 0;
-
- for (i = 0; i < item_no; i++) {
- int j, l;
-
- l = strlen(listitems[i].name);
- for (j = 0; j < item_no; j++) {
- int k = strlen(listitems[j].text);
- check_x = MAX(check_x, l + k + 6);
- }
- }
- width = MAX(xdialog_count_columns(cprompt), title != NULL ? xdialog_count_columns(title) : 0);
- width = MAX(width, check_x + 4) + 4;
- }
- width = MAX(width, 24);
- if (width > COLS)
- width = COLS;
-
- /* show menu */
- dialog_vars.default_item = listitems[choice].name;
- result = dlg_checklist(title, cprompt, height, width,
- menu_height, item_no, listitems, NULL, FLAG_RADIO, &choice);
- switch (result) {
- case DLG_EXIT_ESC:
- result = -1;
- break;
- case DLG_EXIT_OK:
- if (ditems[choice].fire != NULL) {
- int status;
- WINDOW *save;
-
- save = savescr();
- status = ditems[choice].fire(ditems + choice);
- restorescr(save);
- }
- result = 0;
- break;
- case DLG_EXIT_CANCEL:
- default:
- result = 1;
- break;
- }
-
- /* save result */
- if (result == 0)
- dlg_add_result(listitems[choice].name);
- free(listitems);
- dlg_restore_vars(&save_vars);
- return result;
-}
-
-int
-xdialog_msgbox(const char *title, const char *cprompt,
- int height, int width, int pauseopt)
-{
- /* calculate height */
- if (height < 0)
- height = 2 + xdialog_count_rows(cprompt) + 2 + !!pauseopt;
- if (height > LINES)
- height = LINES;
-
- /* calculate width */
- if (width < 0) {
- width = title != NULL ? xdialog_count_columns(title) : 0;
- width = MAX(width, xdialog_count_columns(cprompt)) + 4;
- }
- if (pauseopt)
- width = MAX(width, 10);
- if (width > COLS)
- width = COLS;
-
- return dialog_msgbox(title, cprompt, height, width, pauseopt);
-}
diff --git a/usr.sbin/sade/msg.c b/usr.sbin/sade/msg.c
deleted file mode 100644
index fb3368e..0000000
--- a/usr.sbin/sade/msg.c
+++ /dev/null
@@ -1,357 +0,0 @@
-/*
- * $FreeBSD$
- *
- * Copyright (c) 1995
- * Jordan Hubbard. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * verbatim and that no modifications are made prior to this
- * point in the file.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#include "sade.h"
-#include <stdarg.h>
-#include <sys/ioctl.h>
-#include <sys/consio.h>
-
-Boolean
-isDebug(void)
-{
- char *cp;
-
- return (cp = variable_get(VAR_DEBUG)) && strcmp(cp, "no");
-}
-
-/* Whack up an informational message on the status line, in stand-out */
-void
-msgYap(const char *fmt, ...)
-{
- va_list args;
- char *errstr;
- int attrs;
-
- errstr = (char *)alloca(FILENAME_MAX);
- va_start(args, fmt);
- vsnprintf(errstr, FILENAME_MAX, fmt, args);
- va_end(args);
- attrs = getattrs(stdscr);
- attrset(A_REVERSE);
- mvaddstr(StatusLine, 0, errstr);
- attrset(attrs);
- refresh();
-}
-
-/* Whack up an informational message on the status line */
-void
-msgInfo(const char *fmt, ...)
-{
- va_list args;
- char *errstr;
- int i, attrs;
- char line[81];
-
- attrs = getattrs(stdscr);
- /* NULL is a special convention meaning "erase the old stuff" */
- if (!fmt) {
- move(StatusLine, 0);
- clrtoeol();
- return;
- }
- errstr = (char *)alloca(FILENAME_MAX);
- va_start(args, fmt);
- vsnprintf(errstr, FILENAME_MAX, fmt, args);
- va_end(args);
- memset(line, ' ', 80);
- for (i = 0; i < 80; i++) {
- if (errstr[i])
- line[i] = errstr[i];
- else
- break;
- }
- line[80] = '\0';
- attrset(ATTR_TITLE);
- mvaddstr(StatusLine, 0, line);
- attrset(attrs);
- move(StatusLine, 79);
- refresh();
-}
-
-/* Whack up a warning on the status line */
-void
-msgWarn(const char *fmt, ...)
-{
- va_list args;
- char *errstr;
- int attrs;
-
- errstr = (char *)alloca(FILENAME_MAX);
- strcpy(errstr, "Warning: ");
- va_start(args, fmt);
- vsnprintf((char *)(errstr + strlen(errstr)), FILENAME_MAX, fmt, args);
- va_end(args);
- attrs = getattrs(stdscr);
- beep();
- attrset(ATTR_TITLE);
- mvaddstr(StatusLine, 0, errstr);
- attrset(attrs);
- refresh();
- if (OnVTY && isDebug())
- msgDebug("Warning message `%s'\n", errstr);
-}
-
-/* Whack up an error on the status line */
-void
-msgError(const char *fmt, ...)
-{
- va_list args;
- char *errstr;
- int attrs;
-
- errstr = (char *)alloca(FILENAME_MAX);
- strcpy(errstr, "Error: ");
- va_start(args, fmt);
- vsnprintf((char *)(errstr + strlen(errstr)), FILENAME_MAX, fmt, args);
- va_end(args);
- beep();
- attrs = getattrs(stdscr);
- attrset(ATTR_TITLE);
- mvaddstr(StatusLine, 0, errstr);
- attrset(attrs);
- refresh();
- if (OnVTY && isDebug())
- msgDebug("Error message `%s'\n", errstr);
-}
-
-/* Whack up a fatal error on the status line */
-void
-msgFatal(const char *fmt, ...)
-{
- va_list args;
- char *errstr;
- int attrs;
-
- errstr = (char *)alloca(FILENAME_MAX);
- strcpy(errstr, "Fatal Error: ");
- va_start(args, fmt);
- vsnprintf((char *)(errstr + strlen(errstr)), FILENAME_MAX, fmt, args);
- va_end(args);
- beep();
- attrs = getattrs(stdscr);
- attrset(ATTR_TITLE);
- mvaddstr(StatusLine, 0, errstr);
- addstr(" - ");
- addstr("PRESS ANY KEY TO ");
- if (getpid() == 1)
- addstr("REBOOT");
- else
- addstr("QUIT");
- attrset(attrs);
- refresh();
- if (OnVTY)
- msgDebug("Fatal error `%s'!\n", errstr);
- getch();
-}
-
-/* Put up a message in a popup confirmation box */
-void
-msgConfirm(const char *fmt, ...)
-{
- va_list args;
- char *errstr;
- WINDOW *w = savescr();
-
- errstr = (char *)alloca(FILENAME_MAX);
- va_start(args, fmt);
- vsnprintf(errstr, FILENAME_MAX, fmt, args);
- va_end(args);
- dialog_vars.help_line = NULL;
- dialog_vars.help_file = NULL;
- if (OnVTY) {
- ioctl(0, VT_ACTIVATE, 1);
- msgInfo(NULL);
- }
- dialog_vars.help_line = "Press Enter or Space";
- xdialog_msgbox("Message", errstr, -1, -1, 1);
- dialog_vars.help_line = NULL;
-
- restorescr(w);
-}
-
-/* Put up a message in a popup information box */
-void
-msgNotify(const char *fmt, ...)
-{
- va_list args;
- char *errstr;
-
- errstr = (char *)alloca(FILENAME_MAX);
- va_start(args, fmt);
- vsnprintf(errstr, FILENAME_MAX, fmt, args);
- va_end(args);
- dialog_vars.help_line = NULL;
- dialog_vars.help_file = NULL;
- if (isDebug())
- msgDebug("Notify: %s\n", errstr);
- xdialog_msgbox(NULL, errstr, -1, -1, 0);
-}
-
-/* Put up a message in a popup yes/no box and return 0 for YES, 1 for NO */
-int
-msgYesNo(const char *fmt, ...)
-{
- va_list args;
- char *errstr;
- int ret;
- WINDOW *w = savescr();
-
- errstr = (char *)alloca(FILENAME_MAX);
- va_start(args, fmt);
- vsnprintf(errstr, FILENAME_MAX, fmt, args);
- va_end(args);
- dialog_vars.help_line = NULL;
- dialog_vars.help_file = NULL;
- if (OnVTY) {
- ioctl(0, VT_ACTIVATE, 1); /* Switch back */
- msgInfo(NULL);
- }
- if (variable_get(VAR_NONINTERACTIVE))
- return 0; /* If non-interactive, return YES all the time */
- ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1);
- restorescr(w);
- return ret;
-}
-
-/* Put up a message in a popup no/yes box and return 0 for YES, 1 for NO */
-int
-msgNoYes(const char *fmt, ...)
-{
- va_list args;
- char *errstr;
- int ret;
- WINDOW *w = savescr();
- DIALOG_VARS save_vars;
-
- errstr = (char *)alloca(FILENAME_MAX);
- va_start(args, fmt);
- vsnprintf(errstr, FILENAME_MAX, fmt, args);
- va_end(args);
- dialog_vars.help_line = NULL;
- dialog_vars.help_file = NULL;
- if (OnVTY) {
- ioctl(0, VT_ACTIVATE, 1); /* Switch back */
- msgInfo(NULL);
- }
- if (variable_get(VAR_NONINTERACTIVE))
- return 1; /* If non-interactive, return NO all the time */
- dlg_save_vars(&save_vars);
- dialog_vars.defaultno = TRUE;
- ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1);
- dlg_restore_vars(&save_vars);
- restorescr(w);
- return ret;
-}
-
-/* Put up a message in an input box and return the value */
-char *
-msgGetInput(char *buf, const char *fmt, ...)
-{
- va_list args;
- char *errstr;
- static char input_buffer[256];
- int rval;
- WINDOW *w = savescr();
-
- errstr = (char *)alloca(FILENAME_MAX);
- va_start(args, fmt);
- vsnprintf(errstr, FILENAME_MAX, fmt, args);
- va_end(args);
- dialog_vars.help_line = NULL;
- dialog_vars.help_file = NULL;
- if (buf)
- SAFE_STRCPY(input_buffer, buf);
- else
- input_buffer[0] = '\0';
- if (OnVTY) {
- ioctl(0, VT_ACTIVATE, 1); /* Switch back */
- msgInfo(NULL);
- }
- rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer, 0);
- restorescr(w);
- if (!rval)
- return dialog_vars.input_result;
- else
- return NULL;
-}
-
-/* Write something to the debugging port */
-void
-msgDebug(const char *fmt, ...)
-{
- va_list args;
- char *dbg;
-
- if (DebugFD == -1)
- return;
- dbg = (char *)alloca(FILENAME_MAX);
- strcpy(dbg, "DEBUG: ");
- va_start(args, fmt);
- vsnprintf((char *)(dbg + strlen(dbg)), FILENAME_MAX, fmt, args);
- va_end(args);
- write(DebugFD, dbg, strlen(dbg));
-}
-
-/* Tell the user there's some output to go look at */
-void
-msgWeHaveOutput(const char *fmt, ...)
-{
- va_list args;
- char *errstr;
- WINDOW *w = savescr();
-
- errstr = (char *)alloca(FILENAME_MAX);
- va_start(args, fmt);
- vsnprintf(errstr, FILENAME_MAX, fmt, args);
- va_end(args);
- dialog_vars.help_line = NULL;
- dialog_vars.help_file = NULL;
- msgDebug("Notify: %s\n", errstr);
- dlg_clear();
- sleep(2);
- xdialog_msgbox(NULL, errstr, -1, -1, 0);
- restorescr(w);
-}
-
-/* Simple versions of msgConfirm() and msgNotify() for calling from scripts */
-int
-msgSimpleConfirm(const char *str)
-{
- msgConfirm("%s", str);
- return DITEM_SUCCESS;
-}
-
-int
-msgSimpleNotify(const char *str)
-{
- msgNotify("%s", str);
- return DITEM_SUCCESS;
-}
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
deleted file mode 100644
index 3e163ad..0000000
--- a/usr.sbin/sade/sade.h
+++ /dev/null
@@ -1,465 +0,0 @@
-/*
- * Copyright (c) 1995
- * Jordan Hubbard. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * verbatim and that no modifications are made prior to this
- * point in the file.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _SADE_H_INCLUDE
-#define _SADE_H_INCLUDE
-
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <errno.h>
-#include <setjmp.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <dialog.h>
-
-/*** Defines ***/
-
-#if defined(__i386__) || defined(__amd64__)
-#define WITH_SYSCONS
-#define WITH_MICE
-#endif
-
-#if defined(__i386__) || defined(__amd64__)
-#define WITH_SLICES
-#endif
-
-#if defined(__i386__)
-#define WITH_LINUX
-#endif
-
-/* device limits */
-#define DEV_NAME_MAX 128 /* The maximum length of a device name */
-#define DEV_MAX 100 /* The maximum number of devices we'll deal with */
-#define IO_ERROR -2 /* Status code for I/O error rather than normal EOF */
-
-/*
- * I make some pretty gross assumptions about having a max of 50 chunks
- * total - 8 slices and 42 partitions. I can't easily display many more
- * than that on the screen at once!
- *
- * For 2.1 I'll revisit this and try to make it more dynamic, but since
- * this will catch 99.99% of all possible cases, I'm not too worried.
- */
-#define MAX_CHUNKS 40
-
-/* Internal environment variable names */
-#define DISK_PARTITIONED "_diskPartitioned"
-#define DISK_LABELLED "_diskLabelled"
-#define DISK_SELECTED "_diskSelected"
-#define SYSTEM_STATE "_systemState"
-#define RUNNING_ON_ROOT "_runningOnRoot"
-
-/* Ones that can be tweaked from config files */
-#define VAR_BLANKTIME "blanktime"
-#define VAR_BOOTMGR "bootManager"
-#define VAR_DEBUG "debug"
-#define VAR_DISK "disk"
-#define VAR_DISKINTERACTIVE "diskInteractive"
-#define VAR_DEDICATE_DISK "dedicateDisk"
-#define VAR_COMMAND "command"
-#define VAR_CONFIG_FILE "configFile"
-#define VAR_GEOMETRY "geometry"
-#define VAR_INSTALL_CFG "installConfig"
-#define VAR_INSTALL_ROOT "installRoot"
-#define VAR_LABEL "label"
-#define VAR_LABEL_COUNT "labelCount"
-#define VAR_NEWFS_ARGS "newfsArgs"
-#define VAR_NO_CONFIRM "noConfirm"
-#define VAR_NO_ERROR "noError"
-#define VAR_NO_WARN "noWarn"
-#define VAR_NO_USR "noUsr"
-#define VAR_NO_TMP "noTmp"
-#define VAR_NO_HOME "noHome"
-#define VAR_NONINTERACTIVE "nonInteractive"
-#define VAR_PARTITION "partition"
-#define VAR_RELNAME "releaseName"
-#define VAR_ROOT_SIZE "rootSize"
-#define VAR_SWAP_SIZE "swapSize"
-#define VAR_TAPE_BLOCKSIZE "tapeBlocksize"
-#define VAR_UFS_PATH "ufs"
-#define VAR_USR_SIZE "usrSize"
-#define VAR_VAR_SIZE "varSize"
-#define VAR_TMP_SIZE "tmpSize"
-#define VAR_TERM "TERM"
-#define VAR_CONSTERM "_consterm"
-
-#define DEFAULT_TAPE_BLOCKSIZE "20"
-
-/* One MB worth of blocks */
-#define ONE_MEG 2048
-#define ONE_GIG (ONE_MEG * 1024)
-
-/* Which selection attributes to use */
-#define ATTR_SELECTED (ColorDisplay ? item_selected_attr : item_attr)
-#define ATTR_TITLE button_active_attr
-
-/* Handy strncpy() macro */
-#define SAFE_STRCPY(to, from) sstrncpy((to), (from), sizeof (to) - 1)
-
-/*** Types ***/
-typedef int Boolean;
-typedef struct disk Disk;
-typedef struct chunk Chunk;
-
-/* special return codes for `fire' actions */
-#define DITEM_STATUS(flag) ((flag) & 0x0000FFFF)
-#define DITEM_SUCCESS 0
-#define DITEM_FAILURE 1
-
-/* flags - returned in upper 16 bits of return status */
-#define DITEM_LEAVE_MENU (1 << 16)
-#define DITEM_RESTORE (1 << 19)
-
-/* for use in describing more exotic behaviors */
-typedef struct _dmenu_item {
- char *prompt;
- char *title;
- int (*fire)(struct _dmenu_item *self);
-} dialogMenuItem;
-
-/* Bitfields for menu options */
-#define DMENU_NORMAL_TYPE 0x1 /* Normal dialog menu */
-#define DMENU_RADIO_TYPE 0x2 /* Radio dialog menu */
-#define DMENU_SELECTION_RETURNS 0x8 /* Immediate return on item selection */
-
-typedef struct _dmenu {
- int type; /* What sort of menu we are */
- char *title; /* Our title */
- char *prompt; /* Our prompt */
- char *helpline; /* Line of help at bottom */
- char *helpfile; /* Help file for "F1" */
- dialogMenuItem items[]; /* Array of menu items */
-} DMenu;
-
-/* An rc.conf variable */
-typedef struct _variable {
- struct _variable *next;
- char *name;
- char *value;
- int dirty;
-} Variable;
-
-#define NO_ECHO_OBJ(type) ((type) | (DITEM_NO_ECHO << 16))
-#define TYPE_OF_OBJ(type) ((type) & 0xff)
-#define ATTR_OF_OBJ(type) ((type) >> 16)
-
-/* A screen layout structure */
-typedef struct _layout {
- int y; /* x & Y co-ordinates */
- int x;
- int len; /* The size of the dialog on the screen */
- int maxlen; /* How much the user can type in ... */
- char *prompt; /* The string for the prompt */
- char *help; /* The display for the help line */
- void *var; /* The var to set when this changes */
- int type; /* The type of the dialog to create */
- void *obj; /* The obj pointer returned by libdialog */
-} Layout;
-
-typedef enum {
- DEVICE_TYPE_NONE,
- DEVICE_TYPE_DISK,
- DEVICE_TYPE_DOS,
- DEVICE_TYPE_UFS,
- DEVICE_TYPE_ANY,
-} DeviceType;
-
-/* A "device" from sade's point of view */
-typedef struct _device {
- char name[DEV_NAME_MAX];
- char *description;
- char *devname;
- DeviceType type;
- Boolean (*init)(struct _device *dev);
- FILE * (*get)(struct _device *dev, char *file, Boolean probe);
- void (*shutdown)(struct _device *dev);
- void *private;
- unsigned int flags;
- unsigned int volume;
-} Device;
-
-/* Some internal representations of partitions */
-typedef enum {
- PART_NONE,
- PART_SLICE,
- PART_SWAP,
- PART_FILESYSTEM,
- PART_FAT,
- PART_EFI
-} PartType;
-
-#define NEWFS_UFS_CMD "newfs"
-#define NEWFS_MSDOS_CMD "newfs_msdos"
-
-enum newfs_type { NEWFS_UFS, NEWFS_MSDOS, NEWFS_CUSTOM };
-#define NEWFS_UFS_STRING "UFS"
-#define NEWFS_MSDOS_STRING "FAT"
-#define NEWFS_CUSTOM_STRING "CST"
-
-/* The longest set of custom command line arguments we'll pass. */
-#define NEWFS_CMD_ARGS_MAX 256
-
-typedef struct _part_info {
- char mountpoint[FILENAME_MAX];
-
- /* Is invocation of newfs desired? */
- Boolean do_newfs;
-
- enum newfs_type newfs_type;
- union {
- struct {
- char user_options[NEWFS_CMD_ARGS_MAX];
- Boolean acls; /* unused */
- Boolean multilabel; /* unused */
- Boolean softupdates;
- Boolean ufs1;
- } newfs_ufs;
- struct {
- /* unused */
- } newfs_msdos;
- struct {
- char command[NEWFS_CMD_ARGS_MAX];
- } newfs_custom;
- } newfs_data;
-} PartInfo;
-
-/* An option */
-typedef struct _opt {
- char *name;
- char *desc;
- enum { OPT_IS_STRING, OPT_IS_INT, OPT_IS_FUNC, OPT_IS_VAR } type;
- void *data;
- void *aux;
- char *(*check)(void);
-} Option;
-
-typedef int (*commandFunc)(char *key, void *data);
-
-#define EXTRAS_FIELD_LEN 128
-
-/*** Externs ***/
-extern jmp_buf BailOut; /* Used to get the heck out */
-extern int DebugFD; /* Where diagnostic output goes */
-extern Boolean Fake; /* Don't actually modify anything - testing */
-extern Boolean Restarting; /* Are we restarting sysinstall? */
-extern Boolean SystemWasInstalled; /* Did we install it? */
-extern Boolean RunningAsInit; /* Are we running stand-alone? */
-extern Boolean DialogActive; /* Is the dialog() stuff up? */
-extern Boolean ColorDisplay; /* Are we on a color display? */
-extern Boolean OnVTY; /* On a syscons VTY? */
-extern Variable *VarHead; /* The head of the variable chain */
-extern int BootMgr; /* Which boot manager to use */
-extern int StatusLine; /* Where to print our status messages */
-#if defined(__i386__) || defined(__amd64__)
-#ifdef PC98
-extern DMenu MenuIPLType; /* Type of IPL to write on the disk */
-#else
-extern DMenu MenuMBRType; /* Type of MBR to write on the disk */
-#endif
-#endif
-extern DMenu MenuMain; /* New main menu */
-extern DMenu MenuDiskDevices; /* Disk type devices */
-extern const char * StartName; /* Which name we were started as */
-extern const char * ProgName; /* Program's proper name */
-
-/* Important chunks. */
-extern Chunk *HomeChunk;
-extern Chunk *RootChunk;
-extern Chunk *SwapChunk;
-extern Chunk *TmpChunk;
-extern Chunk *UsrChunk;
-extern Chunk *VarChunk;
-#ifdef __ia64__
-extern Chunk *EfiChunk;
-#endif
-
-/* Stuff from libdialog which isn't properly declared outside */
-extern void display_helpfile(void);
-extern void display_helpline(WINDOW *w, int y, int width);
-
-/*** Prototypes ***/
-
-/* command.c */
-extern void command_clear(void);
-extern void command_sort(void);
-extern void command_execute(void);
-extern void command_shell_add(char *key, const char *fmt, ...) __printflike(2, 3);
-extern void command_func_add(char *key, commandFunc func, void *data);
-
-/* devices.c */
-extern DMenu *deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)(dialogMenuItem *d));
-extern void deviceGetAll(void);
-extern void deviceReset(void);
-extern void deviceRescan(void);
-extern Device **deviceFind(char *name, DeviceType type);
-extern Device **deviceFindDescr(char *name, char *desc, DeviceType class);
-extern int deviceCount(Device **devs);
-extern Device *new_device(char *name);
-extern Device *deviceRegister(char *name, char *desc, char *devicename, DeviceType type,
- Boolean (*init)(Device *mediadev),
- FILE * (*get)(Device *dev, char *file, Boolean probe),
- void (*shutDown)(Device *mediadev),
- void *private);
-extern Boolean dummyInit(Device *dev);
-extern FILE *dummyGet(Device *dev, char *dist, Boolean probe);
-extern void dummyShutdown(Device *dev);
-
-/* disks.c */
-#ifdef WITH_SLICES
-extern void diskPartition(Device *dev);
-extern int diskPartitionEditor(dialogMenuItem *self);
-#endif
-extern int diskPartitionWrite(Device *dev);
-
-/* dispatch.c */
-extern int dispatchCommand(char *command);
-extern int dispatch_load_floppy(dialogMenuItem *self);
-extern int dispatch_load_file_int(int);
-extern int dispatch_load_file(dialogMenuItem *self);
-
-/* dmenu.c */
-extern int dmenuSetValue(dialogMenuItem *tmp);
-extern Boolean dmenuOpen(DMenu *menu);
-extern int dmenuRadioCheck(dialogMenuItem *item);
-
-/* dos.c */
-extern Boolean mediaCloseDOS(Device *dev, FILE *fp);
-extern Boolean mediaInitDOS(Device *dev);
-extern FILE *mediaGetDOS(Device *dev, char *file, Boolean probe);
-extern void mediaShutdownDOS(Device *dev);
-
-/* globals.c */
-extern void globalsInit(void);
-
-/* install.c */
-extern Boolean checkLabels(Boolean whinge);
-extern int installCommit(dialogMenuItem *self);
-extern int installCustomCommit(dialogMenuItem *self);
-extern int installFilesystems(Device *dev);
-extern int installVarDefaults(dialogMenuItem *self);
-extern void installEnvironment(void);
-extern Boolean copySelf(void);
-
-/* kget.c */
-extern int kget(char *out);
-
-/* label.c */
-extern int diskLabelEditor(dialogMenuItem *self);
-extern int diskLabelCommit(Device *dev);
-
-/* misc.c */
-extern Boolean file_readable(char *fname);
-extern Boolean directory_exists(const char *dirname);
-extern char *string_prune(char *str);
-extern char *string_skipwhite(char *str);
-extern void safe_free(void *ptr);
-extern void *safe_malloc(size_t size);
-extern int Mkdir(char *);
-extern int Mount(char *, void *data);
-
-extern WINDOW *savescr(void);
-extern void restorescr(WINDOW *w);
-extern char *sstrncpy(char *dst, const char *src, int size);
-
-extern int xdialog_menu(const char *title, const char *cprompt,
- int height, int width, int menu_height,
- int item_no, dialogMenuItem *ditems);
-extern int xdialog_radiolist(const char *title, const char *cprompt,
- int height, int width, int menu_height,
- int item_no, dialogMenuItem *ditems);
-extern int xdialog_msgbox(const char *title, const char *cprompt,
- int height, int width, int pauseopt);
-
-/* msg.c */
-extern Boolean isDebug(void);
-extern void msgInfo(const char *fmt, ...) __printf0like(1, 2);
-extern void msgYap(const char *fmt, ...) __printflike(1, 2);
-extern void msgWarn(const char *fmt, ...) __printflike(1, 2);
-extern void msgDebug(const char *fmt, ...) __printflike(1, 2);
-extern void msgError(const char *fmt, ...) __printflike(1, 2);
-extern void msgFatal(const char *fmt, ...) __printflike(1, 2);
-extern void msgConfirm(const char *fmt, ...) __printflike(1, 2);
-extern void msgNotify(const char *fmt, ...) __printflike(1, 2);
-extern void msgWeHaveOutput(const char *fmt, ...) __printflike(1, 2);
-extern int msgYesNo(const char *fmt, ...) __printflike(1, 2);
-extern int msgNoYes(const char *fmt, ...) __printflike(1, 2);
-extern char *msgGetInput(char *buf, const char *fmt, ...) __printflike(2, 3);
-extern int msgSimpleConfirm(const char *);
-extern int msgSimpleNotify(const char *);
-
-/* pccard.c */
-extern void pccardInitialize(void);
-
-/* system.c */
-extern void systemInitialize(int argc, char **argv);
-extern void systemShutdown(int status);
-extern int execExecute(char *cmd, char *name);
-extern int systemExecute(char *cmd);
-extern void systemSuspendDialog(void);
-extern void systemResumeDialog(void);
-extern int systemDisplayHelp(char *file);
-extern char *systemHelpFile(char *file, char *buf);
-extern void systemChangeFont(const u_char font[]);
-extern void systemChangeLang(char *lang);
-extern void systemChangeTerminal(char *color, const u_char c_termcap[], char *mono, const u_char m_termcap[]);
-extern void systemChangeScreenmap(const u_char newmap[]);
-extern int vsystem(const char *fmt, ...) __printflike(1, 2);
-
-/* termcap.c */
-extern int set_termcap(void);
-
-/* variable.c */
-extern void variable_set(char *var, int dirty);
-extern void variable_set2(char *name, char *value, int dirty);
-extern char *variable_get(char *var);
-extern int variable_cmp(char *var, char *value);
-extern void variable_unset(char *var);
-extern char *variable_get_value(char *var, char *prompt, int dirty);
-extern int variable_check(char *data);
-extern int variable_check2(char *data);
-extern int dump_variables(dialogMenuItem *self);
-extern void free_variables(void);
-extern void pvariable_set(char *var);
-extern char *pvariable_get(char *var);
-
-/* wizard.c */
-extern void slice_wizard(Disk *d);
-
-/*
- * Macros. Please find a better place for us!
- */
-#define DEVICE_INIT(d) ((d) != NULL ? (d)->init((d)) : (Boolean)0)
-#define DEVICE_GET(d, b, f) ((d) != NULL ? (d)->get((d), (b), (f)) : NULL)
-#define DEVICE_SHUTDOWN(d) ((d) != NULL ? (d)->shutdown((d)) : (void)0)
-
-#endif
-/* _SYSINSTALL_H_INCLUDE */
diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c
deleted file mode 100644
index 1e0e52f..0000000
--- a/usr.sbin/sade/system.c
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * $FreeBSD$
- *
- * Jordan Hubbard
- *
- * My contributions are in the public domain.
- *
- * Parts of this file are also blatently stolen from Poul-Henning Kamp's
- * previous version of sysinstall, and as such fall under his "BEERWARE license"
- * so buy him a beer if you like it! Buy him a beer for me, too!
- * Heck, get him completely drunk and send me pictures! :-)
- */
-
-#include <signal.h>
-#include <termios.h>
-#include <sys/param.h>
-#include <sys/reboot.h>
-#include <sys/consio.h>
-#include <sys/fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/mount.h>
-#include <sys/stat.h>
-#include <sys/sysctl.h>
-#include <ufs/ufs/ufsmount.h>
-
-#include "sade.h"
-
-/* Where we stick our temporary expanded doc file */
-#define DOC_TMP_DIR "/tmp/.doc"
-#define DOC_TMP_FILE "/tmp/.doc/doc.tmp"
-
-/*
- * Handle interrupt signals - this probably won't work in all cases
- * due to our having bogotified the internal state of dialog or curses,
- * but we'll give it a try.
- */
-static int
-intr_continue(dialogMenuItem *self)
-{
- return DITEM_LEAVE_MENU;
-}
-
-static int
-intr_restart(dialogMenuItem *self)
-{
- int ret, fd, fdmax;
-
- free_variables();
- fdmax = getdtablesize();
- for (fd = 3; fd < fdmax; fd++)
- close(fd);
- ret = execl(StartName, StartName, "-restart", (char *)NULL);
- msgDebug("execl failed (%s)\n", strerror(errno));
- /* NOTREACHED */
- return -1;
-}
-
-static dialogMenuItem intrmenu[] = {
- { "Restart", "Restart the program", intr_restart },
- { "Continue", "Continue without restarting", intr_continue },
-};
-
-
-static void
-handle_intr(int sig)
-{
- WINDOW *save = savescr();
-
- dialog_vars.help_line = NULL;
- dialog_vars.help_file = NULL;
- if (OnVTY) {
- ioctl(0, VT_ACTIVATE, 1); /* Switch back */
- msgInfo(NULL);
- }
- (void)xdialog_menu("Installation interrupt",
- "Do you want to abort the installation?",
- -1, -1, 2, 2, intrmenu);
- restorescr(save);
-}
-
-/* Expand a file into a convenient location, nuking it each time */
-static char *
-expand(char *fname)
-{
- char *gunzip = "/usr/bin/gunzip";
-
- if (!directory_exists(DOC_TMP_DIR)) {
- Mkdir(DOC_TMP_DIR);
- if (chown(DOC_TMP_DIR, 0, 0) < 0)
- return NULL;
- if (chmod(DOC_TMP_DIR, S_IRWXU) < 0)
- return NULL;
- }
- else
- unlink(DOC_TMP_FILE);
- if (!file_readable(fname) || vsystem("%s < %s > %s", gunzip, fname, DOC_TMP_FILE))
- return NULL;
- return DOC_TMP_FILE;
-}
-
-/* Initialize system defaults */
-void
-systemInitialize(int argc, char **argv)
-{
- size_t i;
- int boothowto;
- sigset_t signalset;
-
- signal(SIGINT, SIG_IGN);
- globalsInit();
-
- i = sizeof(boothowto);
- if (!sysctlbyname("debug.boothowto", &boothowto, &i, NULL, 0) &&
- (i == sizeof(boothowto)) && (boothowto & RB_VERBOSE))
- variable_set2(VAR_DEBUG, "YES", 0);
-
- if (set_termcap() == -1) {
- printf("Can't find terminal entry\n");
- exit(-1);
- }
-
- /* XXX - libdialog has particularly bad return value checking */
- init_dialog(stdin, stdout);
-
- /* If we haven't crashed I guess dialog is running ! */
- DialogActive = TRUE;
-
- /* Make sure HOME is set for those utilities that need it */
- signal(SIGINT, handle_intr);
- /*
- * Make sure we can be interrupted even if we were re-executed
- * from an interrupt.
- */
- sigemptyset(&signalset);
- sigaddset(&signalset, SIGINT);
- sigprocmask(SIG_UNBLOCK, &signalset, NULL);
-
- (void)vsystem("rm -rf %s", DOC_TMP_DIR);
-}
-
-/* Run some general command */
-int
-systemExecute(char *command)
-{
- int status;
- struct termios foo;
- WINDOW *w = savescr();
-
- dlg_clear();
- end_dialog();
- DialogActive = FALSE;
- if (tcgetattr(0, &foo) != -1) {
- foo.c_cc[VERASE] = '\010';
- tcsetattr(0, TCSANOW, &foo);
- }
- if (!Fake)
- status = system(command);
- else {
- status = 0;
- msgDebug("systemExecute: Faked execution of `%s'\n", command);
- }
- DialogActive = TRUE;
- restorescr(w);
- return status;
-}
-
-/* suspend/resume libdialog/curses screen */
-static WINDOW *oldW;
-
-void
-systemSuspendDialog(void)
-{
-
- oldW = savescr();
- dlg_clear();
- end_dialog();
- DialogActive = FALSE;
-}
-
-void
-systemResumeDialog(void)
-{
-
- DialogActive = TRUE;
- restorescr(oldW);
-}
-
-/* Display a help file in a filebox */
-int
-systemDisplayHelp(char *file)
-{
- char *fname = NULL;
- char buf[FILENAME_MAX];
- int ret = 0;
- WINDOW *w = savescr();
-
- fname = systemHelpFile(file, buf);
- if (!fname) {
- snprintf(buf, FILENAME_MAX, "The %s file is not provided on this particular floppy image.", file);
- dialog_vars.help_line = NULL;
- dialog_vars.help_file = NULL;
- xdialog_msgbox("Sorry!", buf, -1, -1, 1);
- ret = 1;
- }
- else {
- dialog_vars.help_line = NULL;
- dialog_vars.help_file = NULL;
- dialog_textbox(file, fname, LINES, COLS);
- }
- restorescr(w);
- return ret;
-}
-
-char *
-systemHelpFile(char *file, char *buf)
-{
- if (!file)
- return NULL;
- if (file[0] == '/')
- return file;
- snprintf(buf, FILENAME_MAX, "/stand/help/%s.hlp.gz", file);
- if (file_readable(buf))
- return expand(buf);
- snprintf(buf, FILENAME_MAX, "/stand/help/%s.hlp", file);
- if (file_readable(buf))
- return expand(buf);
- snprintf(buf, FILENAME_MAX, "/stand/help/%s.TXT.gz", file);
- if (file_readable(buf))
- return expand(buf);
- snprintf(buf, FILENAME_MAX, "/stand/help/%s.TXT", file);
- if (file_readable(buf))
- return expand(buf);
- snprintf(buf, FILENAME_MAX, "/usr/src/usr.sbin/%s/help/%s.hlp", ProgName,
- file);
- if (file_readable(buf))
- return buf;
- snprintf(buf, FILENAME_MAX, "/usr/src/usr.sbin/%s/help/%s.TXT", ProgName,
- file);
- if (file_readable(buf))
- return buf;
- return NULL;
-}
-
-int
-vsystem(const char *fmt, ...)
-{
- va_list args;
- int pstat;
- pid_t pid;
- int omask;
- sig_t intsave, quitsave;
- char *cmd;
- int i;
- struct stat sb;
-
- cmd = (char *)alloca(FILENAME_MAX);
- cmd[0] = '\0';
- va_start(args, fmt);
- vsnprintf(cmd, FILENAME_MAX, fmt, args);
- va_end(args);
-
- omask = sigblock(sigmask(SIGCHLD));
- if (Fake) {
- msgDebug("vsystem: Faked execution of `%s'\n", cmd);
- return 0;
- }
- if (isDebug())
- msgDebug("Executing command `%s'\n", cmd);
- pid = fork();
- if (pid == -1) {
- (void)sigsetmask(omask);
- i = 127;
- }
- else if (!pid) { /* Junior */
- (void)sigsetmask(omask);
- if (DebugFD != -1) {
- dup2(DebugFD, 0);
- dup2(DebugFD, 1);
- dup2(DebugFD, 2);
- }
- else {
- close(1); open("/dev/null", O_WRONLY);
- dup2(1, 2);
- }
- if (stat("/stand/sh", &sb) == 0)
- execl("/stand/sh", "/stand/sh", "-c", cmd, (char *)NULL);
- else
- execl("/bin/sh", "/bin/sh", "-c", cmd, (char *)NULL);
- exit(1);
- }
- else {
- intsave = signal(SIGINT, SIG_IGN);
- quitsave = signal(SIGQUIT, SIG_IGN);
- pid = waitpid(pid, &pstat, 0);
- (void)sigsetmask(omask);
- (void)signal(SIGINT, intsave);
- (void)signal(SIGQUIT, quitsave);
- i = (pid == -1) ? -1 : WEXITSTATUS(pstat);
- if (isDebug())
- msgDebug("Command `%s' returns status of %d\n", cmd, i);
- }
- return i;
-}
-
diff --git a/usr.sbin/sade/termcap.c b/usr.sbin/sade/termcap.c
deleted file mode 100644
index 1c2f39b..0000000
--- a/usr.sbin/sade/termcap.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 1994, Paul Richards.
- *
- * All rights reserved.
- *
- * This software may be used, modified, copied, distributed, and sold, in both
- * source and binary form provided that the above copyright and these terms
- * are retained, verbatim, as the first lines of this file. Under no
- * circumstances is the author responsible for the proper functioning of this
- * software, nor does the author assume any responsibility for damages
- * incurred with its use.
- *
- * $FreeBSD$
- */
-
-#include "sade.h"
-#include <stdarg.h>
-#include <fcntl.h>
-#include <sys/errno.h>
-#include <sys/ioctl.h>
-#include <sys/consio.h>
-
-#define VTY_STATUS_LINE 24
-#define TTY_STATUS_LINE 23
-
-static void
-prompt_term(char **termp)
-{
- char str[80];
-
- printf("\nPlease set your TERM variable before running this program.\n");
- printf("Defaulting to an ANSI compatible terminal - please press RETURN\n");
- fgets(str, sizeof(str), stdin); /* Just to make it interactive */
- *termp = (char *)"ansi";
-}
-
-int
-set_termcap(void)
-{
- char *term;
- int stat;
- struct winsize ws;
-
- term = getenv("TERM");
- stat = ioctl(STDERR_FILENO, GIO_COLOR, &ColorDisplay);
-
- if (isDebug())
- DebugFD = open("sade.debug", O_WRONLY|O_CREAT|O_TRUNC, 0644);
- else
- DebugFD = -1;
- if (DebugFD < 0)
- DebugFD = open("/dev/null", O_RDWR, 0);
-
- if (!OnVTY || (stat < 0)) {
- if (!term) {
- char *term;
-
- prompt_term(&term);
- if (setenv("TERM", term, 1) < 0)
- return -1;
- }
- if (DebugFD < 0)
- DebugFD = open("/dev/null", O_RDWR, 0);
- }
- else {
- int i, on;
-
- if (getpid() == 1) {
- DebugFD = open("/dev/ttyv1", O_WRONLY);
- if (DebugFD != -1) {
- on = 1;
- i = ioctl(DebugFD, TIOCCONS, (char *)&on);
- msgDebug("ioctl(%d, TIOCCONS, NULL) = %d (%s)\n",
- DebugFD, i, !i ? "success" : strerror(errno));
- }
- }
-
-#ifdef PC98
- if (!term) {
- if (setenv("TERM", "cons25w", 1) < 0)
- return -1;
- }
-#else
- if (ColorDisplay) {
- if (!term) {
- if (setenv("TERM", "xterm", 1) < 0)
- return -1;
- }
- }
- else {
- if (!term) {
- if (setenv("TERM", "vt100", 1) < 0)
- return -1;
- }
- }
-#endif
- }
- if (ioctl(0, TIOCGWINSZ, &ws) == -1) {
- msgDebug("Unable to get terminal size - errno %d\n", errno);
- ws.ws_row = 0;
- }
- StatusLine = ws.ws_row ? ws.ws_row - 1: (OnVTY ? VTY_STATUS_LINE : TTY_STATUS_LINE);
- return 0;
-}
diff --git a/usr.sbin/sade/variable.c b/usr.sbin/sade/variable.c
deleted file mode 100644
index ae3a6e0..0000000
--- a/usr.sbin/sade/variable.c
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * $FreeBSD$
- *
- * Copyright (c) 1995
- * Jordan Hubbard. All rights reserved.
- * Copyright (c) 2001
- * Murray Stokely. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * verbatim and that no modifications are made prior to this
- * point in the file.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#include "sade.h"
-
-/* Routines for dealing with variable lists */
-
-static void
-make_variable(char *var, char *value, int dirty)
-{
- Variable *vp;
-
- /* Trim leading and trailing whitespace */
- var = string_skipwhite(string_prune(var));
-
- if (!var || !*var)
- return;
-
-
- /* Now search to see if it's already in the list */
- for (vp = VarHead; vp; vp = vp->next) {
- if (!strcmp(vp->name, var)) {
- if (vp->dirty && !dirty)
- return;
- setenv(var, value, 1);
- free(vp->value);
- vp->value = strdup(value);
- if (dirty != -1)
- vp->dirty = dirty;
- return;
- }
- }
-
- setenv(var, value, 1);
- /* No? Create a new one */
- vp = (Variable *)safe_malloc(sizeof(Variable));
- vp->name = strdup(var);
- vp->value = strdup(value);
- if (dirty == -1)
- dirty = 0;
- vp->dirty = dirty;
- vp->next = VarHead;
- VarHead = vp;
-}
-
-void
-variable_set(char *var, int dirty)
-{
- char tmp[1024], *cp;
-
- if (!var)
- msgFatal("NULL variable name & value passed.");
- else if (!*var)
- msgDebug("Warning: Zero length name & value passed to variable_set()\n");
- SAFE_STRCPY(tmp, var);
- if ((cp = strchr(tmp, '=')) == NULL)
- msgFatal("Invalid variable format: %s", var);
- *(cp++) = '\0';
- make_variable(tmp, string_skipwhite(cp), dirty);
-}
-
-void
-variable_set2(char *var, char *value, int dirty)
-{
- if (!var || !value)
- msgFatal("Null name or value passed to set_variable2(%s) = %s!",
- var ? var : "", value ? value : "");
- else if (!*var || !*value)
- msgDebug("Warning: Zero length name or value passed to variable_set2(%s) = %s\n",
- var, value);
- make_variable(var, value, dirty);
-}
-
-char *
-variable_get(char *var)
-{
- return getenv(var);
-}
-
-int
-variable_cmp(char *var, char *value)
-{
- char *val;
-
- if ((val = variable_get(var)))
- return strcmp(val, value);
- return -1;
-}
-
-void
-variable_unset(char *var)
-{
- Variable *vp;
- char name[512], *cp;
-
- if ((cp = strchr(var, '=')) != NULL)
- sstrncpy(name, var, cp - var);
- else
- SAFE_STRCPY(name, var);
- unsetenv(name);
- /* Now search to see if it's in our list, if we have one.. */
- if (!VarHead)
- return;
- else if (!VarHead->next && !strcmp(VarHead->name, name)) {
- safe_free(VarHead->name);
- safe_free(VarHead->value);
- free(VarHead);
- VarHead = NULL;
- }
- else {
- for (vp = VarHead; vp; vp = vp->next) {
- if (!strcmp(vp->name, name)) {
- Variable *save = vp->next;
-
- safe_free(vp->name);
- safe_free(vp->value);
- *vp = *save;
- safe_free(save);
- break;
- }
- }
- }
-}
-
-/* Prompt user for the name of a variable */
-char *
-variable_get_value(char *var, char *prompt, int dirty)
-{
- char *cp;
-
- cp = variable_get(var);
- if (cp && variable_get(VAR_NONINTERACTIVE))
- return cp;
- else if ((cp = msgGetInput(cp, "%s", prompt)) != NULL)
- variable_set2(var, cp, dirty);
- else
- cp = NULL;
- return cp;
-}
-
-/* Check if value passed in data (in the form "variable=value") is
- * valid, and it's status compared to the value of variable stored in
- * env
- *
- * Possible return values :
- * -3: Invalid line, the data string is NOT set as an env variable
- * -2: Invalid line, the data string is set as an env variable
- * -1: Invalid line
- * 0: Valid line, is NOT equal to env version
- * 1: Valid line, is equal to env version
- * 2: Valid line, value empty - e.g. foo=""
- * 3: Valid line, does not exist in env
-*/
-int
-variable_check2(char *data)
-{
- char *cp, *cp2, *cp3, tmp[256];
-
- if (data == NULL)
- return -1;
- SAFE_STRCPY(tmp, data);
- if ((cp = strchr(tmp, '=')) != NULL) {
- *(cp++) = '\0';
- if (*cp == '"') { /* smash quotes if present */
- ++cp;
- if ((cp3 = strchr(cp, '"')) != NULL)
- *cp3 = '\0';
- }
- else if ((cp3 = strchr(cp, ',')) != NULL)
- *cp3 = '\0';
- cp2 = variable_get(tmp);
- if (cp2 != NULL) {
- if (*cp == '\0')
- return 2;
- else
- return strcmp(cp, cp2) == 0 ? 1 : 0;
- }
- else
- return 3;
- }
- else
- return variable_get(tmp) != NULL ? -2 : -3;
-}
-
-/* Check if the value passed in data (in the form "variable=value") is
- equal to the value of variable stored in env */
-int
-variable_check(char *data)
-{
- int ret;
- ret = variable_check2(data);
-
- switch(ret) {
- case -2:
- case 1:
- case 2:
- return TRUE;
- /* NOT REACHED */
- default:
- return FALSE;
- }
-}
-
-int
-dump_variables(dialogMenuItem *unused)
-{
- FILE *fp;
- Variable *vp;
-
- if (isDebug())
- msgDebug("Writing %s variables to file..\n", ProgName);
-
- fp = fopen("/etc/sade.vars", "w");
- if (!fp) {
- msgConfirm("Unable to write to /etc/%s.vars: %s",
- ProgName, strerror(errno));
- return DITEM_FAILURE;
- }
-
- for (vp = VarHead; vp; vp = vp->next)
- fprintf(fp, "%s=\"%s\" (%d)\n", vp->name, vp->value, vp->dirty);
-
- fclose(fp);
-
- return DITEM_SUCCESS;
-}
-
-/* Free all of the variables, useful to really start over as when the
- user selects "restart" from the interrupt menu. */
-void
-free_variables(void)
-{
- Variable *vp;
-
- /* Free the variables from our list, if we have one.. */
- if (!VarHead)
- return;
- else if (!VarHead->next) {
- unsetenv(VarHead->name);
- safe_free(VarHead->name);
- safe_free(VarHead->value);
- free(VarHead);
- VarHead = NULL;
- }
- else {
- for (vp = VarHead; vp; ) {
- Variable *save = vp;
- unsetenv(vp->name);
- safe_free(vp->name);
- safe_free(vp->value);
- vp = vp->next;
- safe_free(save);
- }
- VarHead = NULL;
- }
-}
-
-/*
- * Persistent variables. The variables modified by these functions
- * are not cleared between invocations of sysinstall. This is useful
- * to allow the user to completely restart sysinstall, without having
- * it load all of the modules again from the installation media which
- * are still in memory.
- */
-
-void
-pvariable_set(char *var)
-{
- char *p;
- char tmp[1024];
-
- if (!var)
- msgFatal("NULL variable name & value passed.");
- else if (!*var)
- msgDebug("Warning: Zero length name & value passed to variable_set()\n");
- /* Add a trivial namespace to whatever name the caller chooses. */
- SAFE_STRCPY(tmp, "SYSINSTALL_PVAR");
- if (strchr(var, '=') == NULL)
- msgFatal("Invalid variable format: %s", var);
- strlcat(tmp, var, 1024);
- p = strchr(tmp, '=');
- *p = '\0';
- setenv(tmp, p + 1, 1);
-}
-
-char *
-pvariable_get(char *var)
-{
- char tmp[1024];
-
- SAFE_STRCPY(tmp, "SYSINSTALL_PVAR");
- strlcat(tmp, var, 1024);
- return getenv(tmp);
-}
diff --git a/usr.sbin/sade/wizard.c b/usr.sbin/sade/wizard.c
deleted file mode 100644
index 5edd872..0000000
--- a/usr.sbin/sade/wizard.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * $FreeBSD$
- */
-
-#include "sade.h"
-#include <fcntl.h>
-#include <err.h>
-#include <libdisk.h>
-
-static int
-scan_block(int fd, daddr_t block)
-{
- u_char foo[512];
-
- if (-1 == lseek(fd,block * 512,SEEK_SET))
- err(1,"lseek");
- if (512 != read(fd,foo, 512))
- return 1;
- return 0;
-}
-
-static void
-Scan_Disk(Disk *d)
-{
- char device[64];
- u_long l;
- int i,j,fd;
-
- strcpy(device,"/dev/");
- strcat(device,d->name);
-
- fd = open(device,O_RDWR);
- if (fd < 0) {
- msgWarn("open(%s) failed", device);
- return;
- }
- for(i=-1,l=0;;l++) {
- j = scan_block(fd,l);
- if (j != i) {
- if (i == -1) {
- printf("%c: %lu.",j ? 'B' : 'G', l);
- fflush(stdout);
- } else if (i == 0) {
- printf(".%lu\nB: %lu.",l-1,l);
- fflush(stdout);
- } else {
- printf(".%lu\nG: %lu.",l-1,l);
- fflush(stdout);
- }
- i = j;
- }
- }
- close(fd);
-}
-
-void
-slice_wizard(Disk *d)
-{
- Disk *db;
- char myprompt[BUFSIZ];
- char input[BUFSIZ];
- char *p,*q=0;
- char **cp,*cmds[200];
- int ncmd,i;
-
- systemSuspendDialog();
- sprintf(myprompt,"%s> ", d->name);
- while(1) {
- printf("--==##==--\n");
- Debug_Disk(d);
- p = CheckRules(d);
- if (p) {
- printf("%s",p);
- free(p);
- }
- printf("%s", myprompt);
- fflush(stdout);
- q = p = fgets(input,sizeof(input),stdin);
- if(!p)
- break;
- for(cp = cmds; (*cp = strsep(&p, " \t\n")) != NULL;)
- if (**cp != '\0')
- cp++;
- ncmd = cp - cmds;
- if(!ncmd)
- continue;
- if (!strcasecmp(*cmds,"quit")) { break; }
- if (!strcasecmp(*cmds,"exit")) { break; }
- if (!strcasecmp(*cmds,"q")) { break; }
- if (!strcasecmp(*cmds,"x")) { break; }
- if (!strcasecmp(*cmds,"delete") && ncmd == 2) {
- printf("delete = %d\n",
- Delete_Chunk(d,
- (struct chunk *)strtol(cmds[1],0,0)));
- continue;
- }
- if (!strcasecmp(*cmds,"allfreebsd")) {
- All_FreeBSD(d, 0);
- continue;
- }
- if (!strcasecmp(*cmds,"dedicate")) {
- All_FreeBSD(d, 1);
- continue;
- }
- if (!strcasecmp(*cmds,"bios") && ncmd == 4) {
- Set_Bios_Geom(d,
- strtol(cmds[1],0,0),
- strtol(cmds[2],0,0),
- strtol(cmds[3],0,0));
- continue;
- }
- if (!strcasecmp(*cmds,"list")) {
- cp = Disk_Names();
- printf("Disks:");
- for(i=0;cp[i];i++) {
- printf(" %s",cp[i]);
- free(cp[i]);
- }
- free(cp);
- continue;
- }
-#ifdef PC98
- if (!strcasecmp(*cmds,"create") && ncmd == 7) {
- printf("Create=%d\n",
- Create_Chunk(d,
- strtol(cmds[1],0,0),
- strtol(cmds[2],0,0),
- strtol(cmds[3],0,0),
- strtol(cmds[4],0,0),
- strtol(cmds[5],0,0),
- cmds[6]));
- continue;
- }
-#else
- if (!strcasecmp(*cmds,"create") && ncmd == 6) {
- printf("Create=%d\n",
- Create_Chunk(d,
- strtol(cmds[1],0,0),
- strtol(cmds[2],0,0),
- strtol(cmds[3],0,0),
- strtol(cmds[4],0,0),
- strtol(cmds[5],0,0), ""));
- continue;
- }
-#endif
- if (!strcasecmp(*cmds,"read")) {
- db = d;
- if (ncmd > 1)
- d = Open_Disk(cmds[1]);
- else
- d = Open_Disk(d->name);
- if (d)
- Free_Disk(db);
- else
- d = db;
- continue;
- }
- if (!strcasecmp(*cmds,"scan")) {
- Scan_Disk(d);
- continue;
- }
- if (!strcasecmp(*cmds,"write")) {
- printf("Write=%d\n",
- Fake ? 0 : Write_Disk(d));
- q = strdup(d->name);
- Free_Disk(d);
- d = Open_Disk(q);
- continue;
- }
- if (strcasecmp(*cmds,"help"))
- printf("\007ERROR\n");
- printf("CMDS:\n");
- printf("allfreebsd\t\t");
- printf("dedicate\t\t");
- printf("bios cyl hd sect\n");
- printf("collapse [pointer]\t\t");
-#ifdef PC98
- printf("create offset size enum subtype flags name\n");
-#else
- printf("create offset size enum subtype flags\n");
-#endif
- printf("subtype(part): swap=1, ffs=7\t\t");
- printf("delete pointer\n");
- printf("list\t\t");
- printf("quit\n");
- printf("read [disk]\t\t");
- printf("scan\n");
- printf("write\t\t");
- printf("\n");
-
- }
- systemResumeDialog();
-}
diff --git a/usr.sbin/service/service.8 b/usr.sbin/service/service.8
index 10f2e8f..0c2b2d3 100644
--- a/usr.sbin/service/service.8
+++ b/usr.sbin/service/service.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 26, 2009
+.Dd December 11, 2012
.Dt SERVICE 8
.Os
.Sh NAME
@@ -34,6 +34,8 @@
.Nm
.Fl e
.Nm
+.Fl R
+.Nm
.Op Fl v
.Fl l | r
.Nm
@@ -62,6 +64,8 @@ then that list of scripts is checked for an
.Qq rcvar
assignment.
If present the script is checked to see if it is enabled.
+.It Fl R
+Restart all enabled local services.
.It Fl l
List all files in
.Pa /etc/rc.d
diff --git a/usr.sbin/service/service.sh b/usr.sbin/service/service.sh
index 1794315..cf181fa 100755
--- a/usr.sbin/service/service.sh
+++ b/usr.sbin/service/service.sh
@@ -33,29 +33,58 @@ usage () {
echo ''
echo 'Usage:'
echo "${0##*/} -e"
+ echo "${0##*/} -R"
echo "${0##*/} [-v] -l | -r"
echo "${0##*/} [-v] <rc.d script> start|stop|etc."
echo "${0##*/} -h"
echo ''
echo '-e Show services that are enabled'
+ echo "-R Stop and start enabled $local_startup services"
echo "-l List all scripts in /etc/rc.d and $local_startup"
echo '-r Show the results of boot time rcorder'
echo '-v Verbose'
echo ''
}
-while getopts 'ehlrv' COMMAND_LINE_ARGUMENT ; do
+while getopts 'ehlrRv' COMMAND_LINE_ARGUMENT ; do
case "${COMMAND_LINE_ARGUMENT}" in
e) ENABLED=eopt ;;
h) usage ; exit 0 ;;
l) LIST=lopt ;;
r) RCORDER=ropt ;;
+ R) RESTART=Ropt ;;
v) VERBOSE=vopt ;;
*) usage ; exit 1 ;;
esac
done
shift $(( $OPTIND - 1 ))
+if [ -n "$RESTART" ]; then
+ skip="-s nostart"
+ if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then
+ skip="$skip -s nojail"
+ fi
+ [ -n "$local_startup" ] && find_local_scripts_new
+ files=`rcorder ${skip} ${local_rc} 2>/dev/null`
+
+ for file in `reverse_list ${files}`; do
+ if grep -q ^rcvar $file; then
+ eval `grep ^name= $file`
+ eval `grep ^rcvar $file`
+ checkyesno $rcvar 2>/dev/null && run_rc_script ${file} stop
+ fi
+ done
+ for file in $files; do
+ if grep -q ^rcvar $file; then
+ eval `grep ^name= $file`
+ eval `grep ^rcvar $file`
+ checkyesno $rcvar 2>/dev/null && run_rc_script ${file} start
+ fi
+ done
+
+ exit 0
+fi
+
if [ -n "$ENABLED" -o -n "$RCORDER" ]; then
# Copied from /etc/rc
skip="-s nostart"
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index fff7e4c..bb56b6b 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -1873,6 +1873,7 @@ cfline(const char *line, struct filed *f, const char *prog, const char *host)
pri = decode(buf, prioritynames);
if (pri < 0) {
+ errno = 0;
(void)snprintf(ebuf, sizeof ebuf,
"unknown priority name \"%s\"", buf);
logerror(ebuf);
@@ -1901,6 +1902,7 @@ cfline(const char *line, struct filed *f, const char *prog, const char *host)
} else {
i = decode(buf, facilitynames);
if (i < 0) {
+ errno = 0;
(void)snprintf(ebuf, sizeof ebuf,
"unknown facility name \"%s\"",
buf);
@@ -2687,6 +2689,7 @@ socksetup(int af, char *bindhostname)
logerror("socket");
continue;
}
+#ifdef INET6
if (r->ai_family == AF_INET6) {
if (setsockopt(*s, IPPROTO_IPV6, IPV6_V6ONLY,
(char *)&on, sizeof (on)) < 0) {
@@ -2695,6 +2698,7 @@ socksetup(int af, char *bindhostname)
continue;
}
}
+#endif
if (setsockopt(*s, SOL_SOCKET, SO_REUSEADDR,
(char *)&on, sizeof (on)) < 0) {
logerror("setsockopt");
@@ -2711,8 +2715,8 @@ socksetup(int af, char *bindhostname)
*/
if (!NoBind) {
if (bind(*s, r->ai_addr, r->ai_addrlen) < 0) {
- close(*s);
logerror("bind");
+ close(*s);
continue;
}
diff --git a/usr.sbin/ypserv/yp_main.c b/usr.sbin/ypserv/yp_main.c
index 69dae29..60bd6a1 100644
--- a/usr.sbin/ypserv/yp_main.c
+++ b/usr.sbin/ypserv/yp_main.c
@@ -292,7 +292,7 @@ create_service(const int sock, const struct netconfig *nconf,
s = __rpc_nconf2fd(nconf);
if (s < 0) {
- if (errno == EPROTONOSUPPORT)
+ if (errno == EAFNOSUPPORT)
_msgout("unsupported"
" transport: %s",
nconf->nc_netid);
OpenPOWER on IntegriCloud